@still-forest/canopy 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +17 -7
- package/dist/index.js +510 -465
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,7 +53,7 @@ function Eu(e, t) {
|
|
|
53
53
|
}
|
|
54
54
|
return [r, o];
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function De(e, t = []) {
|
|
57
57
|
let n = [];
|
|
58
58
|
function r(a, s) {
|
|
59
59
|
const i = m.createContext(s), c = n.length;
|
|
@@ -175,36 +175,36 @@ function Tu(e) {
|
|
|
175
175
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
176
176
|
}
|
|
177
177
|
function oa(e) {
|
|
178
|
-
const t = e + "CollectionProvider", [n, r] =
|
|
178
|
+
const t = e + "CollectionProvider", [n, r] = De(t), [o, a] = n(
|
|
179
179
|
t,
|
|
180
180
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
181
181
|
), s = (g) => {
|
|
182
|
-
const { scope: b, children: v } = g,
|
|
183
|
-
return /* @__PURE__ */ l.jsx(o, { scope: b, itemMap:
|
|
182
|
+
const { scope: b, children: v } = g, k = E.useRef(null), w = E.useRef(/* @__PURE__ */ new Map()).current;
|
|
183
|
+
return /* @__PURE__ */ l.jsx(o, { scope: b, itemMap: w, collectionRef: k, children: v });
|
|
184
184
|
};
|
|
185
185
|
s.displayName = t;
|
|
186
186
|
const i = e + "CollectionSlot", c = /* @__PURE__ */ Qt(i), d = E.forwardRef(
|
|
187
187
|
(g, b) => {
|
|
188
|
-
const { scope: v, children:
|
|
189
|
-
return /* @__PURE__ */ l.jsx(c, { ref:
|
|
188
|
+
const { scope: v, children: k } = g, w = a(i, v), y = ce(b, w.collectionRef);
|
|
189
|
+
return /* @__PURE__ */ l.jsx(c, { ref: y, children: k });
|
|
190
190
|
}
|
|
191
191
|
);
|
|
192
192
|
d.displayName = i;
|
|
193
193
|
const f = e + "CollectionItemSlot", u = "data-radix-collection-item", p = /* @__PURE__ */ Qt(f), h = E.forwardRef(
|
|
194
194
|
(g, b) => {
|
|
195
|
-
const { scope: v, children:
|
|
196
|
-
return E.useEffect(() => (j.itemMap.set(
|
|
195
|
+
const { scope: v, children: k, ...w } = g, y = E.useRef(null), N = ce(b, y), j = a(f, v);
|
|
196
|
+
return E.useEffect(() => (j.itemMap.set(y, { ref: y, ...w }), () => void j.itemMap.delete(y))), /* @__PURE__ */ l.jsx(p, { [u]: "", ref: N, children: k });
|
|
197
197
|
}
|
|
198
198
|
);
|
|
199
199
|
h.displayName = f;
|
|
200
200
|
function x(g) {
|
|
201
201
|
const b = a(e + "CollectionConsumer", g);
|
|
202
202
|
return E.useCallback(() => {
|
|
203
|
-
const
|
|
204
|
-
if (!
|
|
205
|
-
const
|
|
203
|
+
const k = b.collectionRef.current;
|
|
204
|
+
if (!k) return [];
|
|
205
|
+
const w = Array.from(k.querySelectorAll(`[${u}]`));
|
|
206
206
|
return Array.from(b.itemMap.values()).sort(
|
|
207
|
-
(j, S) =>
|
|
207
|
+
(j, S) => w.indexOf(j.ref.current) - w.indexOf(S.ref.current)
|
|
208
208
|
);
|
|
209
209
|
}, [b.collectionRef, b.itemMap]);
|
|
210
210
|
}
|
|
@@ -368,7 +368,7 @@ function Ne(e) {
|
|
|
368
368
|
n((r) => r ?? String(zu++));
|
|
369
369
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
370
370
|
}
|
|
371
|
-
var wr = "Collapsible", [Hu, ai] =
|
|
371
|
+
var wr = "Collapsible", [Hu, ai] = De(wr), [Vu, aa] = Hu(wr), si = m.forwardRef(
|
|
372
372
|
(e, t) => {
|
|
373
373
|
const {
|
|
374
374
|
__scopeCollapsible: n,
|
|
@@ -435,17 +435,17 @@ la.displayName = ia;
|
|
|
435
435
|
var Gu = m.forwardRef((e, t) => {
|
|
436
436
|
const { __scopeCollapsible: n, present: r, children: o, ...a } = e, s = aa(ia, n), [i, c] = m.useState(r), d = m.useRef(null), f = ce(t, d), u = m.useRef(0), p = u.current, h = m.useRef(0), x = h.current, g = s.open || i, b = m.useRef(g), v = m.useRef(void 0);
|
|
437
437
|
return m.useEffect(() => {
|
|
438
|
-
const
|
|
439
|
-
return () => cancelAnimationFrame(
|
|
438
|
+
const k = requestAnimationFrame(() => b.current = !1);
|
|
439
|
+
return () => cancelAnimationFrame(k);
|
|
440
440
|
}, []), lt(() => {
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
441
|
+
const k = d.current;
|
|
442
|
+
if (k) {
|
|
443
443
|
v.current = v.current || {
|
|
444
|
-
transitionDuration:
|
|
445
|
-
animationName:
|
|
446
|
-
},
|
|
447
|
-
const
|
|
448
|
-
u.current =
|
|
444
|
+
transitionDuration: k.style.transitionDuration,
|
|
445
|
+
animationName: k.style.animationName
|
|
446
|
+
}, k.style.transitionDuration = "0s", k.style.animationName = "none";
|
|
447
|
+
const w = k.getBoundingClientRect();
|
|
448
|
+
u.current = w.height, h.current = w.width, b.current || (k.style.transitionDuration = v.current.transitionDuration, k.style.animationName = v.current.animationName), c(r);
|
|
449
449
|
}
|
|
450
450
|
}, [s.open, r]), /* @__PURE__ */ l.jsx(
|
|
451
451
|
X.div,
|
|
@@ -473,7 +473,7 @@ function Tn(e) {
|
|
|
473
473
|
const t = m.useContext(qu);
|
|
474
474
|
return e || t || "ltr";
|
|
475
475
|
}
|
|
476
|
-
var ze = "Accordion", Ku = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [da, Zu, Xu] = oa(ze), [kr, EC] =
|
|
476
|
+
var ze = "Accordion", Ku = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [da, Zu, Xu] = oa(ze), [kr, EC] = De(ze, [
|
|
477
477
|
Xu,
|
|
478
478
|
ai
|
|
479
479
|
]), ua = ai(), ci = E.forwardRef(
|
|
@@ -548,18 +548,18 @@ var [di, Qu] = kr(ze), [ui, Ju] = kr(
|
|
|
548
548
|
const x = h.target, g = d().filter((M) => !M.ref.current?.disabled), b = g.findIndex((M) => M.ref.current === x), v = g.length;
|
|
549
549
|
if (b === -1) return;
|
|
550
550
|
h.preventDefault();
|
|
551
|
-
let
|
|
552
|
-
const
|
|
553
|
-
|
|
551
|
+
let k = b;
|
|
552
|
+
const w = 0, y = v - 1, N = () => {
|
|
553
|
+
k = b + 1, k > y && (k = w);
|
|
554
554
|
}, j = () => {
|
|
555
|
-
|
|
555
|
+
k = b - 1, k < w && (k = y);
|
|
556
556
|
};
|
|
557
557
|
switch (h.key) {
|
|
558
558
|
case "Home":
|
|
559
|
-
|
|
559
|
+
k = w;
|
|
560
560
|
break;
|
|
561
561
|
case "End":
|
|
562
|
-
|
|
562
|
+
k = y;
|
|
563
563
|
break;
|
|
564
564
|
case "ArrowRight":
|
|
565
565
|
a === "horizontal" && (u ? N() : j());
|
|
@@ -574,7 +574,7 @@ var [di, Qu] = kr(ze), [ui, Ju] = kr(
|
|
|
574
574
|
a === "vertical" && j();
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
|
-
const S =
|
|
577
|
+
const S = k % v;
|
|
578
578
|
g[S].ref.current?.focus();
|
|
579
579
|
});
|
|
580
580
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -1437,14 +1437,14 @@ const pa = "-", Mm = (e) => {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
b = !1;
|
|
1439
1439
|
}
|
|
1440
|
-
const
|
|
1441
|
-
if (s.includes(
|
|
1440
|
+
const k = a(p).join(":"), w = h ? k + Fo : k, y = w + v;
|
|
1441
|
+
if (s.includes(y))
|
|
1442
1442
|
continue;
|
|
1443
|
-
s.push(
|
|
1443
|
+
s.push(y);
|
|
1444
1444
|
const N = o(v, b);
|
|
1445
1445
|
for (let j = 0; j < N.length; ++j) {
|
|
1446
1446
|
const S = N[j];
|
|
1447
|
-
s.push(
|
|
1447
|
+
s.push(w + S);
|
|
1448
1448
|
}
|
|
1449
1449
|
c = f + (c.length > 0 ? " " + c : c);
|
|
1450
1450
|
}
|
|
@@ -1496,7 +1496,7 @@ const ve = (e) => {
|
|
|
1496
1496
|
const r = Ri.exec(e);
|
|
1497
1497
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
1498
1498
|
}, Pi = (e) => e === "position" || e === "percentage", Ai = (e) => e === "image" || e === "url", _i = (e) => e === "length" || e === "size" || e === "bg-size", Ii = (e) => e === "length", rp = (e) => e === "number", op = (e) => e === "family-name", $i = (e) => e === "shadow", ap = () => {
|
|
1499
|
-
const e = ve("color"), t = ve("font"), n = ve("text"), r = ve("font-weight"), o = ve("tracking"), a = ve("leading"), s = ve("breakpoint"), i = ve("container"), c = ve("spacing"), d = ve("radius"), f = ve("shadow"), u = ve("inset-shadow"), p = ve("text-shadow"), h = ve("drop-shadow"), x = ve("blur"), g = ve("perspective"), b = ve("aspect"), v = ve("ease"),
|
|
1499
|
+
const e = ve("color"), t = ve("font"), n = ve("text"), r = ve("font-weight"), o = ve("tracking"), a = ve("leading"), s = ve("breakpoint"), i = ve("container"), c = ve("spacing"), d = ve("radius"), f = ve("shadow"), u = ve("inset-shadow"), p = ve("text-shadow"), h = ve("drop-shadow"), x = ve("blur"), g = ve("perspective"), b = ve("aspect"), v = ve("ease"), k = ve("animate"), w = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], y = () => [
|
|
1500
1500
|
"center",
|
|
1501
1501
|
"top",
|
|
1502
1502
|
"bottom",
|
|
@@ -1514,9 +1514,9 @@ const ve = (e) => {
|
|
|
1514
1514
|
"bottom-left",
|
|
1515
1515
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1516
1516
|
"left-bottom"
|
|
1517
|
-
], N = () => [...
|
|
1517
|
+
], N = () => [...y(), B, L], j = () => ["auto", "hidden", "clip", "visible", "scroll"], S = () => ["auto", "contain", "none"], M = () => [B, L, c], R = () => [zt, "full", "auto", ...M()], _ = () => [ht, "none", "subgrid", B, L], P = () => ["auto", {
|
|
1518
1518
|
span: ["full", ht, B, L]
|
|
1519
|
-
}, ht, B, L], z = () => [ht, "auto", B, L], T = () => ["auto", "min", "max", "fr", B, L], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Y = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], F = () => ["auto", ...M()], H = () => [zt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...M()], D = () => [e, B, L], Q = () => [...
|
|
1519
|
+
}, ht, B, L], z = () => [ht, "auto", B, L], T = () => ["auto", "min", "max", "fr", B, L], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Y = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], F = () => ["auto", ...M()], H = () => [zt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...M()], D = () => [e, B, L], Q = () => [...y(), rs, ns, {
|
|
1520
1520
|
position: [B, L]
|
|
1521
1521
|
}], se = () => ["no-repeat", {
|
|
1522
1522
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -1537,7 +1537,7 @@ const ve = (e) => {
|
|
|
1537
1537
|
x,
|
|
1538
1538
|
B,
|
|
1539
1539
|
L
|
|
1540
|
-
], ie = () => ["none", oe, B, L], xe = () => ["none", oe, B, L],
|
|
1540
|
+
], ie = () => ["none", oe, B, L], xe = () => ["none", oe, B, L], Me = () => [oe, B, L], $e = () => [zt, "full", ...M()];
|
|
1541
1541
|
return {
|
|
1542
1542
|
cacheSize: 500,
|
|
1543
1543
|
theme: {
|
|
@@ -1590,14 +1590,14 @@ const ve = (e) => {
|
|
|
1590
1590
|
* @see https://tailwindcss.com/docs/break-after
|
|
1591
1591
|
*/
|
|
1592
1592
|
"break-after": [{
|
|
1593
|
-
"break-after":
|
|
1593
|
+
"break-after": w()
|
|
1594
1594
|
}],
|
|
1595
1595
|
/**
|
|
1596
1596
|
* Break Before
|
|
1597
1597
|
* @see https://tailwindcss.com/docs/break-before
|
|
1598
1598
|
*/
|
|
1599
1599
|
"break-before": [{
|
|
1600
|
-
"break-before":
|
|
1600
|
+
"break-before": w()
|
|
1601
1601
|
}],
|
|
1602
1602
|
/**
|
|
1603
1603
|
* Break Inside
|
|
@@ -3130,7 +3130,7 @@ const ve = (e) => {
|
|
|
3130
3130
|
}]
|
|
3131
3131
|
}],
|
|
3132
3132
|
"mask-image-radial-pos": [{
|
|
3133
|
-
"mask-radial-at":
|
|
3133
|
+
"mask-radial-at": y()
|
|
3134
3134
|
}],
|
|
3135
3135
|
"mask-image-conic-pos": [{
|
|
3136
3136
|
"mask-conic": [oe]
|
|
@@ -3453,7 +3453,7 @@ const ve = (e) => {
|
|
|
3453
3453
|
* @see https://tailwindcss.com/docs/animation
|
|
3454
3454
|
*/
|
|
3455
3455
|
animate: [{
|
|
3456
|
-
animate: ["none",
|
|
3456
|
+
animate: ["none", k, B, L]
|
|
3457
3457
|
}],
|
|
3458
3458
|
// ------------------
|
|
3459
3459
|
// --- Transforms ---
|
|
@@ -3545,21 +3545,21 @@ const ve = (e) => {
|
|
|
3545
3545
|
* @see https://tailwindcss.com/docs/skew
|
|
3546
3546
|
*/
|
|
3547
3547
|
skew: [{
|
|
3548
|
-
skew:
|
|
3548
|
+
skew: Me()
|
|
3549
3549
|
}],
|
|
3550
3550
|
/**
|
|
3551
3551
|
* Skew X
|
|
3552
3552
|
* @see https://tailwindcss.com/docs/skew
|
|
3553
3553
|
*/
|
|
3554
3554
|
"skew-x": [{
|
|
3555
|
-
"skew-x":
|
|
3555
|
+
"skew-x": Me()
|
|
3556
3556
|
}],
|
|
3557
3557
|
/**
|
|
3558
3558
|
* Skew Y
|
|
3559
3559
|
* @see https://tailwindcss.com/docs/skew
|
|
3560
3560
|
*/
|
|
3561
3561
|
"skew-y": [{
|
|
3562
|
-
"skew-y":
|
|
3562
|
+
"skew-y": Me()
|
|
3563
3563
|
}],
|
|
3564
3564
|
/**
|
|
3565
3565
|
* Transform
|
|
@@ -4104,7 +4104,11 @@ const hp = {
|
|
|
4104
4104
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
4105
4105
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
4106
4106
|
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
4107
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
4107
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
4108
|
+
info: "border-info bg-info text-info-foreground [a&]:hover:bg-info/90 focus-visible:ring-info/20 dark:focus-visible:ring-info/40 dark:bg-info/60",
|
|
4109
|
+
success: "border-success bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40 dark:bg-success/60",
|
|
4110
|
+
warning: "border-warning bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40 dark:bg-warning/60",
|
|
4111
|
+
error: "border-destructive bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60"
|
|
4108
4112
|
}
|
|
4109
4113
|
},
|
|
4110
4114
|
defaultVariants: {
|
|
@@ -4122,7 +4126,7 @@ function vp({
|
|
|
4122
4126
|
return /* @__PURE__ */ l.jsx(o, { className: C(gp({ variant: t }), e), "data-slot": "badge", ...r });
|
|
4123
4127
|
}
|
|
4124
4128
|
const bp = ut(
|
|
4125
|
-
"inline-flex items-center justify-center rounded-
|
|
4129
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
4126
4130
|
{
|
|
4127
4131
|
variants: {
|
|
4128
4132
|
color: {
|
|
@@ -4155,7 +4159,11 @@ const bp = ut(
|
|
|
4155
4159
|
default: "border-transparent",
|
|
4156
4160
|
secondary: "border-transparent",
|
|
4157
4161
|
destructive: "border-transparent",
|
|
4158
|
-
outline: ""
|
|
4162
|
+
outline: "",
|
|
4163
|
+
info: "border-transparent",
|
|
4164
|
+
success: "border-transparent",
|
|
4165
|
+
warning: "border-transparent",
|
|
4166
|
+
error: "border-transparent"
|
|
4159
4167
|
}
|
|
4160
4168
|
},
|
|
4161
4169
|
compoundVariants: [
|
|
@@ -4364,7 +4372,7 @@ const Sp = ({ to: e, label: t }) => /* @__PURE__ */ l.jsx(Fi, { className: "font
|
|
|
4364
4372
|
] }),
|
|
4365
4373
|
c < e.length - 1 && /* @__PURE__ */ l.jsx(Cp, {})
|
|
4366
4374
|
] }, i)) }) });
|
|
4367
|
-
}, OC = ({ children: e, className: t, as: n = "p", ...r }) => /* @__PURE__ */ l.jsx(
|
|
4375
|
+
}, OC = ({ children: e, className: t, as: n = "p", ...r }) => /* @__PURE__ */ l.jsx(Ee, { as: n, className: C("mb-4", t), ...r, children: e }), Ee = E.forwardRef(
|
|
4368
4376
|
({
|
|
4369
4377
|
className: e,
|
|
4370
4378
|
as: t,
|
|
@@ -4491,8 +4499,8 @@ const Sp = ({ to: e, label: t }) => /* @__PURE__ */ l.jsx(Fi, { className: "font
|
|
|
4491
4499
|
);
|
|
4492
4500
|
}
|
|
4493
4501
|
);
|
|
4494
|
-
|
|
4495
|
-
const Ep = ({ children: e, ...t }) => /* @__PURE__ */ l.jsx(
|
|
4502
|
+
Ee.displayName = "Text";
|
|
4503
|
+
const Ep = ({ children: e, ...t }) => /* @__PURE__ */ l.jsx(Ee, { className: "inline-block w-fit rounded bg-accent px-2", family: "mono", size: "sm", variant: "accent", ...t, children: e }), Nr = E.forwardRef(
|
|
4496
4504
|
({
|
|
4497
4505
|
className: e,
|
|
4498
4506
|
variant: t = "default",
|
|
@@ -4625,7 +4633,7 @@ const Ep = ({ children: e, ...t }) => /* @__PURE__ */ l.jsx(De, { className: "in
|
|
|
4625
4633
|
}
|
|
4626
4634
|
);
|
|
4627
4635
|
Nr.displayName = "Heading";
|
|
4628
|
-
const Mp = ({ children: e, className: t, ...n }) => /* @__PURE__ */ l.jsx("ul", { className: C("list-disc flex flex-col gap-2 ml-4", t), ...n, children: e }), jp = ({ children: e, ...t }) => /* @__PURE__ */ l.jsx(
|
|
4636
|
+
const Mp = ({ children: e, className: t, ...n }) => /* @__PURE__ */ l.jsx("ul", { className: C("list-disc flex flex-col gap-2 ml-4", t), ...n, children: e }), jp = ({ children: e, ...t }) => /* @__PURE__ */ l.jsx(Ee, { as: "li", ...t, children: e });
|
|
4629
4637
|
Mp.Item = jp;
|
|
4630
4638
|
function Dp({ className: e, ...t }) {
|
|
4631
4639
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -4754,7 +4762,7 @@ function Hp({ className: e, ...t }) {
|
|
|
4754
4762
|
);
|
|
4755
4763
|
}
|
|
4756
4764
|
const Pn = ({ children: e, ...t }) => /* @__PURE__ */ l.jsx(Wp, { ...t, children: e }), Vp = ({ children: e, ...t }) => /* @__PURE__ */ l.jsx(Nr, { "data-slot": "empty-title", level: "3", weight: "medium", ...t, children: e }), Gp = ({ children: e, className: t, ...n }) => /* @__PURE__ */ l.jsx(
|
|
4757
|
-
|
|
4765
|
+
Ee,
|
|
4758
4766
|
{
|
|
4759
4767
|
className: C(
|
|
4760
4768
|
"text-muted-foreground [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
@@ -4801,15 +4809,15 @@ var Up = "DismissableLayer", Lo = "dismissableLayer.update", qp = "dismissableLa
|
|
|
4801
4809
|
onInteractOutside: s,
|
|
4802
4810
|
onDismiss: i,
|
|
4803
4811
|
...c
|
|
4804
|
-
} = e, d = m.useContext(Li), [f, u] = m.useState(null), p = f?.ownerDocument ?? globalThis?.document, [, h] = m.useState({}), x = ce(t, (S) => u(S)), g = Array.from(d.layers), [b] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), v = g.indexOf(b),
|
|
4812
|
+
} = e, d = m.useContext(Li), [f, u] = m.useState(null), p = f?.ownerDocument ?? globalThis?.document, [, h] = m.useState({}), x = ce(t, (S) => u(S)), g = Array.from(d.layers), [b] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), v = g.indexOf(b), k = f ? g.indexOf(f) : -1, w = d.layersWithOutsidePointerEventsDisabled.size > 0, y = k >= v, N = Qp((S) => {
|
|
4805
4813
|
const M = S.target, R = [...d.branches].some((_) => _.contains(M));
|
|
4806
|
-
!
|
|
4814
|
+
!y || R || (o?.(S), s?.(S), S.defaultPrevented || i?.());
|
|
4807
4815
|
}, p), j = Jp((S) => {
|
|
4808
4816
|
const M = S.target;
|
|
4809
4817
|
[...d.branches].some((_) => _.contains(M)) || (a?.(S), s?.(S), S.defaultPrevented || i?.());
|
|
4810
4818
|
}, p);
|
|
4811
4819
|
return Yp((S) => {
|
|
4812
|
-
|
|
4820
|
+
k === d.layers.size - 1 && (r?.(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
4813
4821
|
}, p), m.useEffect(() => {
|
|
4814
4822
|
if (f)
|
|
4815
4823
|
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (ss = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(f)), d.layers.add(f), is(), () => {
|
|
@@ -4826,7 +4834,7 @@ var Up = "DismissableLayer", Lo = "dismissableLayer.update", qp = "dismissableLa
|
|
|
4826
4834
|
...c,
|
|
4827
4835
|
ref: x,
|
|
4828
4836
|
style: {
|
|
4829
|
-
pointerEvents:
|
|
4837
|
+
pointerEvents: w ? y ? "auto" : "none" : void 0,
|
|
4830
4838
|
...e.style
|
|
4831
4839
|
},
|
|
4832
4840
|
onFocusCapture: te(e.onFocusCapture, j.onFocusCapture),
|
|
@@ -5077,9 +5085,9 @@ const uh = async (e, t, n) => {
|
|
|
5077
5085
|
name: b,
|
|
5078
5086
|
fn: v
|
|
5079
5087
|
} = i[g], {
|
|
5080
|
-
x:
|
|
5081
|
-
y,
|
|
5082
|
-
data:
|
|
5088
|
+
x: k,
|
|
5089
|
+
y: w,
|
|
5090
|
+
data: y,
|
|
5083
5091
|
reset: N
|
|
5084
5092
|
} = await v({
|
|
5085
5093
|
x: f,
|
|
@@ -5095,11 +5103,11 @@ const uh = async (e, t, n) => {
|
|
|
5095
5103
|
floating: t
|
|
5096
5104
|
}
|
|
5097
5105
|
});
|
|
5098
|
-
f =
|
|
5106
|
+
f = k ?? f, u = w ?? u, h = {
|
|
5099
5107
|
...h,
|
|
5100
5108
|
[b]: {
|
|
5101
5109
|
...h[b],
|
|
5102
|
-
...
|
|
5110
|
+
...y
|
|
5103
5111
|
}
|
|
5104
5112
|
}, N && x <= 50 && (x++, typeof N == "object" && (N.placement && (p = N.placement), N.rects && (d = N.rects === !0 ? await s.getElementRects({
|
|
5105
5113
|
reference: e,
|
|
@@ -5139,12 +5147,12 @@ async function Mn(e, t) {
|
|
|
5139
5147
|
boundary: d,
|
|
5140
5148
|
rootBoundary: f,
|
|
5141
5149
|
strategy: c
|
|
5142
|
-
})),
|
|
5150
|
+
})), k = u === "floating" ? {
|
|
5143
5151
|
x: r,
|
|
5144
5152
|
y: o,
|
|
5145
5153
|
width: s.floating.width,
|
|
5146
5154
|
height: s.floating.height
|
|
5147
|
-
} : s.reference,
|
|
5155
|
+
} : s.reference, w = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)), y = await (a.isElement == null ? void 0 : a.isElement(w)) ? await (a.getScale == null ? void 0 : a.getScale(w)) || {
|
|
5148
5156
|
x: 1,
|
|
5149
5157
|
y: 1
|
|
5150
5158
|
} : {
|
|
@@ -5152,15 +5160,15 @@ async function Mn(e, t) {
|
|
|
5152
5160
|
y: 1
|
|
5153
5161
|
}, N = vr(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
5154
5162
|
elements: i,
|
|
5155
|
-
rect:
|
|
5156
|
-
offsetParent:
|
|
5163
|
+
rect: k,
|
|
5164
|
+
offsetParent: w,
|
|
5157
5165
|
strategy: c
|
|
5158
|
-
}) :
|
|
5166
|
+
}) : k);
|
|
5159
5167
|
return {
|
|
5160
|
-
top: (v.top - N.top + x.top) /
|
|
5161
|
-
bottom: (N.bottom - v.bottom + x.bottom) /
|
|
5162
|
-
left: (v.left - N.left + x.left) /
|
|
5163
|
-
right: (N.right - v.right + x.right) /
|
|
5168
|
+
top: (v.top - N.top + x.top) / y.y,
|
|
5169
|
+
bottom: (N.bottom - v.bottom + x.bottom) / y.y,
|
|
5170
|
+
left: (v.left - N.left + x.left) / y.x,
|
|
5171
|
+
right: (N.right - v.right + x.right) / y.x
|
|
5164
5172
|
};
|
|
5165
5173
|
}
|
|
5166
5174
|
const fh = (e) => ({
|
|
@@ -5184,10 +5192,10 @@ const fh = (e) => ({
|
|
|
5184
5192
|
const u = zi(f), p = {
|
|
5185
5193
|
x: n,
|
|
5186
5194
|
y: r
|
|
5187
|
-
}, h = ba(o), x = va(h), g = await s.getDimensions(d), b = h === "y", v = b ? "top" : "left",
|
|
5188
|
-
let S = j ? j[
|
|
5189
|
-
(!S || !await (s.isElement == null ? void 0 : s.isElement(j))) && (S = i.floating[
|
|
5190
|
-
const M =
|
|
5195
|
+
}, h = ba(o), x = va(h), g = await s.getDimensions(d), b = h === "y", v = b ? "top" : "left", k = b ? "bottom" : "right", w = b ? "clientHeight" : "clientWidth", y = a.reference[x] + a.reference[h] - p[h] - a.floating[x], N = p[h] - a.reference[h], j = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(d));
|
|
5196
|
+
let S = j ? j[w] : 0;
|
|
5197
|
+
(!S || !await (s.isElement == null ? void 0 : s.isElement(j))) && (S = i.floating[w] || a.floating[x]);
|
|
5198
|
+
const M = y / 2 - N / 2, R = S / 2 - g[x] / 2 - 1, _ = yt(u[v], R), P = yt(u[k], R), z = _, T = S - g[x] - P, G = S / 2 - g[x] / 2 + M, Y = Bo(z, G, T), F = !c.arrow && sn(o) != null && G !== Y && a.reference[x] / 2 - (G < z ? _ : P) - g[x] / 2 < 0, H = F ? G < z ? G - z : G - T : 0;
|
|
5191
5199
|
return {
|
|
5192
5200
|
[h]: p[h] + H,
|
|
5193
5201
|
data: {
|
|
@@ -5224,12 +5232,12 @@ const fh = (e) => ({
|
|
|
5224
5232
|
} = ct(e, t);
|
|
5225
5233
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
5226
5234
|
return {};
|
|
5227
|
-
const v = dt(o),
|
|
5228
|
-
!p && j && N.push(...ch(i, g, x,
|
|
5235
|
+
const v = dt(o), k = qe(i), w = dt(i) === i, y = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), N = p || (w || !g ? [gr(i)] : ah(i)), j = x !== "none";
|
|
5236
|
+
!p && j && N.push(...ch(i, g, x, y));
|
|
5229
5237
|
const S = [i, ...N], M = await Mn(t, b), R = [];
|
|
5230
5238
|
let _ = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
5231
5239
|
if (f && R.push(M[v]), u) {
|
|
5232
|
-
const G = oh(o, s,
|
|
5240
|
+
const G = oh(o, s, y);
|
|
5233
5241
|
R.push(M[G[0]], M[G[1]]);
|
|
5234
5242
|
}
|
|
5235
5243
|
if (_ = [..._, {
|
|
@@ -5238,9 +5246,9 @@ const fh = (e) => ({
|
|
|
5238
5246
|
}], !R.every((G) => G <= 0)) {
|
|
5239
5247
|
var P, z;
|
|
5240
5248
|
const G = (((P = a.flip) == null ? void 0 : P.index) || 0) + 1, Y = S[G];
|
|
5241
|
-
if (Y && (!(u === "alignment" ?
|
|
5249
|
+
if (Y && (!(u === "alignment" ? k !== qe(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
5242
5250
|
// overflows the main axis.
|
|
5243
|
-
_.every((D) => qe(D.placement) ===
|
|
5251
|
+
_.every((D) => qe(D.placement) === k ? D.overflows[0] > 0 : !0)))
|
|
5244
5252
|
return {
|
|
5245
5253
|
data: {
|
|
5246
5254
|
index: G,
|
|
@@ -5258,7 +5266,7 @@ const fh = (e) => ({
|
|
|
5258
5266
|
const H = (T = _.filter((D) => {
|
|
5259
5267
|
if (j) {
|
|
5260
5268
|
const Q = qe(D.placement);
|
|
5261
|
-
return Q ===
|
|
5269
|
+
return Q === k || // Create a bias to the `y` side axis due to horizontal
|
|
5262
5270
|
// reading directions favoring greater width.
|
|
5263
5271
|
Q === "y";
|
|
5264
5272
|
}
|
|
@@ -5400,11 +5408,11 @@ const gh = function(e) {
|
|
|
5400
5408
|
fn: (b) => {
|
|
5401
5409
|
let {
|
|
5402
5410
|
x: v,
|
|
5403
|
-
y:
|
|
5411
|
+
y: k
|
|
5404
5412
|
} = b;
|
|
5405
5413
|
return {
|
|
5406
5414
|
x: v,
|
|
5407
|
-
y:
|
|
5415
|
+
y: k
|
|
5408
5416
|
};
|
|
5409
5417
|
}
|
|
5410
5418
|
},
|
|
@@ -5415,12 +5423,12 @@ const gh = function(e) {
|
|
|
5415
5423
|
}, f = await Mn(t, c), u = qe(dt(o)), p = ga(u);
|
|
5416
5424
|
let h = d[p], x = d[u];
|
|
5417
5425
|
if (a) {
|
|
5418
|
-
const b = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right",
|
|
5419
|
-
h = Bo(
|
|
5426
|
+
const b = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", k = h + f[b], w = h - f[v];
|
|
5427
|
+
h = Bo(k, h, w);
|
|
5420
5428
|
}
|
|
5421
5429
|
if (s) {
|
|
5422
|
-
const b = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right",
|
|
5423
|
-
x = Bo(
|
|
5430
|
+
const b = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", k = x + f[b], w = x - f[v];
|
|
5431
|
+
x = Bo(k, x, w);
|
|
5424
5432
|
}
|
|
5425
5433
|
const g = i.fn({
|
|
5426
5434
|
...t,
|
|
@@ -5468,12 +5476,12 @@ const gh = function(e) {
|
|
|
5468
5476
|
...g
|
|
5469
5477
|
};
|
|
5470
5478
|
if (c) {
|
|
5471
|
-
const
|
|
5472
|
-
h <
|
|
5479
|
+
const w = p === "y" ? "height" : "width", y = a.reference[p] - a.floating[w] + b.mainAxis, N = a.reference[p] + a.reference[w] - b.mainAxis;
|
|
5480
|
+
h < y ? h = y : h > N && (h = N);
|
|
5473
5481
|
}
|
|
5474
5482
|
if (d) {
|
|
5475
|
-
var v,
|
|
5476
|
-
const
|
|
5483
|
+
var v, k;
|
|
5484
|
+
const w = p === "y" ? "width" : "height", y = Hi.has(dt(o)), N = a.reference[u] - a.floating[w] + (y && ((v = s.offset) == null ? void 0 : v[u]) || 0) + (y ? 0 : b.crossAxis), j = a.reference[u] + a.reference[w] + (y ? 0 : ((k = s.offset) == null ? void 0 : k[u]) || 0) - (y ? b.crossAxis : 0);
|
|
5477
5485
|
x < N ? x = N : x > j && (x = j);
|
|
5478
5486
|
}
|
|
5479
5487
|
return {
|
|
@@ -5503,9 +5511,9 @@ const gh = function(e) {
|
|
|
5503
5511
|
} = a.floating;
|
|
5504
5512
|
let b, v;
|
|
5505
5513
|
u === "top" || u === "bottom" ? (b = u, v = p === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (v = u, b = p === "end" ? "top" : "bottom");
|
|
5506
|
-
const
|
|
5507
|
-
let S =
|
|
5508
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (M =
|
|
5514
|
+
const k = g - f.top - f.bottom, w = x - f.left - f.right, y = yt(g - f[b], k), N = yt(x - f[v], w), j = !t.middlewareData.shift;
|
|
5515
|
+
let S = y, M = N;
|
|
5516
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (M = w), (r = t.middlewareData.shift) != null && r.enabled.y && (S = k), j && !p) {
|
|
5509
5517
|
const _ = Re(f.left, 0), P = Re(f.right, 0), z = Re(f.top, 0), T = Re(f.bottom, 0);
|
|
5510
5518
|
h ? M = x - 2 * (_ !== 0 || P !== 0 ? _ + P : Re(f.left, f.right)) : S = g - 2 * (z !== 0 || T !== 0 ? z + T : Re(f.top, f.bottom));
|
|
5511
5519
|
}
|
|
@@ -5687,8 +5695,8 @@ function At(e, t, n, r) {
|
|
|
5687
5695
|
const p = Te(a), h = r && Le(r) ? Te(r) : r;
|
|
5688
5696
|
let x = p, g = Ho(x);
|
|
5689
5697
|
for (; g && r && h !== x; ) {
|
|
5690
|
-
const b = Kt(g), v = g.getBoundingClientRect(),
|
|
5691
|
-
c *= b.x, d *= b.y, f *= b.x, u *= b.y, c +=
|
|
5698
|
+
const b = Kt(g), v = g.getBoundingClientRect(), k = Be(g), w = v.left + (g.clientLeft + parseFloat(k.paddingLeft)) * b.x, y = v.top + (g.clientTop + parseFloat(k.paddingTop)) * b.y;
|
|
5699
|
+
c *= b.x, d *= b.y, f *= b.x, u *= b.y, c += w, d += y, x = Te(g), g = Ho(x);
|
|
5692
5700
|
}
|
|
5693
5701
|
}
|
|
5694
5702
|
return vr({
|
|
@@ -5945,30 +5953,30 @@ function Vh(e, t) {
|
|
|
5945
5953
|
} = d;
|
|
5946
5954
|
if (i || t(), !p || !h)
|
|
5947
5955
|
return;
|
|
5948
|
-
const x = nr(u), g = nr(o.clientWidth - (f + p)), b = nr(o.clientHeight - (u + h)), v = nr(f),
|
|
5956
|
+
const x = nr(u), g = nr(o.clientWidth - (f + p)), b = nr(o.clientHeight - (u + h)), v = nr(f), w = {
|
|
5949
5957
|
rootMargin: -x + "px " + -g + "px " + -b + "px " + -v + "px",
|
|
5950
5958
|
threshold: Re(0, yt(1, c)) || 1
|
|
5951
5959
|
};
|
|
5952
|
-
let
|
|
5960
|
+
let y = !0;
|
|
5953
5961
|
function N(j) {
|
|
5954
5962
|
const S = j[0].intersectionRatio;
|
|
5955
5963
|
if (S !== c) {
|
|
5956
|
-
if (!
|
|
5964
|
+
if (!y)
|
|
5957
5965
|
return s();
|
|
5958
5966
|
S ? s(!1, S) : r = setTimeout(() => {
|
|
5959
5967
|
s(!1, 1e-7);
|
|
5960
5968
|
}, 1e3);
|
|
5961
5969
|
}
|
|
5962
|
-
S === 1 && !Xi(d, e.getBoundingClientRect()) && s(),
|
|
5970
|
+
S === 1 && !Xi(d, e.getBoundingClientRect()) && s(), y = !1;
|
|
5963
5971
|
}
|
|
5964
5972
|
try {
|
|
5965
5973
|
n = new IntersectionObserver(N, {
|
|
5966
|
-
...
|
|
5974
|
+
...w,
|
|
5967
5975
|
// Handle <iframe>s
|
|
5968
5976
|
root: o.ownerDocument
|
|
5969
5977
|
});
|
|
5970
5978
|
} catch {
|
|
5971
|
-
n = new IntersectionObserver(N,
|
|
5979
|
+
n = new IntersectionObserver(N, w);
|
|
5972
5980
|
}
|
|
5973
5981
|
n.observe(e);
|
|
5974
5982
|
}
|
|
@@ -5991,10 +5999,10 @@ function Gh(e, t, n, r) {
|
|
|
5991
5999
|
const u = d && i ? Vh(d, n) : null;
|
|
5992
6000
|
let p = -1, h = null;
|
|
5993
6001
|
s && (h = new ResizeObserver((v) => {
|
|
5994
|
-
let [
|
|
5995
|
-
|
|
5996
|
-
var
|
|
5997
|
-
(
|
|
6002
|
+
let [k] = v;
|
|
6003
|
+
k && k.target === d && h && (h.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
6004
|
+
var w;
|
|
6005
|
+
(w = h) == null || w.observe(t);
|
|
5998
6006
|
})), n();
|
|
5999
6007
|
}), d && !c && h.observe(d), h.observe(t));
|
|
6000
6008
|
let x, g = c ? At(e) : null;
|
|
@@ -6005,8 +6013,8 @@ function Gh(e, t, n, r) {
|
|
|
6005
6013
|
}
|
|
6006
6014
|
return n(), () => {
|
|
6007
6015
|
var v;
|
|
6008
|
-
f.forEach((
|
|
6009
|
-
o &&
|
|
6016
|
+
f.forEach((k) => {
|
|
6017
|
+
o && k.removeEventListener("scroll", n), a && k.removeEventListener("resize", n);
|
|
6010
6018
|
}), u?.(), (v = h) == null || v.disconnect(), h = null, c && cancelAnimationFrame(x);
|
|
6011
6019
|
};
|
|
6012
6020
|
}
|
|
@@ -6091,11 +6099,11 @@ function tg(e) {
|
|
|
6091
6099
|
isPositioned: !1
|
|
6092
6100
|
}), [p, h] = m.useState(r);
|
|
6093
6101
|
br(p, r) || h(r);
|
|
6094
|
-
const [x, g] = m.useState(null), [b, v] = m.useState(null),
|
|
6102
|
+
const [x, g] = m.useState(null), [b, v] = m.useState(null), k = m.useCallback((D) => {
|
|
6095
6103
|
D !== j.current && (j.current = D, g(D));
|
|
6096
|
-
}, []),
|
|
6104
|
+
}, []), w = m.useCallback((D) => {
|
|
6097
6105
|
D !== S.current && (S.current = D, v(D));
|
|
6098
|
-
}, []),
|
|
6106
|
+
}, []), y = a || x, N = s || b, j = m.useRef(null), S = m.useRef(null), M = m.useRef(f), R = c != null, _ = mo(c), P = mo(o), z = mo(d), T = m.useCallback(() => {
|
|
6099
6107
|
if (!j.current || !S.current)
|
|
6100
6108
|
return;
|
|
6101
6109
|
const D = {
|
|
@@ -6127,21 +6135,21 @@ function tg(e) {
|
|
|
6127
6135
|
cr(() => (G.current = !0, () => {
|
|
6128
6136
|
G.current = !1;
|
|
6129
6137
|
}), []), cr(() => {
|
|
6130
|
-
if (
|
|
6138
|
+
if (y && (j.current = y), N && (S.current = N), y && N) {
|
|
6131
6139
|
if (_.current)
|
|
6132
|
-
return _.current(
|
|
6140
|
+
return _.current(y, N, T);
|
|
6133
6141
|
T();
|
|
6134
6142
|
}
|
|
6135
|
-
}, [
|
|
6143
|
+
}, [y, N, T, _, R]);
|
|
6136
6144
|
const Y = m.useMemo(() => ({
|
|
6137
6145
|
reference: j,
|
|
6138
6146
|
floating: S,
|
|
6139
|
-
setReference:
|
|
6140
|
-
setFloating:
|
|
6141
|
-
}), [
|
|
6142
|
-
reference:
|
|
6147
|
+
setReference: k,
|
|
6148
|
+
setFloating: w
|
|
6149
|
+
}), [k, w]), F = m.useMemo(() => ({
|
|
6150
|
+
reference: y,
|
|
6143
6151
|
floating: N
|
|
6144
|
-
}), [
|
|
6152
|
+
}), [y, N]), H = m.useMemo(() => {
|
|
6145
6153
|
const D = {
|
|
6146
6154
|
position: n,
|
|
6147
6155
|
left: 0,
|
|
@@ -6252,7 +6260,7 @@ function _n(e) {
|
|
|
6252
6260
|
n(void 0);
|
|
6253
6261
|
}, [e]), t;
|
|
6254
6262
|
}
|
|
6255
|
-
var ka = "Popper", [el, Rr] =
|
|
6263
|
+
var ka = "Popper", [el, Rr] = De(ka), [fg, tl] = el(ka), nl = (e) => {
|
|
6256
6264
|
const { __scopePopper: t, children: n } = e, [r, o] = m.useState(null);
|
|
6257
6265
|
return /* @__PURE__ */ l.jsx(fg, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
6258
6266
|
};
|
|
@@ -6284,7 +6292,7 @@ var Ca = "PopperContent", [mg, pg] = el(Ca), al = m.forwardRef(
|
|
|
6284
6292
|
updatePositionStrategy: h = "optimized",
|
|
6285
6293
|
onPlaced: x,
|
|
6286
6294
|
...g
|
|
6287
|
-
} = e, b = tl(Ca, n), [v,
|
|
6295
|
+
} = e, b = tl(Ca, n), [v, k] = m.useState(null), w = ce(t, (U) => k(U)), [y, N] = m.useState(null), j = _n(y), S = j?.width ?? 0, M = j?.height ?? 0, R = r + (a !== "center" ? "-" + a : ""), _ = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, P = Array.isArray(d) ? d : [d], z = P.length > 0, T = {
|
|
6288
6296
|
padding: _,
|
|
6289
6297
|
boundary: P.filter(gg),
|
|
6290
6298
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -6311,11 +6319,11 @@ var Ca = "PopperContent", [mg, pg] = el(Ca), al = m.forwardRef(
|
|
|
6311
6319
|
ig({
|
|
6312
6320
|
...T,
|
|
6313
6321
|
apply: ({ elements: U, rects: ue, availableWidth: ie, availableHeight: xe }) => {
|
|
6314
|
-
const { width:
|
|
6315
|
-
nt.setProperty("--radix-popper-available-width", `${ie}px`), nt.setProperty("--radix-popper-available-height", `${xe}px`), nt.setProperty("--radix-popper-anchor-width", `${
|
|
6322
|
+
const { width: Me, height: $e } = ue.reference, nt = U.floating.style;
|
|
6323
|
+
nt.setProperty("--radix-popper-available-width", `${ie}px`), nt.setProperty("--radix-popper-available-height", `${xe}px`), nt.setProperty("--radix-popper-anchor-width", `${Me}px`), nt.setProperty("--radix-popper-anchor-height", `${$e}px`);
|
|
6316
6324
|
}
|
|
6317
6325
|
}),
|
|
6318
|
-
|
|
6326
|
+
y && cg({ element: y, padding: i }),
|
|
6319
6327
|
vg({ arrowWidth: S, arrowHeight: M }),
|
|
6320
6328
|
p && lg({ strategy: "referenceHidden", ...T })
|
|
6321
6329
|
]
|
|
@@ -6365,7 +6373,7 @@ var Ca = "PopperContent", [mg, pg] = el(Ca), al = m.forwardRef(
|
|
|
6365
6373
|
"data-side": Q,
|
|
6366
6374
|
"data-align": se,
|
|
6367
6375
|
...g,
|
|
6368
|
-
ref:
|
|
6376
|
+
ref: w,
|
|
6369
6377
|
style: {
|
|
6370
6378
|
...g.style,
|
|
6371
6379
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -6478,7 +6486,7 @@ var xg = Object.freeze({
|
|
|
6478
6486
|
)
|
|
6479
6487
|
);
|
|
6480
6488
|
fl.displayName = yg;
|
|
6481
|
-
var wg = fl, [Pr, RC] =
|
|
6489
|
+
var wg = fl, [Pr, RC] = De("Tooltip", [
|
|
6482
6490
|
Rr
|
|
6483
6491
|
]), Ar = Rr(), ml = "TooltipProvider", kg = 700, Vo = "tooltip.open", [Cg, Na] = Pr(ml), pl = (e) => {
|
|
6484
6492
|
const {
|
|
@@ -6525,22 +6533,22 @@ var Dn = "Tooltip", [Sg, In] = Pr(Dn), hl = (e) => {
|
|
|
6525
6533
|
onOpenChange: a,
|
|
6526
6534
|
disableHoverableContent: s,
|
|
6527
6535
|
delayDuration: i
|
|
6528
|
-
} = e, c = Na(Dn, e.__scopeTooltip), d = Ar(t), [f, u] = m.useState(null), p = Ne(), h = m.useRef(0), x = s ?? c.disableHoverableContent, g = i ?? c.delayDuration, b = m.useRef(!1), [v,
|
|
6536
|
+
} = e, c = Na(Dn, e.__scopeTooltip), d = Ar(t), [f, u] = m.useState(null), p = Ne(), h = m.useRef(0), x = s ?? c.disableHoverableContent, g = i ?? c.delayDuration, b = m.useRef(!1), [v, k] = _e({
|
|
6529
6537
|
prop: r,
|
|
6530
6538
|
defaultProp: o ?? !1,
|
|
6531
6539
|
onChange: (S) => {
|
|
6532
6540
|
S ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Vo))) : c.onClose(), a?.(S);
|
|
6533
6541
|
},
|
|
6534
6542
|
caller: Dn
|
|
6535
|
-
}),
|
|
6536
|
-
window.clearTimeout(h.current), h.current = 0, b.current = !1,
|
|
6537
|
-
}, [
|
|
6538
|
-
window.clearTimeout(h.current), h.current = 0,
|
|
6539
|
-
}, [
|
|
6543
|
+
}), w = m.useMemo(() => v ? b.current ? "delayed-open" : "instant-open" : "closed", [v]), y = m.useCallback(() => {
|
|
6544
|
+
window.clearTimeout(h.current), h.current = 0, b.current = !1, k(!0);
|
|
6545
|
+
}, [k]), N = m.useCallback(() => {
|
|
6546
|
+
window.clearTimeout(h.current), h.current = 0, k(!1);
|
|
6547
|
+
}, [k]), j = m.useCallback(() => {
|
|
6540
6548
|
window.clearTimeout(h.current), h.current = window.setTimeout(() => {
|
|
6541
|
-
b.current = !0,
|
|
6549
|
+
b.current = !0, k(!0), h.current = 0;
|
|
6542
6550
|
}, g);
|
|
6543
|
-
}, [g,
|
|
6551
|
+
}, [g, k]);
|
|
6544
6552
|
return m.useEffect(() => () => {
|
|
6545
6553
|
h.current && (window.clearTimeout(h.current), h.current = 0);
|
|
6546
6554
|
}, []), /* @__PURE__ */ l.jsx(cl, { ...d, children: /* @__PURE__ */ l.jsx(
|
|
@@ -6549,16 +6557,16 @@ var Dn = "Tooltip", [Sg, In] = Pr(Dn), hl = (e) => {
|
|
|
6549
6557
|
scope: t,
|
|
6550
6558
|
contentId: p,
|
|
6551
6559
|
open: v,
|
|
6552
|
-
stateAttribute:
|
|
6560
|
+
stateAttribute: w,
|
|
6553
6561
|
trigger: f,
|
|
6554
6562
|
onTriggerChange: u,
|
|
6555
6563
|
onTriggerEnter: m.useCallback(() => {
|
|
6556
|
-
c.isOpenDelayedRef.current ? j() :
|
|
6557
|
-
}, [c.isOpenDelayedRef, j,
|
|
6564
|
+
c.isOpenDelayedRef.current ? j() : y();
|
|
6565
|
+
}, [c.isOpenDelayedRef, j, y]),
|
|
6558
6566
|
onTriggerLeave: m.useCallback(() => {
|
|
6559
6567
|
x ? N() : (window.clearTimeout(h.current), h.current = 0);
|
|
6560
6568
|
}, [N, x]),
|
|
6561
|
-
onOpen:
|
|
6569
|
+
onOpen: y,
|
|
6562
6570
|
onClose: N,
|
|
6563
6571
|
disableHoverableContent: x,
|
|
6564
6572
|
children: n
|
|
@@ -6612,7 +6620,7 @@ var en = "TooltipContent", bl = m.forwardRef(
|
|
|
6612
6620
|
i(null), u(!1);
|
|
6613
6621
|
}, [u]), h = m.useCallback(
|
|
6614
6622
|
(x, g) => {
|
|
6615
|
-
const b = x.currentTarget, v = { x: x.clientX, y: x.clientY },
|
|
6623
|
+
const b = x.currentTarget, v = { x: x.clientX, y: x.clientY }, k = Rg(v, b.getBoundingClientRect()), w = Tg(v, k), y = Pg(g.getBoundingClientRect()), N = _g([...w, ...y]);
|
|
6616
6624
|
i(N), u(!0);
|
|
6617
6625
|
},
|
|
6618
6626
|
[u]
|
|
@@ -6627,8 +6635,8 @@ var en = "TooltipContent", bl = m.forwardRef(
|
|
|
6627
6635
|
}, [c, f, h, p]), m.useEffect(() => {
|
|
6628
6636
|
if (s) {
|
|
6629
6637
|
const x = (g) => {
|
|
6630
|
-
const b = g.target, v = { x: g.clientX, y: g.clientY },
|
|
6631
|
-
|
|
6638
|
+
const b = g.target, v = { x: g.clientX, y: g.clientY }, k = c?.contains(b) || f?.contains(b), w = !Ag(v, s);
|
|
6639
|
+
k ? p() : w && (p(), d());
|
|
6632
6640
|
};
|
|
6633
6641
|
return document.addEventListener("pointermove", x), () => document.removeEventListener("pointermove", x);
|
|
6634
6642
|
}
|
|
@@ -6820,7 +6828,7 @@ function Sl({
|
|
|
6820
6828
|
}
|
|
6821
6829
|
) });
|
|
6822
6830
|
}
|
|
6823
|
-
const
|
|
6831
|
+
const je = ({ children: e, open: t, onOpenChange: n }) => /* @__PURE__ */ l.jsx(Ma, { children: /* @__PURE__ */ l.jsx(kl, { onOpenChange: n, open: t, children: e }) }), Hg = ({ children: e, cursor: t = "pointer", className: n }) => /* @__PURE__ */ l.jsx(
|
|
6824
6832
|
Cl,
|
|
6825
6833
|
{
|
|
6826
6834
|
asChild: !0,
|
|
@@ -6834,11 +6842,11 @@ const Me = ({ children: e, open: t, onOpenChange: n }) => /* @__PURE__ */ l.jsx(
|
|
|
6834
6842
|
children: e
|
|
6835
6843
|
}
|
|
6836
6844
|
), Vg = ({ className: e, children: t }) => /* @__PURE__ */ l.jsx(Sl, { className: e, children: t });
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
const Gg = ({ children: e, content: t }) => /* @__PURE__ */ l.jsxs(
|
|
6840
|
-
/* @__PURE__ */ l.jsx(
|
|
6841
|
-
/* @__PURE__ */ l.jsx(
|
|
6845
|
+
je.Trigger = Hg;
|
|
6846
|
+
je.Content = Vg;
|
|
6847
|
+
const Gg = ({ children: e, content: t }) => /* @__PURE__ */ l.jsxs(je, { children: [
|
|
6848
|
+
/* @__PURE__ */ l.jsx(je.Trigger, { children: typeof e == "string" ? /* @__PURE__ */ l.jsx("span", { children: e }) : e }),
|
|
6849
|
+
/* @__PURE__ */ l.jsx(je.Content, { children: t })
|
|
6842
6850
|
] }), cn = ({ content: e, className: t }) => /* @__PURE__ */ l.jsx(Gg, { content: e, children: /* @__PURE__ */ l.jsx(Tf, { className: C("size-4 text-muted-foreground stroke-1", t) }) });
|
|
6843
6851
|
var Yg = "Separator", xs = "horizontal", Ug = ["horizontal", "vertical"], Nl = m.forwardRef((e, t) => {
|
|
6844
6852
|
const { decorative: n, orientation: r = xs, ...o } = e, a = qg(r) ? r : xs, i = n ? { role: "none" } : { "aria-orientation": a === "vertical" ? a : void 0, role: "separator" };
|
|
@@ -7053,23 +7061,23 @@ var po = "focusScope.autoFocusOnMount", ho = "focusScope.autoFocusOnUnmount", ys
|
|
|
7053
7061
|
}).current;
|
|
7054
7062
|
m.useEffect(() => {
|
|
7055
7063
|
if (r) {
|
|
7056
|
-
let g = function(
|
|
7064
|
+
let g = function(w) {
|
|
7057
7065
|
if (h.paused || !i) return;
|
|
7058
|
-
const
|
|
7059
|
-
i.contains(
|
|
7060
|
-
}, b = function(
|
|
7066
|
+
const y = w.target;
|
|
7067
|
+
i.contains(y) ? u.current = y : vt(u.current, { select: !0 });
|
|
7068
|
+
}, b = function(w) {
|
|
7061
7069
|
if (h.paused || !i) return;
|
|
7062
|
-
const
|
|
7063
|
-
|
|
7064
|
-
}, v = function(
|
|
7070
|
+
const y = w.relatedTarget;
|
|
7071
|
+
y !== null && (i.contains(y) || vt(u.current, { select: !0 }));
|
|
7072
|
+
}, v = function(w) {
|
|
7065
7073
|
if (document.activeElement === document.body)
|
|
7066
|
-
for (const N of
|
|
7074
|
+
for (const N of w)
|
|
7067
7075
|
N.removedNodes.length > 0 && vt(i);
|
|
7068
7076
|
};
|
|
7069
7077
|
document.addEventListener("focusin", g), document.addEventListener("focusout", b);
|
|
7070
|
-
const
|
|
7071
|
-
return i &&
|
|
7072
|
-
document.removeEventListener("focusin", g), document.removeEventListener("focusout", b),
|
|
7078
|
+
const k = new MutationObserver(v);
|
|
7079
|
+
return i && k.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
7080
|
+
document.removeEventListener("focusin", g), document.removeEventListener("focusout", b), k.disconnect();
|
|
7073
7081
|
};
|
|
7074
7082
|
}
|
|
7075
7083
|
}, [r, i, h.paused]), m.useEffect(() => {
|
|
@@ -7093,8 +7101,8 @@ var po = "focusScope.autoFocusOnMount", ho = "focusScope.autoFocusOnUnmount", ys
|
|
|
7093
7101
|
if (!n && !r || h.paused) return;
|
|
7094
7102
|
const b = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, v = document.activeElement;
|
|
7095
7103
|
if (b && v) {
|
|
7096
|
-
const
|
|
7097
|
-
|
|
7104
|
+
const k = g.currentTarget, [w, y] = lv(k);
|
|
7105
|
+
w && y ? !g.shiftKey && v === y ? (g.preventDefault(), n && vt(w, { select: !0 })) : g.shiftKey && v === w && (g.preventDefault(), n && vt(y, { select: !0 })) : v === k && g.preventDefault();
|
|
7098
7106
|
}
|
|
7099
7107
|
},
|
|
7100
7108
|
[n, r, h.paused]
|
|
@@ -7325,12 +7333,12 @@ var Tl = wv(), bo = function() {
|
|
|
7325
7333
|
onScrollCapture: bo,
|
|
7326
7334
|
onWheelCapture: bo,
|
|
7327
7335
|
onTouchMoveCapture: bo
|
|
7328
|
-
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, d = e.removeScrollBar, f = e.enabled, u = e.shards, p = e.sideCar, h = e.noRelative, x = e.noIsolation, g = e.inert, b = e.allowPinchZoom, v = e.as,
|
|
7336
|
+
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, d = e.removeScrollBar, f = e.enabled, u = e.shards, p = e.sideCar, h = e.noRelative, x = e.noIsolation, g = e.inert, b = e.allowPinchZoom, v = e.as, k = v === void 0 ? "div" : v, w = e.gapMode, y = Ol(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = p, j = bv([n, t]), S = Ue(Ue({}, y), o);
|
|
7329
7337
|
return m.createElement(
|
|
7330
7338
|
m.Fragment,
|
|
7331
7339
|
null,
|
|
7332
|
-
f && m.createElement(N, { sideCar: Tl, removeScrollBar: d, shards: u, noRelative: h, noIsolation: x, inert: g, setCallbacks: a, allowPinchZoom: !!b, lockRef: n, gapMode:
|
|
7333
|
-
s ? m.cloneElement(m.Children.only(i), Ue(Ue({}, S), { ref: j })) : m.createElement(
|
|
7340
|
+
f && m.createElement(N, { sideCar: Tl, removeScrollBar: d, shards: u, noRelative: h, noIsolation: x, inert: g, setCallbacks: a, allowPinchZoom: !!b, lockRef: n, gapMode: w }),
|
|
7341
|
+
s ? m.cloneElement(m.Children.only(i), Ue(Ue({}, S), { ref: j })) : m.createElement(k, Ue({}, S, { className: c, ref: j }), i)
|
|
7334
7342
|
);
|
|
7335
7343
|
});
|
|
7336
7344
|
_r.defaultProps = {
|
|
@@ -7534,8 +7542,8 @@ var Ht = Yo ? { passive: !1 } : !1, Iv = function(e) {
|
|
|
7534
7542
|
break;
|
|
7535
7543
|
var h = Il(e, i), x = h[0], g = h[1], b = h[2], v = g - b - a * x;
|
|
7536
7544
|
(x || v) && _l(e, i) && (u += v, p += x);
|
|
7537
|
-
var
|
|
7538
|
-
i =
|
|
7545
|
+
var k = i.parentNode;
|
|
7546
|
+
i = k && k.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? k.host : k;
|
|
7539
7547
|
} while (
|
|
7540
7548
|
// portaled content
|
|
7541
7549
|
!c && i !== document.body || // self content
|
|
@@ -7576,7 +7584,7 @@ function Yv(e) {
|
|
|
7576
7584
|
var i = m.useCallback(function(g, b) {
|
|
7577
7585
|
if ("touches" in g && g.touches.length === 2 || g.type === "wheel" && g.ctrlKey)
|
|
7578
7586
|
return !s.current.allowPinchZoom;
|
|
7579
|
-
var v = or(g),
|
|
7587
|
+
var v = or(g), k = n.current, w = "deltaX" in g ? g.deltaX : k[0] - v[0], y = "deltaY" in g ? g.deltaY : k[1] - v[1], N, j = g.target, S = Math.abs(w) > Math.abs(y) ? "h" : "v";
|
|
7580
7588
|
if ("touches" in g && S === "h" && j.type === "range")
|
|
7581
7589
|
return !1;
|
|
7582
7590
|
var M = Ms(S, j);
|
|
@@ -7584,32 +7592,32 @@ function Yv(e) {
|
|
|
7584
7592
|
return !0;
|
|
7585
7593
|
if (M ? N = S : (N = S === "v" ? "h" : "v", M = Ms(S, j)), !M)
|
|
7586
7594
|
return !1;
|
|
7587
|
-
if (!r.current && "changedTouches" in g && (
|
|
7595
|
+
if (!r.current && "changedTouches" in g && (w || y) && (r.current = N), !N)
|
|
7588
7596
|
return !0;
|
|
7589
7597
|
var R = r.current || N;
|
|
7590
|
-
return zv(R, b, g, R === "h" ?
|
|
7598
|
+
return zv(R, b, g, R === "h" ? w : y);
|
|
7591
7599
|
}, []), c = m.useCallback(function(g) {
|
|
7592
7600
|
var b = g;
|
|
7593
7601
|
if (!(!Vt.length || Vt[Vt.length - 1] !== a)) {
|
|
7594
|
-
var v = "deltaY" in b ? js(b) : or(b),
|
|
7602
|
+
var v = "deltaY" in b ? js(b) : or(b), k = t.current.filter(function(N) {
|
|
7595
7603
|
return N.name === b.type && (N.target === b.target || b.target === N.shadowParent) && Hv(N.delta, v);
|
|
7596
7604
|
})[0];
|
|
7597
|
-
if (
|
|
7605
|
+
if (k && k.should) {
|
|
7598
7606
|
b.cancelable && b.preventDefault();
|
|
7599
7607
|
return;
|
|
7600
7608
|
}
|
|
7601
|
-
if (!
|
|
7602
|
-
var
|
|
7609
|
+
if (!k) {
|
|
7610
|
+
var w = (s.current.shards || []).map(Ds).filter(Boolean).filter(function(N) {
|
|
7603
7611
|
return N.contains(b.target);
|
|
7604
|
-
}),
|
|
7605
|
-
|
|
7612
|
+
}), y = w.length > 0 ? i(b, w[0]) : !s.current.noIsolation;
|
|
7613
|
+
y && b.cancelable && b.preventDefault();
|
|
7606
7614
|
}
|
|
7607
7615
|
}
|
|
7608
|
-
}, []), d = m.useCallback(function(g, b, v,
|
|
7609
|
-
var
|
|
7610
|
-
t.current.push(
|
|
7611
|
-
t.current = t.current.filter(function(
|
|
7612
|
-
return
|
|
7616
|
+
}, []), d = m.useCallback(function(g, b, v, k) {
|
|
7617
|
+
var w = { name: g, delta: b, target: v, should: k, shadowParent: Uv(v) };
|
|
7618
|
+
t.current.push(w), setTimeout(function() {
|
|
7619
|
+
t.current = t.current.filter(function(y) {
|
|
7620
|
+
return y !== w;
|
|
7613
7621
|
});
|
|
7614
7622
|
}, 1);
|
|
7615
7623
|
}, []), f = m.useCallback(function(g) {
|
|
@@ -7696,7 +7704,7 @@ var Kv = function(e) {
|
|
|
7696
7704
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Xv(r, o, n, "aria-hidden")) : function() {
|
|
7697
7705
|
return null;
|
|
7698
7706
|
};
|
|
7699
|
-
}, Ir = "Dialog", [Wl, PC] =
|
|
7707
|
+
}, Ir = "Dialog", [Wl, PC] = De(Ir), [Qv, He] = Wl(Ir), Ll = (e) => {
|
|
7700
7708
|
const {
|
|
7701
7709
|
__scopeDialog: t,
|
|
7702
7710
|
children: n,
|
|
@@ -8233,7 +8241,7 @@ const IC = ({ pageCount: e, currentPage: t, onChange: n }) => {
|
|
|
8233
8241
|
) })
|
|
8234
8242
|
] }) });
|
|
8235
8243
|
};
|
|
8236
|
-
var Br = "Popover", [ac, $C] =
|
|
8244
|
+
var Br = "Popover", [ac, $C] = De(Br, [
|
|
8237
8245
|
Rr
|
|
8238
8246
|
]), $n = Rr(), [bb, St] = ac(Br), sc = (e) => {
|
|
8239
8247
|
const {
|
|
@@ -8581,7 +8589,7 @@ dn.Cell = $b;
|
|
|
8581
8589
|
dn.Head = Ib;
|
|
8582
8590
|
dn.Header = Pb;
|
|
8583
8591
|
dn.Row = _b;
|
|
8584
|
-
var wo = "rovingFocusGroup.onEntryFocus", Wb = { bubbles: !1, cancelable: !0 }, Fn = "RovingFocusGroup", [Uo, gc, Lb] = oa(Fn), [Bb, zr] =
|
|
8592
|
+
var wo = "rovingFocusGroup.onEntryFocus", Wb = { bubbles: !1, cancelable: !0 }, Fn = "RovingFocusGroup", [Uo, gc, Lb] = oa(Fn), [Bb, zr] = De(
|
|
8585
8593
|
Fn,
|
|
8586
8594
|
[Lb]
|
|
8587
8595
|
), [zb, Hb] = Bb(Fn), vc = m.forwardRef(
|
|
@@ -8605,12 +8613,12 @@ var Vb = m.forwardRef((e, t) => {
|
|
|
8605
8613
|
defaultProp: i ?? null,
|
|
8606
8614
|
onChange: c,
|
|
8607
8615
|
caller: Fn
|
|
8608
|
-
}), [v,
|
|
8616
|
+
}), [v, k] = m.useState(!1), w = Pt(d), y = gc(n), N = m.useRef(!1), [j, S] = m.useState(0);
|
|
8609
8617
|
return m.useEffect(() => {
|
|
8610
8618
|
const M = p.current;
|
|
8611
8619
|
if (M)
|
|
8612
|
-
return M.addEventListener(wo,
|
|
8613
|
-
}, [
|
|
8620
|
+
return M.addEventListener(wo, w), () => M.removeEventListener(wo, w);
|
|
8621
|
+
}, [w]), /* @__PURE__ */ l.jsx(
|
|
8614
8622
|
zb,
|
|
8615
8623
|
{
|
|
8616
8624
|
scope: n,
|
|
@@ -8622,7 +8630,7 @@ var Vb = m.forwardRef((e, t) => {
|
|
|
8622
8630
|
(M) => b(M),
|
|
8623
8631
|
[b]
|
|
8624
8632
|
),
|
|
8625
|
-
onItemShiftTab: m.useCallback(() =>
|
|
8633
|
+
onItemShiftTab: m.useCallback(() => k(!0), []),
|
|
8626
8634
|
onFocusableItemAdd: m.useCallback(
|
|
8627
8635
|
() => S((M) => M + 1),
|
|
8628
8636
|
[]
|
|
@@ -8647,7 +8655,7 @@ var Vb = m.forwardRef((e, t) => {
|
|
|
8647
8655
|
if (M.target === M.currentTarget && R && !v) {
|
|
8648
8656
|
const _ = new CustomEvent(wo, Wb);
|
|
8649
8657
|
if (M.currentTarget.dispatchEvent(_), !_.defaultPrevented) {
|
|
8650
|
-
const P =
|
|
8658
|
+
const P = y().filter((F) => F.focusable), z = P.find((F) => F.active), T = P.find((F) => F.id === g), Y = [z, T, ...P].filter(
|
|
8651
8659
|
Boolean
|
|
8652
8660
|
).map((F) => F.ref.current);
|
|
8653
8661
|
yc(Y, f);
|
|
@@ -8655,7 +8663,7 @@ var Vb = m.forwardRef((e, t) => {
|
|
|
8655
8663
|
}
|
|
8656
8664
|
N.current = !1;
|
|
8657
8665
|
}),
|
|
8658
|
-
onBlur: te(e.onBlur, () =>
|
|
8666
|
+
onBlur: te(e.onBlur, () => k(!1))
|
|
8659
8667
|
}
|
|
8660
8668
|
)
|
|
8661
8669
|
}
|
|
@@ -8701,14 +8709,14 @@ var Vb = m.forwardRef((e, t) => {
|
|
|
8701
8709
|
if (v !== void 0) {
|
|
8702
8710
|
if (b.metaKey || b.ctrlKey || b.altKey || b.shiftKey) return;
|
|
8703
8711
|
b.preventDefault();
|
|
8704
|
-
let
|
|
8705
|
-
if (v === "last")
|
|
8712
|
+
let w = p().filter((y) => y.focusable).map((y) => y.ref.current);
|
|
8713
|
+
if (v === "last") w.reverse();
|
|
8706
8714
|
else if (v === "prev" || v === "next") {
|
|
8707
|
-
v === "prev" &&
|
|
8708
|
-
const
|
|
8709
|
-
|
|
8715
|
+
v === "prev" && w.reverse();
|
|
8716
|
+
const y = w.indexOf(b.currentTarget);
|
|
8717
|
+
w = f.loop ? qb(w, y + 1) : w.slice(y + 1);
|
|
8710
8718
|
}
|
|
8711
|
-
setTimeout(() => yc(
|
|
8719
|
+
setTimeout(() => yc(w));
|
|
8712
8720
|
}
|
|
8713
8721
|
}),
|
|
8714
8722
|
children: typeof s == "function" ? s({ isCurrentTabStop: u, hasTabStop: g != null }) : s
|
|
@@ -8745,7 +8753,7 @@ function yc(e, t = !1) {
|
|
|
8745
8753
|
function qb(e, t) {
|
|
8746
8754
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
8747
8755
|
}
|
|
8748
|
-
var wc = vc, kc = xc, Hr = "Tabs", [Kb, LC] =
|
|
8756
|
+
var wc = vc, kc = xc, Hr = "Tabs", [Kb, LC] = De(Hr, [
|
|
8749
8757
|
zr
|
|
8750
8758
|
]), Cc = zr(), [Zb, $a] = Kb(Hr), Sc = m.forwardRef(
|
|
8751
8759
|
(e, t) => {
|
|
@@ -9600,7 +9608,7 @@ function Vr(e) {
|
|
|
9600
9608
|
const t = m.useRef({ value: e, previous: e });
|
|
9601
9609
|
return m.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
9602
9610
|
}
|
|
9603
|
-
var Gr = "Checkbox", [dx, qC] =
|
|
9611
|
+
var Gr = "Checkbox", [dx, qC] = De(Gr), [ux, La] = dx(Gr);
|
|
9604
9612
|
function fx(e) {
|
|
9605
9613
|
const {
|
|
9606
9614
|
__scopeCheckbox: t,
|
|
@@ -9620,10 +9628,10 @@ function fx(e) {
|
|
|
9620
9628
|
defaultProp: o ?? !1,
|
|
9621
9629
|
onChange: c,
|
|
9622
9630
|
caller: Gr
|
|
9623
|
-
}), [x, g] = m.useState(null), [b, v] = m.useState(null),
|
|
9631
|
+
}), [x, g] = m.useState(null), [b, v] = m.useState(null), k = m.useRef(!1), w = x ? !!s || !!x.closest("form") : (
|
|
9624
9632
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
9625
9633
|
!0
|
|
9626
|
-
),
|
|
9634
|
+
), y = {
|
|
9627
9635
|
checked: p,
|
|
9628
9636
|
disabled: a,
|
|
9629
9637
|
setChecked: h,
|
|
@@ -9632,10 +9640,10 @@ function fx(e) {
|
|
|
9632
9640
|
name: i,
|
|
9633
9641
|
form: s,
|
|
9634
9642
|
value: f,
|
|
9635
|
-
hasConsumerStoppedPropagationRef:
|
|
9643
|
+
hasConsumerStoppedPropagationRef: k,
|
|
9636
9644
|
required: d,
|
|
9637
9645
|
defaultChecked: xt(o) ? !1 : o,
|
|
9638
|
-
isFormControl:
|
|
9646
|
+
isFormControl: w,
|
|
9639
9647
|
bubbleInput: b,
|
|
9640
9648
|
setBubbleInput: v
|
|
9641
9649
|
};
|
|
@@ -9643,8 +9651,8 @@ function fx(e) {
|
|
|
9643
9651
|
ux,
|
|
9644
9652
|
{
|
|
9645
9653
|
scope: t,
|
|
9646
|
-
...
|
|
9647
|
-
children: mx(u) ? u(
|
|
9654
|
+
...y,
|
|
9655
|
+
children: mx(u) ? u(y) : r
|
|
9648
9656
|
}
|
|
9649
9657
|
);
|
|
9650
9658
|
}
|
|
@@ -9665,8 +9673,8 @@ var Ac = "CheckboxTrigger", _c = m.forwardRef(
|
|
|
9665
9673
|
return m.useEffect(() => {
|
|
9666
9674
|
const v = a?.form;
|
|
9667
9675
|
if (v) {
|
|
9668
|
-
const
|
|
9669
|
-
return v.addEventListener("reset",
|
|
9676
|
+
const k = () => u(b.current);
|
|
9677
|
+
return v.addEventListener("reset", k), () => v.removeEventListener("reset", k);
|
|
9670
9678
|
}
|
|
9671
9679
|
}, [a, u]), /* @__PURE__ */ l.jsx(
|
|
9672
9680
|
X.button,
|
|
@@ -9685,7 +9693,7 @@ var Ac = "CheckboxTrigger", _c = m.forwardRef(
|
|
|
9685
9693
|
v.key === "Enter" && v.preventDefault();
|
|
9686
9694
|
}),
|
|
9687
9695
|
onClick: te(n, (v) => {
|
|
9688
|
-
u((
|
|
9696
|
+
u((k) => xt(k) ? !0 : !k), x && h && (p.current = v.isPropagationStopped(), p.current || v.stopPropagation());
|
|
9689
9697
|
})
|
|
9690
9698
|
}
|
|
9691
9699
|
);
|
|
@@ -9777,15 +9785,15 @@ var Wc = "CheckboxBubbleInput", Lc = m.forwardRef(
|
|
|
9777
9785
|
setBubbleInput: h
|
|
9778
9786
|
} = La(Wc, e), x = ce(n, h), g = Vr(a), b = _n(r);
|
|
9779
9787
|
m.useEffect(() => {
|
|
9780
|
-
const
|
|
9781
|
-
if (!
|
|
9782
|
-
const
|
|
9783
|
-
|
|
9788
|
+
const k = p;
|
|
9789
|
+
if (!k) return;
|
|
9790
|
+
const w = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
|
|
9791
|
+
w,
|
|
9784
9792
|
"checked"
|
|
9785
9793
|
).set, j = !o.current;
|
|
9786
9794
|
if (g !== a && N) {
|
|
9787
9795
|
const S = new Event("click", { bubbles: j });
|
|
9788
|
-
|
|
9796
|
+
k.indeterminate = xt(a), N.call(k, xt(a) ? !1 : a), k.dispatchEvent(S);
|
|
9789
9797
|
}
|
|
9790
9798
|
}, [p, g, a, o]);
|
|
9791
9799
|
const v = m.useRef(xt(a) ? !1 : a);
|
|
@@ -9887,7 +9895,7 @@ const KC = ({
|
|
|
9887
9895
|
c && /* @__PURE__ */ l.jsx(cn, { content: c })
|
|
9888
9896
|
] }),
|
|
9889
9897
|
(a || s) && /* @__PURE__ */ l.jsxs(le, { className: "ml-6", direction: "col", gap: "2", children: [
|
|
9890
|
-
a && /* @__PURE__ */ l.jsx(
|
|
9898
|
+
a && /* @__PURE__ */ l.jsx(Ee, { size: "sm", variant: "muted", children: a }),
|
|
9891
9899
|
s && /* @__PURE__ */ l.jsx(Nt, { message: s })
|
|
9892
9900
|
] })
|
|
9893
9901
|
] });
|
|
@@ -11444,8 +11452,8 @@ function ed(e) {
|
|
|
11444
11452
|
const p = Ot(e.timeZone, e), h = p > 0 ? Math.floor(p) : Math.ceil(p), g = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - h, b = h !== n, v = g - c;
|
|
11445
11453
|
if (b && v) {
|
|
11446
11454
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + v);
|
|
11447
|
-
const
|
|
11448
|
-
|
|
11455
|
+
const k = Ot(e.timeZone, e), w = k > 0 ? Math.floor(k) : Math.ceil(k), y = h - w;
|
|
11456
|
+
y && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + y), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + y));
|
|
11449
11457
|
}
|
|
11450
11458
|
}
|
|
11451
11459
|
class Ce extends Ke {
|
|
@@ -11879,19 +11887,19 @@ function st(e, t, n = tt) {
|
|
|
11879
11887
|
});
|
|
11880
11888
|
}
|
|
11881
11889
|
function xw(e, t, n, r, o) {
|
|
11882
|
-
const { disabled: a, hidden: s, modifiers: i, showOutsideDays: c, broadcastCalendar: d, today: f } = t, { isSameDay: u, isSameMonth: p, startOfMonth: h, isBefore: x, endOfMonth: g, isAfter: b } = o, v = n && h(n),
|
|
11890
|
+
const { disabled: a, hidden: s, modifiers: i, showOutsideDays: c, broadcastCalendar: d, today: f } = t, { isSameDay: u, isSameMonth: p, startOfMonth: h, isBefore: x, endOfMonth: g, isAfter: b } = o, v = n && h(n), k = r && g(r), w = {
|
|
11883
11891
|
[pe.focused]: [],
|
|
11884
11892
|
[pe.outside]: [],
|
|
11885
11893
|
[pe.disabled]: [],
|
|
11886
11894
|
[pe.hidden]: [],
|
|
11887
11895
|
[pe.today]: []
|
|
11888
|
-
},
|
|
11896
|
+
}, y = {};
|
|
11889
11897
|
for (const N of e) {
|
|
11890
|
-
const { date: j, displayMonth: S } = N, M = !!(S && !p(j, S)), R = !!(v && x(j, v)), _ = !!(
|
|
11898
|
+
const { date: j, displayMonth: S } = N, M = !!(S && !p(j, S)), R = !!(v && x(j, v)), _ = !!(k && b(j, k)), P = !!(a && st(j, a, o)), z = !!(s && st(j, s, o)) || R || _ || // Broadcast calendar will show outside days as default
|
|
11891
11899
|
!d && !c && M || d && c === !1 && M, T = u(j, f ?? o.today());
|
|
11892
|
-
M &&
|
|
11900
|
+
M && w.outside.push(N), P && w.disabled.push(N), z && w.hidden.push(N), T && w.today.push(N), i && Object.keys(i).forEach((G) => {
|
|
11893
11901
|
const Y = i?.[G];
|
|
11894
|
-
Y && st(j, Y, o) && (
|
|
11902
|
+
Y && st(j, Y, o) && (y[G] ? y[G].push(N) : y[G] = [N]);
|
|
11895
11903
|
});
|
|
11896
11904
|
}
|
|
11897
11905
|
return (N) => {
|
|
@@ -11902,12 +11910,12 @@ function xw(e, t, n, r, o) {
|
|
|
11902
11910
|
[pe.outside]: !1,
|
|
11903
11911
|
[pe.today]: !1
|
|
11904
11912
|
}, S = {};
|
|
11905
|
-
for (const M in
|
|
11906
|
-
const R =
|
|
11913
|
+
for (const M in w) {
|
|
11914
|
+
const R = w[M];
|
|
11907
11915
|
j[M] = R.some((_) => _ === N);
|
|
11908
11916
|
}
|
|
11909
|
-
for (const M in
|
|
11910
|
-
S[M] =
|
|
11917
|
+
for (const M in y)
|
|
11918
|
+
S[M] = y[M].some((R) => R === N);
|
|
11911
11919
|
return {
|
|
11912
11920
|
...j,
|
|
11913
11921
|
// custom modifiers should override all the previous ones
|
|
@@ -12093,33 +12101,33 @@ function Zw(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
12093
12101
|
r.length === 0 || d.length === 0 || r.length !== d.length)
|
|
12094
12102
|
return;
|
|
12095
12103
|
const f = a.isSameMonth(r[0].date, d[0].date), u = a.isAfter(r[0].date, d[0].date), p = u ? n[Oe.caption_after_enter] : n[Oe.caption_before_enter], h = u ? n[Oe.weeks_after_enter] : n[Oe.weeks_before_enter], x = s.current, g = e.current.cloneNode(!0);
|
|
12096
|
-
if (g instanceof HTMLElement ? (Co(g).forEach((
|
|
12097
|
-
if (!(
|
|
12104
|
+
if (g instanceof HTMLElement ? (Co(g).forEach((w) => {
|
|
12105
|
+
if (!(w instanceof HTMLElement))
|
|
12098
12106
|
return;
|
|
12099
|
-
const
|
|
12100
|
-
|
|
12101
|
-
const N = So(
|
|
12107
|
+
const y = Uw(w);
|
|
12108
|
+
y && w.contains(y) && w.removeChild(y);
|
|
12109
|
+
const N = So(w);
|
|
12102
12110
|
N && N.classList.remove(p);
|
|
12103
|
-
const j = No(
|
|
12111
|
+
const j = No(w);
|
|
12104
12112
|
j && j.classList.remove(h);
|
|
12105
12113
|
}), s.current = g) : s.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
12106
12114
|
o)
|
|
12107
12115
|
return;
|
|
12108
12116
|
const b = x instanceof HTMLElement ? Co(x) : [], v = Co(e.current);
|
|
12109
|
-
if (v?.every((
|
|
12117
|
+
if (v?.every((k) => k instanceof HTMLElement) && b && b.every((k) => k instanceof HTMLElement)) {
|
|
12110
12118
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
12111
|
-
const
|
|
12112
|
-
|
|
12113
|
-
const N = b[
|
|
12119
|
+
const k = qw(e.current);
|
|
12120
|
+
k && (k.style.zIndex = "1"), v.forEach((w, y) => {
|
|
12121
|
+
const N = b[y];
|
|
12114
12122
|
if (!N)
|
|
12115
12123
|
return;
|
|
12116
|
-
|
|
12117
|
-
const j = So(
|
|
12124
|
+
w.style.position = "relative", w.style.overflow = "hidden";
|
|
12125
|
+
const j = So(w);
|
|
12118
12126
|
j && j.classList.add(p);
|
|
12119
|
-
const S = No(
|
|
12127
|
+
const S = No(w);
|
|
12120
12128
|
S && S.classList.add(h);
|
|
12121
12129
|
const M = () => {
|
|
12122
|
-
c.current = !1, e.current && (e.current.style.isolation = ""),
|
|
12130
|
+
c.current = !1, e.current && (e.current.style.isolation = ""), k && (k.style.zIndex = ""), j && j.classList.remove(p), S && S.classList.remove(h), w.style.position = "", w.style.overflow = "", w.contains(N) && w.removeChild(N);
|
|
12123
12131
|
};
|
|
12124
12132
|
N.style.pointerEvents = "none", N.style.position = "absolute", N.style.overflow = "hidden", N.setAttribute("aria-hidden", "true");
|
|
12125
12133
|
const R = Kw(N);
|
|
@@ -12127,15 +12135,15 @@ function Zw(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
12127
12135
|
const _ = So(N);
|
|
12128
12136
|
_ && (_.classList.add(u ? n[Oe.caption_before_exit] : n[Oe.caption_after_exit]), _.addEventListener("animationend", M));
|
|
12129
12137
|
const P = No(N);
|
|
12130
|
-
P && P.classList.add(u ? n[Oe.weeks_before_exit] : n[Oe.weeks_after_exit]),
|
|
12138
|
+
P && P.classList.add(u ? n[Oe.weeks_before_exit] : n[Oe.weeks_after_exit]), w.insertBefore(N, w.firstChild);
|
|
12131
12139
|
});
|
|
12132
12140
|
}
|
|
12133
12141
|
});
|
|
12134
12142
|
}
|
|
12135
12143
|
function Xw(e, t, n, r) {
|
|
12136
|
-
const o = e[0], a = e[e.length - 1], { ISOWeek: s, fixedWeeks: i, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: h, endOfMonth: x, endOfWeek: g, isAfter: b, startOfBroadcastWeek: v, startOfISOWeek:
|
|
12144
|
+
const o = e[0], a = e[e.length - 1], { ISOWeek: s, fixedWeeks: i, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: h, endOfMonth: x, endOfWeek: g, isAfter: b, startOfBroadcastWeek: v, startOfISOWeek: k, startOfWeek: w } = r, y = c ? v(o, r) : s ? k(o) : w(o), N = c ? p(a) : s ? h(x(a)) : g(x(a)), j = f(N, y), S = u(a, o) + 1, M = [];
|
|
12137
12145
|
for (let P = 0; P <= j; P++) {
|
|
12138
|
-
const z = d(
|
|
12146
|
+
const z = d(y, P);
|
|
12139
12147
|
if (t && b(z, t))
|
|
12140
12148
|
break;
|
|
12141
12149
|
M.push(z);
|
|
@@ -12179,15 +12187,15 @@ function zs(e, t, n, r) {
|
|
|
12179
12187
|
}
|
|
12180
12188
|
function e0(e, t, n, r) {
|
|
12181
12189
|
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: s, endOfMonth: i, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: h } = r, x = e.reduce((g, b) => {
|
|
12182
|
-
const v = n.broadcastCalendar ? u(b, r) : n.ISOWeek ? p(b) : h(b),
|
|
12183
|
-
if (n.fixedWeeks &&
|
|
12190
|
+
const v = n.broadcastCalendar ? u(b, r) : n.ISOWeek ? p(b) : h(b), k = n.broadcastCalendar ? a(b) : n.ISOWeek ? s(i(b)) : c(i(b)), w = t.filter((S) => S >= v && S <= k), y = n.broadcastCalendar ? 35 : 42;
|
|
12191
|
+
if (n.fixedWeeks && w.length < y) {
|
|
12184
12192
|
const S = t.filter((M) => {
|
|
12185
|
-
const R =
|
|
12186
|
-
return M >
|
|
12193
|
+
const R = y - w.length;
|
|
12194
|
+
return M > k && M <= o(k, R);
|
|
12187
12195
|
});
|
|
12188
|
-
|
|
12196
|
+
w.push(...S);
|
|
12189
12197
|
}
|
|
12190
|
-
const N =
|
|
12198
|
+
const N = w.reduce((S, M) => {
|
|
12191
12199
|
const R = n.ISOWeek ? d(M) : f(M), _ = S.find((z) => z.weekNumber === R), P = new nd(M, b, r);
|
|
12192
12200
|
return _ ? _.days.push(P) : S.push(new Gy(R, [P])), S;
|
|
12193
12201
|
}, []), j = new Vy(b, N);
|
|
@@ -12241,7 +12249,7 @@ function a0(e, t) {
|
|
|
12241
12249
|
const j = zs(e, n, r, t);
|
|
12242
12250
|
c(j);
|
|
12243
12251
|
}, [e.timeZone]);
|
|
12244
|
-
const d = Jw(i, r, e, t), f = Xw(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = e0(d, f, e, t), p = o0(u), h = Qw(u), x = r0(i, n, e, t), g = n0(i, r, e, t), { disableNavigation: b, onMonthChange: v } = e,
|
|
12252
|
+
const d = Jw(i, r, e, t), f = Xw(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = e0(d, f, e, t), p = o0(u), h = Qw(u), x = r0(i, n, e, t), g = n0(i, r, e, t), { disableNavigation: b, onMonthChange: v } = e, k = (j) => p.some((S) => S.days.some((M) => M.isEqualTo(j))), w = (j) => {
|
|
12245
12253
|
if (b)
|
|
12246
12254
|
return;
|
|
12247
12255
|
let S = o(j);
|
|
@@ -12255,9 +12263,9 @@ function a0(e, t) {
|
|
|
12255
12263
|
navEnd: r,
|
|
12256
12264
|
previousMonth: x,
|
|
12257
12265
|
nextMonth: g,
|
|
12258
|
-
goToMonth:
|
|
12266
|
+
goToMonth: w,
|
|
12259
12267
|
goToDay: (j) => {
|
|
12260
|
-
|
|
12268
|
+
k(j) || w(j.date);
|
|
12261
12269
|
}
|
|
12262
12270
|
};
|
|
12263
12271
|
}
|
|
@@ -12277,13 +12285,13 @@ function s0(e, t, n, r) {
|
|
|
12277
12285
|
return o || (o = e.find((s) => Hs(t(s)))), o;
|
|
12278
12286
|
}
|
|
12279
12287
|
function i0(e, t, n, r, o, a, s) {
|
|
12280
|
-
const { ISOWeek: i, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: h, endOfISOWeek: x, endOfWeek: g, max: b, min: v, startOfBroadcastWeek:
|
|
12288
|
+
const { ISOWeek: i, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: h, endOfISOWeek: x, endOfWeek: g, max: b, min: v, startOfBroadcastWeek: k, startOfISOWeek: w, startOfWeek: y } = s;
|
|
12281
12289
|
let j = {
|
|
12282
12290
|
day: d,
|
|
12283
12291
|
week: u,
|
|
12284
12292
|
month: f,
|
|
12285
12293
|
year: p,
|
|
12286
|
-
startOfWeek: (S) => c ?
|
|
12294
|
+
startOfWeek: (S) => c ? k(S, s) : i ? w(S) : y(S),
|
|
12287
12295
|
endOfWeek: (S) => c ? h(S) : i ? x(S) : g(S)
|
|
12288
12296
|
}[e](n, t === "after" ? 1 : -1);
|
|
12289
12297
|
return t === "before" && r ? j = b([r, j]) : t === "after" && o && (j = v([o, j])), j;
|
|
@@ -12307,7 +12315,7 @@ function l0(e, t, n, r, o) {
|
|
|
12307
12315
|
if (!d)
|
|
12308
12316
|
return;
|
|
12309
12317
|
const v = hd(g, b, d, t.navStart, t.navEnd, e, o);
|
|
12310
|
-
v && (e.disableNavigation && !t.days.some((
|
|
12318
|
+
v && (e.disableNavigation && !t.days.some((w) => w.isEqualTo(v)) || (t.goToDay(v), f(v)));
|
|
12311
12319
|
}
|
|
12312
12320
|
};
|
|
12313
12321
|
}
|
|
@@ -12464,11 +12472,11 @@ function g0(e) {
|
|
|
12464
12472
|
t.formatters,
|
|
12465
12473
|
t.labels,
|
|
12466
12474
|
t.classNames
|
|
12467
|
-
]), { captionLayout: c, mode: d, navLayout: f, numberOfMonths: u = 1, onDayBlur: p, onDayClick: h, onDayFocus: x, onDayKeyDown: g, onDayMouseEnter: b, onDayMouseLeave: v, onNextClick:
|
|
12468
|
-
D && (se(D),
|
|
12469
|
-
}, [D, se,
|
|
12470
|
-
Q && (se(Q),
|
|
12471
|
-
}, [se, Q,
|
|
12475
|
+
]), { captionLayout: c, mode: d, navLayout: f, numberOfMonths: u = 1, onDayBlur: p, onDayClick: h, onDayFocus: x, onDayKeyDown: g, onDayMouseEnter: b, onDayMouseLeave: v, onNextClick: k, onPrevClick: w, showWeekNumber: y, styles: N } = t, { formatCaption: j, formatDay: S, formatMonthDropdown: M, formatWeekNumber: R, formatWeekNumberHeader: _, formatWeekdayName: P, formatYearDropdown: z } = r, T = a0(t, a), { days: G, months: Y, navStart: F, navEnd: H, previousMonth: D, nextMonth: Q, goToMonth: se } = T, we = xw(G, t, F, H, a), { isSelected: O, select: A, selected: V } = h0(t, a) ?? {}, { blur: W, focused: ne, isFocusTarget: U, moveFocus: ue, setFocused: ie } = l0(t, T, we, O ?? (() => !1), a), { labelDayButton: xe, labelGridcell: Me, labelGrid: $e, labelMonthDropdown: nt, labelNav: ee, labelPrevious: Vn, labelNext: Gn, labelWeekday: pn, labelWeekNumber: Qr, labelWeekNumberHeader: Jr, labelYearDropdown: mt } = o, Yn = Rt(() => _w(a, t.ISOWeek), [a, t.ISOWeek]), Un = d !== void 0 || h !== void 0, rt = Ae(() => {
|
|
12476
|
+
D && (se(D), w?.(D));
|
|
12477
|
+
}, [D, se, w]), hn = Ae(() => {
|
|
12478
|
+
Q && (se(Q), k?.(Q));
|
|
12479
|
+
}, [se, Q, k]), qn = Ae((re, I) => ($) => {
|
|
12472
12480
|
$.preventDefault(), $.stopPropagation(), ie(re), A?.(re.date, I, $), h?.(re.date, I, $);
|
|
12473
12481
|
}, [A, h, ie]), eo = Ae((re, I) => ($) => {
|
|
12474
12482
|
ie(re), x?.(re.date, I, $);
|
|
@@ -12594,13 +12602,13 @@ function g0(e) {
|
|
|
12594
12602
|
!t.hideWeekdays && E.createElement(
|
|
12595
12603
|
n.Weekdays,
|
|
12596
12604
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: i[q.Weekdays], style: N?.[q.Weekdays] },
|
|
12597
|
-
|
|
12605
|
+
y && E.createElement(n.WeekNumberHeader, { "aria-label": Jr(a.options), className: i[q.WeekNumberHeader], style: N?.[q.WeekNumberHeader], scope: "col" }, _()),
|
|
12598
12606
|
Yn.map(($) => E.createElement(n.Weekday, { "aria-label": pn($, a.options, a), className: i[q.Weekday], key: String($), style: N?.[q.Weekday], scope: "col" }, P($, a.options, a)))
|
|
12599
12607
|
),
|
|
12600
12608
|
E.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: i[q.Weeks], style: N?.[q.Weeks] }, re.weeks.map(($) => E.createElement(
|
|
12601
12609
|
n.Week,
|
|
12602
12610
|
{ className: i[q.Week], key: $.weekNumber, style: N?.[q.Week], week: $ },
|
|
12603
|
-
|
|
12611
|
+
y && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
12604
12612
|
E.createElement(n.WeekNumber, { week: $, style: N?.[q.WeekNumber], "aria-label": Qr($.weekNumber, {
|
|
12605
12613
|
locale: s
|
|
12606
12614
|
}), className: i[q.WeekNumber], scope: "row", role: "rowheader" }, R($.weekNumber, a)),
|
|
@@ -12610,7 +12618,7 @@ function g0(e) {
|
|
|
12610
12618
|
const { from: Se, to: Fe } = V;
|
|
12611
12619
|
Z[We.range_start] = !!(Se && Fe && a.isSameDay(J, Se)), Z[We.range_end] = !!(Se && Fe && a.isSameDay(J, Fe)), Z[We.range_middle] = at(V, J, !0, a);
|
|
12612
12620
|
}
|
|
12613
|
-
const ke = Aw(Z, N, t.modifiersStyles), ye = yw(Z, i, t.modifiersClassNames), Ve = !Un && !Z.hidden ?
|
|
12621
|
+
const ke = Aw(Z, N, t.modifiersStyles), ye = yw(Z, i, t.modifiersClassNames), Ve = !Un && !Z.hidden ? Me(J, Z, a.options, a) : void 0;
|
|
12614
12622
|
return (
|
|
12615
12623
|
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
12616
12624
|
E.createElement(n.Day, { key: `${a.format(J, "yyyy-MM-dd")}_${a.format(K.displayMonth, "yyyy-MM")}`, day: K, modifiers: Z, className: ye.join(" "), style: ke, role: "gridcell", "aria-selected": Z.selected || void 0, "aria-label": Ve, "data-day": a.format(J, "yyyy-MM-dd"), "data-month": K.outside ? a.format(J, "yyyy-MM") : void 0, "data-selected": Z.selected || void 0, "data-disabled": Z.disabled || void 0, "data-hidden": Z.hidden || void 0, "data-outside": K.outside || void 0, "data-focused": Z.focused || void 0, "data-today": Z.today || void 0 }, !Z.hidden && Un ? E.createElement(n.DayButton, { className: i[q.DayButton], style: N?.[q.DayButton], type: "button", day: K, modifiers: Z, disabled: Z.disabled || void 0, tabIndex: U(K) ? 0 : -1, "aria-label": xe(J, Z, a.options, a), onClick: qn(K, Z), onBlur: to(K, Z), onFocus: eo(K, Z), onKeyDown: Bt(K, Z), onMouseEnter: no(K, Z), onMouseLeave: Kn(K, Z) }, S(J, a.options, a)) : !Z.hidden && S(K.date, a.options, a))
|
|
@@ -12641,7 +12649,7 @@ function gd({
|
|
|
12641
12649
|
to: O + Math.ceil(r / 2)
|
|
12642
12650
|
};
|
|
12643
12651
|
}, [r])
|
|
12644
|
-
), { onPrevClick: f, startMonth: u, endMonth: p } = a, h = s === "years" ? 1 : o, x = C("relative flex", a.monthsClassName), g = C("relative mx-10 flex h-7 items-center justify-center", a.monthCaptionClassName), b = C("flex flex-row", a.weekdaysClassName), v = C("w-8 font-normal text-muted-foreground text-sm", a.weekdayClassName),
|
|
12652
|
+
), { onPrevClick: f, startMonth: u, endMonth: p } = a, h = s === "years" ? 1 : o, x = C("relative flex", a.monthsClassName), g = C("relative mx-10 flex h-7 items-center justify-center", a.monthCaptionClassName), b = C("flex flex-row", a.weekdaysClassName), v = C("w-8 font-normal text-muted-foreground text-sm", a.weekdayClassName), k = C("w-full", a.monthClassName), w = C("relative flex items-center justify-center pt-1", a.captionClassName), y = C("truncate font-medium text-sm", a.captionLabelClassName), N = yr({
|
|
12645
12653
|
variant: "outline",
|
|
12646
12654
|
className: "absolute h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
12647
12655
|
}), j = C(N, "right-0", a.buttonNextClassName), S = C(N, "left-0", a.buttonPreviousClassName), M = C("flex items-start", a.navClassName), R = C("mx-auto mt-4", a.monthGridClassName), _ = C("mt-2 flex w-max items-start", a.weekClassName), P = C("flex size-8 flex-1 items-center justify-center p-0 text-sm", a.dayClassName), z = C(
|
|
@@ -12667,9 +12675,9 @@ function gd({
|
|
|
12667
12675
|
month_caption: g,
|
|
12668
12676
|
weekdays: b,
|
|
12669
12677
|
weekday: v,
|
|
12670
|
-
month:
|
|
12671
|
-
caption:
|
|
12672
|
-
caption_label:
|
|
12678
|
+
month: k,
|
|
12679
|
+
caption: w,
|
|
12680
|
+
caption_label: y,
|
|
12673
12681
|
button_next: j,
|
|
12674
12682
|
button_previous: S,
|
|
12675
12683
|
nav: M,
|
|
@@ -12922,7 +12930,7 @@ const XC = ({ onDateSelection: e, initialValue: t, className: n, size: r = "defa
|
|
|
12922
12930
|
d
|
|
12923
12931
|
);
|
|
12924
12932
|
return /* @__PURE__ */ l.jsxs(le, { className: "w-full", direction: a === "left" ? "row" : "col", gap: "2", children: [
|
|
12925
|
-
/* @__PURE__ */ l.jsxs(le, { align: "center", direction: "row", gap: "1", children: [
|
|
12933
|
+
(r || s) && /* @__PURE__ */ l.jsxs(le, { align: "center", direction: "row", gap: "1", children: [
|
|
12926
12934
|
r && /* @__PURE__ */ l.jsx(
|
|
12927
12935
|
Je,
|
|
12928
12936
|
{
|
|
@@ -12947,10 +12955,10 @@ const XC = ({ onDateSelection: e, initialValue: t, className: n, size: r = "defa
|
|
|
12947
12955
|
...u
|
|
12948
12956
|
}
|
|
12949
12957
|
),
|
|
12950
|
-
i && /* @__PURE__ */ l.jsx(
|
|
12958
|
+
i && /* @__PURE__ */ l.jsx(Ee, { size: "sm", variant: "muted", children: i }),
|
|
12951
12959
|
f && /* @__PURE__ */ l.jsx(Nt, { message: f })
|
|
12952
12960
|
] });
|
|
12953
|
-
}, w0 = ({ type: e = "text", step: t, ...n }) => e === "number" ? /* @__PURE__ */ l.jsx(_0, { ...n, step: t ?? ".01" }) : e === "date" ? /* @__PURE__ */ l.jsx(hx, { ...n }) : /* @__PURE__ */ l.jsx(Ha, { type: e, ...n }), Nt = ({ id: e, message: t }) => /* @__PURE__ */ l.jsx(
|
|
12961
|
+
}, w0 = ({ type: e = "text", step: t, ...n }) => e === "number" ? /* @__PURE__ */ l.jsx(_0, { ...n, step: t ?? ".01" }) : e === "date" ? /* @__PURE__ */ l.jsx(hx, { ...n }) : /* @__PURE__ */ l.jsx(Ha, { type: e, ...n }), Nt = ({ id: e, message: t }) => /* @__PURE__ */ l.jsx(Ee, { id: e, size: "xs", variant: "destructive", children: t });
|
|
12954
12962
|
function k0({ className: e, ...t }) {
|
|
12955
12963
|
return /* @__PURE__ */ l.jsx(
|
|
12956
12964
|
"textarea",
|
|
@@ -13178,11 +13186,11 @@ const Je = ({ htmlFor: e, value: t, children: n, size: r = "md", className: o =
|
|
|
13178
13186
|
}
|
|
13179
13187
|
) })
|
|
13180
13188
|
] }),
|
|
13181
|
-
o && /* @__PURE__ */ l.jsx(
|
|
13189
|
+
o && /* @__PURE__ */ l.jsx(Ee, { size: "sm", variant: "muted", children: o }),
|
|
13182
13190
|
a && /* @__PURE__ */ l.jsx(Nt, { message: a })
|
|
13183
13191
|
] });
|
|
13184
13192
|
};
|
|
13185
|
-
var Va = "Radio", [I0, bd] =
|
|
13193
|
+
var Va = "Radio", [I0, bd] = De(Va), [$0, F0] = I0(Va), xd = m.forwardRef(
|
|
13186
13194
|
(e, t) => {
|
|
13187
13195
|
const {
|
|
13188
13196
|
__scopeRadio: n,
|
|
@@ -13291,7 +13299,7 @@ kd.displayName = W0;
|
|
|
13291
13299
|
function Cd(e) {
|
|
13292
13300
|
return e ? "checked" : "unchecked";
|
|
13293
13301
|
}
|
|
13294
|
-
var L0 = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Ur = "RadioGroup", [B0, JC] =
|
|
13302
|
+
var L0 = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Ur = "RadioGroup", [B0, JC] = De(Ur, [
|
|
13295
13303
|
zr,
|
|
13296
13304
|
bd
|
|
13297
13305
|
]), Sd = zr(), Nd = bd(), [z0, H0] = B0(Ur), Ed = m.forwardRef(
|
|
@@ -13492,11 +13500,11 @@ const tS = ({
|
|
|
13492
13500
|
p === "lg" && "h-10 text-base",
|
|
13493
13501
|
p === "xl" && "h-11 text-lg",
|
|
13494
13502
|
c
|
|
13495
|
-
), v = n.some((
|
|
13496
|
-
f?.(
|
|
13503
|
+
), v = n.some((w) => "options" in w), k = (w) => {
|
|
13504
|
+
f?.(w.target.value);
|
|
13497
13505
|
};
|
|
13498
13506
|
return /* @__PURE__ */ l.jsxs(le, { className: "w-full", direction: "col", gap: "2", children: [
|
|
13499
|
-
/* @__PURE__ */ l.jsxs(le, { align: "center", direction: "row", gap: "1", children: [
|
|
13507
|
+
(r || s) && /* @__PURE__ */ l.jsxs(le, { align: "center", direction: "row", gap: "1", children: [
|
|
13500
13508
|
r && /* @__PURE__ */ l.jsx(Je, { className: o, htmlFor: g, children: r }),
|
|
13501
13509
|
s && /* @__PURE__ */ l.jsx(cn, { content: s })
|
|
13502
13510
|
] }),
|
|
@@ -13508,17 +13516,17 @@ const tS = ({
|
|
|
13508
13516
|
className: b,
|
|
13509
13517
|
id: g,
|
|
13510
13518
|
name: e,
|
|
13511
|
-
onChange:
|
|
13519
|
+
onChange: k,
|
|
13512
13520
|
...d !== void 0 ? { value: d } : { defaultValue: t },
|
|
13513
13521
|
...x,
|
|
13514
13522
|
children: [
|
|
13515
13523
|
/* @__PURE__ */ l.jsx(Eo, { value: "", children: a }),
|
|
13516
|
-
!v && n.map(({ value:
|
|
13517
|
-
v && n.map(({ label:
|
|
13524
|
+
!v && n.map(({ value: w, label: y }) => /* @__PURE__ */ l.jsx(Eo, { value: w, children: y }, `option-${w}`)),
|
|
13525
|
+
v && n.map(({ label: w, options: y }) => /* @__PURE__ */ l.jsx(X0, { label: w, children: y.map(({ value: N, label: j }) => /* @__PURE__ */ l.jsx(Eo, { value: N, children: j }, `option-${N}`)) }, `option-group-${w}`))
|
|
13518
13526
|
]
|
|
13519
13527
|
}
|
|
13520
13528
|
),
|
|
13521
|
-
i && /* @__PURE__ */ l.jsx(
|
|
13529
|
+
i && /* @__PURE__ */ l.jsx(Ee, { size: "sm", variant: "muted", children: i }),
|
|
13522
13530
|
u && /* @__PURE__ */ l.jsx(Nt, { id: `${g}-error`, message: u })
|
|
13523
13531
|
] });
|
|
13524
13532
|
}, Mo = 768;
|
|
@@ -13536,13 +13544,14 @@ const Q0 = ({
|
|
|
13536
13544
|
open: t,
|
|
13537
13545
|
setOpen: n,
|
|
13538
13546
|
children: r,
|
|
13539
|
-
triggerId: o
|
|
13547
|
+
triggerId: o,
|
|
13548
|
+
className: a
|
|
13540
13549
|
}) => /* @__PURE__ */ l.jsxs(Aa, { onOpenChange: n, open: t, children: [
|
|
13541
13550
|
/* @__PURE__ */ l.jsx(_a, { asChild: !0, children: /* @__PURE__ */ l.jsxs(
|
|
13542
13551
|
kt,
|
|
13543
13552
|
{
|
|
13544
13553
|
"aria-expanded": t,
|
|
13545
|
-
className: "w-full justify-between font-normal",
|
|
13554
|
+
className: C("w-full justify-between font-normal", a),
|
|
13546
13555
|
id: o,
|
|
13547
13556
|
role: "combobox",
|
|
13548
13557
|
variant: "outline",
|
|
@@ -13912,10 +13921,10 @@ function b1({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
13912
13921
|
n,
|
|
13913
13922
|
p,
|
|
13914
13923
|
c
|
|
13915
|
-
]),
|
|
13924
|
+
]), k = E.useMemo(() => g !== null ? v?.[g] : null, [
|
|
13916
13925
|
v,
|
|
13917
13926
|
g
|
|
13918
|
-
]),
|
|
13927
|
+
]), w = E.useCallback((S) => {
|
|
13919
13928
|
var M;
|
|
13920
13929
|
const R = (M = v?.findIndex((_) => _ === S)) != null ? M : null;
|
|
13921
13930
|
s(R), be(r.current, {
|
|
@@ -13940,44 +13949,44 @@ function b1({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
13940
13949
|
if (f || e) {
|
|
13941
13950
|
var S;
|
|
13942
13951
|
const M = (S = n?.findIndex((R) => R === e || R === f)) != null ? S : -1;
|
|
13943
|
-
v && M !== -1 && typeof v[M] == "number" &&
|
|
13952
|
+
v && M !== -1 && typeof v[M] == "number" && w(v[M]);
|
|
13944
13953
|
}
|
|
13945
13954
|
}, [
|
|
13946
13955
|
f,
|
|
13947
13956
|
e,
|
|
13948
13957
|
n,
|
|
13949
13958
|
v,
|
|
13950
|
-
|
|
13959
|
+
w
|
|
13951
13960
|
]);
|
|
13952
|
-
function
|
|
13961
|
+
function y({ draggedDistance: S, closeDrawer: M, velocity: R, dismissible: _ }) {
|
|
13953
13962
|
if (a === void 0) return;
|
|
13954
|
-
const P = i === "bottom" || i === "right" ? (
|
|
13963
|
+
const P = i === "bottom" || i === "right" ? (k ?? 0) - S : (k ?? 0) + S, z = g === a - 1, T = g === 0, G = S > 0;
|
|
13955
13964
|
if (z && be(o.current, {
|
|
13956
13965
|
transition: `opacity ${me.DURATION}s cubic-bezier(${me.EASE.join(",")})`
|
|
13957
13966
|
}), !d && R > 2 && !G) {
|
|
13958
|
-
_ ? M() :
|
|
13967
|
+
_ ? M() : w(v[0]);
|
|
13959
13968
|
return;
|
|
13960
13969
|
}
|
|
13961
13970
|
if (!d && R > 2 && G && v && n) {
|
|
13962
|
-
|
|
13971
|
+
w(v[n.length - 1]);
|
|
13963
13972
|
return;
|
|
13964
13973
|
}
|
|
13965
13974
|
const Y = v?.reduce((H, D) => typeof H != "number" || typeof D != "number" ? H : Math.abs(D - P) < Math.abs(H - P) ? D : H), F = he(i) ? window.innerHeight : window.innerWidth;
|
|
13966
13975
|
if (R > Id && Math.abs(S) < F * 0.4) {
|
|
13967
13976
|
const H = G ? 1 : -1;
|
|
13968
13977
|
if (H > 0 && x && n) {
|
|
13969
|
-
|
|
13978
|
+
w(v[n.length - 1]);
|
|
13970
13979
|
return;
|
|
13971
13980
|
}
|
|
13972
13981
|
if (T && H < 0 && _ && M(), g === null) return;
|
|
13973
|
-
|
|
13982
|
+
w(v[g + H]);
|
|
13974
13983
|
return;
|
|
13975
13984
|
}
|
|
13976
|
-
|
|
13985
|
+
w(Y);
|
|
13977
13986
|
}
|
|
13978
13987
|
function N({ draggedDistance: S }) {
|
|
13979
|
-
if (
|
|
13980
|
-
const M = i === "bottom" || i === "right" ?
|
|
13988
|
+
if (k === null) return;
|
|
13989
|
+
const M = i === "bottom" || i === "right" ? k - S : k + S;
|
|
13981
13990
|
(i === "bottom" || i === "right") && M < v[v.length - 1] || (i === "top" || i === "left") && M > v[v.length - 1] || be(r.current, {
|
|
13982
13991
|
transform: he(i) ? `translate3d(0, ${M}px, 0)` : `translate3d(${M}px, 0, 0)`
|
|
13983
13992
|
});
|
|
@@ -13999,7 +14008,7 @@ function b1({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
13999
14008
|
getPercentageDragged: j,
|
|
14000
14009
|
setActiveSnapPoint: u,
|
|
14001
14010
|
activeSnapPointIndex: g,
|
|
14002
|
-
onRelease:
|
|
14011
|
+
onRelease: y,
|
|
14003
14012
|
onDrag: N,
|
|
14004
14013
|
snapPointsOffset: v
|
|
14005
14014
|
};
|
|
@@ -14114,19 +14123,19 @@ function w1({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
14114
14123
|
restorePositionSetting: f
|
|
14115
14124
|
};
|
|
14116
14125
|
}
|
|
14117
|
-
function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: s = !1, setBackgroundColorOnScale: i = !0, closeThreshold: c = h1, scrollLockTimeout: d = g1, dismissible: f = !0, handleOnly: u = !1, fadeFromIndex: p = a && a.length - 1, activeSnapPoint: h, setActiveSnapPoint: x, fixed: g, modal: b = !0, onClose: v, nested:
|
|
14126
|
+
function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: s = !1, setBackgroundColorOnScale: i = !0, closeThreshold: c = h1, scrollLockTimeout: d = g1, dismissible: f = !0, handleOnly: u = !1, fadeFromIndex: p = a && a.length - 1, activeSnapPoint: h, setActiveSnapPoint: x, fixed: g, modal: b = !0, onClose: v, nested: k, noBodyStyles: w = !1, direction: y = "bottom", defaultOpen: N = !1, disablePreventScroll: j = !0, snapToSequentialPoint: S = !1, preventScrollRestoration: M = !1, repositionInputs: R = !0, onAnimationEnd: _, container: P, autoFocus: z = !1 }) {
|
|
14118
14127
|
var T, G;
|
|
14119
14128
|
const [Y = !1, F] = Wd({
|
|
14120
14129
|
defaultProp: N,
|
|
14121
14130
|
prop: e,
|
|
14122
14131
|
onChange: (I) => {
|
|
14123
|
-
t?.(I), !I && !
|
|
14132
|
+
t?.(I), !I && !k && to(), setTimeout(() => {
|
|
14124
14133
|
_?.(I);
|
|
14125
14134
|
}, me.DURATION * 1e3), I && !b && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
14126
14135
|
document.body.style.pointerEvents = "auto";
|
|
14127
14136
|
}), I || (document.body.style.pointerEvents = "auto");
|
|
14128
14137
|
}
|
|
14129
|
-
}), [H, D] = E.useState(!1), [Q, se] = E.useState(!1), [we, O] = E.useState(!1), A = E.useRef(null), V = E.useRef(null), W = E.useRef(null), ne = E.useRef(null), U = E.useRef(null), ue = E.useRef(!1), ie = E.useRef(null), xe = E.useRef(0),
|
|
14138
|
+
}), [H, D] = E.useState(!1), [Q, se] = E.useState(!1), [we, O] = E.useState(!1), A = E.useRef(null), V = E.useRef(null), W = E.useRef(null), ne = E.useRef(null), U = E.useRef(null), ue = E.useRef(!1), ie = E.useRef(null), xe = E.useRef(0), Me = E.useRef(!1), $e = E.useRef(!N), nt = E.useRef(0), ee = E.useRef(null), Vn = E.useRef(((T = ee.current) == null ? void 0 : T.getBoundingClientRect().height) || 0), Gn = E.useRef(((G = ee.current) == null ? void 0 : G.getBoundingClientRect().width) || 0), pn = E.useRef(0), Qr = E.useCallback((I) => {
|
|
14130
14139
|
a && I === rt.length - 1 && (V.current = /* @__PURE__ */ new Date());
|
|
14131
14140
|
}, []), { activeSnapPoint: Jr, activeSnapPointIndex: mt, setActiveSnapPoint: Yn, onRelease: Un, snapPointsOffset: rt, onDrag: hn, shouldFade: qn, getPercentageDragged: eo } = b1({
|
|
14132
14141
|
snapPoints: a,
|
|
@@ -14136,7 +14145,7 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14136
14145
|
fadeFromIndex: p,
|
|
14137
14146
|
overlayRef: A,
|
|
14138
14147
|
onSnapPointChange: Qr,
|
|
14139
|
-
direction:
|
|
14148
|
+
direction: y,
|
|
14140
14149
|
container: P,
|
|
14141
14150
|
snapToSequentialPoint: S
|
|
14142
14151
|
});
|
|
@@ -14146,10 +14155,10 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14146
14155
|
const { restorePositionSetting: to } = w1({
|
|
14147
14156
|
isOpen: Y,
|
|
14148
14157
|
modal: b,
|
|
14149
|
-
nested:
|
|
14158
|
+
nested: k ?? !1,
|
|
14150
14159
|
hasBeenOpened: H,
|
|
14151
14160
|
preventScrollRestoration: M,
|
|
14152
|
-
noBodyStyles:
|
|
14161
|
+
noBodyStyles: w
|
|
14153
14162
|
});
|
|
14154
14163
|
function Bt() {
|
|
14155
14164
|
return (window.innerWidth - Zo) / window.innerWidth;
|
|
@@ -14158,19 +14167,19 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14158
14167
|
var $, K;
|
|
14159
14168
|
!f && !a || ee.current && !ee.current.contains(I.target) || (Vn.current = (($ = ee.current) == null ? void 0 : $.getBoundingClientRect().height) || 0, Gn.current = ((K = ee.current) == null ? void 0 : K.getBoundingClientRect().width) || 0, se(!0), W.current = /* @__PURE__ */ new Date(), Td() && window.addEventListener("touchend", () => ue.current = !1, {
|
|
14160
14169
|
once: !0
|
|
14161
|
-
}), I.target.setPointerCapture(I.pointerId), xe.current = he(
|
|
14170
|
+
}), I.target.setPointerCapture(I.pointerId), xe.current = he(y) ? I.pageY : I.pageX);
|
|
14162
14171
|
}
|
|
14163
14172
|
function Kn(I, $) {
|
|
14164
14173
|
var K;
|
|
14165
14174
|
let J = I;
|
|
14166
|
-
const Z = (K = window.getSelection()) == null ? void 0 : K.toString(), ke = ee.current ? lr(ee.current,
|
|
14175
|
+
const Z = (K = window.getSelection()) == null ? void 0 : K.toString(), ke = ee.current ? lr(ee.current, y) : null, ye = /* @__PURE__ */ new Date();
|
|
14167
14176
|
if (J.tagName === "SELECT" || J.hasAttribute("data-vaul-no-drag") || J.closest("[data-vaul-no-drag]"))
|
|
14168
14177
|
return !1;
|
|
14169
|
-
if (
|
|
14178
|
+
if (y === "right" || y === "left")
|
|
14170
14179
|
return !0;
|
|
14171
14180
|
if (V.current && ye.getTime() - V.current.getTime() < 500)
|
|
14172
14181
|
return !1;
|
|
14173
|
-
if (ke !== null && (
|
|
14182
|
+
if (ke !== null && (y === "bottom" ? ke > 0 : ke < 0))
|
|
14174
14183
|
return !0;
|
|
14175
14184
|
if (Z && Z.length > 0)
|
|
14176
14185
|
return !1;
|
|
@@ -14189,9 +14198,9 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14189
14198
|
}
|
|
14190
14199
|
function ro(I) {
|
|
14191
14200
|
if (ee.current && Q) {
|
|
14192
|
-
const $ =
|
|
14201
|
+
const $ = y === "bottom" || y === "right" ? 1 : -1, K = (xe.current - (he(y) ? I.pageY : I.pageX)) * $, J = K > 0, Z = a && !f && !J;
|
|
14193
14202
|
if (Z && mt === 0) return;
|
|
14194
|
-
const ke = Math.abs(K), ye = document.querySelector("[data-vaul-drawer-wrapper]"), Ve =
|
|
14203
|
+
const ke = Math.abs(K), ye = document.querySelector("[data-vaul-drawer-wrapper]"), Ve = y === "bottom" || y === "top" ? Vn.current : Gn.current;
|
|
14195
14204
|
let Se = ke / Ve;
|
|
14196
14205
|
const Fe = eo(ke, J);
|
|
14197
14206
|
if (Fe !== null && (Se = Fe), Z && Se >= 1 || !ue.current && !Kn(I.target, J)) return;
|
|
@@ -14204,7 +14213,7 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14204
14213
|
}), J && !a) {
|
|
14205
14214
|
const Ge = m1(K), Qn = Math.min(Ge * -1, 0) * $;
|
|
14206
14215
|
be(ee.current, {
|
|
14207
|
-
transform: he(
|
|
14216
|
+
transform: he(y) ? `translate3d(0, ${Qn}px, 0)` : `translate3d(${Qn}px, 0, 0)`
|
|
14208
14217
|
});
|
|
14209
14218
|
return;
|
|
14210
14219
|
}
|
|
@@ -14216,14 +14225,14 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14216
14225
|
const Ge = Math.min(Bt() + Se * (1 - Bt()), 1), Qn = 8 - Se * 8, Ka = Math.max(0, 14 - Se * 14);
|
|
14217
14226
|
be(ye, {
|
|
14218
14227
|
borderRadius: `${Qn}px`,
|
|
14219
|
-
transform: he(
|
|
14228
|
+
transform: he(y) ? `scale(${Ge}) translate3d(0, ${Ka}px, 0)` : `scale(${Ge}) translate3d(${Ka}px, 0, 0)`,
|
|
14220
14229
|
transition: "none"
|
|
14221
14230
|
}, !0);
|
|
14222
14231
|
}
|
|
14223
14232
|
if (!a) {
|
|
14224
14233
|
const Ge = ke * $;
|
|
14225
14234
|
be(ee.current, {
|
|
14226
|
-
transform: he(
|
|
14235
|
+
transform: he(y) ? `translate3d(0, ${Ge}px, 0)` : `translate3d(${Ge}px, 0, 0)`
|
|
14227
14236
|
});
|
|
14228
14237
|
}
|
|
14229
14238
|
}
|
|
@@ -14237,23 +14246,23 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14237
14246
|
function $() {
|
|
14238
14247
|
if (!ee.current || !R) return;
|
|
14239
14248
|
const K = document.activeElement;
|
|
14240
|
-
if (Ko(K) ||
|
|
14249
|
+
if (Ko(K) || Me.current) {
|
|
14241
14250
|
var J;
|
|
14242
14251
|
const Z = ((J = window.visualViewport) == null ? void 0 : J.height) || 0, ke = window.innerHeight;
|
|
14243
14252
|
let ye = ke - Z;
|
|
14244
14253
|
const Ve = ee.current.getBoundingClientRect().height || 0, Se = Ve > ke * 0.8;
|
|
14245
14254
|
pn.current || (pn.current = Ve);
|
|
14246
14255
|
const Fe = ee.current.getBoundingClientRect().top;
|
|
14247
|
-
if (Math.abs(nt.current - ye) > 60 && (
|
|
14256
|
+
if (Math.abs(nt.current - ye) > 60 && (Me.current = !Me.current), a && a.length > 0 && rt && mt) {
|
|
14248
14257
|
const pt = rt[mt] || 0;
|
|
14249
14258
|
ye += pt;
|
|
14250
14259
|
}
|
|
14251
|
-
if (nt.current = ye, Ve > Z ||
|
|
14260
|
+
if (nt.current = ye, Ve > Z || Me.current) {
|
|
14252
14261
|
const pt = ee.current.getBoundingClientRect().height;
|
|
14253
14262
|
let Ge = pt;
|
|
14254
14263
|
pt > Z && (Ge = Z - (Se ? Fe : Zo)), g ? ee.current.style.height = `${pt - Math.max(ye, 0)}px` : ee.current.style.height = `${Math.max(Ge, Z - Fe)}px`;
|
|
14255
14264
|
} else e1() || (ee.current.style.height = `${pn.current}px`);
|
|
14256
|
-
a && a.length > 0 && !
|
|
14265
|
+
a && a.length > 0 && !Me.current ? ee.current.style.bottom = "0px" : ee.current.style.bottom = `${Math.max(ye, 0)}px`;
|
|
14257
14266
|
}
|
|
14258
14267
|
}
|
|
14259
14268
|
return (I = window.visualViewport) == null || I.addEventListener("resize", $), () => {
|
|
@@ -14272,7 +14281,7 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14272
14281
|
}
|
|
14273
14282
|
function Zn() {
|
|
14274
14283
|
if (!ee.current) return;
|
|
14275
|
-
const I = document.querySelector("[data-vaul-drawer-wrapper]"), $ = lr(ee.current,
|
|
14284
|
+
const I = document.querySelector("[data-vaul-drawer-wrapper]"), $ = lr(ee.current, y);
|
|
14276
14285
|
be(ee.current, {
|
|
14277
14286
|
transform: "translate3d(0, 0, 0)",
|
|
14278
14287
|
transition: `transform ${me.DURATION}s cubic-bezier(${me.EASE.join(",")})`
|
|
@@ -14282,7 +14291,7 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14282
14291
|
}), s && $ && $ > 0 && Y && be(I, {
|
|
14283
14292
|
borderRadius: `${$d}px`,
|
|
14284
14293
|
overflow: "hidden",
|
|
14285
|
-
...he(
|
|
14294
|
+
...he(y) ? {
|
|
14286
14295
|
transform: `scale(${Bt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
14287
14296
|
transformOrigin: "top"
|
|
14288
14297
|
} : {
|
|
@@ -14300,21 +14309,21 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14300
14309
|
function ao(I) {
|
|
14301
14310
|
if (!Q || !ee.current) return;
|
|
14302
14311
|
ee.current.classList.remove(Ro), ue.current = !1, se(!1), ne.current = /* @__PURE__ */ new Date();
|
|
14303
|
-
const $ = lr(ee.current,
|
|
14312
|
+
const $ = lr(ee.current, y);
|
|
14304
14313
|
if (!I || !Kn(I.target, !1) || !$ || Number.isNaN($) || W.current === null) return;
|
|
14305
|
-
const K = ne.current.getTime() - W.current.getTime(), J = xe.current - (he(
|
|
14314
|
+
const K = ne.current.getTime() - W.current.getTime(), J = xe.current - (he(y) ? I.pageY : I.pageX), Z = Math.abs(J) / K;
|
|
14306
14315
|
if (Z > 0.05 && (O(!0), setTimeout(() => {
|
|
14307
14316
|
O(!1);
|
|
14308
14317
|
}, 200)), a) {
|
|
14309
14318
|
Un({
|
|
14310
|
-
draggedDistance: J * (
|
|
14319
|
+
draggedDistance: J * (y === "bottom" || y === "right" ? 1 : -1),
|
|
14311
14320
|
closeDrawer: Et,
|
|
14312
14321
|
velocity: Z,
|
|
14313
14322
|
dismissible: f
|
|
14314
14323
|
}), o?.(I, !0);
|
|
14315
14324
|
return;
|
|
14316
14325
|
}
|
|
14317
|
-
if (
|
|
14326
|
+
if (y === "bottom" || y === "right" ? J > 0 : J < 0) {
|
|
14318
14327
|
Zn(), o?.(I, !0);
|
|
14319
14328
|
return;
|
|
14320
14329
|
}
|
|
@@ -14325,7 +14334,7 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14325
14334
|
var ke;
|
|
14326
14335
|
const ye = Math.min((ke = ee.current.getBoundingClientRect().height) != null ? ke : 0, window.innerHeight);
|
|
14327
14336
|
var Ve;
|
|
14328
|
-
const Se = Math.min((Ve = ee.current.getBoundingClientRect().width) != null ? Ve : 0, window.innerWidth), Fe =
|
|
14337
|
+
const Se = Math.min((Ve = ee.current.getBoundingClientRect().width) != null ? Ve : 0, window.innerWidth), Fe = y === "left" || y === "right";
|
|
14329
14338
|
if (Math.abs($) >= (Fe ? Se : ye) * c) {
|
|
14330
14339
|
Et(), o?.(I, !1);
|
|
14331
14340
|
return;
|
|
@@ -14343,12 +14352,12 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14343
14352
|
const $ = I ? (window.innerWidth - jt) / window.innerWidth : 1, K = I ? -jt : 0;
|
|
14344
14353
|
ie.current && window.clearTimeout(ie.current), be(ee.current, {
|
|
14345
14354
|
transition: `transform ${me.DURATION}s cubic-bezier(${me.EASE.join(",")})`,
|
|
14346
|
-
transform: he(
|
|
14355
|
+
transform: he(y) ? `scale(${$}) translate3d(0, ${K}px, 0)` : `scale(${$}) translate3d(${K}px, 0, 0)`
|
|
14347
14356
|
}), !I && ee.current && (ie.current = setTimeout(() => {
|
|
14348
|
-
const J = lr(ee.current,
|
|
14357
|
+
const J = lr(ee.current, y);
|
|
14349
14358
|
be(ee.current, {
|
|
14350
14359
|
transition: "none",
|
|
14351
|
-
transform: he(
|
|
14360
|
+
transform: he(y) ? `translate3d(0, ${J}px, 0)` : `translate3d(${J}px, 0, 0)`
|
|
14352
14361
|
});
|
|
14353
14362
|
}, 500));
|
|
14354
14363
|
}
|
|
@@ -14356,15 +14365,15 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14356
14365
|
if ($ < 0) return;
|
|
14357
14366
|
const K = (window.innerWidth - jt) / window.innerWidth, J = K + $ * (1 - K), Z = -jt + $ * jt;
|
|
14358
14367
|
be(ee.current, {
|
|
14359
|
-
transform: he(
|
|
14368
|
+
transform: he(y) ? `scale(${J}) translate3d(0, ${Z}px, 0)` : `scale(${J}) translate3d(${Z}px, 0, 0)`,
|
|
14360
14369
|
transition: "none"
|
|
14361
14370
|
});
|
|
14362
14371
|
}
|
|
14363
14372
|
function re(I, $) {
|
|
14364
|
-
const K = he(
|
|
14373
|
+
const K = he(y) ? window.innerHeight : window.innerWidth, J = $ ? (K - jt) / K : 1, Z = $ ? -jt : 0;
|
|
14365
14374
|
$ && be(ee.current, {
|
|
14366
14375
|
transition: `transform ${me.DURATION}s cubic-bezier(${me.EASE.join(",")})`,
|
|
14367
|
-
transform: he(
|
|
14376
|
+
transform: he(y) ? `scale(${J}) translate3d(0, ${Z}px, 0)` : `scale(${J}) translate3d(${Z}px, 0, 0)`
|
|
14368
14377
|
});
|
|
14369
14378
|
}
|
|
14370
14379
|
return E.useEffect(() => {
|
|
@@ -14400,14 +14409,14 @@ function k1({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
14400
14409
|
onNestedDrag: so,
|
|
14401
14410
|
onNestedOpenChange: Xn,
|
|
14402
14411
|
onNestedRelease: re,
|
|
14403
|
-
keyboardIsOpen:
|
|
14412
|
+
keyboardIsOpen: Me,
|
|
14404
14413
|
modal: b,
|
|
14405
14414
|
snapPointsOffset: rt,
|
|
14406
14415
|
activeSnapPointIndex: mt,
|
|
14407
|
-
direction:
|
|
14416
|
+
direction: y,
|
|
14408
14417
|
shouldScaleBackground: s,
|
|
14409
14418
|
setBackgroundColorOnScale: i,
|
|
14410
|
-
noBodyStyles:
|
|
14419
|
+
noBodyStyles: w,
|
|
14411
14420
|
container: P,
|
|
14412
14421
|
autoFocus: z
|
|
14413
14422
|
}
|
|
@@ -14432,7 +14441,7 @@ const Ld = /* @__PURE__ */ E.forwardRef(function({ ...e }, t) {
|
|
|
14432
14441
|
});
|
|
14433
14442
|
Ld.displayName = "Drawer.Overlay";
|
|
14434
14443
|
const Bd = /* @__PURE__ */ E.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
|
|
14435
|
-
const { drawerRef: a, onPress: s, onRelease: i, onDrag: c, keyboardIsOpen: d, snapPointsOffset: f, activeSnapPointIndex: u, modal: p, isOpen: h, direction: x, snapPoints: g, container: b, handleOnly: v, shouldAnimate:
|
|
14444
|
+
const { drawerRef: a, onPress: s, onRelease: i, onDrag: c, keyboardIsOpen: d, snapPointsOffset: f, activeSnapPointIndex: u, modal: p, isOpen: h, direction: x, snapPoints: g, container: b, handleOnly: v, shouldAnimate: k, autoFocus: w } = Bn(), [y, N] = E.useState(!1), j = Ad(o, a), S = E.useRef(null), M = E.useRef(null), R = E.useRef(!1), _ = g && g.length > 0;
|
|
14436
14445
|
y1();
|
|
14437
14446
|
const P = (T, G, Y = 0) => {
|
|
14438
14447
|
if (R.current) return !0;
|
|
@@ -14458,10 +14467,10 @@ const Bd = /* @__PURE__ */ E.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
14458
14467
|
return /* @__PURE__ */ E.createElement(Lr, {
|
|
14459
14468
|
"data-vaul-drawer-direction": x,
|
|
14460
14469
|
"data-vaul-drawer": "",
|
|
14461
|
-
"data-vaul-delayed-snap-points":
|
|
14470
|
+
"data-vaul-delayed-snap-points": y ? "true" : "false",
|
|
14462
14471
|
"data-vaul-snap-points": h && _ ? "true" : "false",
|
|
14463
14472
|
"data-vaul-custom-container": b ? "true" : "false",
|
|
14464
|
-
"data-vaul-animate":
|
|
14473
|
+
"data-vaul-animate": k?.current ? "true" : "false",
|
|
14465
14474
|
...r,
|
|
14466
14475
|
ref: j,
|
|
14467
14476
|
style: f && f.length > 0 ? {
|
|
@@ -14475,7 +14484,7 @@ const Bd = /* @__PURE__ */ E.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
14475
14484
|
}, s(T));
|
|
14476
14485
|
},
|
|
14477
14486
|
onOpenAutoFocus: (T) => {
|
|
14478
|
-
n?.(T),
|
|
14487
|
+
n?.(T), w || T.preventDefault();
|
|
14479
14488
|
},
|
|
14480
14489
|
onPointerDownOutside: (T) => {
|
|
14481
14490
|
if (e?.(T), !p || T.defaultPrevented) {
|
|
@@ -14514,7 +14523,7 @@ const C1 = 250, S1 = 120, N1 = /* @__PURE__ */ E.forwardRef(function({ preventCy
|
|
|
14514
14523
|
const { closeDrawer: o, isDragging: a, snapPoints: s, activeSnapPoint: i, setActiveSnapPoint: c, dismissible: d, handleOnly: f, isOpen: u, onPress: p, onDrag: h } = Bn(), x = E.useRef(null), g = E.useRef(!1);
|
|
14515
14524
|
function b() {
|
|
14516
14525
|
if (g.current) {
|
|
14517
|
-
|
|
14526
|
+
w();
|
|
14518
14527
|
return;
|
|
14519
14528
|
}
|
|
14520
14529
|
window.setTimeout(() => {
|
|
@@ -14523,10 +14532,10 @@ const C1 = 250, S1 = 120, N1 = /* @__PURE__ */ E.forwardRef(function({ preventCy
|
|
|
14523
14532
|
}
|
|
14524
14533
|
function v() {
|
|
14525
14534
|
if (a || e || g.current) {
|
|
14526
|
-
|
|
14535
|
+
w();
|
|
14527
14536
|
return;
|
|
14528
14537
|
}
|
|
14529
|
-
if (
|
|
14538
|
+
if (w(), !s || s.length === 0) {
|
|
14530
14539
|
d || o();
|
|
14531
14540
|
return;
|
|
14532
14541
|
}
|
|
@@ -14539,22 +14548,22 @@ const C1 = 250, S1 = 120, N1 = /* @__PURE__ */ E.forwardRef(function({ preventCy
|
|
|
14539
14548
|
const j = s[N + 1];
|
|
14540
14549
|
c(j);
|
|
14541
14550
|
}
|
|
14542
|
-
function
|
|
14551
|
+
function k() {
|
|
14543
14552
|
x.current = window.setTimeout(() => {
|
|
14544
14553
|
g.current = !0;
|
|
14545
14554
|
}, C1);
|
|
14546
14555
|
}
|
|
14547
|
-
function
|
|
14556
|
+
function w() {
|
|
14548
14557
|
x.current && window.clearTimeout(x.current), g.current = !1;
|
|
14549
14558
|
}
|
|
14550
14559
|
return /* @__PURE__ */ E.createElement("div", {
|
|
14551
14560
|
onClick: b,
|
|
14552
|
-
onPointerCancel:
|
|
14553
|
-
onPointerDown: (
|
|
14554
|
-
f && p(
|
|
14561
|
+
onPointerCancel: w,
|
|
14562
|
+
onPointerDown: (y) => {
|
|
14563
|
+
f && p(y), k();
|
|
14555
14564
|
},
|
|
14556
|
-
onPointerMove: (
|
|
14557
|
-
f && h(
|
|
14565
|
+
onPointerMove: (y) => {
|
|
14566
|
+
f && h(y);
|
|
14558
14567
|
},
|
|
14559
14568
|
// onPointerUp is already handled by the content component
|
|
14560
14569
|
ref: r,
|
|
@@ -14628,8 +14637,15 @@ function R1({ className: e, children: t, ...n }) {
|
|
|
14628
14637
|
)
|
|
14629
14638
|
] });
|
|
14630
14639
|
}
|
|
14631
|
-
const T1 = ({
|
|
14632
|
-
|
|
14640
|
+
const T1 = ({
|
|
14641
|
+
selectedLabel: e,
|
|
14642
|
+
open: t,
|
|
14643
|
+
setOpen: n,
|
|
14644
|
+
children: r,
|
|
14645
|
+
triggerId: o,
|
|
14646
|
+
className: a
|
|
14647
|
+
}) => /* @__PURE__ */ l.jsxs(M1, { onOpenChange: n, open: t, children: [
|
|
14648
|
+
/* @__PURE__ */ l.jsx(j1, { asChild: !0, children: /* @__PURE__ */ l.jsx(kt, { className: C("w-full justify-start", a), id: o, variant: "outline", children: e }) }),
|
|
14633
14649
|
/* @__PURE__ */ l.jsx(R1, { children: r })
|
|
14634
14650
|
] });
|
|
14635
14651
|
var Ks = 1, P1 = 0.9, A1 = 0.8, _1 = 0.17, To = 0.1, Po = 0.999, I1 = 0.9999, $1 = 0.99, F1 = /[\\\/_+.#"@\[\(\{&]/, W1 = /[\\\/_+.#"@\[\(\{&]/g, L1 = /[\s-]/, zd = /[\s-]/g;
|
|
@@ -14650,7 +14666,7 @@ var Cn = '[cmdk-group=""]', Ao = '[cmdk-group-items=""]', z1 = '[cmdk-group-head
|
|
|
14650
14666
|
let n = qt(() => {
|
|
14651
14667
|
var O, A;
|
|
14652
14668
|
return { search: "", value: (A = (O = e.value) != null ? O : e.defaultValue) != null ? A : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
14653
|
-
}), r = qt(() => /* @__PURE__ */ new Set()), o = qt(() => /* @__PURE__ */ new Map()), a = qt(() => /* @__PURE__ */ new Map()), s = qt(() => /* @__PURE__ */ new Set()), i = qd(e), { label: c, children: d, value: f, onValueChange: u, filter: p, shouldFilter: h, loop: x, disablePointerSelection: g = !1, vimBindings: b = !0, ...v } = e,
|
|
14669
|
+
}), r = qt(() => /* @__PURE__ */ new Set()), o = qt(() => /* @__PURE__ */ new Map()), a = qt(() => /* @__PURE__ */ new Map()), s = qt(() => /* @__PURE__ */ new Set()), i = qd(e), { label: c, children: d, value: f, onValueChange: u, filter: p, shouldFilter: h, loop: x, disablePointerSelection: g = !1, vimBindings: b = !0, ...v } = e, k = Ne(), w = Ne(), y = Ne(), N = m.useRef(null), j = ek();
|
|
14654
14670
|
It(() => {
|
|
14655
14671
|
if (f !== void 0) {
|
|
14656
14672
|
let O = f.trim();
|
|
@@ -14665,8 +14681,8 @@ var Cn = '[cmdk-group=""]', Ao = '[cmdk-group-items=""]', z1 = '[cmdk-group-head
|
|
|
14665
14681
|
if (n.current[O] = A, O === "search") z(), _(), j(1, P);
|
|
14666
14682
|
else if (O === "value") {
|
|
14667
14683
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
14668
|
-
let ie = document.getElementById(
|
|
14669
|
-
ie ? ie.focus() : (W = document.getElementById(
|
|
14684
|
+
let ie = document.getElementById(y);
|
|
14685
|
+
ie ? ie.focus() : (W = document.getElementById(k)) == null || W.focus();
|
|
14670
14686
|
}
|
|
14671
14687
|
if (j(7, () => {
|
|
14672
14688
|
var ie;
|
|
@@ -14696,7 +14712,7 @@ var Cn = '[cmdk-group=""]', Ao = '[cmdk-group-items=""]', z1 = '[cmdk-group-head
|
|
|
14696
14712
|
});
|
|
14697
14713
|
}), group: (O) => (o.current.has(O) || o.current.set(O, /* @__PURE__ */ new Set()), () => {
|
|
14698
14714
|
a.current.delete(O), o.current.delete(O);
|
|
14699
|
-
}), filter: () => i.current.shouldFilter, label: c || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId:
|
|
14715
|
+
}), filter: () => i.current.shouldFilter, label: c || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: k, inputId: y, labelId: w, listInnerRef: N }), []);
|
|
14700
14716
|
function R(O, A) {
|
|
14701
14717
|
var V, W;
|
|
14702
14718
|
let ne = (W = (V = i.current) == null ? void 0 : V.filter) != null ? W : H1;
|
|
@@ -14840,7 +14856,7 @@ var Cn = '[cmdk-group=""]', Ao = '[cmdk-group-items=""]', z1 = '[cmdk-group-head
|
|
|
14840
14856
|
u.setState("value", f.current, !0);
|
|
14841
14857
|
}
|
|
14842
14858
|
if (!h) return null;
|
|
14843
|
-
let { disabled: b, value: v, onSelect:
|
|
14859
|
+
let { disabled: b, value: v, onSelect: k, forceMount: w, keywords: y, ...N } = e;
|
|
14844
14860
|
return m.createElement(X.div, { ref: Tt(a, t), ...N, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!b, "aria-selected": !!p, "data-disabled": !!b, "data-selected": !!p, onPointerMove: b || i.getDisablePointerSelection() ? void 0 : g, onClick: b ? void 0 : x }, e.children);
|
|
14845
14861
|
}), G1 = m.forwardRef((e, t) => {
|
|
14846
14862
|
let { heading: n, children: r, forceMount: o, ...a } = e, s = Ne(), i = m.useRef(null), c = m.useRef(null), d = Ne(), f = Hn(), u = Ct((h) => o || f.filter() === !1 ? !0 : h.search ? h.filtered.groups.has(s) : !0);
|
|
@@ -15027,47 +15043,68 @@ const ck = ({ label: e, options: t, onSelect: n, selectedValue: r }) => /* @__PU
|
|
|
15027
15043
|
label: o,
|
|
15028
15044
|
name: a,
|
|
15029
15045
|
labelClassName: s,
|
|
15030
|
-
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
|
|
15046
|
+
triggerClassName: i,
|
|
15047
|
+
hint: c,
|
|
15048
|
+
note: d,
|
|
15049
|
+
error: f,
|
|
15050
|
+
renderSelected: u = (p) => p.label
|
|
15034
15051
|
}) => {
|
|
15035
|
-
const [
|
|
15052
|
+
const [p, h] = Xe(!1), x = Od(), b = e.some((y) => "options" in y) ? e : [
|
|
15036
15053
|
{
|
|
15037
15054
|
label: void 0,
|
|
15038
15055
|
options: e
|
|
15039
15056
|
}
|
|
15040
|
-
],
|
|
15057
|
+
], v = Rt(() => b.flatMap((y) => y.options), [b]), k = Rt(() => {
|
|
15041
15058
|
if (!t) return n;
|
|
15042
|
-
const y =
|
|
15043
|
-
return y ?
|
|
15044
|
-
}, [t, n,
|
|
15045
|
-
r(y === t ? "" : y),
|
|
15059
|
+
const y = v.find((j) => j.value === t);
|
|
15060
|
+
return y ? u(y) : n;
|
|
15061
|
+
}, [t, n, u, v]), w = (y) => {
|
|
15062
|
+
r(y === t ? "" : y), h(!1);
|
|
15046
15063
|
};
|
|
15047
15064
|
return /* @__PURE__ */ l.jsxs(le, { direction: "col", gap: "2", children: [
|
|
15048
|
-
(o ||
|
|
15065
|
+
(o || c) && /* @__PURE__ */ l.jsxs(le, { align: "center", direction: "row", gap: "1", children: [
|
|
15049
15066
|
o && /* @__PURE__ */ l.jsx(Je, { className: s, htmlFor: a, children: o }),
|
|
15050
|
-
|
|
15067
|
+
c && /* @__PURE__ */ l.jsx(cn, { content: c })
|
|
15051
15068
|
] }),
|
|
15052
|
-
|
|
15053
|
-
|
|
15069
|
+
x ? /* @__PURE__ */ l.jsx(
|
|
15070
|
+
T1,
|
|
15054
15071
|
{
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15072
|
+
className: i,
|
|
15073
|
+
open: p,
|
|
15074
|
+
selectedLabel: k,
|
|
15075
|
+
setOpen: h,
|
|
15076
|
+
triggerId: a,
|
|
15077
|
+
children: /* @__PURE__ */ l.jsx(
|
|
15078
|
+
Qs,
|
|
15079
|
+
{
|
|
15080
|
+
onSelect: w,
|
|
15081
|
+
optionGroups: b,
|
|
15082
|
+
placeholder: n,
|
|
15083
|
+
selectedValue: t
|
|
15084
|
+
}
|
|
15085
|
+
)
|
|
15059
15086
|
}
|
|
15060
|
-
)
|
|
15061
|
-
|
|
15087
|
+
) : /* @__PURE__ */ l.jsx(
|
|
15088
|
+
Q0,
|
|
15062
15089
|
{
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15090
|
+
className: i,
|
|
15091
|
+
open: p,
|
|
15092
|
+
selectedLabel: k,
|
|
15093
|
+
setOpen: h,
|
|
15094
|
+
triggerId: a,
|
|
15095
|
+
children: /* @__PURE__ */ l.jsx(
|
|
15096
|
+
Qs,
|
|
15097
|
+
{
|
|
15098
|
+
onSelect: w,
|
|
15099
|
+
optionGroups: b,
|
|
15100
|
+
placeholder: n,
|
|
15101
|
+
selectedValue: t
|
|
15102
|
+
}
|
|
15103
|
+
)
|
|
15067
15104
|
}
|
|
15068
|
-
)
|
|
15069
|
-
|
|
15070
|
-
|
|
15105
|
+
),
|
|
15106
|
+
d && /* @__PURE__ */ l.jsx(Ee, { size: "sm", variant: "muted", children: d }),
|
|
15107
|
+
f && /* @__PURE__ */ l.jsx(Nt, { message: f })
|
|
15071
15108
|
] });
|
|
15072
15109
|
};
|
|
15073
15110
|
function Zd(e, [t, n]) {
|
|
@@ -15078,7 +15115,7 @@ var Xd = ["PageUp", "PageDown"], Qd = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
15078
15115
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
15079
15116
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
15080
15117
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
15081
|
-
}, mn = "Slider", [Jo, dk, uk] = oa(mn), [eu, rS] =
|
|
15118
|
+
}, mn = "Slider", [Jo, dk, uk] = oa(mn), [eu, rS] = De(mn, [
|
|
15082
15119
|
uk
|
|
15083
15120
|
]), [fk, Kr] = eu(mn), tu = m.forwardRef(
|
|
15084
15121
|
(e, t) => {
|
|
@@ -15099,15 +15136,15 @@ var Xd = ["PageUp", "PageDown"], Qd = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
15099
15136
|
inverted: h = !1,
|
|
15100
15137
|
form: x,
|
|
15101
15138
|
...g
|
|
15102
|
-
} = e, b = m.useRef(/* @__PURE__ */ new Set()), v = m.useRef(0),
|
|
15139
|
+
} = e, b = m.useRef(/* @__PURE__ */ new Set()), v = m.useRef(0), w = s === "horizontal" ? mk : pk, [y = [], N] = _e({
|
|
15103
15140
|
prop: f,
|
|
15104
15141
|
defaultProp: d,
|
|
15105
15142
|
onChange: (P) => {
|
|
15106
15143
|
[...b.current][v.current]?.focus(), u(P);
|
|
15107
15144
|
}
|
|
15108
|
-
}), j = m.useRef(
|
|
15145
|
+
}), j = m.useRef(y);
|
|
15109
15146
|
function S(P) {
|
|
15110
|
-
const z = xk(
|
|
15147
|
+
const z = xk(y, P);
|
|
15111
15148
|
_(P, z);
|
|
15112
15149
|
}
|
|
15113
15150
|
function M(P) {
|
|
@@ -15115,7 +15152,7 @@ var Xd = ["PageUp", "PageDown"], Qd = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
15115
15152
|
}
|
|
15116
15153
|
function R() {
|
|
15117
15154
|
const P = j.current[v.current];
|
|
15118
|
-
|
|
15155
|
+
y[v.current] !== P && p(y);
|
|
15119
15156
|
}
|
|
15120
15157
|
function _(P, z, { commit: T } = { commit: !1 }) {
|
|
15121
15158
|
const G = Ck(a), Y = Sk(Math.round((P - r) / a) * a + r, G), F = Zd(Y, [r, o]);
|
|
@@ -15139,18 +15176,18 @@ var Xd = ["PageUp", "PageDown"], Qd = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
15139
15176
|
max: o,
|
|
15140
15177
|
valueIndexToChangeRef: v,
|
|
15141
15178
|
thumbs: b.current,
|
|
15142
|
-
values:
|
|
15179
|
+
values: y,
|
|
15143
15180
|
orientation: s,
|
|
15144
15181
|
form: x,
|
|
15145
15182
|
children: /* @__PURE__ */ l.jsx(Jo.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ l.jsx(Jo.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ l.jsx(
|
|
15146
|
-
|
|
15183
|
+
w,
|
|
15147
15184
|
{
|
|
15148
15185
|
"aria-disabled": i,
|
|
15149
15186
|
"data-disabled": i ? "" : void 0,
|
|
15150
15187
|
...g,
|
|
15151
15188
|
ref: t,
|
|
15152
15189
|
onPointerDown: te(g.onPointerDown, () => {
|
|
15153
|
-
i || (j.current =
|
|
15190
|
+
i || (j.current = y);
|
|
15154
15191
|
}),
|
|
15155
15192
|
min: r,
|
|
15156
15193
|
max: o,
|
|
@@ -15159,10 +15196,10 @@ var Xd = ["PageUp", "PageDown"], Qd = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
15159
15196
|
onSlideMove: i ? void 0 : M,
|
|
15160
15197
|
onSlideEnd: i ? void 0 : R,
|
|
15161
15198
|
onHomeKeyDown: () => !i && _(r, 0, { commit: !0 }),
|
|
15162
|
-
onEndKeyDown: () => !i && _(o,
|
|
15199
|
+
onEndKeyDown: () => !i && _(o, y.length - 1, { commit: !0 }),
|
|
15163
15200
|
onStepKeyDown: ({ event: P, direction: z }) => {
|
|
15164
15201
|
if (!i) {
|
|
15165
|
-
const Y = Xd.includes(P.key) || P.shiftKey && Qd.includes(P.key) ? 10 : 1, F = v.current, H =
|
|
15202
|
+
const Y = Xd.includes(P.key) || P.shiftKey && Qd.includes(P.key) ? 10 : 1, F = v.current, H = y[F], D = a * Y * z;
|
|
15166
15203
|
_(H + D, F, { commit: !0 });
|
|
15167
15204
|
}
|
|
15168
15205
|
}
|
|
@@ -15190,10 +15227,10 @@ var [nu, ru] = eu(mn, {
|
|
|
15190
15227
|
onSlideEnd: c,
|
|
15191
15228
|
onStepKeyDown: d,
|
|
15192
15229
|
...f
|
|
15193
|
-
} = e, [u, p] = m.useState(null), h = ce(t, (
|
|
15194
|
-
function w
|
|
15195
|
-
const
|
|
15196
|
-
return x.current =
|
|
15230
|
+
} = e, [u, p] = m.useState(null), h = ce(t, (w) => p(w)), x = m.useRef(void 0), g = Tn(o), b = g === "ltr", v = b && !a || !b && a;
|
|
15231
|
+
function k(w) {
|
|
15232
|
+
const y = x.current || u.getBoundingClientRect(), N = [0, y.width], S = Ua(N, v ? [n, r] : [r, n]);
|
|
15233
|
+
return x.current = y, S(w - y.left);
|
|
15197
15234
|
}
|
|
15198
15235
|
return /* @__PURE__ */ l.jsx(
|
|
15199
15236
|
nu,
|
|
@@ -15214,20 +15251,20 @@ var [nu, ru] = eu(mn, {
|
|
|
15214
15251
|
...f.style,
|
|
15215
15252
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
15216
15253
|
},
|
|
15217
|
-
onSlideStart: (
|
|
15218
|
-
const
|
|
15219
|
-
s?.(
|
|
15254
|
+
onSlideStart: (w) => {
|
|
15255
|
+
const y = k(w.clientX);
|
|
15256
|
+
s?.(y);
|
|
15220
15257
|
},
|
|
15221
|
-
onSlideMove: (
|
|
15222
|
-
const
|
|
15223
|
-
i?.(
|
|
15258
|
+
onSlideMove: (w) => {
|
|
15259
|
+
const y = k(w.clientX);
|
|
15260
|
+
i?.(y);
|
|
15224
15261
|
},
|
|
15225
15262
|
onSlideEnd: () => {
|
|
15226
15263
|
x.current = void 0, c?.();
|
|
15227
15264
|
},
|
|
15228
|
-
onStepKeyDown: (
|
|
15229
|
-
const N = Jd[v ? "from-left" : "from-right"].includes(
|
|
15230
|
-
d?.({ event:
|
|
15265
|
+
onStepKeyDown: (w) => {
|
|
15266
|
+
const N = Jd[v ? "from-left" : "from-right"].includes(w.key);
|
|
15267
|
+
d?.({ event: w, direction: N ? -1 : 1 });
|
|
15231
15268
|
}
|
|
15232
15269
|
}
|
|
15233
15270
|
)
|
|
@@ -15247,8 +15284,8 @@ var [nu, ru] = eu(mn, {
|
|
|
15247
15284
|
...d
|
|
15248
15285
|
} = e, f = m.useRef(null), u = ce(t, f), p = m.useRef(void 0), h = !o;
|
|
15249
15286
|
function x(g) {
|
|
15250
|
-
const b = p.current || f.current.getBoundingClientRect(), v = [0, b.height],
|
|
15251
|
-
return p.current = b,
|
|
15287
|
+
const b = p.current || f.current.getBoundingClientRect(), v = [0, b.height], w = Ua(v, h ? [r, n] : [n, r]);
|
|
15288
|
+
return p.current = b, w(g - b.top);
|
|
15252
15289
|
}
|
|
15253
15290
|
return /* @__PURE__ */ l.jsx(
|
|
15254
15291
|
nu,
|
|
@@ -15369,7 +15406,7 @@ var ta = "SliderThumb", lu = m.forwardRef(
|
|
|
15369
15406
|
}
|
|
15370
15407
|
), hk = m.forwardRef(
|
|
15371
15408
|
(e, t) => {
|
|
15372
|
-
const { __scopeSlider: n, index: r, name: o, ...a } = e, s = Kr(ta, n), i = ru(ta, n), [c, d] = m.useState(null), f = ce(t, (
|
|
15409
|
+
const { __scopeSlider: n, index: r, name: o, ...a } = e, s = Kr(ta, n), i = ru(ta, n), [c, d] = m.useState(null), f = ce(t, (k) => d(k)), u = c ? s.form || !!c.closest("form") : !0, p = _n(c), h = s.values[r], x = h === void 0 ? 0 : du(h, s.min, s.max), g = bk(r, s.values.length), b = p?.[i.size], v = b ? yk(b, x, i.direction) : 0;
|
|
15373
15410
|
return m.useEffect(() => {
|
|
15374
15411
|
if (c)
|
|
15375
15412
|
return s.thumbs.add(c), () => {
|
|
@@ -15579,7 +15616,7 @@ const oS = ({ size: e = "md", thumbClassName: t, trackClassName: n, value: r, de
|
|
|
15579
15616
|
}
|
|
15580
15617
|
);
|
|
15581
15618
|
};
|
|
15582
|
-
var Zr = "Switch", [Ok, aS] =
|
|
15619
|
+
var Zr = "Switch", [Ok, aS] = De(Zr), [Rk, Tk] = Ok(Zr), uu = m.forwardRef(
|
|
15583
15620
|
(e, t) => {
|
|
15584
15621
|
const {
|
|
15585
15622
|
__scopeSwitch: n,
|
|
@@ -15592,7 +15629,7 @@ var Zr = "Switch", [Ok, aS] = je(Zr), [Rk, Tk] = Ok(Zr), uu = m.forwardRef(
|
|
|
15592
15629
|
onCheckedChange: d,
|
|
15593
15630
|
form: f,
|
|
15594
15631
|
...u
|
|
15595
|
-
} = e, [p, h] = m.useState(null), x = ce(t, (
|
|
15632
|
+
} = e, [p, h] = m.useState(null), x = ce(t, (w) => h(w)), g = m.useRef(!1), b = p ? f || !!p.closest("form") : !0, [v, k] = _e({
|
|
15596
15633
|
prop: o,
|
|
15597
15634
|
defaultProp: a ?? !1,
|
|
15598
15635
|
onChange: d,
|
|
@@ -15612,8 +15649,8 @@ var Zr = "Switch", [Ok, aS] = je(Zr), [Rk, Tk] = Ok(Zr), uu = m.forwardRef(
|
|
|
15612
15649
|
value: c,
|
|
15613
15650
|
...u,
|
|
15614
15651
|
ref: x,
|
|
15615
|
-
onClick: te(e.onClick, (
|
|
15616
|
-
|
|
15652
|
+
onClick: te(e.onClick, (w) => {
|
|
15653
|
+
k((y) => !y), b && (g.current = w.isPropagationStopped(), g.current || w.stopPropagation());
|
|
15617
15654
|
})
|
|
15618
15655
|
}
|
|
15619
15656
|
),
|
|
@@ -15792,7 +15829,7 @@ function $k({
|
|
|
15792
15829
|
...c
|
|
15793
15830
|
}
|
|
15794
15831
|
),
|
|
15795
|
-
n && /* @__PURE__ */ l.jsx(
|
|
15832
|
+
n && /* @__PURE__ */ l.jsx(Ee, { size: "sm", variant: "muted", children: n }),
|
|
15796
15833
|
a && /* @__PURE__ */ l.jsx(Nt, { message: a })
|
|
15797
15834
|
] });
|
|
15798
15835
|
}
|
|
@@ -15825,7 +15862,7 @@ const Js = [
|
|
|
15825
15862
|
}, i = Js.find((d) => d.theme === e)?.icon, c = Js.find((d) => d.theme === e)?.label;
|
|
15826
15863
|
return /* @__PURE__ */ l.jsx("span", { className: C(r), ...a, children: /* @__PURE__ */ l.jsxs(ft, { className: C("p-1 w-full", o), onClick: s, variant: "unstyled", children: [
|
|
15827
15864
|
i,
|
|
15828
|
-
/* @__PURE__ */ l.jsx(
|
|
15865
|
+
/* @__PURE__ */ l.jsx(Ee, { className: n, size: "base", truncate: !0, children: c })
|
|
15829
15866
|
] }) });
|
|
15830
15867
|
}, Wk = ({
|
|
15831
15868
|
variant: e = "horizontal",
|
|
@@ -15848,8 +15885,8 @@ const Js = [
|
|
|
15848
15885
|
...s
|
|
15849
15886
|
}
|
|
15850
15887
|
) : /* @__PURE__ */ l.jsxs(le, { className: o, gap: "4", children: [
|
|
15851
|
-
/* @__PURE__ */ l.jsxs(
|
|
15852
|
-
/* @__PURE__ */ l.jsx(
|
|
15888
|
+
/* @__PURE__ */ l.jsxs(je, { children: [
|
|
15889
|
+
/* @__PURE__ */ l.jsx(je.Trigger, { children: /* @__PURE__ */ l.jsx(
|
|
15853
15890
|
om,
|
|
15854
15891
|
{
|
|
15855
15892
|
className: C(i("system"), a),
|
|
@@ -15857,15 +15894,15 @@ const Js = [
|
|
|
15857
15894
|
size: 32
|
|
15858
15895
|
}
|
|
15859
15896
|
) }),
|
|
15860
|
-
/* @__PURE__ */ l.jsx(
|
|
15897
|
+
/* @__PURE__ */ l.jsx(je.Content, { children: "Use system theme" })
|
|
15861
15898
|
] }),
|
|
15862
|
-
/* @__PURE__ */ l.jsxs(
|
|
15863
|
-
/* @__PURE__ */ l.jsx(
|
|
15864
|
-
/* @__PURE__ */ l.jsx(
|
|
15899
|
+
/* @__PURE__ */ l.jsxs(je, { children: [
|
|
15900
|
+
/* @__PURE__ */ l.jsx(je.Trigger, { children: /* @__PURE__ */ l.jsx(Si, { className: C(i("light"), a), onClick: () => n("light"), size: 32 }) }),
|
|
15901
|
+
/* @__PURE__ */ l.jsx(je.Content, { children: "Use light theme" })
|
|
15865
15902
|
] }),
|
|
15866
|
-
/* @__PURE__ */ l.jsxs(
|
|
15867
|
-
/* @__PURE__ */ l.jsx(
|
|
15868
|
-
/* @__PURE__ */ l.jsx(
|
|
15903
|
+
/* @__PURE__ */ l.jsxs(je, { children: [
|
|
15904
|
+
/* @__PURE__ */ l.jsx(je.Trigger, { children: /* @__PURE__ */ l.jsx(Ci, { className: C(i("dark"), a), onClick: () => n("dark"), size: 32 }) }),
|
|
15905
|
+
/* @__PURE__ */ l.jsx(je.Content, { children: "Use dark theme" })
|
|
15869
15906
|
] })
|
|
15870
15907
|
] });
|
|
15871
15908
|
}, gu = m.createContext(void 0), Lk = () => {
|
|
@@ -15976,90 +16013,98 @@ Lt.Content = zk;
|
|
|
15976
16013
|
const qa = ({
|
|
15977
16014
|
variant: e,
|
|
15978
16015
|
iconComponent: t,
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
|
|
15984
|
-
|
|
16016
|
+
headline: n,
|
|
16017
|
+
headlineLevel: r = "2",
|
|
16018
|
+
headlineWeight: o = "bold",
|
|
16019
|
+
message: a,
|
|
16020
|
+
messageClassName: s,
|
|
16021
|
+
children: i,
|
|
16022
|
+
iconSize: c = "10xl",
|
|
16023
|
+
iconClassName: d,
|
|
16024
|
+
fullScreen: f = !1,
|
|
16025
|
+
containerClassName: u
|
|
15985
16026
|
}) => {
|
|
15986
|
-
if (!t && !
|
|
16027
|
+
if (!t && !a && !i)
|
|
15987
16028
|
return /* @__PURE__ */ l.jsx(le, { align: "center", className: "h-full w-full", justify: "center", children: "Content missing" });
|
|
15988
|
-
const
|
|
16029
|
+
const p = t || null;
|
|
15989
16030
|
return /* @__PURE__ */ l.jsx(
|
|
15990
16031
|
le,
|
|
15991
16032
|
{
|
|
15992
16033
|
align: "center",
|
|
15993
|
-
className: C("w-full", !
|
|
16034
|
+
className: C("w-full", !f && "h-full", f && "h-screen", u),
|
|
15994
16035
|
justify: "center",
|
|
15995
16036
|
children: /* @__PURE__ */ l.jsxs(le, { direction: "col", justify: "center", children: [
|
|
15996
|
-
|
|
15997
|
-
|
|
16037
|
+
p && /* @__PURE__ */ l.jsx(le, { align: "center", className: "my-6", gapX: "4", justify: "center", children: /* @__PURE__ */ l.jsx(
|
|
16038
|
+
p,
|
|
15998
16039
|
{
|
|
15999
|
-
"aria-hidden": !!
|
|
16000
|
-
"aria-label":
|
|
16040
|
+
"aria-hidden": !!a,
|
|
16041
|
+
"aria-label": a ? void 0 : `${e || "info"} icon`,
|
|
16001
16042
|
className: C(
|
|
16002
16043
|
e === "error" && "text-destructive",
|
|
16003
16044
|
e === "success" && "text-success",
|
|
16004
16045
|
e === "warning" && "text-warning",
|
|
16005
16046
|
e === "info" && "text-info",
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16047
|
+
c === "xs" && "size-2",
|
|
16048
|
+
c === "sm" && "size-3",
|
|
16049
|
+
c === "md" && "size-4",
|
|
16050
|
+
c === "lg" && "size-5",
|
|
16051
|
+
c === "xl" && "size-6",
|
|
16052
|
+
c === "2xl" && "size-7",
|
|
16053
|
+
c === "3xl" && "size-8",
|
|
16054
|
+
c === "4xl" && "size-10",
|
|
16055
|
+
c === "5xl" && "size-12",
|
|
16056
|
+
c === "6xl" && "size-14",
|
|
16057
|
+
c === "7xl" && "size-16",
|
|
16058
|
+
c === "8xl" && "size-20",
|
|
16059
|
+
c === "9xl" && "size-28",
|
|
16060
|
+
c === "10xl" && "size-32",
|
|
16061
|
+
d
|
|
16021
16062
|
),
|
|
16022
16063
|
"data-testid": "icon",
|
|
16023
|
-
role:
|
|
16064
|
+
role: a ? void 0 : "img"
|
|
16024
16065
|
}
|
|
16025
16066
|
) }),
|
|
16026
|
-
/* @__PURE__ */ l.jsxs(le, { className: "max-w-[500px]", direction: "col", justify: "center", children: [
|
|
16027
|
-
n ? /* @__PURE__ */ l.jsx(Nr, { align: "center", level:
|
|
16028
|
-
|
|
16067
|
+
/* @__PURE__ */ l.jsxs(le, { className: "max-w-[500px]", direction: "col", gap: "4", justify: "center", children: [
|
|
16068
|
+
n ? /* @__PURE__ */ l.jsx(Nr, { align: "center", level: r, weight: o, children: n }) : null,
|
|
16069
|
+
a ? /* @__PURE__ */ l.jsx(Ee, { align: "center", className: s, children: a }) : null,
|
|
16070
|
+
i
|
|
16029
16071
|
] })
|
|
16030
16072
|
] })
|
|
16031
16073
|
}
|
|
16032
16074
|
);
|
|
16033
|
-
}, Kk = ({
|
|
16075
|
+
}, Kk = ({ headline: e = "Something went wrong", message: t, children: n, ...r }) => /* @__PURE__ */ l.jsx(qa, { headline: e, iconComponent: Af, message: t, variant: "error", ...r, children: n }), Zk = () => {
|
|
16034
16076
|
try {
|
|
16035
16077
|
window.location.reload();
|
|
16036
16078
|
} catch {
|
|
16037
16079
|
console.warn("Page reload prevented in test environment");
|
|
16038
16080
|
}
|
|
16039
|
-
}, iS = ({ error: e, onRetry: t = Zk, ...n }) => /* @__PURE__ */ l.jsx(Kk, { ...n, children: /* @__PURE__ */ l.jsxs(le, { align: "center",
|
|
16040
|
-
/* @__PURE__ */ l.jsx(Fa, { className: "
|
|
16081
|
+
}, iS = ({ error: e, onRetry: t = Zk, ...n }) => /* @__PURE__ */ l.jsx(Kk, { ...n, children: /* @__PURE__ */ l.jsxs(le, { align: "center", direction: "col", gap: "8", children: [
|
|
16082
|
+
/* @__PURE__ */ l.jsx(Fa, { className: "p-4", variant: "muted", width: "full", children: /* @__PURE__ */ l.jsx(Ep, { align: "center", size: "xs", variant: "inherit", children: e.message || "Unknown error occurred" }) }),
|
|
16041
16083
|
/* @__PURE__ */ l.jsx(ft, { icon: /* @__PURE__ */ l.jsx(mm, {}), onClick: t, variant: "primary", children: "Reload" })
|
|
16042
16084
|
] }) }), Xk = (e) => /* @__PURE__ */ l.jsx(Ml, { className: "text-info", "data-testid": "icon", ...e }), lS = ({ iconComponent: e, message: t, iconSize: n = "5xl", iconClassName: r, ...o }) => {
|
|
16043
16085
|
const a = e || Xk;
|
|
16044
16086
|
return /* @__PURE__ */ l.jsx(
|
|
16045
16087
|
qa,
|
|
16046
16088
|
{
|
|
16089
|
+
headline: t,
|
|
16090
|
+
headlineLevel: "4",
|
|
16091
|
+
headlineWeight: "normal",
|
|
16047
16092
|
iconClassName: C("text-info", r),
|
|
16048
16093
|
iconComponent: a,
|
|
16049
16094
|
iconSize: n,
|
|
16050
|
-
message: t,
|
|
16051
16095
|
...o
|
|
16052
16096
|
}
|
|
16053
16097
|
);
|
|
16054
16098
|
}, cS = ({
|
|
16055
16099
|
onBack: e,
|
|
16056
|
-
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
|
|
16100
|
+
headline: t = "Page not found",
|
|
16101
|
+
message: n = "The page you are looking for does not exist.",
|
|
16102
|
+
backIcon: r = Of,
|
|
16103
|
+
backLabel: o = "Back",
|
|
16104
|
+
...a
|
|
16060
16105
|
}) => {
|
|
16061
|
-
const
|
|
16062
|
-
return /* @__PURE__ */ l.jsx(qa, { iconComponent: Zf, message:
|
|
16106
|
+
const s = r;
|
|
16107
|
+
return /* @__PURE__ */ l.jsx(qa, { headline: t, iconComponent: Zf, message: n, variant: "warning", ...a, children: /* @__PURE__ */ l.jsx(le, { align: "center", className: "mt-8", direction: "col", children: e && /* @__PURE__ */ l.jsx(ft, { icon: /* @__PURE__ */ l.jsx(s, {}), onClick: e, variant: "primary", children: o }) }) });
|
|
16063
16108
|
};
|
|
16064
16109
|
function Qk({ ...e }) {
|
|
16065
16110
|
return /* @__PURE__ */ l.jsx($r, { "data-slot": "sheet", ...e });
|
|
@@ -16153,14 +16198,14 @@ function uC({
|
|
|
16153
16198
|
}) {
|
|
16154
16199
|
const i = Od(), [c, d] = m.useState(!1), [f, u] = m.useState(e), p = t ?? f, h = m.useCallback(
|
|
16155
16200
|
(v) => {
|
|
16156
|
-
const
|
|
16157
|
-
n ? n(
|
|
16201
|
+
const k = typeof v == "function" ? v(p) : v;
|
|
16202
|
+
n ? n(k) : u(k), document.cookie = `${aC}=${k}; path=/; max-age=${sC}`;
|
|
16158
16203
|
},
|
|
16159
16204
|
[n, p]
|
|
16160
16205
|
), x = m.useCallback(() => i ? d((v) => !v) : h((v) => !v), [i, h]);
|
|
16161
16206
|
m.useEffect(() => {
|
|
16162
|
-
const v = (
|
|
16163
|
-
|
|
16207
|
+
const v = (k) => {
|
|
16208
|
+
k.key === dC && (k.metaKey || k.ctrlKey) && (k.preventDefault(), x());
|
|
16164
16209
|
};
|
|
16165
16210
|
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
16166
16211
|
}, [x]);
|
|
@@ -16474,7 +16519,7 @@ function mr({
|
|
|
16474
16519
|
/* @__PURE__ */ l.jsx(Sl, { align: "center", hidden: d !== "collapsed" || c, side: "right", ...o })
|
|
16475
16520
|
] })) : f;
|
|
16476
16521
|
}
|
|
16477
|
-
const xu = ({ children: e }) => /* @__PURE__ */ l.jsx(
|
|
16522
|
+
const xu = ({ children: e }) => /* @__PURE__ */ l.jsx(Ee, { size: "base", truncate: !0, children: e }), kC = ({ itemSet: e, activeSlug: t }) => /* @__PURE__ */ l.jsx(l.Fragment, { children: e.links.map((n) => /* @__PURE__ */ l.jsx(fr, { className: "hover:cursor-pointer", onClick: n.onClick, children: /* @__PURE__ */ l.jsx(mr, { asChild: !0, isActive: t === n.slug, children: /* @__PURE__ */ l.jsxs("span", { children: [
|
|
16478
16523
|
/* @__PURE__ */ l.jsx(n.icon, {}),
|
|
16479
16524
|
/* @__PURE__ */ l.jsx(xu, { children: n.title }),
|
|
16480
16525
|
n.external && /* @__PURE__ */ l.jsx(le, { children: /* @__PURE__ */ l.jsx(ym, { size: 12, strokeWidth: 1.5 }) })
|
|
@@ -16583,12 +16628,12 @@ export {
|
|
|
16583
16628
|
VC as TabsContent,
|
|
16584
16629
|
zC as TabsList,
|
|
16585
16630
|
HC as TabsTrigger,
|
|
16586
|
-
|
|
16631
|
+
Ee as Text,
|
|
16587
16632
|
Ha as TextInput,
|
|
16588
16633
|
tx as TextList,
|
|
16589
16634
|
$k as Textarea,
|
|
16590
16635
|
Wk as ThemeSelector,
|
|
16591
16636
|
Lt as Timeline,
|
|
16592
|
-
|
|
16637
|
+
je as Tooltip,
|
|
16593
16638
|
C as cn
|
|
16594
16639
|
};
|