@altimateai/ui-components 0.0.51 → 0.0.52-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CoachForm.js +8144 -7981
- package/dist/TagsInput.js +1073 -1072
- package/dist/chatbotV2/index.d.ts +14 -3
- package/dist/chatbotV2/index.js +43 -40
- package/dist/flowchart-elk-definition-170a3958.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -15
- package/dist/is_dark.js +4 -4
- package/dist/main.js +1 -1
- package/dist/mindmap-definition-44684416.js +1 -1
- package/dist/shadcn/index.d.ts +2 -1
- package/dist/timeline-definition-8e5a9bc6.js +20 -20
- package/dist/{types-oWZJEjV7.d.ts → types-Dqrpza7-.d.ts} +24 -1
- package/package.json +1 -1
package/dist/TagsInput.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as c, C as ai, a as ea, S as oi, b as si, c as Ur, d as li } from "./index2.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import
|
|
4
|
-
import { g as Yt, R as Br, T as ta, C as Xt, h as Hr, O as Zt, c as
|
|
3
|
+
import Q, { useImperativeHandle as ii, forwardRef as _e, useState as ke, useRef as lt, useCallback as Ke, useEffect as pt } from "react";
|
|
4
|
+
import { g as Yt, R as Br, T as ta, C as Xt, h as Hr, O as Zt, c as k, i as Jt, j as Gr, D as Kr, k as nt, l as Et, m as Wr, a as at, n as Qt, o as er, A as ra, p as dt, u as be, q as na, d as X, r as aa, F as oa, s as sa, t as la, v as ia, P as se, I as ca, w as tr, x as ua, y as da, z as ci, B as rr, E as zr, G as fa, H as Ce, b as ze, J as ui, K as di, L as Ue, M as pa, W as fi, N as ma, e as pi, V as mi, Q as gi, S as An, U as Rn, X as gr, Y as Tn, Z as Mn, _ as vi, $ as hi } from "./Stack.js";
|
|
5
5
|
import * as ga from "react-dom";
|
|
6
6
|
import xi from "react-dom";
|
|
7
7
|
/**
|
|
@@ -34,7 +34,7 @@ const Ci = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], Dn = Yt("outline",
|
|
|
34
34
|
const _i = [["path", { d: "M18 6l-12 12", key: "svg-0" }], ["path", { d: "M6 6l12 12", key: "svg-1" }]], va = Yt("outline", "x", "X", _i), Yp = Br, Xp = ta, Zp = Xt, Ni = Hr, ha = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
35
35
|
Zt,
|
|
36
36
|
{
|
|
37
|
-
className:
|
|
37
|
+
className: k(
|
|
38
38
|
"al-fixed al-inset-0 al-z-50 al-bg-black/80 al- data-[state=open]:al-animate-in data-[state=closed]:al-animate-out data-[state=closed]:al-fade-out-0 data-[state=open]:al-fade-in-0",
|
|
39
39
|
e
|
|
40
40
|
),
|
|
@@ -64,7 +64,7 @@ const Ei = nt(
|
|
|
64
64
|
Jt,
|
|
65
65
|
{
|
|
66
66
|
ref: o,
|
|
67
|
-
className:
|
|
67
|
+
className: k(Ei({ side: e }), "al-pr-0", r),
|
|
68
68
|
...a,
|
|
69
69
|
children: [
|
|
70
70
|
/* @__PURE__ */ c.jsx("div", { className: "al-h-full al-flex-1 al-overflow-y-auto al-pr-4", children: t }),
|
|
@@ -80,7 +80,7 @@ Ii.displayName = Jt.displayName;
|
|
|
80
80
|
const Ai = ({ className: e, ...r }) => /* @__PURE__ */ c.jsx(
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
|
-
className:
|
|
83
|
+
className: k("al-flex al-flex-col al-space-y-2 al-text-center sm:al-text-left", e),
|
|
84
84
|
...r
|
|
85
85
|
}
|
|
86
86
|
);
|
|
@@ -88,7 +88,7 @@ Ai.displayName = "SheetHeader";
|
|
|
88
88
|
const Ri = ({ className: e, ...r }) => /* @__PURE__ */ c.jsx(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
|
-
className:
|
|
91
|
+
className: k(
|
|
92
92
|
"al-flex al-flex-col-reverse sm:al-flex-row sm:al-justify-end sm:al-space-x-2",
|
|
93
93
|
e
|
|
94
94
|
),
|
|
@@ -100,7 +100,7 @@ const Ti = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
100
100
|
Gr,
|
|
101
101
|
{
|
|
102
102
|
ref: t,
|
|
103
|
-
className:
|
|
103
|
+
className: k("al-text-lg al-font-semibold al-text-foreground", e),
|
|
104
104
|
...r
|
|
105
105
|
}
|
|
106
106
|
));
|
|
@@ -109,7 +109,7 @@ const Mi = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
109
109
|
Kr,
|
|
110
110
|
{
|
|
111
111
|
ref: t,
|
|
112
|
-
className:
|
|
112
|
+
className: k("al-text-sm al-text-muted-foreground", e),
|
|
113
113
|
...r
|
|
114
114
|
}
|
|
115
115
|
));
|
|
@@ -160,7 +160,7 @@ const Di = ({
|
|
|
160
160
|
...o,
|
|
161
161
|
value: a,
|
|
162
162
|
ref: i,
|
|
163
|
-
className:
|
|
163
|
+
className: k(
|
|
164
164
|
"al-flex al-w-full al-rounded-md al-border al-border-input al-bg-background al-px-3 al-py-2 al-text-sm al-ring-offset-background al-placeholder:al-text-muted-foreground al-focus-visible:al-outline-none al-focus-visible:al-ring-2 al-focus-visible:al-ring-ring al-focus-visible:al-ring-offset-2 al-disabled:al-cursor-not-allowed al-disabled:al-opacity-50",
|
|
165
165
|
t
|
|
166
166
|
),
|
|
@@ -288,7 +288,7 @@ var De = "MenuContent", [zi, Xr] = ot(De), Ea = l.forwardRef(
|
|
|
288
288
|
trapFocus: t.open,
|
|
289
289
|
disableOutsidePointerEvents: t.open,
|
|
290
290
|
disableOutsideScroll: !0,
|
|
291
|
-
onFocusOutside:
|
|
291
|
+
onFocusOutside: X(
|
|
292
292
|
e.onFocusOutside,
|
|
293
293
|
(o) => o.preventDefault(),
|
|
294
294
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -327,54 +327,54 @@ var De = "MenuContent", [zi, Xr] = ot(De), Ea = l.forwardRef(
|
|
|
327
327
|
onDismiss: w,
|
|
328
328
|
disableOutsideScroll: C,
|
|
329
329
|
...h
|
|
330
|
-
} = e, _ = qe(De, t),
|
|
331
|
-
var E,
|
|
332
|
-
const
|
|
333
|
-
(function B
|
|
334
|
-
|
|
335
|
-
})(
|
|
330
|
+
} = e, _ = qe(De, t), A = Rt(De, t), y = At(t), R = wa(t), ee = Bi(t), [H, Z] = l.useState(null), T = l.useRef(null), le = be(r, T, _.onContentChange), W = l.useRef(0), Y = l.useRef(""), ce = l.useRef(0), F = l.useRef(null), G = l.useRef("right"), z = l.useRef(0), te = C ? da : l.Fragment, J = C ? { as: xa, allowPinchZoom: !0 } : void 0, ie = (V) => {
|
|
331
|
+
var E, U;
|
|
332
|
+
const oe = Y.current + V, de = ee().filter((re) => !re.disabled), S = document.activeElement, L = (E = de.find((re) => re.ref.current === S)) == null ? void 0 : E.textValue, K = de.map((re) => re.textValue), O = lc(K, oe, L), q = (U = de.find((re) => re.textValue === O)) == null ? void 0 : U.ref.current;
|
|
333
|
+
(function re(B) {
|
|
334
|
+
Y.current = B, window.clearTimeout(W.current), B !== "" && (W.current = window.setTimeout(() => re(""), 1e3));
|
|
335
|
+
})(oe), q && setTimeout(() => q.focus());
|
|
336
336
|
};
|
|
337
|
-
l.useEffect(() => () => window.clearTimeout(
|
|
338
|
-
const ue = l.useCallback((
|
|
339
|
-
var
|
|
340
|
-
return
|
|
337
|
+
l.useEffect(() => () => window.clearTimeout(W.current), []), aa();
|
|
338
|
+
const ue = l.useCallback((V) => {
|
|
339
|
+
var de, S;
|
|
340
|
+
return G.current === ((de = F.current) == null ? void 0 : de.side) && cc(V, (S = F.current) == null ? void 0 : S.area);
|
|
341
341
|
}, []);
|
|
342
342
|
return /* @__PURE__ */ c.jsx(
|
|
343
343
|
zi,
|
|
344
344
|
{
|
|
345
345
|
scope: t,
|
|
346
|
-
searchRef:
|
|
346
|
+
searchRef: Y,
|
|
347
347
|
onItemEnter: l.useCallback(
|
|
348
|
-
(
|
|
349
|
-
ue(
|
|
348
|
+
(V) => {
|
|
349
|
+
ue(V) && V.preventDefault();
|
|
350
350
|
},
|
|
351
351
|
[ue]
|
|
352
352
|
),
|
|
353
353
|
onItemLeave: l.useCallback(
|
|
354
|
-
(
|
|
355
|
-
var
|
|
356
|
-
ue(
|
|
354
|
+
(V) => {
|
|
355
|
+
var oe;
|
|
356
|
+
ue(V) || ((oe = T.current) == null || oe.focus(), Z(null));
|
|
357
357
|
},
|
|
358
358
|
[ue]
|
|
359
359
|
),
|
|
360
360
|
onTriggerLeave: l.useCallback(
|
|
361
|
-
(
|
|
362
|
-
ue(
|
|
361
|
+
(V) => {
|
|
362
|
+
ue(V) && V.preventDefault();
|
|
363
363
|
},
|
|
364
364
|
[ue]
|
|
365
365
|
),
|
|
366
|
-
pointerGraceTimerRef:
|
|
367
|
-
onPointerGraceIntentChange: l.useCallback((
|
|
368
|
-
F.current =
|
|
366
|
+
pointerGraceTimerRef: ce,
|
|
367
|
+
onPointerGraceIntentChange: l.useCallback((V) => {
|
|
368
|
+
F.current = V;
|
|
369
369
|
}, []),
|
|
370
|
-
children: /* @__PURE__ */ c.jsx(te, { ...
|
|
370
|
+
children: /* @__PURE__ */ c.jsx(te, { ...J, children: /* @__PURE__ */ c.jsx(
|
|
371
371
|
oa,
|
|
372
372
|
{
|
|
373
373
|
asChild: !0,
|
|
374
374
|
trapped: a,
|
|
375
|
-
onMountAutoFocus:
|
|
376
|
-
var
|
|
377
|
-
|
|
375
|
+
onMountAutoFocus: X(o, (V) => {
|
|
376
|
+
var oe;
|
|
377
|
+
V.preventDefault(), (oe = T.current) == null || oe.focus({ preventScroll: !0 });
|
|
378
378
|
}),
|
|
379
379
|
onUnmountAutoFocus: s,
|
|
380
380
|
children: /* @__PURE__ */ c.jsx(
|
|
@@ -391,14 +391,14 @@ var De = "MenuContent", [zi, Xr] = ot(De), Ea = l.forwardRef(
|
|
|
391
391
|
la,
|
|
392
392
|
{
|
|
393
393
|
asChild: !0,
|
|
394
|
-
...
|
|
395
|
-
dir:
|
|
394
|
+
...R,
|
|
395
|
+
dir: A.dir,
|
|
396
396
|
orientation: "vertical",
|
|
397
397
|
loop: n,
|
|
398
|
-
currentTabStopId:
|
|
399
|
-
onCurrentTabStopIdChange:
|
|
400
|
-
onEntryFocus:
|
|
401
|
-
|
|
398
|
+
currentTabStopId: H,
|
|
399
|
+
onCurrentTabStopIdChange: Z,
|
|
400
|
+
onEntryFocus: X(u, (V) => {
|
|
401
|
+
A.isUsingKeyboardRef.current || V.preventDefault();
|
|
402
402
|
}),
|
|
403
403
|
preventScrollOnEntryFocus: !0,
|
|
404
404
|
children: /* @__PURE__ */ c.jsx(
|
|
@@ -408,30 +408,30 @@ var De = "MenuContent", [zi, Xr] = ot(De), Ea = l.forwardRef(
|
|
|
408
408
|
"aria-orientation": "vertical",
|
|
409
409
|
"data-state": Ha(_.open),
|
|
410
410
|
"data-radix-menu-content": "",
|
|
411
|
-
dir:
|
|
411
|
+
dir: A.dir,
|
|
412
412
|
...y,
|
|
413
413
|
...h,
|
|
414
|
-
ref:
|
|
414
|
+
ref: le,
|
|
415
415
|
style: { outline: "none", ...h.style },
|
|
416
|
-
onKeyDown:
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
const
|
|
420
|
-
if (
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
ya.includes(
|
|
416
|
+
onKeyDown: X(h.onKeyDown, (V) => {
|
|
417
|
+
const de = V.target.closest("[data-radix-menu-content]") === V.currentTarget, S = V.ctrlKey || V.altKey || V.metaKey, L = V.key.length === 1;
|
|
418
|
+
de && (V.key === "Tab" && V.preventDefault(), !S && L && ie(V.key));
|
|
419
|
+
const K = T.current;
|
|
420
|
+
if (V.target !== K || !$i.includes(V.key)) return;
|
|
421
|
+
V.preventDefault();
|
|
422
|
+
const q = ee().filter((E) => !E.disabled).map((E) => E.ref.current);
|
|
423
|
+
ya.includes(V.key) && q.reverse(), oc(q);
|
|
424
424
|
}),
|
|
425
|
-
onBlur:
|
|
426
|
-
|
|
425
|
+
onBlur: X(e.onBlur, (V) => {
|
|
426
|
+
V.currentTarget.contains(V.target) || (window.clearTimeout(W.current), Y.current = "");
|
|
427
427
|
}),
|
|
428
|
-
onPointerMove:
|
|
428
|
+
onPointerMove: X(
|
|
429
429
|
e.onPointerMove,
|
|
430
|
-
Ct((
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
433
|
-
const S =
|
|
434
|
-
|
|
430
|
+
Ct((V) => {
|
|
431
|
+
const oe = V.target, de = z.current !== V.clientX;
|
|
432
|
+
if (V.currentTarget.contains(oe) && de) {
|
|
433
|
+
const S = V.clientX > z.current ? "right" : "left";
|
|
434
|
+
G.current = S, z.current = V.clientX;
|
|
435
435
|
}
|
|
436
436
|
})
|
|
437
437
|
)
|
|
@@ -477,16 +477,16 @@ var $t = "MenuItem", Pn = "menu.itemSelect", nr = l.forwardRef(
|
|
|
477
477
|
...a,
|
|
478
478
|
ref: u,
|
|
479
479
|
disabled: t,
|
|
480
|
-
onClick:
|
|
480
|
+
onClick: X(e.onClick, p),
|
|
481
481
|
onPointerDown: (m) => {
|
|
482
482
|
var g;
|
|
483
483
|
(g = e.onPointerDown) == null || g.call(e, m), f.current = !0;
|
|
484
484
|
},
|
|
485
|
-
onPointerUp:
|
|
485
|
+
onPointerUp: X(e.onPointerUp, (m) => {
|
|
486
486
|
var g;
|
|
487
487
|
f.current || (g = m.currentTarget) == null || g.click();
|
|
488
488
|
}),
|
|
489
|
-
onKeyDown:
|
|
489
|
+
onKeyDown: X(e.onKeyDown, (m) => {
|
|
490
490
|
const g = i.searchRef.current !== "";
|
|
491
491
|
t || g && m.key === " " || Er.includes(m.key) && (m.currentTarget.click(), m.preventDefault());
|
|
492
492
|
})
|
|
@@ -516,18 +516,18 @@ var Aa = l.forwardRef(
|
|
|
516
516
|
"data-disabled": n ? "" : void 0,
|
|
517
517
|
...o,
|
|
518
518
|
ref: f,
|
|
519
|
-
onPointerMove:
|
|
519
|
+
onPointerMove: X(
|
|
520
520
|
e.onPointerMove,
|
|
521
521
|
Ct((C) => {
|
|
522
522
|
n ? s.onItemLeave(C) : (s.onItemEnter(C), C.defaultPrevented || C.currentTarget.focus({ preventScroll: !0 }));
|
|
523
523
|
})
|
|
524
524
|
),
|
|
525
|
-
onPointerLeave:
|
|
525
|
+
onPointerLeave: X(
|
|
526
526
|
e.onPointerLeave,
|
|
527
527
|
Ct((C) => s.onItemLeave(C))
|
|
528
528
|
),
|
|
529
|
-
onFocus:
|
|
530
|
-
onBlur:
|
|
529
|
+
onFocus: X(e.onFocus, () => m(!0)),
|
|
530
|
+
onBlur: X(e.onBlur, () => m(!1))
|
|
531
531
|
}
|
|
532
532
|
) })
|
|
533
533
|
}
|
|
@@ -544,7 +544,7 @@ var Aa = l.forwardRef(
|
|
|
544
544
|
...a,
|
|
545
545
|
ref: r,
|
|
546
546
|
"data-state": tn(t),
|
|
547
|
-
onSelect:
|
|
547
|
+
onSelect: X(
|
|
548
548
|
a.onSelect,
|
|
549
549
|
() => n == null ? void 0 : n(Lt(t) ? !0 : !t),
|
|
550
550
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -576,7 +576,7 @@ var Da = "MenuRadioItem", Pa = l.forwardRef(
|
|
|
576
576
|
...n,
|
|
577
577
|
ref: r,
|
|
578
578
|
"data-state": tn(o),
|
|
579
|
-
onSelect:
|
|
579
|
+
onSelect: X(
|
|
580
580
|
n.onSelect,
|
|
581
581
|
() => {
|
|
582
582
|
var s;
|
|
@@ -683,7 +683,7 @@ var ht = "MenuSubTrigger", La = l.forwardRef(
|
|
|
683
683
|
var g;
|
|
684
684
|
(g = e.onClick) == null || g.call(e, m), !(e.disabled || m.defaultPrevented) && (m.currentTarget.focus(), t.open || t.onOpenChange(!0));
|
|
685
685
|
},
|
|
686
|
-
onPointerMove:
|
|
686
|
+
onPointerMove: X(
|
|
687
687
|
e.onPointerMove,
|
|
688
688
|
Ct((m) => {
|
|
689
689
|
o.onItemEnter(m), !m.defaultPrevented && !e.disabled && !t.open && !s.current && (o.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
|
|
@@ -691,22 +691,22 @@ var ht = "MenuSubTrigger", La = l.forwardRef(
|
|
|
691
691
|
}, 100));
|
|
692
692
|
})
|
|
693
693
|
),
|
|
694
|
-
onPointerLeave:
|
|
694
|
+
onPointerLeave: X(
|
|
695
695
|
e.onPointerLeave,
|
|
696
696
|
Ct((m) => {
|
|
697
697
|
var w, C;
|
|
698
698
|
p();
|
|
699
699
|
const g = (w = t.content) == null ? void 0 : w.getBoundingClientRect();
|
|
700
700
|
if (g) {
|
|
701
|
-
const h = (C = t.content) == null ? void 0 : C.dataset.side, _ = h === "right",
|
|
701
|
+
const h = (C = t.content) == null ? void 0 : C.dataset.side, _ = h === "right", A = _ ? -5 : 5, y = g[_ ? "left" : "right"], R = g[_ ? "right" : "left"];
|
|
702
702
|
o.onPointerGraceIntentChange({
|
|
703
703
|
area: [
|
|
704
704
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
705
705
|
// consistently within polygon bounds
|
|
706
|
-
{ x: m.clientX +
|
|
706
|
+
{ x: m.clientX + A, y: m.clientY },
|
|
707
707
|
{ x: y, y: g.top },
|
|
708
|
-
{ x:
|
|
709
|
-
{ x:
|
|
708
|
+
{ x: R, y: g.top },
|
|
709
|
+
{ x: R, y: g.bottom },
|
|
710
710
|
{ x: y, y: g.bottom }
|
|
711
711
|
],
|
|
712
712
|
side: h
|
|
@@ -720,7 +720,7 @@ var ht = "MenuSubTrigger", La = l.forwardRef(
|
|
|
720
720
|
}
|
|
721
721
|
})
|
|
722
722
|
),
|
|
723
|
-
onKeyDown:
|
|
723
|
+
onKeyDown: X(e.onKeyDown, (m) => {
|
|
724
724
|
var w;
|
|
725
725
|
const g = o.searchRef.current !== "";
|
|
726
726
|
e.disabled || g && m.key === " " || Li[n.dir].includes(m.key) && (t.onOpenChange(!0), (w = t.content) == null || w.focus(), m.preventDefault());
|
|
@@ -750,13 +750,13 @@ var Ua = "MenuSubContent", Ba = l.forwardRef(
|
|
|
750
750
|
s.isUsingKeyboardRef.current && ((m = u.current) == null || m.focus()), p.preventDefault();
|
|
751
751
|
},
|
|
752
752
|
onCloseAutoFocus: (p) => p.preventDefault(),
|
|
753
|
-
onFocusOutside:
|
|
753
|
+
onFocusOutside: X(e.onFocusOutside, (p) => {
|
|
754
754
|
p.target !== i.trigger && o.onOpenChange(!1);
|
|
755
755
|
}),
|
|
756
|
-
onEscapeKeyDown:
|
|
756
|
+
onEscapeKeyDown: X(e.onEscapeKeyDown, (p) => {
|
|
757
757
|
s.onClose(), p.preventDefault();
|
|
758
758
|
}),
|
|
759
|
-
onKeyDown:
|
|
759
|
+
onKeyDown: X(e.onKeyDown, (p) => {
|
|
760
760
|
var w;
|
|
761
761
|
const m = p.currentTarget.contains(p.target), g = Ui[s.dir].includes(p.key);
|
|
762
762
|
m && g && (o.onOpenChange(!1), (w = i.trigger) == null || w.focus(), p.preventDefault());
|
|
@@ -858,10 +858,10 @@ var Wa = "DropdownMenuTrigger", za = l.forwardRef(
|
|
|
858
858
|
disabled: n,
|
|
859
859
|
...a,
|
|
860
860
|
ref: Et(r, o.triggerRef),
|
|
861
|
-
onPointerDown:
|
|
861
|
+
onPointerDown: X(e.onPointerDown, (i) => {
|
|
862
862
|
!n && i.button === 0 && i.ctrlKey === !1 && (o.onOpenToggle(), o.open || i.preventDefault());
|
|
863
863
|
}),
|
|
864
|
-
onKeyDown:
|
|
864
|
+
onKeyDown: X(e.onKeyDown, (i) => {
|
|
865
865
|
n || (["Enter", " "].includes(i.key) && o.onOpenToggle(), i.key === "ArrowDown" && o.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(i.key) && i.preventDefault());
|
|
866
866
|
})
|
|
867
867
|
}
|
|
@@ -885,11 +885,11 @@ var Ya = "DropdownMenuContent", Xa = l.forwardRef(
|
|
|
885
885
|
...o,
|
|
886
886
|
...n,
|
|
887
887
|
ref: r,
|
|
888
|
-
onCloseAutoFocus:
|
|
888
|
+
onCloseAutoFocus: X(e.onCloseAutoFocus, (i) => {
|
|
889
889
|
var u;
|
|
890
890
|
s.current || (u = a.triggerRef.current) == null || u.focus(), s.current = !1, i.preventDefault();
|
|
891
891
|
}),
|
|
892
|
-
onInteractOutside:
|
|
892
|
+
onInteractOutside: X(e.onInteractOutside, (i) => {
|
|
893
893
|
const u = i.detail.originalEvent, f = u.button === 0 && u.ctrlKey === !0, p = u.button === 2 || f;
|
|
894
894
|
(!a.modal || p) && (s.current = !0);
|
|
895
895
|
}),
|
|
@@ -996,7 +996,7 @@ const Qp = Bc, em = Hc, tm = Gc, rm = lo, nm = Wc, am = Kc, zc = _e(({ className
|
|
|
996
996
|
vo,
|
|
997
997
|
{
|
|
998
998
|
ref: a,
|
|
999
|
-
className:
|
|
999
|
+
className: k(
|
|
1000
1000
|
"al-flex al-cursor-default al-gap-2 al-select-none al-items-center al-rounded-sm al-px-2 al-py-1.5 al-text-sm al-outline-none focus:al-bg-accent data-[state=open]:al-bg-accent [&_svg]:al-pointer-events-none [&_svg]:al-size-4 [&_svg]:al-shrink-0",
|
|
1001
1001
|
r && "al-pl-8",
|
|
1002
1002
|
e
|
|
@@ -1013,7 +1013,7 @@ const qc = _e(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
1013
1013
|
ho,
|
|
1014
1014
|
{
|
|
1015
1015
|
ref: t,
|
|
1016
|
-
className:
|
|
1016
|
+
className: k(
|
|
1017
1017
|
"al-z-50 al-min-w-[8rem] al-overflow-hidden al-rounded-md al-border al-bg-popover al-p-1 al-text-popover-foreground al-shadow-lg data-[state=open]:al-animate-in data-[state=closed]:al-animate-out data-[state=closed]:al-fade-out-0 data-[state=open]:al-fade-in-0 data-[state=closed]:al-zoom-out-95 data-[state=open]:al-zoom-in-95 data-[side=bottom]:al-slide-in-from-top-2 data-[side=left]:al-slide-in-from-right-2 data-[side=right]:al-slide-in-from-left-2 data-[side=top]:al-slide-in-from-bottom-2",
|
|
1018
1018
|
e
|
|
1019
1019
|
),
|
|
@@ -1026,7 +1026,7 @@ const Yc = _e(({ className: e, sideOffset: r = 4, ...t }, n) => /* @__PURE__ */
|
|
|
1026
1026
|
{
|
|
1027
1027
|
ref: n,
|
|
1028
1028
|
sideOffset: r,
|
|
1029
|
-
className:
|
|
1029
|
+
className: k(
|
|
1030
1030
|
"al-z-50 al-min-w-[8rem] al-overflow-hidden al-rounded-md al-border al-bg-popover al-p-1 al-text-popover-foreground al-shadow-md data-[state=open]:al-animate-in data-[state=closed]:al-animate-out data-[state=closed]:al-fade-out-0 data-[state=open]:al-fade-in-0 data-[state=closed]:al-zoom-out-95 data-[state=open]:al-zoom-in-95 data-[side=bottom]:al-slide-in-from-top-2 data-[side=left]:al-slide-in-from-right-2 data-[side=right]:al-slide-in-from-left-2 data-[side=top]:al-slide-in-from-bottom-2",
|
|
1031
1031
|
e
|
|
1032
1032
|
),
|
|
@@ -1038,7 +1038,7 @@ const Xc = _e(({ className: e, inset: r, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
1038
1038
|
uo,
|
|
1039
1039
|
{
|
|
1040
1040
|
ref: n,
|
|
1041
|
-
className:
|
|
1041
|
+
className: k(
|
|
1042
1042
|
"al-relative al-flex al-cursor-default al-select-none al-items-center al-gap-2 al-rounded-sm al-px-2 al-py-1.5 al-text-sm al-outline-none al-transition-colors focus:al-bg-accent focus:al-text-accent-foreground data-[disabled]:al-pointer-events-none data-[disabled]:al-opacity-50 [&_svg]:al-pointer-events-none [&_svg]:al-size-4 [&_svg]:al-shrink-0",
|
|
1043
1043
|
r && "al-pl-8",
|
|
1044
1044
|
e
|
|
@@ -1051,7 +1051,7 @@ const Zc = _e(({ className: e, children: r, checked: t, ...n }, a) => /* @__PURE
|
|
|
1051
1051
|
fo,
|
|
1052
1052
|
{
|
|
1053
1053
|
ref: a,
|
|
1054
|
-
className:
|
|
1054
|
+
className: k(
|
|
1055
1055
|
"al-relative al-flex al-cursor-default al-select-none al-items-center al-rounded-sm al-py-1.5 al-pl-8 al-pr-2 al-text-sm al-outline-none al-transition-colors focus:al-bg-accent focus:al-text-accent-foreground data-[disabled]:al-pointer-events-none data-[disabled]:al-opacity-50",
|
|
1056
1056
|
e
|
|
1057
1057
|
),
|
|
@@ -1068,7 +1068,7 @@ const Jc = _e(({ className: e, children: r, ...t }, n) => /* @__PURE__ */ c.jsxs
|
|
|
1068
1068
|
po,
|
|
1069
1069
|
{
|
|
1070
1070
|
ref: n,
|
|
1071
|
-
className:
|
|
1071
|
+
className: k(
|
|
1072
1072
|
"al-relative al-flex al-cursor-default al-select-none al-items-center al-rounded-sm al-py-1.5 al-pl-8 al-pr-2 al-text-sm al-outline-none al-transition-colors focus:al-bg-accent focus:al-text-accent-foreground data-[disabled]:al-pointer-events-none data-[disabled]:al-opacity-50",
|
|
1073
1073
|
e
|
|
1074
1074
|
),
|
|
@@ -1084,7 +1084,7 @@ const Qc = _e(({ className: e, inset: r, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
1084
1084
|
co,
|
|
1085
1085
|
{
|
|
1086
1086
|
ref: n,
|
|
1087
|
-
className:
|
|
1087
|
+
className: k("al-px-2 al-py-1.5 al-text-sm al-font-semibold", r && "al-pl-8", e),
|
|
1088
1088
|
...t
|
|
1089
1089
|
}
|
|
1090
1090
|
));
|
|
@@ -1093,7 +1093,7 @@ const eu = _e(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
1093
1093
|
go,
|
|
1094
1094
|
{
|
|
1095
1095
|
ref: t,
|
|
1096
|
-
className:
|
|
1096
|
+
className: k("al--mx-1 al-my-1 al-h-px al-bg-muted", e),
|
|
1097
1097
|
...r
|
|
1098
1098
|
}
|
|
1099
1099
|
));
|
|
@@ -1101,7 +1101,7 @@ eu.displayName = go.displayName;
|
|
|
1101
1101
|
const tu = ({ className: e, ...r }) => /* @__PURE__ */ c.jsx(
|
|
1102
1102
|
"span",
|
|
1103
1103
|
{
|
|
1104
|
-
className:
|
|
1104
|
+
className: k("al-ml-auto al-text-xs al-tracking-widest al-opacity-60", e),
|
|
1105
1105
|
...r
|
|
1106
1106
|
}
|
|
1107
1107
|
);
|
|
@@ -1134,7 +1134,7 @@ var kn;
|
|
|
1134
1134
|
function du() {
|
|
1135
1135
|
if (kn) return xr;
|
|
1136
1136
|
kn = 1;
|
|
1137
|
-
var e =
|
|
1137
|
+
var e = Q;
|
|
1138
1138
|
function r(m, g) {
|
|
1139
1139
|
return m === g && (m !== 0 || 1 / m === 1 / g) || m !== m && g !== g;
|
|
1140
1140
|
}
|
|
@@ -1201,16 +1201,16 @@ function fu() {
|
|
|
1201
1201
|
_ = s({
|
|
1202
1202
|
inst: { value: h, getSnapshot: C }
|
|
1203
1203
|
});
|
|
1204
|
-
var
|
|
1204
|
+
var A = _[0].inst, y = _[1];
|
|
1205
1205
|
return u(
|
|
1206
1206
|
function() {
|
|
1207
|
-
|
|
1207
|
+
A.value = h, A.getSnapshot = C, t(A) && y({ inst: A });
|
|
1208
1208
|
},
|
|
1209
1209
|
[w, h, C]
|
|
1210
1210
|
), i(
|
|
1211
1211
|
function() {
|
|
1212
|
-
return t(
|
|
1213
|
-
t(
|
|
1212
|
+
return t(A) && y({ inst: A }), w(function() {
|
|
1213
|
+
t(A) && y({ inst: A });
|
|
1214
1214
|
});
|
|
1215
1215
|
},
|
|
1216
1216
|
[w]
|
|
@@ -1230,7 +1230,7 @@ function fu() {
|
|
|
1230
1230
|
return C();
|
|
1231
1231
|
}
|
|
1232
1232
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1233
|
-
var a =
|
|
1233
|
+
var a = Q, o = typeof Object.is == "function" ? Object.is : e, s = a.useState, i = a.useEffect, u = a.useLayoutEffect, f = a.useDebugValue, p = !1, m = !1, g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : r;
|
|
1234
1234
|
yr.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1235
1235
|
}()), yr;
|
|
1236
1236
|
}
|
|
@@ -1239,188 +1239,188 @@ var pu = Ar.exports, mt = '[cmdk-group=""]', br = '[cmdk-group-items=""]', mu =
|
|
|
1239
1239
|
let t = ct(() => {
|
|
1240
1240
|
var S, L;
|
|
1241
1241
|
return { search: "", value: (L = (S = e.value) != null ? S : e.defaultValue) != null ? L : "", filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
1242
|
-
}), n = ct(() => /* @__PURE__ */ new Set()), a = ct(() => /* @__PURE__ */ new Map()), o = ct(() => /* @__PURE__ */ new Map()), s = ct(() => /* @__PURE__ */ new Set()), i = Co(e), { label: u, children: f, value: p, onValueChange: m, filter: g, shouldFilter: w, loop: C, disablePointerSelection: h = !1, vimBindings: _ = !0, ...
|
|
1242
|
+
}), n = ct(() => /* @__PURE__ */ new Set()), a = ct(() => /* @__PURE__ */ new Map()), o = ct(() => /* @__PURE__ */ new Map()), s = ct(() => /* @__PURE__ */ new Set()), i = Co(e), { label: u, children: f, value: p, onValueChange: m, filter: g, shouldFilter: w, loop: C, disablePointerSelection: h = !1, vimBindings: _ = !0, ...A } = e, y = Ce(), R = Ce(), ee = Ce(), H = l.useRef(null), Z = Eu();
|
|
1243
1243
|
et(() => {
|
|
1244
1244
|
if (p !== void 0) {
|
|
1245
1245
|
let S = p.trim();
|
|
1246
|
-
t.current.value = S,
|
|
1246
|
+
t.current.value = S, T.emit();
|
|
1247
1247
|
}
|
|
1248
1248
|
}, [p]), et(() => {
|
|
1249
|
-
|
|
1249
|
+
Z(6, G);
|
|
1250
1250
|
}, []);
|
|
1251
|
-
let
|
|
1252
|
-
var
|
|
1251
|
+
let T = l.useMemo(() => ({ subscribe: (S) => (s.current.add(S), () => s.current.delete(S)), snapshot: () => t.current, setState: (S, L, K) => {
|
|
1252
|
+
var O, q, E;
|
|
1253
1253
|
if (!Object.is(t.current[S], L)) {
|
|
1254
|
-
if (t.current[S] = L, S === "search") F(),
|
|
1255
|
-
else if (S === "value" && (
|
|
1256
|
-
let
|
|
1257
|
-
(E = (
|
|
1254
|
+
if (t.current[S] = L, S === "search") F(), Y(), Z(1, ce);
|
|
1255
|
+
else if (S === "value" && (K || Z(5, G), ((O = i.current) == null ? void 0 : O.value) !== void 0)) {
|
|
1256
|
+
let U = L ?? "";
|
|
1257
|
+
(E = (q = i.current).onValueChange) == null || E.call(q, U);
|
|
1258
1258
|
return;
|
|
1259
1259
|
}
|
|
1260
|
-
|
|
1260
|
+
T.emit();
|
|
1261
1261
|
}
|
|
1262
1262
|
}, emit: () => {
|
|
1263
1263
|
s.current.forEach((S) => S());
|
|
1264
|
-
} }), []),
|
|
1265
|
-
var
|
|
1266
|
-
L !== ((
|
|
1267
|
-
|
|
1264
|
+
} }), []), le = l.useMemo(() => ({ value: (S, L, K) => {
|
|
1265
|
+
var O;
|
|
1266
|
+
L !== ((O = o.current.get(S)) == null ? void 0 : O.value) && (o.current.set(S, { value: L, keywords: K }), t.current.filtered.items.set(S, W(L, K)), Z(2, () => {
|
|
1267
|
+
Y(), T.emit();
|
|
1268
1268
|
}));
|
|
1269
|
-
}, item: (S, L) => (n.current.add(S), L && (a.current.has(L) ? a.current.get(L).add(S) : a.current.set(L, /* @__PURE__ */ new Set([S]))),
|
|
1270
|
-
F(),
|
|
1269
|
+
}, item: (S, L) => (n.current.add(S), L && (a.current.has(L) ? a.current.get(L).add(S) : a.current.set(L, /* @__PURE__ */ new Set([S]))), Z(3, () => {
|
|
1270
|
+
F(), Y(), t.current.value || ce(), T.emit();
|
|
1271
1271
|
}), () => {
|
|
1272
1272
|
o.current.delete(S), n.current.delete(S), t.current.filtered.items.delete(S);
|
|
1273
|
-
let
|
|
1274
|
-
|
|
1275
|
-
F(), (
|
|
1273
|
+
let K = z();
|
|
1274
|
+
Z(4, () => {
|
|
1275
|
+
F(), (K == null ? void 0 : K.getAttribute("id")) === S && ce(), T.emit();
|
|
1276
1276
|
});
|
|
1277
1277
|
}), group: (S) => (a.current.has(S) || a.current.set(S, /* @__PURE__ */ new Set()), () => {
|
|
1278
1278
|
o.current.delete(S), a.current.delete(S);
|
|
1279
|
-
}), filter: () => i.current.shouldFilter, label: u || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: y, inputId:
|
|
1280
|
-
function
|
|
1281
|
-
var
|
|
1282
|
-
let
|
|
1283
|
-
return S ?
|
|
1279
|
+
}), filter: () => i.current.shouldFilter, label: u || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: y, inputId: ee, labelId: R, listInnerRef: H }), []);
|
|
1280
|
+
function W(S, L) {
|
|
1281
|
+
var K, O;
|
|
1282
|
+
let q = (O = (K = i.current) == null ? void 0 : K.filter) != null ? O : gu;
|
|
1283
|
+
return S ? q(S, t.current.search, L) : 0;
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function Y() {
|
|
1286
1286
|
if (!t.current.search || i.current.shouldFilter === !1) return;
|
|
1287
1287
|
let S = t.current.filtered.items, L = [];
|
|
1288
|
-
t.current.filtered.groups.forEach((
|
|
1289
|
-
let
|
|
1290
|
-
|
|
1291
|
-
let
|
|
1292
|
-
E = Math.max(
|
|
1293
|
-
}), L.push([
|
|
1288
|
+
t.current.filtered.groups.forEach((O) => {
|
|
1289
|
+
let q = a.current.get(O), E = 0;
|
|
1290
|
+
q.forEach((U) => {
|
|
1291
|
+
let re = S.get(U);
|
|
1292
|
+
E = Math.max(re, E);
|
|
1293
|
+
}), L.push([O, E]);
|
|
1294
1294
|
});
|
|
1295
|
-
let
|
|
1296
|
-
te().sort((
|
|
1297
|
-
var E,
|
|
1298
|
-
let
|
|
1299
|
-
return ((E = S.get(
|
|
1300
|
-
}).forEach((
|
|
1301
|
-
let
|
|
1302
|
-
|
|
1303
|
-
}), L.sort((
|
|
1304
|
-
var
|
|
1305
|
-
let E = (
|
|
1295
|
+
let K = H.current;
|
|
1296
|
+
te().sort((O, q) => {
|
|
1297
|
+
var E, U;
|
|
1298
|
+
let re = O.getAttribute("id"), B = q.getAttribute("id");
|
|
1299
|
+
return ((E = S.get(B)) != null ? E : 0) - ((U = S.get(re)) != null ? U : 0);
|
|
1300
|
+
}).forEach((O) => {
|
|
1301
|
+
let q = O.closest(br);
|
|
1302
|
+
q ? q.appendChild(O.parentElement === q ? O : O.closest(`${br} > *`)) : K.appendChild(O.parentElement === K ? O : O.closest(`${br} > *`));
|
|
1303
|
+
}), L.sort((O, q) => q[1] - O[1]).forEach((O) => {
|
|
1304
|
+
var q;
|
|
1305
|
+
let E = (q = H.current) == null ? void 0 : q.querySelector(`${mt}[${Je}="${encodeURIComponent(O[0])}"]`);
|
|
1306
1306
|
E == null || E.parentElement.appendChild(E);
|
|
1307
1307
|
});
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
let S = te().find((
|
|
1311
|
-
|
|
1309
|
+
function ce() {
|
|
1310
|
+
let S = te().find((K) => K.getAttribute("aria-disabled") !== "true"), L = S == null ? void 0 : S.getAttribute(Je);
|
|
1311
|
+
T.setState("value", L || void 0);
|
|
1312
1312
|
}
|
|
1313
1313
|
function F() {
|
|
1314
|
-
var S, L,
|
|
1314
|
+
var S, L, K, O;
|
|
1315
1315
|
if (!t.current.search || i.current.shouldFilter === !1) {
|
|
1316
1316
|
t.current.filtered.count = n.current.size;
|
|
1317
1317
|
return;
|
|
1318
1318
|
}
|
|
1319
1319
|
t.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
1320
|
-
let
|
|
1320
|
+
let q = 0;
|
|
1321
1321
|
for (let E of n.current) {
|
|
1322
|
-
let
|
|
1323
|
-
t.current.filtered.items.set(E,
|
|
1322
|
+
let U = (L = (S = o.current.get(E)) == null ? void 0 : S.value) != null ? L : "", re = (O = (K = o.current.get(E)) == null ? void 0 : K.keywords) != null ? O : [], B = W(U, re);
|
|
1323
|
+
t.current.filtered.items.set(E, B), B > 0 && q++;
|
|
1324
1324
|
}
|
|
1325
|
-
for (let [E,
|
|
1325
|
+
for (let [E, U] of a.current) for (let re of U) if (t.current.filtered.items.get(re) > 0) {
|
|
1326
1326
|
t.current.filtered.groups.add(E);
|
|
1327
1327
|
break;
|
|
1328
1328
|
}
|
|
1329
|
-
t.current.filtered.count =
|
|
1329
|
+
t.current.filtered.count = q;
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1332
|
-
var S, L,
|
|
1333
|
-
let
|
|
1334
|
-
|
|
1331
|
+
function G() {
|
|
1332
|
+
var S, L, K;
|
|
1333
|
+
let O = z();
|
|
1334
|
+
O && (((S = O.parentElement) == null ? void 0 : S.firstChild) === O && ((K = (L = O.closest(mt)) == null ? void 0 : L.querySelector(mu)) == null || K.scrollIntoView({ block: "nearest" })), O.scrollIntoView({ block: "nearest" }));
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function z() {
|
|
1337
1337
|
var S;
|
|
1338
|
-
return (S =
|
|
1338
|
+
return (S = H.current) == null ? void 0 : S.querySelector(`${nn}[aria-selected="true"]`);
|
|
1339
1339
|
}
|
|
1340
1340
|
function te() {
|
|
1341
1341
|
var S;
|
|
1342
|
-
return Array.from(((S =
|
|
1342
|
+
return Array.from(((S = H.current) == null ? void 0 : S.querySelectorAll(Fn)) || []);
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function J(S) {
|
|
1345
1345
|
let L = te()[S];
|
|
1346
|
-
L &&
|
|
1346
|
+
L && T.setState("value", L.getAttribute(Je));
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1348
|
+
function ie(S) {
|
|
1349
1349
|
var L;
|
|
1350
|
-
let
|
|
1351
|
-
(L = i.current) != null && L.loop && (E =
|
|
1350
|
+
let K = z(), O = te(), q = O.findIndex((U) => U === K), E = O[q + S];
|
|
1351
|
+
(L = i.current) != null && L.loop && (E = q + S < 0 ? O[O.length - 1] : q + S === O.length ? O[0] : O[q + S]), E && T.setState("value", E.getAttribute(Je));
|
|
1352
1352
|
}
|
|
1353
1353
|
function ue(S) {
|
|
1354
|
-
let L =
|
|
1355
|
-
for (;
|
|
1356
|
-
|
|
1357
|
-
}
|
|
1358
|
-
let
|
|
1359
|
-
S.preventDefault(), S.metaKey ?
|
|
1360
|
-
},
|
|
1361
|
-
S.preventDefault(), S.metaKey ?
|
|
1354
|
+
let L = z(), K = L == null ? void 0 : L.closest(mt), O;
|
|
1355
|
+
for (; K && !O; ) K = S > 0 ? _u(K, mt) : Nu(K, mt), O = K == null ? void 0 : K.querySelector(Fn);
|
|
1356
|
+
O ? T.setState("value", O.getAttribute(Je)) : ie(S);
|
|
1357
|
+
}
|
|
1358
|
+
let V = () => J(te().length - 1), oe = (S) => {
|
|
1359
|
+
S.preventDefault(), S.metaKey ? V() : S.altKey ? ue(1) : ie(1);
|
|
1360
|
+
}, de = (S) => {
|
|
1361
|
+
S.preventDefault(), S.metaKey ? J(0) : S.altKey ? ue(-1) : ie(-1);
|
|
1362
1362
|
};
|
|
1363
|
-
return l.createElement(se.div, { ref: r, tabIndex: -1, ...
|
|
1363
|
+
return l.createElement(se.div, { ref: r, tabIndex: -1, ...A, "cmdk-root": "", onKeyDown: (S) => {
|
|
1364
1364
|
var L;
|
|
1365
|
-
if ((L =
|
|
1365
|
+
if ((L = A.onKeyDown) == null || L.call(A, S), !S.defaultPrevented) switch (S.key) {
|
|
1366
1366
|
case "n":
|
|
1367
1367
|
case "j": {
|
|
1368
|
-
_ && S.ctrlKey &&
|
|
1368
|
+
_ && S.ctrlKey && oe(S);
|
|
1369
1369
|
break;
|
|
1370
1370
|
}
|
|
1371
1371
|
case "ArrowDown": {
|
|
1372
|
-
|
|
1372
|
+
oe(S);
|
|
1373
1373
|
break;
|
|
1374
1374
|
}
|
|
1375
1375
|
case "p":
|
|
1376
1376
|
case "k": {
|
|
1377
|
-
_ && S.ctrlKey &&
|
|
1377
|
+
_ && S.ctrlKey && de(S);
|
|
1378
1378
|
break;
|
|
1379
1379
|
}
|
|
1380
1380
|
case "ArrowUp": {
|
|
1381
|
-
|
|
1381
|
+
de(S);
|
|
1382
1382
|
break;
|
|
1383
1383
|
}
|
|
1384
1384
|
case "Home": {
|
|
1385
|
-
S.preventDefault(),
|
|
1385
|
+
S.preventDefault(), J(0);
|
|
1386
1386
|
break;
|
|
1387
1387
|
}
|
|
1388
1388
|
case "End": {
|
|
1389
|
-
S.preventDefault(),
|
|
1389
|
+
S.preventDefault(), V();
|
|
1390
1390
|
break;
|
|
1391
1391
|
}
|
|
1392
1392
|
case "Enter":
|
|
1393
1393
|
if (!S.nativeEvent.isComposing && S.keyCode !== 229) {
|
|
1394
1394
|
S.preventDefault();
|
|
1395
|
-
let
|
|
1396
|
-
if (
|
|
1397
|
-
let
|
|
1398
|
-
|
|
1395
|
+
let K = z();
|
|
1396
|
+
if (K) {
|
|
1397
|
+
let O = new Event(Rr);
|
|
1398
|
+
K.dispatchEvent(O);
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
-
} }, l.createElement("label", { "cmdk-label": "", htmlFor:
|
|
1402
|
+
} }, l.createElement("label", { "cmdk-label": "", htmlFor: le.inputId, id: le.labelId, style: Au }, u), ar(e, (S) => l.createElement(bo.Provider, { value: T }, l.createElement(yo.Provider, { value: le }, S))));
|
|
1403
1403
|
}), vu = l.forwardRef((e, r) => {
|
|
1404
1404
|
var t, n;
|
|
1405
1405
|
let a = Ce(), o = l.useRef(null), s = l.useContext(wo), i = Tt(), u = Co(e), f = (n = (t = u.current) == null ? void 0 : t.forceMount) != null ? n : s == null ? void 0 : s.forceMount;
|
|
1406
1406
|
et(() => {
|
|
1407
1407
|
if (!f) return i.item(a, s == null ? void 0 : s.id);
|
|
1408
1408
|
}, [f]);
|
|
1409
|
-
let p = _o(a, o, [e.value, e.children, o], e.keywords), m = an(), g = tt((
|
|
1409
|
+
let p = _o(a, o, [e.value, e.children, o], e.keywords), m = an(), g = tt((Z) => Z.value && Z.value === p.current), w = tt((Z) => f || i.filter() === !1 ? !0 : Z.search ? Z.filtered.items.get(a) > 0 : !0);
|
|
1410
1410
|
l.useEffect(() => {
|
|
1411
|
-
let
|
|
1412
|
-
if (!(!
|
|
1411
|
+
let Z = o.current;
|
|
1412
|
+
if (!(!Z || e.disabled)) return Z.addEventListener(Rr, C), () => Z.removeEventListener(Rr, C);
|
|
1413
1413
|
}, [w, e.onSelect, e.disabled]);
|
|
1414
1414
|
function C() {
|
|
1415
|
-
var
|
|
1416
|
-
h(), (
|
|
1415
|
+
var Z, T;
|
|
1416
|
+
h(), (T = (Z = u.current).onSelect) == null || T.call(Z, p.current);
|
|
1417
1417
|
}
|
|
1418
1418
|
function h() {
|
|
1419
1419
|
m.setState("value", p.current, !0);
|
|
1420
1420
|
}
|
|
1421
1421
|
if (!w) return null;
|
|
1422
|
-
let { disabled: _, value:
|
|
1423
|
-
return l.createElement(se.div, { ref: _t([o, r]), ...
|
|
1422
|
+
let { disabled: _, value: A, onSelect: y, forceMount: R, keywords: ee, ...H } = e;
|
|
1423
|
+
return l.createElement(se.div, { ref: _t([o, r]), ...H, id: a, "cmdk-item": "", role: "option", "aria-disabled": !!_, "aria-selected": !!g, "data-disabled": !!_, "data-selected": !!g, onPointerMove: _ || i.getDisablePointerSelection() ? void 0 : h, onClick: _ ? void 0 : C }, e.children);
|
|
1424
1424
|
}), hu = l.forwardRef((e, r) => {
|
|
1425
1425
|
let { heading: t, children: n, forceMount: a, ...o } = e, s = Ce(), i = l.useRef(null), u = l.useRef(null), f = Ce(), p = Tt(), m = tt((w) => a || p.filter() === !1 ? !0 : w.search ? w.filtered.groups.has(s) : !0);
|
|
1426
1426
|
et(() => p.group(s), []), _o(s, i, [e.value, e.heading, u]);
|
|
@@ -1461,7 +1461,7 @@ var pu = Ar.exports, mt = '[cmdk-group=""]', br = '[cmdk-group-items=""]', mu =
|
|
|
1461
1461
|
}), Su = l.forwardRef((e, r) => tt((t) => t.filtered.count === 0) ? l.createElement(se.div, { ref: r, ...e, "cmdk-empty": "", role: "presentation" }) : null), Cu = l.forwardRef((e, r) => {
|
|
1462
1462
|
let { progress: t, children: n, label: a = "Loading...", ...o } = e;
|
|
1463
1463
|
return l.createElement(se.div, { ref: r, ...o, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": a }, ar(e, (s) => l.createElement("div", { "aria-hidden": !0 }, s)));
|
|
1464
|
-
}),
|
|
1464
|
+
}), Te = Object.assign(So, { List: bu, Item: vu, Input: yu, Group: hu, Separator: xu, Dialog: wu, Empty: Su, Loading: Cu });
|
|
1465
1465
|
function _u(e, r) {
|
|
1466
1466
|
let t = e.nextElementSibling;
|
|
1467
1467
|
for (; t; ) {
|
|
@@ -1529,26 +1529,26 @@ function ar({ asChild: e, children: r }, t) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
var Au = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
1531
1531
|
const on = _e(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
1532
|
-
|
|
1532
|
+
Te,
|
|
1533
1533
|
{
|
|
1534
1534
|
ref: t,
|
|
1535
|
-
className:
|
|
1535
|
+
className: k(
|
|
1536
1536
|
"al-flex al-h-full al-w-full al-flex-col al-overflow-hidden al-rounded-md al-bg-popover al-text-popover-foreground",
|
|
1537
1537
|
e
|
|
1538
1538
|
),
|
|
1539
1539
|
...r
|
|
1540
1540
|
}
|
|
1541
1541
|
));
|
|
1542
|
-
on.displayName =
|
|
1542
|
+
on.displayName = Te.displayName;
|
|
1543
1543
|
const om = ({ children: e, ...r }) => /* @__PURE__ */ c.jsx(ui, { ...r, children: /* @__PURE__ */ c.jsx(di, { className: "al-overflow-hidden al-p-0 al-shadow-lg", children: /* @__PURE__ */ c.jsx(on, { className: "[&_[cmdk-group-heading]]:al-px-2 [&_[cmdk-group-heading]]:al-font-medium [&_[cmdk-group-heading]]:al-text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:al-pt-0 [&_[cmdk-group]]:al-px-2 [&_[cmdk-input-wrapper]_svg]:al-h-5 [&_[cmdk-input-wrapper]_svg]:al-w-5 [&_[cmdk-input]]:al-h-12 [&_[cmdk-item]]:al-px-2 [&_[cmdk-item]]:al-py-3 [&_[cmdk-item]_svg]:al-h-5 [&_[cmdk-item]_svg]:al-w-5", children: e }) }) }), No = _e(({ className: e, ...r }, t) => (
|
|
1544
1544
|
// eslint-disable-next-line react/no-unknown-property
|
|
1545
1545
|
/* @__PURE__ */ c.jsxs("div", { className: "al-flex al-items-center al-border-b al-px-3", "cmdk-input-wrapper": "", children: [
|
|
1546
1546
|
/* @__PURE__ */ c.jsx(si, { className: "al-mr-2 al-h-4 al-w-4 al-shrink-0 al-opacity-50" }),
|
|
1547
1547
|
/* @__PURE__ */ c.jsx(
|
|
1548
|
-
|
|
1548
|
+
Te.Input,
|
|
1549
1549
|
{
|
|
1550
1550
|
ref: t,
|
|
1551
|
-
className:
|
|
1551
|
+
className: k(
|
|
1552
1552
|
"al-flex al-h-11 al-w-full al-rounded-md al-bg-transparent al-py-3 al-text-sm al-outline-none placeholder:al-text-muted-foreground disabled:al-cursor-not-allowed disabled:al-opacity-50",
|
|
1553
1553
|
e
|
|
1554
1554
|
),
|
|
@@ -1557,56 +1557,56 @@ const om = ({ children: e, ...r }) => /* @__PURE__ */ c.jsx(ui, { ...r, children
|
|
|
1557
1557
|
)
|
|
1558
1558
|
] })
|
|
1559
1559
|
));
|
|
1560
|
-
No.displayName =
|
|
1560
|
+
No.displayName = Te.Input.displayName;
|
|
1561
1561
|
const Eo = _e(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
1562
|
-
|
|
1562
|
+
Te.List,
|
|
1563
1563
|
{
|
|
1564
1564
|
ref: t,
|
|
1565
|
-
className:
|
|
1565
|
+
className: k("al-max-h-[300px] al-overflow-y-auto al-overflow-x-hidden", e),
|
|
1566
1566
|
...r
|
|
1567
1567
|
}
|
|
1568
1568
|
));
|
|
1569
|
-
Eo.displayName =
|
|
1570
|
-
const Io = _e((e, r) => /* @__PURE__ */ c.jsx(
|
|
1571
|
-
Io.displayName =
|
|
1569
|
+
Eo.displayName = Te.List.displayName;
|
|
1570
|
+
const Io = _e((e, r) => /* @__PURE__ */ c.jsx(Te.Empty, { ref: r, className: "al-py-6 al-text-center al-text-sm", ...e }));
|
|
1571
|
+
Io.displayName = Te.Empty.displayName;
|
|
1572
1572
|
const Ao = _e(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
1573
|
-
|
|
1573
|
+
Te.Group,
|
|
1574
1574
|
{
|
|
1575
1575
|
ref: t,
|
|
1576
|
-
className:
|
|
1576
|
+
className: k(
|
|
1577
1577
|
"al-overflow-hidden al-p-1 al-text-foreground [&_[cmdk-group-heading]]:al-px-2 [&_[cmdk-group-heading]]:al-py-1.5 [&_[cmdk-group-heading]]:al-text-xs [&_[cmdk-group-heading]]:al-font-medium [&_[cmdk-group-heading]]:al-text-muted-foreground",
|
|
1578
1578
|
e
|
|
1579
1579
|
),
|
|
1580
1580
|
...r
|
|
1581
1581
|
}
|
|
1582
1582
|
));
|
|
1583
|
-
Ao.displayName =
|
|
1583
|
+
Ao.displayName = Te.Group.displayName;
|
|
1584
1584
|
const Ru = _e(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
1585
|
-
|
|
1585
|
+
Te.Separator,
|
|
1586
1586
|
{
|
|
1587
1587
|
ref: t,
|
|
1588
|
-
className:
|
|
1588
|
+
className: k("al--mx-1 al-h-px al-bg-border", e),
|
|
1589
1589
|
...r
|
|
1590
1590
|
}
|
|
1591
1591
|
));
|
|
1592
|
-
Ru.displayName =
|
|
1592
|
+
Ru.displayName = Te.Separator.displayName;
|
|
1593
1593
|
const Ro = _e(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
1594
|
-
|
|
1594
|
+
Te.Item,
|
|
1595
1595
|
{
|
|
1596
1596
|
ref: t,
|
|
1597
1597
|
role: "option",
|
|
1598
|
-
className:
|
|
1598
|
+
className: k(
|
|
1599
1599
|
"al-relative al-flex al-cursor-default al-gap-2 al-select-none al-items-center al-rounded-sm al-px-2 al-py-1.5 al-text-sm al-outline-none data-[disabled=true]:al-pointer-events-none data-[selected=true]:al-bg-accent data-[selected=true]:al-text-accent-foreground data-[disabled=true]:al-opacity-50 [&_svg]:al-pointer-events-none [&_svg]:al-size-4 [&_svg]:al-shrink-0",
|
|
1600
1600
|
e
|
|
1601
1601
|
),
|
|
1602
1602
|
...r
|
|
1603
1603
|
}
|
|
1604
1604
|
));
|
|
1605
|
-
Ro.displayName =
|
|
1605
|
+
Ro.displayName = Te.Item.displayName;
|
|
1606
1606
|
const Tu = ({ className: e, ...r }) => /* @__PURE__ */ c.jsx(
|
|
1607
1607
|
"span",
|
|
1608
1608
|
{
|
|
1609
|
-
className:
|
|
1609
|
+
className: k("al-ml-auto al-text-xs al-tracking-widest al-text-muted-foreground", e),
|
|
1610
1610
|
...r
|
|
1611
1611
|
}
|
|
1612
1612
|
);
|
|
@@ -1651,7 +1651,7 @@ function sm({
|
|
|
1651
1651
|
return /* @__PURE__ */ c.jsx(
|
|
1652
1652
|
"div",
|
|
1653
1653
|
{
|
|
1654
|
-
className:
|
|
1654
|
+
className: k(Mu({ variant: r, interactive: t }), e),
|
|
1655
1655
|
role: t ? "button" : o,
|
|
1656
1656
|
tabIndex: t ? 0 : s,
|
|
1657
1657
|
onKeyDown: f,
|
|
@@ -1712,7 +1712,7 @@ var Do = "CollapsibleTrigger", Po = l.forwardRef(
|
|
|
1712
1712
|
disabled: a.disabled,
|
|
1713
1713
|
...n,
|
|
1714
1714
|
ref: r,
|
|
1715
|
-
onClick:
|
|
1715
|
+
onClick: X(e.onClick, a.onOpenToggle)
|
|
1716
1716
|
}
|
|
1717
1717
|
);
|
|
1718
1718
|
}
|
|
@@ -1726,19 +1726,19 @@ var cn = "CollapsibleContent", jo = l.forwardRef(
|
|
|
1726
1726
|
);
|
|
1727
1727
|
jo.displayName = cn;
|
|
1728
1728
|
var ju = l.forwardRef((e, r) => {
|
|
1729
|
-
const { __scopeCollapsible: t, present: n, children: a, ...o } = e, s = ln(cn, t), [i, u] = l.useState(n), f = l.useRef(null), p = be(r, f), m = l.useRef(0), g = m.current, w = l.useRef(0), C = w.current, h = s.open || i, _ = l.useRef(h),
|
|
1729
|
+
const { __scopeCollapsible: t, present: n, children: a, ...o } = e, s = ln(cn, t), [i, u] = l.useState(n), f = l.useRef(null), p = be(r, f), m = l.useRef(0), g = m.current, w = l.useRef(0), C = w.current, h = s.open || i, _ = l.useRef(h), A = l.useRef(void 0);
|
|
1730
1730
|
return l.useEffect(() => {
|
|
1731
1731
|
const y = requestAnimationFrame(() => _.current = !1);
|
|
1732
1732
|
return () => cancelAnimationFrame(y);
|
|
1733
1733
|
}, []), Ue(() => {
|
|
1734
1734
|
const y = f.current;
|
|
1735
1735
|
if (y) {
|
|
1736
|
-
|
|
1736
|
+
A.current = A.current || {
|
|
1737
1737
|
transitionDuration: y.style.transitionDuration,
|
|
1738
1738
|
animationName: y.style.animationName
|
|
1739
1739
|
}, y.style.transitionDuration = "0s", y.style.animationName = "none";
|
|
1740
|
-
const
|
|
1741
|
-
m.current =
|
|
1740
|
+
const R = y.getBoundingClientRect();
|
|
1741
|
+
m.current = R.height, w.current = R.width, _.current || (y.style.transitionDuration = A.current.transitionDuration, y.style.animationName = A.current.animationName), u(n);
|
|
1742
1742
|
}
|
|
1743
1743
|
}, [s.open, n]), /* @__PURE__ */ c.jsx(
|
|
1744
1744
|
se.div,
|
|
@@ -1764,7 +1764,7 @@ function un(e) {
|
|
|
1764
1764
|
var Ou = Mo, ku = Po, Vu = jo, Be = "Accordion", Fu = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [dn, $u, Lu] = Wr(Be), [or, lm] = at(Be, [
|
|
1765
1765
|
Lu,
|
|
1766
1766
|
To
|
|
1767
|
-
]), fn = To(), Oo =
|
|
1767
|
+
]), fn = To(), Oo = Q.forwardRef(
|
|
1768
1768
|
(e, r) => {
|
|
1769
1769
|
const { type: t, ...n } = e, a = n, o = n;
|
|
1770
1770
|
return /* @__PURE__ */ c.jsx(dn.Provider, { scope: e.__scopeAccordion, children: t === "multiple" ? /* @__PURE__ */ c.jsx(Gu, { ...o, ref: r }) : /* @__PURE__ */ c.jsx(Hu, { ...a, ref: r }) });
|
|
@@ -1774,7 +1774,7 @@ Oo.displayName = Be;
|
|
|
1774
1774
|
var [ko, Uu] = or(Be), [Vo, Bu] = or(
|
|
1775
1775
|
Be,
|
|
1776
1776
|
{ collapsible: !1 }
|
|
1777
|
-
), Hu =
|
|
1777
|
+
), Hu = Q.forwardRef(
|
|
1778
1778
|
(e, r) => {
|
|
1779
1779
|
const {
|
|
1780
1780
|
value: t,
|
|
@@ -1794,12 +1794,12 @@ var [ko, Uu] = or(Be), [Vo, Bu] = or(
|
|
|
1794
1794
|
scope: e.__scopeAccordion,
|
|
1795
1795
|
value: i ? [i] : [],
|
|
1796
1796
|
onItemOpen: u,
|
|
1797
|
-
onItemClose:
|
|
1797
|
+
onItemClose: Q.useCallback(() => o && u(""), [o, u]),
|
|
1798
1798
|
children: /* @__PURE__ */ c.jsx(Vo, { scope: e.__scopeAccordion, collapsible: o, children: /* @__PURE__ */ c.jsx(Fo, { ...s, ref: r }) })
|
|
1799
1799
|
}
|
|
1800
1800
|
);
|
|
1801
1801
|
}
|
|
1802
|
-
), Gu =
|
|
1802
|
+
), Gu = Q.forwardRef((e, r) => {
|
|
1803
1803
|
const {
|
|
1804
1804
|
value: t,
|
|
1805
1805
|
defaultValue: n,
|
|
@@ -1810,10 +1810,10 @@ var [ko, Uu] = or(Be), [Vo, Bu] = or(
|
|
|
1810
1810
|
prop: t,
|
|
1811
1811
|
defaultProp: n,
|
|
1812
1812
|
onChange: a
|
|
1813
|
-
}), u =
|
|
1813
|
+
}), u = Q.useCallback(
|
|
1814
1814
|
(p) => i((m = []) => [...m, p]),
|
|
1815
1815
|
[i]
|
|
1816
|
-
), f =
|
|
1816
|
+
), f = Q.useCallback(
|
|
1817
1817
|
(p) => i((m = []) => m.filter((g) => g !== p)),
|
|
1818
1818
|
[i]
|
|
1819
1819
|
);
|
|
@@ -1827,45 +1827,45 @@ var [ko, Uu] = or(Be), [Vo, Bu] = or(
|
|
|
1827
1827
|
children: /* @__PURE__ */ c.jsx(Vo, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ c.jsx(Fo, { ...o, ref: r }) })
|
|
1828
1828
|
}
|
|
1829
1829
|
);
|
|
1830
|
-
}), [Ku, sr] = or(Be), Fo =
|
|
1830
|
+
}), [Ku, sr] = or(Be), Fo = Q.forwardRef(
|
|
1831
1831
|
(e, r) => {
|
|
1832
|
-
const { __scopeAccordion: t, disabled: n, dir: a, orientation: o = "vertical", ...s } = e, i =
|
|
1833
|
-
var
|
|
1832
|
+
const { __scopeAccordion: t, disabled: n, dir: a, orientation: o = "vertical", ...s } = e, i = Q.useRef(null), u = be(i, r), f = $u(t), m = rr(a) === "ltr", g = X(e.onKeyDown, (w) => {
|
|
1833
|
+
var le;
|
|
1834
1834
|
if (!Fu.includes(w.key)) return;
|
|
1835
|
-
const C = w.target, h = f().filter((
|
|
1836
|
-
var
|
|
1837
|
-
return !((
|
|
1838
|
-
}), _ = h.findIndex((
|
|
1835
|
+
const C = w.target, h = f().filter((W) => {
|
|
1836
|
+
var Y;
|
|
1837
|
+
return !((Y = W.ref.current) != null && Y.disabled);
|
|
1838
|
+
}), _ = h.findIndex((W) => W.ref.current === C), A = h.length;
|
|
1839
1839
|
if (_ === -1) return;
|
|
1840
1840
|
w.preventDefault();
|
|
1841
1841
|
let y = _;
|
|
1842
|
-
const
|
|
1843
|
-
y = _ + 1, y >
|
|
1844
|
-
},
|
|
1845
|
-
y = _ - 1, y <
|
|
1842
|
+
const R = 0, ee = A - 1, H = () => {
|
|
1843
|
+
y = _ + 1, y > ee && (y = R);
|
|
1844
|
+
}, Z = () => {
|
|
1845
|
+
y = _ - 1, y < R && (y = ee);
|
|
1846
1846
|
};
|
|
1847
1847
|
switch (w.key) {
|
|
1848
1848
|
case "Home":
|
|
1849
|
-
y =
|
|
1849
|
+
y = R;
|
|
1850
1850
|
break;
|
|
1851
1851
|
case "End":
|
|
1852
|
-
y =
|
|
1852
|
+
y = ee;
|
|
1853
1853
|
break;
|
|
1854
1854
|
case "ArrowRight":
|
|
1855
|
-
o === "horizontal" && (m ?
|
|
1855
|
+
o === "horizontal" && (m ? H() : Z());
|
|
1856
1856
|
break;
|
|
1857
1857
|
case "ArrowDown":
|
|
1858
|
-
o === "vertical" &&
|
|
1858
|
+
o === "vertical" && H();
|
|
1859
1859
|
break;
|
|
1860
1860
|
case "ArrowLeft":
|
|
1861
|
-
o === "horizontal" && (m ?
|
|
1861
|
+
o === "horizontal" && (m ? Z() : H());
|
|
1862
1862
|
break;
|
|
1863
1863
|
case "ArrowUp":
|
|
1864
|
-
o === "vertical" &&
|
|
1864
|
+
o === "vertical" && Z();
|
|
1865
1865
|
break;
|
|
1866
1866
|
}
|
|
1867
|
-
const
|
|
1868
|
-
(
|
|
1867
|
+
const T = y % A;
|
|
1868
|
+
(le = h[T].ref.current) == null || le.focus();
|
|
1869
1869
|
});
|
|
1870
1870
|
return /* @__PURE__ */ c.jsx(
|
|
1871
1871
|
Ku,
|
|
@@ -1886,7 +1886,7 @@ var [ko, Uu] = or(Be), [Vo, Bu] = or(
|
|
|
1886
1886
|
}
|
|
1887
1887
|
);
|
|
1888
1888
|
}
|
|
1889
|
-
), Ut = "AccordionItem", [Wu, pn] = or(Ut), $o =
|
|
1889
|
+
), Ut = "AccordionItem", [Wu, pn] = or(Ut), $o = Q.forwardRef(
|
|
1890
1890
|
(e, r) => {
|
|
1891
1891
|
const { __scopeAccordion: t, value: n, ...a } = e, o = sr(Ut, t), s = Uu(Ut, t), i = fn(t), u = Ce(), f = n && s.value.includes(n) || !1, p = o.disabled || e.disabled;
|
|
1892
1892
|
return /* @__PURE__ */ c.jsx(
|
|
@@ -1916,7 +1916,7 @@ var [ko, Uu] = or(Be), [Vo, Bu] = or(
|
|
|
1916
1916
|
}
|
|
1917
1917
|
);
|
|
1918
1918
|
$o.displayName = Ut;
|
|
1919
|
-
var Lo = "AccordionHeader", Uo =
|
|
1919
|
+
var Lo = "AccordionHeader", Uo = Q.forwardRef(
|
|
1920
1920
|
(e, r) => {
|
|
1921
1921
|
const { __scopeAccordion: t, ...n } = e, a = sr(Be, t), o = pn(Lo, t);
|
|
1922
1922
|
return /* @__PURE__ */ c.jsx(
|
|
@@ -1932,7 +1932,7 @@ var Lo = "AccordionHeader", Uo = re.forwardRef(
|
|
|
1932
1932
|
}
|
|
1933
1933
|
);
|
|
1934
1934
|
Uo.displayName = Lo;
|
|
1935
|
-
var Tr = "AccordionTrigger", Bo =
|
|
1935
|
+
var Tr = "AccordionTrigger", Bo = Q.forwardRef(
|
|
1936
1936
|
(e, r) => {
|
|
1937
1937
|
const { __scopeAccordion: t, ...n } = e, a = sr(Be, t), o = pn(Tr, t), s = Bu(Tr, t), i = fn(t);
|
|
1938
1938
|
return /* @__PURE__ */ c.jsx(dn.ItemSlot, { scope: t, children: /* @__PURE__ */ c.jsx(
|
|
@@ -1949,7 +1949,7 @@ var Tr = "AccordionTrigger", Bo = re.forwardRef(
|
|
|
1949
1949
|
}
|
|
1950
1950
|
);
|
|
1951
1951
|
Bo.displayName = Tr;
|
|
1952
|
-
var Ho = "AccordionContent", Go =
|
|
1952
|
+
var Ho = "AccordionContent", Go = Q.forwardRef(
|
|
1953
1953
|
(e, r) => {
|
|
1954
1954
|
const { __scopeAccordion: t, ...n } = e, a = sr(Be, t), o = pn(Ho, t), s = fn(t);
|
|
1955
1955
|
return /* @__PURE__ */ c.jsx(
|
|
@@ -1975,13 +1975,13 @@ function Ko(e) {
|
|
|
1975
1975
|
return e ? "open" : "closed";
|
|
1976
1976
|
}
|
|
1977
1977
|
var zu = Oo, qu = $o, Yu = Uo, Xu = Bo, Zu = Go;
|
|
1978
|
-
const im = zu, Ju = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(qu, { ref: t, className:
|
|
1978
|
+
const im = zu, Ju = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(qu, { ref: t, className: k("al-border-b", e), ...r }));
|
|
1979
1979
|
Ju.displayName = "AccordionItem";
|
|
1980
1980
|
const Qu = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__ */ c.jsx(Yu, { className: "al-flex", children: /* @__PURE__ */ c.jsxs(
|
|
1981
1981
|
Xu,
|
|
1982
1982
|
{
|
|
1983
1983
|
ref: n,
|
|
1984
|
-
className:
|
|
1984
|
+
className: k(
|
|
1985
1985
|
"al-flex al-flex-1 al-items-center al-justify-between al-py-4 al-font-medium al-transition-all hover:al-underline [&[data-state=open]>svg]:al-rotate-180",
|
|
1986
1986
|
e
|
|
1987
1987
|
),
|
|
@@ -1997,7 +1997,7 @@ const ed = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__
|
|
|
1997
1997
|
Zu,
|
|
1998
1998
|
{
|
|
1999
1999
|
ref: n,
|
|
2000
|
-
className:
|
|
2000
|
+
className: k(
|
|
2001
2001
|
"al-overflow-hidden al-text-sm al-transition-all data-[state=closed]:al-animate-accordion-up data-[state=open]:al-animate-accordion-down",
|
|
2002
2002
|
e
|
|
2003
2003
|
),
|
|
@@ -2096,7 +2096,7 @@ function cm() {
|
|
|
2096
2096
|
};
|
|
2097
2097
|
}
|
|
2098
2098
|
const sd = nt(
|
|
2099
|
-
|
|
2099
|
+
k(
|
|
2100
2100
|
"al-relative al-w-full al-rounded-lg al-border al-p-4",
|
|
2101
2101
|
"[&>svg~*]:al-pl-7 [&>svg+div]:al-translate-y-[-3px] [&>svg]:al-absolute [&>svg]:al-left-4 [&>svg]:al-top-4 [&>svg]:al-text-foreground",
|
|
2102
2102
|
"[&>i~*]:al-pl-7 [&>i+div]:al-translate-y-[-3px] [&>i]:al-absolute [&>i]:al-left-4 [&>i]:al-top-4 [&>i]:al-text-foreground"
|
|
@@ -2134,7 +2134,7 @@ const sd = nt(
|
|
|
2134
2134
|
ref: n,
|
|
2135
2135
|
role: "alert",
|
|
2136
2136
|
"aria-label": ld(r),
|
|
2137
|
-
className:
|
|
2137
|
+
className: k(sd({ variant: r }), e),
|
|
2138
2138
|
...t
|
|
2139
2139
|
}
|
|
2140
2140
|
));
|
|
@@ -2144,7 +2144,7 @@ const cd = l.forwardRef(
|
|
|
2144
2144
|
"h5",
|
|
2145
2145
|
{
|
|
2146
2146
|
ref: n,
|
|
2147
|
-
className:
|
|
2147
|
+
className: k("al-mb-1 al-font-medium al-leading-none al-tracking-tight", e),
|
|
2148
2148
|
...t,
|
|
2149
2149
|
children: r
|
|
2150
2150
|
}
|
|
@@ -2155,7 +2155,7 @@ const ud = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
2155
2155
|
"div",
|
|
2156
2156
|
{
|
|
2157
2157
|
ref: t,
|
|
2158
|
-
className:
|
|
2158
|
+
className: k("al-text-sm [&_p]:al-leading-relaxed", e),
|
|
2159
2159
|
role: "alert",
|
|
2160
2160
|
"aria-label": "alert-description",
|
|
2161
2161
|
...r
|
|
@@ -2245,7 +2245,7 @@ var ut = "AlertDialogContent", [yd, bd] = gd(ut), Jo = l.forwardRef(
|
|
|
2245
2245
|
...o,
|
|
2246
2246
|
...a,
|
|
2247
2247
|
ref: i,
|
|
2248
|
-
onOpenAutoFocus:
|
|
2248
|
+
onOpenAutoFocus: X(a.onOpenAutoFocus, (f) => {
|
|
2249
2249
|
var p;
|
|
2250
2250
|
f.preventDefault(), (p = u.current) == null || p.focus({ preventScroll: !0 });
|
|
2251
2251
|
}),
|
|
@@ -2306,7 +2306,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
2306
2306
|
const dm = Cd, fm = _d, Ed = Nd, fs = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
2307
2307
|
ss,
|
|
2308
2308
|
{
|
|
2309
|
-
className:
|
|
2309
|
+
className: k(
|
|
2310
2310
|
"al-fixed al-inset-0 al-z-50 al-bg-black/80 al- data-[state=open]:al-animate-in data-[state=closed]:al-animate-out data-[state=closed]:al-fade-out-0 data-[state=open]:al-fade-in-0",
|
|
2311
2311
|
e
|
|
2312
2312
|
),
|
|
@@ -2321,7 +2321,7 @@ const Id = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsxs(Ed
|
|
|
2321
2321
|
ls,
|
|
2322
2322
|
{
|
|
2323
2323
|
ref: t,
|
|
2324
|
-
className:
|
|
2324
|
+
className: k(
|
|
2325
2325
|
"al-fixed al-left-[50%] al-top-[50%] al-z-50 al-grid al-w-full al-max-w-lg al-translate-x-[-50%] al-translate-y-[-50%] al-gap-4 al-border al-bg-background al-p-6 al-shadow-lg al-duration-200 data-[state=open]:al-animate-in data-[state=closed]:al-animate-out data-[state=closed]:al-fade-out-0 data-[state=open]:al-fade-in-0 data-[state=closed]:al-zoom-out-95 data-[state=open]:al-zoom-in-95 data-[state=closed]:al-slide-out-to-left-1/2 data-[state=closed]:al-slide-out-to-top-[48%] data-[state=open]:al-slide-in-from-left-1/2 data-[state=open]:al-slide-in-from-top-[48%] sm:al-rounded-lg",
|
|
2326
2326
|
e
|
|
2327
2327
|
),
|
|
@@ -2333,7 +2333,7 @@ Id.displayName = ls.displayName;
|
|
|
2333
2333
|
const Ad = ({ className: e, ...r }) => /* @__PURE__ */ c.jsx(
|
|
2334
2334
|
"div",
|
|
2335
2335
|
{
|
|
2336
|
-
className:
|
|
2336
|
+
className: k("al-flex al-flex-col al-space-y-2 al-text-center sm:al-text-left", e),
|
|
2337
2337
|
...r
|
|
2338
2338
|
}
|
|
2339
2339
|
);
|
|
@@ -2341,7 +2341,7 @@ Ad.displayName = "AlertDialogHeader";
|
|
|
2341
2341
|
const Rd = ({ className: e, ...r }) => /* @__PURE__ */ c.jsx(
|
|
2342
2342
|
"div",
|
|
2343
2343
|
{
|
|
2344
|
-
className:
|
|
2344
|
+
className: k(
|
|
2345
2345
|
"al-flex al-flex-col-reverse sm:al-flex-row sm:al-justify-end sm:al-space-x-2",
|
|
2346
2346
|
e
|
|
2347
2347
|
),
|
|
@@ -2353,7 +2353,7 @@ const Td = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
2353
2353
|
us,
|
|
2354
2354
|
{
|
|
2355
2355
|
ref: t,
|
|
2356
|
-
className:
|
|
2356
|
+
className: k("al-text-lg al-font-semibold", e),
|
|
2357
2357
|
...r
|
|
2358
2358
|
}
|
|
2359
2359
|
));
|
|
@@ -2362,18 +2362,18 @@ const Md = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
2362
2362
|
ds,
|
|
2363
2363
|
{
|
|
2364
2364
|
ref: t,
|
|
2365
|
-
className:
|
|
2365
|
+
className: k("al-text-sm al-text-muted-foreground", e),
|
|
2366
2366
|
...r
|
|
2367
2367
|
}
|
|
2368
2368
|
));
|
|
2369
2369
|
Md.displayName = ds.displayName;
|
|
2370
|
-
const Dd = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(is, { ref: t, className:
|
|
2370
|
+
const Dd = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(is, { ref: t, className: k(ma(), e), ...r }));
|
|
2371
2371
|
Dd.displayName = is.displayName;
|
|
2372
2372
|
const Pd = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
2373
2373
|
cs,
|
|
2374
2374
|
{
|
|
2375
2375
|
ref: t,
|
|
2376
|
-
className:
|
|
2376
|
+
className: k(ma({ variant: "outline" }), "al-mt-2 sm:al-mt-0", e),
|
|
2377
2377
|
...r
|
|
2378
2378
|
}
|
|
2379
2379
|
));
|
|
@@ -2441,46 +2441,46 @@ var Fd = [" ", "Enter", "ArrowUp", "ArrowDown"], $d = [" ", "Enter"], Mt = "Sele
|
|
|
2441
2441
|
disabled: g,
|
|
2442
2442
|
required: w,
|
|
2443
2443
|
form: C
|
|
2444
|
-
} = e, h = cr(r), [_,
|
|
2444
|
+
} = e, h = cr(r), [_, A] = l.useState(null), [y, R] = l.useState(null), [ee, H] = l.useState(!1), Z = rr(f), [T = !1, le] = ze({
|
|
2445
2445
|
prop: n,
|
|
2446
2446
|
defaultProp: a,
|
|
2447
2447
|
onChange: o
|
|
2448
|
-
}), [
|
|
2448
|
+
}), [W, Y] = ze({
|
|
2449
2449
|
prop: s,
|
|
2450
2450
|
defaultProp: i,
|
|
2451
2451
|
onChange: u
|
|
2452
|
-
}),
|
|
2452
|
+
}), ce = l.useRef(null), F = _ ? C || !!_.closest("form") : !0, [G, z] = l.useState(/* @__PURE__ */ new Set()), te = Array.from(G).map((J) => J.props.value).join(";");
|
|
2453
2453
|
return /* @__PURE__ */ c.jsx(zr, { ...h, children: /* @__PURE__ */ c.jsxs(
|
|
2454
2454
|
Ud,
|
|
2455
2455
|
{
|
|
2456
2456
|
required: w,
|
|
2457
2457
|
scope: r,
|
|
2458
2458
|
trigger: _,
|
|
2459
|
-
onTriggerChange:
|
|
2459
|
+
onTriggerChange: A,
|
|
2460
2460
|
valueNode: y,
|
|
2461
|
-
onValueNodeChange:
|
|
2462
|
-
valueNodeHasChildren:
|
|
2463
|
-
onValueNodeHasChildrenChange:
|
|
2461
|
+
onValueNodeChange: R,
|
|
2462
|
+
valueNodeHasChildren: ee,
|
|
2463
|
+
onValueNodeHasChildrenChange: H,
|
|
2464
2464
|
contentId: Ce(),
|
|
2465
|
-
value:
|
|
2466
|
-
onValueChange:
|
|
2467
|
-
open:
|
|
2468
|
-
onOpenChange:
|
|
2469
|
-
dir:
|
|
2470
|
-
triggerPointerDownPosRef:
|
|
2465
|
+
value: W,
|
|
2466
|
+
onValueChange: Y,
|
|
2467
|
+
open: T,
|
|
2468
|
+
onOpenChange: le,
|
|
2469
|
+
dir: Z,
|
|
2470
|
+
triggerPointerDownPosRef: ce,
|
|
2471
2471
|
disabled: g,
|
|
2472
2472
|
children: [
|
|
2473
2473
|
/* @__PURE__ */ c.jsx(lr.Provider, { scope: r, children: /* @__PURE__ */ c.jsx(
|
|
2474
2474
|
Bd,
|
|
2475
2475
|
{
|
|
2476
2476
|
scope: e.__scopeSelect,
|
|
2477
|
-
onNativeOptionAdd: l.useCallback((
|
|
2478
|
-
|
|
2477
|
+
onNativeOptionAdd: l.useCallback((J) => {
|
|
2478
|
+
z((ie) => new Set(ie).add(J));
|
|
2479
2479
|
}, []),
|
|
2480
|
-
onNativeOptionRemove: l.useCallback((
|
|
2481
|
-
|
|
2482
|
-
const ue = new Set(
|
|
2483
|
-
return ue.delete(
|
|
2480
|
+
onNativeOptionRemove: l.useCallback((J) => {
|
|
2481
|
+
z((ie) => {
|
|
2482
|
+
const ue = new Set(ie);
|
|
2483
|
+
return ue.delete(J), ue;
|
|
2484
2484
|
});
|
|
2485
2485
|
}, []),
|
|
2486
2486
|
children: t
|
|
@@ -2494,13 +2494,13 @@ var Fd = [" ", "Enter", "ArrowUp", "ArrowDown"], $d = [" ", "Enter"], Mt = "Sele
|
|
|
2494
2494
|
tabIndex: -1,
|
|
2495
2495
|
name: p,
|
|
2496
2496
|
autoComplete: m,
|
|
2497
|
-
value:
|
|
2498
|
-
onChange: (
|
|
2497
|
+
value: W,
|
|
2498
|
+
onChange: (J) => Y(J.target.value),
|
|
2499
2499
|
disabled: g,
|
|
2500
2500
|
form: C,
|
|
2501
2501
|
children: [
|
|
2502
|
-
|
|
2503
|
-
Array.from(
|
|
2502
|
+
W === void 0 ? /* @__PURE__ */ c.jsx("option", { value: "" }) : null,
|
|
2503
|
+
Array.from(G)
|
|
2504
2504
|
]
|
|
2505
2505
|
},
|
|
2506
2506
|
te
|
|
@@ -2513,7 +2513,7 @@ ms.displayName = Mt;
|
|
|
2513
2513
|
var gs = "SelectTrigger", vs = l.forwardRef(
|
|
2514
2514
|
(e, r) => {
|
|
2515
2515
|
const { __scopeSelect: t, disabled: n = !1, ...a } = e, o = cr(t), s = Ye(gs, t), i = s.disabled || n, u = be(r, s.onTriggerChange), f = ir(t), p = l.useRef("touch"), [m, g, w] = Us((h) => {
|
|
2516
|
-
const _ = f().filter((
|
|
2516
|
+
const _ = f().filter((R) => !R.disabled), A = _.find((R) => R.value === s.value), y = Bs(_, h, A);
|
|
2517
2517
|
y !== void 0 && s.onValueChange(y.value);
|
|
2518
2518
|
}), C = (h) => {
|
|
2519
2519
|
i || (s.onOpenChange(!0), w()), h && (s.triggerPointerDownPosRef.current = {
|
|
@@ -2537,15 +2537,15 @@ var gs = "SelectTrigger", vs = l.forwardRef(
|
|
|
2537
2537
|
"data-placeholder": $s(s.value) ? "" : void 0,
|
|
2538
2538
|
...a,
|
|
2539
2539
|
ref: u,
|
|
2540
|
-
onClick:
|
|
2540
|
+
onClick: X(a.onClick, (h) => {
|
|
2541
2541
|
h.currentTarget.focus(), p.current !== "mouse" && C(h);
|
|
2542
2542
|
}),
|
|
2543
|
-
onPointerDown:
|
|
2543
|
+
onPointerDown: X(a.onPointerDown, (h) => {
|
|
2544
2544
|
p.current = h.pointerType;
|
|
2545
2545
|
const _ = h.target;
|
|
2546
2546
|
_.hasPointerCapture(h.pointerId) && _.releasePointerCapture(h.pointerId), h.button === 0 && h.ctrlKey === !1 && h.pointerType === "mouse" && (C(h), h.preventDefault());
|
|
2547
2547
|
}),
|
|
2548
|
-
onKeyDown:
|
|
2548
|
+
onKeyDown: X(a.onKeyDown, (h) => {
|
|
2549
2549
|
const _ = m.current !== "";
|
|
2550
2550
|
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(_ && h.key === " ") && Fd.includes(h.key) && (C(), h.preventDefault());
|
|
2551
2551
|
})
|
|
@@ -2617,66 +2617,66 @@ var Pe = 10, [Ss, Xe] = ft(rt), Wd = "SelectContentImpl", Cs = l.forwardRef(
|
|
|
2617
2617
|
hideWhenDetached: h,
|
|
2618
2618
|
avoidCollisions: _,
|
|
2619
2619
|
//
|
|
2620
|
-
...
|
|
2621
|
-
} = e, y = Ye(rt, t), [
|
|
2620
|
+
...A
|
|
2621
|
+
} = e, y = Ye(rt, t), [R, ee] = l.useState(null), [H, Z] = l.useState(null), T = be(r, (E) => ee(E)), [le, W] = l.useState(null), [Y, ce] = l.useState(
|
|
2622
2622
|
null
|
|
2623
|
-
), F = ir(t), [
|
|
2623
|
+
), F = ir(t), [G, z] = l.useState(!1), te = l.useRef(!1);
|
|
2624
2624
|
l.useEffect(() => {
|
|
2625
|
-
if (
|
|
2626
|
-
}, [
|
|
2627
|
-
const
|
|
2625
|
+
if (R) return na(R);
|
|
2626
|
+
}, [R]), aa();
|
|
2627
|
+
const J = l.useCallback(
|
|
2628
2628
|
(E) => {
|
|
2629
|
-
const [
|
|
2630
|
-
for (const
|
|
2631
|
-
if (
|
|
2629
|
+
const [U, ...re] = F().map(($) => $.ref.current), [B] = re.slice(-1), N = document.activeElement;
|
|
2630
|
+
for (const $ of E)
|
|
2631
|
+
if ($ === N || ($ == null || $.scrollIntoView({ block: "nearest" }), $ === U && H && (H.scrollTop = 0), $ === B && H && (H.scrollTop = H.scrollHeight), $ == null || $.focus(), document.activeElement !== N)) return;
|
|
2632
2632
|
},
|
|
2633
|
-
[F,
|
|
2634
|
-
),
|
|
2635
|
-
() =>
|
|
2636
|
-
[
|
|
2633
|
+
[F, H]
|
|
2634
|
+
), ie = l.useCallback(
|
|
2635
|
+
() => J([le, R]),
|
|
2636
|
+
[J, le, R]
|
|
2637
2637
|
);
|
|
2638
2638
|
l.useEffect(() => {
|
|
2639
|
-
|
|
2640
|
-
}, [
|
|
2641
|
-
const { onOpenChange: ue, triggerPointerDownPosRef:
|
|
2639
|
+
G && ie();
|
|
2640
|
+
}, [G, ie]);
|
|
2641
|
+
const { onOpenChange: ue, triggerPointerDownPosRef: V } = y;
|
|
2642
2642
|
l.useEffect(() => {
|
|
2643
|
-
if (
|
|
2643
|
+
if (R) {
|
|
2644
2644
|
let E = { x: 0, y: 0 };
|
|
2645
|
-
const
|
|
2646
|
-
var
|
|
2645
|
+
const U = (B) => {
|
|
2646
|
+
var N, $;
|
|
2647
2647
|
E = {
|
|
2648
|
-
x: Math.abs(Math.round(
|
|
2649
|
-
y: Math.abs(Math.round(
|
|
2648
|
+
x: Math.abs(Math.round(B.pageX) - (((N = V.current) == null ? void 0 : N.x) ?? 0)),
|
|
2649
|
+
y: Math.abs(Math.round(B.pageY) - ((($ = V.current) == null ? void 0 : $.y) ?? 0))
|
|
2650
2650
|
};
|
|
2651
|
-
},
|
|
2652
|
-
E.x <= 10 && E.y <= 10 ?
|
|
2651
|
+
}, re = (B) => {
|
|
2652
|
+
E.x <= 10 && E.y <= 10 ? B.preventDefault() : R.contains(B.target) || ue(!1), document.removeEventListener("pointermove", U), V.current = null;
|
|
2653
2653
|
};
|
|
2654
|
-
return
|
|
2655
|
-
document.removeEventListener("pointermove",
|
|
2654
|
+
return V.current !== null && (document.addEventListener("pointermove", U), document.addEventListener("pointerup", re, { capture: !0, once: !0 })), () => {
|
|
2655
|
+
document.removeEventListener("pointermove", U), document.removeEventListener("pointerup", re, { capture: !0 });
|
|
2656
2656
|
};
|
|
2657
2657
|
}
|
|
2658
|
-
}, [
|
|
2658
|
+
}, [R, ue, V]), l.useEffect(() => {
|
|
2659
2659
|
const E = () => ue(!1);
|
|
2660
2660
|
return window.addEventListener("blur", E), window.addEventListener("resize", E), () => {
|
|
2661
2661
|
window.removeEventListener("blur", E), window.removeEventListener("resize", E);
|
|
2662
2662
|
};
|
|
2663
2663
|
}, [ue]);
|
|
2664
|
-
const [
|
|
2665
|
-
const
|
|
2666
|
-
|
|
2664
|
+
const [oe, de] = Us((E) => {
|
|
2665
|
+
const U = F().filter((N) => !N.disabled), re = U.find((N) => N.ref.current === document.activeElement), B = Bs(U, E, re);
|
|
2666
|
+
B && setTimeout(() => B.ref.current.focus());
|
|
2667
2667
|
}), S = l.useCallback(
|
|
2668
|
-
(E,
|
|
2669
|
-
const
|
|
2670
|
-
(y.value !== void 0 && y.value ===
|
|
2668
|
+
(E, U, re) => {
|
|
2669
|
+
const B = !te.current && !re;
|
|
2670
|
+
(y.value !== void 0 && y.value === U || B) && (W(E), B && (te.current = !0));
|
|
2671
2671
|
},
|
|
2672
2672
|
[y.value]
|
|
2673
|
-
), L = l.useCallback(() =>
|
|
2674
|
-
(E,
|
|
2675
|
-
const
|
|
2676
|
-
(y.value !== void 0 && y.value ===
|
|
2673
|
+
), L = l.useCallback(() => R == null ? void 0 : R.focus(), [R]), K = l.useCallback(
|
|
2674
|
+
(E, U, re) => {
|
|
2675
|
+
const B = !te.current && !re;
|
|
2676
|
+
(y.value !== void 0 && y.value === U || B) && ce(E);
|
|
2677
2677
|
},
|
|
2678
2678
|
[y.value]
|
|
2679
|
-
),
|
|
2679
|
+
), O = n === "popper" ? Pr : _s, q = O === Pr ? {
|
|
2680
2680
|
side: i,
|
|
2681
2681
|
sideOffset: u,
|
|
2682
2682
|
align: f,
|
|
@@ -2692,18 +2692,18 @@ var Pe = 10, [Ss, Xe] = ft(rt), Wd = "SelectContentImpl", Cs = l.forwardRef(
|
|
|
2692
2692
|
Ss,
|
|
2693
2693
|
{
|
|
2694
2694
|
scope: t,
|
|
2695
|
-
content:
|
|
2696
|
-
viewport:
|
|
2697
|
-
onViewportChange:
|
|
2695
|
+
content: R,
|
|
2696
|
+
viewport: H,
|
|
2697
|
+
onViewportChange: Z,
|
|
2698
2698
|
itemRefCallback: S,
|
|
2699
|
-
selectedItem:
|
|
2699
|
+
selectedItem: le,
|
|
2700
2700
|
onItemLeave: L,
|
|
2701
|
-
itemTextRefCallback:
|
|
2702
|
-
focusSelectedItem:
|
|
2703
|
-
selectedItemText:
|
|
2701
|
+
itemTextRefCallback: K,
|
|
2702
|
+
focusSelectedItem: ie,
|
|
2703
|
+
selectedItemText: Y,
|
|
2704
2704
|
position: n,
|
|
2705
|
-
isPositioned:
|
|
2706
|
-
searchRef:
|
|
2705
|
+
isPositioned: G,
|
|
2706
|
+
searchRef: oe,
|
|
2707
2707
|
children: /* @__PURE__ */ c.jsx(da, { as: ps, allowPinchZoom: !0, children: /* @__PURE__ */ c.jsx(
|
|
2708
2708
|
oa,
|
|
2709
2709
|
{
|
|
@@ -2712,9 +2712,9 @@ var Pe = 10, [Ss, Xe] = ft(rt), Wd = "SelectContentImpl", Cs = l.forwardRef(
|
|
|
2712
2712
|
onMountAutoFocus: (E) => {
|
|
2713
2713
|
E.preventDefault();
|
|
2714
2714
|
},
|
|
2715
|
-
onUnmountAutoFocus:
|
|
2716
|
-
var
|
|
2717
|
-
(
|
|
2715
|
+
onUnmountAutoFocus: X(a, (E) => {
|
|
2716
|
+
var U;
|
|
2717
|
+
(U = y.trigger) == null || U.focus({ preventScroll: !0 }), E.preventDefault();
|
|
2718
2718
|
}),
|
|
2719
2719
|
children: /* @__PURE__ */ c.jsx(
|
|
2720
2720
|
sa,
|
|
@@ -2726,34 +2726,34 @@ var Pe = 10, [Ss, Xe] = ft(rt), Wd = "SelectContentImpl", Cs = l.forwardRef(
|
|
|
2726
2726
|
onFocusOutside: (E) => E.preventDefault(),
|
|
2727
2727
|
onDismiss: () => y.onOpenChange(!1),
|
|
2728
2728
|
children: /* @__PURE__ */ c.jsx(
|
|
2729
|
-
|
|
2729
|
+
O,
|
|
2730
2730
|
{
|
|
2731
2731
|
role: "listbox",
|
|
2732
2732
|
id: y.contentId,
|
|
2733
2733
|
"data-state": y.open ? "open" : "closed",
|
|
2734
2734
|
dir: y.dir,
|
|
2735
2735
|
onContextMenu: (E) => E.preventDefault(),
|
|
2736
|
-
...
|
|
2737
|
-
...
|
|
2738
|
-
onPlaced: () =>
|
|
2739
|
-
ref:
|
|
2736
|
+
...A,
|
|
2737
|
+
...q,
|
|
2738
|
+
onPlaced: () => z(!0),
|
|
2739
|
+
ref: T,
|
|
2740
2740
|
style: {
|
|
2741
2741
|
// flex layout so we can place the scroll buttons properly
|
|
2742
2742
|
display: "flex",
|
|
2743
2743
|
flexDirection: "column",
|
|
2744
2744
|
// reset the outline by default as the content MAY get focused
|
|
2745
2745
|
outline: "none",
|
|
2746
|
-
...
|
|
2746
|
+
...A.style
|
|
2747
2747
|
},
|
|
2748
|
-
onKeyDown:
|
|
2749
|
-
const
|
|
2750
|
-
if (E.key === "Tab" && E.preventDefault(), !
|
|
2751
|
-
let
|
|
2752
|
-
if (["ArrowUp", "End"].includes(E.key) && (
|
|
2753
|
-
const
|
|
2754
|
-
|
|
2748
|
+
onKeyDown: X(A.onKeyDown, (E) => {
|
|
2749
|
+
const U = E.ctrlKey || E.altKey || E.metaKey;
|
|
2750
|
+
if (E.key === "Tab" && E.preventDefault(), !U && E.key.length === 1 && de(E.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(E.key)) {
|
|
2751
|
+
let B = F().filter((N) => !N.disabled).map((N) => N.ref.current);
|
|
2752
|
+
if (["ArrowUp", "End"].includes(E.key) && (B = B.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(E.key)) {
|
|
2753
|
+
const N = E.target, $ = B.indexOf(N);
|
|
2754
|
+
B = B.slice($ + 1);
|
|
2755
2755
|
}
|
|
2756
|
-
setTimeout(() =>
|
|
2756
|
+
setTimeout(() => J(B)), E.preventDefault();
|
|
2757
2757
|
}
|
|
2758
2758
|
})
|
|
2759
2759
|
}
|
|
@@ -2768,48 +2768,48 @@ var Pe = 10, [Ss, Xe] = ft(rt), Wd = "SelectContentImpl", Cs = l.forwardRef(
|
|
|
2768
2768
|
);
|
|
2769
2769
|
Cs.displayName = Wd;
|
|
2770
2770
|
var zd = "SelectItemAlignedPosition", _s = l.forwardRef((e, r) => {
|
|
2771
|
-
const { __scopeSelect: t, onPlaced: n, ...a } = e, o = Ye(rt, t), s = Xe(rt, t), [i, u] = l.useState(null), [f, p] = l.useState(null), m = be(r, (
|
|
2772
|
-
if (o.trigger && o.valueNode && i && f && h && _ &&
|
|
2773
|
-
const
|
|
2771
|
+
const { __scopeSelect: t, onPlaced: n, ...a } = e, o = Ye(rt, t), s = Xe(rt, t), [i, u] = l.useState(null), [f, p] = l.useState(null), m = be(r, (T) => p(T)), g = ir(t), w = l.useRef(!1), C = l.useRef(!0), { viewport: h, selectedItem: _, selectedItemText: A, focusSelectedItem: y } = s, R = l.useCallback(() => {
|
|
2772
|
+
if (o.trigger && o.valueNode && i && f && h && _ && A) {
|
|
2773
|
+
const T = o.trigger.getBoundingClientRect(), le = f.getBoundingClientRect(), W = o.valueNode.getBoundingClientRect(), Y = A.getBoundingClientRect();
|
|
2774
2774
|
if (o.dir !== "rtl") {
|
|
2775
|
-
const
|
|
2775
|
+
const N = Y.left - le.left, $ = W.left - N, ne = T.left - $, we = T.width + ne, xe = Math.max(we, le.width), pe = window.innerWidth - Pe, ge = Ln($, [
|
|
2776
2776
|
Pe,
|
|
2777
2777
|
// Prevents the content from going off the starting edge of the
|
|
2778
2778
|
// viewport. It may still go off the ending edge, but this can be
|
|
2779
2779
|
// controlled by the user since they may want to manage overflow in a
|
|
2780
2780
|
// specific way.
|
|
2781
2781
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
2782
|
-
Math.max(Pe,
|
|
2782
|
+
Math.max(Pe, pe - xe)
|
|
2783
2783
|
]);
|
|
2784
|
-
i.style.minWidth =
|
|
2784
|
+
i.style.minWidth = we + "px", i.style.left = ge + "px";
|
|
2785
2785
|
} else {
|
|
2786
|
-
const
|
|
2786
|
+
const N = le.right - Y.right, $ = window.innerWidth - W.right - N, ne = window.innerWidth - T.right - $, we = T.width + ne, xe = Math.max(we, le.width), pe = window.innerWidth - Pe, ge = Ln($, [
|
|
2787
2787
|
Pe,
|
|
2788
|
-
Math.max(Pe,
|
|
2788
|
+
Math.max(Pe, pe - xe)
|
|
2789
2789
|
]);
|
|
2790
|
-
i.style.minWidth =
|
|
2790
|
+
i.style.minWidth = we + "px", i.style.right = ge + "px";
|
|
2791
2791
|
}
|
|
2792
|
-
const
|
|
2793
|
-
if (
|
|
2794
|
-
const
|
|
2792
|
+
const ce = g(), F = window.innerHeight - Pe * 2, G = h.scrollHeight, z = window.getComputedStyle(f), te = parseInt(z.borderTopWidth, 10), J = parseInt(z.paddingTop, 10), ie = parseInt(z.borderBottomWidth, 10), ue = parseInt(z.paddingBottom, 10), V = te + J + G + ue + ie, oe = Math.min(_.offsetHeight * 5, V), de = window.getComputedStyle(h), S = parseInt(de.paddingTop, 10), L = parseInt(de.paddingBottom, 10), K = T.top + T.height / 2 - Pe, O = F - K, q = _.offsetHeight / 2, E = _.offsetTop + q, U = te + J + E, re = V - U;
|
|
2793
|
+
if (U <= K) {
|
|
2794
|
+
const N = ce.length > 0 && _ === ce[ce.length - 1].ref.current;
|
|
2795
2795
|
i.style.bottom = "0px";
|
|
2796
|
-
const
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
(
|
|
2800
|
-
),
|
|
2801
|
-
i.style.height =
|
|
2796
|
+
const $ = f.clientHeight - h.offsetTop - h.offsetHeight, ne = Math.max(
|
|
2797
|
+
O,
|
|
2798
|
+
q + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
2799
|
+
(N ? L : 0) + $ + ie
|
|
2800
|
+
), we = U + ne;
|
|
2801
|
+
i.style.height = we + "px";
|
|
2802
2802
|
} else {
|
|
2803
|
-
const
|
|
2803
|
+
const N = ce.length > 0 && _ === ce[0].ref.current;
|
|
2804
2804
|
i.style.top = "0px";
|
|
2805
|
-
const
|
|
2806
|
-
|
|
2805
|
+
const ne = Math.max(
|
|
2806
|
+
K,
|
|
2807
2807
|
te + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
2808
|
-
(
|
|
2809
|
-
) +
|
|
2810
|
-
i.style.height =
|
|
2808
|
+
(N ? S : 0) + q
|
|
2809
|
+
) + re;
|
|
2810
|
+
i.style.height = ne + "px", h.scrollTop = U - K + h.offsetTop;
|
|
2811
2811
|
}
|
|
2812
|
-
i.style.margin = `${Pe}px 0`, i.style.minHeight =
|
|
2812
|
+
i.style.margin = `${Pe}px 0`, i.style.minHeight = oe + "px", i.style.maxHeight = F + "px", n == null || n(), requestAnimationFrame(() => w.current = !0);
|
|
2813
2813
|
}
|
|
2814
2814
|
}, [
|
|
2815
2815
|
g,
|
|
@@ -2819,20 +2819,20 @@ var zd = "SelectItemAlignedPosition", _s = l.forwardRef((e, r) => {
|
|
|
2819
2819
|
f,
|
|
2820
2820
|
h,
|
|
2821
2821
|
_,
|
|
2822
|
-
|
|
2822
|
+
A,
|
|
2823
2823
|
o.dir,
|
|
2824
2824
|
n
|
|
2825
2825
|
]);
|
|
2826
|
-
Ue(() =>
|
|
2827
|
-
const [
|
|
2826
|
+
Ue(() => R(), [R]);
|
|
2827
|
+
const [ee, H] = l.useState();
|
|
2828
2828
|
Ue(() => {
|
|
2829
|
-
f &&
|
|
2829
|
+
f && H(window.getComputedStyle(f).zIndex);
|
|
2830
2830
|
}, [f]);
|
|
2831
|
-
const
|
|
2832
|
-
(
|
|
2833
|
-
|
|
2831
|
+
const Z = l.useCallback(
|
|
2832
|
+
(T) => {
|
|
2833
|
+
T && C.current === !0 && (R(), y == null || y(), C.current = !1);
|
|
2834
2834
|
},
|
|
2835
|
-
[
|
|
2835
|
+
[R, y]
|
|
2836
2836
|
);
|
|
2837
2837
|
return /* @__PURE__ */ c.jsx(
|
|
2838
2838
|
Yd,
|
|
@@ -2840,7 +2840,7 @@ var zd = "SelectItemAlignedPosition", _s = l.forwardRef((e, r) => {
|
|
|
2840
2840
|
scope: t,
|
|
2841
2841
|
contentWrapper: i,
|
|
2842
2842
|
shouldExpandOnScrollRef: w,
|
|
2843
|
-
onScrollButtonChange:
|
|
2843
|
+
onScrollButtonChange: Z,
|
|
2844
2844
|
children: /* @__PURE__ */ c.jsx(
|
|
2845
2845
|
"div",
|
|
2846
2846
|
{
|
|
@@ -2849,7 +2849,7 @@ var zd = "SelectItemAlignedPosition", _s = l.forwardRef((e, r) => {
|
|
|
2849
2849
|
display: "flex",
|
|
2850
2850
|
flexDirection: "column",
|
|
2851
2851
|
position: "fixed",
|
|
2852
|
-
zIndex:
|
|
2852
|
+
zIndex: ee
|
|
2853
2853
|
},
|
|
2854
2854
|
children: /* @__PURE__ */ c.jsx(
|
|
2855
2855
|
se.div,
|
|
@@ -2934,15 +2934,15 @@ var [Yd, mn] = ft(rt, {}), jr = "SelectViewport", Ns = l.forwardRef(
|
|
|
2934
2934
|
overflow: "hidden auto",
|
|
2935
2935
|
...a.style
|
|
2936
2936
|
},
|
|
2937
|
-
onScroll:
|
|
2937
|
+
onScroll: X(a.onScroll, (f) => {
|
|
2938
2938
|
const p = f.currentTarget, { contentWrapper: m, shouldExpandOnScrollRef: g } = s;
|
|
2939
2939
|
if (g != null && g.current && m) {
|
|
2940
2940
|
const w = Math.abs(u.current - p.scrollTop);
|
|
2941
2941
|
if (w > 0) {
|
|
2942
|
-
const C = window.innerHeight - Pe * 2, h = parseFloat(m.style.minHeight), _ = parseFloat(m.style.height),
|
|
2943
|
-
if (
|
|
2944
|
-
const y =
|
|
2945
|
-
m.style.height =
|
|
2942
|
+
const C = window.innerHeight - Pe * 2, h = parseFloat(m.style.minHeight), _ = parseFloat(m.style.height), A = Math.max(h, _);
|
|
2943
|
+
if (A < C) {
|
|
2944
|
+
const y = A + w, R = Math.min(C, y), ee = y - R;
|
|
2945
|
+
m.style.height = R + "px", m.style.bottom === "0px" && (p.scrollTop = ee > 0 ? ee : 0, m.style.justifyContent = "flex-end");
|
|
2946
2946
|
}
|
|
2947
2947
|
}
|
|
2948
2948
|
}
|
|
@@ -2979,10 +2979,10 @@ var Bt = "SelectItem", [Jd, Ts] = ft(Bt), Ms = l.forwardRef(
|
|
|
2979
2979
|
} = e, i = Ye(Bt, t), u = Xe(Bt, t), f = i.value === n, [p, m] = l.useState(o ?? ""), [g, w] = l.useState(!1), C = be(
|
|
2980
2980
|
r,
|
|
2981
2981
|
(y) => {
|
|
2982
|
-
var
|
|
2983
|
-
return (
|
|
2982
|
+
var R;
|
|
2983
|
+
return (R = u.itemRefCallback) == null ? void 0 : R.call(u, y, n, a);
|
|
2984
2984
|
}
|
|
2985
|
-
), h = Ce(), _ = l.useRef("touch"),
|
|
2985
|
+
), h = Ce(), _ = l.useRef("touch"), A = () => {
|
|
2986
2986
|
a || (i.onValueChange(n), i.onOpenChange(!1));
|
|
2987
2987
|
};
|
|
2988
2988
|
if (n === "")
|
|
@@ -2998,7 +2998,7 @@ var Bt = "SelectItem", [Jd, Ts] = ft(Bt), Ms = l.forwardRef(
|
|
|
2998
2998
|
textId: h,
|
|
2999
2999
|
isSelected: f,
|
|
3000
3000
|
onItemTextChange: l.useCallback((y) => {
|
|
3001
|
-
m((
|
|
3001
|
+
m((R) => R || ((y == null ? void 0 : y.textContent) ?? "").trim());
|
|
3002
3002
|
}, []),
|
|
3003
3003
|
children: /* @__PURE__ */ c.jsx(
|
|
3004
3004
|
lr.ItemSlot,
|
|
@@ -3020,28 +3020,28 @@ var Bt = "SelectItem", [Jd, Ts] = ft(Bt), Ms = l.forwardRef(
|
|
|
3020
3020
|
tabIndex: a ? void 0 : -1,
|
|
3021
3021
|
...s,
|
|
3022
3022
|
ref: C,
|
|
3023
|
-
onFocus:
|
|
3024
|
-
onBlur:
|
|
3025
|
-
onClick:
|
|
3026
|
-
_.current !== "mouse" &&
|
|
3023
|
+
onFocus: X(s.onFocus, () => w(!0)),
|
|
3024
|
+
onBlur: X(s.onBlur, () => w(!1)),
|
|
3025
|
+
onClick: X(s.onClick, () => {
|
|
3026
|
+
_.current !== "mouse" && A();
|
|
3027
3027
|
}),
|
|
3028
|
-
onPointerUp:
|
|
3029
|
-
_.current === "mouse" &&
|
|
3028
|
+
onPointerUp: X(s.onPointerUp, () => {
|
|
3029
|
+
_.current === "mouse" && A();
|
|
3030
3030
|
}),
|
|
3031
|
-
onPointerDown:
|
|
3031
|
+
onPointerDown: X(s.onPointerDown, (y) => {
|
|
3032
3032
|
_.current = y.pointerType;
|
|
3033
3033
|
}),
|
|
3034
|
-
onPointerMove:
|
|
3035
|
-
var
|
|
3036
|
-
_.current = y.pointerType, a ? (
|
|
3034
|
+
onPointerMove: X(s.onPointerMove, (y) => {
|
|
3035
|
+
var R;
|
|
3036
|
+
_.current = y.pointerType, a ? (R = u.onItemLeave) == null || R.call(u) : _.current === "mouse" && y.currentTarget.focus({ preventScroll: !0 });
|
|
3037
3037
|
}),
|
|
3038
|
-
onPointerLeave:
|
|
3039
|
-
var
|
|
3040
|
-
y.currentTarget === document.activeElement && ((
|
|
3038
|
+
onPointerLeave: X(s.onPointerLeave, (y) => {
|
|
3039
|
+
var R;
|
|
3040
|
+
y.currentTarget === document.activeElement && ((R = u.onItemLeave) == null || R.call(u));
|
|
3041
3041
|
}),
|
|
3042
|
-
onKeyDown:
|
|
3043
|
-
var
|
|
3044
|
-
((
|
|
3042
|
+
onKeyDown: X(s.onKeyDown, (y) => {
|
|
3043
|
+
var ee;
|
|
3044
|
+
((ee = u.searchRef) == null ? void 0 : ee.current) !== "" && y.key === " " || ($d.includes(y.key) && A(), y.key === " " && y.preventDefault());
|
|
3045
3045
|
})
|
|
3046
3046
|
}
|
|
3047
3047
|
)
|
|
@@ -3056,11 +3056,11 @@ var xt = "SelectItemText", Ds = l.forwardRef(
|
|
|
3056
3056
|
(e, r) => {
|
|
3057
3057
|
const { __scopeSelect: t, className: n, style: a, ...o } = e, s = Ye(xt, t), i = Xe(xt, t), u = Ts(xt, t), f = Hd(xt, t), [p, m] = l.useState(null), g = be(
|
|
3058
3058
|
r,
|
|
3059
|
-
(
|
|
3059
|
+
(A) => m(A),
|
|
3060
3060
|
u.onItemTextChange,
|
|
3061
|
-
(
|
|
3061
|
+
(A) => {
|
|
3062
3062
|
var y;
|
|
3063
|
-
return (y = i.itemTextRefCallback) == null ? void 0 : y.call(i,
|
|
3063
|
+
return (y = i.itemTextRefCallback) == null ? void 0 : y.call(i, A, u.value, u.disabled);
|
|
3064
3064
|
}
|
|
3065
3065
|
), w = p == null ? void 0 : p.textContent, C = l.useMemo(
|
|
3066
3066
|
() => /* @__PURE__ */ c.jsx("option", { value: u.value, disabled: u.disabled, children: w }, u.value),
|
|
@@ -3143,14 +3143,14 @@ var Vs = l.forwardRef((e, r) => {
|
|
|
3143
3143
|
...a,
|
|
3144
3144
|
ref: r,
|
|
3145
3145
|
style: { flexShrink: 0, ...a.style },
|
|
3146
|
-
onPointerDown:
|
|
3146
|
+
onPointerDown: X(a.onPointerDown, () => {
|
|
3147
3147
|
s.current === null && (s.current = window.setInterval(n, 50));
|
|
3148
3148
|
}),
|
|
3149
|
-
onPointerMove:
|
|
3149
|
+
onPointerMove: X(a.onPointerMove, () => {
|
|
3150
3150
|
var f;
|
|
3151
3151
|
(f = o.onItemLeave) == null || f.call(o), s.current === null && (s.current = window.setInterval(n, 50));
|
|
3152
3152
|
}),
|
|
3153
|
-
onPointerLeave:
|
|
3153
|
+
onPointerLeave: X(a.onPointerLeave, () => {
|
|
3154
3154
|
u();
|
|
3155
3155
|
})
|
|
3156
3156
|
}
|
|
@@ -3219,7 +3219,7 @@ const df = rf, mm = lf, ff = nf, Xs = l.forwardRef(({ className: e, children: r,
|
|
|
3219
3219
|
Hs,
|
|
3220
3220
|
{
|
|
3221
3221
|
ref: n,
|
|
3222
|
-
className:
|
|
3222
|
+
className: k(
|
|
3223
3223
|
"al-flex al-h-10 al-items-center al-justify-between al-rounded-md al-border al-border-input al-bg-transparent al-px-3 al-py-2 al-text-sm al-ring-offset-background placeholder:al-text-muted-foreground focus:al-outline-none focus:al-ring-2 focus:al-ring-ring focus:al-ring-offset-2 disabled:al-cursor-not-allowed disabled:al-opacity-50 [&>span]:al-line-clamp-1 data-[placeholder]:al-text-muted-foreground",
|
|
3224
3224
|
e
|
|
3225
3225
|
),
|
|
@@ -3235,7 +3235,7 @@ const Zs = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
3235
3235
|
zs,
|
|
3236
3236
|
{
|
|
3237
3237
|
ref: t,
|
|
3238
|
-
className:
|
|
3238
|
+
className: k("al-flex al-cursor-default al-items-center al-justify-center al-py-1", e),
|
|
3239
3239
|
...r,
|
|
3240
3240
|
children: /* @__PURE__ */ c.jsx(li, { className: "al-h-4 al-w-4" })
|
|
3241
3241
|
}
|
|
@@ -3245,7 +3245,7 @@ const Js = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
3245
3245
|
qs,
|
|
3246
3246
|
{
|
|
3247
3247
|
ref: t,
|
|
3248
|
-
className:
|
|
3248
|
+
className: k("al-flex al-cursor-default al-items-center al-justify-center al-py-1", e),
|
|
3249
3249
|
...r,
|
|
3250
3250
|
children: /* @__PURE__ */ c.jsx(Ur, { className: "al-h-4 al-w-4" })
|
|
3251
3251
|
}
|
|
@@ -3255,7 +3255,7 @@ const Qs = l.forwardRef(({ className: e, children: r, position: t = "popper", ..
|
|
|
3255
3255
|
Gs,
|
|
3256
3256
|
{
|
|
3257
3257
|
ref: a,
|
|
3258
|
-
className:
|
|
3258
|
+
className: k(
|
|
3259
3259
|
"al-relative al-z-[100] al-max-h-96 al-min-w-[8rem] al-overflow-hidden al-rounded-md al-border al-bg-popover al-text-popover-foreground al-shadow-md data-[state=open]:al-animate-in data-[state=closed]:al-animate-out data-[state=closed]:al-fade-out-0 data-[state=open]:al-fade-in-0 data-[state=closed]:al-zoom-out-95 data-[state=open]:al-zoom-in-95 data-[side=bottom]:al-slide-in-from-top-2 data-[side=left]:al-slide-in-from-right-2 data-[side=right]:al-slide-in-from-left-2 data-[side=top]:al-slide-in-from-bottom-2",
|
|
3260
3260
|
t === "popper" && "data-[side=bottom]:al-translate-y-1 data-[side=left]:al--translate-x-1 data-[side=right]:al-translate-x-1 data-[side=top]:al--translate-y-1",
|
|
3261
3261
|
e
|
|
@@ -3267,7 +3267,7 @@ const Qs = l.forwardRef(({ className: e, children: r, position: t = "popper", ..
|
|
|
3267
3267
|
/* @__PURE__ */ c.jsx(
|
|
3268
3268
|
sf,
|
|
3269
3269
|
{
|
|
3270
|
-
className:
|
|
3270
|
+
className: k(
|
|
3271
3271
|
"al-p-1",
|
|
3272
3272
|
t === "popper" && "al-h-[var(--radix-select-trigger-height)] al-w-full al-min-w-[var(--radix-select-trigger-width)]"
|
|
3273
3273
|
),
|
|
@@ -3283,7 +3283,7 @@ const pf = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
3283
3283
|
Ks,
|
|
3284
3284
|
{
|
|
3285
3285
|
ref: t,
|
|
3286
|
-
className:
|
|
3286
|
+
className: k("al-py-1.5 al-pl-8 al-pr-2 al-text-sm al-font-semibold", e),
|
|
3287
3287
|
...r
|
|
3288
3288
|
}
|
|
3289
3289
|
));
|
|
@@ -3292,7 +3292,7 @@ const el = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__
|
|
|
3292
3292
|
Ws,
|
|
3293
3293
|
{
|
|
3294
3294
|
ref: n,
|
|
3295
|
-
className:
|
|
3295
|
+
className: k(
|
|
3296
3296
|
"al-relative al-flex al-w-full al-cursor-default al-select-none al-items-center al-rounded-sm al-py-1.5 al-pl-8 al-pr-2 al-text-sm al-outline-none focus:al-bg-accent focus:al-text-accent-foreground data-[disabled]:al-pointer-events-none data-[disabled]:al-opacity-50",
|
|
3297
3297
|
e
|
|
3298
3298
|
),
|
|
@@ -3308,7 +3308,7 @@ const mf = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
3308
3308
|
Ys,
|
|
3309
3309
|
{
|
|
3310
3310
|
ref: t,
|
|
3311
|
-
className:
|
|
3311
|
+
className: k("al--mx-1 al-my-1 al-h-px al-bg-muted", e),
|
|
3312
3312
|
...r
|
|
3313
3313
|
}
|
|
3314
3314
|
));
|
|
@@ -3371,7 +3371,7 @@ const gf = nt(
|
|
|
3371
3371
|
}
|
|
3372
3372
|
), vf = _e(
|
|
3373
3373
|
({ options: e, onChange: r, value: t, placeholder: n, className: a, disabled: o, icon: s, variant: i, size: u, open: f }, p) => /* @__PURE__ */ c.jsxs(df, { value: t, onValueChange: r, disabled: o, open: f, children: [
|
|
3374
|
-
/* @__PURE__ */ c.jsxs(Xs, { ref: p, className:
|
|
3374
|
+
/* @__PURE__ */ c.jsxs(Xs, { ref: p, className: k(gf({ variant: i, size: u, className: a })), children: [
|
|
3375
3375
|
s && /* @__PURE__ */ c.jsx("div", { className: "al-mr-2", children: s }),
|
|
3376
3376
|
/* @__PURE__ */ c.jsx(ff, { placeholder: n })
|
|
3377
3377
|
] }),
|
|
@@ -3405,7 +3405,7 @@ const hf = ({
|
|
|
3405
3405
|
/* @__PURE__ */ c.jsx(
|
|
3406
3406
|
"span",
|
|
3407
3407
|
{
|
|
3408
|
-
className:
|
|
3408
|
+
className: k("al-truncate al-inline-block", g === 0 ? "" : "al-ml-1"),
|
|
3409
3409
|
style: { maxWidth: "150px" },
|
|
3410
3410
|
title: m,
|
|
3411
3411
|
children: m
|
|
@@ -3450,37 +3450,38 @@ const hf = ({
|
|
|
3450
3450
|
hasMore: C = !1,
|
|
3451
3451
|
valueLabels: h,
|
|
3452
3452
|
onOpenChange: _,
|
|
3453
|
-
popoverContentProps:
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3453
|
+
popoverContentProps: A,
|
|
3454
|
+
popoverProps: y,
|
|
3455
|
+
exactSearch: R = !1,
|
|
3456
|
+
disableAllDeselect: ee = !1,
|
|
3457
|
+
onPageReset: H,
|
|
3458
|
+
hoverDelayMs: Z = 300
|
|
3458
3459
|
}) => {
|
|
3459
|
-
const [
|
|
3460
|
+
const [T, le] = ke((y == null ? void 0 : y.defaultOpen) ?? !1), [W, Y] = ke(!1), [ce, F] = ke(!1), [G, z] = ke(""), [te, J] = ke(1), [ie, ue] = ke(null), [V, oe] = ke(!1), [de, S] = ke(!1), [L, K] = ke(!1), O = lt(null), q = lt(null), E = lt(/* @__PURE__ */ new Map()), U = lt(null), re = lt(null), B = lt(null), N = e.some((x) => x.children), $ = Ke(() => f ? Array.isArray(r) ? r : r ? [r] : [] : r ? [r] : [], [r, f]), [ne, we] = ke($());
|
|
3460
3461
|
pt(() => {
|
|
3461
3462
|
e.forEach((x) => {
|
|
3462
|
-
|
|
3463
|
-
|
|
3463
|
+
E.current.set(x.value, x.label), x.nestedLabels && Object.entries(x.nestedLabels).forEach(([P, ae]) => {
|
|
3464
|
+
E.current.set(P, ae);
|
|
3464
3465
|
});
|
|
3465
3466
|
});
|
|
3466
3467
|
}, [e]), pt(() => {
|
|
3467
|
-
(!m || !
|
|
3468
|
-
}, [
|
|
3469
|
-
if (!w || !
|
|
3468
|
+
(!m || !T) && we($());
|
|
3469
|
+
}, [$, m, T]), pt(() => {
|
|
3470
|
+
if (!w || !T)
|
|
3470
3471
|
return;
|
|
3471
3472
|
const x = setTimeout(() => {
|
|
3472
|
-
const
|
|
3473
|
-
|
|
3474
|
-
(
|
|
3475
|
-
const [
|
|
3476
|
-
|
|
3477
|
-
if (C && !
|
|
3478
|
-
|
|
3473
|
+
const P = O.current;
|
|
3474
|
+
P && (q.current && (q.current.disconnect(), q.current = null), q.current = new IntersectionObserver(
|
|
3475
|
+
(ae) => {
|
|
3476
|
+
const [fe] = ae;
|
|
3477
|
+
fe.isIntersecting && setTimeout(async () => {
|
|
3478
|
+
if (C && !W && w) {
|
|
3479
|
+
Y(!0);
|
|
3479
3480
|
try {
|
|
3480
|
-
const
|
|
3481
|
-
await w(
|
|
3481
|
+
const Ee = te + 1;
|
|
3482
|
+
await w(G, Ee), J(Ee);
|
|
3482
3483
|
} finally {
|
|
3483
|
-
|
|
3484
|
+
Y(!1);
|
|
3484
3485
|
}
|
|
3485
3486
|
}
|
|
3486
3487
|
}, 50);
|
|
@@ -3490,86 +3491,86 @@ const hf = ({
|
|
|
3490
3491
|
threshold: 0.1,
|
|
3491
3492
|
rootMargin: "20px"
|
|
3492
3493
|
}
|
|
3493
|
-
),
|
|
3494
|
+
), q.current.observe(P));
|
|
3494
3495
|
}, 300);
|
|
3495
3496
|
return () => {
|
|
3496
3497
|
clearTimeout(x);
|
|
3497
3498
|
};
|
|
3498
|
-
}, [w,
|
|
3499
|
-
|
|
3500
|
-
}, [
|
|
3501
|
-
w && (
|
|
3502
|
-
|
|
3499
|
+
}, [w, T, C, W, G, te]), pt(() => {
|
|
3500
|
+
T || (q.current && (q.current.disconnect(), q.current = null), U.current && (clearTimeout(U.current), U.current = null), F(!1), B.current && (clearTimeout(B.current), B.current = null));
|
|
3501
|
+
}, [T]), pt(() => {
|
|
3502
|
+
w && (Y(!0), J(1), w("", 1).finally(() => {
|
|
3503
|
+
Y(!1);
|
|
3503
3504
|
}));
|
|
3504
3505
|
}, [w]);
|
|
3505
|
-
const
|
|
3506
|
+
const xe = Ke(
|
|
3506
3507
|
(x) => {
|
|
3507
|
-
!
|
|
3508
|
+
!N || !x.children || (S(!0), ue(x), oe(!0), B.current && (clearTimeout(B.current), B.current = null));
|
|
3508
3509
|
},
|
|
3509
|
-
[
|
|
3510
|
-
),
|
|
3511
|
-
|
|
3512
|
-
!
|
|
3513
|
-
},
|
|
3514
|
-
}, [
|
|
3515
|
-
|
|
3516
|
-
}, [
|
|
3517
|
-
|
|
3518
|
-
!
|
|
3519
|
-
},
|
|
3520
|
-
}, [
|
|
3510
|
+
[N]
|
|
3511
|
+
), pe = Ke(() => {
|
|
3512
|
+
N && (S(!1), L || (B.current && clearTimeout(B.current), B.current = setTimeout(() => {
|
|
3513
|
+
!L && !de && (oe(!1), ue(null));
|
|
3514
|
+
}, Z)));
|
|
3515
|
+
}, [N, L, de, Z]), ge = Ke(() => {
|
|
3516
|
+
N && (K(!0), B.current && (clearTimeout(B.current), B.current = null));
|
|
3517
|
+
}, [N]), Fe = Ke(() => {
|
|
3518
|
+
N && (K(!1), B.current && clearTimeout(B.current), de || (B.current = setTimeout(() => {
|
|
3519
|
+
!L && !de && (oe(!1), ue(null));
|
|
3520
|
+
}, Z)));
|
|
3521
|
+
}, [N, de, L, Z]), $e = Ke(
|
|
3521
3522
|
(x) => {
|
|
3522
3523
|
if (h && h[x])
|
|
3523
3524
|
return h[x];
|
|
3524
|
-
const
|
|
3525
|
-
if (
|
|
3526
|
-
return
|
|
3527
|
-
const
|
|
3528
|
-
return
|
|
3525
|
+
const P = e.find((fe) => fe.value === x);
|
|
3526
|
+
if (P)
|
|
3527
|
+
return P.label;
|
|
3528
|
+
const ae = E.current.get(x);
|
|
3529
|
+
return ae || (w ? "Loading..." : x);
|
|
3529
3530
|
},
|
|
3530
3531
|
[e, h, w]
|
|
3531
|
-
),
|
|
3532
|
+
), d = (x) => {
|
|
3532
3533
|
if (f) {
|
|
3533
|
-
const
|
|
3534
|
-
|
|
3534
|
+
const P = ne.includes(x) ? ne.filter((ae) => ae !== x) : [...ne, x];
|
|
3535
|
+
we(P), m || t(P);
|
|
3535
3536
|
} else
|
|
3536
|
-
t(x),
|
|
3537
|
-
},
|
|
3537
|
+
t(x), I(!1);
|
|
3538
|
+
}, v = () => {
|
|
3538
3539
|
if (f) {
|
|
3539
|
-
if (
|
|
3540
|
-
|
|
3541
|
-
|
|
3540
|
+
if (ee && ne.length === 0) {
|
|
3541
|
+
U.current && clearTimeout(U.current), F(!0), U.current = setTimeout(() => {
|
|
3542
|
+
F(!1), U.current = null;
|
|
3542
3543
|
}, 5e3);
|
|
3543
3544
|
return;
|
|
3544
3545
|
}
|
|
3545
|
-
|
|
3546
|
+
U.current && (clearTimeout(U.current), U.current = null), t(ne);
|
|
3546
3547
|
}
|
|
3547
|
-
|
|
3548
|
-
},
|
|
3548
|
+
I(!1);
|
|
3549
|
+
}, b = () => {
|
|
3549
3550
|
const x = f ? [] : "";
|
|
3550
|
-
|
|
3551
|
-
},
|
|
3551
|
+
we([]), m || (t(x), I(!1));
|
|
3552
|
+
}, M = Ke(
|
|
3552
3553
|
(x) => {
|
|
3553
|
-
|
|
3554
|
+
z(x), x !== G && (J(1), H && H());
|
|
3554
3555
|
},
|
|
3555
|
-
[
|
|
3556
|
-
),
|
|
3556
|
+
[H, G]
|
|
3557
|
+
), I = Ke(
|
|
3557
3558
|
(x) => {
|
|
3558
|
-
|
|
3559
|
+
le(x), _ && _(x);
|
|
3559
3560
|
},
|
|
3560
3561
|
[_]
|
|
3561
3562
|
);
|
|
3562
|
-
return /* @__PURE__ */ c.jsxs(An, { open:
|
|
3563
|
+
return /* @__PURE__ */ c.jsxs(An, { ...y, open: T, onOpenChange: I, children: [
|
|
3563
3564
|
/* @__PURE__ */ c.jsx(Rn, { asChild: !0, children: /* @__PURE__ */ c.jsxs(
|
|
3564
3565
|
gr,
|
|
3565
3566
|
{
|
|
3566
3567
|
size: "sm",
|
|
3567
3568
|
variant: "outline",
|
|
3568
3569
|
role: "combobox",
|
|
3569
|
-
"aria-expanded":
|
|
3570
|
+
"aria-expanded": T,
|
|
3570
3571
|
id: i ? `${i}-combobox` : "default-combobox",
|
|
3571
3572
|
...s,
|
|
3572
|
-
className:
|
|
3573
|
+
className: k(
|
|
3573
3574
|
"al-w-56 al-flex al-items-center al-justify-between al-py-3 al-px-2",
|
|
3574
3575
|
s == null ? void 0 : s.className
|
|
3575
3576
|
),
|
|
@@ -3582,20 +3583,20 @@ const hf = ({
|
|
|
3582
3583
|
showOnlyPlaceholder: p,
|
|
3583
3584
|
placeholder: n,
|
|
3584
3585
|
value: r,
|
|
3585
|
-
selectedValues:
|
|
3586
|
+
selectedValues: ne,
|
|
3586
3587
|
showApplyButton: m,
|
|
3587
|
-
getLabelForValue:
|
|
3588
|
+
getLabelForValue: $e
|
|
3588
3589
|
}
|
|
3589
3590
|
) }),
|
|
3590
|
-
(
|
|
3591
|
+
(A == null ? void 0 : A.side) === "right" ? /* @__PURE__ */ c.jsx(Dn, { className: "al-ml-2 al-size-4 al-shrink-0 al-opacity-50" }) : /* @__PURE__ */ c.jsx(Si, { className: "al-mr-2 al-size-4 al-shrink-0 al-opacity-50" })
|
|
3591
3592
|
]
|
|
3592
3593
|
}
|
|
3593
3594
|
) }),
|
|
3594
3595
|
/* @__PURE__ */ c.jsx(
|
|
3595
3596
|
Tn,
|
|
3596
3597
|
{
|
|
3597
|
-
...
|
|
3598
|
-
className:
|
|
3598
|
+
...A,
|
|
3599
|
+
className: k("!al-w-56 !al-p-0", A == null ? void 0 : A.className),
|
|
3599
3600
|
id: `${i}-combobox-content`,
|
|
3600
3601
|
onWheel: (x) => {
|
|
3601
3602
|
x.stopPropagation();
|
|
@@ -3603,19 +3604,19 @@ const hf = ({
|
|
|
3603
3604
|
children: /* @__PURE__ */ c.jsxs(
|
|
3604
3605
|
on,
|
|
3605
3606
|
{
|
|
3606
|
-
filter:
|
|
3607
|
+
filter: R ? (x, P) => x.toLowerCase().includes(P.toLowerCase()) ? 1 : 0 : void 0,
|
|
3607
3608
|
children: [
|
|
3608
3609
|
f && m && /* @__PURE__ */ c.jsxs("div", { className: "al-flex al-justify-between al-items-center al-p-2 al-border-b", children: [
|
|
3609
3610
|
/* @__PURE__ */ c.jsx(Mn, { variant: "body", children: a ?? n }),
|
|
3610
|
-
/* @__PURE__ */ c.jsx(gr, { onClick:
|
|
3611
|
+
/* @__PURE__ */ c.jsx(gr, { onClick: v, size: "sm", children: "Apply" })
|
|
3611
3612
|
] }),
|
|
3612
|
-
|
|
3613
|
+
ce && /* @__PURE__ */ c.jsx("div", { className: "al-flex al-items-center al-justify-center al-p-2 al-text-red-600 al-bg-red-50 al-border-b", children: /* @__PURE__ */ c.jsx(Mn, { variant: "body", className: "al-text-center al-text-sm", children: "At least one item must be selected." }) }),
|
|
3613
3614
|
/* @__PURE__ */ c.jsx(
|
|
3614
3615
|
No,
|
|
3615
3616
|
{
|
|
3616
3617
|
placeholder: o,
|
|
3617
3618
|
className: "al-h-9",
|
|
3618
|
-
onValueChange:
|
|
3619
|
+
onValueChange: M
|
|
3619
3620
|
}
|
|
3620
3621
|
),
|
|
3621
3622
|
/* @__PURE__ */ c.jsxs(Eo, { children: [
|
|
@@ -3625,24 +3626,24 @@ const hf = ({
|
|
|
3625
3626
|
Ro,
|
|
3626
3627
|
{
|
|
3627
3628
|
value: x.label,
|
|
3628
|
-
onSelect: () => !
|
|
3629
|
+
onSelect: () => !N || !x.children ? d(x.value) : void 0,
|
|
3629
3630
|
"aria-label": x.label,
|
|
3630
3631
|
className: "al-cursor-pointer",
|
|
3631
3632
|
title: x.label,
|
|
3632
|
-
onMouseEnter: () =>
|
|
3633
|
-
onMouseLeave:
|
|
3633
|
+
onMouseEnter: () => xe(x),
|
|
3634
|
+
onMouseLeave: pe,
|
|
3634
3635
|
children: /* @__PURE__ */ c.jsxs("div", { className: "al-flex al-items-center al-gap-2 al-w-full", children: [
|
|
3635
3636
|
/* @__PURE__ */ c.jsx(
|
|
3636
3637
|
bi,
|
|
3637
3638
|
{
|
|
3638
|
-
className:
|
|
3639
|
+
className: k(
|
|
3639
3640
|
"al-mr-2 al-size-4",
|
|
3640
|
-
f ?
|
|
3641
|
+
f ? ne.includes(x.value) ? "al-opacity-100" : "al-opacity-0" : r === x.value ? "al-opacity-100" : "al-opacity-0"
|
|
3641
3642
|
)
|
|
3642
3643
|
}
|
|
3643
3644
|
),
|
|
3644
3645
|
/* @__PURE__ */ c.jsx("div", { className: "al-flex-1 al-min-w-0", children: x.labelNode ? x.labelNode : /* @__PURE__ */ c.jsx("span", { className: "al-text-sm al-leading-5 al-line-clamp-2 al-break-words", children: x.label }) }),
|
|
3645
|
-
|
|
3646
|
+
N && x.children && /* @__PURE__ */ c.jsx(
|
|
3646
3647
|
Dn,
|
|
3647
3648
|
{
|
|
3648
3649
|
className: "al-ml-2 al-size-4 al-shrink-0 al-opacity-50",
|
|
@@ -3652,18 +3653,18 @@ const hf = ({
|
|
|
3652
3653
|
] })
|
|
3653
3654
|
}
|
|
3654
3655
|
),
|
|
3655
|
-
|
|
3656
|
+
N && (ie == null ? void 0 : ie.value) === x.value && V && x.children && /* @__PURE__ */ c.jsxs(An, { open: V, children: [
|
|
3656
3657
|
/* @__PURE__ */ c.jsx(Rn, { asChild: !0, children: /* @__PURE__ */ c.jsx("div", { className: "al-absolute al-top-0 al-left-0 al-w-full al-h-full al-pointer-events-none" }) }),
|
|
3657
3658
|
/* @__PURE__ */ c.jsx(
|
|
3658
3659
|
Tn,
|
|
3659
3660
|
{
|
|
3660
|
-
ref:
|
|
3661
|
+
ref: re,
|
|
3661
3662
|
className: "al-p-4 al-min-w-[300px] al-max-h-[90vh] al-overflow-auto",
|
|
3662
3663
|
align: "start",
|
|
3663
3664
|
side: "right",
|
|
3664
3665
|
sideOffset: 8,
|
|
3665
|
-
onMouseEnter:
|
|
3666
|
-
onMouseLeave:
|
|
3666
|
+
onMouseEnter: ge,
|
|
3667
|
+
onMouseLeave: Fe,
|
|
3667
3668
|
style: {
|
|
3668
3669
|
backgroundColor: "white",
|
|
3669
3670
|
boxShadow: "0 8px 24px rgba(0, 0, 0, 0.15)",
|
|
@@ -3672,7 +3673,7 @@ const hf = ({
|
|
|
3672
3673
|
zIndex: 3e3
|
|
3673
3674
|
},
|
|
3674
3675
|
children: x.children(() => {
|
|
3675
|
-
|
|
3676
|
+
oe(!1), ue(null), I(!1);
|
|
3676
3677
|
})
|
|
3677
3678
|
}
|
|
3678
3679
|
)
|
|
@@ -3681,10 +3682,10 @@ const hf = ({
|
|
|
3681
3682
|
w && C && /* @__PURE__ */ c.jsx(
|
|
3682
3683
|
"div",
|
|
3683
3684
|
{
|
|
3684
|
-
ref:
|
|
3685
|
+
ref: O,
|
|
3685
3686
|
className: "al-py-2 al-px-2 al-text-center",
|
|
3686
3687
|
"data-testid": "load-more-indicator",
|
|
3687
|
-
children:
|
|
3688
|
+
children: W && /* @__PURE__ */ c.jsxs("div", { className: "al-flex al-items-center al-justify-center al-gap-2 al-text-sm al-text-muted-foreground", children: [
|
|
3688
3689
|
/* @__PURE__ */ c.jsx("div", { className: "al-w-4 al-h-4 al-border-2 al-border-current al-border-t-transparent al-rounded-full al-animate-spin" }),
|
|
3689
3690
|
"Loading more..."
|
|
3690
3691
|
] })
|
|
@@ -3697,7 +3698,7 @@ const hf = ({
|
|
|
3697
3698
|
size: "sm",
|
|
3698
3699
|
variant: "outline",
|
|
3699
3700
|
className: "!al-h-8 al-w-full",
|
|
3700
|
-
onClick:
|
|
3701
|
+
onClick: b,
|
|
3701
3702
|
children: "Clear Selection"
|
|
3702
3703
|
}
|
|
3703
3704
|
) })
|
|
@@ -3798,13 +3799,13 @@ var ol = "TabsTrigger", sl = l.forwardRef(
|
|
|
3798
3799
|
id: u,
|
|
3799
3800
|
...o,
|
|
3800
3801
|
ref: r,
|
|
3801
|
-
onMouseDown:
|
|
3802
|
+
onMouseDown: X(e.onMouseDown, (m) => {
|
|
3802
3803
|
!a && m.button === 0 && m.ctrlKey === !1 ? s.onValueChange(n) : m.preventDefault();
|
|
3803
3804
|
}),
|
|
3804
|
-
onKeyDown:
|
|
3805
|
+
onKeyDown: X(e.onKeyDown, (m) => {
|
|
3805
3806
|
[" ", "Enter"].includes(m.key) && s.onValueChange(n);
|
|
3806
3807
|
}),
|
|
3807
|
-
onFocus:
|
|
3808
|
+
onFocus: X(e.onFocus, () => {
|
|
3808
3809
|
const m = s.activationMode !== "manual";
|
|
3809
3810
|
!p && !a && m && s.onValueChange(n);
|
|
3810
3811
|
})
|
|
@@ -3893,7 +3894,7 @@ const bf = nt("", {
|
|
|
3893
3894
|
dl,
|
|
3894
3895
|
{
|
|
3895
3896
|
ref: n,
|
|
3896
|
-
className:
|
|
3897
|
+
className: k(bf({ variant: r }), e),
|
|
3897
3898
|
...t
|
|
3898
3899
|
}
|
|
3899
3900
|
) })
|
|
@@ -3905,7 +3906,7 @@ const _f = l.forwardRef(({ className: e, ...r }, t) => {
|
|
|
3905
3906
|
fl,
|
|
3906
3907
|
{
|
|
3907
3908
|
ref: t,
|
|
3908
|
-
className:
|
|
3909
|
+
className: k(wf({ variant: n }), e),
|
|
3909
3910
|
...r
|
|
3910
3911
|
}
|
|
3911
3912
|
);
|
|
@@ -3917,7 +3918,7 @@ const Nf = l.forwardRef(({ className: e, ...r }, t) => {
|
|
|
3917
3918
|
pl,
|
|
3918
3919
|
{
|
|
3919
3920
|
ref: t,
|
|
3920
|
-
className:
|
|
3921
|
+
className: k(Sf({ variant: n }), e),
|
|
3921
3922
|
...r
|
|
3922
3923
|
}
|
|
3923
3924
|
);
|
|
@@ -3927,7 +3928,7 @@ const Ef = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
3927
3928
|
ml,
|
|
3928
3929
|
{
|
|
3929
3930
|
ref: t,
|
|
3930
|
-
className:
|
|
3931
|
+
className: k(
|
|
3931
3932
|
"al-mt-2 al-ring-offset-background focus-visible:al-outline-none focus-visible:al-ring-2 focus-visible:al-ring-ring focus-visible:al-ring-offset-2",
|
|
3932
3933
|
e
|
|
3933
3934
|
),
|
|
@@ -3935,13 +3936,13 @@ const Ef = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
3935
3936
|
}
|
|
3936
3937
|
));
|
|
3937
3938
|
Ef.displayName = ml.displayName;
|
|
3938
|
-
var Dt = (e) => e.type === "checkbox", Qe = (e) => e instanceof Date,
|
|
3939
|
+
var Dt = (e) => e.type === "checkbox", Qe = (e) => e instanceof Date, Ae = (e) => e == null;
|
|
3939
3940
|
const gl = (e) => typeof e == "object";
|
|
3940
|
-
var he = (e) => !
|
|
3941
|
+
var he = (e) => !Ae(e) && !Array.isArray(e) && gl(e) && !Qe(e), vl = (e) => he(e) && e.target ? Dt(e.target) ? e.target.checked : e.target.value : e, If = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, hl = (e, r) => e.has(If(r)), Af = (e) => {
|
|
3941
3942
|
const r = e.constructor && e.constructor.prototype;
|
|
3942
3943
|
return he(r) && r.hasOwnProperty("isPrototypeOf");
|
|
3943
3944
|
}, xn = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
3944
|
-
function
|
|
3945
|
+
function Se(e) {
|
|
3945
3946
|
let r;
|
|
3946
3947
|
const t = Array.isArray(e), n = typeof FileList < "u" ? e instanceof FileList : !1;
|
|
3947
3948
|
if (e instanceof Date)
|
|
@@ -3953,17 +3954,17 @@ function we(e) {
|
|
|
3953
3954
|
r = e;
|
|
3954
3955
|
else
|
|
3955
3956
|
for (const a in e)
|
|
3956
|
-
e.hasOwnProperty(a) && (r[a] =
|
|
3957
|
+
e.hasOwnProperty(a) && (r[a] = Se(e[a]));
|
|
3957
3958
|
else
|
|
3958
3959
|
return e;
|
|
3959
3960
|
return r;
|
|
3960
3961
|
}
|
|
3961
|
-
var ur = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ve = (e) => e === void 0,
|
|
3962
|
+
var ur = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ve = (e) => e === void 0, D = (e, r, t) => {
|
|
3962
3963
|
if (!r || !he(e))
|
|
3963
3964
|
return t;
|
|
3964
|
-
const n = ur(r.split(/[,[\].]+?/)).reduce((a, o) =>
|
|
3965
|
+
const n = ur(r.split(/[,[\].]+?/)).reduce((a, o) => Ae(a) ? a : a[o], e);
|
|
3965
3966
|
return ve(n) || n === e ? ve(e[r]) ? t : e[r] : n;
|
|
3966
|
-
},
|
|
3967
|
+
}, Me = (e) => typeof e == "boolean", yn = (e) => /^\w*$/.test(e), xl = (e) => ur(e.replace(/["|']|\]/g, "").split(/\.|\[/)), me = (e, r, t) => {
|
|
3967
3968
|
let n = -1;
|
|
3968
3969
|
const a = yn(r) ? [r] : xl(r), o = a.length, s = o - 1;
|
|
3969
3970
|
for (; ++n < o; ) {
|
|
@@ -3996,9 +3997,9 @@ const Ht = {
|
|
|
3996
3997
|
pattern: "pattern",
|
|
3997
3998
|
required: "required",
|
|
3998
3999
|
validate: "validate"
|
|
3999
|
-
}, yl =
|
|
4000
|
+
}, yl = Q.createContext(null), dr = () => Q.useContext(yl), Rf = (e) => {
|
|
4000
4001
|
const { children: r, ...t } = e;
|
|
4001
|
-
return
|
|
4002
|
+
return Q.createElement(yl.Provider, { value: t }, r);
|
|
4002
4003
|
};
|
|
4003
4004
|
var bl = (e, r, t, n = !0) => {
|
|
4004
4005
|
const a = {
|
|
@@ -4015,7 +4016,7 @@ var bl = (e, r, t, n = !0) => {
|
|
|
4015
4016
|
};
|
|
4016
4017
|
const bn = typeof window < "u" ? l.useLayoutEffect : l.useEffect;
|
|
4017
4018
|
function Tf(e) {
|
|
4018
|
-
const r = dr(), { control: t = r.control, disabled: n, name: a, exact: o } = e || {}, [s, i] =
|
|
4019
|
+
const r = dr(), { control: t = r.control, disabled: n, name: a, exact: o } = e || {}, [s, i] = Q.useState(t._formState), u = Q.useRef({
|
|
4019
4020
|
isDirty: !1,
|
|
4020
4021
|
isLoading: !1,
|
|
4021
4022
|
dirtyFields: !1,
|
|
@@ -4035,13 +4036,13 @@ function Tf(e) {
|
|
|
4035
4036
|
...f
|
|
4036
4037
|
});
|
|
4037
4038
|
}
|
|
4038
|
-
}), [a, n, o]),
|
|
4039
|
+
}), [a, n, o]), Q.useEffect(() => {
|
|
4039
4040
|
u.current.isValid && t._setValid(!0);
|
|
4040
|
-
}, [t]),
|
|
4041
|
+
}, [t]), Q.useMemo(() => bl(s, t, u.current, !1), [s, t]);
|
|
4041
4042
|
}
|
|
4042
|
-
var Ve = (e) => typeof e == "string", wl = (e, r, t, n, a) => Ve(e) ? (n && r.watch.add(e),
|
|
4043
|
+
var Ve = (e) => typeof e == "string", wl = (e, r, t, n, a) => Ve(e) ? (n && r.watch.add(e), D(t, e, a)) : Array.isArray(e) ? e.map((o) => (n && r.watch.add(o), D(t, o))) : (n && (r.watchAll = !0), t);
|
|
4043
4044
|
function Mf(e) {
|
|
4044
|
-
const r = dr(), { control: t = r.control, name: n, defaultValue: a, disabled: o, exact: s } = e || {}, i =
|
|
4045
|
+
const r = dr(), { control: t = r.control, name: n, defaultValue: a, disabled: o, exact: s } = e || {}, i = Q.useRef(a), [u, f] = Q.useState(t._getWatch(n, i.current));
|
|
4045
4046
|
return bn(() => t._subscribe({
|
|
4046
4047
|
name: n,
|
|
4047
4048
|
formState: {
|
|
@@ -4049,94 +4050,94 @@ function Mf(e) {
|
|
|
4049
4050
|
},
|
|
4050
4051
|
exact: s,
|
|
4051
4052
|
callback: (p) => !o && f(wl(n, t._names, p.values || t._formValues, !1, i.current))
|
|
4052
|
-
}), [n, t, o, s]),
|
|
4053
|
+
}), [n, t, o, s]), Q.useEffect(() => t._removeUnmounted()), u;
|
|
4053
4054
|
}
|
|
4054
4055
|
function Df(e) {
|
|
4055
4056
|
const r = dr(), { name: t, disabled: n, control: a = r.control, shouldUnregister: o } = e, s = hl(a._names.array, t), i = Mf({
|
|
4056
4057
|
control: a,
|
|
4057
4058
|
name: t,
|
|
4058
|
-
defaultValue:
|
|
4059
|
+
defaultValue: D(a._formValues, t, D(a._defaultValues, t, e.defaultValue)),
|
|
4059
4060
|
exact: !0
|
|
4060
4061
|
}), u = Tf({
|
|
4061
4062
|
control: a,
|
|
4062
4063
|
name: t,
|
|
4063
4064
|
exact: !0
|
|
4064
|
-
}), f =
|
|
4065
|
+
}), f = Q.useRef(e), p = Q.useRef(a.register(t, {
|
|
4065
4066
|
...e.rules,
|
|
4066
4067
|
value: i,
|
|
4067
|
-
...
|
|
4068
|
-
})), m =
|
|
4068
|
+
...Me(e.disabled) ? { disabled: e.disabled } : {}
|
|
4069
|
+
})), m = Q.useMemo(() => Object.defineProperties({}, {
|
|
4069
4070
|
invalid: {
|
|
4070
4071
|
enumerable: !0,
|
|
4071
|
-
get: () => !!
|
|
4072
|
+
get: () => !!D(u.errors, t)
|
|
4072
4073
|
},
|
|
4073
4074
|
isDirty: {
|
|
4074
4075
|
enumerable: !0,
|
|
4075
|
-
get: () => !!
|
|
4076
|
+
get: () => !!D(u.dirtyFields, t)
|
|
4076
4077
|
},
|
|
4077
4078
|
isTouched: {
|
|
4078
4079
|
enumerable: !0,
|
|
4079
|
-
get: () => !!
|
|
4080
|
+
get: () => !!D(u.touchedFields, t)
|
|
4080
4081
|
},
|
|
4081
4082
|
isValidating: {
|
|
4082
4083
|
enumerable: !0,
|
|
4083
|
-
get: () => !!
|
|
4084
|
+
get: () => !!D(u.validatingFields, t)
|
|
4084
4085
|
},
|
|
4085
4086
|
error: {
|
|
4086
4087
|
enumerable: !0,
|
|
4087
|
-
get: () =>
|
|
4088
|
+
get: () => D(u.errors, t)
|
|
4088
4089
|
}
|
|
4089
|
-
}), [u, t]), g =
|
|
4090
|
+
}), [u, t]), g = Q.useCallback((_) => p.current.onChange({
|
|
4090
4091
|
target: {
|
|
4091
4092
|
value: vl(_),
|
|
4092
4093
|
name: t
|
|
4093
4094
|
},
|
|
4094
4095
|
type: Ht.CHANGE
|
|
4095
|
-
}), [t]), w =
|
|
4096
|
+
}), [t]), w = Q.useCallback(() => p.current.onBlur({
|
|
4096
4097
|
target: {
|
|
4097
|
-
value:
|
|
4098
|
+
value: D(a._formValues, t),
|
|
4098
4099
|
name: t
|
|
4099
4100
|
},
|
|
4100
4101
|
type: Ht.BLUR
|
|
4101
|
-
}), [t, a._formValues]), C =
|
|
4102
|
-
const
|
|
4103
|
-
|
|
4102
|
+
}), [t, a._formValues]), C = Q.useCallback((_) => {
|
|
4103
|
+
const A = D(a._fields, t);
|
|
4104
|
+
A && _ && (A._f.ref = {
|
|
4104
4105
|
focus: () => _.focus(),
|
|
4105
4106
|
select: () => _.select(),
|
|
4106
4107
|
setCustomValidity: (y) => _.setCustomValidity(y),
|
|
4107
4108
|
reportValidity: () => _.reportValidity()
|
|
4108
4109
|
});
|
|
4109
|
-
}, [a._fields, t]), h =
|
|
4110
|
+
}, [a._fields, t]), h = Q.useMemo(() => ({
|
|
4110
4111
|
name: t,
|
|
4111
4112
|
value: i,
|
|
4112
|
-
...
|
|
4113
|
+
...Me(n) || u.disabled ? { disabled: u.disabled || n } : {},
|
|
4113
4114
|
onChange: g,
|
|
4114
4115
|
onBlur: w,
|
|
4115
4116
|
ref: C
|
|
4116
4117
|
}), [t, n, u.disabled, g, w, C, i]);
|
|
4117
|
-
return
|
|
4118
|
+
return Q.useEffect(() => {
|
|
4118
4119
|
const _ = a._options.shouldUnregister || o;
|
|
4119
4120
|
a.register(t, {
|
|
4120
4121
|
...f.current.rules,
|
|
4121
|
-
...
|
|
4122
|
+
...Me(f.current.disabled) ? { disabled: f.current.disabled } : {}
|
|
4122
4123
|
});
|
|
4123
|
-
const
|
|
4124
|
-
const
|
|
4125
|
-
|
|
4124
|
+
const A = (y, R) => {
|
|
4125
|
+
const ee = D(a._fields, y);
|
|
4126
|
+
ee && ee._f && (ee._f.mount = R);
|
|
4126
4127
|
};
|
|
4127
|
-
if (
|
|
4128
|
-
const y =
|
|
4129
|
-
me(a._defaultValues, t, y), ve(
|
|
4128
|
+
if (A(t, !0), _) {
|
|
4129
|
+
const y = Se(D(a._options.defaultValues, t));
|
|
4130
|
+
me(a._defaultValues, t, y), ve(D(a._formValues, t)) && me(a._formValues, t, y);
|
|
4130
4131
|
}
|
|
4131
4132
|
return !s && a.register(t), () => {
|
|
4132
|
-
(s ? _ && !a._state.action : _) ? a.unregister(t) :
|
|
4133
|
+
(s ? _ && !a._state.action : _) ? a.unregister(t) : A(t, !1);
|
|
4133
4134
|
};
|
|
4134
|
-
}, [t, a, s, o]),
|
|
4135
|
+
}, [t, a, s, o]), Q.useEffect(() => {
|
|
4135
4136
|
a._setDisabledField({
|
|
4136
4137
|
disabled: n,
|
|
4137
4138
|
name: t
|
|
4138
4139
|
});
|
|
4139
|
-
}, [n, t, a]),
|
|
4140
|
+
}, [n, t, a]), Q.useMemo(() => ({
|
|
4140
4141
|
field: h,
|
|
4141
4142
|
formState: u,
|
|
4142
4143
|
fieldState: m
|
|
@@ -4168,7 +4169,7 @@ var jf = (e, r, t, n, a) => r ? {
|
|
|
4168
4169
|
e = [];
|
|
4169
4170
|
}
|
|
4170
4171
|
};
|
|
4171
|
-
}, Fr = (e) =>
|
|
4172
|
+
}, Fr = (e) => Ae(e) || !gl(e);
|
|
4172
4173
|
function We(e, r) {
|
|
4173
4174
|
if (Fr(e) || Fr(r))
|
|
4174
4175
|
return e === r;
|
|
@@ -4189,7 +4190,7 @@ function We(e, r) {
|
|
|
4189
4190
|
}
|
|
4190
4191
|
return !0;
|
|
4191
4192
|
}
|
|
4192
|
-
var
|
|
4193
|
+
var Ie = (e) => he(e) && !Object.keys(e).length, wn = (e) => e.type === "file", Oe = (e) => typeof e == "function", Gt = (e) => {
|
|
4193
4194
|
if (!xn)
|
|
4194
4195
|
return !1;
|
|
4195
4196
|
const r = e ? e.ownerDocument : 0;
|
|
@@ -4210,7 +4211,7 @@ function Vf(e) {
|
|
|
4210
4211
|
}
|
|
4211
4212
|
function ye(e, r) {
|
|
4212
4213
|
const t = Array.isArray(r) ? r : yn(r) ? [r] : xl(r), n = t.length === 1 ? e : kf(e, t), a = t.length - 1, o = t[a];
|
|
4213
|
-
return n && delete n[o], a !== 0 && (he(n) &&
|
|
4214
|
+
return n && delete n[o], a !== 0 && (he(n) && Ie(n) || Array.isArray(n) && Vf(n)) && ye(e, t.slice(0, -1)), e;
|
|
4214
4215
|
}
|
|
4215
4216
|
var Cl = (e) => {
|
|
4216
4217
|
for (const r in e)
|
|
@@ -4222,14 +4223,14 @@ function Kt(e, r = {}) {
|
|
|
4222
4223
|
const t = Array.isArray(e);
|
|
4223
4224
|
if (he(e) || t)
|
|
4224
4225
|
for (const n in e)
|
|
4225
|
-
Array.isArray(e[n]) || he(e[n]) && !Cl(e[n]) ? (r[n] = Array.isArray(e[n]) ? [] : {}, Kt(e[n], r[n])) :
|
|
4226
|
+
Array.isArray(e[n]) || he(e[n]) && !Cl(e[n]) ? (r[n] = Array.isArray(e[n]) ? [] : {}, Kt(e[n], r[n])) : Ae(e[n]) || (r[n] = !0);
|
|
4226
4227
|
return r;
|
|
4227
4228
|
}
|
|
4228
4229
|
function _l(e, r, t) {
|
|
4229
4230
|
const n = Array.isArray(e);
|
|
4230
4231
|
if (he(e) || n)
|
|
4231
4232
|
for (const a in e)
|
|
4232
|
-
Array.isArray(e[a]) || he(e[a]) && !Cl(e[a]) ? ve(r) || Fr(t[a]) ? t[a] = Array.isArray(e[a]) ? Kt(e[a], []) : { ...Kt(e[a]) } : _l(e[a],
|
|
4233
|
+
Array.isArray(e[a]) || he(e[a]) && !Cl(e[a]) ? ve(r) || Fr(t[a]) ? t[a] = Array.isArray(e[a]) ? Kt(e[a], []) : { ...Kt(e[a]) } : _l(e[a], Ae(r) ? {} : r[a], t[a]) : t[a] = !We(e[a], r[a]);
|
|
4233
4234
|
return t;
|
|
4234
4235
|
}
|
|
4235
4236
|
var gt = (e, r) => _l(e, r, Kt(r));
|
|
@@ -4265,7 +4266,7 @@ function Kn(e) {
|
|
|
4265
4266
|
var Ff = (e, r, t, n) => {
|
|
4266
4267
|
const a = {};
|
|
4267
4268
|
for (const o of e) {
|
|
4268
|
-
const s =
|
|
4269
|
+
const s = D(r, o);
|
|
4269
4270
|
s && me(a, o, s._f);
|
|
4270
4271
|
}
|
|
4271
4272
|
return {
|
|
@@ -4285,7 +4286,7 @@ const zn = "AsyncFunction";
|
|
|
4285
4286
|
var $f = (e) => !!e && !!e.validate && !!(Oe(e.validate) && e.validate.constructor.name === zn || he(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === zn)), Lf = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), qn = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
|
|
4286
4287
|
const wt = (e, r, t, n) => {
|
|
4287
4288
|
for (const a of t || Object.keys(e)) {
|
|
4288
|
-
const o =
|
|
4289
|
+
const o = D(e, a);
|
|
4289
4290
|
if (o) {
|
|
4290
4291
|
const { _f: s, ...i } = o;
|
|
4291
4292
|
if (s) {
|
|
@@ -4301,7 +4302,7 @@ const wt = (e, r, t, n) => {
|
|
|
4301
4302
|
}
|
|
4302
4303
|
};
|
|
4303
4304
|
function Yn(e, r, t) {
|
|
4304
|
-
const n =
|
|
4305
|
+
const n = D(e, t);
|
|
4305
4306
|
if (n || yn(t))
|
|
4306
4307
|
return {
|
|
4307
4308
|
error: n,
|
|
@@ -4309,7 +4310,7 @@ function Yn(e, r, t) {
|
|
|
4309
4310
|
};
|
|
4310
4311
|
const a = t.split(".");
|
|
4311
4312
|
for (; a.length; ) {
|
|
4312
|
-
const o = a.join("."), s =
|
|
4313
|
+
const o = a.join("."), s = D(r, o), i = D(e, o);
|
|
4313
4314
|
if (s && !Array.isArray(s) && t !== o)
|
|
4314
4315
|
return { name: t };
|
|
4315
4316
|
if (i && i.type)
|
|
@@ -4326,13 +4327,13 @@ function Yn(e, r, t) {
|
|
|
4326
4327
|
var Uf = (e, r, t, n) => {
|
|
4327
4328
|
t(e);
|
|
4328
4329
|
const { name: a, ...o } = e;
|
|
4329
|
-
return
|
|
4330
|
-
}, Bf = (e, r, t) => !e || !r || e === r || bt(e).some((n) => n && (t ? n === r : n.startsWith(r) || r.startsWith(n))), Hf = (e, r, t, n, a) => a.isOnAll ? !1 : !t && a.isOnTouch ? !(r || e) : (t ? n.isOnBlur : a.isOnBlur) ? !e : (t ? n.isOnChange : a.isOnChange) ? e : !0, Gf = (e, r) => !ur(
|
|
4331
|
-
const n = bt(
|
|
4330
|
+
return Ie(o) || Object.keys(o).length >= Object.keys(r).length || Object.keys(o).find((s) => r[s] === (!n || je.all));
|
|
4331
|
+
}, Bf = (e, r, t) => !e || !r || e === r || bt(e).some((n) => n && (t ? n === r : n.startsWith(r) || r.startsWith(n))), Hf = (e, r, t, n, a) => a.isOnAll ? !1 : !t && a.isOnTouch ? !(r || e) : (t ? n.isOnBlur : a.isOnBlur) ? !e : (t ? n.isOnChange : a.isOnChange) ? e : !0, Gf = (e, r) => !ur(D(e, r)).length && ye(e, r), Kf = (e, r, t) => {
|
|
4332
|
+
const n = bt(D(e, t));
|
|
4332
4333
|
return me(n, "root", r[t]), me(e, t, n), e;
|
|
4333
4334
|
}, Vt = (e) => Ve(e);
|
|
4334
4335
|
function Xn(e, r, t = "validate") {
|
|
4335
|
-
if (Vt(e) || Array.isArray(e) && e.every(Vt) ||
|
|
4336
|
+
if (Vt(e) || Array.isArray(e) && e.every(Vt) || Me(e) && !e)
|
|
4336
4337
|
return {
|
|
4337
4338
|
type: t,
|
|
4338
4339
|
message: Vt(e) ? e : "",
|
|
@@ -4343,85 +4344,85 @@ var it = (e) => he(e) && !Wt(e) ? e : {
|
|
|
4343
4344
|
value: e,
|
|
4344
4345
|
message: ""
|
|
4345
4346
|
}, Zn = async (e, r, t, n, a, o) => {
|
|
4346
|
-
const { ref: s, refs: i, required: u, maxLength: f, minLength: p, min: m, max: g, pattern: w, validate: C, name: h, valueAsNumber: _, mount:
|
|
4347
|
-
if (!
|
|
4347
|
+
const { ref: s, refs: i, required: u, maxLength: f, minLength: p, min: m, max: g, pattern: w, validate: C, name: h, valueAsNumber: _, mount: A } = e._f, y = D(t, h);
|
|
4348
|
+
if (!A || r.has(h))
|
|
4348
4349
|
return {};
|
|
4349
|
-
const
|
|
4350
|
-
a &&
|
|
4351
|
-
},
|
|
4352
|
-
const
|
|
4353
|
-
|
|
4354
|
-
type: F ? te :
|
|
4355
|
-
message:
|
|
4350
|
+
const R = i ? i[0] : s, ee = (F) => {
|
|
4351
|
+
a && R.reportValidity && (R.setCustomValidity(Me(F) ? "" : F || ""), R.reportValidity());
|
|
4352
|
+
}, H = {}, Z = Sn(s), T = Dt(s), le = Z || T, W = (_ || wn(s)) && ve(s.value) && ve(y) || Gt(s) && s.value === "" || y === "" || Array.isArray(y) && !y.length, Y = jf.bind(null, h, n, H), ce = (F, G, z, te = Le.maxLength, J = Le.minLength) => {
|
|
4353
|
+
const ie = F ? G : z;
|
|
4354
|
+
H[h] = {
|
|
4355
|
+
type: F ? te : J,
|
|
4356
|
+
message: ie,
|
|
4356
4357
|
ref: s,
|
|
4357
|
-
...
|
|
4358
|
+
...Y(F ? te : J, ie)
|
|
4358
4359
|
};
|
|
4359
4360
|
};
|
|
4360
|
-
if (o ? !Array.isArray(y) || !y.length : u && (!
|
|
4361
|
-
const { value: F, message:
|
|
4362
|
-
if (F && (
|
|
4361
|
+
if (o ? !Array.isArray(y) || !y.length : u && (!le && (W || Ae(y)) || Me(y) && !y || T && !Nl(i).isValid || Z && !Il(i).isValid)) {
|
|
4362
|
+
const { value: F, message: G } = Vt(u) ? { value: !!u, message: u } : it(u);
|
|
4363
|
+
if (F && (H[h] = {
|
|
4363
4364
|
type: Le.required,
|
|
4364
|
-
message:
|
|
4365
|
-
ref:
|
|
4366
|
-
...
|
|
4365
|
+
message: G,
|
|
4366
|
+
ref: R,
|
|
4367
|
+
...Y(Le.required, G)
|
|
4367
4368
|
}, !n))
|
|
4368
|
-
return
|
|
4369
|
-
}
|
|
4370
|
-
if (!
|
|
4371
|
-
let F,
|
|
4372
|
-
const
|
|
4373
|
-
if (!
|
|
4374
|
-
const
|
|
4375
|
-
|
|
4369
|
+
return ee(G), H;
|
|
4370
|
+
}
|
|
4371
|
+
if (!W && (!Ae(m) || !Ae(g))) {
|
|
4372
|
+
let F, G;
|
|
4373
|
+
const z = it(g), te = it(m);
|
|
4374
|
+
if (!Ae(y) && !isNaN(y)) {
|
|
4375
|
+
const J = s.valueAsNumber || y && +y;
|
|
4376
|
+
Ae(z.value) || (F = J > z.value), Ae(te.value) || (G = J < te.value);
|
|
4376
4377
|
} else {
|
|
4377
|
-
const
|
|
4378
|
-
Ve(
|
|
4378
|
+
const J = s.valueAsDate || new Date(y), ie = (oe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + oe), ue = s.type == "time", V = s.type == "week";
|
|
4379
|
+
Ve(z.value) && y && (F = ue ? ie(y) > ie(z.value) : V ? y > z.value : J > new Date(z.value)), Ve(te.value) && y && (G = ue ? ie(y) < ie(te.value) : V ? y < te.value : J < new Date(te.value));
|
|
4379
4380
|
}
|
|
4380
|
-
if ((F ||
|
|
4381
|
-
return
|
|
4381
|
+
if ((F || G) && (ce(!!F, z.message, te.message, Le.max, Le.min), !n))
|
|
4382
|
+
return ee(H[h].message), H;
|
|
4382
4383
|
}
|
|
4383
|
-
if ((f || p) && !
|
|
4384
|
-
const F = it(f),
|
|
4385
|
-
if ((
|
|
4386
|
-
return
|
|
4384
|
+
if ((f || p) && !W && (Ve(y) || o && Array.isArray(y))) {
|
|
4385
|
+
const F = it(f), G = it(p), z = !Ae(F.value) && y.length > +F.value, te = !Ae(G.value) && y.length < +G.value;
|
|
4386
|
+
if ((z || te) && (ce(z, F.message, G.message), !n))
|
|
4387
|
+
return ee(H[h].message), H;
|
|
4387
4388
|
}
|
|
4388
|
-
if (w && !
|
|
4389
|
-
const { value: F, message:
|
|
4390
|
-
if (Wt(F) && !y.match(F) && (
|
|
4389
|
+
if (w && !W && Ve(y)) {
|
|
4390
|
+
const { value: F, message: G } = it(w);
|
|
4391
|
+
if (Wt(F) && !y.match(F) && (H[h] = {
|
|
4391
4392
|
type: Le.pattern,
|
|
4392
|
-
message:
|
|
4393
|
+
message: G,
|
|
4393
4394
|
ref: s,
|
|
4394
|
-
...
|
|
4395
|
+
...Y(Le.pattern, G)
|
|
4395
4396
|
}, !n))
|
|
4396
|
-
return
|
|
4397
|
+
return ee(G), H;
|
|
4397
4398
|
}
|
|
4398
4399
|
if (C) {
|
|
4399
4400
|
if (Oe(C)) {
|
|
4400
|
-
const F = await C(y, t),
|
|
4401
|
-
if (
|
|
4402
|
-
...
|
|
4403
|
-
...
|
|
4401
|
+
const F = await C(y, t), G = Xn(F, R);
|
|
4402
|
+
if (G && (H[h] = {
|
|
4403
|
+
...G,
|
|
4404
|
+
...Y(Le.validate, G.message)
|
|
4404
4405
|
}, !n))
|
|
4405
|
-
return
|
|
4406
|
+
return ee(G.message), H;
|
|
4406
4407
|
} else if (he(C)) {
|
|
4407
4408
|
let F = {};
|
|
4408
|
-
for (const
|
|
4409
|
-
if (!
|
|
4409
|
+
for (const G in C) {
|
|
4410
|
+
if (!Ie(F) && !n)
|
|
4410
4411
|
break;
|
|
4411
|
-
const
|
|
4412
|
-
|
|
4413
|
-
...
|
|
4414
|
-
...
|
|
4415
|
-
},
|
|
4412
|
+
const z = Xn(await C[G](y, t), R, G);
|
|
4413
|
+
z && (F = {
|
|
4414
|
+
...z,
|
|
4415
|
+
...Y(G, z.message)
|
|
4416
|
+
}, ee(z.message), n && (H[h] = F));
|
|
4416
4417
|
}
|
|
4417
|
-
if (!
|
|
4418
|
-
ref:
|
|
4418
|
+
if (!Ie(F) && (H[h] = {
|
|
4419
|
+
ref: R,
|
|
4419
4420
|
...F
|
|
4420
4421
|
}, !n))
|
|
4421
|
-
return
|
|
4422
|
+
return H;
|
|
4422
4423
|
}
|
|
4423
4424
|
}
|
|
4424
|
-
return
|
|
4425
|
+
return ee(!0), H;
|
|
4425
4426
|
};
|
|
4426
4427
|
const Wf = {
|
|
4427
4428
|
mode: je.onSubmit,
|
|
@@ -4449,7 +4450,7 @@ function zf(e = {}) {
|
|
|
4449
4450
|
disabled: r.disabled || !1
|
|
4450
4451
|
};
|
|
4451
4452
|
const n = {};
|
|
4452
|
-
let a = he(r.defaultValues) || he(r.values) ?
|
|
4453
|
+
let a = he(r.defaultValues) || he(r.values) ? Se(r.defaultValues || r.values) || {} : {}, o = r.shouldUnregister ? {} : Se(a), s = {
|
|
4453
4454
|
action: !1,
|
|
4454
4455
|
mount: !1,
|
|
4455
4456
|
watch: !1
|
|
@@ -4479,7 +4480,7 @@ function zf(e = {}) {
|
|
|
4479
4480
|
clearTimeout(f), f = setTimeout(d, v);
|
|
4480
4481
|
}, h = async (d) => {
|
|
4481
4482
|
if (!r.disabled && (p.isValid || m.isValid || d)) {
|
|
4482
|
-
const v = r.resolver ?
|
|
4483
|
+
const v = r.resolver ? Ie((await T()).errors) : await W(n, !0);
|
|
4483
4484
|
v !== t.isValid && g.state.next({
|
|
4484
4485
|
isValid: v
|
|
4485
4486
|
});
|
|
@@ -4489,25 +4490,25 @@ function zf(e = {}) {
|
|
|
4489
4490
|
b && (v ? me(t.validatingFields, b, v) : ye(t.validatingFields, b));
|
|
4490
4491
|
}), g.state.next({
|
|
4491
4492
|
validatingFields: t.validatingFields,
|
|
4492
|
-
isValidating: !
|
|
4493
|
+
isValidating: !Ie(t.validatingFields)
|
|
4493
4494
|
}));
|
|
4494
|
-
},
|
|
4495
|
-
if (
|
|
4496
|
-
if (s.action = !0,
|
|
4497
|
-
const
|
|
4498
|
-
|
|
4495
|
+
}, A = (d, v = [], b, M, I = !0, x = !0) => {
|
|
4496
|
+
if (M && b && !r.disabled) {
|
|
4497
|
+
if (s.action = !0, x && Array.isArray(D(n, d))) {
|
|
4498
|
+
const P = b(D(n, d), M.argA, M.argB);
|
|
4499
|
+
I && me(n, d, P);
|
|
4499
4500
|
}
|
|
4500
|
-
if (
|
|
4501
|
-
const
|
|
4502
|
-
|
|
4501
|
+
if (x && Array.isArray(D(t.errors, d))) {
|
|
4502
|
+
const P = b(D(t.errors, d), M.argA, M.argB);
|
|
4503
|
+
I && me(t.errors, d, P), Gf(t.errors, d);
|
|
4503
4504
|
}
|
|
4504
|
-
if ((p.touchedFields || m.touchedFields) &&
|
|
4505
|
-
const
|
|
4506
|
-
|
|
4505
|
+
if ((p.touchedFields || m.touchedFields) && x && Array.isArray(D(t.touchedFields, d))) {
|
|
4506
|
+
const P = b(D(t.touchedFields, d), M.argA, M.argB);
|
|
4507
|
+
I && me(t.touchedFields, d, P);
|
|
4507
4508
|
}
|
|
4508
4509
|
(p.dirtyFields || m.dirtyFields) && (t.dirtyFields = gt(a, o)), g.state.next({
|
|
4509
4510
|
name: d,
|
|
4510
|
-
isDirty:
|
|
4511
|
+
isDirty: ce(d, v),
|
|
4511
4512
|
dirtyFields: t.dirtyFields,
|
|
4512
4513
|
errors: t.errors,
|
|
4513
4514
|
isValid: t.isValid
|
|
@@ -4518,198 +4519,198 @@ function zf(e = {}) {
|
|
|
4518
4519
|
me(t.errors, d, v), g.state.next({
|
|
4519
4520
|
errors: t.errors
|
|
4520
4521
|
});
|
|
4521
|
-
},
|
|
4522
|
+
}, R = (d) => {
|
|
4522
4523
|
t.errors = d, g.state.next({
|
|
4523
4524
|
errors: t.errors,
|
|
4524
4525
|
isValid: !1
|
|
4525
4526
|
});
|
|
4526
|
-
},
|
|
4527
|
-
const
|
|
4528
|
-
if (
|
|
4529
|
-
const
|
|
4530
|
-
ve(
|
|
4527
|
+
}, ee = (d, v, b, M) => {
|
|
4528
|
+
const I = D(n, d);
|
|
4529
|
+
if (I) {
|
|
4530
|
+
const x = D(o, d, ve(b) ? D(a, d) : b);
|
|
4531
|
+
ve(x) || M && M.defaultChecked || v ? me(o, d, v ? x : Kn(I._f)) : z(d, x), s.mount && h();
|
|
4531
4532
|
}
|
|
4532
|
-
},
|
|
4533
|
-
let
|
|
4534
|
-
const
|
|
4533
|
+
}, H = (d, v, b, M, I) => {
|
|
4534
|
+
let x = !1, P = !1;
|
|
4535
|
+
const ae = {
|
|
4535
4536
|
name: d
|
|
4536
4537
|
};
|
|
4537
4538
|
if (!r.disabled) {
|
|
4538
|
-
if (!b ||
|
|
4539
|
-
(p.isDirty || m.isDirty) && (
|
|
4540
|
-
const
|
|
4541
|
-
|
|
4539
|
+
if (!b || M) {
|
|
4540
|
+
(p.isDirty || m.isDirty) && (P = t.isDirty, t.isDirty = ae.isDirty = ce(), x = P !== ae.isDirty);
|
|
4541
|
+
const fe = We(D(a, d), v);
|
|
4542
|
+
P = !!D(t.dirtyFields, d), fe ? ye(t.dirtyFields, d) : me(t.dirtyFields, d, !0), ae.dirtyFields = t.dirtyFields, x = x || (p.dirtyFields || m.dirtyFields) && P !== !fe;
|
|
4542
4543
|
}
|
|
4543
4544
|
if (b) {
|
|
4544
|
-
const
|
|
4545
|
-
|
|
4545
|
+
const fe = D(t.touchedFields, d);
|
|
4546
|
+
fe || (me(t.touchedFields, d, b), ae.touchedFields = t.touchedFields, x = x || (p.touchedFields || m.touchedFields) && fe !== b);
|
|
4546
4547
|
}
|
|
4547
|
-
|
|
4548
|
+
x && I && g.state.next(ae);
|
|
4548
4549
|
}
|
|
4549
|
-
return
|
|
4550
|
-
},
|
|
4551
|
-
const
|
|
4552
|
-
if (r.delayError && b ? (u = C(() => y(d, b)), u(r.delayError)) : (clearTimeout(f), u = null, b ? me(t.errors, d, b) : ye(t.errors, d)), (b ? !We(
|
|
4553
|
-
const
|
|
4554
|
-
...
|
|
4555
|
-
...
|
|
4550
|
+
return x ? ae : {};
|
|
4551
|
+
}, Z = (d, v, b, M) => {
|
|
4552
|
+
const I = D(t.errors, d), x = (p.isValid || m.isValid) && Me(v) && t.isValid !== v;
|
|
4553
|
+
if (r.delayError && b ? (u = C(() => y(d, b)), u(r.delayError)) : (clearTimeout(f), u = null, b ? me(t.errors, d, b) : ye(t.errors, d)), (b ? !We(I, b) : I) || !Ie(M) || x) {
|
|
4554
|
+
const P = {
|
|
4555
|
+
...M,
|
|
4556
|
+
...x && Me(v) ? { isValid: v } : {},
|
|
4556
4557
|
errors: t.errors,
|
|
4557
4558
|
name: d
|
|
4558
4559
|
};
|
|
4559
4560
|
t = {
|
|
4560
4561
|
...t,
|
|
4561
|
-
|
|
4562
|
-
}, g.state.next(
|
|
4562
|
+
...P
|
|
4563
|
+
}, g.state.next(P);
|
|
4563
4564
|
}
|
|
4564
|
-
},
|
|
4565
|
+
}, T = async (d) => {
|
|
4565
4566
|
_(d, !0);
|
|
4566
4567
|
const v = await r.resolver(o, r.context, Ff(d || i.mount, n, r.criteriaMode, r.shouldUseNativeValidation));
|
|
4567
4568
|
return _(d), v;
|
|
4568
|
-
},
|
|
4569
|
-
const { errors: v } = await
|
|
4569
|
+
}, le = async (d) => {
|
|
4570
|
+
const { errors: v } = await T(d);
|
|
4570
4571
|
if (d)
|
|
4571
4572
|
for (const b of d) {
|
|
4572
|
-
const
|
|
4573
|
-
|
|
4573
|
+
const M = D(v, b);
|
|
4574
|
+
M ? me(t.errors, b, M) : ye(t.errors, b);
|
|
4574
4575
|
}
|
|
4575
4576
|
else
|
|
4576
4577
|
t.errors = v;
|
|
4577
4578
|
return v;
|
|
4578
|
-
},
|
|
4579
|
+
}, W = async (d, v, b = {
|
|
4579
4580
|
valid: !0
|
|
4580
4581
|
}) => {
|
|
4581
|
-
for (const
|
|
4582
|
-
const
|
|
4583
|
-
if (
|
|
4584
|
-
const { _f:
|
|
4585
|
-
if (
|
|
4586
|
-
const
|
|
4587
|
-
|
|
4588
|
-
const
|
|
4589
|
-
if (
|
|
4582
|
+
for (const M in d) {
|
|
4583
|
+
const I = d[M];
|
|
4584
|
+
if (I) {
|
|
4585
|
+
const { _f: x, ...P } = I;
|
|
4586
|
+
if (x) {
|
|
4587
|
+
const ae = i.array.has(x.name), fe = I._f && $f(I._f);
|
|
4588
|
+
fe && p.validatingFields && _([M], !0);
|
|
4589
|
+
const Ee = await Zn(I, i.disabled, o, w, r.shouldUseNativeValidation && !v, ae);
|
|
4590
|
+
if (fe && p.validatingFields && _([M]), Ee[x.name] && (b.valid = !1, v))
|
|
4590
4591
|
break;
|
|
4591
|
-
!v && (
|
|
4592
|
+
!v && (D(Ee, x.name) ? ae ? Kf(t.errors, Ee, x.name) : me(t.errors, x.name, Ee[x.name]) : ye(t.errors, x.name));
|
|
4592
4593
|
}
|
|
4593
|
-
!
|
|
4594
|
+
!Ie(P) && await W(P, v, b);
|
|
4594
4595
|
}
|
|
4595
4596
|
}
|
|
4596
4597
|
return b.valid;
|
|
4597
|
-
},
|
|
4598
|
+
}, Y = () => {
|
|
4598
4599
|
for (const d of i.unMount) {
|
|
4599
|
-
const v =
|
|
4600
|
+
const v = D(n, d);
|
|
4600
4601
|
v && (v._f.refs ? v._f.refs.every((b) => !Cr(b)) : !Cr(v._f.ref)) && E(d);
|
|
4601
4602
|
}
|
|
4602
4603
|
i.unMount = /* @__PURE__ */ new Set();
|
|
4603
|
-
},
|
|
4604
|
+
}, ce = (d, v) => !r.disabled && (d && v && me(o, d, v), !We(oe(), a)), F = (d, v, b) => wl(d, i, {
|
|
4604
4605
|
...s.mount ? o : ve(v) ? a : Ve(d) ? { [d]: v } : v
|
|
4605
|
-
}, b, v),
|
|
4606
|
-
const
|
|
4607
|
-
let
|
|
4608
|
-
if (
|
|
4609
|
-
const
|
|
4610
|
-
|
|
4611
|
-
(
|
|
4612
|
-
}) :
|
|
4606
|
+
}, b, v), G = (d) => ur(D(s.mount ? o : a, d, r.shouldUnregister ? D(a, d, []) : [])), z = (d, v, b = {}) => {
|
|
4607
|
+
const M = D(n, d);
|
|
4608
|
+
let I = v;
|
|
4609
|
+
if (M) {
|
|
4610
|
+
const x = M._f;
|
|
4611
|
+
x && (!x.disabled && me(o, d, El(v, x)), I = Gt(x.ref) && Ae(v) ? "" : v, Sl(x.ref) ? [...x.ref.options].forEach((P) => P.selected = I.includes(P.value)) : x.refs ? Dt(x.ref) ? x.refs.forEach((P) => {
|
|
4612
|
+
(!P.defaultChecked || !P.disabled) && (Array.isArray(I) ? P.checked = !!I.find((ae) => ae === P.value) : P.checked = I === P.value || !!I);
|
|
4613
|
+
}) : x.refs.forEach((P) => P.checked = P.value === I) : wn(x.ref) ? x.ref.value = "" : (x.ref.value = I, x.ref.type || g.state.next({
|
|
4613
4614
|
name: d,
|
|
4614
|
-
values:
|
|
4615
|
+
values: Se(o)
|
|
4615
4616
|
})));
|
|
4616
4617
|
}
|
|
4617
|
-
(b.shouldDirty || b.shouldTouch) &&
|
|
4618
|
+
(b.shouldDirty || b.shouldTouch) && H(d, I, b.shouldTouch, b.shouldDirty, !0), b.shouldValidate && V(d);
|
|
4618
4619
|
}, te = (d, v, b) => {
|
|
4619
|
-
for (const
|
|
4620
|
-
if (!v.hasOwnProperty(
|
|
4620
|
+
for (const M in v) {
|
|
4621
|
+
if (!v.hasOwnProperty(M))
|
|
4621
4622
|
return;
|
|
4622
|
-
const
|
|
4623
|
-
(i.array.has(d) || he(
|
|
4623
|
+
const I = v[M], x = `${d}.${M}`, P = D(n, x);
|
|
4624
|
+
(i.array.has(d) || he(I) || P && !P._f) && !Qe(I) ? te(x, I, b) : z(x, I, b);
|
|
4624
4625
|
}
|
|
4625
|
-
},
|
|
4626
|
-
const
|
|
4627
|
-
me(o, d,
|
|
4626
|
+
}, J = (d, v, b = {}) => {
|
|
4627
|
+
const M = D(n, d), I = i.array.has(d), x = Se(v);
|
|
4628
|
+
me(o, d, x), I ? (g.array.next({
|
|
4628
4629
|
name: d,
|
|
4629
|
-
values:
|
|
4630
|
+
values: Se(o)
|
|
4630
4631
|
}), (p.isDirty || p.dirtyFields || m.isDirty || m.dirtyFields) && b.shouldDirty && g.state.next({
|
|
4631
4632
|
name: d,
|
|
4632
4633
|
dirtyFields: gt(a, o),
|
|
4633
|
-
isDirty:
|
|
4634
|
-
})) :
|
|
4634
|
+
isDirty: ce(d, x)
|
|
4635
|
+
})) : M && !M._f && !Ae(x) ? te(d, x, b) : z(d, x, b), qn(d, i) && g.state.next({ ...t }), g.state.next({
|
|
4635
4636
|
name: s.mount ? d : void 0,
|
|
4636
|
-
values:
|
|
4637
|
+
values: Se(o)
|
|
4637
4638
|
});
|
|
4638
|
-
},
|
|
4639
|
+
}, ie = async (d) => {
|
|
4639
4640
|
s.mount = !0;
|
|
4640
4641
|
const v = d.target;
|
|
4641
|
-
let b = v.name,
|
|
4642
|
-
const
|
|
4643
|
-
|
|
4644
|
-
},
|
|
4645
|
-
if (
|
|
4646
|
-
let
|
|
4647
|
-
const Pt = v.type ? Kn(
|
|
4648
|
-
me(o, b, Pt), Ge ? (
|
|
4649
|
-
const mr =
|
|
4642
|
+
let b = v.name, M = !0;
|
|
4643
|
+
const I = D(n, b), x = (fe) => {
|
|
4644
|
+
M = Number.isNaN(fe) || Qe(fe) && isNaN(fe.getTime()) || We(fe, D(o, b, fe));
|
|
4645
|
+
}, P = Wn(r.mode), ae = Wn(r.reValidateMode);
|
|
4646
|
+
if (I) {
|
|
4647
|
+
let fe, Ee;
|
|
4648
|
+
const Pt = v.type ? Kn(I._f) : vl(d), Ge = d.type === Ht.BLUR || d.type === Ht.FOCUS_OUT, ti = !Lf(I._f) && !r.resolver && !D(t.errors, b) && !I._f.deps || Hf(Ge, D(t.touchedFields, b), t.isSubmitted, ae, P), pr = qn(b, i, Ge);
|
|
4649
|
+
me(o, b, Pt), Ge ? (I._f.onBlur && I._f.onBlur(d), u && u(0)) : I._f.onChange && I._f.onChange(d);
|
|
4650
|
+
const mr = H(b, Pt, Ge), ri = !Ie(mr) || pr;
|
|
4650
4651
|
if (!Ge && g.state.next({
|
|
4651
4652
|
name: b,
|
|
4652
4653
|
type: d.type,
|
|
4653
|
-
values:
|
|
4654
|
+
values: Se(o)
|
|
4654
4655
|
}), ti)
|
|
4655
4656
|
return (p.isValid || m.isValid) && (r.mode === "onBlur" ? Ge && h() : Ge || h()), ri && g.state.next({ name: b, ...pr ? {} : mr });
|
|
4656
4657
|
if (!Ge && pr && g.state.next({ ...t }), r.resolver) {
|
|
4657
|
-
const { errors: En } = await
|
|
4658
|
-
if (
|
|
4658
|
+
const { errors: En } = await T([b]);
|
|
4659
|
+
if (x(Pt), M) {
|
|
4659
4660
|
const ni = Yn(t.errors, n, b), In = Yn(En, n, ni.name || b);
|
|
4660
|
-
|
|
4661
|
+
fe = In.error, b = In.name, Ee = Ie(En);
|
|
4661
4662
|
}
|
|
4662
4663
|
} else
|
|
4663
|
-
_([b], !0),
|
|
4664
|
-
|
|
4664
|
+
_([b], !0), fe = (await Zn(I, i.disabled, o, w, r.shouldUseNativeValidation))[b], _([b]), x(Pt), M && (fe ? Ee = !1 : (p.isValid || m.isValid) && (Ee = await W(n, !0)));
|
|
4665
|
+
M && (I._f.deps && V(I._f.deps), Z(b, Ee, fe, mr));
|
|
4665
4666
|
}
|
|
4666
4667
|
}, ue = (d, v) => {
|
|
4667
|
-
if (
|
|
4668
|
+
if (D(t.errors, v) && d.focus)
|
|
4668
4669
|
return d.focus(), 1;
|
|
4669
|
-
},
|
|
4670
|
-
let b,
|
|
4671
|
-
const
|
|
4670
|
+
}, V = async (d, v = {}) => {
|
|
4671
|
+
let b, M;
|
|
4672
|
+
const I = bt(d);
|
|
4672
4673
|
if (r.resolver) {
|
|
4673
|
-
const
|
|
4674
|
-
b =
|
|
4675
|
-
} else d ? (
|
|
4676
|
-
const
|
|
4677
|
-
return await
|
|
4678
|
-
}))).every(Boolean), !(!
|
|
4674
|
+
const x = await le(ve(d) ? d : I);
|
|
4675
|
+
b = Ie(x), M = d ? !I.some((P) => D(x, P)) : b;
|
|
4676
|
+
} else d ? (M = (await Promise.all(I.map(async (x) => {
|
|
4677
|
+
const P = D(n, x);
|
|
4678
|
+
return await W(P && P._f ? { [x]: P } : P);
|
|
4679
|
+
}))).every(Boolean), !(!M && !t.isValid) && h()) : M = b = await W(n);
|
|
4679
4680
|
return g.state.next({
|
|
4680
4681
|
...!Ve(d) || (p.isValid || m.isValid) && b !== t.isValid ? {} : { name: d },
|
|
4681
4682
|
...r.resolver || !d ? { isValid: b } : {},
|
|
4682
4683
|
errors: t.errors
|
|
4683
|
-
}), v.shouldFocus && !
|
|
4684
|
-
},
|
|
4684
|
+
}), v.shouldFocus && !M && wt(n, ue, d ? I : i.mount), M;
|
|
4685
|
+
}, oe = (d) => {
|
|
4685
4686
|
const v = {
|
|
4686
4687
|
...s.mount ? o : a
|
|
4687
4688
|
};
|
|
4688
|
-
return ve(d) ? v : Ve(d) ?
|
|
4689
|
-
},
|
|
4690
|
-
invalid: !!
|
|
4691
|
-
isDirty: !!
|
|
4692
|
-
error:
|
|
4693
|
-
isValidating: !!
|
|
4694
|
-
isTouched: !!
|
|
4689
|
+
return ve(d) ? v : Ve(d) ? D(v, d) : d.map((b) => D(v, b));
|
|
4690
|
+
}, de = (d, v) => ({
|
|
4691
|
+
invalid: !!D((v || t).errors, d),
|
|
4692
|
+
isDirty: !!D((v || t).dirtyFields, d),
|
|
4693
|
+
error: D((v || t).errors, d),
|
|
4694
|
+
isValidating: !!D(t.validatingFields, d),
|
|
4695
|
+
isTouched: !!D((v || t).touchedFields, d)
|
|
4695
4696
|
}), S = (d) => {
|
|
4696
4697
|
d && bt(d).forEach((v) => ye(t.errors, v)), g.state.next({
|
|
4697
4698
|
errors: d ? t.errors : {}
|
|
4698
4699
|
});
|
|
4699
4700
|
}, L = (d, v, b) => {
|
|
4700
|
-
const
|
|
4701
|
+
const M = (D(n, d, { _f: {} })._f || {}).ref, I = D(t.errors, d) || {}, { ref: x, message: P, type: ae, ...fe } = I;
|
|
4701
4702
|
me(t.errors, d, {
|
|
4702
|
-
...
|
|
4703
|
+
...fe,
|
|
4703
4704
|
...v,
|
|
4704
|
-
ref:
|
|
4705
|
+
ref: M
|
|
4705
4706
|
}), g.state.next({
|
|
4706
4707
|
name: d,
|
|
4707
4708
|
errors: t.errors,
|
|
4708
4709
|
isValid: !1
|
|
4709
|
-
}), b && b.shouldFocus &&
|
|
4710
|
-
},
|
|
4710
|
+
}), b && b.shouldFocus && M && M.focus && M.focus();
|
|
4711
|
+
}, K = (d, v) => Oe(d) ? g.state.subscribe({
|
|
4711
4712
|
next: (b) => d(F(void 0, v), b)
|
|
4712
|
-
}) : F(d, v, !0),
|
|
4713
|
+
}) : F(d, v, !0), O = (d) => g.state.subscribe({
|
|
4713
4714
|
next: (v) => {
|
|
4714
4715
|
Bf(d.name, v.name, d.exact) && Uf(v, d.formState || p, ge, d.reRenderRoot) && d.callback({
|
|
4715
4716
|
values: { ...o },
|
|
@@ -4717,26 +4718,26 @@ function zf(e = {}) {
|
|
|
4717
4718
|
...v
|
|
4718
4719
|
});
|
|
4719
4720
|
}
|
|
4720
|
-
}).unsubscribe,
|
|
4721
|
+
}).unsubscribe, q = (d) => (s.mount = !0, m = {
|
|
4721
4722
|
...m,
|
|
4722
4723
|
...d.formState
|
|
4723
|
-
},
|
|
4724
|
+
}, O({
|
|
4724
4725
|
...d,
|
|
4725
4726
|
formState: m
|
|
4726
4727
|
})), E = (d, v = {}) => {
|
|
4727
4728
|
for (const b of d ? bt(d) : i.mount)
|
|
4728
4729
|
i.mount.delete(b), i.array.delete(b), v.keepValue || (ye(n, b), ye(o, b)), !v.keepError && ye(t.errors, b), !v.keepDirty && ye(t.dirtyFields, b), !v.keepTouched && ye(t.touchedFields, b), !v.keepIsValidating && ye(t.validatingFields, b), !r.shouldUnregister && !v.keepDefaultValue && ye(a, b);
|
|
4729
4730
|
g.state.next({
|
|
4730
|
-
values:
|
|
4731
|
+
values: Se(o)
|
|
4731
4732
|
}), g.state.next({
|
|
4732
4733
|
...t,
|
|
4733
|
-
...v.keepDirty ? { isDirty:
|
|
4734
|
+
...v.keepDirty ? { isDirty: ce() } : {}
|
|
4734
4735
|
}), !v.keepIsValid && h();
|
|
4735
|
-
},
|
|
4736
|
-
(
|
|
4737
|
-
},
|
|
4738
|
-
let b =
|
|
4739
|
-
const
|
|
4736
|
+
}, U = ({ disabled: d, name: v }) => {
|
|
4737
|
+
(Me(d) && s.mount || d || i.disabled.has(v)) && (d ? i.disabled.add(v) : i.disabled.delete(v));
|
|
4738
|
+
}, re = (d, v = {}) => {
|
|
4739
|
+
let b = D(n, d);
|
|
4740
|
+
const M = Me(v.disabled) || Me(r.disabled);
|
|
4740
4741
|
return me(n, d, {
|
|
4741
4742
|
...b || {},
|
|
4742
4743
|
_f: {
|
|
@@ -4745,11 +4746,11 @@ function zf(e = {}) {
|
|
|
4745
4746
|
mount: !0,
|
|
4746
4747
|
...v
|
|
4747
4748
|
}
|
|
4748
|
-
}), i.mount.add(d), b ?
|
|
4749
|
-
disabled:
|
|
4749
|
+
}), i.mount.add(d), b ? U({
|
|
4750
|
+
disabled: Me(v.disabled) ? v.disabled : r.disabled,
|
|
4750
4751
|
name: d
|
|
4751
|
-
}) :
|
|
4752
|
-
...
|
|
4752
|
+
}) : ee(d, !0, v.value), {
|
|
4753
|
+
...M ? { disabled: v.disabled || r.disabled } : {},
|
|
4753
4754
|
...r.progressive ? {
|
|
4754
4755
|
required: !!v.required,
|
|
4755
4756
|
min: vt(v.min),
|
|
@@ -4759,105 +4760,105 @@ function zf(e = {}) {
|
|
|
4759
4760
|
pattern: vt(v.pattern)
|
|
4760
4761
|
} : {},
|
|
4761
4762
|
name: d,
|
|
4762
|
-
onChange:
|
|
4763
|
-
onBlur:
|
|
4764
|
-
ref: (
|
|
4765
|
-
if (
|
|
4766
|
-
|
|
4767
|
-
const
|
|
4768
|
-
if (
|
|
4763
|
+
onChange: ie,
|
|
4764
|
+
onBlur: ie,
|
|
4765
|
+
ref: (I) => {
|
|
4766
|
+
if (I) {
|
|
4767
|
+
re(d, v), b = D(n, d);
|
|
4768
|
+
const x = ve(I.value) && I.querySelectorAll && I.querySelectorAll("input,select,textarea")[0] || I, P = Of(x), ae = b._f.refs || [];
|
|
4769
|
+
if (P ? ae.find((fe) => fe === x) : x === b._f.ref)
|
|
4769
4770
|
return;
|
|
4770
4771
|
me(n, d, {
|
|
4771
4772
|
_f: {
|
|
4772
4773
|
...b._f,
|
|
4773
|
-
|
|
4774
|
+
...P ? {
|
|
4774
4775
|
refs: [
|
|
4775
|
-
...
|
|
4776
|
-
|
|
4777
|
-
...Array.isArray(
|
|
4776
|
+
...ae.filter(Cr),
|
|
4777
|
+
x,
|
|
4778
|
+
...Array.isArray(D(a, d)) ? [{}] : []
|
|
4778
4779
|
],
|
|
4779
|
-
ref: { type:
|
|
4780
|
-
} : { ref:
|
|
4780
|
+
ref: { type: x.type, name: d }
|
|
4781
|
+
} : { ref: x }
|
|
4781
4782
|
}
|
|
4782
|
-
}),
|
|
4783
|
+
}), ee(d, !1, void 0, x);
|
|
4783
4784
|
} else
|
|
4784
|
-
b =
|
|
4785
|
+
b = D(n, d, {}), b._f && (b._f.mount = !1), (r.shouldUnregister || v.shouldUnregister) && !(hl(i.array, d) && s.action) && i.unMount.add(d);
|
|
4785
4786
|
}
|
|
4786
4787
|
};
|
|
4787
|
-
},
|
|
4788
|
-
|
|
4789
|
-
const
|
|
4790
|
-
|
|
4791
|
-
|
|
4788
|
+
}, B = () => r.shouldFocusError && wt(n, ue, i.mount), N = (d) => {
|
|
4789
|
+
Me(d) && (g.state.next({ disabled: d }), wt(n, (v, b) => {
|
|
4790
|
+
const M = D(n, b);
|
|
4791
|
+
M && (v.disabled = M._f.disabled || d, Array.isArray(M._f.refs) && M._f.refs.forEach((I) => {
|
|
4792
|
+
I.disabled = M._f.disabled || d;
|
|
4792
4793
|
}));
|
|
4793
4794
|
}, 0, !1));
|
|
4794
|
-
},
|
|
4795
|
-
let
|
|
4795
|
+
}, $ = (d, v) => async (b) => {
|
|
4796
|
+
let M;
|
|
4796
4797
|
b && (b.preventDefault && b.preventDefault(), b.persist && b.persist());
|
|
4797
|
-
let
|
|
4798
|
+
let I = Se(o);
|
|
4798
4799
|
if (g.state.next({
|
|
4799
4800
|
isSubmitting: !0
|
|
4800
4801
|
}), r.resolver) {
|
|
4801
|
-
const { errors:
|
|
4802
|
-
t.errors =
|
|
4802
|
+
const { errors: x, values: P } = await T();
|
|
4803
|
+
t.errors = x, I = P;
|
|
4803
4804
|
} else
|
|
4804
|
-
await
|
|
4805
|
+
await W(n);
|
|
4805
4806
|
if (i.disabled.size)
|
|
4806
|
-
for (const
|
|
4807
|
-
me(
|
|
4808
|
-
if (ye(t.errors, "root"),
|
|
4807
|
+
for (const x of i.disabled)
|
|
4808
|
+
me(I, x, void 0);
|
|
4809
|
+
if (ye(t.errors, "root"), Ie(t.errors)) {
|
|
4809
4810
|
g.state.next({
|
|
4810
4811
|
errors: {}
|
|
4811
4812
|
});
|
|
4812
4813
|
try {
|
|
4813
|
-
await d(
|
|
4814
|
-
} catch (
|
|
4815
|
-
|
|
4814
|
+
await d(I, b);
|
|
4815
|
+
} catch (x) {
|
|
4816
|
+
M = x;
|
|
4816
4817
|
}
|
|
4817
4818
|
} else
|
|
4818
|
-
v && await v({ ...t.errors }, b),
|
|
4819
|
+
v && await v({ ...t.errors }, b), B(), setTimeout(B);
|
|
4819
4820
|
if (g.state.next({
|
|
4820
4821
|
isSubmitted: !0,
|
|
4821
4822
|
isSubmitting: !1,
|
|
4822
|
-
isSubmitSuccessful:
|
|
4823
|
+
isSubmitSuccessful: Ie(t.errors) && !M,
|
|
4823
4824
|
submitCount: t.submitCount + 1,
|
|
4824
4825
|
errors: t.errors
|
|
4825
|
-
}),
|
|
4826
|
-
throw
|
|
4827
|
-
},
|
|
4828
|
-
|
|
4829
|
-
},
|
|
4830
|
-
const b = d ?
|
|
4826
|
+
}), M)
|
|
4827
|
+
throw M;
|
|
4828
|
+
}, ne = (d, v = {}) => {
|
|
4829
|
+
D(n, d) && (ve(v.defaultValue) ? J(d, Se(D(a, d))) : (J(d, v.defaultValue), me(a, d, Se(v.defaultValue))), v.keepTouched || ye(t.touchedFields, d), v.keepDirty || (ye(t.dirtyFields, d), t.isDirty = v.defaultValue ? ce(d, Se(D(a, d))) : ce()), v.keepError || (ye(t.errors, d), p.isValid && h()), g.state.next({ ...t }));
|
|
4830
|
+
}, we = (d, v = {}) => {
|
|
4831
|
+
const b = d ? Se(d) : a, M = Se(b), I = Ie(d), x = I ? a : M;
|
|
4831
4832
|
if (v.keepDefaultValues || (a = b), !v.keepValues) {
|
|
4832
4833
|
if (v.keepDirtyValues) {
|
|
4833
|
-
const
|
|
4834
|
+
const P = /* @__PURE__ */ new Set([
|
|
4834
4835
|
...i.mount,
|
|
4835
4836
|
...Object.keys(gt(a, o))
|
|
4836
4837
|
]);
|
|
4837
|
-
for (const
|
|
4838
|
-
|
|
4838
|
+
for (const ae of Array.from(P))
|
|
4839
|
+
D(t.dirtyFields, ae) ? me(x, ae, D(o, ae)) : J(ae, D(x, ae));
|
|
4839
4840
|
} else {
|
|
4840
4841
|
if (xn && ve(d))
|
|
4841
|
-
for (const
|
|
4842
|
-
const
|
|
4843
|
-
if (
|
|
4844
|
-
const
|
|
4845
|
-
if (Gt(
|
|
4846
|
-
const
|
|
4847
|
-
if (
|
|
4848
|
-
|
|
4842
|
+
for (const P of i.mount) {
|
|
4843
|
+
const ae = D(n, P);
|
|
4844
|
+
if (ae && ae._f) {
|
|
4845
|
+
const fe = Array.isArray(ae._f.refs) ? ae._f.refs[0] : ae._f.ref;
|
|
4846
|
+
if (Gt(fe)) {
|
|
4847
|
+
const Ee = fe.closest("form");
|
|
4848
|
+
if (Ee) {
|
|
4849
|
+
Ee.reset();
|
|
4849
4850
|
break;
|
|
4850
4851
|
}
|
|
4851
4852
|
}
|
|
4852
4853
|
}
|
|
4853
4854
|
}
|
|
4854
|
-
for (const
|
|
4855
|
-
|
|
4855
|
+
for (const P of i.mount)
|
|
4856
|
+
J(P, D(x, P));
|
|
4856
4857
|
}
|
|
4857
|
-
o =
|
|
4858
|
-
values: { ...
|
|
4858
|
+
o = Se(x), g.array.next({
|
|
4859
|
+
values: { ...x }
|
|
4859
4860
|
}), g.state.next({
|
|
4860
|
-
values: { ...
|
|
4861
|
+
values: { ...x }
|
|
4861
4862
|
});
|
|
4862
4863
|
}
|
|
4863
4864
|
i = {
|
|
@@ -4870,19 +4871,19 @@ function zf(e = {}) {
|
|
|
4870
4871
|
focus: ""
|
|
4871
4872
|
}, s.mount = !p.isValid || !!v.keepIsValid || !!v.keepDirtyValues, s.watch = !!r.shouldUnregister, g.state.next({
|
|
4872
4873
|
submitCount: v.keepSubmitCount ? t.submitCount : 0,
|
|
4873
|
-
isDirty:
|
|
4874
|
+
isDirty: I ? !1 : v.keepDirty ? t.isDirty : !!(v.keepDefaultValues && !We(d, a)),
|
|
4874
4875
|
isSubmitted: v.keepIsSubmitted ? t.isSubmitted : !1,
|
|
4875
|
-
dirtyFields:
|
|
4876
|
+
dirtyFields: I ? {} : v.keepDirtyValues ? v.keepDefaultValues && o ? gt(a, o) : t.dirtyFields : v.keepDefaultValues && d ? gt(a, d) : v.keepDirty ? t.dirtyFields : {},
|
|
4876
4877
|
touchedFields: v.keepTouched ? t.touchedFields : {},
|
|
4877
4878
|
errors: v.keepErrors ? t.errors : {},
|
|
4878
4879
|
isSubmitSuccessful: v.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
4879
4880
|
isSubmitting: !1
|
|
4880
4881
|
});
|
|
4881
|
-
}, xe = (d, v) =>
|
|
4882
|
-
const b =
|
|
4883
|
-
if (
|
|
4884
|
-
const
|
|
4885
|
-
|
|
4882
|
+
}, xe = (d, v) => we(Oe(d) ? d(o) : d, v), pe = (d, v = {}) => {
|
|
4883
|
+
const b = D(n, d), M = b && b._f;
|
|
4884
|
+
if (M) {
|
|
4885
|
+
const I = M.refs ? M.refs[0] : M.ref;
|
|
4886
|
+
I.focus && (I.focus(), v.shouldSelect && Oe(I.select) && I.select());
|
|
4886
4887
|
}
|
|
4887
4888
|
}, ge = (d) => {
|
|
4888
4889
|
t = {
|
|
@@ -4891,28 +4892,28 @@ function zf(e = {}) {
|
|
|
4891
4892
|
};
|
|
4892
4893
|
}, $e = {
|
|
4893
4894
|
control: {
|
|
4894
|
-
register:
|
|
4895
|
+
register: re,
|
|
4895
4896
|
unregister: E,
|
|
4896
|
-
getFieldState:
|
|
4897
|
-
handleSubmit:
|
|
4897
|
+
getFieldState: de,
|
|
4898
|
+
handleSubmit: $,
|
|
4898
4899
|
setError: L,
|
|
4899
|
-
_subscribe:
|
|
4900
|
-
_runSchema:
|
|
4900
|
+
_subscribe: O,
|
|
4901
|
+
_runSchema: T,
|
|
4901
4902
|
_getWatch: F,
|
|
4902
|
-
_getDirty:
|
|
4903
|
+
_getDirty: ce,
|
|
4903
4904
|
_setValid: h,
|
|
4904
|
-
_setFieldArray:
|
|
4905
|
-
_setDisabledField:
|
|
4906
|
-
_setErrors:
|
|
4907
|
-
_getFieldArray:
|
|
4908
|
-
_reset:
|
|
4905
|
+
_setFieldArray: A,
|
|
4906
|
+
_setDisabledField: U,
|
|
4907
|
+
_setErrors: R,
|
|
4908
|
+
_getFieldArray: G,
|
|
4909
|
+
_reset: we,
|
|
4909
4910
|
_resetDefaultValues: () => Oe(r.defaultValues) && r.defaultValues().then((d) => {
|
|
4910
4911
|
xe(d, r.resetOptions), g.state.next({
|
|
4911
4912
|
isLoading: !1
|
|
4912
4913
|
});
|
|
4913
4914
|
}),
|
|
4914
|
-
_removeUnmounted:
|
|
4915
|
-
_disableForm:
|
|
4915
|
+
_removeUnmounted: Y,
|
|
4916
|
+
_disableForm: N,
|
|
4916
4917
|
_subjects: g,
|
|
4917
4918
|
_proxyFormState: p,
|
|
4918
4919
|
get _fields() {
|
|
@@ -4949,20 +4950,20 @@ function zf(e = {}) {
|
|
|
4949
4950
|
};
|
|
4950
4951
|
}
|
|
4951
4952
|
},
|
|
4952
|
-
subscribe:
|
|
4953
|
-
trigger:
|
|
4954
|
-
register:
|
|
4955
|
-
handleSubmit:
|
|
4956
|
-
watch:
|
|
4957
|
-
setValue:
|
|
4958
|
-
getValues:
|
|
4953
|
+
subscribe: q,
|
|
4954
|
+
trigger: V,
|
|
4955
|
+
register: re,
|
|
4956
|
+
handleSubmit: $,
|
|
4957
|
+
watch: K,
|
|
4958
|
+
setValue: J,
|
|
4959
|
+
getValues: oe,
|
|
4959
4960
|
reset: xe,
|
|
4960
|
-
resetField:
|
|
4961
|
+
resetField: ne,
|
|
4961
4962
|
clearErrors: S,
|
|
4962
4963
|
unregister: E,
|
|
4963
4964
|
setError: L,
|
|
4964
|
-
setFocus:
|
|
4965
|
-
getFieldState:
|
|
4965
|
+
setFocus: pe,
|
|
4966
|
+
getFieldState: de
|
|
4966
4967
|
};
|
|
4967
4968
|
return {
|
|
4968
4969
|
...$e,
|
|
@@ -4970,7 +4971,7 @@ function zf(e = {}) {
|
|
|
4970
4971
|
};
|
|
4971
4972
|
}
|
|
4972
4973
|
function hm(e = {}) {
|
|
4973
|
-
const r =
|
|
4974
|
+
const r = Q.useRef(void 0), t = Q.useRef(void 0), [n, a] = Q.useState({
|
|
4974
4975
|
isDirty: !1,
|
|
4975
4976
|
isValidating: !1,
|
|
4976
4977
|
isLoading: Oe(e.defaultValues),
|
|
@@ -5002,22 +5003,22 @@ function hm(e = {}) {
|
|
|
5002
5003
|
...i,
|
|
5003
5004
|
isReady: !0
|
|
5004
5005
|
})), o._formState.isReady = !0, s;
|
|
5005
|
-
}, [o]),
|
|
5006
|
-
e.mode && (o._options.mode = e.mode), e.reValidateMode && (o._options.reValidateMode = e.reValidateMode), e.errors && !
|
|
5007
|
-
}, [o, e.errors, e.mode, e.reValidateMode]),
|
|
5006
|
+
}, [o]), Q.useEffect(() => o._disableForm(e.disabled), [o, e.disabled]), Q.useEffect(() => {
|
|
5007
|
+
e.mode && (o._options.mode = e.mode), e.reValidateMode && (o._options.reValidateMode = e.reValidateMode), e.errors && !Ie(e.errors) && o._setErrors(e.errors);
|
|
5008
|
+
}, [o, e.errors, e.mode, e.reValidateMode]), Q.useEffect(() => {
|
|
5008
5009
|
e.shouldUnregister && o._subjects.state.next({
|
|
5009
5010
|
values: o._getWatch()
|
|
5010
5011
|
});
|
|
5011
|
-
}, [o, e.shouldUnregister]),
|
|
5012
|
+
}, [o, e.shouldUnregister]), Q.useEffect(() => {
|
|
5012
5013
|
if (o._proxyFormState.isDirty) {
|
|
5013
5014
|
const s = o._getDirty();
|
|
5014
5015
|
s !== n.isDirty && o._subjects.state.next({
|
|
5015
5016
|
isDirty: s
|
|
5016
5017
|
});
|
|
5017
5018
|
}
|
|
5018
|
-
}, [o, n.isDirty]),
|
|
5019
|
+
}, [o, n.isDirty]), Q.useEffect(() => {
|
|
5019
5020
|
e.values && !We(e.values, t.current) ? (o._reset(e.values, o._options.resetOptions), t.current = e.values, a((s) => ({ ...s }))) : o._resetDefaultValues();
|
|
5020
|
-
}, [o, e.values]),
|
|
5021
|
+
}, [o, e.values]), Q.useEffect(() => {
|
|
5021
5022
|
o._state.mount || (o._setValid(), o._state.mount = !0), o._state.watch && (o._state.watch = !1, o._subjects.state.next({ ...o._formState })), o._removeUnmounted();
|
|
5022
5023
|
}), r.current.formState = bl(n, o), r.current;
|
|
5023
5024
|
}
|
|
@@ -5039,7 +5040,7 @@ const xm = Rf, Al = l.createContext({}), ym = ({
|
|
|
5039
5040
|
}, Rl = l.createContext({}), qf = l.forwardRef(
|
|
5040
5041
|
({ className: e, ...r }, t) => {
|
|
5041
5042
|
const n = l.useId();
|
|
5042
|
-
return /* @__PURE__ */ c.jsx(Rl.Provider, { value: { id: n }, children: /* @__PURE__ */ c.jsx("div", { ref: t, className:
|
|
5043
|
+
return /* @__PURE__ */ c.jsx(Rl.Provider, { value: { id: n }, children: /* @__PURE__ */ c.jsx("div", { ref: t, className: k("al-space-y-2", e), ...r }) });
|
|
5043
5044
|
}
|
|
5044
5045
|
);
|
|
5045
5046
|
qf.displayName = "FormItem";
|
|
@@ -5049,7 +5050,7 @@ const Yf = l.forwardRef(({ className: e, ...r }, t) => {
|
|
|
5049
5050
|
vi,
|
|
5050
5051
|
{
|
|
5051
5052
|
ref: t,
|
|
5052
|
-
className:
|
|
5053
|
+
className: k(n && "al-text-destructive", e),
|
|
5053
5054
|
htmlFor: a,
|
|
5054
5055
|
...r
|
|
5055
5056
|
}
|
|
@@ -5077,7 +5078,7 @@ const Zf = l.forwardRef(({ className: e, ...r }, t) => {
|
|
|
5077
5078
|
{
|
|
5078
5079
|
ref: t,
|
|
5079
5080
|
id: n,
|
|
5080
|
-
className:
|
|
5081
|
+
className: k("al-text-sm al-text-muted-foreground", e),
|
|
5081
5082
|
...r
|
|
5082
5083
|
}
|
|
5083
5084
|
);
|
|
@@ -5090,14 +5091,14 @@ const Jf = l.forwardRef(({ className: e, children: r, ...t }, n) => {
|
|
|
5090
5091
|
{
|
|
5091
5092
|
ref: n,
|
|
5092
5093
|
id: o,
|
|
5093
|
-
className:
|
|
5094
|
+
className: k("al-text-sm al-font-medium al-text-destructive", e),
|
|
5094
5095
|
...t,
|
|
5095
5096
|
children: s
|
|
5096
5097
|
}
|
|
5097
5098
|
) : null;
|
|
5098
5099
|
});
|
|
5099
5100
|
Jf.displayName = "FormMessage";
|
|
5100
|
-
var Qf =
|
|
5101
|
+
var Qf = Q, ep = xi;
|
|
5101
5102
|
function Tl(e) {
|
|
5102
5103
|
if (e && e.__esModule) return e;
|
|
5103
5104
|
var r = /* @__PURE__ */ Object.create(null);
|
|
@@ -5113,17 +5114,17 @@ function Tl(e) {
|
|
|
5113
5114
|
}
|
|
5114
5115
|
}), r.default = e, Object.freeze(r);
|
|
5115
5116
|
}
|
|
5116
|
-
var
|
|
5117
|
+
var j = /* @__PURE__ */ Tl(Qf), tp = /* @__PURE__ */ Tl(ep), Ml = "data-dice-collection-item", rp = j.createContext(void 0);
|
|
5117
5118
|
function np(e) {
|
|
5118
|
-
const r =
|
|
5119
|
+
const r = j.useContext(rp);
|
|
5119
5120
|
return e ?? r ?? "ltr";
|
|
5120
5121
|
}
|
|
5121
|
-
typeof window < "u" ?
|
|
5122
|
+
typeof window < "u" ? j.useLayoutEffect : j.useEffect;
|
|
5122
5123
|
function Cn(e) {
|
|
5123
|
-
const r =
|
|
5124
|
-
return
|
|
5124
|
+
const r = j.useRef(e);
|
|
5125
|
+
return j.useEffect(() => {
|
|
5125
5126
|
r.current = e;
|
|
5126
|
-
}),
|
|
5127
|
+
}), j.useMemo(
|
|
5127
5128
|
() => (...t) => {
|
|
5128
5129
|
var n;
|
|
5129
5130
|
return (n = r.current) == null ? void 0 : n.call(r, ...t);
|
|
@@ -5144,7 +5145,7 @@ function op({
|
|
|
5144
5145
|
const [n, a] = sp({
|
|
5145
5146
|
defaultProp: r,
|
|
5146
5147
|
onChange: t
|
|
5147
|
-
}), o = e !== void 0, s = o ? e : n, i = Cn(t), u =
|
|
5148
|
+
}), o = e !== void 0, s = o ? e : n, i = Cn(t), u = j.useCallback(
|
|
5148
5149
|
(f) => {
|
|
5149
5150
|
if (o) {
|
|
5150
5151
|
const m = typeof f == "function" ? f(e) : f;
|
|
@@ -5160,13 +5161,13 @@ function sp({
|
|
|
5160
5161
|
defaultProp: e,
|
|
5161
5162
|
onChange: r
|
|
5162
5163
|
}) {
|
|
5163
|
-
const t =
|
|
5164
|
-
return
|
|
5164
|
+
const t = j.useState(e), [n] = t, a = j.useRef(n), o = Cn(r);
|
|
5165
|
+
return j.useEffect(() => {
|
|
5165
5166
|
a.current !== n && (o(n), a.current = n);
|
|
5166
5167
|
}, [n, o]), t;
|
|
5167
5168
|
}
|
|
5168
5169
|
function lp(e) {
|
|
5169
|
-
const [r, t] =
|
|
5170
|
+
const [r, t] = j.useState(null);
|
|
5170
5171
|
return { isFormControl: r ? e || !!r.closest("form") : !0, trigger: r, onTriggerChange: t };
|
|
5171
5172
|
}
|
|
5172
5173
|
function ip({
|
|
@@ -5175,7 +5176,7 @@ function ip({
|
|
|
5175
5176
|
onReset: t
|
|
5176
5177
|
}) {
|
|
5177
5178
|
const n = Cn(t);
|
|
5178
|
-
|
|
5179
|
+
j.useEffect(() => {
|
|
5179
5180
|
if (!e) return;
|
|
5180
5181
|
function a() {
|
|
5181
5182
|
r !== void 0 && (n == null || n(r));
|
|
@@ -5183,11 +5184,11 @@ function ip({
|
|
|
5183
5184
|
return e.addEventListener("reset", a), () => e.removeEventListener("reset", a);
|
|
5184
5185
|
}, [e, r, n]);
|
|
5185
5186
|
}
|
|
5186
|
-
var Nt = globalThis != null && globalThis.document ?
|
|
5187
|
-
}, Jn =
|
|
5187
|
+
var Nt = globalThis != null && globalThis.document ? j.useLayoutEffect : () => {
|
|
5188
|
+
}, Jn = j[" useId ".trim().toString()] || (() => {
|
|
5188
5189
|
}), cp = 0;
|
|
5189
5190
|
function up(e) {
|
|
5190
|
-
const [r, t] =
|
|
5191
|
+
const [r, t] = j.useState(
|
|
5191
5192
|
typeof Jn == "function" ? Jn() : void 0
|
|
5192
5193
|
);
|
|
5193
5194
|
return Nt(() => {
|
|
@@ -5198,30 +5199,30 @@ function dp({
|
|
|
5198
5199
|
ref: e,
|
|
5199
5200
|
attr: r = Ml
|
|
5200
5201
|
}) {
|
|
5201
|
-
const t =
|
|
5202
|
+
const t = j.useCallback(() => {
|
|
5202
5203
|
const a = e.current;
|
|
5203
5204
|
if (!a) return [];
|
|
5204
5205
|
const o = Array.from(
|
|
5205
5206
|
a.querySelectorAll(`[${r}]`)
|
|
5206
5207
|
);
|
|
5207
5208
|
return o.length === 0 ? [] : o.sort(ap);
|
|
5208
|
-
}, [e, r]), n =
|
|
5209
|
+
}, [e, r]), n = j.useCallback(() => t().filter(
|
|
5209
5210
|
(o) => o.getAttribute("aria-disabled") !== "true"
|
|
5210
5211
|
), [t]);
|
|
5211
5212
|
return { getItems: t, getEnabledItems: n };
|
|
5212
5213
|
}
|
|
5213
5214
|
function fp() {
|
|
5214
|
-
const [e, r] =
|
|
5215
|
+
const [e, r] = j.useState(!1);
|
|
5215
5216
|
return Nt(() => {
|
|
5216
5217
|
r(!0);
|
|
5217
5218
|
}, []), e;
|
|
5218
5219
|
}
|
|
5219
5220
|
function pp(e) {
|
|
5220
|
-
const r =
|
|
5221
|
-
return
|
|
5221
|
+
const r = j.useRef({ value: e, previous: e });
|
|
5222
|
+
return j.useMemo(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
|
|
5222
5223
|
}
|
|
5223
5224
|
function mp(e) {
|
|
5224
|
-
const [r, t] =
|
|
5225
|
+
const [r, t] = j.useState(void 0);
|
|
5225
5226
|
return Nt(() => {
|
|
5226
5227
|
if (e) {
|
|
5227
5228
|
t({ width: e.offsetWidth, height: e.offsetHeight });
|
|
@@ -5242,7 +5243,7 @@ function mp(e) {
|
|
|
5242
5243
|
}, [e]), r;
|
|
5243
5244
|
}
|
|
5244
5245
|
function gp(e) {
|
|
5245
|
-
const [r, t] =
|
|
5246
|
+
const [r, t] = j.useState(e.initial), n = j.useCallback(
|
|
5246
5247
|
(a) => {
|
|
5247
5248
|
t((o) => {
|
|
5248
5249
|
var i;
|
|
@@ -5281,7 +5282,7 @@ function zt(...e) {
|
|
|
5281
5282
|
};
|
|
5282
5283
|
}
|
|
5283
5284
|
function Dl(...e) {
|
|
5284
|
-
return
|
|
5285
|
+
return j.useCallback(zt(...e), e);
|
|
5285
5286
|
}
|
|
5286
5287
|
var hp = {
|
|
5287
5288
|
border: 0,
|
|
@@ -5306,17 +5307,17 @@ function xp(e) {
|
|
|
5306
5307
|
onReset: s,
|
|
5307
5308
|
style: i,
|
|
5308
5309
|
...u
|
|
5309
|
-
} = e, f = o === "checkbox" || o === "radio" || o === "switch", p =
|
|
5310
|
-
return
|
|
5310
|
+
} = e, f = o === "checkbox" || o === "radio" || o === "switch", p = j.useRef(null), m = pp(o === "hidden" ? t : n), g = mp(r);
|
|
5311
|
+
return j.useEffect(() => {
|
|
5311
5312
|
const C = p.current;
|
|
5312
5313
|
if (!C) return;
|
|
5313
|
-
const h = window.HTMLInputElement.prototype, _ = f ? "checked" : "value",
|
|
5314
|
+
const h = window.HTMLInputElement.prototype, _ = f ? "checked" : "value", A = f ? "click" : "input", y = f ? n : JSON.stringify(t), ee = Object.getOwnPropertyDescriptor(
|
|
5314
5315
|
h,
|
|
5315
5316
|
_
|
|
5316
5317
|
).set;
|
|
5317
|
-
if (m !== y &&
|
|
5318
|
-
const
|
|
5319
|
-
|
|
5318
|
+
if (m !== y && ee) {
|
|
5319
|
+
const H = new Event(A, { bubbles: a });
|
|
5320
|
+
ee.call(C, y), C.dispatchEvent(H);
|
|
5320
5321
|
}
|
|
5321
5322
|
}, [m, t, n, a, f]), ip({
|
|
5322
5323
|
form: ((w = p.current) == null ? void 0 : w.form) ?? null,
|
|
@@ -5324,7 +5325,7 @@ function xp(e) {
|
|
|
5324
5325
|
onReset: (C) => {
|
|
5325
5326
|
s == null || s(C);
|
|
5326
5327
|
}
|
|
5327
|
-
}), /* @__PURE__ */
|
|
5328
|
+
}), /* @__PURE__ */ j.createElement(
|
|
5328
5329
|
"input",
|
|
5329
5330
|
{
|
|
5330
5331
|
type: o,
|
|
@@ -5342,18 +5343,18 @@ function xp(e) {
|
|
|
5342
5343
|
);
|
|
5343
5344
|
}
|
|
5344
5345
|
function yp(e, r) {
|
|
5345
|
-
const t =
|
|
5346
|
+
const t = j.createContext(r);
|
|
5346
5347
|
t.displayName = e;
|
|
5347
5348
|
function n(o) {
|
|
5348
|
-
const { children: s, ...i } = o, u =
|
|
5349
|
+
const { children: s, ...i } = o, u = j.useMemo(
|
|
5349
5350
|
() => i,
|
|
5350
5351
|
Object.values(i)
|
|
5351
5352
|
);
|
|
5352
|
-
return /* @__PURE__ */
|
|
5353
|
+
return /* @__PURE__ */ j.createElement(t.Provider, { value: u }, s);
|
|
5353
5354
|
}
|
|
5354
5355
|
n.displayName = `${e}Provider`;
|
|
5355
5356
|
function a(o, s) {
|
|
5356
|
-
const i =
|
|
5357
|
+
const i = j.useContext(t);
|
|
5357
5358
|
if (!i && !s)
|
|
5358
5359
|
throw new Error(
|
|
5359
5360
|
`\`${o}\` must be used within \`${e}\``
|
|
@@ -5365,7 +5366,7 @@ function yp(e, r) {
|
|
|
5365
5366
|
}
|
|
5366
5367
|
function Pl(e) {
|
|
5367
5368
|
var n, a;
|
|
5368
|
-
if (!
|
|
5369
|
+
if (!j.isValidElement(e)) return;
|
|
5369
5370
|
let r = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
5370
5371
|
return t ? e.ref : (r = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : (
|
|
5371
5372
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
@@ -5373,7 +5374,7 @@ function Pl(e) {
|
|
|
5373
5374
|
));
|
|
5374
5375
|
}
|
|
5375
5376
|
var bp = function(r) {
|
|
5376
|
-
return
|
|
5377
|
+
return j.isValidElement(r) && r.type === Ol;
|
|
5377
5378
|
};
|
|
5378
5379
|
function wp(e, r) {
|
|
5379
5380
|
const t = { ...r };
|
|
@@ -5388,46 +5389,46 @@ function wp(e, r) {
|
|
|
5388
5389
|
}
|
|
5389
5390
|
return { ...e, ...t };
|
|
5390
5391
|
}
|
|
5391
|
-
var $r =
|
|
5392
|
+
var $r = j.forwardRef(
|
|
5392
5393
|
(e, r) => {
|
|
5393
5394
|
const { children: t, ...n } = e;
|
|
5394
|
-
if (!
|
|
5395
|
-
return
|
|
5395
|
+
if (!j.isValidElement(t))
|
|
5396
|
+
return j.Children.count(t) > 1 ? j.Children.only(null) : null;
|
|
5396
5397
|
const a = Pl(t), o = wp(
|
|
5397
5398
|
n,
|
|
5398
5399
|
t.props
|
|
5399
5400
|
);
|
|
5400
|
-
return typeof t.type == "string" ?
|
|
5401
|
+
return typeof t.type == "string" ? j.cloneElement(t, {
|
|
5401
5402
|
...o,
|
|
5402
5403
|
ref: r ? zt(r, a) : a
|
|
5403
|
-
}) :
|
|
5404
|
+
}) : j.cloneElement(t, {
|
|
5404
5405
|
...o,
|
|
5405
5406
|
ref: r ? zt(r, a) : a
|
|
5406
5407
|
});
|
|
5407
5408
|
}
|
|
5408
5409
|
);
|
|
5409
5410
|
$r.displayName = "SlotClone";
|
|
5410
|
-
var jl =
|
|
5411
|
-
const { children: t, ...n } = e, a =
|
|
5411
|
+
var jl = j.forwardRef((e, r) => {
|
|
5412
|
+
const { children: t, ...n } = e, a = j.Children.toArray(t), o = a.find(bp);
|
|
5412
5413
|
if (!o)
|
|
5413
|
-
return /* @__PURE__ */
|
|
5414
|
-
if (!
|
|
5414
|
+
return /* @__PURE__ */ j.createElement($r, { ...n, ref: r }, t);
|
|
5415
|
+
if (!j.isValidElement(o))
|
|
5415
5416
|
return null;
|
|
5416
|
-
const s = o.props.children, i = a.map((u) => u === o ?
|
|
5417
|
-
return /* @__PURE__ */
|
|
5417
|
+
const s = o.props.children, i = a.map((u) => u === o ? j.Children.count(s) > 1 ? j.Children.only(null) : j.isValidElement(s) ? s.props.children : null : u);
|
|
5418
|
+
return /* @__PURE__ */ j.createElement($r, { ...n, ref: r }, j.isValidElement(s) ? j.cloneElement(s, void 0, i) : null);
|
|
5418
5419
|
});
|
|
5419
5420
|
jl.displayName = "Slot";
|
|
5420
|
-
var Ol =
|
|
5421
|
-
return /* @__PURE__ */
|
|
5421
|
+
var Ol = j.memo(function({ children: r }) {
|
|
5422
|
+
return /* @__PURE__ */ j.createElement(j.Fragment, null, r);
|
|
5422
5423
|
});
|
|
5423
5424
|
Ol.displayName = "Slottable";
|
|
5424
5425
|
function Sp(e) {
|
|
5425
|
-
const r =
|
|
5426
|
+
const r = j.forwardRef((t, n) => {
|
|
5426
5427
|
const { asChild: a, ...o } = t;
|
|
5427
|
-
return a ?
|
|
5428
|
+
return a ? j.createElement(jl, {
|
|
5428
5429
|
...o,
|
|
5429
5430
|
ref: n
|
|
5430
|
-
}) :
|
|
5431
|
+
}) : j.createElement(e, {
|
|
5431
5432
|
...o,
|
|
5432
5433
|
ref: n
|
|
5433
5434
|
});
|
|
@@ -5442,26 +5443,26 @@ var _r = /* @__PURE__ */ new Map(), kl = new Proxy(
|
|
|
5442
5443
|
return _r.has(t) || _r.set(t, Sp(t)), _r.get(t);
|
|
5443
5444
|
}
|
|
5444
5445
|
}
|
|
5445
|
-
), Cp =
|
|
5446
|
+
), Cp = j.forwardRef(
|
|
5446
5447
|
(e, r) => {
|
|
5447
5448
|
var s;
|
|
5448
5449
|
const { container: t, ...n } = e, a = fp(), o = t ?? (a ? (s = globalThis.document) == null ? void 0 : s.body : null);
|
|
5449
5450
|
return o ? tp.createPortal(
|
|
5450
|
-
/* @__PURE__ */
|
|
5451
|
+
/* @__PURE__ */ j.createElement(kl.div, { ...n, ref: r }),
|
|
5451
5452
|
o
|
|
5452
5453
|
) : null;
|
|
5453
5454
|
}
|
|
5454
5455
|
);
|
|
5455
5456
|
Cp.displayName = "Portal";
|
|
5456
5457
|
var Vl = (e) => {
|
|
5457
|
-
const { present: r, children: t } = e, n = _p(r), a = typeof t == "function" ? t({ present: n.isPresent }) :
|
|
5458
|
-
return typeof t == "function" || n.isPresent ?
|
|
5458
|
+
const { present: r, children: t } = e, n = _p(r), a = typeof t == "function" ? t({ present: n.isPresent }) : j.Children.only(t), o = Dl(n.ref, Pl(a));
|
|
5459
|
+
return typeof t == "function" || n.isPresent ? j.cloneElement(a, { ref: o }) : null;
|
|
5459
5460
|
};
|
|
5460
5461
|
Vl.displayName = "Presence";
|
|
5461
5462
|
function _p(e) {
|
|
5462
|
-
const [r, t] =
|
|
5463
|
+
const [r, t] = j.useState(), n = j.useRef(
|
|
5463
5464
|
{}
|
|
5464
|
-
), a =
|
|
5465
|
+
), a = j.useRef(e), o = j.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = gp({
|
|
5465
5466
|
initial: s,
|
|
5466
5467
|
states: {
|
|
5467
5468
|
mounted: {
|
|
@@ -5477,7 +5478,7 @@ function _p(e) {
|
|
|
5477
5478
|
}
|
|
5478
5479
|
}
|
|
5479
5480
|
});
|
|
5480
|
-
return
|
|
5481
|
+
return j.useEffect(() => {
|
|
5481
5482
|
const f = jt(n.current);
|
|
5482
5483
|
o.current = i === "mounted" ? f : "none";
|
|
5483
5484
|
}, [i]), Nt(() => {
|
|
@@ -5509,7 +5510,7 @@ function _p(e) {
|
|
|
5509
5510
|
u("ANIMATION_END");
|
|
5510
5511
|
}, [r, u]), {
|
|
5511
5512
|
isPresent: ["mounted", "unmountSuspended"].includes(i),
|
|
5512
|
-
ref:
|
|
5513
|
+
ref: j.useCallback((f) => {
|
|
5513
5514
|
f && (n.current = getComputedStyle(f)), t(f);
|
|
5514
5515
|
}, [])
|
|
5515
5516
|
};
|
|
@@ -5517,14 +5518,14 @@ function _p(e) {
|
|
|
5517
5518
|
function jt(e) {
|
|
5518
5519
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
5519
5520
|
}
|
|
5520
|
-
var Fl = Ml, Np = Vl, Ze = kl, Ep = xp,
|
|
5521
|
+
var Fl = Ml, Np = Vl, Ze = kl, Ep = xp, Re = vp, Ip = zt, $l = yp, Ap = Dl, Rp = op, Tp = np, Mp = lp, Ft = up, Dp = dp, Ll = "TagsInputRoot", [Pp, st] = $l(Ll), Ul = l.forwardRef((e, r) => {
|
|
5521
5522
|
const {
|
|
5522
5523
|
value: t,
|
|
5523
5524
|
defaultValue: n,
|
|
5524
5525
|
onValueChange: a,
|
|
5525
5526
|
onValidate: o,
|
|
5526
5527
|
onInvalid: s,
|
|
5527
|
-
displayValue: i = (
|
|
5528
|
+
displayValue: i = (N) => N.toString(),
|
|
5528
5529
|
addOnPaste: u = !1,
|
|
5529
5530
|
addOnTab: f = !1,
|
|
5530
5531
|
disabled: p = !1,
|
|
@@ -5534,197 +5535,197 @@ var Fl = Ml, Np = Vl, Ze = kl, Ep = xp, Ae = vp, Ip = zt, $l = yp, Ap = Dl, Rp =
|
|
|
5534
5535
|
delimiter: C = ",",
|
|
5535
5536
|
max: h = Number.POSITIVE_INFINITY,
|
|
5536
5537
|
readOnly: _ = !1,
|
|
5537
|
-
required:
|
|
5538
|
+
required: A = !1,
|
|
5538
5539
|
name: y,
|
|
5539
|
-
children:
|
|
5540
|
-
dir:
|
|
5541
|
-
id:
|
|
5542
|
-
...
|
|
5543
|
-
} = e, [
|
|
5540
|
+
children: R,
|
|
5541
|
+
dir: ee,
|
|
5542
|
+
id: H,
|
|
5543
|
+
...Z
|
|
5544
|
+
} = e, [T = [], le] = Rp({
|
|
5544
5545
|
prop: t,
|
|
5545
5546
|
defaultProp: n,
|
|
5546
5547
|
onChange: a
|
|
5547
|
-
}), [
|
|
5548
|
+
}), [W, Y] = l.useState(
|
|
5548
5549
|
null
|
|
5549
|
-
), [
|
|
5550
|
+
), [ce, F] = l.useState(null), [G, z] = l.useState(!1), te = l.useRef(null), J = l.useRef(null), ie = Ft(), ue = Ft(), V = Ft(), oe = Tp(ee), { getEnabledItems: de } = Dp({
|
|
5550
5551
|
ref: te
|
|
5551
|
-
}), { isFormControl: S, onTriggerChange: L } = Mp(),
|
|
5552
|
+
}), { isFormControl: S, onTriggerChange: L } = Mp(), K = Ap(
|
|
5552
5553
|
r,
|
|
5553
5554
|
te,
|
|
5554
|
-
(
|
|
5555
|
-
),
|
|
5556
|
-
(
|
|
5555
|
+
(N) => L(N)
|
|
5556
|
+
), O = l.useCallback(
|
|
5557
|
+
(N, $) => {
|
|
5557
5558
|
if (p || _) return !1;
|
|
5558
|
-
if (u && (
|
|
5559
|
-
const ge =
|
|
5560
|
-
if (
|
|
5561
|
-
return s == null || s(
|
|
5559
|
+
if (u && ($ != null && $.viaPaste)) {
|
|
5560
|
+
const ge = N.split(C).map((d) => d.trim()).filter(Boolean);
|
|
5561
|
+
if (T.length + ge.length > h && h > 0)
|
|
5562
|
+
return s == null || s(N), !1;
|
|
5562
5563
|
let Fe = [];
|
|
5563
5564
|
for (const d of ge)
|
|
5564
|
-
|
|
5565
|
-
Fe = [...new Set(ge.filter((d) => !
|
|
5565
|
+
T.includes(d) && (s == null || s(d));
|
|
5566
|
+
Fe = [...new Set(ge.filter((d) => !T.includes(d)))];
|
|
5566
5567
|
const $e = Fe.filter(
|
|
5567
5568
|
(d) => !o || o(d)
|
|
5568
5569
|
);
|
|
5569
|
-
return $e.length === 0 ? !1 : (
|
|
5570
|
+
return $e.length === 0 ? !1 : (le([...T, ...$e]), !0);
|
|
5570
5571
|
}
|
|
5571
|
-
if (
|
|
5572
|
-
return s == null || s(
|
|
5573
|
-
const
|
|
5574
|
-
if (o && !o(
|
|
5575
|
-
return
|
|
5576
|
-
if (
|
|
5577
|
-
return
|
|
5578
|
-
const xe =
|
|
5579
|
-
return
|
|
5572
|
+
if (T.length >= h && h > 0)
|
|
5573
|
+
return s == null || s(N), !1;
|
|
5574
|
+
const ne = N.trim();
|
|
5575
|
+
if (o && !o(ne))
|
|
5576
|
+
return z(!0), s == null || s(ne), !1;
|
|
5577
|
+
if (T.some((ge) => ge === ne))
|
|
5578
|
+
return z(!0), s == null || s(ne), !0;
|
|
5579
|
+
const xe = ne, pe = [...T, xe];
|
|
5580
|
+
return le(pe), Y(null), F(null), z(!1), !0;
|
|
5580
5581
|
},
|
|
5581
5582
|
[
|
|
5582
|
-
|
|
5583
|
+
T,
|
|
5583
5584
|
h,
|
|
5584
5585
|
u,
|
|
5585
5586
|
C,
|
|
5586
|
-
|
|
5587
|
+
le,
|
|
5587
5588
|
s,
|
|
5588
5589
|
o,
|
|
5589
5590
|
p,
|
|
5590
5591
|
_
|
|
5591
5592
|
]
|
|
5592
|
-
),
|
|
5593
|
-
(
|
|
5594
|
-
if (!(p || _) &&
|
|
5595
|
-
const
|
|
5596
|
-
if (
|
|
5597
|
-
|
|
5593
|
+
), q = l.useCallback(
|
|
5594
|
+
(N, $) => {
|
|
5595
|
+
if (!(p || _) && N !== -1) {
|
|
5596
|
+
const ne = $.trim();
|
|
5597
|
+
if (T.some((ge, Fe) => Fe === N ? !1 : ge === ne)) {
|
|
5598
|
+
z(!0), s == null || s(ne);
|
|
5598
5599
|
return;
|
|
5599
5600
|
}
|
|
5600
|
-
if (o && !o(
|
|
5601
|
-
|
|
5601
|
+
if (o && !o(ne)) {
|
|
5602
|
+
z(!0), s == null || s(ne);
|
|
5602
5603
|
return;
|
|
5603
5604
|
}
|
|
5604
|
-
const xe = i(
|
|
5605
|
-
|
|
5605
|
+
const xe = i(ne), pe = [...T];
|
|
5606
|
+
pe[N] = xe, le(pe), Y(N), F(null), z(!1), requestAnimationFrame(() => {
|
|
5606
5607
|
var ge;
|
|
5607
|
-
return (ge =
|
|
5608
|
+
return (ge = J.current) == null ? void 0 : ge.focus();
|
|
5608
5609
|
});
|
|
5609
5610
|
}
|
|
5610
5611
|
},
|
|
5611
|
-
[
|
|
5612
|
+
[T, le, i, s, o, p, _]
|
|
5612
5613
|
), E = l.useCallback(
|
|
5613
|
-
(
|
|
5614
|
-
var
|
|
5615
|
-
if (!(p || _) &&
|
|
5616
|
-
const
|
|
5617
|
-
|
|
5614
|
+
(N) => {
|
|
5615
|
+
var $;
|
|
5616
|
+
if (!(p || _) && N !== -1) {
|
|
5617
|
+
const ne = [...T];
|
|
5618
|
+
ne.splice(N, 1), le(ne), Y(null), F(null), ($ = J.current) == null || $.focus();
|
|
5618
5619
|
}
|
|
5619
5620
|
},
|
|
5620
|
-
[
|
|
5621
|
-
),
|
|
5622
|
-
var
|
|
5623
|
-
|
|
5624
|
-
}, []),
|
|
5625
|
-
(
|
|
5626
|
-
const
|
|
5627
|
-
if (!(
|
|
5628
|
-
const
|
|
5629
|
-
if (
|
|
5630
|
-
|
|
5621
|
+
[T, le, p, _]
|
|
5622
|
+
), U = l.useCallback(() => {
|
|
5623
|
+
var N;
|
|
5624
|
+
Y(null), F(null), (N = J.current) == null || N.focus();
|
|
5625
|
+
}, []), re = l.useCallback(
|
|
5626
|
+
(N) => {
|
|
5627
|
+
const $ = N.target;
|
|
5628
|
+
if (!($ instanceof HTMLInputElement)) return;
|
|
5629
|
+
const ne = N.key === "ArrowLeft" && oe === "ltr" || N.key === "ArrowRight" && oe === "rtl", we = N.key === "ArrowRight" && oe === "ltr" || N.key === "ArrowLeft" && oe === "rtl";
|
|
5630
|
+
if ($.value && $.selectionStart !== 0) {
|
|
5631
|
+
Y(null), F(null);
|
|
5631
5632
|
return;
|
|
5632
5633
|
}
|
|
5633
|
-
function xe(
|
|
5634
|
+
function xe(pe, ge) {
|
|
5634
5635
|
if (!te.current) return null;
|
|
5635
|
-
const d =
|
|
5636
|
+
const d = de().map((b, M) => M);
|
|
5636
5637
|
if (d.length === 0) return null;
|
|
5637
|
-
if (
|
|
5638
|
+
if (pe === null)
|
|
5638
5639
|
return ge === "prev" ? d[d.length - 1] ?? null : d[0] ?? null;
|
|
5639
|
-
const v = d.indexOf(
|
|
5640
|
+
const v = d.indexOf(pe);
|
|
5640
5641
|
return ge === "next" ? v >= d.length - 1 ? g ? d[0] ?? null : null : d[v + 1] ?? null : v <= 0 ? g ? d[d.length - 1] ?? null : null : d[v - 1] ?? null;
|
|
5641
5642
|
}
|
|
5642
|
-
switch (
|
|
5643
|
+
switch (N.key) {
|
|
5643
5644
|
case "Delete":
|
|
5644
5645
|
case "Backspace": {
|
|
5645
|
-
if (
|
|
5646
|
-
if (
|
|
5647
|
-
const
|
|
5648
|
-
E(
|
|
5649
|
-
} else if (
|
|
5650
|
-
const
|
|
5651
|
-
|
|
5646
|
+
if ($.selectionStart !== 0 || $.selectionEnd !== 0) break;
|
|
5647
|
+
if (W !== null) {
|
|
5648
|
+
const pe = xe(W, "prev");
|
|
5649
|
+
E(W), Y(pe), N.preventDefault();
|
|
5650
|
+
} else if (N.key === "Backspace" && T.length > 0) {
|
|
5651
|
+
const pe = xe(null, "prev");
|
|
5652
|
+
Y(pe), N.preventDefault();
|
|
5652
5653
|
}
|
|
5653
5654
|
break;
|
|
5654
5655
|
}
|
|
5655
5656
|
case "Enter": {
|
|
5656
|
-
if (
|
|
5657
|
-
F(
|
|
5657
|
+
if (W !== null && m && !p) {
|
|
5658
|
+
F(W), N.preventDefault();
|
|
5658
5659
|
return;
|
|
5659
5660
|
}
|
|
5660
5661
|
break;
|
|
5661
5662
|
}
|
|
5662
5663
|
case "ArrowLeft":
|
|
5663
5664
|
case "ArrowRight": {
|
|
5664
|
-
if (
|
|
5665
|
-
const
|
|
5666
|
-
|
|
5667
|
-
} else if (
|
|
5668
|
-
const
|
|
5669
|
-
|
|
5670
|
-
|
|
5665
|
+
if ($.selectionStart === 0 && ne && W === null && T.length > 0) {
|
|
5666
|
+
const pe = xe(null, "prev");
|
|
5667
|
+
Y(pe), N.preventDefault();
|
|
5668
|
+
} else if (W !== null) {
|
|
5669
|
+
const pe = xe(
|
|
5670
|
+
W,
|
|
5671
|
+
ne ? "prev" : "next"
|
|
5671
5672
|
);
|
|
5672
|
-
|
|
5673
|
+
pe !== null ? (Y(pe), N.preventDefault()) : we && (Y(null), requestAnimationFrame(() => $.setSelectionRange(0, 0)));
|
|
5673
5674
|
}
|
|
5674
5675
|
break;
|
|
5675
5676
|
}
|
|
5676
5677
|
case "Home": {
|
|
5677
|
-
if (
|
|
5678
|
-
const
|
|
5679
|
-
|
|
5678
|
+
if (W !== null) {
|
|
5679
|
+
const pe = xe(null, "next");
|
|
5680
|
+
Y(pe), N.preventDefault();
|
|
5680
5681
|
}
|
|
5681
5682
|
break;
|
|
5682
5683
|
}
|
|
5683
5684
|
case "End": {
|
|
5684
|
-
if (
|
|
5685
|
-
const
|
|
5686
|
-
|
|
5685
|
+
if (W !== null) {
|
|
5686
|
+
const pe = xe(null, "prev");
|
|
5687
|
+
Y(pe), N.preventDefault();
|
|
5687
5688
|
}
|
|
5688
5689
|
break;
|
|
5689
5690
|
}
|
|
5690
5691
|
case "Escape": {
|
|
5691
|
-
|
|
5692
|
+
W !== null && Y(null), ce !== null && F(null), requestAnimationFrame(() => $.setSelectionRange(0, 0));
|
|
5692
5693
|
break;
|
|
5693
5694
|
}
|
|
5694
5695
|
}
|
|
5695
5696
|
},
|
|
5696
5697
|
[
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5698
|
+
oe,
|
|
5699
|
+
ce,
|
|
5700
|
+
W,
|
|
5701
|
+
T,
|
|
5701
5702
|
E,
|
|
5702
|
-
|
|
5703
|
+
de,
|
|
5703
5704
|
m,
|
|
5704
5705
|
p,
|
|
5705
5706
|
g
|
|
5706
5707
|
]
|
|
5707
|
-
),
|
|
5708
|
-
var
|
|
5709
|
-
return ((
|
|
5708
|
+
), B = l.useCallback((N) => {
|
|
5709
|
+
var $;
|
|
5710
|
+
return (($ = te.current) == null ? void 0 : $.contains(N)) && !N.hasAttribute(Fl) && N.tagName !== "INPUT";
|
|
5710
5711
|
}, []);
|
|
5711
5712
|
return /* @__PURE__ */ l.createElement(
|
|
5712
5713
|
Pp,
|
|
5713
5714
|
{
|
|
5714
|
-
value:
|
|
5715
|
-
onValueChange:
|
|
5716
|
-
onItemAdd:
|
|
5715
|
+
value: T,
|
|
5716
|
+
onValueChange: le,
|
|
5717
|
+
onItemAdd: O,
|
|
5717
5718
|
onItemRemove: E,
|
|
5718
|
-
onItemUpdate:
|
|
5719
|
-
onInputKeydown:
|
|
5720
|
-
highlightedIndex:
|
|
5721
|
-
setHighlightedIndex:
|
|
5722
|
-
editingIndex:
|
|
5719
|
+
onItemUpdate: q,
|
|
5720
|
+
onInputKeydown: re,
|
|
5721
|
+
highlightedIndex: W,
|
|
5722
|
+
setHighlightedIndex: Y,
|
|
5723
|
+
editingIndex: ce,
|
|
5723
5724
|
setEditingIndex: F,
|
|
5724
5725
|
displayValue: i,
|
|
5725
|
-
onItemLeave:
|
|
5726
|
-
inputRef:
|
|
5727
|
-
isInvalidInput:
|
|
5726
|
+
onItemLeave: U,
|
|
5727
|
+
inputRef: J,
|
|
5728
|
+
isInvalidInput: G,
|
|
5728
5729
|
addOnPaste: u,
|
|
5729
5730
|
addOnTab: f,
|
|
5730
5731
|
disabled: p,
|
|
@@ -5734,45 +5735,45 @@ var Fl = Ml, Np = Vl, Ze = kl, Ep = xp, Ae = vp, Ip = zt, $l = yp, Ap = Dl, Rp =
|
|
|
5734
5735
|
blurBehavior: w,
|
|
5735
5736
|
delimiter: C,
|
|
5736
5737
|
max: h,
|
|
5737
|
-
dir:
|
|
5738
|
-
id:
|
|
5738
|
+
dir: oe,
|
|
5739
|
+
id: ie,
|
|
5739
5740
|
inputId: ue,
|
|
5740
|
-
labelId:
|
|
5741
|
+
labelId: V
|
|
5741
5742
|
},
|
|
5742
5743
|
/* @__PURE__ */ l.createElement(
|
|
5743
5744
|
Ze.div,
|
|
5744
5745
|
{
|
|
5745
|
-
id:
|
|
5746
|
+
id: ie,
|
|
5746
5747
|
"data-disabled": p ? "" : void 0,
|
|
5747
|
-
"data-invalid":
|
|
5748
|
+
"data-invalid": G ? "" : void 0,
|
|
5748
5749
|
"data-readonly": _ ? "" : void 0,
|
|
5749
|
-
dir:
|
|
5750
|
-
...
|
|
5751
|
-
ref:
|
|
5752
|
-
onClick:
|
|
5753
|
-
var
|
|
5754
|
-
const
|
|
5755
|
-
|
|
5750
|
+
dir: oe,
|
|
5751
|
+
...Z,
|
|
5752
|
+
ref: K,
|
|
5753
|
+
onClick: Re(Z.onClick, (N) => {
|
|
5754
|
+
var ne;
|
|
5755
|
+
const $ = N.target;
|
|
5756
|
+
$ instanceof HTMLElement && B($) && document.activeElement !== J.current && (N.currentTarget.focus(), (ne = J.current) == null || ne.focus());
|
|
5756
5757
|
}),
|
|
5757
|
-
onMouseDown:
|
|
5758
|
-
const
|
|
5759
|
-
|
|
5758
|
+
onMouseDown: Re(Z.onMouseDown, (N) => {
|
|
5759
|
+
const $ = N.target;
|
|
5760
|
+
$ instanceof HTMLElement && B($) && N.preventDefault();
|
|
5760
5761
|
}),
|
|
5761
|
-
onBlur:
|
|
5762
|
-
var
|
|
5763
|
-
|
|
5762
|
+
onBlur: Re(Z.onBlur, (N) => {
|
|
5763
|
+
var $;
|
|
5764
|
+
N.relatedTarget !== J.current && !(($ = te.current) != null && $.contains(N.relatedTarget)) && requestAnimationFrame(() => Y(null));
|
|
5764
5765
|
})
|
|
5765
5766
|
},
|
|
5766
|
-
typeof
|
|
5767
|
+
typeof R == "function" ? /* @__PURE__ */ l.createElement(l.Fragment, null, R({ value: T })) : R,
|
|
5767
5768
|
S && y && /* @__PURE__ */ l.createElement(
|
|
5768
5769
|
Ep,
|
|
5769
5770
|
{
|
|
5770
5771
|
type: "hidden",
|
|
5771
5772
|
control: te.current,
|
|
5772
5773
|
name: y,
|
|
5773
|
-
value:
|
|
5774
|
+
value: T,
|
|
5774
5775
|
disabled: p,
|
|
5775
|
-
required:
|
|
5776
|
+
required: A
|
|
5776
5777
|
}
|
|
5777
5778
|
)
|
|
5778
5779
|
)
|
|
@@ -5827,26 +5828,26 @@ var Kl = Gl, _n = "TagsInputItem", [jp, Nn] = $l(_n), Wl = l.forwardRef(
|
|
|
5827
5828
|
"data-disabled": g ? "" : void 0,
|
|
5828
5829
|
...a,
|
|
5829
5830
|
ref: r,
|
|
5830
|
-
onClick:
|
|
5831
|
+
onClick: Re(a.onClick, (h) => {
|
|
5831
5832
|
h.stopPropagation(), !m && o.current !== "mouse" && C();
|
|
5832
5833
|
}),
|
|
5833
|
-
onDoubleClick:
|
|
5834
|
+
onDoubleClick: Re(a.onDoubleClick, () => {
|
|
5834
5835
|
s.editable && !g && requestAnimationFrame(() => s.setEditingIndex(f));
|
|
5835
5836
|
}),
|
|
5836
|
-
onPointerUp:
|
|
5837
|
+
onPointerUp: Re(a.onPointerUp, () => {
|
|
5837
5838
|
o.current === "mouse" && C();
|
|
5838
5839
|
}),
|
|
5839
|
-
onPointerDown:
|
|
5840
|
+
onPointerDown: Re(
|
|
5840
5841
|
a.onPointerDown,
|
|
5841
5842
|
(h) => o.current = h.pointerType
|
|
5842
5843
|
),
|
|
5843
|
-
onPointerMove:
|
|
5844
|
+
onPointerMove: Re(
|
|
5844
5845
|
a.onPointerMove,
|
|
5845
5846
|
(h) => {
|
|
5846
5847
|
o.current = h.pointerType, n ? s.onItemLeave() : o.current === "mouse" && h.currentTarget.focus({ preventScroll: !0 });
|
|
5847
5848
|
}
|
|
5848
5849
|
),
|
|
5849
|
-
onPointerLeave:
|
|
5850
|
+
onPointerLeave: Re(
|
|
5850
5851
|
a.onPointerLeave,
|
|
5851
5852
|
(h) => {
|
|
5852
5853
|
h.currentTarget === document.activeElement && s.onItemLeave();
|
|
@@ -5901,7 +5902,7 @@ var zl = Wl, ql = "TagsInputInput", Yl = l.forwardRef(
|
|
|
5901
5902
|
readOnly: a.readOnly,
|
|
5902
5903
|
...n,
|
|
5903
5904
|
ref: Ip(a.inputRef, r),
|
|
5904
|
-
onBlur:
|
|
5905
|
+
onBlur: Re(n.onBlur, (i) => {
|
|
5905
5906
|
if (!a.readOnly) {
|
|
5906
5907
|
if (a.blurBehavior === "add") {
|
|
5907
5908
|
const u = i.target.value;
|
|
@@ -5910,7 +5911,7 @@ var zl = Wl, ql = "TagsInputInput", Yl = l.forwardRef(
|
|
|
5910
5911
|
a.blurBehavior === "clear" && (i.target.value = "");
|
|
5911
5912
|
}
|
|
5912
5913
|
}),
|
|
5913
|
-
onChange:
|
|
5914
|
+
onChange: Re(n.onChange, (i) => {
|
|
5914
5915
|
if (a.readOnly) return;
|
|
5915
5916
|
const u = i.target;
|
|
5916
5917
|
if (!(u instanceof HTMLInputElement)) return;
|
|
@@ -5919,10 +5920,10 @@ var zl = Wl, ql = "TagsInputInput", Yl = l.forwardRef(
|
|
|
5919
5920
|
u.value = "", p && (a.onItemAdd(p), a.setHighlightedIndex(null));
|
|
5920
5921
|
}
|
|
5921
5922
|
}),
|
|
5922
|
-
onKeyDown:
|
|
5923
|
+
onKeyDown: Re(n.onKeyDown, (i) => {
|
|
5923
5924
|
a.readOnly || (i.key === "Enter" && s(i), i.key === "Tab" && o(i), a.onInputKeydown(i), i.key.length === 1 && a.setHighlightedIndex(null));
|
|
5924
5925
|
}),
|
|
5925
|
-
onPaste:
|
|
5926
|
+
onPaste: Re(n.onPaste, (i) => {
|
|
5926
5927
|
if (!a.readOnly && a.addOnPaste) {
|
|
5927
5928
|
i.preventDefault();
|
|
5928
5929
|
const u = i.clipboardData.getData("text");
|
|
@@ -5948,7 +5949,7 @@ var Xl = Yl, Lr = "TagsInputItemDelete", Zl = l.forwardRef((e, r) => {
|
|
|
5948
5949
|
"data-disabled": a ? "" : void 0,
|
|
5949
5950
|
...e,
|
|
5950
5951
|
ref: r,
|
|
5951
|
-
onClick:
|
|
5952
|
+
onClick: Re(e.onClick, () => {
|
|
5952
5953
|
if (a) return;
|
|
5953
5954
|
const o = t.value.findIndex((s) => s === n.value);
|
|
5954
5955
|
t.onItemRemove(o);
|
|
@@ -6036,7 +6037,7 @@ var Jl = "TagsInputClear", Ql = l.forwardRef(
|
|
|
6036
6037
|
"data-disabled": a.disabled ? "" : void 0,
|
|
6037
6038
|
...n,
|
|
6038
6039
|
ref: r,
|
|
6039
|
-
onClick:
|
|
6040
|
+
onClick: Re(e.onClick, () => {
|
|
6040
6041
|
var o;
|
|
6041
6042
|
a.disabled || (a.onValueChange([]), (o = a.inputRef.current) == null || o.focus());
|
|
6042
6043
|
})
|
|
@@ -6051,7 +6052,7 @@ const $p = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
6051
6052
|
{
|
|
6052
6053
|
"data-slot": "tags-input",
|
|
6053
6054
|
ref: t,
|
|
6054
|
-
className:
|
|
6055
|
+
className: k("al-flex al-w-[380px] al-flex-col al-gap-2", e),
|
|
6055
6056
|
...r
|
|
6056
6057
|
}
|
|
6057
6058
|
));
|
|
@@ -6061,7 +6062,7 @@ const Lp = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
6061
6062
|
{
|
|
6062
6063
|
"data-slot": "tags-input-label",
|
|
6063
6064
|
ref: t,
|
|
6064
|
-
className:
|
|
6065
|
+
className: k(
|
|
6065
6066
|
"al-font-medium al-text-sm al-leading-none peer-disabled:al-cursor-not-allowed peer-disabled:al-opacity-70",
|
|
6066
6067
|
e
|
|
6067
6068
|
),
|
|
@@ -6075,7 +6076,7 @@ const Up = l.forwardRef(
|
|
|
6075
6076
|
{
|
|
6076
6077
|
"data-slot": "tags-input-list",
|
|
6077
6078
|
ref: t,
|
|
6078
|
-
className:
|
|
6079
|
+
className: k(
|
|
6079
6080
|
"al-flex al-min-h-10 al-w-full al-flex-wrap al-items-center al-gap-1.5 al-rounded-md al-border al-border-input al-bg-background al-px-3 al-py-2 al-text-sm",
|
|
6080
6081
|
"focus-within:al-outline-none focus-within:al-ring-2 focus-within:al-ring-ring focus-within:al-ring-offset-2",
|
|
6081
6082
|
"disabled:al-cursor-not-allowed disabled:al-opacity-50",
|
|
@@ -6091,7 +6092,7 @@ const Bp = l.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ c.jsx(
|
|
|
6091
6092
|
{
|
|
6092
6093
|
"data-slot": "tags-input-input",
|
|
6093
6094
|
ref: t,
|
|
6094
|
-
className:
|
|
6095
|
+
className: k(
|
|
6095
6096
|
"al-flex-1 al-bg-transparent al-outline-none",
|
|
6096
6097
|
"placeholder:al-text-muted-foreground",
|
|
6097
6098
|
"disabled:al-cursor-not-allowed disabled:al-opacity-50",
|
|
@@ -6108,7 +6109,7 @@ const Hp = l.forwardRef(({ className: e, children: r, ...t }, n) => /* @__PURE__
|
|
|
6108
6109
|
{
|
|
6109
6110
|
"data-slot": "tags-input-item",
|
|
6110
6111
|
ref: n,
|
|
6111
|
-
className:
|
|
6112
|
+
className: k(
|
|
6112
6113
|
"al-inline-flex al-max-w-[calc(100%-8px)] al-items-center al-gap-1.5 al-rounded al-border al-bg-transparent al-px-2 al-py-1 al-text-sm focus:al-outline-hidden data-disabled:al-cursor-not-allowed data-editable:al-select-none data-editing:al-bg-transparent data-disabled:al-opacity-50 data-editing:al-ring-1 data-editing:al-ring-ring [&:not([data-editing])]:al-pr-1.5 [&[data-highlighted]:not([data-editing])]:al-bg-accent [&[data-highlighted]:not([data-editing])]:al-text-accent-foreground",
|
|
6113
6114
|
e
|
|
6114
6115
|
),
|
|
@@ -6181,7 +6182,7 @@ export {
|
|
|
6181
6182
|
Bp as aQ,
|
|
6182
6183
|
Hp as aR,
|
|
6183
6184
|
Gp as aS,
|
|
6184
|
-
|
|
6185
|
+
D as aT,
|
|
6185
6186
|
me as aU,
|
|
6186
6187
|
jf as aV,
|
|
6187
6188
|
Qu as aa,
|