@altimateai/ui-components 0.0.65 → 0.0.66
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/shadcn/index.d.ts +8 -0
- package/dist/shadcn/index.js +1124 -1072
- package/package.json +1 -1
package/dist/shadcn/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { af as kg, ai as _g, ag as Og, ah as Ig, A as Ag, am as jg, an as Wg, aw
|
|
|
3
3
|
import { f as P, U as An, B as Ue, Z as ll, _ as cl, X as $t, $ as ul, a0 as dl, c as Qe, P as ne, y as Se, Q as tn, n as Qn, u as he, ab as fl, V as rr, a as It, q as dt, b as F, ac as ml, K as hl, G as pl, g as ft, ad as gl, I as bl, ae as vl, af as wl, ag as yl, a2 as mt, a3 as jn, H as Jn, e as xl, d as Sl, p as or, v as Ml, x as Cl, L as Mn, o as sr, A as Nl, t as Pl, w as Dl, z as Tl, J as El, a4 as Rl, a5 as kl } from "../Stack.js";
|
|
4
4
|
import { ak as Mv, aj as Cv, a7 as Nv, a6 as Pv, a8 as Dv, M as Tv, am as Ev, N as Rv, ar as kv, ap as _v, ao as Ov, aa as Iv, a9 as Av, aq as jv, an as Wv, a1 as Lv, al as zv, ah as Fv, ai as $v, T as Bv, Y as Hv } from "../Stack.js";
|
|
5
5
|
import { j as u, o as ir, C as nn, b as _l, p as Ol, d as lr, q as Il, M as cr, a as Al, S as jl, r as Wl, s as Ll, F as zl } from "../index2.js";
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
6
|
+
import * as d from "react";
|
|
7
|
+
import E, { createContext as Fl, useContext as $l, useCallback as ie, useRef as ot, useLayoutEffect as Bl, useState as Ee, useEffect as Vt, useMemo as Dt, forwardRef as an } from "react";
|
|
8
8
|
import { S as Vv } from "../Switch.js";
|
|
9
9
|
import * as Hl from "react-dom";
|
|
10
10
|
const Cn = {}, Mt = {};
|
|
@@ -80,9 +80,9 @@ function ur(e) {
|
|
|
80
80
|
o && i && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + o);
|
|
81
81
|
const s = a - t;
|
|
82
82
|
s && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + s);
|
|
83
|
-
const l = Tt(e.timeZone, e),
|
|
84
|
-
if (
|
|
85
|
-
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) +
|
|
83
|
+
const l = Tt(e.timeZone, e), h = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - l, f = l !== t, m = h - s;
|
|
84
|
+
if (f && m) {
|
|
85
|
+
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + m);
|
|
86
86
|
const g = Tt(e.timeZone, e), b = l - g;
|
|
87
87
|
b && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + b), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + b));
|
|
88
88
|
}
|
|
@@ -149,10 +149,10 @@ function Gl(e, t) {
|
|
|
149
149
|
timeZoneName: "long"
|
|
150
150
|
}).format(t).slice(12);
|
|
151
151
|
}
|
|
152
|
-
var
|
|
152
|
+
var O;
|
|
153
153
|
(function(e) {
|
|
154
154
|
e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
|
|
155
|
-
})(
|
|
155
|
+
})(O || (O = {}));
|
|
156
156
|
var re;
|
|
157
157
|
(function(e) {
|
|
158
158
|
e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
|
|
@@ -195,8 +195,8 @@ function At() {
|
|
|
195
195
|
return Ul;
|
|
196
196
|
}
|
|
197
197
|
function lt(e, t) {
|
|
198
|
-
var s, l, c,
|
|
199
|
-
const n = At(), a = (t == null ? void 0 : t.weekStartsOn) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? n.weekStartsOn ?? ((
|
|
198
|
+
var s, l, c, h;
|
|
199
|
+
const n = At(), a = (t == null ? void 0 : t.weekStartsOn) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? n.weekStartsOn ?? ((h = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : h.weekStartsOn) ?? 0, r = Q(e, t == null ? void 0 : t.in), o = r.getDay(), i = (o < a ? 7 : 0) + o - a;
|
|
200
200
|
return r.setDate(r.getDate() - i), r.setHours(0, 0, 0, 0), r;
|
|
201
201
|
}
|
|
202
202
|
function Rt(e, t) {
|
|
@@ -323,8 +323,8 @@ function pr(e, t) {
|
|
|
323
323
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
324
324
|
}
|
|
325
325
|
function gr(e, t) {
|
|
326
|
-
var s, l, c,
|
|
327
|
-
const n = At(), a = (t == null ? void 0 : t.weekStartsOn) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? n.weekStartsOn ?? ((
|
|
326
|
+
var s, l, c, h;
|
|
327
|
+
const n = At(), a = (t == null ? void 0 : t.weekStartsOn) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? n.weekStartsOn ?? ((h = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : h.weekStartsOn) ?? 0, r = Q(e, t == null ? void 0 : t.in), o = r.getDay(), i = (o < a ? -7 : 0) + 6 - (o - a);
|
|
328
328
|
return r.setDate(r.getDate() + i), r.setHours(23, 59, 59, 999), r;
|
|
329
329
|
}
|
|
330
330
|
function ic(e, t) {
|
|
@@ -610,17 +610,17 @@ function xt(e) {
|
|
|
610
610
|
const a = n.width, r = a && e.matchPatterns[a] || e.matchPatterns[e.defaultMatchWidth], o = t.match(r);
|
|
611
611
|
if (!o)
|
|
612
612
|
return null;
|
|
613
|
-
const i = o[0], s = a && e.parsePatterns[a] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(s) ? Nc(s, (
|
|
613
|
+
const i = o[0], s = a && e.parsePatterns[a] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(s) ? Nc(s, (f) => f.test(i)) : (
|
|
614
614
|
// [TODO] -- I challenge you to fix the type
|
|
615
|
-
Cc(s, (
|
|
615
|
+
Cc(s, (f) => f.test(i))
|
|
616
616
|
);
|
|
617
617
|
let c;
|
|
618
618
|
c = e.valueCallback ? e.valueCallback(l) : l, c = n.valueCallback ? (
|
|
619
619
|
// [TODO] -- I challenge you to fix the type
|
|
620
620
|
n.valueCallback(c)
|
|
621
621
|
) : c;
|
|
622
|
-
const
|
|
623
|
-
return { value: c, rest:
|
|
622
|
+
const h = t.slice(i.length);
|
|
623
|
+
return { value: c, rest: h };
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
function Cc(e, t) {
|
|
@@ -770,8 +770,8 @@ function br(e, t) {
|
|
|
770
770
|
return Math.round(a / dr) + 1;
|
|
771
771
|
}
|
|
772
772
|
function vr(e, t) {
|
|
773
|
-
var
|
|
774
|
-
const n = Q(e, t == null ? void 0 : t.in), a = n.getFullYear(), r = At(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
773
|
+
var h, f, m, g;
|
|
774
|
+
const n = Q(e, t == null ? void 0 : t.in), a = n.getFullYear(), r = At(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (h = t == null ? void 0 : t.locale) == null ? void 0 : h.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = le((t == null ? void 0 : t.in) || e, 0);
|
|
775
775
|
i.setFullYear(a + 1, 0, o), i.setHours(0, 0, 0, 0);
|
|
776
776
|
const s = lt(i, t), l = le((t == null ? void 0 : t.in) || e, 0);
|
|
777
777
|
l.setFullYear(a, 0, o), l.setHours(0, 0, 0, 0);
|
|
@@ -779,8 +779,8 @@ function vr(e, t) {
|
|
|
779
779
|
return +n >= +s ? a + 1 : +n >= +c ? a : a - 1;
|
|
780
780
|
}
|
|
781
781
|
function $c(e, t) {
|
|
782
|
-
var s, l, c,
|
|
783
|
-
const n = At(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((
|
|
782
|
+
var s, l, c, h;
|
|
783
|
+
const n = At(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((h = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, r = vr(e, t), o = le((t == null ? void 0 : t.in) || e, 0);
|
|
784
784
|
return o.setFullYear(r, 0, a), o.setHours(0, 0, 0, 0), lt(o, t);
|
|
785
785
|
}
|
|
786
786
|
function wr(e, t) {
|
|
@@ -1417,15 +1417,15 @@ function Xc(e, t, n) {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
const Zc = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Qc = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Jc = /^'([^]*?)'?$/, eu = /''/g, tu = /[a-zA-Z]/;
|
|
1419
1419
|
function Ct(e, t, n) {
|
|
1420
|
-
var
|
|
1421
|
-
const a = At(), r = (n == null ? void 0 : n.locale) ?? a.locale ?? ea, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((
|
|
1420
|
+
var h, f, m, g, b, w, p, v;
|
|
1421
|
+
const a = At(), r = (n == null ? void 0 : n.locale) ?? a.locale ?? ea, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (h = n == null ? void 0 : n.locale) == null ? void 0 : h.options) == null ? void 0 : f.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((g = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((w = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : w.weekStartsOn) ?? a.weekStartsOn ?? ((v = (p = a.locale) == null ? void 0 : p.options) == null ? void 0 : v.weekStartsOn) ?? 0, s = Q(e, n == null ? void 0 : n.in);
|
|
1422
1422
|
if (!ec(s))
|
|
1423
1423
|
throw new RangeError("Invalid time value");
|
|
1424
1424
|
let l = t.match(Qc).map((S) => {
|
|
1425
1425
|
const y = S[0];
|
|
1426
1426
|
if (y === "p" || y === "P") {
|
|
1427
|
-
const
|
|
1428
|
-
return
|
|
1427
|
+
const M = Hc[y];
|
|
1428
|
+
return M(S, r.formatLong);
|
|
1429
1429
|
}
|
|
1430
1430
|
return S;
|
|
1431
1431
|
}).join("").match(Zc).map((S) => {
|
|
@@ -1452,8 +1452,8 @@ function Ct(e, t, n) {
|
|
|
1452
1452
|
if (!S.isToken) return S.value;
|
|
1453
1453
|
const y = S.value;
|
|
1454
1454
|
(!(n != null && n.useAdditionalWeekYearTokens) && Uc(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Kc(y)) && qc(y, t, String(e));
|
|
1455
|
-
const
|
|
1456
|
-
return
|
|
1455
|
+
const M = _a[y[0]];
|
|
1456
|
+
return M(s, y, r.localize, c);
|
|
1457
1457
|
}).join("");
|
|
1458
1458
|
}
|
|
1459
1459
|
function nu(e) {
|
|
@@ -1731,14 +1731,14 @@ function je(e, t, n = ke) {
|
|
|
1731
1731
|
if (Pr(s))
|
|
1732
1732
|
return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
|
|
1733
1733
|
if (Mr(s)) {
|
|
1734
|
-
const l = o(s.before, e), c = o(s.after, e),
|
|
1735
|
-
return i(s.before, s.after) ?
|
|
1734
|
+
const l = o(s.before, e), c = o(s.after, e), h = l > 0, f = c < 0;
|
|
1735
|
+
return i(s.before, s.after) ? f && h : h || f;
|
|
1736
1736
|
}
|
|
1737
1737
|
return Cr(s) ? o(e, s.after) > 0 : Nr(s) ? o(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
|
|
1738
1738
|
});
|
|
1739
1739
|
}
|
|
1740
1740
|
function bu(e, t, n) {
|
|
1741
|
-
const { disabled: a, hidden: r, modifiers: o, showOutsideDays: i, broadcastCalendar: s, today: l } = t, { isSameDay: c, isSameMonth:
|
|
1741
|
+
const { disabled: a, hidden: r, modifiers: o, showOutsideDays: i, broadcastCalendar: s, today: l } = t, { isSameDay: c, isSameMonth: h, startOfMonth: f, isBefore: m, endOfMonth: g, isAfter: b } = n, w = t.startMonth && f(t.startMonth), p = t.endMonth && g(t.endMonth), v = {
|
|
1742
1742
|
[re.focused]: [],
|
|
1743
1743
|
[re.outside]: [],
|
|
1744
1744
|
[re.disabled]: [],
|
|
@@ -1746,15 +1746,15 @@ function bu(e, t, n) {
|
|
|
1746
1746
|
[re.today]: []
|
|
1747
1747
|
}, S = {};
|
|
1748
1748
|
for (const y of e) {
|
|
1749
|
-
const { date:
|
|
1750
|
-
!s && !i && N || s && i === !1 && N,
|
|
1751
|
-
N && v.outside.push(y),
|
|
1749
|
+
const { date: M, displayMonth: x } = y, N = !!(x && !h(M, x)), C = !!(w && m(M, w)), D = !!(p && b(M, p)), R = !!(a && je(M, a, n)), j = !!(r && je(M, r, n)) || C || D || // Broadcast calendar will show outside days as default
|
|
1750
|
+
!s && !i && N || s && i === !1 && N, k = c(M, l ?? n.today());
|
|
1751
|
+
N && v.outside.push(y), R && v.disabled.push(y), j && v.hidden.push(y), k && v.today.push(y), o && Object.keys(o).forEach((I) => {
|
|
1752
1752
|
const U = o == null ? void 0 : o[I];
|
|
1753
|
-
U && je(
|
|
1753
|
+
U && je(M, U, n) && (S[I] ? S[I].push(y) : S[I] = [y]);
|
|
1754
1754
|
});
|
|
1755
1755
|
}
|
|
1756
1756
|
return (y) => {
|
|
1757
|
-
const
|
|
1757
|
+
const M = {
|
|
1758
1758
|
[re.focused]: !1,
|
|
1759
1759
|
[re.disabled]: !1,
|
|
1760
1760
|
[re.hidden]: !1,
|
|
@@ -1762,82 +1762,82 @@ function bu(e, t, n) {
|
|
|
1762
1762
|
[re.today]: !1
|
|
1763
1763
|
}, x = {};
|
|
1764
1764
|
for (const N in v) {
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1765
|
+
const C = v[N];
|
|
1766
|
+
M[N] = C.some((D) => D === y);
|
|
1767
1767
|
}
|
|
1768
1768
|
for (const N in S)
|
|
1769
|
-
x[N] = S[N].some((
|
|
1769
|
+
x[N] = S[N].some((C) => C === y);
|
|
1770
1770
|
return {
|
|
1771
|
-
...
|
|
1771
|
+
...M,
|
|
1772
1772
|
// custom modifiers should override all the previous ones
|
|
1773
1773
|
...x
|
|
1774
1774
|
};
|
|
1775
1775
|
};
|
|
1776
1776
|
}
|
|
1777
1777
|
function vu(e, t, n = {}) {
|
|
1778
|
-
return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [o]) => (n[o] ? r.push(n[o]) : t[re[o]] ? r.push(t[re[o]]) : t[Ne[o]] && r.push(t[Ne[o]]), r), [t[
|
|
1778
|
+
return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [o]) => (n[o] ? r.push(n[o]) : t[re[o]] ? r.push(t[re[o]]) : t[Ne[o]] && r.push(t[Ne[o]]), r), [t[O.Day]]);
|
|
1779
1779
|
}
|
|
1780
1780
|
function wu(e) {
|
|
1781
|
-
return
|
|
1781
|
+
return E.createElement("button", { ...e });
|
|
1782
1782
|
}
|
|
1783
1783
|
function yu(e) {
|
|
1784
|
-
return
|
|
1784
|
+
return E.createElement("span", { ...e });
|
|
1785
1785
|
}
|
|
1786
1786
|
function xu(e) {
|
|
1787
1787
|
const { size: t = 24, orientation: n = "left", className: a } = e;
|
|
1788
|
-
return
|
|
1788
|
+
return E.createElement(
|
|
1789
1789
|
"svg",
|
|
1790
1790
|
{ className: a, width: t, height: t, viewBox: "0 0 24 24" },
|
|
1791
|
-
n === "up" &&
|
|
1792
|
-
n === "down" &&
|
|
1793
|
-
n === "left" &&
|
|
1794
|
-
n === "right" &&
|
|
1791
|
+
n === "up" && E.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
1792
|
+
n === "down" && E.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
1793
|
+
n === "left" && E.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
1794
|
+
n === "right" && E.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
1795
1795
|
);
|
|
1796
1796
|
}
|
|
1797
1797
|
function Su(e) {
|
|
1798
1798
|
const { day: t, modifiers: n, ...a } = e;
|
|
1799
|
-
return
|
|
1799
|
+
return E.createElement("td", { ...a });
|
|
1800
1800
|
}
|
|
1801
1801
|
function Mu(e) {
|
|
1802
|
-
const { day: t, modifiers: n, ...a } = e, r =
|
|
1803
|
-
return
|
|
1802
|
+
const { day: t, modifiers: n, ...a } = e, r = E.useRef(null);
|
|
1803
|
+
return E.useEffect(() => {
|
|
1804
1804
|
var o;
|
|
1805
1805
|
n.focused && ((o = r.current) == null || o.focus());
|
|
1806
|
-
}, [n.focused]),
|
|
1806
|
+
}, [n.focused]), E.createElement("button", { ref: r, ...a });
|
|
1807
1807
|
}
|
|
1808
1808
|
function Cu(e) {
|
|
1809
|
-
const { options: t, className: n, components: a, classNames: r, ...o } = e, i = [r[
|
|
1810
|
-
return
|
|
1809
|
+
const { options: t, className: n, components: a, classNames: r, ...o } = e, i = [r[O.Dropdown], n].join(" "), s = t == null ? void 0 : t.find(({ value: l }) => l === o.value);
|
|
1810
|
+
return E.createElement(
|
|
1811
1811
|
"span",
|
|
1812
|
-
{ "data-disabled": o.disabled, className: r[
|
|
1813
|
-
|
|
1814
|
-
|
|
1812
|
+
{ "data-disabled": o.disabled, className: r[O.DropdownRoot] },
|
|
1813
|
+
E.createElement(a.Select, { className: i, ...o }, t == null ? void 0 : t.map(({ value: l, label: c, disabled: h }) => E.createElement(a.Option, { key: l, value: l, disabled: h }, c))),
|
|
1814
|
+
E.createElement(
|
|
1815
1815
|
"span",
|
|
1816
|
-
{ className: r[
|
|
1816
|
+
{ className: r[O.CaptionLabel], "aria-hidden": !0 },
|
|
1817
1817
|
s == null ? void 0 : s.label,
|
|
1818
|
-
|
|
1818
|
+
E.createElement(a.Chevron, { orientation: "down", size: 18, className: r[O.Chevron] })
|
|
1819
1819
|
)
|
|
1820
1820
|
);
|
|
1821
1821
|
}
|
|
1822
1822
|
function Nu(e) {
|
|
1823
|
-
return
|
|
1823
|
+
return E.createElement("div", { ...e });
|
|
1824
1824
|
}
|
|
1825
1825
|
function Pu(e) {
|
|
1826
|
-
return
|
|
1826
|
+
return E.createElement("div", { ...e });
|
|
1827
1827
|
}
|
|
1828
1828
|
function Du(e) {
|
|
1829
1829
|
const { calendarMonth: t, displayIndex: n, ...a } = e;
|
|
1830
|
-
return
|
|
1830
|
+
return E.createElement("div", { ...a }, e.children);
|
|
1831
1831
|
}
|
|
1832
1832
|
function Tu(e) {
|
|
1833
1833
|
const { calendarMonth: t, displayIndex: n, ...a } = e;
|
|
1834
|
-
return
|
|
1834
|
+
return E.createElement("div", { ...a });
|
|
1835
1835
|
}
|
|
1836
1836
|
function Eu(e) {
|
|
1837
|
-
return
|
|
1837
|
+
return E.createElement("table", { ...e });
|
|
1838
1838
|
}
|
|
1839
1839
|
function Ru(e) {
|
|
1840
|
-
return
|
|
1840
|
+
return E.createElement("div", { ...e });
|
|
1841
1841
|
}
|
|
1842
1842
|
const Tr = Fl(void 0);
|
|
1843
1843
|
function jt() {
|
|
@@ -1848,74 +1848,74 @@ function jt() {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
function ku(e) {
|
|
1850
1850
|
const { components: t } = jt();
|
|
1851
|
-
return
|
|
1851
|
+
return E.createElement(t.Dropdown, { ...e });
|
|
1852
1852
|
}
|
|
1853
1853
|
function _u(e) {
|
|
1854
|
-
const { onPreviousClick: t, onNextClick: n, previousMonth: a, nextMonth: r, ...o } = e, { components: i, classNames: s, labels: { labelPrevious: l, labelNext: c } } = jt(),
|
|
1855
|
-
r && (n == null || n(
|
|
1856
|
-
}, [r, n]),
|
|
1857
|
-
a && (t == null || t(
|
|
1854
|
+
const { onPreviousClick: t, onNextClick: n, previousMonth: a, nextMonth: r, ...o } = e, { components: i, classNames: s, labels: { labelPrevious: l, labelNext: c } } = jt(), h = ie((m) => {
|
|
1855
|
+
r && (n == null || n(m));
|
|
1856
|
+
}, [r, n]), f = ie((m) => {
|
|
1857
|
+
a && (t == null || t(m));
|
|
1858
1858
|
}, [a, t]);
|
|
1859
|
-
return
|
|
1859
|
+
return E.createElement(
|
|
1860
1860
|
"nav",
|
|
1861
1861
|
{ ...o },
|
|
1862
|
-
|
|
1862
|
+
E.createElement(
|
|
1863
1863
|
i.PreviousMonthButton,
|
|
1864
|
-
{ type: "button", className: s[
|
|
1865
|
-
|
|
1864
|
+
{ type: "button", className: s[O.PreviousMonthButton], tabIndex: a ? void 0 : -1, "aria-disabled": a ? void 0 : !0, "aria-label": l(a), onClick: f },
|
|
1865
|
+
E.createElement(i.Chevron, { disabled: a ? void 0 : !0, className: s[O.Chevron], orientation: "left" })
|
|
1866
1866
|
),
|
|
1867
|
-
|
|
1867
|
+
E.createElement(
|
|
1868
1868
|
i.NextMonthButton,
|
|
1869
|
-
{ type: "button", className: s[
|
|
1870
|
-
|
|
1869
|
+
{ type: "button", className: s[O.NextMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: h },
|
|
1870
|
+
E.createElement(i.Chevron, { disabled: r ? void 0 : !0, orientation: "right", className: s[O.Chevron] })
|
|
1871
1871
|
)
|
|
1872
1872
|
);
|
|
1873
1873
|
}
|
|
1874
1874
|
function Ou(e) {
|
|
1875
1875
|
const { components: t } = jt();
|
|
1876
|
-
return
|
|
1876
|
+
return E.createElement(t.Button, { ...e });
|
|
1877
1877
|
}
|
|
1878
1878
|
function Iu(e) {
|
|
1879
|
-
return
|
|
1879
|
+
return E.createElement("option", { ...e });
|
|
1880
1880
|
}
|
|
1881
1881
|
function Au(e) {
|
|
1882
1882
|
const { components: t } = jt();
|
|
1883
|
-
return
|
|
1883
|
+
return E.createElement(t.Button, { ...e });
|
|
1884
1884
|
}
|
|
1885
1885
|
function ju(e) {
|
|
1886
1886
|
const { rootRef: t, ...n } = e;
|
|
1887
|
-
return
|
|
1887
|
+
return E.createElement("div", { ...n, ref: t });
|
|
1888
1888
|
}
|
|
1889
1889
|
function Wu(e) {
|
|
1890
|
-
return
|
|
1890
|
+
return E.createElement("select", { ...e });
|
|
1891
1891
|
}
|
|
1892
1892
|
function Lu(e) {
|
|
1893
1893
|
const { week: t, ...n } = e;
|
|
1894
|
-
return
|
|
1894
|
+
return E.createElement("tr", { ...n });
|
|
1895
1895
|
}
|
|
1896
1896
|
function zu(e) {
|
|
1897
|
-
return
|
|
1897
|
+
return E.createElement("th", { ...e });
|
|
1898
1898
|
}
|
|
1899
1899
|
function Fu(e) {
|
|
1900
|
-
return
|
|
1900
|
+
return E.createElement(
|
|
1901
1901
|
"thead",
|
|
1902
1902
|
{ "aria-hidden": !0 },
|
|
1903
|
-
|
|
1903
|
+
E.createElement("tr", { ...e })
|
|
1904
1904
|
);
|
|
1905
1905
|
}
|
|
1906
1906
|
function $u(e) {
|
|
1907
1907
|
const { week: t, ...n } = e;
|
|
1908
|
-
return
|
|
1908
|
+
return E.createElement("th", { ...n });
|
|
1909
1909
|
}
|
|
1910
1910
|
function Bu(e) {
|
|
1911
|
-
return
|
|
1911
|
+
return E.createElement("th", { ...e });
|
|
1912
1912
|
}
|
|
1913
1913
|
function Hu(e) {
|
|
1914
|
-
return
|
|
1914
|
+
return E.createElement("tbody", { ...e });
|
|
1915
1915
|
}
|
|
1916
1916
|
function Yu(e) {
|
|
1917
1917
|
const { components: t } = jt();
|
|
1918
|
-
return
|
|
1918
|
+
return E.createElement(t.Dropdown, { ...e });
|
|
1919
1919
|
}
|
|
1920
1920
|
const Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1921
1921
|
__proto__: null,
|
|
@@ -1967,8 +1967,8 @@ function Ku(e) {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
function na() {
|
|
1969
1969
|
const e = {};
|
|
1970
|
-
for (const t in
|
|
1971
|
-
e[
|
|
1970
|
+
for (const t in O)
|
|
1971
|
+
e[O[t]] = `rdp-${O[t]}`;
|
|
1972
1972
|
for (const t in re)
|
|
1973
1973
|
e[re[t]] = `rdp-${re[t]}`;
|
|
1974
1974
|
for (const t in Ne)
|
|
@@ -2022,13 +2022,13 @@ function ad(e, t, n, a, r) {
|
|
|
2022
2022
|
return l({
|
|
2023
2023
|
start: i(e),
|
|
2024
2024
|
end: s(e)
|
|
2025
|
-
}).map((
|
|
2026
|
-
const g = a.formatMonthDropdown(
|
|
2025
|
+
}).map((m) => {
|
|
2026
|
+
const g = a.formatMonthDropdown(m, r), b = c(m), w = t && m < o(t) || n && m > o(n) || !1;
|
|
2027
2027
|
return { value: b, label: g, disabled: w };
|
|
2028
2028
|
});
|
|
2029
2029
|
}
|
|
2030
2030
|
function rd(e, t = {}, n = {}) {
|
|
2031
|
-
let a = { ...t == null ? void 0 : t[
|
|
2031
|
+
let a = { ...t == null ? void 0 : t[O.Day] };
|
|
2032
2032
|
return Object.entries(e).filter(([, r]) => r === !0).forEach(([r]) => {
|
|
2033
2033
|
a = {
|
|
2034
2034
|
...a,
|
|
@@ -2047,11 +2047,11 @@ function od(e, t, n) {
|
|
|
2047
2047
|
function sd(e, t, n, a) {
|
|
2048
2048
|
if (!e || !t)
|
|
2049
2049
|
return;
|
|
2050
|
-
const { startOfYear: r, endOfYear: o, addYears: i, getYear: s, isBefore: l, isSameYear: c } = a,
|
|
2051
|
-
let g =
|
|
2052
|
-
for (; l(g,
|
|
2053
|
-
|
|
2054
|
-
return
|
|
2050
|
+
const { startOfYear: r, endOfYear: o, addYears: i, getYear: s, isBefore: l, isSameYear: c } = a, h = r(e), f = o(t), m = [];
|
|
2051
|
+
let g = h;
|
|
2052
|
+
for (; l(g, f) || c(g, f); )
|
|
2053
|
+
m.push(g), g = i(g, 1);
|
|
2054
|
+
return m.map((b) => {
|
|
2055
2055
|
const w = n.formatYearDropdown(b, a);
|
|
2056
2056
|
return {
|
|
2057
2057
|
value: s(b),
|
|
@@ -2123,63 +2123,63 @@ function Sd(e, t, { classNames: n, months: a, focused: r, dateLib: o }) {
|
|
|
2123
2123
|
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
2124
2124
|
a.length === 0 || c.length === 0 || a.length !== c.length)
|
|
2125
2125
|
return;
|
|
2126
|
-
const
|
|
2126
|
+
const h = o.isSameMonth(a[0].date, c[0].date), f = o.isAfter(a[0].date, c[0].date), m = f ? n[ve.caption_after_enter] : n[ve.caption_before_enter], g = f ? n[ve.weeks_after_enter] : n[ve.weeks_before_enter], b = i.current, w = e.current.cloneNode(!0);
|
|
2127
2127
|
if (w instanceof HTMLElement ? (Pn(w).forEach((y) => {
|
|
2128
2128
|
if (!(y instanceof HTMLElement))
|
|
2129
2129
|
return;
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2130
|
+
const M = wd(y);
|
|
2131
|
+
M && y.contains(M) && y.removeChild(M);
|
|
2132
2132
|
const x = Dn(y);
|
|
2133
|
-
x && x.classList.remove(
|
|
2133
|
+
x && x.classList.remove(m);
|
|
2134
2134
|
const N = Tn(y);
|
|
2135
2135
|
N && N.classList.remove(g);
|
|
2136
|
-
}), i.current = w) : i.current = null, l.current ||
|
|
2136
|
+
}), i.current = w) : i.current = null, l.current || h || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
2137
2137
|
r)
|
|
2138
2138
|
return;
|
|
2139
2139
|
const p = b instanceof HTMLElement ? Pn(b) : [], v = Pn(e.current);
|
|
2140
2140
|
if (v && v.every((S) => S instanceof HTMLElement) && p && p.every((S) => S instanceof HTMLElement)) {
|
|
2141
2141
|
l.current = !0, e.current.style.isolation = "isolate";
|
|
2142
2142
|
const S = yd(e.current);
|
|
2143
|
-
S && (S.style.zIndex = "1"), v.forEach((y,
|
|
2144
|
-
const x = p[
|
|
2143
|
+
S && (S.style.zIndex = "1"), v.forEach((y, M) => {
|
|
2144
|
+
const x = p[M];
|
|
2145
2145
|
if (!x)
|
|
2146
2146
|
return;
|
|
2147
2147
|
y.style.position = "relative", y.style.overflow = "hidden";
|
|
2148
2148
|
const N = Dn(y);
|
|
2149
|
-
N && N.classList.add(
|
|
2150
|
-
const
|
|
2151
|
-
|
|
2152
|
-
const
|
|
2153
|
-
l.current = !1, e.current && (e.current.style.isolation = ""), S && (S.style.zIndex = ""), N && N.classList.remove(
|
|
2149
|
+
N && N.classList.add(m);
|
|
2150
|
+
const C = Tn(y);
|
|
2151
|
+
C && C.classList.add(g);
|
|
2152
|
+
const D = () => {
|
|
2153
|
+
l.current = !1, e.current && (e.current.style.isolation = ""), S && (S.style.zIndex = ""), N && N.classList.remove(m), C && C.classList.remove(g), y.style.position = "", y.style.overflow = "", y.contains(x) && y.removeChild(x);
|
|
2154
2154
|
};
|
|
2155
2155
|
x.style.pointerEvents = "none", x.style.position = "absolute", x.style.overflow = "hidden", x.setAttribute("aria-hidden", "true");
|
|
2156
|
-
const
|
|
2157
|
-
|
|
2156
|
+
const R = xd(x);
|
|
2157
|
+
R && (R.style.opacity = "0");
|
|
2158
2158
|
const j = Dn(x);
|
|
2159
|
-
j && (j.classList.add(
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2159
|
+
j && (j.classList.add(f ? n[ve.caption_before_exit] : n[ve.caption_after_exit]), j.addEventListener("animationend", D));
|
|
2160
|
+
const k = Tn(x);
|
|
2161
|
+
k && k.classList.add(f ? n[ve.weeks_before_exit] : n[ve.weeks_after_exit]), y.insertBefore(x, y.firstChild);
|
|
2162
2162
|
});
|
|
2163
2163
|
}
|
|
2164
2164
|
});
|
|
2165
2165
|
}
|
|
2166
2166
|
function Md(e, t, n, a) {
|
|
2167
|
-
const r = e[0], o = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: l } = n ?? {}, { addDays: c, differenceInCalendarDays:
|
|
2168
|
-
for (let
|
|
2169
|
-
const I = c(
|
|
2167
|
+
const r = e[0], o = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: l } = n ?? {}, { addDays: c, differenceInCalendarDays: h, differenceInCalendarMonths: f, endOfBroadcastWeek: m, endOfISOWeek: g, endOfMonth: b, endOfWeek: w, isAfter: p, startOfBroadcastWeek: v, startOfISOWeek: S, startOfWeek: y } = a, M = l ? v(r, a) : i ? S(r) : y(r), x = l ? m(o) : i ? g(b(o)) : w(b(o)), N = h(x, M), C = f(o, r) + 1, D = [];
|
|
2168
|
+
for (let k = 0; k <= N; k++) {
|
|
2169
|
+
const I = c(M, k);
|
|
2170
2170
|
if (t && p(I, t))
|
|
2171
2171
|
break;
|
|
2172
|
-
|
|
2172
|
+
D.push(I);
|
|
2173
2173
|
}
|
|
2174
|
-
const j = (l ? 35 : 42) *
|
|
2175
|
-
if (s &&
|
|
2176
|
-
const
|
|
2177
|
-
for (let I = 0; I <
|
|
2178
|
-
const U = c(
|
|
2179
|
-
|
|
2174
|
+
const j = (l ? 35 : 42) * C;
|
|
2175
|
+
if (s && D.length < j) {
|
|
2176
|
+
const k = j - D.length;
|
|
2177
|
+
for (let I = 0; I < k; I++) {
|
|
2178
|
+
const U = c(D[D.length - 1], 1);
|
|
2179
|
+
D.push(U);
|
|
2180
2180
|
}
|
|
2181
2181
|
}
|
|
2182
|
-
return
|
|
2182
|
+
return D;
|
|
2183
2183
|
}
|
|
2184
2184
|
function Cd(e) {
|
|
2185
2185
|
const t = [];
|
|
@@ -2201,26 +2201,26 @@ function Nd(e, t, n, a) {
|
|
|
2201
2201
|
function Wa(e, t) {
|
|
2202
2202
|
const { month: n, defaultMonth: a, today: r = t.today(), numberOfMonths: o = 1, endMonth: i, startMonth: s } = e;
|
|
2203
2203
|
let l = n || a || r;
|
|
2204
|
-
const { differenceInCalendarMonths: c, addMonths:
|
|
2204
|
+
const { differenceInCalendarMonths: c, addMonths: h, startOfMonth: f } = t;
|
|
2205
2205
|
if (i && c(i, l) < 0) {
|
|
2206
|
-
const
|
|
2207
|
-
l =
|
|
2206
|
+
const m = -1 * (o - 1);
|
|
2207
|
+
l = h(i, m);
|
|
2208
2208
|
}
|
|
2209
|
-
return s && c(l, s) < 0 && (l = s),
|
|
2209
|
+
return s && c(l, s) < 0 && (l = s), f(l);
|
|
2210
2210
|
}
|
|
2211
2211
|
function Pd(e, t, n, a) {
|
|
2212
|
-
const { addDays: r, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: l, getISOWeek: c, getWeek:
|
|
2213
|
-
const v = n.broadcastCalendar ?
|
|
2214
|
-
if (n.fixedWeeks && y.length <
|
|
2215
|
-
const
|
|
2216
|
-
const
|
|
2217
|
-
return
|
|
2212
|
+
const { addDays: r, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: l, getISOWeek: c, getWeek: h, startOfBroadcastWeek: f, startOfISOWeek: m, startOfWeek: g } = a, b = e.reduce((w, p) => {
|
|
2213
|
+
const v = n.broadcastCalendar ? f(p, a) : n.ISOWeek ? m(p) : g(p), S = n.broadcastCalendar ? o(p) : n.ISOWeek ? i(s(p)) : l(s(p)), y = t.filter((C) => C >= v && C <= S), M = n.broadcastCalendar ? 35 : 42;
|
|
2214
|
+
if (n.fixedWeeks && y.length < M) {
|
|
2215
|
+
const C = t.filter((D) => {
|
|
2216
|
+
const R = M - y.length;
|
|
2217
|
+
return D > S && D <= r(S, R);
|
|
2218
2218
|
});
|
|
2219
|
-
y.push(...
|
|
2219
|
+
y.push(...C);
|
|
2220
2220
|
}
|
|
2221
|
-
const x = y.reduce((
|
|
2222
|
-
const
|
|
2223
|
-
return j ? j.days.push(
|
|
2221
|
+
const x = y.reduce((C, D) => {
|
|
2222
|
+
const R = n.ISOWeek ? c(D) : h(D), j = C.find((I) => I.weekNumber === R), k = new Sr(D, p, a);
|
|
2223
|
+
return j ? j.days.push(k) : C.push(new gu(R, [k])), C;
|
|
2224
2224
|
}, []), N = new pu(p, x);
|
|
2225
2225
|
return w.push(N), w;
|
|
2226
2226
|
}, []);
|
|
@@ -2228,10 +2228,10 @@ function Pd(e, t, n, a) {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
function Dd(e, t) {
|
|
2230
2230
|
let { startMonth: n, endMonth: a } = e;
|
|
2231
|
-
const { startOfYear: r, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: l, endOfYear: c, newDate:
|
|
2232
|
-
!n && b && (n = b), !n &&
|
|
2231
|
+
const { startOfYear: r, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: l, endOfYear: c, newDate: h, today: f } = t, { fromYear: m, toYear: g, fromMonth: b, toMonth: w } = e;
|
|
2232
|
+
!n && b && (n = b), !n && m && (n = t.newDate(m, 0, 1)), !a && w && (a = w), !a && g && (a = h(g, 11, 31));
|
|
2233
2233
|
const p = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
2234
|
-
return n ? n = i(n) :
|
|
2234
|
+
return n ? n = i(n) : m ? n = h(m, 0, 1) : !n && p && (n = r(l(e.today ?? f(), -100))), a ? a = s(a) : g ? a = h(g, 11, 31) : !a && p && (a = c(e.today ?? f())), [
|
|
2235
2235
|
n && o(n),
|
|
2236
2236
|
a && o(a)
|
|
2237
2237
|
];
|
|
@@ -2239,20 +2239,20 @@ function Dd(e, t) {
|
|
|
2239
2239
|
function Td(e, t, n, a) {
|
|
2240
2240
|
if (n.disableNavigation)
|
|
2241
2241
|
return;
|
|
2242
|
-
const { pagedNavigation: r, numberOfMonths: o = 1 } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: l } = a, c = r ? o : 1,
|
|
2242
|
+
const { pagedNavigation: r, numberOfMonths: o = 1 } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: l } = a, c = r ? o : 1, h = i(e);
|
|
2243
2243
|
if (!t)
|
|
2244
|
-
return s(
|
|
2244
|
+
return s(h, c);
|
|
2245
2245
|
if (!(l(t, e) < o))
|
|
2246
|
-
return s(
|
|
2246
|
+
return s(h, c);
|
|
2247
2247
|
}
|
|
2248
2248
|
function Ed(e, t, n, a) {
|
|
2249
2249
|
if (n.disableNavigation)
|
|
2250
2250
|
return;
|
|
2251
|
-
const { pagedNavigation: r, numberOfMonths: o } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: l } = a, c = r ? o ?? 1 : 1,
|
|
2251
|
+
const { pagedNavigation: r, numberOfMonths: o } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: l } = a, c = r ? o ?? 1 : 1, h = i(e);
|
|
2252
2252
|
if (!t)
|
|
2253
|
-
return s(
|
|
2254
|
-
if (!(l(
|
|
2255
|
-
return s(
|
|
2253
|
+
return s(h, -c);
|
|
2254
|
+
if (!(l(h, t) <= 0))
|
|
2255
|
+
return s(h, -c);
|
|
2256
2256
|
}
|
|
2257
2257
|
function Rd(e) {
|
|
2258
2258
|
const t = [];
|
|
@@ -2272,15 +2272,15 @@ function kd(e, t) {
|
|
|
2272
2272
|
const N = Wa(e, t);
|
|
2273
2273
|
l(N);
|
|
2274
2274
|
}, [e.timeZone]);
|
|
2275
|
-
const c = Nd(s, a, e, t),
|
|
2275
|
+
const c = Nd(s, a, e, t), h = Md(c, e.endMonth ? o(e.endMonth) : void 0, e, t), f = Pd(c, h, e, t), m = Rd(f), g = Cd(f), b = Ed(s, n, e, t), w = Td(s, a, e, t), { disableNavigation: p, onMonthChange: v } = e, S = (N) => m.some((C) => C.days.some((D) => D.isEqualTo(N))), y = (N) => {
|
|
2276
2276
|
if (p)
|
|
2277
2277
|
return;
|
|
2278
|
-
let
|
|
2279
|
-
n &&
|
|
2278
|
+
let C = r(N);
|
|
2279
|
+
n && C < r(n) && (C = r(n)), a && C > r(a) && (C = r(a)), l(C), v == null || v(C);
|
|
2280
2280
|
};
|
|
2281
2281
|
return {
|
|
2282
|
-
months:
|
|
2283
|
-
weeks:
|
|
2282
|
+
months: f,
|
|
2283
|
+
weeks: m,
|
|
2284
2284
|
days: g,
|
|
2285
2285
|
navStart: n,
|
|
2286
2286
|
navEnd: a,
|
|
@@ -2308,84 +2308,84 @@ function _d(e, t, n, a) {
|
|
|
2308
2308
|
return r || (r = e.find((i) => La(t(i)))), r;
|
|
2309
2309
|
}
|
|
2310
2310
|
function Od(e, t, n, a, r, o, i) {
|
|
2311
|
-
const { ISOWeek: s, broadcastCalendar: l } = o, { addDays: c, addMonths:
|
|
2311
|
+
const { ISOWeek: s, broadcastCalendar: l } = o, { addDays: c, addMonths: h, addWeeks: f, addYears: m, endOfBroadcastWeek: g, endOfISOWeek: b, endOfWeek: w, max: p, min: v, startOfBroadcastWeek: S, startOfISOWeek: y, startOfWeek: M } = i;
|
|
2312
2312
|
let N = {
|
|
2313
2313
|
day: c,
|
|
2314
|
-
week:
|
|
2315
|
-
month:
|
|
2316
|
-
year:
|
|
2317
|
-
startOfWeek: (
|
|
2318
|
-
endOfWeek: (
|
|
2314
|
+
week: f,
|
|
2315
|
+
month: h,
|
|
2316
|
+
year: m,
|
|
2317
|
+
startOfWeek: (C) => l ? S(C, i) : s ? y(C) : M(C),
|
|
2318
|
+
endOfWeek: (C) => l ? g(C) : s ? b(C) : w(C)
|
|
2319
2319
|
}[e](n, t === "after" ? 1 : -1);
|
|
2320
2320
|
return t === "before" && a ? N = p([a, N]) : t === "after" && r && (N = v([r, N])), N;
|
|
2321
2321
|
}
|
|
2322
2322
|
function Or(e, t, n, a, r, o, i, s = 0) {
|
|
2323
2323
|
if (s > 365)
|
|
2324
2324
|
return;
|
|
2325
|
-
const l = Od(e, t, n.date, a, r, o, i), c = !!(o.disabled && je(l, o.disabled, i)),
|
|
2326
|
-
return !c && !
|
|
2325
|
+
const l = Od(e, t, n.date, a, r, o, i), c = !!(o.disabled && je(l, o.disabled, i)), h = !!(o.hidden && je(l, o.hidden, i)), f = l, m = new Sr(l, f, i);
|
|
2326
|
+
return !c && !h ? m : Or(e, t, m, a, r, o, i, s + 1);
|
|
2327
2327
|
}
|
|
2328
2328
|
function Id(e, t, n, a, r) {
|
|
2329
|
-
const { autoFocus: o } = e, [i, s] = Ee(), l = _d(t.days, n, a || (() => !1), i), [c,
|
|
2329
|
+
const { autoFocus: o } = e, [i, s] = Ee(), l = _d(t.days, n, a || (() => !1), i), [c, h] = Ee(o ? l : void 0);
|
|
2330
2330
|
return {
|
|
2331
2331
|
isFocusTarget: (w) => !!(l != null && l.isEqualTo(w)),
|
|
2332
|
-
setFocused:
|
|
2332
|
+
setFocused: h,
|
|
2333
2333
|
focused: c,
|
|
2334
2334
|
blur: () => {
|
|
2335
|
-
s(c),
|
|
2335
|
+
s(c), h(void 0);
|
|
2336
2336
|
},
|
|
2337
2337
|
moveFocus: (w, p) => {
|
|
2338
2338
|
if (!c)
|
|
2339
2339
|
return;
|
|
2340
2340
|
const v = Or(w, p, c, t.navStart, t.navEnd, e, r);
|
|
2341
|
-
v && (t.goToDay(v),
|
|
2341
|
+
v && (t.goToDay(v), h(v));
|
|
2342
2342
|
}
|
|
2343
2343
|
};
|
|
2344
2344
|
}
|
|
2345
2345
|
function Ad(e, t) {
|
|
2346
|
-
const { selected: n, required: a, onSelect: r } = e, [o, i] = rn(n, r ? n : void 0), s = r ? n : o, { isSameDay: l } = t, c = (g) => (s == null ? void 0 : s.some((b) => l(b, g))) ?? !1, { min:
|
|
2346
|
+
const { selected: n, required: a, onSelect: r } = e, [o, i] = rn(n, r ? n : void 0), s = r ? n : o, { isSameDay: l } = t, c = (g) => (s == null ? void 0 : s.some((b) => l(b, g))) ?? !1, { min: h, max: f } = e;
|
|
2347
2347
|
return {
|
|
2348
2348
|
selected: s,
|
|
2349
2349
|
select: (g, b, w) => {
|
|
2350
2350
|
let p = [...s ?? []];
|
|
2351
2351
|
if (c(g)) {
|
|
2352
|
-
if ((s == null ? void 0 : s.length) ===
|
|
2352
|
+
if ((s == null ? void 0 : s.length) === h || a && (s == null ? void 0 : s.length) === 1)
|
|
2353
2353
|
return;
|
|
2354
2354
|
p = s == null ? void 0 : s.filter((v) => !l(v, g));
|
|
2355
2355
|
} else
|
|
2356
|
-
(s == null ? void 0 : s.length) ===
|
|
2356
|
+
(s == null ? void 0 : s.length) === f ? p = [g] : p = [...p, g];
|
|
2357
2357
|
return r || i(p), r == null || r(p, g, b, w), p;
|
|
2358
2358
|
},
|
|
2359
2359
|
isSelected: c
|
|
2360
2360
|
};
|
|
2361
2361
|
}
|
|
2362
2362
|
function jd(e, t, n = 0, a = 0, r = !1, o = ke) {
|
|
2363
|
-
const { from: i, to: s } = t || {}, { isSameDay: l, isAfter: c, isBefore:
|
|
2364
|
-
let
|
|
2363
|
+
const { from: i, to: s } = t || {}, { isSameDay: l, isAfter: c, isBefore: h } = o;
|
|
2364
|
+
let f;
|
|
2365
2365
|
if (!i && !s)
|
|
2366
|
-
|
|
2366
|
+
f = { from: e, to: n > 0 ? void 0 : e };
|
|
2367
2367
|
else if (i && !s)
|
|
2368
|
-
l(i, e) ? r ?
|
|
2368
|
+
l(i, e) ? r ? f = { from: i, to: void 0 } : f = void 0 : h(e, i) ? f = { from: e, to: i } : f = { from: i, to: e };
|
|
2369
2369
|
else if (i && s)
|
|
2370
2370
|
if (l(i, e) && l(s, e))
|
|
2371
|
-
r ?
|
|
2371
|
+
r ? f = { from: i, to: s } : f = void 0;
|
|
2372
2372
|
else if (l(i, e))
|
|
2373
|
-
|
|
2373
|
+
f = { from: i, to: n > 0 ? void 0 : e };
|
|
2374
2374
|
else if (l(s, e))
|
|
2375
|
-
|
|
2376
|
-
else if (
|
|
2377
|
-
|
|
2375
|
+
f = { from: e, to: n > 0 ? void 0 : e };
|
|
2376
|
+
else if (h(e, i))
|
|
2377
|
+
f = { from: e, to: s };
|
|
2378
2378
|
else if (c(e, i))
|
|
2379
|
-
|
|
2379
|
+
f = { from: i, to: e };
|
|
2380
2380
|
else if (c(e, s))
|
|
2381
|
-
|
|
2381
|
+
f = { from: i, to: e };
|
|
2382
2382
|
else
|
|
2383
2383
|
throw new Error("Invalid range");
|
|
2384
|
-
if (
|
|
2385
|
-
const
|
|
2386
|
-
a > 0 &&
|
|
2384
|
+
if (f != null && f.from && (f != null && f.to)) {
|
|
2385
|
+
const m = o.differenceInCalendarDays(f.to, f.from);
|
|
2386
|
+
a > 0 && m > a ? f = { from: e, to: void 0 } : n > 1 && m < n && (f = { from: e, to: void 0 });
|
|
2387
2387
|
}
|
|
2388
|
-
return
|
|
2388
|
+
return f;
|
|
2389
2389
|
}
|
|
2390
2390
|
function Wd(e, t, n = ke) {
|
|
2391
2391
|
const a = Array.isArray(t) ? t : [t];
|
|
@@ -2413,7 +2413,7 @@ function Ld(e, t, n = ke) {
|
|
|
2413
2413
|
let s = e.from;
|
|
2414
2414
|
const l = n.differenceInCalendarDays(e.to, e.from);
|
|
2415
2415
|
for (let c = 0; c <= l; c++) {
|
|
2416
|
-
if (i.some((
|
|
2416
|
+
if (i.some((h) => h(s)))
|
|
2417
2417
|
return !0;
|
|
2418
2418
|
s = n.addDays(s, 1);
|
|
2419
2419
|
}
|
|
@@ -2424,22 +2424,22 @@ function zd(e, t) {
|
|
|
2424
2424
|
const { disabled: n, excludeDisabled: a, selected: r, required: o, onSelect: i } = e, [s, l] = rn(r, i ? r : void 0), c = i ? r : s;
|
|
2425
2425
|
return {
|
|
2426
2426
|
selected: c,
|
|
2427
|
-
select: (
|
|
2428
|
-
const { min: w, max: p } = e, v =
|
|
2429
|
-
return a && n && (v != null && v.from) && v.to && Ld({ from: v.from, to: v.to }, n, t) && (v.from =
|
|
2427
|
+
select: (m, g, b) => {
|
|
2428
|
+
const { min: w, max: p } = e, v = m ? jd(m, c, w, p, o, t) : void 0;
|
|
2429
|
+
return a && n && (v != null && v.from) && v.to && Ld({ from: v.from, to: v.to }, n, t) && (v.from = m, v.to = void 0), i || l(v), i == null || i(v, m, g, b), v;
|
|
2430
2430
|
},
|
|
2431
|
-
isSelected: (
|
|
2431
|
+
isSelected: (m) => c && Ae(c, m, !1, t)
|
|
2432
2432
|
};
|
|
2433
2433
|
}
|
|
2434
2434
|
function Fd(e, t) {
|
|
2435
2435
|
const { selected: n, required: a, onSelect: r } = e, [o, i] = rn(n, r ? n : void 0), s = r ? n : o, { isSameDay: l } = t;
|
|
2436
2436
|
return {
|
|
2437
2437
|
selected: s,
|
|
2438
|
-
select: (
|
|
2439
|
-
let b =
|
|
2440
|
-
return !a && s && s && l(
|
|
2438
|
+
select: (f, m, g) => {
|
|
2439
|
+
let b = f;
|
|
2440
|
+
return !a && s && s && l(f, s) && (b = void 0), r || i(b), r == null || r(b, f, m, g), b;
|
|
2441
2441
|
},
|
|
2442
|
-
isSelected: (
|
|
2442
|
+
isSelected: (f) => s ? l(s, f) : !1
|
|
2443
2443
|
};
|
|
2444
2444
|
}
|
|
2445
2445
|
function $d(e, t) {
|
|
@@ -2496,17 +2496,17 @@ function Bd(e) {
|
|
|
2496
2496
|
t.formatters,
|
|
2497
2497
|
t.labels,
|
|
2498
2498
|
t.classNames
|
|
2499
|
-
]), { captionLayout: l, mode: c, navLayout:
|
|
2499
|
+
]), { captionLayout: l, mode: c, navLayout: h, numberOfMonths: f = 1, onDayBlur: m, onDayClick: g, onDayFocus: b, onDayKeyDown: w, onDayMouseEnter: p, onDayMouseLeave: v, onNextClick: S, onPrevClick: y, showWeekNumber: M, styles: x } = t, { formatCaption: N, formatDay: C, formatMonthDropdown: D, formatWeekNumber: R, formatWeekNumberHeader: j, formatWeekdayName: k, formatYearDropdown: I } = a, U = kd(t, o), { days: _, months: H, navStart: z, navEnd: se, previousMonth: K, nextMonth: ae, goToMonth: ce } = U, Oe = bu(_, t, o), { isSelected: ue, select: T, selected: A } = $d(t, o) ?? {}, { blur: $, focused: L, isFocusTarget: W, moveFocus: G, setFocused: Z } = Id(t, U, Oe, ue ?? (() => !1), o), { labelDayButton: oe, labelGridcell: ye, labelGrid: xe, labelMonthDropdown: ee, labelNav: pe, labelPrevious: Be, labelNext: Je, labelWeekday: bt, labelWeekNumber: de, labelWeekNumberHeader: zt, labelYearDropdown: wn } = r, He = Dt(() => od(o, t.ISOWeek), [o, t.ISOWeek]), vt = c !== void 0 || g !== void 0, wt = ie(() => {
|
|
2500
2500
|
K && (ce(K), y == null || y(K));
|
|
2501
2501
|
}, [K, ce, y]), yn = ie(() => {
|
|
2502
2502
|
ae && (ce(ae), S == null || S(ae));
|
|
2503
2503
|
}, [ce, ae, S]), Di = ie((Y, te) => (J) => {
|
|
2504
|
-
J.preventDefault(), J.stopPropagation(), Z(Y),
|
|
2505
|
-
}, [
|
|
2504
|
+
J.preventDefault(), J.stopPropagation(), Z(Y), T == null || T(Y.date, te, J), g == null || g(Y.date, te, J);
|
|
2505
|
+
}, [T, g, Z]), Ti = ie((Y, te) => (J) => {
|
|
2506
2506
|
Z(Y), b == null || b(Y.date, te, J);
|
|
2507
2507
|
}, [b, Z]), Ei = ie((Y, te) => (J) => {
|
|
2508
|
-
$(),
|
|
2509
|
-
}, [$,
|
|
2508
|
+
$(), m == null || m(Y.date, te, J);
|
|
2509
|
+
}, [$, m]), Ri = ie((Y, te) => (J) => {
|
|
2510
2510
|
const ze = {
|
|
2511
2511
|
ArrowLeft: ["day", t.dir === "rtl" ? "after" : "before"],
|
|
2512
2512
|
ArrowRight: ["day", t.dir === "rtl" ? "before" : "after"],
|
|
@@ -2534,8 +2534,8 @@ function Bd(e) {
|
|
|
2534
2534
|
const J = Number(te.target.value), ze = o.setYear(o.startOfMonth(Y), J);
|
|
2535
2535
|
ce(ze);
|
|
2536
2536
|
}, [o, ce]), { className: Ai, style: ji } = Dt(() => ({
|
|
2537
|
-
className: [s[
|
|
2538
|
-
style: { ...x == null ? void 0 : x[
|
|
2537
|
+
className: [s[O.Root], t.className].filter(Boolean).join(" "),
|
|
2538
|
+
style: { ...x == null ? void 0 : x[O.Root], ...t.style }
|
|
2539
2539
|
}), [s, t.className, t.style, x]), Wi = Ku(t), Pa = ot(null);
|
|
2540
2540
|
Sd(Pa, !!t.animate, {
|
|
2541
2541
|
classNames: s,
|
|
@@ -2546,7 +2546,7 @@ function Bd(e) {
|
|
|
2546
2546
|
const Li = {
|
|
2547
2547
|
dayPickerProps: t,
|
|
2548
2548
|
selected: A,
|
|
2549
|
-
select:
|
|
2549
|
+
select: T,
|
|
2550
2550
|
isSelected: ue,
|
|
2551
2551
|
months: H,
|
|
2552
2552
|
nextMonth: ae,
|
|
@@ -2559,32 +2559,32 @@ function Bd(e) {
|
|
|
2559
2559
|
labels: r,
|
|
2560
2560
|
formatters: a
|
|
2561
2561
|
};
|
|
2562
|
-
return
|
|
2562
|
+
return E.createElement(
|
|
2563
2563
|
Tr.Provider,
|
|
2564
2564
|
{ value: Li },
|
|
2565
|
-
|
|
2565
|
+
E.createElement(
|
|
2566
2566
|
n.Root,
|
|
2567
2567
|
{ rootRef: t.animate ? Pa : void 0, className: Ai, style: ji, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], ...Wi },
|
|
2568
|
-
|
|
2568
|
+
E.createElement(
|
|
2569
2569
|
n.Months,
|
|
2570
|
-
{ className: s[
|
|
2571
|
-
!t.hideNavigation && !
|
|
2570
|
+
{ className: s[O.Months], style: x == null ? void 0 : x[O.Months] },
|
|
2571
|
+
!t.hideNavigation && !h && E.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[O.Nav], style: x == null ? void 0 : x[O.Nav], "aria-label": pe(), onPreviousClick: wt, onNextClick: yn, previousMonth: K, nextMonth: ae }),
|
|
2572
2572
|
H.map((Y, te) => {
|
|
2573
2573
|
const J = ad(Y.date, z, se, a, o), ze = sd(z, se, a, o);
|
|
2574
|
-
return
|
|
2574
|
+
return E.createElement(
|
|
2575
2575
|
n.Month,
|
|
2576
|
-
{ "data-animated-month": t.animate ? "true" : void 0, className: s[
|
|
2577
|
-
|
|
2576
|
+
{ "data-animated-month": t.animate ? "true" : void 0, className: s[O.Month], style: x == null ? void 0 : x[O.Month], key: te, displayIndex: te, calendarMonth: Y },
|
|
2577
|
+
h === "around" && !t.hideNavigation && te === 0 && E.createElement(
|
|
2578
2578
|
n.PreviousMonthButton,
|
|
2579
|
-
{ type: "button", className: s[
|
|
2580
|
-
|
|
2579
|
+
{ type: "button", className: s[O.PreviousMonthButton], tabIndex: K ? void 0 : -1, "aria-disabled": K ? void 0 : !0, "aria-label": Be(K), onClick: wt, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2580
|
+
E.createElement(n.Chevron, { disabled: K ? void 0 : !0, className: s[O.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
2581
2581
|
),
|
|
2582
|
-
|
|
2582
|
+
E.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[O.MonthCaption], style: x == null ? void 0 : x[O.MonthCaption], calendarMonth: Y, displayIndex: te }, l != null && l.startsWith("dropdown") ? E.createElement(
|
|
2583
2583
|
n.DropdownNav,
|
|
2584
|
-
{ className: s[
|
|
2585
|
-
l === "dropdown" || l === "dropdown-months" ?
|
|
2586
|
-
l === "dropdown" || l === "dropdown-years" ?
|
|
2587
|
-
|
|
2584
|
+
{ className: s[O.Dropdowns], style: x == null ? void 0 : x[O.Dropdowns] },
|
|
2585
|
+
l === "dropdown" || l === "dropdown-months" ? E.createElement(n.MonthsDropdown, { className: s[O.MonthsDropdown], "aria-label": ee(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Oi(Y.date), options: J, style: x == null ? void 0 : x[O.Dropdown], value: o.getMonth(Y.date) }) : E.createElement("span", null, D(Y.date, o)),
|
|
2586
|
+
l === "dropdown" || l === "dropdown-years" ? E.createElement(n.YearsDropdown, { className: s[O.YearsDropdown], "aria-label": wn(o.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: Ii(Y.date), options: ze, style: x == null ? void 0 : x[O.Dropdown], value: o.getYear(Y.date) }) : E.createElement("span", null, I(Y.date, o)),
|
|
2587
|
+
E.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
2588
2588
|
border: 0,
|
|
2589
2589
|
clip: "rect(0 0 0 0)",
|
|
2590
2590
|
height: "1px",
|
|
@@ -2596,28 +2596,28 @@ function Bd(e) {
|
|
|
2596
2596
|
whiteSpace: "nowrap",
|
|
2597
2597
|
wordWrap: "normal"
|
|
2598
2598
|
} }, N(Y.date, o.options, o))
|
|
2599
|
-
) :
|
|
2600
|
-
|
|
2599
|
+
) : E.createElement(n.CaptionLabel, { className: s[O.CaptionLabel], role: "status", "aria-live": "polite" }, N(Y.date, o.options, o))),
|
|
2600
|
+
h === "around" && !t.hideNavigation && te === f - 1 && E.createElement(
|
|
2601
2601
|
n.NextMonthButton,
|
|
2602
|
-
{ type: "button", className: s[
|
|
2603
|
-
|
|
2602
|
+
{ type: "button", className: s[O.NextMonthButton], tabIndex: ae ? void 0 : -1, "aria-disabled": ae ? void 0 : !0, "aria-label": Je(ae), onClick: yn, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2603
|
+
E.createElement(n.Chevron, { disabled: ae ? void 0 : !0, className: s[O.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
2604
2604
|
),
|
|
2605
|
-
te ===
|
|
2606
|
-
|
|
2605
|
+
te === f - 1 && h === "after" && !t.hideNavigation && E.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[O.Nav], style: x == null ? void 0 : x[O.Nav], "aria-label": pe(), onPreviousClick: wt, onNextClick: yn, previousMonth: K, nextMonth: ae }),
|
|
2606
|
+
E.createElement(
|
|
2607
2607
|
n.MonthGrid,
|
|
2608
|
-
{ role: "grid", "aria-multiselectable": c === "multiple" || c === "range", "aria-label": xe(Y.date, o.options, o) || void 0, className: s[
|
|
2609
|
-
!t.hideWeekdays &&
|
|
2608
|
+
{ role: "grid", "aria-multiselectable": c === "multiple" || c === "range", "aria-label": xe(Y.date, o.options, o) || void 0, className: s[O.MonthGrid], style: x == null ? void 0 : x[O.MonthGrid] },
|
|
2609
|
+
!t.hideWeekdays && E.createElement(
|
|
2610
2610
|
n.Weekdays,
|
|
2611
|
-
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: s[
|
|
2612
|
-
|
|
2613
|
-
He.map((Ce, Ft) =>
|
|
2611
|
+
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: s[O.Weekdays], style: x == null ? void 0 : x[O.Weekdays] },
|
|
2612
|
+
M && E.createElement(n.WeekNumberHeader, { "aria-label": zt(o.options), className: s[O.WeekNumberHeader], style: x == null ? void 0 : x[O.WeekNumberHeader], scope: "col" }, j()),
|
|
2613
|
+
He.map((Ce, Ft) => E.createElement(n.Weekday, { "aria-label": bt(Ce, o.options, o), className: s[O.Weekday], key: Ft, style: x == null ? void 0 : x[O.Weekday], scope: "col" }, k(Ce, o.options, o)))
|
|
2614
2614
|
),
|
|
2615
|
-
|
|
2615
|
+
E.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[O.Weeks], style: x == null ? void 0 : x[O.Weeks] }, Y.weeks.map((Ce, Ft) => E.createElement(
|
|
2616
2616
|
n.Week,
|
|
2617
|
-
{ className: s[
|
|
2618
|
-
|
|
2617
|
+
{ className: s[O.Week], key: Ce.weekNumber, style: x == null ? void 0 : x[O.Week], week: Ce },
|
|
2618
|
+
M && E.createElement(n.WeekNumber, { week: Ce, style: x == null ? void 0 : x[O.WeekNumber], "aria-label": de(Ce.weekNumber, {
|
|
2619
2619
|
locale: i
|
|
2620
|
-
}), className: s[
|
|
2620
|
+
}), className: s[O.WeekNumber], scope: "row", role: "rowheader" }, R(Ce.weekNumber, o)),
|
|
2621
2621
|
Ce.days.map((fe) => {
|
|
2622
2622
|
const { date: De } = fe, q = Oe(fe);
|
|
2623
2623
|
if (q[re.focused] = !q.hidden && !!(L != null && L.isEqualTo(fe)), q[Ne.selected] = (ue == null ? void 0 : ue(De)) || q.selected, ta(A)) {
|
|
@@ -2625,14 +2625,14 @@ function Bd(e) {
|
|
|
2625
2625
|
q[Ne.range_start] = !!(xn && Sn && o.isSameDay(De, xn)), q[Ne.range_end] = !!(xn && Sn && o.isSameDay(De, Sn)), q[Ne.range_middle] = Ae(A, De, !0, o);
|
|
2626
2626
|
}
|
|
2627
2627
|
const zi = rd(q, x, t.modifiersStyles), Fi = vu(q, s, t.modifiersClassNames), $i = !vt && !q.hidden ? ye(De, q, o.options, o) : void 0;
|
|
2628
|
-
return
|
|
2628
|
+
return E.createElement(n.Day, { key: `${o.format(De, "yyyy-MM-dd")}_${o.format(fe.displayMonth, "yyyy-MM")}`, day: fe, modifiers: q, className: Fi.join(" "), style: zi, role: "gridcell", "aria-selected": q.selected || void 0, "aria-label": $i, "data-day": o.format(De, "yyyy-MM-dd"), "data-month": fe.outside ? o.format(De, "yyyy-MM") : void 0, "data-selected": q.selected || void 0, "data-disabled": q.disabled || void 0, "data-hidden": q.hidden || void 0, "data-outside": fe.outside || void 0, "data-focused": q.focused || void 0, "data-today": q.today || void 0 }, !q.hidden && vt ? E.createElement(n.DayButton, { className: s[O.DayButton], style: x == null ? void 0 : x[O.DayButton], type: "button", day: fe, modifiers: q, disabled: q.disabled || void 0, tabIndex: W(fe) ? 0 : -1, "aria-label": oe(De, q, o.options, o), onClick: Di(fe, q), onBlur: Ei(fe, q), onFocus: Ti(fe, q), onKeyDown: Ri(fe, q), onMouseEnter: ki(fe, q), onMouseLeave: _i(fe, q) }, C(De, o.options, o)) : !q.hidden && C(fe.date, o.options, o));
|
|
2629
2629
|
})
|
|
2630
2630
|
)))
|
|
2631
2631
|
)
|
|
2632
2632
|
);
|
|
2633
2633
|
})
|
|
2634
2634
|
),
|
|
2635
|
-
t.footer &&
|
|
2635
|
+
t.footer && E.createElement(n.Footer, { className: s[O.Footer], style: x == null ? void 0 : x[O.Footer], role: "status", "aria-live": "polite" }, t.footer)
|
|
2636
2636
|
)
|
|
2637
2637
|
);
|
|
2638
2638
|
}
|
|
@@ -2736,10 +2736,10 @@ function Hd({
|
|
|
2736
2736
|
...t
|
|
2737
2737
|
},
|
|
2738
2738
|
components: {
|
|
2739
|
-
Root: ({ className: c, rootRef:
|
|
2740
|
-
Chevron: ({ className: c, orientation:
|
|
2739
|
+
Root: ({ className: c, rootRef: h, ...f }) => /* @__PURE__ */ u.jsx("div", { "data-slot": "calendar", ref: h, className: P(c), ...f }),
|
|
2740
|
+
Chevron: ({ className: c, orientation: h, ...f }) => h === "left" ? /* @__PURE__ */ u.jsx(ir, { className: P("al-size-4", c), ...f }) : h === "right" ? /* @__PURE__ */ u.jsx(nn, { className: P("al-size-4", c), ...f }) : /* @__PURE__ */ u.jsx(_l, { className: P("al-size-4", c), ...f }),
|
|
2741
2741
|
DayButton: Yd,
|
|
2742
|
-
WeekNumber: ({ children: c, ...
|
|
2742
|
+
WeekNumber: ({ children: c, ...h }) => /* @__PURE__ */ u.jsx("td", { ...h, children: /* @__PURE__ */ u.jsx("div", { className: "al-flex al-size-[--cell-size] al-items-center al-justify-center al-text-center", children: c }) }),
|
|
2743
2743
|
...i
|
|
2744
2744
|
},
|
|
2745
2745
|
...s
|
|
@@ -2834,7 +2834,7 @@ const Fa = (e, t) => {
|
|
|
2834
2834
|
from: new V(/* @__PURE__ */ new Date(), n),
|
|
2835
2835
|
to: new V(/* @__PURE__ */ new Date(), n)
|
|
2836
2836
|
}
|
|
2837
|
-
), [c,
|
|
2837
|
+
), [c, h] = Ee(void 0), [f, m] = Ee(!1), [g, b] = Ee(s), [w, p] = Ee(!1), v = Dt(() => {
|
|
2838
2838
|
if (e)
|
|
2839
2839
|
return {
|
|
2840
2840
|
from: e.from ? new V(e.from, n) : void 0,
|
|
@@ -2843,34 +2843,34 @@ const Fa = (e, t) => {
|
|
|
2843
2843
|
}, [e, n]), S = Dt(() => {
|
|
2844
2844
|
if (v)
|
|
2845
2845
|
return a.find((N) => {
|
|
2846
|
-
const
|
|
2847
|
-
return $a(v,
|
|
2846
|
+
const C = Fa(N, n);
|
|
2847
|
+
return $a(v, C);
|
|
2848
2848
|
});
|
|
2849
2849
|
}, [v, a, n]);
|
|
2850
2850
|
Vt(() => {
|
|
2851
|
-
v && !$a(s, v) && (l(v), b(v)),
|
|
2851
|
+
v && !$a(s, v) && (l(v), b(v)), h(S);
|
|
2852
2852
|
}, [v, S, s]), Vt(() => {
|
|
2853
2853
|
if (r)
|
|
2854
|
-
|
|
2854
|
+
m(!0);
|
|
2855
2855
|
else {
|
|
2856
2856
|
if (!o && !i) {
|
|
2857
|
-
|
|
2857
|
+
m(!1);
|
|
2858
2858
|
return;
|
|
2859
2859
|
}
|
|
2860
2860
|
if (o && !i) {
|
|
2861
|
-
|
|
2861
|
+
m({
|
|
2862
2862
|
before: new V(o, n)
|
|
2863
2863
|
});
|
|
2864
2864
|
return;
|
|
2865
2865
|
}
|
|
2866
2866
|
if (!o && i) {
|
|
2867
|
-
|
|
2867
|
+
m({
|
|
2868
2868
|
after: new V(i, n)
|
|
2869
2869
|
});
|
|
2870
2870
|
return;
|
|
2871
2871
|
}
|
|
2872
2872
|
if (o && i) {
|
|
2873
|
-
|
|
2873
|
+
m({
|
|
2874
2874
|
before: new V(o, n),
|
|
2875
2875
|
after: new V(i, n)
|
|
2876
2876
|
});
|
|
@@ -2880,17 +2880,17 @@ const Fa = (e, t) => {
|
|
|
2880
2880
|
}, [o, i, r, n]);
|
|
2881
2881
|
const y = ie(
|
|
2882
2882
|
(N) => {
|
|
2883
|
-
const
|
|
2884
|
-
l(
|
|
2883
|
+
const C = Fa(N, n);
|
|
2884
|
+
l(C), b(C), h(N), t(C), p(!1);
|
|
2885
2885
|
},
|
|
2886
2886
|
[n, t]
|
|
2887
|
-
),
|
|
2887
|
+
), M = ie(
|
|
2888
2888
|
(N) => {
|
|
2889
|
-
const
|
|
2889
|
+
const C = {
|
|
2890
2890
|
from: N.from ? new V(N.from, n) : void 0,
|
|
2891
2891
|
to: N.to ? new V(N.to, n) : void 0
|
|
2892
2892
|
};
|
|
2893
|
-
|
|
2893
|
+
C.from && C.from.setHours(0, 0, 0, 0), C.to && C.to.setHours(23, 59, 59, 999), b(C);
|
|
2894
2894
|
},
|
|
2895
2895
|
[n]
|
|
2896
2896
|
), x = ie(() => {
|
|
@@ -2898,7 +2898,7 @@ const Fa = (e, t) => {
|
|
|
2898
2898
|
console.warn("Invalid date range: from date must be before or equal to to date");
|
|
2899
2899
|
return;
|
|
2900
2900
|
}
|
|
2901
|
-
l(g), c ||
|
|
2901
|
+
l(g), c || h(void 0), t(g), p(!1);
|
|
2902
2902
|
}, [g, c, t]);
|
|
2903
2903
|
return /* @__PURE__ */ u.jsxs(ll, { open: w, onOpenChange: p, children: [
|
|
2904
2904
|
/* @__PURE__ */ u.jsx(cl, { asChild: !0, children: /* @__PURE__ */ u.jsxs($t, { align: "center", gap: "lg", children: [
|
|
@@ -2934,11 +2934,11 @@ const Fa = (e, t) => {
|
|
|
2934
2934
|
{
|
|
2935
2935
|
className: "al-w-full al-p-6",
|
|
2936
2936
|
captionLayout: r ? "label" : "dropdown",
|
|
2937
|
-
disabled:
|
|
2937
|
+
disabled: f,
|
|
2938
2938
|
mode: "range",
|
|
2939
2939
|
numberOfMonths: 2,
|
|
2940
2940
|
selected: g,
|
|
2941
|
-
onSelect:
|
|
2941
|
+
onSelect: M,
|
|
2942
2942
|
timeZone: n,
|
|
2943
2943
|
showOutsideDays: !0,
|
|
2944
2944
|
required: !0
|
|
@@ -2956,9 +2956,9 @@ const Fa = (e, t) => {
|
|
|
2956
2956
|
] }) })
|
|
2957
2957
|
] });
|
|
2958
2958
|
};
|
|
2959
|
-
var aa = "Avatar", [Gd, ig] = Qe(aa), [Kd, Ar] = Gd(aa), jr =
|
|
2959
|
+
var aa = "Avatar", [Gd, ig] = Qe(aa), [Kd, Ar] = Gd(aa), jr = d.forwardRef(
|
|
2960
2960
|
(e, t) => {
|
|
2961
|
-
const { __scopeAvatar: n, ...a } = e, [r, o] =
|
|
2961
|
+
const { __scopeAvatar: n, ...a } = e, [r, o] = d.useState("idle");
|
|
2962
2962
|
return /* @__PURE__ */ u.jsx(
|
|
2963
2963
|
Kd,
|
|
2964
2964
|
{
|
|
@@ -2971,7 +2971,7 @@ var aa = "Avatar", [Gd, ig] = Qe(aa), [Kd, Ar] = Gd(aa), jr = f.forwardRef(
|
|
|
2971
2971
|
}
|
|
2972
2972
|
);
|
|
2973
2973
|
jr.displayName = aa;
|
|
2974
|
-
var Wr = "AvatarImage", Lr =
|
|
2974
|
+
var Wr = "AvatarImage", Lr = d.forwardRef(
|
|
2975
2975
|
(e, t) => {
|
|
2976
2976
|
const { __scopeAvatar: n, src: a, onLoadingStatusChange: r = () => {
|
|
2977
2977
|
}, ...o } = e, i = Ar(Wr, n), s = Ud(a, o.referrerPolicy), l = Se((c) => {
|
|
@@ -2983,10 +2983,10 @@ var Wr = "AvatarImage", Lr = f.forwardRef(
|
|
|
2983
2983
|
}
|
|
2984
2984
|
);
|
|
2985
2985
|
Lr.displayName = Wr;
|
|
2986
|
-
var zr = "AvatarFallback", Fr =
|
|
2986
|
+
var zr = "AvatarFallback", Fr = d.forwardRef(
|
|
2987
2987
|
(e, t) => {
|
|
2988
|
-
const { __scopeAvatar: n, delayMs: a, ...r } = e, o = Ar(zr, n), [i, s] =
|
|
2989
|
-
return
|
|
2988
|
+
const { __scopeAvatar: n, delayMs: a, ...r } = e, o = Ar(zr, n), [i, s] = d.useState(a === void 0);
|
|
2989
|
+
return d.useEffect(() => {
|
|
2990
2990
|
if (a !== void 0) {
|
|
2991
2991
|
const l = window.setTimeout(() => s(!0), a);
|
|
2992
2992
|
return () => window.clearTimeout(l);
|
|
@@ -2996,7 +2996,7 @@ var zr = "AvatarFallback", Fr = f.forwardRef(
|
|
|
2996
2996
|
);
|
|
2997
2997
|
Fr.displayName = zr;
|
|
2998
2998
|
function Ud(e, t) {
|
|
2999
|
-
const [n, a] =
|
|
2999
|
+
const [n, a] = d.useState("idle");
|
|
3000
3000
|
return tn(() => {
|
|
3001
3001
|
if (!e) {
|
|
3002
3002
|
a("error");
|
|
@@ -3053,7 +3053,7 @@ var ra = "ToastProvider", [oa, Qd, Jd] = Qn("Toast"), [Yr, lg] = Qe("Toast", [Jd
|
|
|
3053
3053
|
swipeDirection: r = "right",
|
|
3054
3054
|
swipeThreshold: o = 50,
|
|
3055
3055
|
children: i
|
|
3056
|
-
} = e, [s, l] =
|
|
3056
|
+
} = e, [s, l] = d.useState(null), [c, h] = d.useState(0), f = d.useRef(!1), m = d.useRef(!1);
|
|
3057
3057
|
return n.trim() || console.error(
|
|
3058
3058
|
`Invalid prop \`label\` supplied to \`${ra}\`. Expected non-empty \`string\`.`
|
|
3059
3059
|
), /* @__PURE__ */ u.jsx(oa.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
|
|
@@ -3067,31 +3067,31 @@ var ra = "ToastProvider", [oa, Qd, Jd] = Qn("Toast"), [Yr, lg] = Qe("Toast", [Jd
|
|
|
3067
3067
|
toastCount: c,
|
|
3068
3068
|
viewport: s,
|
|
3069
3069
|
onViewportChange: l,
|
|
3070
|
-
onToastAdd:
|
|
3071
|
-
onToastRemove:
|
|
3072
|
-
isFocusedToastEscapeKeyDownRef:
|
|
3073
|
-
isClosePausedRef:
|
|
3070
|
+
onToastAdd: d.useCallback(() => h((g) => g + 1), []),
|
|
3071
|
+
onToastRemove: d.useCallback(() => h((g) => g - 1), []),
|
|
3072
|
+
isFocusedToastEscapeKeyDownRef: f,
|
|
3073
|
+
isClosePausedRef: m,
|
|
3074
3074
|
children: i
|
|
3075
3075
|
}
|
|
3076
3076
|
) });
|
|
3077
3077
|
};
|
|
3078
3078
|
Vr.displayName = ra;
|
|
3079
|
-
var Gr = "ToastViewport", tf = ["F8"], zn = "toast.viewportPause", Fn = "toast.viewportResume", Kr =
|
|
3079
|
+
var Gr = "ToastViewport", tf = ["F8"], zn = "toast.viewportPause", Fn = "toast.viewportResume", Kr = d.forwardRef(
|
|
3080
3080
|
(e, t) => {
|
|
3081
3081
|
const {
|
|
3082
3082
|
__scopeToast: n,
|
|
3083
3083
|
hotkey: a = tf,
|
|
3084
3084
|
label: r = "Notifications ({hotkey})",
|
|
3085
3085
|
...o
|
|
3086
|
-
} = e, i = on(Gr, n), s = Qd(n), l =
|
|
3087
|
-
|
|
3086
|
+
} = e, i = on(Gr, n), s = Qd(n), l = d.useRef(null), c = d.useRef(null), h = d.useRef(null), f = d.useRef(null), m = he(t, f, i.onViewportChange), g = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), b = i.toastCount > 0;
|
|
3087
|
+
d.useEffect(() => {
|
|
3088
3088
|
const p = (v) => {
|
|
3089
3089
|
var y;
|
|
3090
|
-
a.length !== 0 && a.every((
|
|
3090
|
+
a.length !== 0 && a.every((M) => v[M] || v.code === M) && ((y = f.current) == null || y.focus());
|
|
3091
3091
|
};
|
|
3092
3092
|
return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
|
|
3093
|
-
}, [a]),
|
|
3094
|
-
const p = l.current, v =
|
|
3093
|
+
}, [a]), d.useEffect(() => {
|
|
3094
|
+
const p = l.current, v = f.current;
|
|
3095
3095
|
if (b && p && v) {
|
|
3096
3096
|
const S = () => {
|
|
3097
3097
|
if (!i.isClosePausedRef.current) {
|
|
@@ -3103,40 +3103,40 @@ var Gr = "ToastViewport", tf = ["F8"], zn = "toast.viewportPause", Fn = "toast.v
|
|
|
3103
3103
|
const N = new CustomEvent(Fn);
|
|
3104
3104
|
v.dispatchEvent(N), i.isClosePausedRef.current = !1;
|
|
3105
3105
|
}
|
|
3106
|
-
},
|
|
3106
|
+
}, M = (N) => {
|
|
3107
3107
|
!p.contains(N.relatedTarget) && y();
|
|
3108
3108
|
}, x = () => {
|
|
3109
3109
|
p.contains(document.activeElement) || y();
|
|
3110
3110
|
};
|
|
3111
|
-
return p.addEventListener("focusin", S), p.addEventListener("focusout",
|
|
3112
|
-
p.removeEventListener("focusin", S), p.removeEventListener("focusout",
|
|
3111
|
+
return p.addEventListener("focusin", S), p.addEventListener("focusout", M), p.addEventListener("pointermove", S), p.addEventListener("pointerleave", x), window.addEventListener("blur", S), window.addEventListener("focus", y), () => {
|
|
3112
|
+
p.removeEventListener("focusin", S), p.removeEventListener("focusout", M), p.removeEventListener("pointermove", S), p.removeEventListener("pointerleave", x), window.removeEventListener("blur", S), window.removeEventListener("focus", y);
|
|
3113
3113
|
};
|
|
3114
3114
|
}
|
|
3115
3115
|
}, [b, i.isClosePausedRef]);
|
|
3116
|
-
const w =
|
|
3116
|
+
const w = d.useCallback(
|
|
3117
3117
|
({ tabbingDirection: p }) => {
|
|
3118
3118
|
const S = s().map((y) => {
|
|
3119
|
-
const
|
|
3119
|
+
const M = y.ref.current, x = [M, ...pf(M)];
|
|
3120
3120
|
return p === "forwards" ? x : x.reverse();
|
|
3121
3121
|
});
|
|
3122
3122
|
return (p === "forwards" ? S.reverse() : S).flat();
|
|
3123
3123
|
},
|
|
3124
3124
|
[s]
|
|
3125
3125
|
);
|
|
3126
|
-
return
|
|
3127
|
-
const p =
|
|
3126
|
+
return d.useEffect(() => {
|
|
3127
|
+
const p = f.current;
|
|
3128
3128
|
if (p) {
|
|
3129
3129
|
const v = (S) => {
|
|
3130
|
-
var x, N,
|
|
3130
|
+
var x, N, C;
|
|
3131
3131
|
const y = S.altKey || S.ctrlKey || S.metaKey;
|
|
3132
3132
|
if (S.key === "Tab" && !y) {
|
|
3133
|
-
const
|
|
3134
|
-
if (S.target === p &&
|
|
3133
|
+
const D = document.activeElement, R = S.shiftKey;
|
|
3134
|
+
if (S.target === p && R) {
|
|
3135
3135
|
(x = c.current) == null || x.focus();
|
|
3136
3136
|
return;
|
|
3137
3137
|
}
|
|
3138
|
-
const I = w({ tabbingDirection:
|
|
3139
|
-
En(I.slice(U + 1)) ? S.preventDefault() :
|
|
3138
|
+
const I = w({ tabbingDirection: R ? "backwards" : "forwards" }), U = I.findIndex((_) => _ === D);
|
|
3139
|
+
En(I.slice(U + 1)) ? S.preventDefault() : R ? (N = c.current) == null || N.focus() : (C = h.current) == null || C.focus();
|
|
3140
3140
|
}
|
|
3141
3141
|
};
|
|
3142
3142
|
return p.addEventListener("keydown", v), () => p.removeEventListener("keydown", v);
|
|
@@ -3162,11 +3162,11 @@ var Gr = "ToastViewport", tf = ["F8"], zn = "toast.viewportPause", Fn = "toast.v
|
|
|
3162
3162
|
}
|
|
3163
3163
|
}
|
|
3164
3164
|
),
|
|
3165
|
-
/* @__PURE__ */ u.jsx(oa.Slot, { scope: n, children: /* @__PURE__ */ u.jsx(ne.ol, { tabIndex: -1, ...o, ref:
|
|
3165
|
+
/* @__PURE__ */ u.jsx(oa.Slot, { scope: n, children: /* @__PURE__ */ u.jsx(ne.ol, { tabIndex: -1, ...o, ref: m }) }),
|
|
3166
3166
|
b && /* @__PURE__ */ u.jsx(
|
|
3167
3167
|
$n,
|
|
3168
3168
|
{
|
|
3169
|
-
ref:
|
|
3169
|
+
ref: h,
|
|
3170
3170
|
onFocusFromOutsideViewport: () => {
|
|
3171
3171
|
const p = w({
|
|
3172
3172
|
tabbingDirection: "backwards"
|
|
@@ -3181,7 +3181,7 @@ var Gr = "ToastViewport", tf = ["F8"], zn = "toast.viewportPause", Fn = "toast.v
|
|
|
3181
3181
|
}
|
|
3182
3182
|
);
|
|
3183
3183
|
Kr.displayName = Gr;
|
|
3184
|
-
var Ur = "ToastFocusProxy", $n =
|
|
3184
|
+
var Ur = "ToastFocusProxy", $n = d.forwardRef(
|
|
3185
3185
|
(e, t) => {
|
|
3186
3186
|
const { __scopeToast: n, onFocusFromOutsideViewport: a, ...r } = e, o = on(Ur, n);
|
|
3187
3187
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -3202,7 +3202,7 @@ var Ur = "ToastFocusProxy", $n = f.forwardRef(
|
|
|
3202
3202
|
}
|
|
3203
3203
|
);
|
|
3204
3204
|
$n.displayName = Ur;
|
|
3205
|
-
var sn = "Toast", nf = "toast.swipeStart", af = "toast.swipeMove", rf = "toast.swipeCancel", of = "toast.swipeEnd", qr =
|
|
3205
|
+
var sn = "Toast", nf = "toast.swipeStart", af = "toast.swipeMove", rf = "toast.swipeCancel", of = "toast.swipeEnd", qr = d.forwardRef(
|
|
3206
3206
|
(e, t) => {
|
|
3207
3207
|
const { forceMount: n, open: a, defaultOpen: r, onOpenChange: o, ...i } = e, [s = !0, l] = It({
|
|
3208
3208
|
prop: a,
|
|
@@ -3222,15 +3222,15 @@ var sn = "Toast", nf = "toast.swipeStart", af = "toast.swipeMove", rf = "toast.s
|
|
|
3222
3222
|
c.currentTarget.setAttribute("data-swipe", "start");
|
|
3223
3223
|
}),
|
|
3224
3224
|
onSwipeMove: F(e.onSwipeMove, (c) => {
|
|
3225
|
-
const { x:
|
|
3226
|
-
c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${
|
|
3225
|
+
const { x: h, y: f } = c.detail.delta;
|
|
3226
|
+
c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${h}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${f}px`);
|
|
3227
3227
|
}),
|
|
3228
3228
|
onSwipeCancel: F(e.onSwipeCancel, (c) => {
|
|
3229
3229
|
c.currentTarget.setAttribute("data-swipe", "cancel"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
3230
3230
|
}),
|
|
3231
3231
|
onSwipeEnd: F(e.onSwipeEnd, (c) => {
|
|
3232
|
-
const { x:
|
|
3233
|
-
c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${
|
|
3232
|
+
const { x: h, y: f } = c.detail.delta;
|
|
3233
|
+
c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${h}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${f}px`), l(!1);
|
|
3234
3234
|
})
|
|
3235
3235
|
}
|
|
3236
3236
|
) });
|
|
@@ -3240,7 +3240,7 @@ qr.displayName = sn;
|
|
|
3240
3240
|
var [sf, lf] = Yr(sn, {
|
|
3241
3241
|
onClose() {
|
|
3242
3242
|
}
|
|
3243
|
-
}), cf =
|
|
3243
|
+
}), cf = d.forwardRef(
|
|
3244
3244
|
(e, t) => {
|
|
3245
3245
|
const {
|
|
3246
3246
|
__scopeToast: n,
|
|
@@ -3251,37 +3251,37 @@ var [sf, lf] = Yr(sn, {
|
|
|
3251
3251
|
onEscapeKeyDown: s,
|
|
3252
3252
|
onPause: l,
|
|
3253
3253
|
onResume: c,
|
|
3254
|
-
onSwipeStart:
|
|
3255
|
-
onSwipeMove:
|
|
3256
|
-
onSwipeCancel:
|
|
3254
|
+
onSwipeStart: h,
|
|
3255
|
+
onSwipeMove: f,
|
|
3256
|
+
onSwipeCancel: m,
|
|
3257
3257
|
onSwipeEnd: g,
|
|
3258
3258
|
...b
|
|
3259
|
-
} = e, w = on(sn, n), [p, v] =
|
|
3259
|
+
} = e, w = on(sn, n), [p, v] = d.useState(null), S = he(t, (_) => v(_)), y = d.useRef(null), M = d.useRef(null), x = r || w.duration, N = d.useRef(0), C = d.useRef(x), D = d.useRef(0), { onToastAdd: R, onToastRemove: j } = w, k = Se(() => {
|
|
3260
3260
|
var H;
|
|
3261
3261
|
(p == null ? void 0 : p.contains(document.activeElement)) && ((H = w.viewport) == null || H.focus()), i();
|
|
3262
|
-
}), I =
|
|
3263
|
-
(
|
|
3264
|
-
!
|
|
3262
|
+
}), I = d.useCallback(
|
|
3263
|
+
(_) => {
|
|
3264
|
+
!_ || _ === 1 / 0 || (window.clearTimeout(D.current), N.current = (/* @__PURE__ */ new Date()).getTime(), D.current = window.setTimeout(k, _));
|
|
3265
3265
|
},
|
|
3266
|
-
[
|
|
3266
|
+
[k]
|
|
3267
3267
|
);
|
|
3268
|
-
|
|
3269
|
-
const
|
|
3270
|
-
if (
|
|
3268
|
+
d.useEffect(() => {
|
|
3269
|
+
const _ = w.viewport;
|
|
3270
|
+
if (_) {
|
|
3271
3271
|
const H = () => {
|
|
3272
|
-
I(
|
|
3272
|
+
I(C.current), c == null || c();
|
|
3273
3273
|
}, z = () => {
|
|
3274
3274
|
const se = (/* @__PURE__ */ new Date()).getTime() - N.current;
|
|
3275
|
-
|
|
3275
|
+
C.current = C.current - se, window.clearTimeout(D.current), l == null || l();
|
|
3276
3276
|
};
|
|
3277
|
-
return
|
|
3278
|
-
|
|
3277
|
+
return _.addEventListener(zn, z), _.addEventListener(Fn, H), () => {
|
|
3278
|
+
_.removeEventListener(zn, z), _.removeEventListener(Fn, H);
|
|
3279
3279
|
};
|
|
3280
3280
|
}
|
|
3281
|
-
}, [w.viewport, x, l, c, I]),
|
|
3281
|
+
}, [w.viewport, x, l, c, I]), d.useEffect(() => {
|
|
3282
3282
|
o && !w.isClosePausedRef.current && I(x);
|
|
3283
|
-
}, [o, x, w.isClosePausedRef, I]),
|
|
3284
|
-
const U =
|
|
3283
|
+
}, [o, x, w.isClosePausedRef, I]), d.useEffect(() => (R(), () => j()), [R, j]);
|
|
3284
|
+
const U = d.useMemo(() => p ? no(p) : null, [p]);
|
|
3285
3285
|
return w.viewport ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
3286
3286
|
U && /* @__PURE__ */ u.jsx(
|
|
3287
3287
|
uf,
|
|
@@ -3293,13 +3293,13 @@ var [sf, lf] = Yr(sn, {
|
|
|
3293
3293
|
children: U
|
|
3294
3294
|
}
|
|
3295
3295
|
),
|
|
3296
|
-
/* @__PURE__ */ u.jsx(sf, { scope: n, onClose:
|
|
3296
|
+
/* @__PURE__ */ u.jsx(sf, { scope: n, onClose: k, children: Hl.createPortal(
|
|
3297
3297
|
/* @__PURE__ */ u.jsx(oa.ItemSlot, { scope: n, children: /* @__PURE__ */ u.jsx(
|
|
3298
3298
|
ml,
|
|
3299
3299
|
{
|
|
3300
3300
|
asChild: !0,
|
|
3301
3301
|
onEscapeKeyDown: F(s, () => {
|
|
3302
|
-
w.isFocusedToastEscapeKeyDownRef.current ||
|
|
3302
|
+
w.isFocusedToastEscapeKeyDownRef.current || k(), w.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
3303
3303
|
}),
|
|
3304
3304
|
children: /* @__PURE__ */ u.jsx(
|
|
3305
3305
|
ne.li,
|
|
@@ -3313,30 +3313,30 @@ var [sf, lf] = Yr(sn, {
|
|
|
3313
3313
|
...b,
|
|
3314
3314
|
ref: S,
|
|
3315
3315
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
3316
|
-
onKeyDown: F(e.onKeyDown, (
|
|
3317
|
-
|
|
3316
|
+
onKeyDown: F(e.onKeyDown, (_) => {
|
|
3317
|
+
_.key === "Escape" && (s == null || s(_.nativeEvent), _.nativeEvent.defaultPrevented || (w.isFocusedToastEscapeKeyDownRef.current = !0, k()));
|
|
3318
3318
|
}),
|
|
3319
|
-
onPointerDown: F(e.onPointerDown, (
|
|
3320
|
-
|
|
3319
|
+
onPointerDown: F(e.onPointerDown, (_) => {
|
|
3320
|
+
_.button === 0 && (y.current = { x: _.clientX, y: _.clientY });
|
|
3321
3321
|
}),
|
|
3322
|
-
onPointerMove: F(e.onPointerMove, (
|
|
3322
|
+
onPointerMove: F(e.onPointerMove, (_) => {
|
|
3323
3323
|
if (!y.current) return;
|
|
3324
|
-
const H =
|
|
3325
|
-
se ? (
|
|
3324
|
+
const H = _.clientX - y.current.x, z = _.clientY - y.current.y, se = !!M.current, K = ["left", "right"].includes(w.swipeDirection), ae = ["left", "up"].includes(w.swipeDirection) ? Math.min : Math.max, ce = K ? ae(0, H) : 0, Oe = K ? 0 : ae(0, z), ue = _.pointerType === "touch" ? 10 : 2, T = { x: ce, y: Oe }, A = { originalEvent: _, delta: T };
|
|
3325
|
+
se ? (M.current = T, Bt(af, f, A, {
|
|
3326
3326
|
discrete: !1
|
|
3327
|
-
})) : Ba(
|
|
3327
|
+
})) : Ba(T, w.swipeDirection, ue) ? (M.current = T, Bt(nf, h, A, {
|
|
3328
3328
|
discrete: !1
|
|
3329
|
-
}),
|
|
3329
|
+
}), _.target.setPointerCapture(_.pointerId)) : (Math.abs(H) > ue || Math.abs(z) > ue) && (y.current = null);
|
|
3330
3330
|
}),
|
|
3331
|
-
onPointerUp: F(e.onPointerUp, (
|
|
3332
|
-
const H =
|
|
3333
|
-
if (z.hasPointerCapture(
|
|
3334
|
-
const se =
|
|
3331
|
+
onPointerUp: F(e.onPointerUp, (_) => {
|
|
3332
|
+
const H = M.current, z = _.target;
|
|
3333
|
+
if (z.hasPointerCapture(_.pointerId) && z.releasePointerCapture(_.pointerId), M.current = null, y.current = null, H) {
|
|
3334
|
+
const se = _.currentTarget, K = { originalEvent: _, delta: H };
|
|
3335
3335
|
Ba(H, w.swipeDirection, w.swipeThreshold) ? Bt(of, g, K, {
|
|
3336
3336
|
discrete: !0
|
|
3337
3337
|
}) : Bt(
|
|
3338
3338
|
rf,
|
|
3339
|
-
|
|
3339
|
+
m,
|
|
3340
3340
|
K,
|
|
3341
3341
|
{
|
|
3342
3342
|
discrete: !0
|
|
@@ -3355,8 +3355,8 @@ var [sf, lf] = Yr(sn, {
|
|
|
3355
3355
|
] }) : null;
|
|
3356
3356
|
}
|
|
3357
3357
|
), uf = (e) => {
|
|
3358
|
-
const { __scopeToast: t, children: n, ...a } = e, r = on(sn, t), [o, i] =
|
|
3359
|
-
return mf(() => i(!0)),
|
|
3358
|
+
const { __scopeToast: t, children: n, ...a } = e, r = on(sn, t), [o, i] = d.useState(!1), [s, l] = d.useState(!1);
|
|
3359
|
+
return mf(() => i(!0)), d.useEffect(() => {
|
|
3360
3360
|
const c = window.setTimeout(() => l(!0), 1e3);
|
|
3361
3361
|
return () => window.clearTimeout(c);
|
|
3362
3362
|
}, []), s ? null : /* @__PURE__ */ u.jsx(hl, { asChild: !0, children: /* @__PURE__ */ u.jsx(rr, { ...a, children: o && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
@@ -3364,21 +3364,21 @@ var [sf, lf] = Yr(sn, {
|
|
|
3364
3364
|
" ",
|
|
3365
3365
|
n
|
|
3366
3366
|
] }) }) });
|
|
3367
|
-
}, df = "ToastTitle", Xr =
|
|
3367
|
+
}, df = "ToastTitle", Xr = d.forwardRef(
|
|
3368
3368
|
(e, t) => {
|
|
3369
3369
|
const { __scopeToast: n, ...a } = e;
|
|
3370
3370
|
return /* @__PURE__ */ u.jsx(ne.div, { ...a, ref: t });
|
|
3371
3371
|
}
|
|
3372
3372
|
);
|
|
3373
3373
|
Xr.displayName = df;
|
|
3374
|
-
var ff = "ToastDescription", Zr =
|
|
3374
|
+
var ff = "ToastDescription", Zr = d.forwardRef(
|
|
3375
3375
|
(e, t) => {
|
|
3376
3376
|
const { __scopeToast: n, ...a } = e;
|
|
3377
3377
|
return /* @__PURE__ */ u.jsx(ne.div, { ...a, ref: t });
|
|
3378
3378
|
}
|
|
3379
3379
|
);
|
|
3380
3380
|
Zr.displayName = ff;
|
|
3381
|
-
var Qr = "ToastAction", Jr =
|
|
3381
|
+
var Qr = "ToastAction", Jr = d.forwardRef(
|
|
3382
3382
|
(e, t) => {
|
|
3383
3383
|
const { altText: n, ...a } = e;
|
|
3384
3384
|
return n.trim() ? /* @__PURE__ */ u.jsx(to, { altText: n, asChild: !0, children: /* @__PURE__ */ u.jsx(sa, { ...a, ref: t }) }) : (console.error(
|
|
@@ -3387,7 +3387,7 @@ var Qr = "ToastAction", Jr = f.forwardRef(
|
|
|
3387
3387
|
}
|
|
3388
3388
|
);
|
|
3389
3389
|
Jr.displayName = Qr;
|
|
3390
|
-
var eo = "ToastClose", sa =
|
|
3390
|
+
var eo = "ToastClose", sa = d.forwardRef(
|
|
3391
3391
|
(e, t) => {
|
|
3392
3392
|
const { __scopeToast: n, ...a } = e, r = lf(eo, n);
|
|
3393
3393
|
return /* @__PURE__ */ u.jsx(to, { asChild: !0, children: /* @__PURE__ */ u.jsx(
|
|
@@ -3402,7 +3402,7 @@ var eo = "ToastClose", sa = f.forwardRef(
|
|
|
3402
3402
|
}
|
|
3403
3403
|
);
|
|
3404
3404
|
sa.displayName = eo;
|
|
3405
|
-
var to =
|
|
3405
|
+
var to = d.forwardRef((e, t) => {
|
|
3406
3406
|
const { __scopeToast: n, altText: a, ...r } = e;
|
|
3407
3407
|
return /* @__PURE__ */ u.jsx(
|
|
3408
3408
|
ne.div,
|
|
@@ -3464,7 +3464,7 @@ function En(e) {
|
|
|
3464
3464
|
return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
|
|
3465
3465
|
}
|
|
3466
3466
|
var gf = Vr, ao = Kr, ro = qr, oo = Xr, so = Zr, io = Jr, lo = sa;
|
|
3467
|
-
const bf = gf, co =
|
|
3467
|
+
const bf = gf, co = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3468
3468
|
ao,
|
|
3469
3469
|
{
|
|
3470
3470
|
ref: n,
|
|
@@ -3491,7 +3491,7 @@ const vf = ft(
|
|
|
3491
3491
|
variant: "default"
|
|
3492
3492
|
}
|
|
3493
3493
|
}
|
|
3494
|
-
), uo =
|
|
3494
|
+
), uo = d.forwardRef(({ className: e, variant: t, ...n }, a) => /* @__PURE__ */ u.jsx(
|
|
3495
3495
|
ro,
|
|
3496
3496
|
{
|
|
3497
3497
|
ref: a,
|
|
@@ -3502,7 +3502,7 @@ const vf = ft(
|
|
|
3502
3502
|
}
|
|
3503
3503
|
));
|
|
3504
3504
|
uo.displayName = ro.displayName;
|
|
3505
|
-
const wf =
|
|
3505
|
+
const wf = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3506
3506
|
io,
|
|
3507
3507
|
{
|
|
3508
3508
|
ref: n,
|
|
@@ -3515,7 +3515,7 @@ const wf = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
3515
3515
|
}
|
|
3516
3516
|
));
|
|
3517
3517
|
wf.displayName = io.displayName;
|
|
3518
|
-
const fo =
|
|
3518
|
+
const fo = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3519
3519
|
lo,
|
|
3520
3520
|
{
|
|
3521
3521
|
ref: n,
|
|
@@ -3531,7 +3531,7 @@ const fo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
3531
3531
|
}
|
|
3532
3532
|
));
|
|
3533
3533
|
fo.displayName = lo.displayName;
|
|
3534
|
-
const mo =
|
|
3534
|
+
const mo = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3535
3535
|
oo,
|
|
3536
3536
|
{
|
|
3537
3537
|
ref: n,
|
|
@@ -3542,7 +3542,7 @@ const mo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
3542
3542
|
}
|
|
3543
3543
|
));
|
|
3544
3544
|
mo.displayName = oo.displayName;
|
|
3545
|
-
const ho =
|
|
3545
|
+
const ho = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3546
3546
|
so,
|
|
3547
3547
|
{
|
|
3548
3548
|
ref: n,
|
|
@@ -3568,7 +3568,7 @@ function cg() {
|
|
|
3568
3568
|
/* @__PURE__ */ u.jsx(co, {})
|
|
3569
3569
|
] });
|
|
3570
3570
|
}
|
|
3571
|
-
var ia = "Progress", la = 100, [yf, ug] = Qe(ia), [xf, Sf] = yf(ia), po =
|
|
3571
|
+
var ia = "Progress", la = 100, [yf, ug] = Qe(ia), [xf, Sf] = yf(ia), po = d.forwardRef(
|
|
3572
3572
|
(e, t) => {
|
|
3573
3573
|
const {
|
|
3574
3574
|
__scopeProgress: n,
|
|
@@ -3599,7 +3599,7 @@ var ia = "Progress", la = 100, [yf, ug] = Qe(ia), [xf, Sf] = yf(ia), po = f.forw
|
|
|
3599
3599
|
}
|
|
3600
3600
|
);
|
|
3601
3601
|
po.displayName = ia;
|
|
3602
|
-
var go = "ProgressIndicator", bo =
|
|
3602
|
+
var go = "ProgressIndicator", bo = d.forwardRef(
|
|
3603
3603
|
(e, t) => {
|
|
3604
3604
|
const { __scopeProgress: n, ...a } = e, r = Sf(go, n);
|
|
3605
3605
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -3642,7 +3642,7 @@ function Nf(e, t) {
|
|
|
3642
3642
|
Defaulting to \`null\`.`;
|
|
3643
3643
|
}
|
|
3644
3644
|
var wo = po, Pf = bo;
|
|
3645
|
-
const Df =
|
|
3645
|
+
const Df = d.forwardRef(({ className: e, value: t, ...n }, a) => {
|
|
3646
3646
|
const r = t ?? 0, o = 100 - r;
|
|
3647
3647
|
return /* @__PURE__ */ u.jsx(
|
|
3648
3648
|
wo,
|
|
@@ -3671,15 +3671,15 @@ const Df = f.forwardRef(({ className: e, value: t, ...n }, a) => {
|
|
|
3671
3671
|
Df.displayName = wo.displayName;
|
|
3672
3672
|
const Rn = 768;
|
|
3673
3673
|
function Tf() {
|
|
3674
|
-
const [e, t] =
|
|
3675
|
-
return
|
|
3674
|
+
const [e, t] = d.useState(void 0);
|
|
3675
|
+
return d.useEffect(() => {
|
|
3676
3676
|
const n = window.matchMedia(`(max-width: ${Rn - 1}px)`), a = () => {
|
|
3677
3677
|
t(window.innerWidth < Rn);
|
|
3678
3678
|
};
|
|
3679
3679
|
return n.addEventListener("change", a), t(window.innerWidth < Rn), () => n.removeEventListener("change", a);
|
|
3680
3680
|
}, []), !!e;
|
|
3681
3681
|
}
|
|
3682
|
-
var Ef = "Separator", Va = "horizontal", Rf = ["horizontal", "vertical"], yo =
|
|
3682
|
+
var Ef = "Separator", Va = "horizontal", Rf = ["horizontal", "vertical"], yo = d.forwardRef((e, t) => {
|
|
3683
3683
|
const { decorative: n, orientation: a = Va, ...r } = e, o = kf(a) ? a : Va, s = n ? { role: "none" } : { "aria-orientation": o === "vertical" ? o : void 0, role: "separator" };
|
|
3684
3684
|
return /* @__PURE__ */ u.jsx(
|
|
3685
3685
|
ne.div,
|
|
@@ -3696,7 +3696,7 @@ function kf(e) {
|
|
|
3696
3696
|
return Rf.includes(e);
|
|
3697
3697
|
}
|
|
3698
3698
|
var xo = yo;
|
|
3699
|
-
const So =
|
|
3699
|
+
const So = d.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...a }, r) => /* @__PURE__ */ u.jsx(
|
|
3700
3700
|
xo,
|
|
3701
3701
|
{
|
|
3702
3702
|
ref: r,
|
|
@@ -3714,69 +3714,97 @@ So.displayName = xo.displayName;
|
|
|
3714
3714
|
function Ga({ className: e, ...t }) {
|
|
3715
3715
|
return /* @__PURE__ */ u.jsx("div", { className: P("al-animate-pulse al-rounded-md al-bg-muted", e), ...t });
|
|
3716
3716
|
}
|
|
3717
|
-
const _f = "sidebar:state", Of = 60 * 60 * 24 * 7, If = "16rem", Af = "18rem", jf = "3rem", Wf = "b", Mo =
|
|
3717
|
+
const _f = "sidebar:state", Of = 60 * 60 * 24 * 7, If = "16rem", Af = "18rem", jf = "3rem", Wf = "b", Mo = d.createContext(null);
|
|
3718
3718
|
function ln() {
|
|
3719
|
-
const e =
|
|
3719
|
+
const e = d.useContext(Mo);
|
|
3720
3720
|
if (!e)
|
|
3721
3721
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
3722
3722
|
return e;
|
|
3723
3723
|
}
|
|
3724
|
-
const Lf =
|
|
3724
|
+
const Lf = d.forwardRef(
|
|
3725
3725
|
({
|
|
3726
3726
|
defaultOpen: e = !0,
|
|
3727
3727
|
open: t,
|
|
3728
3728
|
onOpenChange: n,
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3729
|
+
expandOnHover: a = !1,
|
|
3730
|
+
overlayOnHover: r = !1,
|
|
3731
|
+
className: o,
|
|
3732
|
+
style: i,
|
|
3733
|
+
children: s,
|
|
3734
|
+
...l
|
|
3735
|
+
}, c) => {
|
|
3736
|
+
const h = Tf(), [f, m] = d.useState(!1), [g, b] = d.useState(!1), w = d.useRef(!1), [p, v] = d.useState(e), S = t ?? p, y = d.useCallback(
|
|
3737
|
+
(D) => {
|
|
3738
|
+
const R = typeof D == "function" ? D(S) : D;
|
|
3739
|
+
n ? n(R) : v(R), document.cookie = `${_f}=${R}; path=/; max-age=${Of}`;
|
|
3738
3740
|
},
|
|
3739
|
-
[n,
|
|
3740
|
-
),
|
|
3741
|
-
|
|
3742
|
-
const
|
|
3743
|
-
|
|
3741
|
+
[n, S]
|
|
3742
|
+
), M = d.useCallback(() => h ? m((D) => !D) : y((D) => !D), [h, y, m]);
|
|
3743
|
+
d.useEffect(() => {
|
|
3744
|
+
const D = (R) => {
|
|
3745
|
+
R.key === Wf && (R.metaKey || R.ctrlKey) && (R.preventDefault(), M());
|
|
3744
3746
|
};
|
|
3745
|
-
return window.addEventListener("keydown",
|
|
3746
|
-
}, [
|
|
3747
|
-
|
|
3747
|
+
return window.addEventListener("keydown", D), () => window.removeEventListener("keydown", D);
|
|
3748
|
+
}, [M]), d.useEffect(() => {
|
|
3749
|
+
if (!S) {
|
|
3750
|
+
w.current = !0, b(!1);
|
|
3751
|
+
const D = setTimeout(() => {
|
|
3752
|
+
w.current = !1;
|
|
3753
|
+
}, 500);
|
|
3754
|
+
return () => clearTimeout(D);
|
|
3755
|
+
}
|
|
3756
|
+
}, [S]);
|
|
3757
|
+
const x = S || a && g, N = x ? "expanded" : "collapsed", C = d.useMemo(
|
|
3748
3758
|
() => ({
|
|
3749
|
-
state:
|
|
3750
|
-
open:
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3759
|
+
state: N,
|
|
3760
|
+
open: x,
|
|
3761
|
+
baseOpen: S,
|
|
3762
|
+
setOpen: y,
|
|
3763
|
+
isMobile: h,
|
|
3764
|
+
openMobile: f,
|
|
3754
3765
|
setOpenMobile: m,
|
|
3755
|
-
toggleSidebar:
|
|
3766
|
+
toggleSidebar: M,
|
|
3767
|
+
expandOnHover: a,
|
|
3768
|
+
isHovered: g,
|
|
3769
|
+
setIsHovered: b,
|
|
3770
|
+
overlayOnHover: r,
|
|
3771
|
+
isManualCloseRef: w
|
|
3756
3772
|
}),
|
|
3757
|
-
[
|
|
3773
|
+
[
|
|
3774
|
+
N,
|
|
3775
|
+
x,
|
|
3776
|
+
S,
|
|
3777
|
+
y,
|
|
3778
|
+
h,
|
|
3779
|
+
f,
|
|
3780
|
+
m,
|
|
3781
|
+
M,
|
|
3782
|
+
a,
|
|
3783
|
+
g,
|
|
3784
|
+
r
|
|
3785
|
+
]
|
|
3758
3786
|
);
|
|
3759
|
-
return /* @__PURE__ */ u.jsx(Mo.Provider, { value:
|
|
3787
|
+
return /* @__PURE__ */ u.jsx(Mo.Provider, { value: C, children: /* @__PURE__ */ u.jsx(gl, { delayDuration: 0, children: /* @__PURE__ */ u.jsx(
|
|
3760
3788
|
"div",
|
|
3761
3789
|
{
|
|
3762
3790
|
style: {
|
|
3763
3791
|
"--sidebar-width": If,
|
|
3764
3792
|
"--sidebar-width-icon": jf,
|
|
3765
|
-
...
|
|
3793
|
+
...i
|
|
3766
3794
|
},
|
|
3767
3795
|
className: P(
|
|
3768
3796
|
"al-group/sidebar-wrapper al-flex al-min-h-svh al-w-full has-[[data-variant=inset]]:al-bg-sidebar",
|
|
3769
|
-
|
|
3797
|
+
o
|
|
3770
3798
|
),
|
|
3771
|
-
ref:
|
|
3772
|
-
...
|
|
3773
|
-
children:
|
|
3799
|
+
ref: c,
|
|
3800
|
+
...l,
|
|
3801
|
+
children: s
|
|
3774
3802
|
}
|
|
3775
3803
|
) }) });
|
|
3776
3804
|
}
|
|
3777
3805
|
);
|
|
3778
3806
|
Lf.displayName = "SidebarProvider";
|
|
3779
|
-
const zf =
|
|
3807
|
+
const zf = d.forwardRef(
|
|
3780
3808
|
({
|
|
3781
3809
|
side: e = "left",
|
|
3782
3810
|
variant: t = "sidebar",
|
|
@@ -3785,8 +3813,27 @@ const zf = f.forwardRef(
|
|
|
3785
3813
|
children: r,
|
|
3786
3814
|
...o
|
|
3787
3815
|
}, i) => {
|
|
3788
|
-
const {
|
|
3789
|
-
|
|
3816
|
+
const {
|
|
3817
|
+
isMobile: s,
|
|
3818
|
+
state: l,
|
|
3819
|
+
baseOpen: c,
|
|
3820
|
+
openMobile: h,
|
|
3821
|
+
setOpenMobile: f,
|
|
3822
|
+
expandOnHover: m,
|
|
3823
|
+
setIsHovered: g,
|
|
3824
|
+
overlayOnHover: b,
|
|
3825
|
+
isHovered: w,
|
|
3826
|
+
isManualCloseRef: p
|
|
3827
|
+
} = ln(), v = d.useRef(null), S = d.useCallback(() => {
|
|
3828
|
+
!m || c || p.current || (v.current && (clearTimeout(v.current), v.current = null), g(!0));
|
|
3829
|
+
}, [m, g, c, p]), y = d.useCallback(() => {
|
|
3830
|
+
!m || c || (v.current = setTimeout(() => {
|
|
3831
|
+
g(!1);
|
|
3832
|
+
}, 300));
|
|
3833
|
+
}, [m, g, c]);
|
|
3834
|
+
return d.useEffect(() => () => {
|
|
3835
|
+
v.current && clearTimeout(v.current);
|
|
3836
|
+
}, []), n === "none" ? /* @__PURE__ */ u.jsx(
|
|
3790
3837
|
"div",
|
|
3791
3838
|
{
|
|
3792
3839
|
className: P(
|
|
@@ -3797,7 +3844,7 @@ const zf = f.forwardRef(
|
|
|
3797
3844
|
...o,
|
|
3798
3845
|
children: r
|
|
3799
3846
|
}
|
|
3800
|
-
) : s ? /* @__PURE__ */ u.jsx(Hi, { open:
|
|
3847
|
+
) : s ? /* @__PURE__ */ u.jsx(Hi, { open: h, onOpenChange: f, ...o, children: /* @__PURE__ */ u.jsx(
|
|
3801
3848
|
Yi,
|
|
3802
3849
|
{
|
|
3803
3850
|
"data-sidebar": "sidebar",
|
|
@@ -3818,6 +3865,8 @@ const zf = f.forwardRef(
|
|
|
3818
3865
|
"data-collapsible": l === "collapsed" ? n : "",
|
|
3819
3866
|
"data-variant": t,
|
|
3820
3867
|
"data-side": e,
|
|
3868
|
+
onMouseEnter: S,
|
|
3869
|
+
onMouseLeave: y,
|
|
3821
3870
|
children: [
|
|
3822
3871
|
/* @__PURE__ */ u.jsx(
|
|
3823
3872
|
"div",
|
|
@@ -3827,7 +3876,10 @@ const zf = f.forwardRef(
|
|
|
3827
3876
|
"group-data-[collapsible=offcanvas]:al-w-0",
|
|
3828
3877
|
"group-data-[side=right]:al-rotate-180",
|
|
3829
3878
|
t === "floating" || t === "inset" ? "group-data-[collapsible=icon]:al-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:al-w-[--sidebar-width-icon]"
|
|
3830
|
-
)
|
|
3879
|
+
),
|
|
3880
|
+
style: b && w && !c && l === "expanded" ? {
|
|
3881
|
+
width: t === "floating" || t === "inset" ? "calc(var(--sidebar-width-icon) + 1rem)" : "var(--sidebar-width-icon)"
|
|
3882
|
+
} : void 0
|
|
3831
3883
|
}
|
|
3832
3884
|
),
|
|
3833
3885
|
/* @__PURE__ */ u.jsx(
|
|
@@ -3857,7 +3909,7 @@ const zf = f.forwardRef(
|
|
|
3857
3909
|
}
|
|
3858
3910
|
);
|
|
3859
3911
|
zf.displayName = "Sidebar";
|
|
3860
|
-
const Ff =
|
|
3912
|
+
const Ff = d.forwardRef(({ className: e, onClick: t, ...n }, a) => {
|
|
3861
3913
|
const { toggleSidebar: r } = ln();
|
|
3862
3914
|
return /* @__PURE__ */ u.jsxs(
|
|
3863
3915
|
Ue,
|
|
@@ -3879,7 +3931,7 @@ const Ff = f.forwardRef(({ className: e, onClick: t, ...n }, a) => {
|
|
|
3879
3931
|
);
|
|
3880
3932
|
});
|
|
3881
3933
|
Ff.displayName = "SidebarTrigger";
|
|
3882
|
-
const $f =
|
|
3934
|
+
const $f = d.forwardRef(
|
|
3883
3935
|
({ className: e, ...t }, n) => {
|
|
3884
3936
|
const { toggleSidebar: a } = ln();
|
|
3885
3937
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -3906,7 +3958,7 @@ const $f = f.forwardRef(
|
|
|
3906
3958
|
}
|
|
3907
3959
|
);
|
|
3908
3960
|
$f.displayName = "SidebarRail";
|
|
3909
|
-
const Bf =
|
|
3961
|
+
const Bf = d.forwardRef(
|
|
3910
3962
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3911
3963
|
"main",
|
|
3912
3964
|
{
|
|
@@ -3921,7 +3973,7 @@ const Bf = f.forwardRef(
|
|
|
3921
3973
|
)
|
|
3922
3974
|
);
|
|
3923
3975
|
Bf.displayName = "SidebarInset";
|
|
3924
|
-
const Hf =
|
|
3976
|
+
const Hf = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3925
3977
|
bl,
|
|
3926
3978
|
{
|
|
3927
3979
|
ref: n,
|
|
@@ -3934,7 +3986,7 @@ const Hf = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
3934
3986
|
}
|
|
3935
3987
|
));
|
|
3936
3988
|
Hf.displayName = "SidebarInput";
|
|
3937
|
-
const Yf =
|
|
3989
|
+
const Yf = d.forwardRef(
|
|
3938
3990
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3939
3991
|
"div",
|
|
3940
3992
|
{
|
|
@@ -3946,7 +3998,7 @@ const Yf = f.forwardRef(
|
|
|
3946
3998
|
)
|
|
3947
3999
|
);
|
|
3948
4000
|
Yf.displayName = "SidebarHeader";
|
|
3949
|
-
const Vf =
|
|
4001
|
+
const Vf = d.forwardRef(
|
|
3950
4002
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3951
4003
|
"div",
|
|
3952
4004
|
{
|
|
@@ -3958,7 +4010,7 @@ const Vf = f.forwardRef(
|
|
|
3958
4010
|
)
|
|
3959
4011
|
);
|
|
3960
4012
|
Vf.displayName = "SidebarFooter";
|
|
3961
|
-
const Gf =
|
|
4013
|
+
const Gf = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3962
4014
|
So,
|
|
3963
4015
|
{
|
|
3964
4016
|
ref: n,
|
|
@@ -3968,7 +4020,7 @@ const Gf = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
3968
4020
|
}
|
|
3969
4021
|
));
|
|
3970
4022
|
Gf.displayName = "SidebarSeparator";
|
|
3971
|
-
const Kf =
|
|
4023
|
+
const Kf = d.forwardRef(
|
|
3972
4024
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3973
4025
|
"div",
|
|
3974
4026
|
{
|
|
@@ -3983,7 +4035,7 @@ const Kf = f.forwardRef(
|
|
|
3983
4035
|
)
|
|
3984
4036
|
);
|
|
3985
4037
|
Kf.displayName = "SidebarContent";
|
|
3986
|
-
const Uf =
|
|
4038
|
+
const Uf = d.forwardRef(
|
|
3987
4039
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
3988
4040
|
"div",
|
|
3989
4041
|
{
|
|
@@ -3995,7 +4047,7 @@ const Uf = f.forwardRef(
|
|
|
3995
4047
|
)
|
|
3996
4048
|
);
|
|
3997
4049
|
Uf.displayName = "SidebarGroup";
|
|
3998
|
-
const qf =
|
|
4050
|
+
const qf = d.forwardRef(({ className: e, asChild: t = !1, ...n }, a) => {
|
|
3999
4051
|
const r = t ? mt : "div";
|
|
4000
4052
|
return /* @__PURE__ */ u.jsx(
|
|
4001
4053
|
r,
|
|
@@ -4012,7 +4064,7 @@ const qf = f.forwardRef(({ className: e, asChild: t = !1, ...n }, a) => {
|
|
|
4012
4064
|
);
|
|
4013
4065
|
});
|
|
4014
4066
|
qf.displayName = "SidebarGroupLabel";
|
|
4015
|
-
const Xf =
|
|
4067
|
+
const Xf = d.forwardRef(({ className: e, asChild: t = !1, ...n }, a) => {
|
|
4016
4068
|
const r = t ? mt : "button";
|
|
4017
4069
|
return /* @__PURE__ */ u.jsx(
|
|
4018
4070
|
r,
|
|
@@ -4031,7 +4083,7 @@ const Xf = f.forwardRef(({ className: e, asChild: t = !1, ...n }, a) => {
|
|
|
4031
4083
|
);
|
|
4032
4084
|
});
|
|
4033
4085
|
Xf.displayName = "SidebarGroupAction";
|
|
4034
|
-
const Zf =
|
|
4086
|
+
const Zf = d.forwardRef(
|
|
4035
4087
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4036
4088
|
"div",
|
|
4037
4089
|
{
|
|
@@ -4043,7 +4095,7 @@ const Zf = f.forwardRef(
|
|
|
4043
4095
|
)
|
|
4044
4096
|
);
|
|
4045
4097
|
Zf.displayName = "SidebarGroupContent";
|
|
4046
|
-
const Qf =
|
|
4098
|
+
const Qf = d.forwardRef(
|
|
4047
4099
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4048
4100
|
"ul",
|
|
4049
4101
|
{
|
|
@@ -4055,7 +4107,7 @@ const Qf = f.forwardRef(
|
|
|
4055
4107
|
)
|
|
4056
4108
|
);
|
|
4057
4109
|
Qf.displayName = "SidebarMenu";
|
|
4058
|
-
const Jf =
|
|
4110
|
+
const Jf = d.forwardRef(
|
|
4059
4111
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4060
4112
|
"li",
|
|
4061
4113
|
{
|
|
@@ -4086,7 +4138,7 @@ const em = ft(
|
|
|
4086
4138
|
size: "default"
|
|
4087
4139
|
}
|
|
4088
4140
|
}
|
|
4089
|
-
), tm =
|
|
4141
|
+
), tm = d.forwardRef(
|
|
4090
4142
|
({
|
|
4091
4143
|
asChild: e = !1,
|
|
4092
4144
|
isActive: t = !1,
|
|
@@ -4096,7 +4148,7 @@ const em = ft(
|
|
|
4096
4148
|
className: o,
|
|
4097
4149
|
...i
|
|
4098
4150
|
}, s) => {
|
|
4099
|
-
const l = e ? mt : "button", { isMobile: c, state:
|
|
4151
|
+
const l = e ? mt : "button", { isMobile: c, state: h } = ln(), f = /* @__PURE__ */ u.jsx(
|
|
4100
4152
|
l,
|
|
4101
4153
|
{
|
|
4102
4154
|
ref: s,
|
|
@@ -4110,21 +4162,21 @@ const em = ft(
|
|
|
4110
4162
|
return r ? (typeof r == "string" && (r = {
|
|
4111
4163
|
children: r
|
|
4112
4164
|
}), /* @__PURE__ */ u.jsxs(vl, { children: [
|
|
4113
|
-
/* @__PURE__ */ u.jsx(wl, { asChild: !0, children:
|
|
4165
|
+
/* @__PURE__ */ u.jsx(wl, { asChild: !0, children: f }),
|
|
4114
4166
|
/* @__PURE__ */ u.jsx(
|
|
4115
4167
|
yl,
|
|
4116
4168
|
{
|
|
4117
4169
|
side: "right",
|
|
4118
4170
|
align: "center",
|
|
4119
|
-
hidden:
|
|
4171
|
+
hidden: h !== "collapsed" || c,
|
|
4120
4172
|
...r
|
|
4121
4173
|
}
|
|
4122
4174
|
)
|
|
4123
|
-
] })) :
|
|
4175
|
+
] })) : f;
|
|
4124
4176
|
}
|
|
4125
4177
|
);
|
|
4126
4178
|
tm.displayName = "SidebarMenuButton";
|
|
4127
|
-
const nm =
|
|
4179
|
+
const nm = d.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...a }, r) => {
|
|
4128
4180
|
const o = t ? mt : "button";
|
|
4129
4181
|
return /* @__PURE__ */ u.jsx(
|
|
4130
4182
|
o,
|
|
@@ -4147,7 +4199,7 @@ const nm = f.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, .
|
|
|
4147
4199
|
);
|
|
4148
4200
|
});
|
|
4149
4201
|
nm.displayName = "SidebarMenuAction";
|
|
4150
|
-
const am =
|
|
4202
|
+
const am = d.forwardRef(
|
|
4151
4203
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4152
4204
|
"div",
|
|
4153
4205
|
{
|
|
@@ -4167,8 +4219,8 @@ const am = f.forwardRef(
|
|
|
4167
4219
|
)
|
|
4168
4220
|
);
|
|
4169
4221
|
am.displayName = "SidebarMenuBadge";
|
|
4170
|
-
const rm =
|
|
4171
|
-
const r =
|
|
4222
|
+
const rm = d.forwardRef(({ className: e, showIcon: t = !1, ...n }, a) => {
|
|
4223
|
+
const r = d.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
4172
4224
|
return /* @__PURE__ */ u.jsxs(
|
|
4173
4225
|
"div",
|
|
4174
4226
|
{
|
|
@@ -4193,7 +4245,7 @@ const rm = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, a) => {
|
|
|
4193
4245
|
);
|
|
4194
4246
|
});
|
|
4195
4247
|
rm.displayName = "SidebarMenuSkeleton";
|
|
4196
|
-
const om =
|
|
4248
|
+
const om = d.forwardRef(
|
|
4197
4249
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4198
4250
|
"ul",
|
|
4199
4251
|
{
|
|
@@ -4209,11 +4261,11 @@ const om = f.forwardRef(
|
|
|
4209
4261
|
)
|
|
4210
4262
|
);
|
|
4211
4263
|
om.displayName = "SidebarMenuSub";
|
|
4212
|
-
const sm =
|
|
4264
|
+
const sm = d.forwardRef(
|
|
4213
4265
|
({ ...e }, t) => /* @__PURE__ */ u.jsx("li", { ref: t, ...e })
|
|
4214
4266
|
);
|
|
4215
4267
|
sm.displayName = "SidebarMenuSubItem";
|
|
4216
|
-
const im =
|
|
4268
|
+
const im = d.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: a, ...r }, o) => {
|
|
4217
4269
|
const i = e ? mt : "a";
|
|
4218
4270
|
return /* @__PURE__ */ u.jsx(
|
|
4219
4271
|
i,
|
|
@@ -4244,28 +4296,28 @@ function We(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
4244
4296
|
function ca(e, t = []) {
|
|
4245
4297
|
let n = [];
|
|
4246
4298
|
function a(o, i) {
|
|
4247
|
-
const s =
|
|
4299
|
+
const s = d.createContext(i), l = n.length;
|
|
4248
4300
|
n = [...n, i];
|
|
4249
|
-
const c = (
|
|
4301
|
+
const c = (f) => {
|
|
4250
4302
|
var v;
|
|
4251
|
-
const { scope:
|
|
4303
|
+
const { scope: m, children: g, ...b } = f, w = ((v = m == null ? void 0 : m[e]) == null ? void 0 : v[l]) || s, p = d.useMemo(() => b, Object.values(b));
|
|
4252
4304
|
return /* @__PURE__ */ u.jsx(w.Provider, { value: p, children: g });
|
|
4253
4305
|
};
|
|
4254
4306
|
c.displayName = o + "Provider";
|
|
4255
|
-
function
|
|
4307
|
+
function h(f, m) {
|
|
4256
4308
|
var w;
|
|
4257
|
-
const g = ((w =
|
|
4309
|
+
const g = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[l]) || s, b = d.useContext(g);
|
|
4258
4310
|
if (b) return b;
|
|
4259
4311
|
if (i !== void 0) return i;
|
|
4260
|
-
throw new Error(`\`${
|
|
4312
|
+
throw new Error(`\`${f}\` must be used within \`${o}\``);
|
|
4261
4313
|
}
|
|
4262
|
-
return [c,
|
|
4314
|
+
return [c, h];
|
|
4263
4315
|
}
|
|
4264
4316
|
const r = () => {
|
|
4265
|
-
const o = n.map((i) =>
|
|
4317
|
+
const o = n.map((i) => d.createContext(i));
|
|
4266
4318
|
return function(s) {
|
|
4267
4319
|
const l = (s == null ? void 0 : s[e]) || o;
|
|
4268
|
-
return
|
|
4320
|
+
return d.useMemo(
|
|
4269
4321
|
() => ({ [`__scope${e}`]: { ...s, [e]: l } }),
|
|
4270
4322
|
[s, l]
|
|
4271
4323
|
);
|
|
@@ -4283,10 +4335,10 @@ function lm(...e) {
|
|
|
4283
4335
|
}));
|
|
4284
4336
|
return function(o) {
|
|
4285
4337
|
const i = a.reduce((s, { useScope: l, scopeName: c }) => {
|
|
4286
|
-
const
|
|
4287
|
-
return { ...s, ...
|
|
4338
|
+
const f = l(o)[`__scope${c}`];
|
|
4339
|
+
return { ...s, ...f };
|
|
4288
4340
|
}, {});
|
|
4289
|
-
return
|
|
4341
|
+
return d.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
|
|
4290
4342
|
};
|
|
4291
4343
|
};
|
|
4292
4344
|
return n.scopeName = t.scopeName, n;
|
|
@@ -4313,39 +4365,39 @@ function cm(...e) {
|
|
|
4313
4365
|
};
|
|
4314
4366
|
}
|
|
4315
4367
|
function Kt(...e) {
|
|
4316
|
-
return
|
|
4368
|
+
return d.useCallback(cm(...e), e);
|
|
4317
4369
|
}
|
|
4318
4370
|
function um(e) {
|
|
4319
4371
|
const t = e + "CollectionProvider", [n, a] = ca(t), [r, o] = n(
|
|
4320
4372
|
t,
|
|
4321
4373
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
4322
4374
|
), i = (w) => {
|
|
4323
|
-
const { scope: p, children: v } = w, S =
|
|
4375
|
+
const { scope: p, children: v } = w, S = E.useRef(null), y = E.useRef(/* @__PURE__ */ new Map()).current;
|
|
4324
4376
|
return /* @__PURE__ */ u.jsx(r, { scope: p, itemMap: y, collectionRef: S, children: v });
|
|
4325
4377
|
};
|
|
4326
4378
|
i.displayName = t;
|
|
4327
|
-
const s = e + "CollectionSlot", l = jn(s), c =
|
|
4379
|
+
const s = e + "CollectionSlot", l = jn(s), c = E.forwardRef(
|
|
4328
4380
|
(w, p) => {
|
|
4329
|
-
const { scope: v, children: S } = w, y = o(s, v),
|
|
4330
|
-
return /* @__PURE__ */ u.jsx(l, { ref:
|
|
4381
|
+
const { scope: v, children: S } = w, y = o(s, v), M = Kt(p, y.collectionRef);
|
|
4382
|
+
return /* @__PURE__ */ u.jsx(l, { ref: M, children: S });
|
|
4331
4383
|
}
|
|
4332
4384
|
);
|
|
4333
4385
|
c.displayName = s;
|
|
4334
|
-
const
|
|
4386
|
+
const h = e + "CollectionItemSlot", f = "data-radix-collection-item", m = jn(h), g = E.forwardRef(
|
|
4335
4387
|
(w, p) => {
|
|
4336
|
-
const { scope: v, children: S, ...y } = w,
|
|
4337
|
-
return
|
|
4388
|
+
const { scope: v, children: S, ...y } = w, M = E.useRef(null), x = Kt(p, M), N = o(h, v);
|
|
4389
|
+
return E.useEffect(() => (N.itemMap.set(M, { ref: M, ...y }), () => void N.itemMap.delete(M))), /* @__PURE__ */ u.jsx(m, { [f]: "", ref: x, children: S });
|
|
4338
4390
|
}
|
|
4339
4391
|
);
|
|
4340
|
-
g.displayName =
|
|
4392
|
+
g.displayName = h;
|
|
4341
4393
|
function b(w) {
|
|
4342
4394
|
const p = o(e + "CollectionConsumer", w);
|
|
4343
|
-
return
|
|
4395
|
+
return E.useCallback(() => {
|
|
4344
4396
|
const S = p.collectionRef.current;
|
|
4345
4397
|
if (!S) return [];
|
|
4346
|
-
const y = Array.from(S.querySelectorAll(`[${
|
|
4398
|
+
const y = Array.from(S.querySelectorAll(`[${f}]`));
|
|
4347
4399
|
return Array.from(p.itemMap.values()).sort(
|
|
4348
|
-
(N,
|
|
4400
|
+
(N, C) => y.indexOf(N.ref.current) - y.indexOf(C.ref.current)
|
|
4349
4401
|
);
|
|
4350
4402
|
}, [p.collectionRef, p.itemMap]);
|
|
4351
4403
|
}
|
|
@@ -4355,11 +4407,11 @@ function um(e) {
|
|
|
4355
4407
|
a
|
|
4356
4408
|
];
|
|
4357
4409
|
}
|
|
4358
|
-
var Ut = globalThis != null && globalThis.document ?
|
|
4359
|
-
}, dm =
|
|
4410
|
+
var Ut = globalThis != null && globalThis.document ? d.useLayoutEffect : () => {
|
|
4411
|
+
}, dm = d[" useId ".trim().toString()] || (() => {
|
|
4360
4412
|
}), fm = 0;
|
|
4361
4413
|
function Co(e) {
|
|
4362
|
-
const [t, n] =
|
|
4414
|
+
const [t, n] = d.useState(dm());
|
|
4363
4415
|
return Ut(() => {
|
|
4364
4416
|
e || n((a) => a ?? String(fm++));
|
|
4365
4417
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
@@ -4383,22 +4435,22 @@ var mm = [
|
|
|
4383
4435
|
"svg",
|
|
4384
4436
|
"ul"
|
|
4385
4437
|
], pt = mm.reduce((e, t) => {
|
|
4386
|
-
const n = jn(`Primitive.${t}`), a =
|
|
4438
|
+
const n = jn(`Primitive.${t}`), a = d.forwardRef((r, o) => {
|
|
4387
4439
|
const { asChild: i, ...s } = r, l = i ? n : t;
|
|
4388
4440
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(l, { ...s, ref: o });
|
|
4389
4441
|
});
|
|
4390
4442
|
return a.displayName = `Primitive.${t}`, { ...e, [t]: a };
|
|
4391
4443
|
}, {});
|
|
4392
4444
|
function hm(e) {
|
|
4393
|
-
const t =
|
|
4394
|
-
return
|
|
4445
|
+
const t = d.useRef(e);
|
|
4446
|
+
return d.useEffect(() => {
|
|
4395
4447
|
t.current = e;
|
|
4396
|
-
}),
|
|
4448
|
+
}), d.useMemo(() => (...n) => {
|
|
4397
4449
|
var a;
|
|
4398
4450
|
return (a = t.current) == null ? void 0 : a.call(t, ...n);
|
|
4399
4451
|
}, []);
|
|
4400
4452
|
}
|
|
4401
|
-
var pm =
|
|
4453
|
+
var pm = d[" useInsertionEffect ".trim().toString()] || Ut;
|
|
4402
4454
|
function No({
|
|
4403
4455
|
prop: e,
|
|
4404
4456
|
defaultProp: t,
|
|
@@ -4411,22 +4463,22 @@ function No({
|
|
|
4411
4463
|
onChange: n
|
|
4412
4464
|
}), s = e !== void 0, l = s ? e : r;
|
|
4413
4465
|
{
|
|
4414
|
-
const
|
|
4415
|
-
|
|
4416
|
-
const
|
|
4417
|
-
|
|
4418
|
-
`${a} is changing from ${
|
|
4419
|
-
),
|
|
4466
|
+
const h = d.useRef(e !== void 0);
|
|
4467
|
+
d.useEffect(() => {
|
|
4468
|
+
const f = h.current;
|
|
4469
|
+
f !== s && console.warn(
|
|
4470
|
+
`${a} is changing from ${f ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
4471
|
+
), h.current = s;
|
|
4420
4472
|
}, [s, a]);
|
|
4421
4473
|
}
|
|
4422
|
-
const c =
|
|
4423
|
-
(
|
|
4424
|
-
var
|
|
4474
|
+
const c = d.useCallback(
|
|
4475
|
+
(h) => {
|
|
4476
|
+
var f;
|
|
4425
4477
|
if (s) {
|
|
4426
|
-
const
|
|
4427
|
-
|
|
4478
|
+
const m = bm(h) ? h(e) : h;
|
|
4479
|
+
m !== e && ((f = i.current) == null || f.call(i, m));
|
|
4428
4480
|
} else
|
|
4429
|
-
o(
|
|
4481
|
+
o(h);
|
|
4430
4482
|
},
|
|
4431
4483
|
[s, e, o, i]
|
|
4432
4484
|
);
|
|
@@ -4436,10 +4488,10 @@ function gm({
|
|
|
4436
4488
|
defaultProp: e,
|
|
4437
4489
|
onChange: t
|
|
4438
4490
|
}) {
|
|
4439
|
-
const [n, a] =
|
|
4491
|
+
const [n, a] = d.useState(e), r = d.useRef(n), o = d.useRef(t);
|
|
4440
4492
|
return pm(() => {
|
|
4441
4493
|
o.current = t;
|
|
4442
|
-
}, [t]),
|
|
4494
|
+
}, [t]), d.useEffect(() => {
|
|
4443
4495
|
var i;
|
|
4444
4496
|
r.current !== n && ((i = o.current) == null || i.call(o, n), r.current = n);
|
|
4445
4497
|
}, [n, r]), [n, a, o];
|
|
@@ -4447,19 +4499,19 @@ function gm({
|
|
|
4447
4499
|
function bm(e) {
|
|
4448
4500
|
return typeof e == "function";
|
|
4449
4501
|
}
|
|
4450
|
-
var vm =
|
|
4502
|
+
var vm = d.createContext(void 0);
|
|
4451
4503
|
function Po(e) {
|
|
4452
|
-
const t =
|
|
4504
|
+
const t = d.useContext(vm);
|
|
4453
4505
|
return e || t || "ltr";
|
|
4454
4506
|
}
|
|
4455
4507
|
var kn = "rovingFocusGroup.onEntryFocus", wm = { bubbles: !1, cancelable: !0 }, Lt = "RovingFocusGroup", [Bn, Do, ym] = um(Lt), [xm, To] = ca(
|
|
4456
4508
|
Lt,
|
|
4457
4509
|
[ym]
|
|
4458
|
-
), [Sm, Mm] = xm(Lt), Eo =
|
|
4510
|
+
), [Sm, Mm] = xm(Lt), Eo = d.forwardRef(
|
|
4459
4511
|
(e, t) => /* @__PURE__ */ u.jsx(Bn.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(Bn.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(Cm, { ...e, ref: t }) }) })
|
|
4460
4512
|
);
|
|
4461
4513
|
Eo.displayName = Lt;
|
|
4462
|
-
var Cm =
|
|
4514
|
+
var Cm = d.forwardRef((e, t) => {
|
|
4463
4515
|
const {
|
|
4464
4516
|
__scopeRovingFocusGroup: n,
|
|
4465
4517
|
orientation: a,
|
|
@@ -4469,18 +4521,18 @@ var Cm = f.forwardRef((e, t) => {
|
|
|
4469
4521
|
defaultCurrentTabStopId: s,
|
|
4470
4522
|
onCurrentTabStopIdChange: l,
|
|
4471
4523
|
onEntryFocus: c,
|
|
4472
|
-
preventScrollOnEntryFocus:
|
|
4473
|
-
...
|
|
4474
|
-
} = e,
|
|
4524
|
+
preventScrollOnEntryFocus: h = !1,
|
|
4525
|
+
...f
|
|
4526
|
+
} = e, m = d.useRef(null), g = Kt(t, m), b = Po(o), [w, p] = No({
|
|
4475
4527
|
prop: i,
|
|
4476
4528
|
defaultProp: s ?? null,
|
|
4477
4529
|
onChange: l,
|
|
4478
4530
|
caller: Lt
|
|
4479
|
-
}), [v, S] =
|
|
4480
|
-
return
|
|
4481
|
-
const
|
|
4482
|
-
if (
|
|
4483
|
-
return
|
|
4531
|
+
}), [v, S] = d.useState(!1), y = hm(c), M = Do(n), x = d.useRef(!1), [N, C] = d.useState(0);
|
|
4532
|
+
return d.useEffect(() => {
|
|
4533
|
+
const D = m.current;
|
|
4534
|
+
if (D)
|
|
4535
|
+
return D.addEventListener(kn, y), () => D.removeEventListener(kn, y);
|
|
4484
4536
|
}, [y]), /* @__PURE__ */ u.jsx(
|
|
4485
4537
|
Sm,
|
|
4486
4538
|
{
|
|
@@ -4489,17 +4541,17 @@ var Cm = f.forwardRef((e, t) => {
|
|
|
4489
4541
|
dir: b,
|
|
4490
4542
|
loop: r,
|
|
4491
4543
|
currentTabStopId: w,
|
|
4492
|
-
onItemFocus:
|
|
4493
|
-
(
|
|
4544
|
+
onItemFocus: d.useCallback(
|
|
4545
|
+
(D) => p(D),
|
|
4494
4546
|
[p]
|
|
4495
4547
|
),
|
|
4496
|
-
onItemShiftTab:
|
|
4497
|
-
onFocusableItemAdd:
|
|
4498
|
-
() =>
|
|
4548
|
+
onItemShiftTab: d.useCallback(() => S(!0), []),
|
|
4549
|
+
onFocusableItemAdd: d.useCallback(
|
|
4550
|
+
() => C((D) => D + 1),
|
|
4499
4551
|
[]
|
|
4500
4552
|
),
|
|
4501
|
-
onFocusableItemRemove:
|
|
4502
|
-
() =>
|
|
4553
|
+
onFocusableItemRemove: d.useCallback(
|
|
4554
|
+
() => C((D) => D - 1),
|
|
4503
4555
|
[]
|
|
4504
4556
|
),
|
|
4505
4557
|
children: /* @__PURE__ */ u.jsx(
|
|
@@ -4507,21 +4559,21 @@ var Cm = f.forwardRef((e, t) => {
|
|
|
4507
4559
|
{
|
|
4508
4560
|
tabIndex: v || N === 0 ? -1 : 0,
|
|
4509
4561
|
"data-orientation": a,
|
|
4510
|
-
...
|
|
4562
|
+
...f,
|
|
4511
4563
|
ref: g,
|
|
4512
4564
|
style: { outline: "none", ...e.style },
|
|
4513
4565
|
onMouseDown: We(e.onMouseDown, () => {
|
|
4514
4566
|
x.current = !0;
|
|
4515
4567
|
}),
|
|
4516
|
-
onFocus: We(e.onFocus, (
|
|
4517
|
-
const
|
|
4518
|
-
if (
|
|
4568
|
+
onFocus: We(e.onFocus, (D) => {
|
|
4569
|
+
const R = !x.current;
|
|
4570
|
+
if (D.target === D.currentTarget && R && !v) {
|
|
4519
4571
|
const j = new CustomEvent(kn, wm);
|
|
4520
|
-
if (
|
|
4521
|
-
const
|
|
4572
|
+
if (D.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
|
|
4573
|
+
const k = M().filter((z) => z.focusable), I = k.find((z) => z.active), U = k.find((z) => z.id === w), H = [I, U, ...k].filter(
|
|
4522
4574
|
Boolean
|
|
4523
4575
|
).map((z) => z.ref.current);
|
|
4524
|
-
_o(H,
|
|
4576
|
+
_o(H, h);
|
|
4525
4577
|
}
|
|
4526
4578
|
}
|
|
4527
4579
|
x.current = !1;
|
|
@@ -4531,7 +4583,7 @@ var Cm = f.forwardRef((e, t) => {
|
|
|
4531
4583
|
)
|
|
4532
4584
|
}
|
|
4533
4585
|
);
|
|
4534
|
-
}), Ro = "RovingFocusGroupItem", ko =
|
|
4586
|
+
}), Ro = "RovingFocusGroupItem", ko = d.forwardRef(
|
|
4535
4587
|
(e, t) => {
|
|
4536
4588
|
const {
|
|
4537
4589
|
__scopeRovingFocusGroup: n,
|
|
@@ -4540,8 +4592,8 @@ var Cm = f.forwardRef((e, t) => {
|
|
|
4540
4592
|
tabStopId: o,
|
|
4541
4593
|
children: i,
|
|
4542
4594
|
...s
|
|
4543
|
-
} = e, l = Co(), c = o || l,
|
|
4544
|
-
return
|
|
4595
|
+
} = e, l = Co(), c = o || l, h = Mm(Ro, n), f = h.currentTabStopId === c, m = Do(n), { onFocusableItemAdd: g, onFocusableItemRemove: b, currentTabStopId: w } = h;
|
|
4596
|
+
return d.useEffect(() => {
|
|
4545
4597
|
if (a)
|
|
4546
4598
|
return g(), () => b();
|
|
4547
4599
|
}, [a, g, b]), /* @__PURE__ */ u.jsx(
|
|
@@ -4554,35 +4606,35 @@ var Cm = f.forwardRef((e, t) => {
|
|
|
4554
4606
|
children: /* @__PURE__ */ u.jsx(
|
|
4555
4607
|
pt.span,
|
|
4556
4608
|
{
|
|
4557
|
-
tabIndex:
|
|
4558
|
-
"data-orientation":
|
|
4609
|
+
tabIndex: f ? 0 : -1,
|
|
4610
|
+
"data-orientation": h.orientation,
|
|
4559
4611
|
...s,
|
|
4560
4612
|
ref: t,
|
|
4561
4613
|
onMouseDown: We(e.onMouseDown, (p) => {
|
|
4562
|
-
a ?
|
|
4614
|
+
a ? h.onItemFocus(c) : p.preventDefault();
|
|
4563
4615
|
}),
|
|
4564
|
-
onFocus: We(e.onFocus, () =>
|
|
4616
|
+
onFocus: We(e.onFocus, () => h.onItemFocus(c)),
|
|
4565
4617
|
onKeyDown: We(e.onKeyDown, (p) => {
|
|
4566
4618
|
if (p.key === "Tab" && p.shiftKey) {
|
|
4567
|
-
|
|
4619
|
+
h.onItemShiftTab();
|
|
4568
4620
|
return;
|
|
4569
4621
|
}
|
|
4570
4622
|
if (p.target !== p.currentTarget) return;
|
|
4571
|
-
const v = Dm(p,
|
|
4623
|
+
const v = Dm(p, h.orientation, h.dir);
|
|
4572
4624
|
if (v !== void 0) {
|
|
4573
4625
|
if (p.metaKey || p.ctrlKey || p.altKey || p.shiftKey) return;
|
|
4574
4626
|
p.preventDefault();
|
|
4575
|
-
let y =
|
|
4627
|
+
let y = m().filter((M) => M.focusable).map((M) => M.ref.current);
|
|
4576
4628
|
if (v === "last") y.reverse();
|
|
4577
4629
|
else if (v === "prev" || v === "next") {
|
|
4578
4630
|
v === "prev" && y.reverse();
|
|
4579
|
-
const
|
|
4580
|
-
y =
|
|
4631
|
+
const M = y.indexOf(p.currentTarget);
|
|
4632
|
+
y = h.loop ? Tm(y, M + 1) : y.slice(M + 1);
|
|
4581
4633
|
}
|
|
4582
4634
|
setTimeout(() => _o(y));
|
|
4583
4635
|
}
|
|
4584
4636
|
}),
|
|
4585
|
-
children: typeof i == "function" ? i({ isCurrentTabStop:
|
|
4637
|
+
children: typeof i == "function" ? i({ isCurrentTabStop: f, hasTabStop: w != null }) : i
|
|
4586
4638
|
}
|
|
4587
4639
|
)
|
|
4588
4640
|
}
|
|
@@ -4618,15 +4670,15 @@ function Tm(e, t) {
|
|
|
4618
4670
|
}
|
|
4619
4671
|
var Em = Eo, Rm = ko;
|
|
4620
4672
|
function km(e, t) {
|
|
4621
|
-
return
|
|
4673
|
+
return d.useReducer((n, a) => t[n][a] ?? n, e);
|
|
4622
4674
|
}
|
|
4623
4675
|
var Oo = (e) => {
|
|
4624
|
-
const { present: t, children: n } = e, a = _m(t), r = typeof n == "function" ? n({ present: a.isPresent }) :
|
|
4625
|
-
return typeof n == "function" || a.isPresent ?
|
|
4676
|
+
const { present: t, children: n } = e, a = _m(t), r = typeof n == "function" ? n({ present: a.isPresent }) : d.Children.only(n), o = Kt(a.ref, Om(r));
|
|
4677
|
+
return typeof n == "function" || a.isPresent ? d.cloneElement(r, { ref: o }) : null;
|
|
4626
4678
|
};
|
|
4627
4679
|
Oo.displayName = "Presence";
|
|
4628
4680
|
function _m(e) {
|
|
4629
|
-
const [t, n] =
|
|
4681
|
+
const [t, n] = d.useState(), a = d.useRef(null), r = d.useRef(e), o = d.useRef("none"), i = e ? "mounted" : "unmounted", [s, l] = km(i, {
|
|
4630
4682
|
mounted: {
|
|
4631
4683
|
UNMOUNT: "unmounted",
|
|
4632
4684
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -4639,37 +4691,37 @@ function _m(e) {
|
|
|
4639
4691
|
MOUNT: "mounted"
|
|
4640
4692
|
}
|
|
4641
4693
|
});
|
|
4642
|
-
return
|
|
4694
|
+
return d.useEffect(() => {
|
|
4643
4695
|
const c = Ht(a.current);
|
|
4644
4696
|
o.current = s === "mounted" ? c : "none";
|
|
4645
4697
|
}, [s]), Ut(() => {
|
|
4646
|
-
const c = a.current,
|
|
4647
|
-
if (
|
|
4648
|
-
const
|
|
4649
|
-
e ? l("MOUNT") : g === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(
|
|
4698
|
+
const c = a.current, h = r.current;
|
|
4699
|
+
if (h !== e) {
|
|
4700
|
+
const m = o.current, g = Ht(c);
|
|
4701
|
+
e ? l("MOUNT") : g === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(h && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
4650
4702
|
}
|
|
4651
4703
|
}, [e, l]), Ut(() => {
|
|
4652
4704
|
if (t) {
|
|
4653
4705
|
let c;
|
|
4654
|
-
const
|
|
4706
|
+
const h = t.ownerDocument.defaultView ?? window, f = (g) => {
|
|
4655
4707
|
const w = Ht(a.current).includes(CSS.escape(g.animationName));
|
|
4656
4708
|
if (g.target === t && w && (l("ANIMATION_END"), !r.current)) {
|
|
4657
4709
|
const p = t.style.animationFillMode;
|
|
4658
|
-
t.style.animationFillMode = "forwards", c =
|
|
4710
|
+
t.style.animationFillMode = "forwards", c = h.setTimeout(() => {
|
|
4659
4711
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = p);
|
|
4660
4712
|
});
|
|
4661
4713
|
}
|
|
4662
|
-
},
|
|
4714
|
+
}, m = (g) => {
|
|
4663
4715
|
g.target === t && (o.current = Ht(a.current));
|
|
4664
4716
|
};
|
|
4665
|
-
return t.addEventListener("animationstart",
|
|
4666
|
-
|
|
4717
|
+
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
4718
|
+
h.clearTimeout(c), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
4667
4719
|
};
|
|
4668
4720
|
} else
|
|
4669
4721
|
l("ANIMATION_END");
|
|
4670
4722
|
}, [t, l]), {
|
|
4671
4723
|
isPresent: ["mounted", "unmountSuspended"].includes(s),
|
|
4672
|
-
ref:
|
|
4724
|
+
ref: d.useCallback((c) => {
|
|
4673
4725
|
a.current = c ? getComputedStyle(c) : null, n(c);
|
|
4674
4726
|
}, [])
|
|
4675
4727
|
};
|
|
@@ -4684,7 +4736,7 @@ function Om(e) {
|
|
|
4684
4736
|
}
|
|
4685
4737
|
var cn = "Tabs", [Im, dg] = ca(cn, [
|
|
4686
4738
|
To
|
|
4687
|
-
]), Io = To(), [Am, ua] = Im(cn), Ao =
|
|
4739
|
+
]), Io = To(), [Am, ua] = Im(cn), Ao = d.forwardRef(
|
|
4688
4740
|
(e, t) => {
|
|
4689
4741
|
const {
|
|
4690
4742
|
__scopeTabs: n,
|
|
@@ -4695,7 +4747,7 @@ var cn = "Tabs", [Im, dg] = ca(cn, [
|
|
|
4695
4747
|
dir: s,
|
|
4696
4748
|
activationMode: l = "automatic",
|
|
4697
4749
|
...c
|
|
4698
|
-
} = e,
|
|
4750
|
+
} = e, h = Po(s), [f, m] = No({
|
|
4699
4751
|
prop: a,
|
|
4700
4752
|
onChange: r,
|
|
4701
4753
|
defaultProp: o ?? "",
|
|
@@ -4706,15 +4758,15 @@ var cn = "Tabs", [Im, dg] = ca(cn, [
|
|
|
4706
4758
|
{
|
|
4707
4759
|
scope: n,
|
|
4708
4760
|
baseId: Co(),
|
|
4709
|
-
value:
|
|
4710
|
-
onValueChange:
|
|
4761
|
+
value: f,
|
|
4762
|
+
onValueChange: m,
|
|
4711
4763
|
orientation: i,
|
|
4712
|
-
dir:
|
|
4764
|
+
dir: h,
|
|
4713
4765
|
activationMode: l,
|
|
4714
4766
|
children: /* @__PURE__ */ u.jsx(
|
|
4715
4767
|
pt.div,
|
|
4716
4768
|
{
|
|
4717
|
-
dir:
|
|
4769
|
+
dir: h,
|
|
4718
4770
|
"data-orientation": i,
|
|
4719
4771
|
...c,
|
|
4720
4772
|
ref: t
|
|
@@ -4725,7 +4777,7 @@ var cn = "Tabs", [Im, dg] = ca(cn, [
|
|
|
4725
4777
|
}
|
|
4726
4778
|
);
|
|
4727
4779
|
Ao.displayName = cn;
|
|
4728
|
-
var jo = "TabsList", Wo =
|
|
4780
|
+
var jo = "TabsList", Wo = d.forwardRef(
|
|
4729
4781
|
(e, t) => {
|
|
4730
4782
|
const { __scopeTabs: n, loop: a = !0, ...r } = e, o = ua(jo, n), i = Io(n);
|
|
4731
4783
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -4750,38 +4802,38 @@ var jo = "TabsList", Wo = f.forwardRef(
|
|
|
4750
4802
|
}
|
|
4751
4803
|
);
|
|
4752
4804
|
Wo.displayName = jo;
|
|
4753
|
-
var Lo = "TabsTrigger", zo =
|
|
4805
|
+
var Lo = "TabsTrigger", zo = d.forwardRef(
|
|
4754
4806
|
(e, t) => {
|
|
4755
|
-
const { __scopeTabs: n, value: a, disabled: r = !1, ...o } = e, i = ua(Lo, n), s = Io(n), l = Bo(i.baseId, a), c = Ho(i.baseId, a),
|
|
4807
|
+
const { __scopeTabs: n, value: a, disabled: r = !1, ...o } = e, i = ua(Lo, n), s = Io(n), l = Bo(i.baseId, a), c = Ho(i.baseId, a), h = a === i.value;
|
|
4756
4808
|
return /* @__PURE__ */ u.jsx(
|
|
4757
4809
|
Rm,
|
|
4758
4810
|
{
|
|
4759
4811
|
asChild: !0,
|
|
4760
4812
|
...s,
|
|
4761
4813
|
focusable: !r,
|
|
4762
|
-
active:
|
|
4814
|
+
active: h,
|
|
4763
4815
|
children: /* @__PURE__ */ u.jsx(
|
|
4764
4816
|
pt.button,
|
|
4765
4817
|
{
|
|
4766
4818
|
type: "button",
|
|
4767
4819
|
role: "tab",
|
|
4768
|
-
"aria-selected":
|
|
4820
|
+
"aria-selected": h,
|
|
4769
4821
|
"aria-controls": c,
|
|
4770
|
-
"data-state":
|
|
4822
|
+
"data-state": h ? "active" : "inactive",
|
|
4771
4823
|
"data-disabled": r ? "" : void 0,
|
|
4772
4824
|
disabled: r,
|
|
4773
4825
|
id: l,
|
|
4774
4826
|
...o,
|
|
4775
4827
|
ref: t,
|
|
4776
|
-
onMouseDown: We(e.onMouseDown, (
|
|
4777
|
-
!r &&
|
|
4828
|
+
onMouseDown: We(e.onMouseDown, (f) => {
|
|
4829
|
+
!r && f.button === 0 && f.ctrlKey === !1 ? i.onValueChange(a) : f.preventDefault();
|
|
4778
4830
|
}),
|
|
4779
|
-
onKeyDown: We(e.onKeyDown, (
|
|
4780
|
-
[" ", "Enter"].includes(
|
|
4831
|
+
onKeyDown: We(e.onKeyDown, (f) => {
|
|
4832
|
+
[" ", "Enter"].includes(f.key) && i.onValueChange(a);
|
|
4781
4833
|
}),
|
|
4782
4834
|
onFocus: We(e.onFocus, () => {
|
|
4783
|
-
const
|
|
4784
|
-
!
|
|
4835
|
+
const f = i.activationMode !== "manual";
|
|
4836
|
+
!h && !r && f && i.onValueChange(a);
|
|
4785
4837
|
})
|
|
4786
4838
|
}
|
|
4787
4839
|
)
|
|
@@ -4790,29 +4842,29 @@ var Lo = "TabsTrigger", zo = f.forwardRef(
|
|
|
4790
4842
|
}
|
|
4791
4843
|
);
|
|
4792
4844
|
zo.displayName = Lo;
|
|
4793
|
-
var Fo = "TabsContent", $o =
|
|
4845
|
+
var Fo = "TabsContent", $o = d.forwardRef(
|
|
4794
4846
|
(e, t) => {
|
|
4795
|
-
const { __scopeTabs: n, value: a, forceMount: r, children: o, ...i } = e, s = ua(Fo, n), l = Bo(s.baseId, a), c = Ho(s.baseId, a),
|
|
4796
|
-
return
|
|
4797
|
-
const
|
|
4798
|
-
return () => cancelAnimationFrame(
|
|
4799
|
-
}, []), /* @__PURE__ */ u.jsx(Oo, { present: r ||
|
|
4847
|
+
const { __scopeTabs: n, value: a, forceMount: r, children: o, ...i } = e, s = ua(Fo, n), l = Bo(s.baseId, a), c = Ho(s.baseId, a), h = a === s.value, f = d.useRef(h);
|
|
4848
|
+
return d.useEffect(() => {
|
|
4849
|
+
const m = requestAnimationFrame(() => f.current = !1);
|
|
4850
|
+
return () => cancelAnimationFrame(m);
|
|
4851
|
+
}, []), /* @__PURE__ */ u.jsx(Oo, { present: r || h, children: ({ present: m }) => /* @__PURE__ */ u.jsx(
|
|
4800
4852
|
pt.div,
|
|
4801
4853
|
{
|
|
4802
|
-
"data-state":
|
|
4854
|
+
"data-state": h ? "active" : "inactive",
|
|
4803
4855
|
"data-orientation": s.orientation,
|
|
4804
4856
|
role: "tabpanel",
|
|
4805
4857
|
"aria-labelledby": l,
|
|
4806
|
-
hidden: !
|
|
4858
|
+
hidden: !m,
|
|
4807
4859
|
id: c,
|
|
4808
4860
|
tabIndex: 0,
|
|
4809
4861
|
...i,
|
|
4810
4862
|
ref: t,
|
|
4811
4863
|
style: {
|
|
4812
4864
|
...e.style,
|
|
4813
|
-
animationDuration:
|
|
4865
|
+
animationDuration: f.current ? "0s" : void 0
|
|
4814
4866
|
},
|
|
4815
|
-
children:
|
|
4867
|
+
children: m && o
|
|
4816
4868
|
}
|
|
4817
4869
|
) });
|
|
4818
4870
|
}
|
|
@@ -4861,9 +4913,9 @@ const jm = ft("", {
|
|
|
4861
4913
|
variant: "default"
|
|
4862
4914
|
}
|
|
4863
4915
|
}
|
|
4864
|
-
), da =
|
|
4916
|
+
), da = d.createContext({
|
|
4865
4917
|
variant: "default"
|
|
4866
|
-
}), zm =
|
|
4918
|
+
}), zm = d.forwardRef(
|
|
4867
4919
|
({ className: e, variant: t, ...n }, a) => /* @__PURE__ */ u.jsx(da.Provider, { value: { variant: t }, children: /* @__PURE__ */ u.jsx(
|
|
4868
4920
|
Yo,
|
|
4869
4921
|
{
|
|
@@ -4874,8 +4926,8 @@ const jm = ft("", {
|
|
|
4874
4926
|
) })
|
|
4875
4927
|
);
|
|
4876
4928
|
zm.displayName = Yo.displayName;
|
|
4877
|
-
const Fm =
|
|
4878
|
-
const { variant: a } =
|
|
4929
|
+
const Fm = d.forwardRef(({ className: e, ...t }, n) => {
|
|
4930
|
+
const { variant: a } = d.useContext(da);
|
|
4879
4931
|
return /* @__PURE__ */ u.jsx(
|
|
4880
4932
|
Vo,
|
|
4881
4933
|
{
|
|
@@ -4886,8 +4938,8 @@ const Fm = f.forwardRef(({ className: e, ...t }, n) => {
|
|
|
4886
4938
|
);
|
|
4887
4939
|
});
|
|
4888
4940
|
Fm.displayName = Vo.displayName;
|
|
4889
|
-
const $m =
|
|
4890
|
-
const { variant: a } =
|
|
4941
|
+
const $m = d.forwardRef(({ className: e, ...t }, n) => {
|
|
4942
|
+
const { variant: a } = d.useContext(da);
|
|
4891
4943
|
return /* @__PURE__ */ u.jsx(
|
|
4892
4944
|
Go,
|
|
4893
4945
|
{
|
|
@@ -4898,7 +4950,7 @@ const $m = f.forwardRef(({ className: e, ...t }, n) => {
|
|
|
4898
4950
|
);
|
|
4899
4951
|
});
|
|
4900
4952
|
$m.displayName = Go.displayName;
|
|
4901
|
-
const Bm =
|
|
4953
|
+
const Bm = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4902
4954
|
Ko,
|
|
4903
4955
|
{
|
|
4904
4956
|
ref: n,
|
|
@@ -4910,9 +4962,9 @@ const Bm = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
4910
4962
|
}
|
|
4911
4963
|
));
|
|
4912
4964
|
Bm.displayName = Ko.displayName;
|
|
4913
|
-
const Hm =
|
|
4965
|
+
const Hm = d.forwardRef(({ ...e }, t) => /* @__PURE__ */ u.jsx("nav", { ref: t, "aria-label": "breadcrumb", ...e }));
|
|
4914
4966
|
Hm.displayName = "Breadcrumb";
|
|
4915
|
-
const Ym =
|
|
4967
|
+
const Ym = d.forwardRef(
|
|
4916
4968
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4917
4969
|
"ol",
|
|
4918
4970
|
{
|
|
@@ -4926,7 +4978,7 @@ const Ym = f.forwardRef(
|
|
|
4926
4978
|
)
|
|
4927
4979
|
);
|
|
4928
4980
|
Ym.displayName = "BreadcrumbList";
|
|
4929
|
-
const Vm =
|
|
4981
|
+
const Vm = d.forwardRef(
|
|
4930
4982
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4931
4983
|
"li",
|
|
4932
4984
|
{
|
|
@@ -4937,7 +4989,7 @@ const Vm = f.forwardRef(
|
|
|
4937
4989
|
)
|
|
4938
4990
|
);
|
|
4939
4991
|
Vm.displayName = "BreadcrumbItem";
|
|
4940
|
-
const Gm =
|
|
4992
|
+
const Gm = d.forwardRef(({ asChild: e, className: t, ...n }, a) => {
|
|
4941
4993
|
const r = e ? mt : "a";
|
|
4942
4994
|
return /* @__PURE__ */ u.jsx(
|
|
4943
4995
|
r,
|
|
@@ -4949,7 +5001,7 @@ const Gm = f.forwardRef(({ asChild: e, className: t, ...n }, a) => {
|
|
|
4949
5001
|
);
|
|
4950
5002
|
});
|
|
4951
5003
|
Gm.displayName = "BreadcrumbLink";
|
|
4952
|
-
const Km =
|
|
5004
|
+
const Km = d.forwardRef(
|
|
4953
5005
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
4954
5006
|
"span",
|
|
4955
5007
|
{
|
|
@@ -4995,7 +5047,7 @@ var Uo = ["PageUp", "PageDown"], qo = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
4995
5047
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
4996
5048
|
}, gt = "Slider", [Hn, Xm, Zm] = Qn(gt), [Zo, fg] = Qe(gt, [
|
|
4997
5049
|
Zm
|
|
4998
|
-
]), [Qm, un] = Zo(gt), Qo =
|
|
5050
|
+
]), [Qm, un] = Zo(gt), Qo = d.forwardRef(
|
|
4999
5051
|
(e, t) => {
|
|
5000
5052
|
const {
|
|
5001
5053
|
name: n,
|
|
@@ -5006,41 +5058,41 @@ var Uo = ["PageUp", "PageDown"], qo = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
5006
5058
|
disabled: s = !1,
|
|
5007
5059
|
minStepsBetweenThumbs: l = 0,
|
|
5008
5060
|
defaultValue: c = [a],
|
|
5009
|
-
value:
|
|
5010
|
-
onValueChange:
|
|
5061
|
+
value: h,
|
|
5062
|
+
onValueChange: f = () => {
|
|
5011
5063
|
},
|
|
5012
|
-
onValueCommit:
|
|
5064
|
+
onValueCommit: m = () => {
|
|
5013
5065
|
},
|
|
5014
5066
|
inverted: g = !1,
|
|
5015
5067
|
form: b,
|
|
5016
5068
|
...w
|
|
5017
|
-
} = e, p =
|
|
5018
|
-
prop:
|
|
5069
|
+
} = e, p = d.useRef(/* @__PURE__ */ new Set()), v = d.useRef(0), y = i === "horizontal" ? Jm : eh, [M = [], x] = It({
|
|
5070
|
+
prop: h,
|
|
5019
5071
|
defaultProp: c,
|
|
5020
|
-
onChange: (
|
|
5072
|
+
onChange: (k) => {
|
|
5021
5073
|
var U;
|
|
5022
|
-
(U = [...p.current][v.current]) == null || U.focus(),
|
|
5074
|
+
(U = [...p.current][v.current]) == null || U.focus(), f(k);
|
|
5023
5075
|
}
|
|
5024
|
-
}), N =
|
|
5025
|
-
function
|
|
5026
|
-
const I = oh(
|
|
5027
|
-
j(
|
|
5076
|
+
}), N = d.useRef(M);
|
|
5077
|
+
function C(k) {
|
|
5078
|
+
const I = oh(M, k);
|
|
5079
|
+
j(k, I);
|
|
5028
5080
|
}
|
|
5029
|
-
function
|
|
5030
|
-
j(
|
|
5081
|
+
function D(k) {
|
|
5082
|
+
j(k, v.current);
|
|
5031
5083
|
}
|
|
5032
|
-
function
|
|
5033
|
-
const
|
|
5034
|
-
|
|
5084
|
+
function R() {
|
|
5085
|
+
const k = N.current[v.current];
|
|
5086
|
+
M[v.current] !== k && m(M);
|
|
5035
5087
|
}
|
|
5036
|
-
function j(
|
|
5037
|
-
const
|
|
5088
|
+
function j(k, I, { commit: U } = { commit: !1 }) {
|
|
5089
|
+
const _ = ch(o), H = uh(Math.round((k - a) / o) * o + a, _), z = Zn(H, [a, r]);
|
|
5038
5090
|
x((se = []) => {
|
|
5039
5091
|
const K = ah(se, z, I);
|
|
5040
5092
|
if (lh(K, l * o)) {
|
|
5041
5093
|
v.current = K.indexOf(z);
|
|
5042
5094
|
const ae = String(K) !== String(se);
|
|
5043
|
-
return ae && U &&
|
|
5095
|
+
return ae && U && m(K), ae ? K : se;
|
|
5044
5096
|
} else
|
|
5045
5097
|
return se;
|
|
5046
5098
|
});
|
|
@@ -5055,7 +5107,7 @@ var Uo = ["PageUp", "PageDown"], qo = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
5055
5107
|
max: r,
|
|
5056
5108
|
valueIndexToChangeRef: v,
|
|
5057
5109
|
thumbs: p.current,
|
|
5058
|
-
values:
|
|
5110
|
+
values: M,
|
|
5059
5111
|
orientation: i,
|
|
5060
5112
|
form: b,
|
|
5061
5113
|
children: /* @__PURE__ */ u.jsx(Hn.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ u.jsx(Hn.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ u.jsx(
|
|
@@ -5066,19 +5118,19 @@ var Uo = ["PageUp", "PageDown"], qo = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
5066
5118
|
...w,
|
|
5067
5119
|
ref: t,
|
|
5068
5120
|
onPointerDown: F(w.onPointerDown, () => {
|
|
5069
|
-
s || (N.current =
|
|
5121
|
+
s || (N.current = M);
|
|
5070
5122
|
}),
|
|
5071
5123
|
min: a,
|
|
5072
5124
|
max: r,
|
|
5073
5125
|
inverted: g,
|
|
5074
|
-
onSlideStart: s ? void 0 :
|
|
5075
|
-
onSlideMove: s ? void 0 :
|
|
5076
|
-
onSlideEnd: s ? void 0 :
|
|
5126
|
+
onSlideStart: s ? void 0 : C,
|
|
5127
|
+
onSlideMove: s ? void 0 : D,
|
|
5128
|
+
onSlideEnd: s ? void 0 : R,
|
|
5077
5129
|
onHomeKeyDown: () => !s && j(a, 0, { commit: !0 }),
|
|
5078
|
-
onEndKeyDown: () => !s && j(r,
|
|
5079
|
-
onStepKeyDown: ({ event:
|
|
5130
|
+
onEndKeyDown: () => !s && j(r, M.length - 1, { commit: !0 }),
|
|
5131
|
+
onStepKeyDown: ({ event: k, direction: I }) => {
|
|
5080
5132
|
if (!s) {
|
|
5081
|
-
const H = Uo.includes(
|
|
5133
|
+
const H = Uo.includes(k.key) || k.shiftKey && qo.includes(k.key) ? 10 : 1, z = v.current, se = M[z], K = o * H * I;
|
|
5082
5134
|
j(se + K, z, { commit: !0 });
|
|
5083
5135
|
}
|
|
5084
5136
|
}
|
|
@@ -5094,7 +5146,7 @@ var [Jo, es] = Zo(gt, {
|
|
|
5094
5146
|
endEdge: "right",
|
|
5095
5147
|
size: "width",
|
|
5096
5148
|
direction: 1
|
|
5097
|
-
}), Jm =
|
|
5149
|
+
}), Jm = d.forwardRef(
|
|
5098
5150
|
(e, t) => {
|
|
5099
5151
|
const {
|
|
5100
5152
|
min: n,
|
|
@@ -5105,11 +5157,11 @@ var [Jo, es] = Zo(gt, {
|
|
|
5105
5157
|
onSlideMove: s,
|
|
5106
5158
|
onSlideEnd: l,
|
|
5107
5159
|
onStepKeyDown: c,
|
|
5108
|
-
...
|
|
5109
|
-
} = e, [
|
|
5160
|
+
...h
|
|
5161
|
+
} = e, [f, m] = d.useState(null), g = he(t, (y) => m(y)), b = d.useRef(void 0), w = Jn(r), p = w === "ltr", v = p && !o || !p && o;
|
|
5110
5162
|
function S(y) {
|
|
5111
|
-
const
|
|
5112
|
-
return b.current =
|
|
5163
|
+
const M = b.current || f.getBoundingClientRect(), x = [0, M.width], C = fa(x, v ? [n, a] : [a, n]);
|
|
5164
|
+
return b.current = M, C(y - M.left);
|
|
5113
5165
|
}
|
|
5114
5166
|
return /* @__PURE__ */ u.jsx(
|
|
5115
5167
|
Jo,
|
|
@@ -5124,19 +5176,19 @@ var [Jo, es] = Zo(gt, {
|
|
|
5124
5176
|
{
|
|
5125
5177
|
dir: w,
|
|
5126
5178
|
"data-orientation": "horizontal",
|
|
5127
|
-
...
|
|
5179
|
+
...h,
|
|
5128
5180
|
ref: g,
|
|
5129
5181
|
style: {
|
|
5130
|
-
...
|
|
5182
|
+
...h.style,
|
|
5131
5183
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
5132
5184
|
},
|
|
5133
5185
|
onSlideStart: (y) => {
|
|
5134
|
-
const
|
|
5135
|
-
i == null || i(
|
|
5186
|
+
const M = S(y.clientX);
|
|
5187
|
+
i == null || i(M);
|
|
5136
5188
|
},
|
|
5137
5189
|
onSlideMove: (y) => {
|
|
5138
|
-
const
|
|
5139
|
-
s == null || s(
|
|
5190
|
+
const M = S(y.clientX);
|
|
5191
|
+
s == null || s(M);
|
|
5140
5192
|
},
|
|
5141
5193
|
onSlideEnd: () => {
|
|
5142
5194
|
b.current = void 0, l == null || l();
|
|
@@ -5150,7 +5202,7 @@ var [Jo, es] = Zo(gt, {
|
|
|
5150
5202
|
}
|
|
5151
5203
|
);
|
|
5152
5204
|
}
|
|
5153
|
-
), eh =
|
|
5205
|
+
), eh = d.forwardRef(
|
|
5154
5206
|
(e, t) => {
|
|
5155
5207
|
const {
|
|
5156
5208
|
min: n,
|
|
@@ -5161,10 +5213,10 @@ var [Jo, es] = Zo(gt, {
|
|
|
5161
5213
|
onSlideEnd: s,
|
|
5162
5214
|
onStepKeyDown: l,
|
|
5163
5215
|
...c
|
|
5164
|
-
} = e,
|
|
5216
|
+
} = e, h = d.useRef(null), f = he(t, h), m = d.useRef(void 0), g = !r;
|
|
5165
5217
|
function b(w) {
|
|
5166
|
-
const p =
|
|
5167
|
-
return
|
|
5218
|
+
const p = m.current || h.current.getBoundingClientRect(), v = [0, p.height], y = fa(v, g ? [a, n] : [n, a]);
|
|
5219
|
+
return m.current = p, y(w - p.top);
|
|
5168
5220
|
}
|
|
5169
5221
|
return /* @__PURE__ */ u.jsx(
|
|
5170
5222
|
Jo,
|
|
@@ -5179,7 +5231,7 @@ var [Jo, es] = Zo(gt, {
|
|
|
5179
5231
|
{
|
|
5180
5232
|
"data-orientation": "vertical",
|
|
5181
5233
|
...c,
|
|
5182
|
-
ref:
|
|
5234
|
+
ref: f,
|
|
5183
5235
|
style: {
|
|
5184
5236
|
...c.style,
|
|
5185
5237
|
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
@@ -5193,7 +5245,7 @@ var [Jo, es] = Zo(gt, {
|
|
|
5193
5245
|
i == null || i(p);
|
|
5194
5246
|
},
|
|
5195
5247
|
onSlideEnd: () => {
|
|
5196
|
-
|
|
5248
|
+
m.current = void 0, s == null || s();
|
|
5197
5249
|
},
|
|
5198
5250
|
onStepKeyDown: (w) => {
|
|
5199
5251
|
const v = Xo[g ? "from-bottom" : "from-top"].includes(w.key);
|
|
@@ -5204,7 +5256,7 @@ var [Jo, es] = Zo(gt, {
|
|
|
5204
5256
|
}
|
|
5205
5257
|
);
|
|
5206
5258
|
}
|
|
5207
|
-
), ts =
|
|
5259
|
+
), ts = d.forwardRef(
|
|
5208
5260
|
(e, t) => {
|
|
5209
5261
|
const {
|
|
5210
5262
|
__scopeSlider: n,
|
|
@@ -5215,30 +5267,30 @@ var [Jo, es] = Zo(gt, {
|
|
|
5215
5267
|
onEndKeyDown: s,
|
|
5216
5268
|
onStepKeyDown: l,
|
|
5217
5269
|
...c
|
|
5218
|
-
} = e,
|
|
5270
|
+
} = e, h = un(gt, n);
|
|
5219
5271
|
return /* @__PURE__ */ u.jsx(
|
|
5220
5272
|
ne.span,
|
|
5221
5273
|
{
|
|
5222
5274
|
...c,
|
|
5223
5275
|
ref: t,
|
|
5224
|
-
onKeyDown: F(e.onKeyDown, (
|
|
5225
|
-
|
|
5276
|
+
onKeyDown: F(e.onKeyDown, (f) => {
|
|
5277
|
+
f.key === "Home" ? (i(f), f.preventDefault()) : f.key === "End" ? (s(f), f.preventDefault()) : Uo.concat(qo).includes(f.key) && (l(f), f.preventDefault());
|
|
5226
5278
|
}),
|
|
5227
|
-
onPointerDown: F(e.onPointerDown, (
|
|
5228
|
-
const
|
|
5229
|
-
|
|
5279
|
+
onPointerDown: F(e.onPointerDown, (f) => {
|
|
5280
|
+
const m = f.target;
|
|
5281
|
+
m.setPointerCapture(f.pointerId), f.preventDefault(), h.thumbs.has(m) ? m.focus() : a(f);
|
|
5230
5282
|
}),
|
|
5231
|
-
onPointerMove: F(e.onPointerMove, (
|
|
5232
|
-
|
|
5283
|
+
onPointerMove: F(e.onPointerMove, (f) => {
|
|
5284
|
+
f.target.hasPointerCapture(f.pointerId) && r(f);
|
|
5233
5285
|
}),
|
|
5234
|
-
onPointerUp: F(e.onPointerUp, (
|
|
5235
|
-
const
|
|
5236
|
-
|
|
5286
|
+
onPointerUp: F(e.onPointerUp, (f) => {
|
|
5287
|
+
const m = f.target;
|
|
5288
|
+
m.hasPointerCapture(f.pointerId) && (m.releasePointerCapture(f.pointerId), o(f));
|
|
5237
5289
|
})
|
|
5238
5290
|
}
|
|
5239
5291
|
);
|
|
5240
5292
|
}
|
|
5241
|
-
), ns = "SliderTrack", as =
|
|
5293
|
+
), ns = "SliderTrack", as = d.forwardRef(
|
|
5242
5294
|
(e, t) => {
|
|
5243
5295
|
const { __scopeSlider: n, ...a } = e, r = un(ns, n);
|
|
5244
5296
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -5253,11 +5305,11 @@ var [Jo, es] = Zo(gt, {
|
|
|
5253
5305
|
}
|
|
5254
5306
|
);
|
|
5255
5307
|
as.displayName = ns;
|
|
5256
|
-
var Yn = "SliderRange", rs =
|
|
5308
|
+
var Yn = "SliderRange", rs = d.forwardRef(
|
|
5257
5309
|
(e, t) => {
|
|
5258
|
-
const { __scopeSlider: n, ...a } = e, r = un(Yn, n), o = es(Yn, n), i =
|
|
5259
|
-
(
|
|
5260
|
-
),
|
|
5310
|
+
const { __scopeSlider: n, ...a } = e, r = un(Yn, n), o = es(Yn, n), i = d.useRef(null), s = he(t, i), l = r.values.length, c = r.values.map(
|
|
5311
|
+
(m) => ss(m, r.min, r.max)
|
|
5312
|
+
), h = l > 1 ? Math.min(...c) : 0, f = 100 - Math.max(...c);
|
|
5261
5313
|
return /* @__PURE__ */ u.jsx(
|
|
5262
5314
|
ne.span,
|
|
5263
5315
|
{
|
|
@@ -5267,26 +5319,26 @@ var Yn = "SliderRange", rs = f.forwardRef(
|
|
|
5267
5319
|
ref: s,
|
|
5268
5320
|
style: {
|
|
5269
5321
|
...e.style,
|
|
5270
|
-
[o.startEdge]:
|
|
5271
|
-
[o.endEdge]:
|
|
5322
|
+
[o.startEdge]: h + "%",
|
|
5323
|
+
[o.endEdge]: f + "%"
|
|
5272
5324
|
}
|
|
5273
5325
|
}
|
|
5274
5326
|
);
|
|
5275
5327
|
}
|
|
5276
5328
|
);
|
|
5277
5329
|
rs.displayName = Yn;
|
|
5278
|
-
var Vn = "SliderThumb", os =
|
|
5330
|
+
var Vn = "SliderThumb", os = d.forwardRef(
|
|
5279
5331
|
(e, t) => {
|
|
5280
|
-
const n = Xm(e.__scopeSlider), [a, r] =
|
|
5332
|
+
const n = Xm(e.__scopeSlider), [a, r] = d.useState(null), o = he(t, (s) => r(s)), i = d.useMemo(
|
|
5281
5333
|
() => a ? n().findIndex((s) => s.ref.current === a) : -1,
|
|
5282
5334
|
[n, a]
|
|
5283
5335
|
);
|
|
5284
5336
|
return /* @__PURE__ */ u.jsx(th, { ...e, ref: o, index: i });
|
|
5285
5337
|
}
|
|
5286
|
-
), th =
|
|
5338
|
+
), th = d.forwardRef(
|
|
5287
5339
|
(e, t) => {
|
|
5288
|
-
const { __scopeSlider: n, index: a, name: r, ...o } = e, i = un(Vn, n), s = es(Vn, n), [l, c] =
|
|
5289
|
-
return
|
|
5340
|
+
const { __scopeSlider: n, index: a, name: r, ...o } = e, i = un(Vn, n), s = es(Vn, n), [l, c] = d.useState(null), h = he(t, (S) => c(S)), f = l ? i.form || !!l.closest("form") : !0, m = xl(l), g = i.values[a], b = g === void 0 ? 0 : ss(g, i.min, i.max), w = rh(a, i.values.length), p = m == null ? void 0 : m[s.size], v = p ? sh(p, b, s.direction) : 0;
|
|
5341
|
+
return d.useEffect(() => {
|
|
5290
5342
|
if (l)
|
|
5291
5343
|
return i.thumbs.add(l), () => {
|
|
5292
5344
|
i.thumbs.delete(l);
|
|
@@ -5313,14 +5365,14 @@ var Vn = "SliderThumb", os = f.forwardRef(
|
|
|
5313
5365
|
"data-disabled": i.disabled ? "" : void 0,
|
|
5314
5366
|
tabIndex: i.disabled ? void 0 : 0,
|
|
5315
5367
|
...o,
|
|
5316
|
-
ref:
|
|
5368
|
+
ref: h,
|
|
5317
5369
|
style: g === void 0 ? { display: "none" } : e.style,
|
|
5318
5370
|
onFocus: F(e.onFocus, () => {
|
|
5319
5371
|
i.valueIndexToChangeRef.current = a;
|
|
5320
5372
|
})
|
|
5321
5373
|
}
|
|
5322
5374
|
) }),
|
|
5323
|
-
|
|
5375
|
+
f && /* @__PURE__ */ u.jsx(
|
|
5324
5376
|
nh,
|
|
5325
5377
|
{
|
|
5326
5378
|
name: r ?? (i.name ? i.name + (i.values.length > 1 ? "[]" : "") : void 0),
|
|
@@ -5336,8 +5388,8 @@ var Vn = "SliderThumb", os = f.forwardRef(
|
|
|
5336
5388
|
);
|
|
5337
5389
|
os.displayName = Vn;
|
|
5338
5390
|
var nh = (e) => {
|
|
5339
|
-
const { value: t, ...n } = e, a =
|
|
5340
|
-
return
|
|
5391
|
+
const { value: t, ...n } = e, a = d.useRef(null), r = Sl(t);
|
|
5392
|
+
return d.useEffect(() => {
|
|
5341
5393
|
const o = a.current, i = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(i, "value").set;
|
|
5342
5394
|
if (r !== t && l) {
|
|
5343
5395
|
const c = new Event("input", { bubbles: !0 });
|
|
@@ -5390,7 +5442,7 @@ function uh(e, t) {
|
|
|
5390
5442
|
return Math.round(e * n) / n;
|
|
5391
5443
|
}
|
|
5392
5444
|
var is = Qo, dh = as, fh = rs, mh = os;
|
|
5393
|
-
const hh =
|
|
5445
|
+
const hh = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsxs(
|
|
5394
5446
|
is,
|
|
5395
5447
|
{
|
|
5396
5448
|
ref: n,
|
|
@@ -5419,7 +5471,7 @@ hh.displayName = is.displayName;
|
|
|
5419
5471
|
var dn = "Menubar", [Gn, ph, gh] = Qn(dn), [ls, mg] = Qe(dn, [
|
|
5420
5472
|
gh,
|
|
5421
5473
|
or
|
|
5422
|
-
]), me = Vi(), cs = or(), [bh, ma] = ls(dn), us =
|
|
5474
|
+
]), me = Vi(), cs = or(), [bh, ma] = ls(dn), us = d.forwardRef(
|
|
5423
5475
|
(e, t) => {
|
|
5424
5476
|
const {
|
|
5425
5477
|
__scopeMenubar: n,
|
|
@@ -5429,28 +5481,28 @@ var dn = "Menubar", [Gn, ph, gh] = Qn(dn), [ls, mg] = Qe(dn, [
|
|
|
5429
5481
|
loop: i = !0,
|
|
5430
5482
|
dir: s,
|
|
5431
5483
|
...l
|
|
5432
|
-
} = e, c = Jn(s),
|
|
5484
|
+
} = e, c = Jn(s), h = cs(n), [f = "", m] = It({
|
|
5433
5485
|
prop: a,
|
|
5434
5486
|
onChange: r,
|
|
5435
5487
|
defaultProp: o
|
|
5436
|
-
}), [g, b] =
|
|
5488
|
+
}), [g, b] = d.useState(null);
|
|
5437
5489
|
return /* @__PURE__ */ u.jsx(
|
|
5438
5490
|
bh,
|
|
5439
5491
|
{
|
|
5440
5492
|
scope: n,
|
|
5441
|
-
value:
|
|
5442
|
-
onMenuOpen:
|
|
5493
|
+
value: f,
|
|
5494
|
+
onMenuOpen: d.useCallback(
|
|
5443
5495
|
(w) => {
|
|
5444
|
-
|
|
5496
|
+
m(w), b(w);
|
|
5445
5497
|
},
|
|
5446
|
-
[
|
|
5498
|
+
[m]
|
|
5447
5499
|
),
|
|
5448
|
-
onMenuClose:
|
|
5449
|
-
onMenuToggle:
|
|
5500
|
+
onMenuClose: d.useCallback(() => m(""), [m]),
|
|
5501
|
+
onMenuToggle: d.useCallback(
|
|
5450
5502
|
(w) => {
|
|
5451
|
-
|
|
5503
|
+
m((p) => p ? "" : w), b(w);
|
|
5452
5504
|
},
|
|
5453
|
-
[
|
|
5505
|
+
[m]
|
|
5454
5506
|
),
|
|
5455
5507
|
dir: c,
|
|
5456
5508
|
loop: i,
|
|
@@ -5458,7 +5510,7 @@ var dn = "Menubar", [Gn, ph, gh] = Qn(dn), [ls, mg] = Qe(dn, [
|
|
|
5458
5510
|
Ml,
|
|
5459
5511
|
{
|
|
5460
5512
|
asChild: !0,
|
|
5461
|
-
...
|
|
5513
|
+
...h,
|
|
5462
5514
|
orientation: "horizontal",
|
|
5463
5515
|
loop: i,
|
|
5464
5516
|
dir: c,
|
|
@@ -5473,10 +5525,10 @@ var dn = "Menubar", [Gn, ph, gh] = Qn(dn), [ls, mg] = Qe(dn, [
|
|
|
5473
5525
|
);
|
|
5474
5526
|
us.displayName = dn;
|
|
5475
5527
|
var ha = "MenubarMenu", [vh, ds] = ls(ha), fs = (e) => {
|
|
5476
|
-
const { __scopeMenubar: t, value: n, ...a } = e, r = Mn(), o = n || r || "LEGACY_REACT_AUTO_VALUE", i = ma(ha, t), s = me(t), l =
|
|
5477
|
-
return
|
|
5478
|
-
|
|
5479
|
-
}, [
|
|
5528
|
+
const { __scopeMenubar: t, value: n, ...a } = e, r = Mn(), o = n || r || "LEGACY_REACT_AUTO_VALUE", i = ma(ha, t), s = me(t), l = d.useRef(null), c = d.useRef(!1), h = i.value === o;
|
|
5529
|
+
return d.useEffect(() => {
|
|
5530
|
+
h || (c.current = !1);
|
|
5531
|
+
}, [h]), /* @__PURE__ */ u.jsx(
|
|
5480
5532
|
vh,
|
|
5481
5533
|
{
|
|
5482
5534
|
scope: t,
|
|
@@ -5489,9 +5541,9 @@ var ha = "MenubarMenu", [vh, ds] = ls(ha), fs = (e) => {
|
|
|
5489
5541
|
ol,
|
|
5490
5542
|
{
|
|
5491
5543
|
...s,
|
|
5492
|
-
open:
|
|
5493
|
-
onOpenChange: (
|
|
5494
|
-
|
|
5544
|
+
open: h,
|
|
5545
|
+
onOpenChange: (f) => {
|
|
5546
|
+
f || i.onMenuClose();
|
|
5495
5547
|
},
|
|
5496
5548
|
modal: !1,
|
|
5497
5549
|
dir: i.dir,
|
|
@@ -5502,9 +5554,9 @@ var ha = "MenubarMenu", [vh, ds] = ls(ha), fs = (e) => {
|
|
|
5502
5554
|
);
|
|
5503
5555
|
};
|
|
5504
5556
|
fs.displayName = ha;
|
|
5505
|
-
var Kn = "MenubarTrigger", ms =
|
|
5557
|
+
var Kn = "MenubarTrigger", ms = d.forwardRef(
|
|
5506
5558
|
(e, t) => {
|
|
5507
|
-
const { __scopeMenubar: n, disabled: a = !1, ...r } = e, o = cs(n), i = me(n), s = ma(Kn, n), l = ds(Kn, n), c =
|
|
5559
|
+
const { __scopeMenubar: n, disabled: a = !1, ...r } = e, o = cs(n), i = me(n), s = ma(Kn, n), l = ds(Kn, n), c = d.useRef(null), h = he(t, c, l.triggerRef), [f, m] = d.useState(!1), g = s.value === l.value;
|
|
5508
5560
|
return /* @__PURE__ */ u.jsx(Gn.ItemSlot, { scope: n, value: l.value, disabled: a, children: /* @__PURE__ */ u.jsx(
|
|
5509
5561
|
Cl,
|
|
5510
5562
|
{
|
|
@@ -5521,12 +5573,12 @@ var Kn = "MenubarTrigger", ms = f.forwardRef(
|
|
|
5521
5573
|
"aria-haspopup": "menu",
|
|
5522
5574
|
"aria-expanded": g,
|
|
5523
5575
|
"aria-controls": g ? l.contentId : void 0,
|
|
5524
|
-
"data-highlighted":
|
|
5576
|
+
"data-highlighted": f ? "" : void 0,
|
|
5525
5577
|
"data-state": g ? "open" : "closed",
|
|
5526
5578
|
"data-disabled": a ? "" : void 0,
|
|
5527
5579
|
disabled: a,
|
|
5528
5580
|
...r,
|
|
5529
|
-
ref:
|
|
5581
|
+
ref: h,
|
|
5530
5582
|
onPointerDown: F(e.onPointerDown, (b) => {
|
|
5531
5583
|
!a && b.button === 0 && b.ctrlKey === !1 && (s.onMenuOpen(l.value), g || b.preventDefault());
|
|
5532
5584
|
}),
|
|
@@ -5537,8 +5589,8 @@ var Kn = "MenubarTrigger", ms = f.forwardRef(
|
|
|
5537
5589
|
onKeyDown: F(e.onKeyDown, (b) => {
|
|
5538
5590
|
a || (["Enter", " "].includes(b.key) && s.onMenuToggle(l.value), b.key === "ArrowDown" && s.onMenuOpen(l.value), ["Enter", " ", "ArrowDown"].includes(b.key) && (l.wasKeyboardTriggerOpenRef.current = !0, b.preventDefault()));
|
|
5539
5591
|
}),
|
|
5540
|
-
onFocus: F(e.onFocus, () =>
|
|
5541
|
-
onBlur: F(e.onBlur, () =>
|
|
5592
|
+
onFocus: F(e.onFocus, () => m(!0)),
|
|
5593
|
+
onBlur: F(e.onBlur, () => m(!1))
|
|
5542
5594
|
}
|
|
5543
5595
|
) })
|
|
5544
5596
|
}
|
|
@@ -5551,9 +5603,9 @@ var wh = "MenubarPortal", hs = (e) => {
|
|
|
5551
5603
|
return /* @__PURE__ */ u.jsx(sl, { ...a, ...n });
|
|
5552
5604
|
};
|
|
5553
5605
|
hs.displayName = wh;
|
|
5554
|
-
var Un = "MenubarContent", ps =
|
|
5606
|
+
var Un = "MenubarContent", ps = d.forwardRef(
|
|
5555
5607
|
(e, t) => {
|
|
5556
|
-
const { __scopeMenubar: n, align: a = "start", ...r } = e, o = me(n), i = ma(Un, n), s = ds(Un, n), l = ph(n), c =
|
|
5608
|
+
const { __scopeMenubar: n, align: a = "start", ...r } = e, o = me(n), i = ma(Un, n), s = ds(Un, n), l = ph(n), c = d.useRef(!1);
|
|
5557
5609
|
return /* @__PURE__ */ u.jsx(
|
|
5558
5610
|
Ki,
|
|
5559
5611
|
{
|
|
@@ -5564,35 +5616,35 @@ var Un = "MenubarContent", ps = f.forwardRef(
|
|
|
5564
5616
|
...r,
|
|
5565
5617
|
ref: t,
|
|
5566
5618
|
align: a,
|
|
5567
|
-
onCloseAutoFocus: F(e.onCloseAutoFocus, (
|
|
5568
|
-
var
|
|
5569
|
-
!!!i.value && !c.current && ((
|
|
5619
|
+
onCloseAutoFocus: F(e.onCloseAutoFocus, (h) => {
|
|
5620
|
+
var m;
|
|
5621
|
+
!!!i.value && !c.current && ((m = s.triggerRef.current) == null || m.focus()), c.current = !1, h.preventDefault();
|
|
5570
5622
|
}),
|
|
5571
|
-
onFocusOutside: F(e.onFocusOutside, (
|
|
5572
|
-
const
|
|
5623
|
+
onFocusOutside: F(e.onFocusOutside, (h) => {
|
|
5624
|
+
const f = h.target;
|
|
5573
5625
|
l().some((g) => {
|
|
5574
5626
|
var b;
|
|
5575
|
-
return (b = g.ref.current) == null ? void 0 : b.contains(
|
|
5576
|
-
}) &&
|
|
5627
|
+
return (b = g.ref.current) == null ? void 0 : b.contains(f);
|
|
5628
|
+
}) && h.preventDefault();
|
|
5577
5629
|
}),
|
|
5578
5630
|
onInteractOutside: F(e.onInteractOutside, () => {
|
|
5579
5631
|
c.current = !0;
|
|
5580
5632
|
}),
|
|
5581
|
-
onEntryFocus: (
|
|
5582
|
-
s.wasKeyboardTriggerOpenRef.current ||
|
|
5633
|
+
onEntryFocus: (h) => {
|
|
5634
|
+
s.wasKeyboardTriggerOpenRef.current || h.preventDefault();
|
|
5583
5635
|
},
|
|
5584
5636
|
onKeyDown: F(
|
|
5585
5637
|
e.onKeyDown,
|
|
5586
|
-
(
|
|
5587
|
-
if (["ArrowRight", "ArrowLeft"].includes(
|
|
5588
|
-
const
|
|
5589
|
-
if (!w &&
|
|
5638
|
+
(h) => {
|
|
5639
|
+
if (["ArrowRight", "ArrowLeft"].includes(h.key)) {
|
|
5640
|
+
const f = h.target, m = f.hasAttribute("data-radix-menubar-subtrigger"), g = f.closest("[data-radix-menubar-content]") !== h.currentTarget, w = (i.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === h.key;
|
|
5641
|
+
if (!w && m || g && w) return;
|
|
5590
5642
|
let S = l().filter((x) => !x.disabled).map((x) => x.value);
|
|
5591
5643
|
w && S.reverse();
|
|
5592
5644
|
const y = S.indexOf(s.value);
|
|
5593
5645
|
S = i.loop ? Oh(S, y + 1) : S.slice(y + 1);
|
|
5594
|
-
const [
|
|
5595
|
-
|
|
5646
|
+
const [M] = S;
|
|
5647
|
+
M && i.onMenuOpen(M);
|
|
5596
5648
|
}
|
|
5597
5649
|
},
|
|
5598
5650
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -5610,61 +5662,61 @@ var Un = "MenubarContent", ps = f.forwardRef(
|
|
|
5610
5662
|
}
|
|
5611
5663
|
);
|
|
5612
5664
|
ps.displayName = Un;
|
|
5613
|
-
var yh = "MenubarGroup", gs =
|
|
5665
|
+
var yh = "MenubarGroup", gs = d.forwardRef(
|
|
5614
5666
|
(e, t) => {
|
|
5615
5667
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5616
5668
|
return /* @__PURE__ */ u.jsx(Ui, { ...r, ...a, ref: t });
|
|
5617
5669
|
}
|
|
5618
5670
|
);
|
|
5619
5671
|
gs.displayName = yh;
|
|
5620
|
-
var xh = "MenubarLabel", bs =
|
|
5672
|
+
var xh = "MenubarLabel", bs = d.forwardRef(
|
|
5621
5673
|
(e, t) => {
|
|
5622
5674
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5623
5675
|
return /* @__PURE__ */ u.jsx(qi, { ...r, ...a, ref: t });
|
|
5624
5676
|
}
|
|
5625
5677
|
);
|
|
5626
5678
|
bs.displayName = xh;
|
|
5627
|
-
var Sh = "MenubarItem", vs =
|
|
5679
|
+
var Sh = "MenubarItem", vs = d.forwardRef(
|
|
5628
5680
|
(e, t) => {
|
|
5629
5681
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5630
5682
|
return /* @__PURE__ */ u.jsx(Xi, { ...r, ...a, ref: t });
|
|
5631
5683
|
}
|
|
5632
5684
|
);
|
|
5633
5685
|
vs.displayName = Sh;
|
|
5634
|
-
var Mh = "MenubarCheckboxItem", ws =
|
|
5686
|
+
var Mh = "MenubarCheckboxItem", ws = d.forwardRef(
|
|
5635
5687
|
(e, t) => {
|
|
5636
5688
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5637
5689
|
return /* @__PURE__ */ u.jsx(Zi, { ...r, ...a, ref: t });
|
|
5638
5690
|
}
|
|
5639
5691
|
);
|
|
5640
5692
|
ws.displayName = Mh;
|
|
5641
|
-
var Ch = "MenubarRadioGroup", ys =
|
|
5693
|
+
var Ch = "MenubarRadioGroup", ys = d.forwardRef(
|
|
5642
5694
|
(e, t) => {
|
|
5643
5695
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5644
5696
|
return /* @__PURE__ */ u.jsx(Qi, { ...r, ...a, ref: t });
|
|
5645
5697
|
}
|
|
5646
5698
|
);
|
|
5647
5699
|
ys.displayName = Ch;
|
|
5648
|
-
var Nh = "MenubarRadioItem", xs =
|
|
5700
|
+
var Nh = "MenubarRadioItem", xs = d.forwardRef(
|
|
5649
5701
|
(e, t) => {
|
|
5650
5702
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5651
5703
|
return /* @__PURE__ */ u.jsx(Ji, { ...r, ...a, ref: t });
|
|
5652
5704
|
}
|
|
5653
5705
|
);
|
|
5654
5706
|
xs.displayName = Nh;
|
|
5655
|
-
var Ph = "MenubarItemIndicator", Ss =
|
|
5707
|
+
var Ph = "MenubarItemIndicator", Ss = d.forwardRef((e, t) => {
|
|
5656
5708
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5657
5709
|
return /* @__PURE__ */ u.jsx(el, { ...r, ...a, ref: t });
|
|
5658
5710
|
});
|
|
5659
5711
|
Ss.displayName = Ph;
|
|
5660
|
-
var Dh = "MenubarSeparator", Ms =
|
|
5712
|
+
var Dh = "MenubarSeparator", Ms = d.forwardRef(
|
|
5661
5713
|
(e, t) => {
|
|
5662
5714
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5663
5715
|
return /* @__PURE__ */ u.jsx(tl, { ...r, ...a, ref: t });
|
|
5664
5716
|
}
|
|
5665
5717
|
);
|
|
5666
5718
|
Ms.displayName = Dh;
|
|
5667
|
-
var Th = "MenubarArrow", Eh =
|
|
5719
|
+
var Th = "MenubarArrow", Eh = d.forwardRef(
|
|
5668
5720
|
(e, t) => {
|
|
5669
5721
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5670
5722
|
return /* @__PURE__ */ u.jsx(nl, { ...r, ...a, ref: t });
|
|
@@ -5680,7 +5732,7 @@ var Rh = "MenubarSub", Cs = (e) => {
|
|
|
5680
5732
|
return /* @__PURE__ */ u.jsx(il, { ...i, open: s, onOpenChange: l, children: n });
|
|
5681
5733
|
};
|
|
5682
5734
|
Cs.displayName = Rh;
|
|
5683
|
-
var kh = "MenubarSubTrigger", Ns =
|
|
5735
|
+
var kh = "MenubarSubTrigger", Ns = d.forwardRef(
|
|
5684
5736
|
(e, t) => {
|
|
5685
5737
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5686
5738
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -5695,7 +5747,7 @@ var kh = "MenubarSubTrigger", Ns = f.forwardRef(
|
|
|
5695
5747
|
}
|
|
5696
5748
|
);
|
|
5697
5749
|
Ns.displayName = kh;
|
|
5698
|
-
var _h = "MenubarSubContent", Ps =
|
|
5750
|
+
var _h = "MenubarSubContent", Ps = d.forwardRef(
|
|
5699
5751
|
(e, t) => {
|
|
5700
5752
|
const { __scopeMenubar: n, ...a } = e, r = me(n);
|
|
5701
5753
|
return /* @__PURE__ */ u.jsx(
|
|
@@ -5778,7 +5830,7 @@ const hg = Ih, pg = Ah, gg = Es, bg = Wh, vg = jh, Lh = ft(
|
|
|
5778
5830
|
size: "default"
|
|
5779
5831
|
}
|
|
5780
5832
|
}
|
|
5781
|
-
), zh =
|
|
5833
|
+
), zh = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
5782
5834
|
Ds,
|
|
5783
5835
|
{
|
|
5784
5836
|
ref: n,
|
|
@@ -5787,7 +5839,7 @@ const hg = Ih, pg = Ah, gg = Es, bg = Wh, vg = jh, Lh = ft(
|
|
|
5787
5839
|
}
|
|
5788
5840
|
));
|
|
5789
5841
|
zh.displayName = Ds.displayName;
|
|
5790
|
-
const Fh =
|
|
5842
|
+
const Fh = d.forwardRef(({ className: e, variant: t, size: n, ...a }, r) => /* @__PURE__ */ u.jsx(
|
|
5791
5843
|
Ts,
|
|
5792
5844
|
{
|
|
5793
5845
|
ref: r,
|
|
@@ -5796,7 +5848,7 @@ const Fh = f.forwardRef(({ className: e, variant: t, size: n, ...a }, r) => /* @
|
|
|
5796
5848
|
}
|
|
5797
5849
|
));
|
|
5798
5850
|
Fh.displayName = Ts.displayName;
|
|
5799
|
-
const $h =
|
|
5851
|
+
const $h = d.forwardRef(({ className: e, inset: t, children: n, ...a }, r) => /* @__PURE__ */ u.jsxs(
|
|
5800
5852
|
Ws,
|
|
5801
5853
|
{
|
|
5802
5854
|
ref: r,
|
|
@@ -5813,7 +5865,7 @@ const $h = f.forwardRef(({ className: e, inset: t, children: n, ...a }, r) => /*
|
|
|
5813
5865
|
}
|
|
5814
5866
|
));
|
|
5815
5867
|
$h.displayName = Ws.displayName;
|
|
5816
|
-
const Bh =
|
|
5868
|
+
const Bh = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
5817
5869
|
Ls,
|
|
5818
5870
|
{
|
|
5819
5871
|
ref: n,
|
|
@@ -5825,7 +5877,7 @@ const Bh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
5825
5877
|
}
|
|
5826
5878
|
));
|
|
5827
5879
|
Bh.displayName = Ls.displayName;
|
|
5828
|
-
const Hh =
|
|
5880
|
+
const Hh = d.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4, sideOffset: a = 8, ...r }, o) => /* @__PURE__ */ u.jsx(Es, { children: /* @__PURE__ */ u.jsx(
|
|
5829
5881
|
Rs,
|
|
5830
5882
|
{
|
|
5831
5883
|
ref: o,
|
|
@@ -5840,7 +5892,7 @@ const Hh = f.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4
|
|
|
5840
5892
|
}
|
|
5841
5893
|
) }));
|
|
5842
5894
|
Hh.displayName = Rs.displayName;
|
|
5843
|
-
const Yh =
|
|
5895
|
+
const Yh = d.forwardRef(({ className: e, inset: t, ...n }, a) => /* @__PURE__ */ u.jsx(
|
|
5844
5896
|
_s,
|
|
5845
5897
|
{
|
|
5846
5898
|
ref: a,
|
|
@@ -5853,7 +5905,7 @@ const Yh = f.forwardRef(({ className: e, inset: t, ...n }, a) => /* @__PURE__ */
|
|
|
5853
5905
|
}
|
|
5854
5906
|
));
|
|
5855
5907
|
Yh.displayName = _s.displayName;
|
|
5856
|
-
const Vh =
|
|
5908
|
+
const Vh = d.forwardRef(({ className: e, children: t, checked: n, ...a }, r) => /* @__PURE__ */ u.jsxs(
|
|
5857
5909
|
Os,
|
|
5858
5910
|
{
|
|
5859
5911
|
ref: r,
|
|
@@ -5870,7 +5922,7 @@ const Vh = f.forwardRef(({ className: e, children: t, checked: n, ...a }, r) =>
|
|
|
5870
5922
|
}
|
|
5871
5923
|
));
|
|
5872
5924
|
Vh.displayName = Os.displayName;
|
|
5873
|
-
const Gh =
|
|
5925
|
+
const Gh = d.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ u.jsxs(
|
|
5874
5926
|
Is,
|
|
5875
5927
|
{
|
|
5876
5928
|
ref: a,
|
|
@@ -5886,7 +5938,7 @@ const Gh = f.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__
|
|
|
5886
5938
|
}
|
|
5887
5939
|
));
|
|
5888
5940
|
Gh.displayName = Is.displayName;
|
|
5889
|
-
const Kh =
|
|
5941
|
+
const Kh = d.forwardRef(({ className: e, inset: t, ...n }, a) => /* @__PURE__ */ u.jsx(
|
|
5890
5942
|
ks,
|
|
5891
5943
|
{
|
|
5892
5944
|
ref: a,
|
|
@@ -5895,7 +5947,7 @@ const Kh = f.forwardRef(({ className: e, inset: t, ...n }, a) => /* @__PURE__ */
|
|
|
5895
5947
|
}
|
|
5896
5948
|
));
|
|
5897
5949
|
Kh.displayName = ks.displayName;
|
|
5898
|
-
const Uh =
|
|
5950
|
+
const Uh = d.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
5899
5951
|
js,
|
|
5900
5952
|
{
|
|
5901
5953
|
ref: n,
|
|
@@ -5922,7 +5974,7 @@ const Xh = ({ className: e, ...t }) => /* @__PURE__ */ u.jsx(
|
|
|
5922
5974
|
}
|
|
5923
5975
|
);
|
|
5924
5976
|
Xh.displayName = "Pagination";
|
|
5925
|
-
const Zh =
|
|
5977
|
+
const Zh = d.forwardRef(
|
|
5926
5978
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
5927
5979
|
"ul",
|
|
5928
5980
|
{
|
|
@@ -5933,7 +5985,7 @@ const Zh = f.forwardRef(
|
|
|
5933
5985
|
)
|
|
5934
5986
|
);
|
|
5935
5987
|
Zh.displayName = "PaginationContent";
|
|
5936
|
-
const Qh =
|
|
5988
|
+
const Qh = d.forwardRef(
|
|
5937
5989
|
({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx("li", { ref: n, className: P("al-", e), ...t })
|
|
5938
5990
|
);
|
|
5939
5991
|
Qh.displayName = "PaginationItem";
|
|
@@ -6018,7 +6070,7 @@ const {
|
|
|
6018
6070
|
useMemo: rp,
|
|
6019
6071
|
useRef: be,
|
|
6020
6072
|
useState: st
|
|
6021
|
-
} =
|
|
6073
|
+
} = d, Ua = d[`useId${Math.random()}`.slice(0, 5)], op = ap, fn = np(null);
|
|
6022
6074
|
fn.displayName = "PanelGroupContext";
|
|
6023
6075
|
const Xe = op, sp = typeof Ua == "function" ? Ua : () => null;
|
|
6024
6076
|
let ip = 0;
|
|
@@ -6037,9 +6089,9 @@ function Bs({
|
|
|
6037
6089
|
maxSize: s,
|
|
6038
6090
|
minSize: l,
|
|
6039
6091
|
onCollapse: c,
|
|
6040
|
-
onExpand:
|
|
6041
|
-
onResize:
|
|
6042
|
-
order:
|
|
6092
|
+
onExpand: h,
|
|
6093
|
+
onResize: f,
|
|
6094
|
+
order: m,
|
|
6043
6095
|
style: g,
|
|
6044
6096
|
tagName: b = "div",
|
|
6045
6097
|
...w
|
|
@@ -6051,18 +6103,18 @@ function Bs({
|
|
|
6051
6103
|
collapsePanel: v,
|
|
6052
6104
|
expandPanel: S,
|
|
6053
6105
|
getPanelSize: y,
|
|
6054
|
-
getPanelStyle:
|
|
6106
|
+
getPanelStyle: M,
|
|
6055
6107
|
groupId: x,
|
|
6056
6108
|
isPanelCollapsed: N,
|
|
6057
|
-
reevaluatePanelConstraints:
|
|
6058
|
-
registerPanel:
|
|
6059
|
-
resizePanel:
|
|
6109
|
+
reevaluatePanelConstraints: C,
|
|
6110
|
+
registerPanel: D,
|
|
6111
|
+
resizePanel: R,
|
|
6060
6112
|
unregisterPanel: j
|
|
6061
|
-
} = p,
|
|
6113
|
+
} = p, k = ga(i), I = be({
|
|
6062
6114
|
callbacks: {
|
|
6063
6115
|
onCollapse: c,
|
|
6064
|
-
onExpand:
|
|
6065
|
-
onResize:
|
|
6116
|
+
onExpand: h,
|
|
6117
|
+
onResize: f
|
|
6066
6118
|
},
|
|
6067
6119
|
constraints: {
|
|
6068
6120
|
collapsedSize: n,
|
|
@@ -6071,34 +6123,34 @@ function Bs({
|
|
|
6071
6123
|
maxSize: s,
|
|
6072
6124
|
minSize: l
|
|
6073
6125
|
},
|
|
6074
|
-
id:
|
|
6126
|
+
id: k,
|
|
6075
6127
|
idIsFromProps: i !== void 0,
|
|
6076
|
-
order:
|
|
6128
|
+
order: m
|
|
6077
6129
|
});
|
|
6078
6130
|
be({
|
|
6079
6131
|
didLogMissingDefaultSizeWarning: !1
|
|
6080
6132
|
}), Xe(() => {
|
|
6081
6133
|
const {
|
|
6082
|
-
callbacks:
|
|
6134
|
+
callbacks: _,
|
|
6083
6135
|
constraints: H
|
|
6084
6136
|
} = I.current, z = {
|
|
6085
6137
|
...H
|
|
6086
6138
|
};
|
|
6087
|
-
I.current.id =
|
|
6139
|
+
I.current.id = k, I.current.idIsFromProps = i !== void 0, I.current.order = m, _.onCollapse = c, _.onExpand = h, _.onResize = f, H.collapsedSize = n, H.collapsible = a, H.defaultSize = r, H.maxSize = s, H.minSize = l, (z.collapsedSize !== H.collapsedSize || z.collapsible !== H.collapsible || z.maxSize !== H.maxSize || z.minSize !== H.minSize) && C(I.current, z);
|
|
6088
6140
|
}), Xe(() => {
|
|
6089
|
-
const
|
|
6090
|
-
return
|
|
6091
|
-
j(
|
|
6141
|
+
const _ = I.current;
|
|
6142
|
+
return D(_), () => {
|
|
6143
|
+
j(_);
|
|
6092
6144
|
};
|
|
6093
|
-
}, [
|
|
6145
|
+
}, [m, k, D, j]), $s(o, () => ({
|
|
6094
6146
|
collapse: () => {
|
|
6095
6147
|
v(I.current);
|
|
6096
6148
|
},
|
|
6097
|
-
expand: (
|
|
6098
|
-
S(I.current,
|
|
6149
|
+
expand: (_) => {
|
|
6150
|
+
S(I.current, _);
|
|
6099
6151
|
},
|
|
6100
6152
|
getId() {
|
|
6101
|
-
return
|
|
6153
|
+
return k;
|
|
6102
6154
|
},
|
|
6103
6155
|
getSize() {
|
|
6104
6156
|
return y(I.current);
|
|
@@ -6109,11 +6161,11 @@ function Bs({
|
|
|
6109
6161
|
isExpanded() {
|
|
6110
6162
|
return !N(I.current);
|
|
6111
6163
|
},
|
|
6112
|
-
resize: (
|
|
6113
|
-
|
|
6164
|
+
resize: (_) => {
|
|
6165
|
+
R(I.current, _);
|
|
6114
6166
|
}
|
|
6115
|
-
}), [v, S, y, N,
|
|
6116
|
-
const U =
|
|
6167
|
+
}), [v, S, y, N, k, R]);
|
|
6168
|
+
const U = M(I.current, r);
|
|
6117
6169
|
return ct(b, {
|
|
6118
6170
|
...w,
|
|
6119
6171
|
children: e,
|
|
@@ -6127,7 +6179,7 @@ function Bs({
|
|
|
6127
6179
|
"data-panel": "",
|
|
6128
6180
|
"data-panel-collapsible": a || void 0,
|
|
6129
6181
|
"data-panel-group-id": x,
|
|
6130
|
-
"data-panel-id":
|
|
6182
|
+
"data-panel-id": k,
|
|
6131
6183
|
"data-panel-size": parseFloat("" + U.flexGrow).toFixed(1)
|
|
6132
6184
|
});
|
|
6133
6185
|
}
|
|
@@ -6274,12 +6326,12 @@ function bp(e, t, n, a, r) {
|
|
|
6274
6326
|
setResizeHandlerState: r
|
|
6275
6327
|
}, l = (o = $e.get(i)) !== null && o !== void 0 ? o : 0;
|
|
6276
6328
|
return $e.set(i, l + 1), _t.add(s), qt(), function() {
|
|
6277
|
-
var
|
|
6329
|
+
var h;
|
|
6278
6330
|
hn.delete(e), _t.delete(s);
|
|
6279
|
-
const
|
|
6280
|
-
if ($e.set(i,
|
|
6281
|
-
const
|
|
6282
|
-
|
|
6331
|
+
const f = (h = $e.get(i)) !== null && h !== void 0 ? h : 1;
|
|
6332
|
+
if ($e.set(i, f - 1), qt(), f === 1 && $e.delete(i), Pe.includes(s)) {
|
|
6333
|
+
const m = Pe.indexOf(s);
|
|
6334
|
+
m >= 0 && Pe.splice(m, 1), va(), r("up", !0, null);
|
|
6283
6335
|
}
|
|
6284
6336
|
};
|
|
6285
6337
|
}
|
|
@@ -6340,10 +6392,10 @@ function ba({
|
|
|
6340
6392
|
} = r, s = o.getBoundingClientRect(), {
|
|
6341
6393
|
bottom: l,
|
|
6342
6394
|
left: c,
|
|
6343
|
-
right:
|
|
6344
|
-
top:
|
|
6345
|
-
} = s,
|
|
6346
|
-
if (t >= c -
|
|
6395
|
+
right: h,
|
|
6396
|
+
top: f
|
|
6397
|
+
} = s, m = gp ? i.coarse : i.fine;
|
|
6398
|
+
if (t >= c - m && t <= h + m && n >= f - m && n <= l + m) {
|
|
6347
6399
|
if (a !== null && document.contains(a) && o !== a && !o.contains(a) && !a.contains(o) && // Calculating stacking order has a cost, so we should avoid it if possible
|
|
6348
6400
|
// That is why we only check potentially intersecting handles,
|
|
6349
6401
|
// and why we skip if the event target is within the handle's DOM
|
|
@@ -6471,32 +6523,32 @@ function Nt({
|
|
|
6471
6523
|
let c = 0;
|
|
6472
6524
|
if (o === "keyboard") {
|
|
6473
6525
|
{
|
|
6474
|
-
const
|
|
6475
|
-
B(
|
|
6526
|
+
const f = e < 0 ? l : s, m = n[f];
|
|
6527
|
+
B(m, `Panel constraints not found for index ${f}`);
|
|
6476
6528
|
const {
|
|
6477
6529
|
collapsedSize: g = 0,
|
|
6478
6530
|
collapsible: b,
|
|
6479
6531
|
minSize: w = 0
|
|
6480
|
-
} =
|
|
6532
|
+
} = m;
|
|
6481
6533
|
if (b) {
|
|
6482
|
-
const p = t[
|
|
6483
|
-
if (B(p != null, `Previous layout not found for panel index ${
|
|
6534
|
+
const p = t[f];
|
|
6535
|
+
if (B(p != null, `Previous layout not found for panel index ${f}`), we(p, g)) {
|
|
6484
6536
|
const v = w - p;
|
|
6485
6537
|
Ze(v, Math.abs(e)) > 0 && (e = e < 0 ? 0 - v : v);
|
|
6486
6538
|
}
|
|
6487
6539
|
}
|
|
6488
6540
|
}
|
|
6489
6541
|
{
|
|
6490
|
-
const
|
|
6491
|
-
B(
|
|
6542
|
+
const f = e < 0 ? s : l, m = n[f];
|
|
6543
|
+
B(m, `No panel constraints found for index ${f}`);
|
|
6492
6544
|
const {
|
|
6493
6545
|
collapsedSize: g = 0,
|
|
6494
6546
|
collapsible: b,
|
|
6495
6547
|
minSize: w = 0
|
|
6496
|
-
} =
|
|
6548
|
+
} = m;
|
|
6497
6549
|
if (b) {
|
|
6498
|
-
const p = t[
|
|
6499
|
-
if (B(p != null, `Previous layout not found for panel index ${
|
|
6550
|
+
const p = t[f];
|
|
6551
|
+
if (B(p != null, `Previous layout not found for panel index ${f}`), we(p, w)) {
|
|
6500
6552
|
const v = p - g;
|
|
6501
6553
|
Ze(v, Math.abs(e)) > 0 && (e = e < 0 ? 0 - v : v);
|
|
6502
6554
|
}
|
|
@@ -6504,67 +6556,67 @@ function Nt({
|
|
|
6504
6556
|
}
|
|
6505
6557
|
}
|
|
6506
6558
|
{
|
|
6507
|
-
const
|
|
6508
|
-
let
|
|
6559
|
+
const f = e < 0 ? 1 : -1;
|
|
6560
|
+
let m = e < 0 ? l : s, g = 0;
|
|
6509
6561
|
for (; ; ) {
|
|
6510
|
-
const w = t[
|
|
6511
|
-
B(w != null, `Previous layout not found for panel index ${
|
|
6562
|
+
const w = t[m];
|
|
6563
|
+
B(w != null, `Previous layout not found for panel index ${m}`);
|
|
6512
6564
|
const v = rt({
|
|
6513
6565
|
panelConstraints: n,
|
|
6514
|
-
panelIndex:
|
|
6566
|
+
panelIndex: m,
|
|
6515
6567
|
size: 100
|
|
6516
6568
|
}) - w;
|
|
6517
|
-
if (g += v,
|
|
6569
|
+
if (g += v, m += f, m < 0 || m >= n.length)
|
|
6518
6570
|
break;
|
|
6519
6571
|
}
|
|
6520
6572
|
const b = Math.min(Math.abs(e), Math.abs(g));
|
|
6521
6573
|
e = e < 0 ? 0 - b : b;
|
|
6522
6574
|
}
|
|
6523
6575
|
{
|
|
6524
|
-
let
|
|
6525
|
-
for (;
|
|
6526
|
-
const g = Math.abs(e) - Math.abs(c), b = t[
|
|
6527
|
-
B(b != null, `Previous layout not found for panel index ${
|
|
6576
|
+
let m = e < 0 ? s : l;
|
|
6577
|
+
for (; m >= 0 && m < n.length; ) {
|
|
6578
|
+
const g = Math.abs(e) - Math.abs(c), b = t[m];
|
|
6579
|
+
B(b != null, `Previous layout not found for panel index ${m}`);
|
|
6528
6580
|
const w = b - g, p = rt({
|
|
6529
6581
|
panelConstraints: n,
|
|
6530
|
-
panelIndex:
|
|
6582
|
+
panelIndex: m,
|
|
6531
6583
|
size: w
|
|
6532
6584
|
});
|
|
6533
|
-
if (!we(b, p) && (c += b - p, i[
|
|
6585
|
+
if (!we(b, p) && (c += b - p, i[m] = p, c.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3), void 0, {
|
|
6534
6586
|
numeric: !0
|
|
6535
6587
|
}) >= 0))
|
|
6536
6588
|
break;
|
|
6537
|
-
e < 0 ?
|
|
6589
|
+
e < 0 ? m-- : m++;
|
|
6538
6590
|
}
|
|
6539
6591
|
}
|
|
6540
6592
|
if (wp(r, i))
|
|
6541
6593
|
return r;
|
|
6542
6594
|
{
|
|
6543
|
-
const
|
|
6544
|
-
B(
|
|
6545
|
-
const g =
|
|
6595
|
+
const f = e < 0 ? l : s, m = t[f];
|
|
6596
|
+
B(m != null, `Previous layout not found for panel index ${f}`);
|
|
6597
|
+
const g = m + c, b = rt({
|
|
6546
6598
|
panelConstraints: n,
|
|
6547
|
-
panelIndex:
|
|
6599
|
+
panelIndex: f,
|
|
6548
6600
|
size: g
|
|
6549
6601
|
});
|
|
6550
|
-
if (i[
|
|
6602
|
+
if (i[f] = b, !we(b, g)) {
|
|
6551
6603
|
let w = g - b, v = e < 0 ? l : s;
|
|
6552
6604
|
for (; v >= 0 && v < n.length; ) {
|
|
6553
6605
|
const S = i[v];
|
|
6554
6606
|
B(S != null, `Previous layout not found for panel index ${v}`);
|
|
6555
|
-
const y = S + w,
|
|
6607
|
+
const y = S + w, M = rt({
|
|
6556
6608
|
panelConstraints: n,
|
|
6557
6609
|
panelIndex: v,
|
|
6558
6610
|
size: y
|
|
6559
6611
|
});
|
|
6560
|
-
if (we(S,
|
|
6612
|
+
if (we(S, M) || (w -= M - S, i[v] = M), we(w, 0))
|
|
6561
6613
|
break;
|
|
6562
6614
|
e > 0 ? v-- : v++;
|
|
6563
6615
|
}
|
|
6564
6616
|
}
|
|
6565
6617
|
}
|
|
6566
|
-
const
|
|
6567
|
-
return we(
|
|
6618
|
+
const h = i.reduce((f, m) => m + f, 0);
|
|
6619
|
+
return we(h, 100) ? i : r;
|
|
6568
6620
|
}
|
|
6569
6621
|
function yp({
|
|
6570
6622
|
layout: e,
|
|
@@ -6573,20 +6625,20 @@ function yp({
|
|
|
6573
6625
|
}) {
|
|
6574
6626
|
let a = 0, r = 100, o = 0, i = 0;
|
|
6575
6627
|
const s = n[0];
|
|
6576
|
-
B(s != null, "No pivot index found"), t.forEach((
|
|
6628
|
+
B(s != null, "No pivot index found"), t.forEach((f, m) => {
|
|
6577
6629
|
const {
|
|
6578
6630
|
constraints: g
|
|
6579
|
-
} =
|
|
6631
|
+
} = f, {
|
|
6580
6632
|
maxSize: b = 100,
|
|
6581
6633
|
minSize: w = 0
|
|
6582
6634
|
} = g;
|
|
6583
|
-
|
|
6635
|
+
m === s ? (a = w, r = b) : (o += w, i += b);
|
|
6584
6636
|
});
|
|
6585
|
-
const l = Math.min(r, 100 - o), c = Math.max(a, 100 - i),
|
|
6637
|
+
const l = Math.min(r, 100 - o), c = Math.max(a, 100 - i), h = e[s];
|
|
6586
6638
|
return {
|
|
6587
6639
|
valueMax: l,
|
|
6588
6640
|
valueMin: c,
|
|
6589
|
-
valueNow:
|
|
6641
|
+
valueNow: h
|
|
6590
6642
|
};
|
|
6591
6643
|
}
|
|
6592
6644
|
function Ot(e, t = document) {
|
|
@@ -6613,8 +6665,8 @@ function pn(e, t = document) {
|
|
|
6613
6665
|
}
|
|
6614
6666
|
function xp(e, t, n, a = document) {
|
|
6615
6667
|
var r, o, i, s;
|
|
6616
|
-
const l = pn(t, a), c = Ot(e, a),
|
|
6617
|
-
return [
|
|
6668
|
+
const l = pn(t, a), c = Ot(e, a), h = l ? c.indexOf(l) : -1, f = (r = (o = n[h]) === null || o === void 0 ? void 0 : o.id) !== null && r !== void 0 ? r : null, m = (i = (s = n[h + 1]) === null || s === void 0 ? void 0 : s.id) !== null && i !== void 0 ? i : null;
|
|
6669
|
+
return [f, m];
|
|
6618
6670
|
}
|
|
6619
6671
|
function Sp({
|
|
6620
6672
|
committedValuesRef: e,
|
|
@@ -6634,16 +6686,16 @@ function Sp({
|
|
|
6634
6686
|
for (let l = 0; l < r.length - 1; l++) {
|
|
6635
6687
|
const {
|
|
6636
6688
|
valueMax: c,
|
|
6637
|
-
valueMin:
|
|
6638
|
-
valueNow:
|
|
6689
|
+
valueMin: h,
|
|
6690
|
+
valueNow: f
|
|
6639
6691
|
} = yp({
|
|
6640
6692
|
layout: a,
|
|
6641
6693
|
panelsArray: r,
|
|
6642
6694
|
pivotIndices: [l, l + 1]
|
|
6643
|
-
}),
|
|
6644
|
-
if (
|
|
6695
|
+
}), m = s[l];
|
|
6696
|
+
if (m != null) {
|
|
6645
6697
|
const g = r[l];
|
|
6646
|
-
B(g, `No panel data found for index "${l}"`),
|
|
6698
|
+
B(g, `No panel data found for index "${l}"`), m.setAttribute("aria-controls", g.id), m.setAttribute("aria-valuemax", "" + Math.round(c)), m.setAttribute("aria-valuemin", "" + Math.round(h)), m.setAttribute("aria-valuenow", f != null ? "" + Math.round(f) : "");
|
|
6647
6699
|
}
|
|
6648
6700
|
}
|
|
6649
6701
|
return () => {
|
|
@@ -6660,10 +6712,10 @@ function Sp({
|
|
|
6660
6712
|
panelDataArray: l
|
|
6661
6713
|
} = s, c = ei(n, o);
|
|
6662
6714
|
B(c != null, `No group found for id "${n}"`);
|
|
6663
|
-
const
|
|
6664
|
-
B(
|
|
6665
|
-
const
|
|
6666
|
-
const g =
|
|
6715
|
+
const h = Ot(n, o);
|
|
6716
|
+
B(h, `No resize handles found for group id "${n}"`);
|
|
6717
|
+
const f = h.map((m) => {
|
|
6718
|
+
const g = m.getAttribute("data-panel-resize-handle-id");
|
|
6667
6719
|
B(g, "Resize handle element has no handle id attribute");
|
|
6668
6720
|
const [b, w] = xp(n, g, l, o);
|
|
6669
6721
|
if (b == null || w == null)
|
|
@@ -6678,33 +6730,33 @@ function Sp({
|
|
|
6678
6730
|
if (S >= 0) {
|
|
6679
6731
|
const y = l[S];
|
|
6680
6732
|
B(y, `No panel data found for index ${S}`);
|
|
6681
|
-
const
|
|
6733
|
+
const M = a[S], {
|
|
6682
6734
|
collapsedSize: x = 0,
|
|
6683
6735
|
collapsible: N,
|
|
6684
|
-
minSize:
|
|
6736
|
+
minSize: C = 0
|
|
6685
6737
|
} = y.constraints;
|
|
6686
|
-
if (
|
|
6687
|
-
const
|
|
6688
|
-
delta: we(
|
|
6738
|
+
if (M != null && N) {
|
|
6739
|
+
const D = Nt({
|
|
6740
|
+
delta: we(M, x) ? C - x : x - M,
|
|
6689
6741
|
initialLayout: a,
|
|
6690
|
-
panelConstraints: l.map((
|
|
6742
|
+
panelConstraints: l.map((R) => R.constraints),
|
|
6691
6743
|
pivotIndices: Js(n, g, o),
|
|
6692
6744
|
prevLayout: a,
|
|
6693
6745
|
trigger: "keyboard"
|
|
6694
6746
|
});
|
|
6695
|
-
a !==
|
|
6747
|
+
a !== D && i(D);
|
|
6696
6748
|
}
|
|
6697
6749
|
}
|
|
6698
6750
|
break;
|
|
6699
6751
|
}
|
|
6700
6752
|
}
|
|
6701
6753
|
};
|
|
6702
|
-
return
|
|
6703
|
-
|
|
6754
|
+
return m.addEventListener("keydown", p), () => {
|
|
6755
|
+
m.removeEventListener("keydown", p);
|
|
6704
6756
|
};
|
|
6705
6757
|
});
|
|
6706
6758
|
return () => {
|
|
6707
|
-
|
|
6759
|
+
f.forEach((m) => m());
|
|
6708
6760
|
};
|
|
6709
6761
|
}, [o, e, t, n, a, r, i]);
|
|
6710
6762
|
}
|
|
@@ -6731,10 +6783,10 @@ function Mp(e, t, n, a, r) {
|
|
|
6731
6783
|
let {
|
|
6732
6784
|
initialCursorPosition: l
|
|
6733
6785
|
} = a;
|
|
6734
|
-
const c = ti(n, e),
|
|
6735
|
-
B(
|
|
6736
|
-
const
|
|
6737
|
-
return (c - l) /
|
|
6786
|
+
const c = ti(n, e), h = ei(s, r);
|
|
6787
|
+
B(h, `No group element found for id "${s}"`);
|
|
6788
|
+
const f = h.getBoundingClientRect(), m = o ? f.width : f.height;
|
|
6789
|
+
return (c - l) / m * 100;
|
|
6738
6790
|
}
|
|
6739
6791
|
function Cp(e, t, n, a, r, o) {
|
|
6740
6792
|
if (Ys(e)) {
|
|
@@ -6802,16 +6854,16 @@ function nt(e, t, n) {
|
|
|
6802
6854
|
id: l
|
|
6803
6855
|
} = o, {
|
|
6804
6856
|
collapsedSize: c = 0,
|
|
6805
|
-
collapsible:
|
|
6806
|
-
} = s,
|
|
6807
|
-
if (
|
|
6857
|
+
collapsible: h
|
|
6858
|
+
} = s, f = n[l];
|
|
6859
|
+
if (f == null || a !== f) {
|
|
6808
6860
|
n[l] = a;
|
|
6809
6861
|
const {
|
|
6810
|
-
onCollapse:
|
|
6862
|
+
onCollapse: m,
|
|
6811
6863
|
onExpand: g,
|
|
6812
6864
|
onResize: b
|
|
6813
6865
|
} = i;
|
|
6814
|
-
b && b(a,
|
|
6866
|
+
b && b(a, f), h && (m || g) && (g && (f == null || Ie(f, c)) && !Ie(a, c) && g(), m && (f == null || !Ie(f, c)) && Ie(a, c) && m());
|
|
6815
6867
|
}
|
|
6816
6868
|
});
|
|
6817
6869
|
}
|
|
@@ -6965,18 +7017,18 @@ function oi({
|
|
|
6965
7017
|
keyboardResizeBy: s = null,
|
|
6966
7018
|
storage: l = Pt,
|
|
6967
7019
|
style: c,
|
|
6968
|
-
tagName:
|
|
6969
|
-
...
|
|
7020
|
+
tagName: h = "div",
|
|
7021
|
+
...f
|
|
6970
7022
|
}) {
|
|
6971
|
-
const
|
|
7023
|
+
const m = ga(o), g = be(null), [b, w] = st(null), [p, v] = st([]), S = vp(), y = be({}), M = be(/* @__PURE__ */ new Map()), x = be(0), N = be({
|
|
6972
7024
|
autoSaveId: e,
|
|
6973
7025
|
direction: a,
|
|
6974
7026
|
dragState: b,
|
|
6975
|
-
id:
|
|
7027
|
+
id: m,
|
|
6976
7028
|
keyboardResizeBy: s,
|
|
6977
7029
|
onLayout: i,
|
|
6978
7030
|
storage: l
|
|
6979
|
-
}),
|
|
7031
|
+
}), C = be({
|
|
6980
7032
|
layout: p,
|
|
6981
7033
|
panelDataArray: [],
|
|
6982
7034
|
panelDataArrayChanged: !1
|
|
@@ -6989,62 +7041,62 @@ function oi({
|
|
|
6989
7041
|
getId: () => N.current.id,
|
|
6990
7042
|
getLayout: () => {
|
|
6991
7043
|
const {
|
|
6992
|
-
layout:
|
|
6993
|
-
} =
|
|
6994
|
-
return
|
|
7044
|
+
layout: T
|
|
7045
|
+
} = C.current;
|
|
7046
|
+
return T;
|
|
6995
7047
|
},
|
|
6996
|
-
setLayout: (
|
|
7048
|
+
setLayout: (T) => {
|
|
6997
7049
|
const {
|
|
6998
7050
|
onLayout: A
|
|
6999
7051
|
} = N.current, {
|
|
7000
7052
|
layout: $,
|
|
7001
7053
|
panelDataArray: L
|
|
7002
|
-
} =
|
|
7003
|
-
layout:
|
|
7054
|
+
} = C.current, W = tr({
|
|
7055
|
+
layout: T,
|
|
7004
7056
|
panelConstraints: L.map((G) => G.constraints)
|
|
7005
7057
|
});
|
|
7006
|
-
Ja($, W) || (v(W),
|
|
7058
|
+
Ja($, W) || (v(W), C.current.layout = W, A && A(W), nt(L, W, y.current));
|
|
7007
7059
|
}
|
|
7008
7060
|
}), []), Xe(() => {
|
|
7009
|
-
N.current.autoSaveId = e, N.current.direction = a, N.current.dragState = b, N.current.id =
|
|
7061
|
+
N.current.autoSaveId = e, N.current.direction = a, N.current.dragState = b, N.current.id = m, N.current.onLayout = i, N.current.storage = l;
|
|
7010
7062
|
}), Sp({
|
|
7011
7063
|
committedValuesRef: N,
|
|
7012
|
-
eagerValuesRef:
|
|
7013
|
-
groupId:
|
|
7064
|
+
eagerValuesRef: C,
|
|
7065
|
+
groupId: m,
|
|
7014
7066
|
layout: p,
|
|
7015
|
-
panelDataArray:
|
|
7067
|
+
panelDataArray: C.current.panelDataArray,
|
|
7016
7068
|
setLayout: v,
|
|
7017
7069
|
panelGroupElement: g.current
|
|
7018
7070
|
}), qe(() => {
|
|
7019
7071
|
const {
|
|
7020
|
-
panelDataArray:
|
|
7021
|
-
} =
|
|
7072
|
+
panelDataArray: T
|
|
7073
|
+
} = C.current;
|
|
7022
7074
|
if (e) {
|
|
7023
|
-
if (p.length === 0 || p.length !==
|
|
7075
|
+
if (p.length === 0 || p.length !== T.length)
|
|
7024
7076
|
return;
|
|
7025
7077
|
let A = nr[e];
|
|
7026
7078
|
A == null && (A = Dp(Ep, Rp), nr[e] = A);
|
|
7027
|
-
const $ = [...
|
|
7079
|
+
const $ = [...T], L = new Map(M.current);
|
|
7028
7080
|
A(e, $, L, p, l);
|
|
7029
7081
|
}
|
|
7030
7082
|
}, [e, p, l]), qe(() => {
|
|
7031
7083
|
});
|
|
7032
|
-
const
|
|
7084
|
+
const D = ge((T) => {
|
|
7033
7085
|
const {
|
|
7034
7086
|
onLayout: A
|
|
7035
7087
|
} = N.current, {
|
|
7036
7088
|
layout: $,
|
|
7037
7089
|
panelDataArray: L
|
|
7038
|
-
} =
|
|
7039
|
-
if (
|
|
7090
|
+
} = C.current;
|
|
7091
|
+
if (T.constraints.collapsible) {
|
|
7040
7092
|
const W = L.map((ye) => ye.constraints), {
|
|
7041
7093
|
collapsedSize: G = 0,
|
|
7042
7094
|
panelSize: Z,
|
|
7043
7095
|
pivotIndices: oe
|
|
7044
|
-
} = Ye(L,
|
|
7045
|
-
if (B(Z != null, `Panel size not found for panel "${
|
|
7046
|
-
|
|
7047
|
-
const xe = at(L,
|
|
7096
|
+
} = Ye(L, T, $);
|
|
7097
|
+
if (B(Z != null, `Panel size not found for panel "${T.id}"`), !Ie(Z, G)) {
|
|
7098
|
+
M.current.set(T.id, Z);
|
|
7099
|
+
const xe = at(L, T) === L.length - 1 ? Z - G : G - Z, ee = Nt({
|
|
7048
7100
|
delta: xe,
|
|
7049
7101
|
initialLayout: $,
|
|
7050
7102
|
panelConstraints: W,
|
|
@@ -7052,25 +7104,25 @@ function oi({
|
|
|
7052
7104
|
prevLayout: $,
|
|
7053
7105
|
trigger: "imperative-api"
|
|
7054
7106
|
});
|
|
7055
|
-
Yt($, ee) || (v(ee),
|
|
7107
|
+
Yt($, ee) || (v(ee), C.current.layout = ee, A && A(ee), nt(L, ee, y.current));
|
|
7056
7108
|
}
|
|
7057
7109
|
}
|
|
7058
|
-
}, []),
|
|
7110
|
+
}, []), R = ge((T, A) => {
|
|
7059
7111
|
const {
|
|
7060
7112
|
onLayout: $
|
|
7061
7113
|
} = N.current, {
|
|
7062
7114
|
layout: L,
|
|
7063
7115
|
panelDataArray: W
|
|
7064
|
-
} =
|
|
7065
|
-
if (
|
|
7116
|
+
} = C.current;
|
|
7117
|
+
if (T.constraints.collapsible) {
|
|
7066
7118
|
const G = W.map((pe) => pe.constraints), {
|
|
7067
7119
|
collapsedSize: Z = 0,
|
|
7068
7120
|
panelSize: oe = 0,
|
|
7069
7121
|
minSize: ye = 0,
|
|
7070
7122
|
pivotIndices: xe
|
|
7071
|
-
} = Ye(W,
|
|
7123
|
+
} = Ye(W, T, L), ee = A ?? ye;
|
|
7072
7124
|
if (Ie(oe, Z)) {
|
|
7073
|
-
const pe =
|
|
7125
|
+
const pe = M.current.get(T.id), Be = pe != null && pe >= ee ? pe : ee, bt = at(W, T) === W.length - 1 ? oe - Be : Be - oe, de = Nt({
|
|
7074
7126
|
delta: bt,
|
|
7075
7127
|
initialLayout: L,
|
|
7076
7128
|
panelConstraints: G,
|
|
@@ -7078,21 +7130,21 @@ function oi({
|
|
|
7078
7130
|
prevLayout: L,
|
|
7079
7131
|
trigger: "imperative-api"
|
|
7080
7132
|
});
|
|
7081
|
-
Yt(L, de) || (v(de),
|
|
7133
|
+
Yt(L, de) || (v(de), C.current.layout = de, $ && $(de), nt(W, de, y.current));
|
|
7082
7134
|
}
|
|
7083
7135
|
}
|
|
7084
|
-
}, []), j = ge((
|
|
7136
|
+
}, []), j = ge((T) => {
|
|
7085
7137
|
const {
|
|
7086
7138
|
layout: A,
|
|
7087
7139
|
panelDataArray: $
|
|
7088
|
-
} =
|
|
7140
|
+
} = C.current, {
|
|
7089
7141
|
panelSize: L
|
|
7090
|
-
} = Ye($,
|
|
7091
|
-
return B(L != null, `Panel size not found for panel "${
|
|
7092
|
-
}, []),
|
|
7142
|
+
} = Ye($, T, A);
|
|
7143
|
+
return B(L != null, `Panel size not found for panel "${T.id}"`), L;
|
|
7144
|
+
}, []), k = ge((T, A) => {
|
|
7093
7145
|
const {
|
|
7094
7146
|
panelDataArray: $
|
|
7095
|
-
} =
|
|
7147
|
+
} = C.current, L = at($, T);
|
|
7096
7148
|
return Pp({
|
|
7097
7149
|
defaultSize: A,
|
|
7098
7150
|
dragState: b,
|
|
@@ -7100,50 +7152,50 @@ function oi({
|
|
|
7100
7152
|
panelData: $,
|
|
7101
7153
|
panelIndex: L
|
|
7102
7154
|
});
|
|
7103
|
-
}, [b, p]), I = ge((
|
|
7155
|
+
}, [b, p]), I = ge((T) => {
|
|
7104
7156
|
const {
|
|
7105
7157
|
layout: A,
|
|
7106
7158
|
panelDataArray: $
|
|
7107
|
-
} =
|
|
7159
|
+
} = C.current, {
|
|
7108
7160
|
collapsedSize: L = 0,
|
|
7109
7161
|
collapsible: W,
|
|
7110
7162
|
panelSize: G
|
|
7111
|
-
} = Ye($,
|
|
7112
|
-
return B(G != null, `Panel size not found for panel "${
|
|
7113
|
-
}, []), U = ge((
|
|
7163
|
+
} = Ye($, T, A);
|
|
7164
|
+
return B(G != null, `Panel size not found for panel "${T.id}"`), W === !0 && Ie(G, L);
|
|
7165
|
+
}, []), U = ge((T) => {
|
|
7114
7166
|
const {
|
|
7115
7167
|
layout: A,
|
|
7116
7168
|
panelDataArray: $
|
|
7117
|
-
} =
|
|
7169
|
+
} = C.current, {
|
|
7118
7170
|
collapsedSize: L = 0,
|
|
7119
7171
|
collapsible: W,
|
|
7120
7172
|
panelSize: G
|
|
7121
|
-
} = Ye($,
|
|
7122
|
-
return B(G != null, `Panel size not found for panel "${
|
|
7123
|
-
}, []),
|
|
7173
|
+
} = Ye($, T, A);
|
|
7174
|
+
return B(G != null, `Panel size not found for panel "${T.id}"`), !W || Ze(G, L) > 0;
|
|
7175
|
+
}, []), _ = ge((T) => {
|
|
7124
7176
|
const {
|
|
7125
7177
|
panelDataArray: A
|
|
7126
|
-
} =
|
|
7127
|
-
A.push(
|
|
7178
|
+
} = C.current;
|
|
7179
|
+
A.push(T), A.sort(($, L) => {
|
|
7128
7180
|
const W = $.order, G = L.order;
|
|
7129
7181
|
return W == null && G == null ? 0 : W == null ? -1 : G == null ? 1 : W - G;
|
|
7130
|
-
}),
|
|
7182
|
+
}), C.current.panelDataArrayChanged = !0, S();
|
|
7131
7183
|
}, [S]);
|
|
7132
7184
|
Xe(() => {
|
|
7133
|
-
if (
|
|
7134
|
-
|
|
7185
|
+
if (C.current.panelDataArrayChanged) {
|
|
7186
|
+
C.current.panelDataArrayChanged = !1;
|
|
7135
7187
|
const {
|
|
7136
|
-
autoSaveId:
|
|
7188
|
+
autoSaveId: T,
|
|
7137
7189
|
onLayout: A,
|
|
7138
7190
|
storage: $
|
|
7139
7191
|
} = N.current, {
|
|
7140
7192
|
layout: L,
|
|
7141
7193
|
panelDataArray: W
|
|
7142
|
-
} =
|
|
7194
|
+
} = C.current;
|
|
7143
7195
|
let G = null;
|
|
7144
|
-
if (
|
|
7145
|
-
const oe = Tp(
|
|
7146
|
-
oe && (
|
|
7196
|
+
if (T) {
|
|
7197
|
+
const oe = Tp(T, W, $);
|
|
7198
|
+
oe && (M.current = new Map(Object.entries(oe.expandToSizes)), G = oe.layout);
|
|
7147
7199
|
}
|
|
7148
7200
|
G == null && (G = Np({
|
|
7149
7201
|
panelDataArray: W
|
|
@@ -7152,15 +7204,15 @@ function oi({
|
|
|
7152
7204
|
layout: G,
|
|
7153
7205
|
panelConstraints: W.map((oe) => oe.constraints)
|
|
7154
7206
|
});
|
|
7155
|
-
Ja(L, Z) || (v(Z),
|
|
7207
|
+
Ja(L, Z) || (v(Z), C.current.layout = Z, A && A(Z), nt(W, Z, y.current));
|
|
7156
7208
|
}
|
|
7157
7209
|
}), Xe(() => {
|
|
7158
|
-
const
|
|
7210
|
+
const T = C.current;
|
|
7159
7211
|
return () => {
|
|
7160
|
-
|
|
7212
|
+
T.layout = [];
|
|
7161
7213
|
};
|
|
7162
7214
|
}, []);
|
|
7163
|
-
const H = ge((
|
|
7215
|
+
const H = ge((T) => {
|
|
7164
7216
|
let A = !1;
|
|
7165
7217
|
const $ = g.current;
|
|
7166
7218
|
return $ && window.getComputedStyle($, null).getPropertyValue("direction") === "rtl" && (A = !0), function(W) {
|
|
@@ -7177,10 +7229,10 @@ function oi({
|
|
|
7177
7229
|
} = N.current, {
|
|
7178
7230
|
layout: pe,
|
|
7179
7231
|
panelDataArray: Be
|
|
7180
|
-
} =
|
|
7232
|
+
} = C.current, {
|
|
7181
7233
|
initialLayout: Je
|
|
7182
|
-
} = oe ?? {}, bt = Js(ye,
|
|
7183
|
-
let de = Cp(W,
|
|
7234
|
+
} = oe ?? {}, bt = Js(ye, T, G);
|
|
7235
|
+
let de = Cp(W, T, Z, oe, xe, G);
|
|
7184
7236
|
const zt = Z === "horizontal";
|
|
7185
7237
|
zt && A && (de = -de);
|
|
7186
7238
|
const wn = Be.map((wt) => wt.constraints), He = Nt({
|
|
@@ -7191,20 +7243,20 @@ function oi({
|
|
|
7191
7243
|
prevLayout: pe,
|
|
7192
7244
|
trigger: Ys(W) ? "keyboard" : "mouse-or-touch"
|
|
7193
7245
|
}), vt = !Yt(pe, He);
|
|
7194
|
-
(Vs(W) || Gs(W)) && x.current != de && (x.current = de, !vt && de !== 0 ? zt ? On(
|
|
7246
|
+
(Vs(W) || Gs(W)) && x.current != de && (x.current = de, !vt && de !== 0 ? zt ? On(T, de < 0 ? Us : qs) : On(T, de < 0 ? Xs : Zs) : On(T, 0)), vt && (v(He), C.current.layout = He, ee && ee(He), nt(Be, He, y.current));
|
|
7195
7247
|
};
|
|
7196
|
-
}, []), z = ge((
|
|
7248
|
+
}, []), z = ge((T, A) => {
|
|
7197
7249
|
const {
|
|
7198
7250
|
onLayout: $
|
|
7199
7251
|
} = N.current, {
|
|
7200
7252
|
layout: L,
|
|
7201
7253
|
panelDataArray: W
|
|
7202
|
-
} =
|
|
7254
|
+
} = C.current, G = W.map((pe) => pe.constraints), {
|
|
7203
7255
|
panelSize: Z,
|
|
7204
7256
|
pivotIndices: oe
|
|
7205
|
-
} = Ye(W,
|
|
7206
|
-
B(Z != null, `Panel size not found for panel "${
|
|
7207
|
-
const xe = at(W,
|
|
7257
|
+
} = Ye(W, T, L);
|
|
7258
|
+
B(Z != null, `Panel size not found for panel "${T.id}"`);
|
|
7259
|
+
const xe = at(W, T) === W.length - 1 ? Z - A : A - Z, ee = Nt({
|
|
7208
7260
|
delta: xe,
|
|
7209
7261
|
initialLayout: L,
|
|
7210
7262
|
panelConstraints: G,
|
|
@@ -7212,12 +7264,12 @@ function oi({
|
|
|
7212
7264
|
prevLayout: L,
|
|
7213
7265
|
trigger: "imperative-api"
|
|
7214
7266
|
});
|
|
7215
|
-
Yt(L, ee) || (v(ee),
|
|
7216
|
-
}, []), se = ge((
|
|
7267
|
+
Yt(L, ee) || (v(ee), C.current.layout = ee, $ && $(ee), nt(W, ee, y.current));
|
|
7268
|
+
}, []), se = ge((T, A) => {
|
|
7217
7269
|
const {
|
|
7218
7270
|
layout: $,
|
|
7219
7271
|
panelDataArray: L
|
|
7220
|
-
} =
|
|
7272
|
+
} = C.current, {
|
|
7221
7273
|
collapsedSize: W = 0,
|
|
7222
7274
|
collapsible: G
|
|
7223
7275
|
} = A, {
|
|
@@ -7225,53 +7277,53 @@ function oi({
|
|
|
7225
7277
|
collapsible: oe,
|
|
7226
7278
|
maxSize: ye = 100,
|
|
7227
7279
|
minSize: xe = 0
|
|
7228
|
-
} =
|
|
7280
|
+
} = T.constraints, {
|
|
7229
7281
|
panelSize: ee
|
|
7230
|
-
} = Ye(L,
|
|
7231
|
-
ee != null && (G && oe && Ie(ee, W) ? Ie(W, Z) || z(
|
|
7232
|
-
}, [z]), K = ge((
|
|
7282
|
+
} = Ye(L, T, $);
|
|
7283
|
+
ee != null && (G && oe && Ie(ee, W) ? Ie(W, Z) || z(T, Z) : ee < xe ? z(T, xe) : ee > ye && z(T, ye));
|
|
7284
|
+
}, [z]), K = ge((T, A) => {
|
|
7233
7285
|
const {
|
|
7234
7286
|
direction: $
|
|
7235
7287
|
} = N.current, {
|
|
7236
7288
|
layout: L
|
|
7237
|
-
} =
|
|
7289
|
+
} = C.current;
|
|
7238
7290
|
if (!g.current)
|
|
7239
7291
|
return;
|
|
7240
|
-
const W = pn(
|
|
7241
|
-
B(W, `Drag handle element not found for id "${
|
|
7292
|
+
const W = pn(T, g.current);
|
|
7293
|
+
B(W, `Drag handle element not found for id "${T}"`);
|
|
7242
7294
|
const G = ti($, A);
|
|
7243
7295
|
w({
|
|
7244
|
-
dragHandleId:
|
|
7296
|
+
dragHandleId: T,
|
|
7245
7297
|
dragHandleRect: W.getBoundingClientRect(),
|
|
7246
7298
|
initialCursorPosition: G,
|
|
7247
7299
|
initialLayout: L
|
|
7248
7300
|
});
|
|
7249
7301
|
}, []), ae = ge(() => {
|
|
7250
7302
|
w(null);
|
|
7251
|
-
}, []), ce = ge((
|
|
7303
|
+
}, []), ce = ge((T) => {
|
|
7252
7304
|
const {
|
|
7253
7305
|
panelDataArray: A
|
|
7254
|
-
} =
|
|
7255
|
-
$ >= 0 && (A.splice($, 1), delete y.current[
|
|
7306
|
+
} = C.current, $ = at(A, T);
|
|
7307
|
+
$ >= 0 && (A.splice($, 1), delete y.current[T.id], C.current.panelDataArrayChanged = !0, S());
|
|
7256
7308
|
}, [S]), Oe = rp(() => ({
|
|
7257
|
-
collapsePanel:
|
|
7309
|
+
collapsePanel: D,
|
|
7258
7310
|
direction: a,
|
|
7259
7311
|
dragState: b,
|
|
7260
|
-
expandPanel:
|
|
7312
|
+
expandPanel: R,
|
|
7261
7313
|
getPanelSize: j,
|
|
7262
|
-
getPanelStyle:
|
|
7263
|
-
groupId:
|
|
7314
|
+
getPanelStyle: k,
|
|
7315
|
+
groupId: m,
|
|
7264
7316
|
isPanelCollapsed: I,
|
|
7265
7317
|
isPanelExpanded: U,
|
|
7266
7318
|
reevaluatePanelConstraints: se,
|
|
7267
|
-
registerPanel:
|
|
7319
|
+
registerPanel: _,
|
|
7268
7320
|
registerResizeHandle: H,
|
|
7269
7321
|
resizePanel: z,
|
|
7270
7322
|
startDragging: K,
|
|
7271
7323
|
stopDragging: ae,
|
|
7272
7324
|
unregisterPanel: ce,
|
|
7273
7325
|
panelGroupElement: g.current
|
|
7274
|
-
}), [
|
|
7326
|
+
}), [D, b, a, R, j, k, m, I, U, se, _, H, z, K, ae, ce]), ue = {
|
|
7275
7327
|
display: "flex",
|
|
7276
7328
|
flexDirection: a === "horizontal" ? "row" : "column",
|
|
7277
7329
|
height: "100%",
|
|
@@ -7280,8 +7332,8 @@ function oi({
|
|
|
7280
7332
|
};
|
|
7281
7333
|
return ct(fn.Provider, {
|
|
7282
7334
|
value: Oe
|
|
7283
|
-
}, ct(
|
|
7284
|
-
...
|
|
7335
|
+
}, ct(h, {
|
|
7336
|
+
...f,
|
|
7285
7337
|
children: t,
|
|
7286
7338
|
className: n,
|
|
7287
7339
|
id: o,
|
|
@@ -7293,7 +7345,7 @@ function oi({
|
|
|
7293
7345
|
// CSS selectors
|
|
7294
7346
|
"data-panel-group": "",
|
|
7295
7347
|
"data-panel-group-direction": a,
|
|
7296
|
-
"data-panel-group-id":
|
|
7348
|
+
"data-panel-group-id": m
|
|
7297
7349
|
}));
|
|
7298
7350
|
}
|
|
7299
7351
|
const si = zs((e, t) => ct(oi, {
|
|
@@ -7343,8 +7395,8 @@ function kp({
|
|
|
7343
7395
|
B(s, `No group element found for id "${s}"`);
|
|
7344
7396
|
const l = Ot(s, a), c = Qs(s, t, a);
|
|
7345
7397
|
B(c !== null, `No resize element found for id "${t}"`);
|
|
7346
|
-
const
|
|
7347
|
-
l[
|
|
7398
|
+
const h = i.shiftKey ? c > 0 ? c - 1 : l.length - 1 : c + 1 < l.length ? c + 1 : 0;
|
|
7399
|
+
l[h].focus();
|
|
7348
7400
|
break;
|
|
7349
7401
|
}
|
|
7350
7402
|
}
|
|
@@ -7365,10 +7417,10 @@ function ii({
|
|
|
7365
7417
|
onFocus: s,
|
|
7366
7418
|
style: l = {},
|
|
7367
7419
|
tabIndex: c = 0,
|
|
7368
|
-
tagName:
|
|
7369
|
-
...
|
|
7420
|
+
tagName: h = "div",
|
|
7421
|
+
...f
|
|
7370
7422
|
}) {
|
|
7371
|
-
var
|
|
7423
|
+
var m, g;
|
|
7372
7424
|
const b = be(null), w = be({
|
|
7373
7425
|
onDragging: i
|
|
7374
7426
|
});
|
|
@@ -7382,75 +7434,75 @@ function ii({
|
|
|
7382
7434
|
direction: v,
|
|
7383
7435
|
groupId: S,
|
|
7384
7436
|
registerResizeHandle: y,
|
|
7385
|
-
startDragging:
|
|
7437
|
+
startDragging: M,
|
|
7386
7438
|
stopDragging: x,
|
|
7387
7439
|
panelGroupElement: N
|
|
7388
|
-
} = p,
|
|
7389
|
-
state:
|
|
7440
|
+
} = p, C = ga(r), [D, R] = st("inactive"), [j, k] = st(!1), [I, U] = st(null), _ = be({
|
|
7441
|
+
state: D
|
|
7390
7442
|
});
|
|
7391
7443
|
Xe(() => {
|
|
7392
|
-
|
|
7444
|
+
_.current.state = D;
|
|
7393
7445
|
}), qe(() => {
|
|
7394
7446
|
if (n)
|
|
7395
7447
|
U(null);
|
|
7396
7448
|
else {
|
|
7397
|
-
const K = y(
|
|
7449
|
+
const K = y(C);
|
|
7398
7450
|
U(() => K);
|
|
7399
7451
|
}
|
|
7400
|
-
}, [n,
|
|
7401
|
-
const H = (
|
|
7452
|
+
}, [n, C, y]);
|
|
7453
|
+
const H = (m = a == null ? void 0 : a.coarse) !== null && m !== void 0 ? m : 15, z = (g = a == null ? void 0 : a.fine) !== null && g !== void 0 ? g : 5;
|
|
7402
7454
|
return qe(() => {
|
|
7403
7455
|
if (n || I == null)
|
|
7404
7456
|
return;
|
|
7405
7457
|
const K = b.current;
|
|
7406
|
-
return B(K, "Element ref not attached"), bp(
|
|
7458
|
+
return B(K, "Element ref not attached"), bp(C, K, v, {
|
|
7407
7459
|
coarse: H,
|
|
7408
7460
|
fine: z
|
|
7409
7461
|
}, (ce, Oe, ue) => {
|
|
7410
7462
|
if (Oe)
|
|
7411
7463
|
switch (ce) {
|
|
7412
7464
|
case "down": {
|
|
7413
|
-
|
|
7465
|
+
R("drag"), B(ue, 'Expected event to be defined for "down" action'), M(C, ue);
|
|
7414
7466
|
const {
|
|
7415
|
-
onDragging:
|
|
7467
|
+
onDragging: T
|
|
7416
7468
|
} = w.current;
|
|
7417
|
-
|
|
7469
|
+
T && T(!0);
|
|
7418
7470
|
break;
|
|
7419
7471
|
}
|
|
7420
7472
|
case "move": {
|
|
7421
7473
|
const {
|
|
7422
|
-
state:
|
|
7423
|
-
} =
|
|
7424
|
-
|
|
7474
|
+
state: T
|
|
7475
|
+
} = _.current;
|
|
7476
|
+
T !== "drag" && R("hover"), B(ue, 'Expected event to be defined for "move" action'), I(ue);
|
|
7425
7477
|
break;
|
|
7426
7478
|
}
|
|
7427
7479
|
case "up": {
|
|
7428
|
-
|
|
7480
|
+
R("hover"), x();
|
|
7429
7481
|
const {
|
|
7430
|
-
onDragging:
|
|
7482
|
+
onDragging: T
|
|
7431
7483
|
} = w.current;
|
|
7432
|
-
|
|
7484
|
+
T && T(!1);
|
|
7433
7485
|
break;
|
|
7434
7486
|
}
|
|
7435
7487
|
}
|
|
7436
7488
|
else
|
|
7437
|
-
|
|
7489
|
+
R("inactive");
|
|
7438
7490
|
});
|
|
7439
|
-
}, [H, v, n, z, y,
|
|
7491
|
+
}, [H, v, n, z, y, C, I, M, x]), kp({
|
|
7440
7492
|
disabled: n,
|
|
7441
|
-
handleId:
|
|
7493
|
+
handleId: C,
|
|
7442
7494
|
resizeHandler: I,
|
|
7443
7495
|
panelGroupElement: N
|
|
7444
|
-
}), ct(
|
|
7445
|
-
...
|
|
7496
|
+
}), ct(h, {
|
|
7497
|
+
...f,
|
|
7446
7498
|
children: e,
|
|
7447
7499
|
className: t,
|
|
7448
7500
|
id: r,
|
|
7449
7501
|
onBlur: () => {
|
|
7450
|
-
|
|
7502
|
+
k(!1), o == null || o();
|
|
7451
7503
|
},
|
|
7452
7504
|
onFocus: () => {
|
|
7453
|
-
|
|
7505
|
+
k(!0), s == null || s();
|
|
7454
7506
|
},
|
|
7455
7507
|
ref: b,
|
|
7456
7508
|
role: "separator",
|
|
@@ -7466,10 +7518,10 @@ function ii({
|
|
|
7466
7518
|
"data-panel-group-direction": v,
|
|
7467
7519
|
"data-panel-group-id": S,
|
|
7468
7520
|
"data-resize-handle": "",
|
|
7469
|
-
"data-resize-handle-active":
|
|
7470
|
-
"data-resize-handle-state":
|
|
7521
|
+
"data-resize-handle-active": D === "drag" ? "pointer" : j ? "keyboard" : void 0,
|
|
7522
|
+
"data-resize-handle-state": D,
|
|
7471
7523
|
"data-panel-resize-handle-enabled": !n,
|
|
7472
|
-
"data-panel-resize-handle-id":
|
|
7524
|
+
"data-panel-resize-handle-id": C
|
|
7473
7525
|
});
|
|
7474
7526
|
}
|
|
7475
7527
|
ii.displayName = "PanelResizeHandle";
|
|
@@ -7532,9 +7584,9 @@ const yg = ({
|
|
|
7532
7584
|
);
|
|
7533
7585
|
};
|
|
7534
7586
|
function _p(e, t) {
|
|
7535
|
-
return
|
|
7587
|
+
return d.useReducer((n, a) => t[n][a] ?? n, e);
|
|
7536
7588
|
}
|
|
7537
|
-
var ya = "ScrollArea", [li, Mg] = Qe(ya), [Op, Me] = li(ya), ci =
|
|
7589
|
+
var ya = "ScrollArea", [li, Mg] = Qe(ya), [Op, Me] = li(ya), ci = d.forwardRef(
|
|
7538
7590
|
(e, t) => {
|
|
7539
7591
|
const {
|
|
7540
7592
|
__scopeScrollArea: n,
|
|
@@ -7542,7 +7594,7 @@ var ya = "ScrollArea", [li, Mg] = Qe(ya), [Op, Me] = li(ya), ci = f.forwardRef(
|
|
|
7542
7594
|
dir: r,
|
|
7543
7595
|
scrollHideDelay: o = 600,
|
|
7544
7596
|
...i
|
|
7545
|
-
} = e, [s, l] =
|
|
7597
|
+
} = e, [s, l] = d.useState(null), [c, h] = d.useState(null), [f, m] = d.useState(null), [g, b] = d.useState(null), [w, p] = d.useState(null), [v, S] = d.useState(0), [y, M] = d.useState(0), [x, N] = d.useState(!1), [C, D] = d.useState(!1), R = he(t, (k) => l(k)), j = Jn(r);
|
|
7546
7598
|
return /* @__PURE__ */ u.jsx(
|
|
7547
7599
|
Op,
|
|
7548
7600
|
{
|
|
@@ -7552,25 +7604,25 @@ var ya = "ScrollArea", [li, Mg] = Qe(ya), [Op, Me] = li(ya), ci = f.forwardRef(
|
|
|
7552
7604
|
scrollHideDelay: o,
|
|
7553
7605
|
scrollArea: s,
|
|
7554
7606
|
viewport: c,
|
|
7555
|
-
onViewportChange:
|
|
7556
|
-
content:
|
|
7557
|
-
onContentChange:
|
|
7607
|
+
onViewportChange: h,
|
|
7608
|
+
content: f,
|
|
7609
|
+
onContentChange: m,
|
|
7558
7610
|
scrollbarX: g,
|
|
7559
7611
|
onScrollbarXChange: b,
|
|
7560
7612
|
scrollbarXEnabled: x,
|
|
7561
7613
|
onScrollbarXEnabledChange: N,
|
|
7562
7614
|
scrollbarY: w,
|
|
7563
7615
|
onScrollbarYChange: p,
|
|
7564
|
-
scrollbarYEnabled:
|
|
7565
|
-
onScrollbarYEnabledChange:
|
|
7616
|
+
scrollbarYEnabled: C,
|
|
7617
|
+
onScrollbarYEnabledChange: D,
|
|
7566
7618
|
onCornerWidthChange: S,
|
|
7567
|
-
onCornerHeightChange:
|
|
7619
|
+
onCornerHeightChange: M,
|
|
7568
7620
|
children: /* @__PURE__ */ u.jsx(
|
|
7569
7621
|
ne.div,
|
|
7570
7622
|
{
|
|
7571
7623
|
dir: j,
|
|
7572
7624
|
...i,
|
|
7573
|
-
ref:
|
|
7625
|
+
ref: R,
|
|
7574
7626
|
style: {
|
|
7575
7627
|
position: "relative",
|
|
7576
7628
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
@@ -7585,9 +7637,9 @@ var ya = "ScrollArea", [li, Mg] = Qe(ya), [Op, Me] = li(ya), ci = f.forwardRef(
|
|
|
7585
7637
|
}
|
|
7586
7638
|
);
|
|
7587
7639
|
ci.displayName = ya;
|
|
7588
|
-
var ui = "ScrollAreaViewport", di =
|
|
7640
|
+
var ui = "ScrollAreaViewport", di = d.forwardRef(
|
|
7589
7641
|
(e, t) => {
|
|
7590
|
-
const { __scopeScrollArea: n, children: a, nonce: r, ...o } = e, i = Me(ui, n), s =
|
|
7642
|
+
const { __scopeScrollArea: n, children: a, nonce: r, ...o } = e, i = Me(ui, n), s = d.useRef(null), l = he(t, s, i.onViewportChange);
|
|
7591
7643
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
7592
7644
|
/* @__PURE__ */ u.jsx(
|
|
7593
7645
|
"style",
|
|
@@ -7627,28 +7679,28 @@ var ui = "ScrollAreaViewport", di = f.forwardRef(
|
|
|
7627
7679
|
}
|
|
7628
7680
|
);
|
|
7629
7681
|
di.displayName = ui;
|
|
7630
|
-
var _e = "ScrollAreaScrollbar", xa =
|
|
7682
|
+
var _e = "ScrollAreaScrollbar", xa = d.forwardRef(
|
|
7631
7683
|
(e, t) => {
|
|
7632
7684
|
const { forceMount: n, ...a } = e, r = Me(_e, e.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = r, s = e.orientation === "horizontal";
|
|
7633
|
-
return
|
|
7685
|
+
return d.useEffect(() => (s ? o(!0) : i(!0), () => {
|
|
7634
7686
|
s ? o(!1) : i(!1);
|
|
7635
7687
|
}), [s, o, i]), r.type === "hover" ? /* @__PURE__ */ u.jsx(Ip, { ...a, ref: t, forceMount: n }) : r.type === "scroll" ? /* @__PURE__ */ u.jsx(Ap, { ...a, ref: t, forceMount: n }) : r.type === "auto" ? /* @__PURE__ */ u.jsx(fi, { ...a, ref: t, forceMount: n }) : r.type === "always" ? /* @__PURE__ */ u.jsx(Sa, { ...a, ref: t }) : null;
|
|
7636
7688
|
}
|
|
7637
7689
|
);
|
|
7638
7690
|
xa.displayName = _e;
|
|
7639
|
-
var Ip =
|
|
7640
|
-
const { forceMount: n, ...a } = e, r = Me(_e, e.__scopeScrollArea), [o, i] =
|
|
7641
|
-
return
|
|
7691
|
+
var Ip = d.forwardRef((e, t) => {
|
|
7692
|
+
const { forceMount: n, ...a } = e, r = Me(_e, e.__scopeScrollArea), [o, i] = d.useState(!1);
|
|
7693
|
+
return d.useEffect(() => {
|
|
7642
7694
|
const s = r.scrollArea;
|
|
7643
7695
|
let l = 0;
|
|
7644
7696
|
if (s) {
|
|
7645
7697
|
const c = () => {
|
|
7646
7698
|
window.clearTimeout(l), i(!0);
|
|
7647
|
-
},
|
|
7699
|
+
}, h = () => {
|
|
7648
7700
|
l = window.setTimeout(() => i(!1), r.scrollHideDelay);
|
|
7649
7701
|
};
|
|
7650
|
-
return s.addEventListener("pointerenter", c), s.addEventListener("pointerleave",
|
|
7651
|
-
window.clearTimeout(l), s.removeEventListener("pointerenter", c), s.removeEventListener("pointerleave",
|
|
7702
|
+
return s.addEventListener("pointerenter", c), s.addEventListener("pointerleave", h), () => {
|
|
7703
|
+
window.clearTimeout(l), s.removeEventListener("pointerenter", c), s.removeEventListener("pointerleave", h);
|
|
7652
7704
|
};
|
|
7653
7705
|
}
|
|
7654
7706
|
}, [r.scrollArea, r.scrollHideDelay]), /* @__PURE__ */ u.jsx(dt, { present: n || o, children: /* @__PURE__ */ u.jsx(
|
|
@@ -7659,7 +7711,7 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7659
7711
|
ref: t
|
|
7660
7712
|
}
|
|
7661
7713
|
) });
|
|
7662
|
-
}), Ap =
|
|
7714
|
+
}), Ap = d.forwardRef((e, t) => {
|
|
7663
7715
|
const { forceMount: n, ...a } = e, r = Me(_e, e.__scopeScrollArea), o = e.orientation === "horizontal", i = bn(() => l("SCROLL_END"), 100), [s, l] = _p("hidden", {
|
|
7664
7716
|
hidden: {
|
|
7665
7717
|
SCROLL: "scrolling"
|
|
@@ -7678,20 +7730,20 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7678
7730
|
POINTER_ENTER: "interacting"
|
|
7679
7731
|
}
|
|
7680
7732
|
});
|
|
7681
|
-
return
|
|
7733
|
+
return d.useEffect(() => {
|
|
7682
7734
|
if (s === "idle") {
|
|
7683
7735
|
const c = window.setTimeout(() => l("HIDE"), r.scrollHideDelay);
|
|
7684
7736
|
return () => window.clearTimeout(c);
|
|
7685
7737
|
}
|
|
7686
|
-
}, [s, r.scrollHideDelay, l]),
|
|
7687
|
-
const c = r.viewport,
|
|
7738
|
+
}, [s, r.scrollHideDelay, l]), d.useEffect(() => {
|
|
7739
|
+
const c = r.viewport, h = o ? "scrollLeft" : "scrollTop";
|
|
7688
7740
|
if (c) {
|
|
7689
|
-
let
|
|
7690
|
-
const
|
|
7691
|
-
const g = c[
|
|
7692
|
-
|
|
7741
|
+
let f = c[h];
|
|
7742
|
+
const m = () => {
|
|
7743
|
+
const g = c[h];
|
|
7744
|
+
f !== g && (l("SCROLL"), i()), f = g;
|
|
7693
7745
|
};
|
|
7694
|
-
return c.addEventListener("scroll",
|
|
7746
|
+
return c.addEventListener("scroll", m), () => c.removeEventListener("scroll", m);
|
|
7695
7747
|
}
|
|
7696
7748
|
}, [r.viewport, o, l, i]), /* @__PURE__ */ u.jsx(dt, { present: n || s !== "hidden", children: /* @__PURE__ */ u.jsx(
|
|
7697
7749
|
Sa,
|
|
@@ -7703,11 +7755,11 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7703
7755
|
onPointerLeave: F(e.onPointerLeave, () => l("POINTER_LEAVE"))
|
|
7704
7756
|
}
|
|
7705
7757
|
) });
|
|
7706
|
-
}), fi =
|
|
7707
|
-
const n = Me(_e, e.__scopeScrollArea), { forceMount: a, ...r } = e, [o, i] =
|
|
7758
|
+
}), fi = d.forwardRef((e, t) => {
|
|
7759
|
+
const n = Me(_e, e.__scopeScrollArea), { forceMount: a, ...r } = e, [o, i] = d.useState(!1), s = e.orientation === "horizontal", l = bn(() => {
|
|
7708
7760
|
if (n.viewport) {
|
|
7709
|
-
const c = n.viewport.offsetWidth < n.viewport.scrollWidth,
|
|
7710
|
-
i(s ? c :
|
|
7761
|
+
const c = n.viewport.offsetWidth < n.viewport.scrollWidth, h = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
7762
|
+
i(s ? c : h);
|
|
7711
7763
|
}
|
|
7712
7764
|
}, 10);
|
|
7713
7765
|
return ut(n.viewport, l), ut(n.content, l), /* @__PURE__ */ u.jsx(dt, { present: a || o, children: /* @__PURE__ */ u.jsx(
|
|
@@ -7718,63 +7770,63 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7718
7770
|
ref: t
|
|
7719
7771
|
}
|
|
7720
7772
|
) });
|
|
7721
|
-
}), Sa =
|
|
7722
|
-
const { orientation: n = "vertical", ...a } = e, r = Me(_e, e.__scopeScrollArea), o =
|
|
7773
|
+
}), Sa = d.forwardRef((e, t) => {
|
|
7774
|
+
const { orientation: n = "vertical", ...a } = e, r = Me(_e, e.__scopeScrollArea), o = d.useRef(null), i = d.useRef(0), [s, l] = d.useState({
|
|
7723
7775
|
content: 0,
|
|
7724
7776
|
viewport: 0,
|
|
7725
7777
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
7726
|
-
}), c = bi(s.viewport, s.content),
|
|
7778
|
+
}), c = bi(s.viewport, s.content), h = {
|
|
7727
7779
|
...a,
|
|
7728
7780
|
sizes: s,
|
|
7729
7781
|
onSizesChange: l,
|
|
7730
7782
|
hasThumb: c > 0 && c < 1,
|
|
7731
|
-
onThumbChange: (
|
|
7783
|
+
onThumbChange: (m) => o.current = m,
|
|
7732
7784
|
onThumbPointerUp: () => i.current = 0,
|
|
7733
|
-
onThumbPointerDown: (
|
|
7785
|
+
onThumbPointerDown: (m) => i.current = m
|
|
7734
7786
|
};
|
|
7735
|
-
function
|
|
7736
|
-
return $p(
|
|
7787
|
+
function f(m, g) {
|
|
7788
|
+
return $p(m, i.current, s, g);
|
|
7737
7789
|
}
|
|
7738
7790
|
return n === "horizontal" ? /* @__PURE__ */ u.jsx(
|
|
7739
7791
|
jp,
|
|
7740
7792
|
{
|
|
7741
|
-
...
|
|
7793
|
+
...h,
|
|
7742
7794
|
ref: t,
|
|
7743
7795
|
onThumbPositionChange: () => {
|
|
7744
7796
|
if (r.viewport && o.current) {
|
|
7745
|
-
const
|
|
7797
|
+
const m = r.viewport.scrollLeft, g = ar(m, s, r.dir);
|
|
7746
7798
|
o.current.style.transform = `translate3d(${g}px, 0, 0)`;
|
|
7747
7799
|
}
|
|
7748
7800
|
},
|
|
7749
|
-
onWheelScroll: (
|
|
7750
|
-
r.viewport && (r.viewport.scrollLeft =
|
|
7801
|
+
onWheelScroll: (m) => {
|
|
7802
|
+
r.viewport && (r.viewport.scrollLeft = m);
|
|
7751
7803
|
},
|
|
7752
|
-
onDragScroll: (
|
|
7753
|
-
r.viewport && (r.viewport.scrollLeft =
|
|
7804
|
+
onDragScroll: (m) => {
|
|
7805
|
+
r.viewport && (r.viewport.scrollLeft = f(m, r.dir));
|
|
7754
7806
|
}
|
|
7755
7807
|
}
|
|
7756
7808
|
) : n === "vertical" ? /* @__PURE__ */ u.jsx(
|
|
7757
7809
|
Wp,
|
|
7758
7810
|
{
|
|
7759
|
-
...
|
|
7811
|
+
...h,
|
|
7760
7812
|
ref: t,
|
|
7761
7813
|
onThumbPositionChange: () => {
|
|
7762
7814
|
if (r.viewport && o.current) {
|
|
7763
|
-
const
|
|
7815
|
+
const m = r.viewport.scrollTop, g = ar(m, s);
|
|
7764
7816
|
o.current.style.transform = `translate3d(0, ${g}px, 0)`;
|
|
7765
7817
|
}
|
|
7766
7818
|
},
|
|
7767
|
-
onWheelScroll: (
|
|
7768
|
-
r.viewport && (r.viewport.scrollTop =
|
|
7819
|
+
onWheelScroll: (m) => {
|
|
7820
|
+
r.viewport && (r.viewport.scrollTop = m);
|
|
7769
7821
|
},
|
|
7770
|
-
onDragScroll: (
|
|
7771
|
-
r.viewport && (r.viewport.scrollTop =
|
|
7822
|
+
onDragScroll: (m) => {
|
|
7823
|
+
r.viewport && (r.viewport.scrollTop = f(m));
|
|
7772
7824
|
}
|
|
7773
7825
|
}
|
|
7774
7826
|
) : null;
|
|
7775
|
-
}), jp =
|
|
7776
|
-
const { sizes: n, onSizesChange: a, ...r } = e, o = Me(_e, e.__scopeScrollArea), [i, s] =
|
|
7777
|
-
return
|
|
7827
|
+
}), jp = d.forwardRef((e, t) => {
|
|
7828
|
+
const { sizes: n, onSizesChange: a, ...r } = e, o = Me(_e, e.__scopeScrollArea), [i, s] = d.useState(), l = d.useRef(null), c = he(t, l, o.onScrollbarXChange);
|
|
7829
|
+
return d.useEffect(() => {
|
|
7778
7830
|
l.current && s(getComputedStyle(l.current));
|
|
7779
7831
|
}, [l]), /* @__PURE__ */ u.jsx(
|
|
7780
7832
|
hi,
|
|
@@ -7790,12 +7842,12 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7790
7842
|
"--radix-scroll-area-thumb-width": gn(n) + "px",
|
|
7791
7843
|
...e.style
|
|
7792
7844
|
},
|
|
7793
|
-
onThumbPointerDown: (
|
|
7794
|
-
onDragScroll: (
|
|
7795
|
-
onWheelScroll: (
|
|
7845
|
+
onThumbPointerDown: (h) => e.onThumbPointerDown(h.x),
|
|
7846
|
+
onDragScroll: (h) => e.onDragScroll(h.x),
|
|
7847
|
+
onWheelScroll: (h, f) => {
|
|
7796
7848
|
if (o.viewport) {
|
|
7797
|
-
const
|
|
7798
|
-
e.onWheelScroll(
|
|
7849
|
+
const m = o.viewport.scrollLeft + h.deltaX;
|
|
7850
|
+
e.onWheelScroll(m), wi(m, f) && h.preventDefault();
|
|
7799
7851
|
}
|
|
7800
7852
|
},
|
|
7801
7853
|
onResize: () => {
|
|
@@ -7811,9 +7863,9 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7811
7863
|
}
|
|
7812
7864
|
}
|
|
7813
7865
|
);
|
|
7814
|
-
}), Wp =
|
|
7815
|
-
const { sizes: n, onSizesChange: a, ...r } = e, o = Me(_e, e.__scopeScrollArea), [i, s] =
|
|
7816
|
-
return
|
|
7866
|
+
}), Wp = d.forwardRef((e, t) => {
|
|
7867
|
+
const { sizes: n, onSizesChange: a, ...r } = e, o = Me(_e, e.__scopeScrollArea), [i, s] = d.useState(), l = d.useRef(null), c = he(t, l, o.onScrollbarYChange);
|
|
7868
|
+
return d.useEffect(() => {
|
|
7817
7869
|
l.current && s(getComputedStyle(l.current));
|
|
7818
7870
|
}, [l]), /* @__PURE__ */ u.jsx(
|
|
7819
7871
|
hi,
|
|
@@ -7830,12 +7882,12 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7830
7882
|
"--radix-scroll-area-thumb-height": gn(n) + "px",
|
|
7831
7883
|
...e.style
|
|
7832
7884
|
},
|
|
7833
|
-
onThumbPointerDown: (
|
|
7834
|
-
onDragScroll: (
|
|
7835
|
-
onWheelScroll: (
|
|
7885
|
+
onThumbPointerDown: (h) => e.onThumbPointerDown(h.y),
|
|
7886
|
+
onDragScroll: (h) => e.onDragScroll(h.y),
|
|
7887
|
+
onWheelScroll: (h, f) => {
|
|
7836
7888
|
if (o.viewport) {
|
|
7837
|
-
const
|
|
7838
|
-
e.onWheelScroll(
|
|
7889
|
+
const m = o.viewport.scrollTop + h.deltaY;
|
|
7890
|
+
e.onWheelScroll(m), wi(m, f) && h.preventDefault();
|
|
7839
7891
|
}
|
|
7840
7892
|
},
|
|
7841
7893
|
onResize: () => {
|
|
@@ -7851,7 +7903,7 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7851
7903
|
}
|
|
7852
7904
|
}
|
|
7853
7905
|
);
|
|
7854
|
-
}), [Lp, mi] = li(_e), hi =
|
|
7906
|
+
}), [Lp, mi] = li(_e), hi = d.forwardRef((e, t) => {
|
|
7855
7907
|
const {
|
|
7856
7908
|
__scopeScrollArea: n,
|
|
7857
7909
|
sizes: a,
|
|
@@ -7861,23 +7913,23 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7861
7913
|
onThumbPointerDown: s,
|
|
7862
7914
|
onThumbPositionChange: l,
|
|
7863
7915
|
onDragScroll: c,
|
|
7864
|
-
onWheelScroll:
|
|
7865
|
-
onResize:
|
|
7866
|
-
...
|
|
7867
|
-
} = e, g = Me(_e, n), [b, w] =
|
|
7868
|
-
function
|
|
7916
|
+
onWheelScroll: h,
|
|
7917
|
+
onResize: f,
|
|
7918
|
+
...m
|
|
7919
|
+
} = e, g = Me(_e, n), [b, w] = d.useState(null), p = he(t, (R) => w(R)), v = d.useRef(null), S = d.useRef(""), y = g.viewport, M = a.content - a.viewport, x = Se(h), N = Se(l), C = bn(f, 10);
|
|
7920
|
+
function D(R) {
|
|
7869
7921
|
if (v.current) {
|
|
7870
|
-
const j =
|
|
7871
|
-
c({ x: j, y:
|
|
7922
|
+
const j = R.clientX - v.current.left, k = R.clientY - v.current.top;
|
|
7923
|
+
c({ x: j, y: k });
|
|
7872
7924
|
}
|
|
7873
7925
|
}
|
|
7874
|
-
return
|
|
7875
|
-
const
|
|
7876
|
-
const
|
|
7877
|
-
(b == null ? void 0 : b.contains(
|
|
7926
|
+
return d.useEffect(() => {
|
|
7927
|
+
const R = (j) => {
|
|
7928
|
+
const k = j.target;
|
|
7929
|
+
(b == null ? void 0 : b.contains(k)) && x(j, M);
|
|
7878
7930
|
};
|
|
7879
|
-
return document.addEventListener("wheel",
|
|
7880
|
-
}, [y, b,
|
|
7931
|
+
return document.addEventListener("wheel", R, { passive: !1 }), () => document.removeEventListener("wheel", R, { passive: !1 });
|
|
7932
|
+
}, [y, b, M, x]), d.useEffect(N, [a, N]), ut(b, C), ut(g.content, C), /* @__PURE__ */ u.jsx(
|
|
7881
7933
|
Lp,
|
|
7882
7934
|
{
|
|
7883
7935
|
scope: n,
|
|
@@ -7890,46 +7942,46 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7890
7942
|
children: /* @__PURE__ */ u.jsx(
|
|
7891
7943
|
ne.div,
|
|
7892
7944
|
{
|
|
7893
|
-
...
|
|
7945
|
+
...m,
|
|
7894
7946
|
ref: p,
|
|
7895
|
-
style: { position: "absolute", ...
|
|
7896
|
-
onPointerDown: F(e.onPointerDown, (
|
|
7897
|
-
|
|
7947
|
+
style: { position: "absolute", ...m.style },
|
|
7948
|
+
onPointerDown: F(e.onPointerDown, (R) => {
|
|
7949
|
+
R.button === 0 && (R.target.setPointerCapture(R.pointerId), v.current = b.getBoundingClientRect(), S.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", g.viewport && (g.viewport.style.scrollBehavior = "auto"), D(R));
|
|
7898
7950
|
}),
|
|
7899
|
-
onPointerMove: F(e.onPointerMove,
|
|
7900
|
-
onPointerUp: F(e.onPointerUp, (
|
|
7901
|
-
const j =
|
|
7902
|
-
j.hasPointerCapture(
|
|
7951
|
+
onPointerMove: F(e.onPointerMove, D),
|
|
7952
|
+
onPointerUp: F(e.onPointerUp, (R) => {
|
|
7953
|
+
const j = R.target;
|
|
7954
|
+
j.hasPointerCapture(R.pointerId) && j.releasePointerCapture(R.pointerId), document.body.style.webkitUserSelect = S.current, g.viewport && (g.viewport.style.scrollBehavior = ""), v.current = null;
|
|
7903
7955
|
})
|
|
7904
7956
|
}
|
|
7905
7957
|
)
|
|
7906
7958
|
}
|
|
7907
7959
|
);
|
|
7908
|
-
}), Zt = "ScrollAreaThumb", pi =
|
|
7960
|
+
}), Zt = "ScrollAreaThumb", pi = d.forwardRef(
|
|
7909
7961
|
(e, t) => {
|
|
7910
7962
|
const { forceMount: n, ...a } = e, r = mi(Zt, e.__scopeScrollArea);
|
|
7911
7963
|
return /* @__PURE__ */ u.jsx(dt, { present: n || r.hasThumb, children: /* @__PURE__ */ u.jsx(zp, { ref: t, ...a }) });
|
|
7912
7964
|
}
|
|
7913
|
-
), zp =
|
|
7965
|
+
), zp = d.forwardRef(
|
|
7914
7966
|
(e, t) => {
|
|
7915
7967
|
const { __scopeScrollArea: n, style: a, ...r } = e, o = Me(Zt, n), i = mi(Zt, n), { onThumbPositionChange: s } = i, l = he(
|
|
7916
7968
|
t,
|
|
7917
|
-
(
|
|
7918
|
-
), c =
|
|
7969
|
+
(f) => i.onThumbChange(f)
|
|
7970
|
+
), c = d.useRef(void 0), h = bn(() => {
|
|
7919
7971
|
c.current && (c.current(), c.current = void 0);
|
|
7920
7972
|
}, 100);
|
|
7921
|
-
return
|
|
7922
|
-
const
|
|
7923
|
-
if (
|
|
7924
|
-
const
|
|
7925
|
-
if (
|
|
7926
|
-
const g = Bp(
|
|
7973
|
+
return d.useEffect(() => {
|
|
7974
|
+
const f = o.viewport;
|
|
7975
|
+
if (f) {
|
|
7976
|
+
const m = () => {
|
|
7977
|
+
if (h(), !c.current) {
|
|
7978
|
+
const g = Bp(f, s);
|
|
7927
7979
|
c.current = g, s();
|
|
7928
7980
|
}
|
|
7929
7981
|
};
|
|
7930
|
-
return s(),
|
|
7982
|
+
return s(), f.addEventListener("scroll", m), () => f.removeEventListener("scroll", m);
|
|
7931
7983
|
}
|
|
7932
|
-
}, [o.viewport,
|
|
7984
|
+
}, [o.viewport, h, s]), /* @__PURE__ */ u.jsx(
|
|
7933
7985
|
ne.div,
|
|
7934
7986
|
{
|
|
7935
7987
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
@@ -7940,8 +7992,8 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7940
7992
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
7941
7993
|
...a
|
|
7942
7994
|
},
|
|
7943
|
-
onPointerDownCapture: F(e.onPointerDownCapture, (
|
|
7944
|
-
const g =
|
|
7995
|
+
onPointerDownCapture: F(e.onPointerDownCapture, (f) => {
|
|
7996
|
+
const g = f.target.getBoundingClientRect(), b = f.clientX - g.left, w = f.clientY - g.top;
|
|
7945
7997
|
i.onThumbPointerDown({ x: b, y: w });
|
|
7946
7998
|
}),
|
|
7947
7999
|
onPointerUp: F(e.onPointerUp, i.onThumbPointerUp)
|
|
@@ -7950,23 +8002,23 @@ var Ip = f.forwardRef((e, t) => {
|
|
|
7950
8002
|
}
|
|
7951
8003
|
);
|
|
7952
8004
|
pi.displayName = Zt;
|
|
7953
|
-
var Ma = "ScrollAreaCorner", gi =
|
|
8005
|
+
var Ma = "ScrollAreaCorner", gi = d.forwardRef(
|
|
7954
8006
|
(e, t) => {
|
|
7955
8007
|
const n = Me(Ma, e.__scopeScrollArea), a = !!(n.scrollbarX && n.scrollbarY);
|
|
7956
8008
|
return n.type !== "scroll" && a ? /* @__PURE__ */ u.jsx(Fp, { ...e, ref: t }) : null;
|
|
7957
8009
|
}
|
|
7958
8010
|
);
|
|
7959
8011
|
gi.displayName = Ma;
|
|
7960
|
-
var Fp =
|
|
7961
|
-
const { __scopeScrollArea: n, ...a } = e, r = Me(Ma, n), [o, i] =
|
|
8012
|
+
var Fp = d.forwardRef((e, t) => {
|
|
8013
|
+
const { __scopeScrollArea: n, ...a } = e, r = Me(Ma, n), [o, i] = d.useState(0), [s, l] = d.useState(0), c = !!(o && s);
|
|
7962
8014
|
return ut(r.scrollbarX, () => {
|
|
7963
|
-
var
|
|
7964
|
-
const
|
|
7965
|
-
r.onCornerHeightChange(
|
|
8015
|
+
var f;
|
|
8016
|
+
const h = ((f = r.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
|
|
8017
|
+
r.onCornerHeightChange(h), l(h);
|
|
7966
8018
|
}), ut(r.scrollbarY, () => {
|
|
7967
|
-
var
|
|
7968
|
-
const
|
|
7969
|
-
r.onCornerWidthChange(
|
|
8019
|
+
var f;
|
|
8020
|
+
const h = ((f = r.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
|
|
8021
|
+
r.onCornerWidthChange(h), i(h);
|
|
7970
8022
|
}), c ? /* @__PURE__ */ u.jsx(
|
|
7971
8023
|
ne.div,
|
|
7972
8024
|
{
|
|
@@ -7996,8 +8048,8 @@ function gn(e) {
|
|
|
7996
8048
|
return Math.max(a, 18);
|
|
7997
8049
|
}
|
|
7998
8050
|
function $p(e, t, n, a = "ltr") {
|
|
7999
|
-
const r = gn(n), o = r / 2, i = t || o, s = r - i, l = n.scrollbar.paddingStart + i, c = n.scrollbar.size - n.scrollbar.paddingEnd - s,
|
|
8000
|
-
return vi([l, c],
|
|
8051
|
+
const r = gn(n), o = r / 2, i = t || o, s = r - i, l = n.scrollbar.paddingStart + i, c = n.scrollbar.size - n.scrollbar.paddingEnd - s, h = n.content - n.viewport, f = a === "ltr" ? [0, h] : [h * -1, 0];
|
|
8052
|
+
return vi([l, c], f)(e);
|
|
8001
8053
|
}
|
|
8002
8054
|
function ar(e, t, n = "ltr") {
|
|
8003
8055
|
const a = gn(t), r = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, o = t.scrollbar.size - r, i = t.content - t.viewport, s = o - a, l = n === "ltr" ? [0, i] : [i * -1, 0], c = Zn(e, l);
|
|
@@ -8022,8 +8074,8 @@ var Bp = (e, t = () => {
|
|
|
8022
8074
|
}(), () => window.cancelAnimationFrame(a);
|
|
8023
8075
|
};
|
|
8024
8076
|
function bn(e, t) {
|
|
8025
|
-
const n = Se(e), a =
|
|
8026
|
-
return
|
|
8077
|
+
const n = Se(e), a = d.useRef(0);
|
|
8078
|
+
return d.useEffect(() => () => window.clearTimeout(a.current), []), d.useCallback(() => {
|
|
8027
8079
|
window.clearTimeout(a.current), a.current = window.setTimeout(n, t);
|
|
8028
8080
|
}, [n, t]);
|
|
8029
8081
|
}
|
|
@@ -8042,7 +8094,7 @@ function ut(e, t) {
|
|
|
8042
8094
|
}, [e, n]);
|
|
8043
8095
|
}
|
|
8044
8096
|
var yi = ci, Hp = di, Yp = gi;
|
|
8045
|
-
const Vp =
|
|
8097
|
+
const Vp = d.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ u.jsxs(
|
|
8046
8098
|
yi,
|
|
8047
8099
|
{
|
|
8048
8100
|
ref: a,
|
|
@@ -8067,7 +8119,7 @@ const Vp = f.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__
|
|
|
8067
8119
|
}
|
|
8068
8120
|
));
|
|
8069
8121
|
Vp.displayName = yi.displayName;
|
|
8070
|
-
const Xn =
|
|
8122
|
+
const Xn = d.forwardRef(({ className: e, orientation: t = "vertical", ...n }, a) => /* @__PURE__ */ u.jsx(
|
|
8071
8123
|
xa,
|
|
8072
8124
|
{
|
|
8073
8125
|
ref: a,
|
|
@@ -8094,17 +8146,17 @@ var In, Ca = "HoverCard", [xi, Cg] = Qe(Ca, [
|
|
|
8094
8146
|
onOpenChange: o,
|
|
8095
8147
|
openDelay: i = 700,
|
|
8096
8148
|
closeDelay: s = 300
|
|
8097
|
-
} = e, l = vn(t), c =
|
|
8149
|
+
} = e, l = vn(t), c = d.useRef(0), h = d.useRef(0), f = d.useRef(!1), m = d.useRef(!1), [g = !1, b] = It({
|
|
8098
8150
|
prop: a,
|
|
8099
8151
|
defaultProp: r,
|
|
8100
8152
|
onChange: o
|
|
8101
|
-
}), w =
|
|
8102
|
-
clearTimeout(
|
|
8103
|
-
}, [i, b]), p =
|
|
8104
|
-
clearTimeout(c.current), !
|
|
8105
|
-
}, [s, b]), v =
|
|
8106
|
-
return
|
|
8107
|
-
clearTimeout(c.current), clearTimeout(
|
|
8153
|
+
}), w = d.useCallback(() => {
|
|
8154
|
+
clearTimeout(h.current), c.current = window.setTimeout(() => b(!0), i);
|
|
8155
|
+
}, [i, b]), p = d.useCallback(() => {
|
|
8156
|
+
clearTimeout(c.current), !f.current && !m.current && (h.current = window.setTimeout(() => b(!1), s));
|
|
8157
|
+
}, [s, b]), v = d.useCallback(() => b(!1), [b]);
|
|
8158
|
+
return d.useEffect(() => () => {
|
|
8159
|
+
clearTimeout(c.current), clearTimeout(h.current);
|
|
8108
8160
|
}, []), /* @__PURE__ */ u.jsx(
|
|
8109
8161
|
Gp,
|
|
8110
8162
|
{
|
|
@@ -8114,14 +8166,14 @@ var In, Ca = "HoverCard", [xi, Cg] = Qe(Ca, [
|
|
|
8114
8166
|
onOpen: w,
|
|
8115
8167
|
onClose: p,
|
|
8116
8168
|
onDismiss: v,
|
|
8117
|
-
hasSelectionRef:
|
|
8118
|
-
isPointerDownOnContentRef:
|
|
8169
|
+
hasSelectionRef: f,
|
|
8170
|
+
isPointerDownOnContentRef: m,
|
|
8119
8171
|
children: /* @__PURE__ */ u.jsx(El, { ...l, children: n })
|
|
8120
8172
|
}
|
|
8121
8173
|
);
|
|
8122
8174
|
};
|
|
8123
8175
|
Si.displayName = Ca;
|
|
8124
|
-
var Mi = "HoverCardTrigger", Ci =
|
|
8176
|
+
var Mi = "HoverCardTrigger", Ci = d.forwardRef(
|
|
8125
8177
|
(e, t) => {
|
|
8126
8178
|
const { __scopeHoverCard: n, ...a } = e, r = Na(Mi, n), o = vn(n);
|
|
8127
8179
|
return /* @__PURE__ */ u.jsx(Nl, { asChild: !0, ...o, children: /* @__PURE__ */ u.jsx(
|
|
@@ -8142,7 +8194,7 @@ var Mi = "HoverCardTrigger", Ci = f.forwardRef(
|
|
|
8142
8194
|
Ci.displayName = Mi;
|
|
8143
8195
|
var Kp = "HoverCardPortal", [Ng, Up] = xi(Kp, {
|
|
8144
8196
|
forceMount: void 0
|
|
8145
|
-
}), Jt = "HoverCardContent", Ni =
|
|
8197
|
+
}), Jt = "HoverCardContent", Ni = d.forwardRef(
|
|
8146
8198
|
(e, t) => {
|
|
8147
8199
|
const n = Up(Jt, e.__scopeHoverCard), { forceMount: a = n.forceMount, ...r } = e, o = Na(Jt, e.__scopeHoverCard);
|
|
8148
8200
|
return /* @__PURE__ */ u.jsx(dt, { present: a || o.open, children: /* @__PURE__ */ u.jsx(
|
|
@@ -8158,7 +8210,7 @@ var Kp = "HoverCardPortal", [Ng, Up] = xi(Kp, {
|
|
|
8158
8210
|
}
|
|
8159
8211
|
);
|
|
8160
8212
|
Ni.displayName = Jt;
|
|
8161
|
-
var qp =
|
|
8213
|
+
var qp = d.forwardRef((e, t) => {
|
|
8162
8214
|
const {
|
|
8163
8215
|
__scopeHoverCard: n,
|
|
8164
8216
|
onEscapeKeyDown: a,
|
|
@@ -8166,16 +8218,16 @@ var qp = f.forwardRef((e, t) => {
|
|
|
8166
8218
|
onFocusOutside: o,
|
|
8167
8219
|
onInteractOutside: i,
|
|
8168
8220
|
...s
|
|
8169
|
-
} = e, l = Na(Jt, n), c = vn(n),
|
|
8170
|
-
return
|
|
8171
|
-
if (
|
|
8221
|
+
} = e, l = Na(Jt, n), c = vn(n), h = d.useRef(null), f = he(t, h), [m, g] = d.useState(!1);
|
|
8222
|
+
return d.useEffect(() => {
|
|
8223
|
+
if (m) {
|
|
8172
8224
|
const b = document.body;
|
|
8173
8225
|
return In = b.style.userSelect || b.style.webkitUserSelect, b.style.userSelect = "none", b.style.webkitUserSelect = "none", () => {
|
|
8174
8226
|
b.style.userSelect = In, b.style.webkitUserSelect = In;
|
|
8175
8227
|
};
|
|
8176
8228
|
}
|
|
8177
|
-
}, [
|
|
8178
|
-
if (
|
|
8229
|
+
}, [m]), d.useEffect(() => {
|
|
8230
|
+
if (h.current) {
|
|
8179
8231
|
const b = () => {
|
|
8180
8232
|
g(!1), l.isPointerDownOnContentRef.current = !1, setTimeout(() => {
|
|
8181
8233
|
var p;
|
|
@@ -8186,8 +8238,8 @@ var qp = f.forwardRef((e, t) => {
|
|
|
8186
8238
|
document.removeEventListener("pointerup", b), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !1;
|
|
8187
8239
|
};
|
|
8188
8240
|
}
|
|
8189
|
-
}, [l.isPointerDownOnContentRef, l.hasSelectionRef]),
|
|
8190
|
-
|
|
8241
|
+
}, [l.isPointerDownOnContentRef, l.hasSelectionRef]), d.useEffect(() => {
|
|
8242
|
+
h.current && Qp(h.current).forEach((w) => w.setAttribute("tabindex", "-1"));
|
|
8191
8243
|
}), /* @__PURE__ */ u.jsx(
|
|
8192
8244
|
Pl,
|
|
8193
8245
|
{
|
|
@@ -8208,12 +8260,12 @@ var qp = f.forwardRef((e, t) => {
|
|
|
8208
8260
|
onPointerDown: F(s.onPointerDown, (b) => {
|
|
8209
8261
|
b.currentTarget.contains(b.target) && g(!0), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !0;
|
|
8210
8262
|
}),
|
|
8211
|
-
ref:
|
|
8263
|
+
ref: f,
|
|
8212
8264
|
style: {
|
|
8213
8265
|
...s.style,
|
|
8214
|
-
userSelect:
|
|
8266
|
+
userSelect: m ? "text" : void 0,
|
|
8215
8267
|
// Safari requires prefix
|
|
8216
|
-
WebkitUserSelect:
|
|
8268
|
+
WebkitUserSelect: m ? "text" : void 0,
|
|
8217
8269
|
"--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
8218
8270
|
"--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
|
|
8219
8271
|
"--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -8224,7 +8276,7 @@ var qp = f.forwardRef((e, t) => {
|
|
|
8224
8276
|
)
|
|
8225
8277
|
}
|
|
8226
8278
|
);
|
|
8227
|
-
}), Xp = "HoverCardArrow", Zp =
|
|
8279
|
+
}), Xp = "HoverCardArrow", Zp = d.forwardRef(
|
|
8228
8280
|
(e, t) => {
|
|
8229
8281
|
const { __scopeHoverCard: n, ...a } = e, r = vn(n);
|
|
8230
8282
|
return /* @__PURE__ */ u.jsx(Tl, { ...r, ...a, ref: t });
|
|
@@ -8262,26 +8314,26 @@ function Tg({
|
|
|
8262
8314
|
maxFiles: n = 1,
|
|
8263
8315
|
className: a
|
|
8264
8316
|
}) {
|
|
8265
|
-
const [r, o] = Ee([]), [i, s] = Ee(!1), l = t.join(","), c = ot(null),
|
|
8317
|
+
const [r, o] = Ee([]), [i, s] = Ee(!1), l = t.join(","), c = ot(null), h = ie(
|
|
8266
8318
|
(p) => {
|
|
8267
8319
|
if (!p) return;
|
|
8268
8320
|
const v = Array.from(p), S = t.length ? v.filter(
|
|
8269
|
-
(
|
|
8270
|
-
(x) =>
|
|
8321
|
+
(M) => t.some(
|
|
8322
|
+
(x) => M.type.includes(x.replace("*", "")) || M.name.endsWith(x.replace("*", ""))
|
|
8271
8323
|
)
|
|
8272
8324
|
) : v, y = n > 1 ? [...r, ...S].slice(0, n) : S.slice(0, n);
|
|
8273
8325
|
o(y), e(y), c.current && (c.current.value = "");
|
|
8274
8326
|
},
|
|
8275
8327
|
[r, n, t, e]
|
|
8276
|
-
),
|
|
8328
|
+
), f = ie((p) => {
|
|
8277
8329
|
p.preventDefault(), s(!0);
|
|
8278
|
-
}, []),
|
|
8330
|
+
}, []), m = ie(() => {
|
|
8279
8331
|
s(!1);
|
|
8280
8332
|
}, []), g = ie(
|
|
8281
8333
|
(p) => {
|
|
8282
|
-
p.preventDefault(), s(!1),
|
|
8334
|
+
p.preventDefault(), s(!1), h(p.dataTransfer.files);
|
|
8283
8335
|
},
|
|
8284
|
-
[
|
|
8336
|
+
[h]
|
|
8285
8337
|
), b = () => {
|
|
8286
8338
|
c.current && c.current.click();
|
|
8287
8339
|
}, w = (p) => {
|
|
@@ -8296,8 +8348,8 @@ function Tg({
|
|
|
8296
8348
|
i ? "al-border-primary al-bg-primary/5" : "al-border-muted-foreground/25 hover:al-border-primary/50",
|
|
8297
8349
|
r.length > 0 ? "al-pb-2" : ""
|
|
8298
8350
|
),
|
|
8299
|
-
onDragOver:
|
|
8300
|
-
onDragLeave:
|
|
8351
|
+
onDragOver: f,
|
|
8352
|
+
onDragLeave: m,
|
|
8301
8353
|
onDrop: g,
|
|
8302
8354
|
onClick: b,
|
|
8303
8355
|
children: [
|
|
@@ -8307,7 +8359,7 @@ function Tg({
|
|
|
8307
8359
|
type: "file",
|
|
8308
8360
|
ref: c,
|
|
8309
8361
|
className: "al-hidden",
|
|
8310
|
-
onChange: (p) =>
|
|
8362
|
+
onChange: (p) => h(p.target.files),
|
|
8311
8363
|
accept: l,
|
|
8312
8364
|
multiple: n > 1
|
|
8313
8365
|
}
|