zudoku 0.7.2-dev.0 → 0.7.2-dev.11
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/cli/cli.js +3 -3
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/outdated.js +11 -20
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/xdg/lib.d.ts +3 -3
- package/dist/cli/common/xdg/lib.js +3 -3
- package/dist/cli/common/xdg/lib.js.map +1 -1
- package/dist/cli/dev/handler.js +3 -12
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -9
- package/dist/config/validators/InputSidebarSchema.js +0 -2
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +3 -9
- package/dist/config/validators/SidebarSchema.js +3 -7
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +0 -115
- package/dist/config/validators/validate.js +0 -43
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +3 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +2 -2
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/vite/config.d.ts +3 -3
- package/dist/vite/config.js +22 -23
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +4 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +4 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-sidebar.js +1 -10
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +0 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.js +0 -7
- package/dist/vite/prerender.js.map +1 -1
- package/lib/AuthenticationPlugin-DYnkydqa.js +55 -0
- package/lib/{AuthenticationPlugin-BMjOjKqE.js.map → AuthenticationPlugin-DYnkydqa.js.map} +1 -1
- package/lib/CategoryHeading-w2EW676o.js +10 -0
- package/lib/{CategoryHeading-BE8e6QdS.js.map → CategoryHeading-w2EW676o.js.map} +1 -1
- package/lib/DeveloperHint-D87KcpDW.js +16 -0
- package/lib/{DeveloperHint-Bl9gIdNI.js.map → DeveloperHint-D87KcpDW.js.map} +1 -1
- package/lib/ErrorPage-BdHAg3Rg.js +18 -0
- package/lib/{ErrorPage-CPR1XVKW.js.map → ErrorPage-BdHAg3Rg.js.map} +1 -1
- package/lib/Input-BmwltPfA.js +2214 -0
- package/lib/Input-BmwltPfA.js.map +1 -0
- package/lib/{Markdown-CCNihH_N.js → Markdown-BZUoEvL7.js} +3354 -3189
- package/lib/Markdown-BZUoEvL7.js.map +1 -0
- package/lib/MdxPage-E4NFxzHQ.js +183 -0
- package/lib/MdxPage-E4NFxzHQ.js.map +1 -0
- package/lib/OperationList-DVIuzHN7.js +628 -0
- package/lib/OperationList-DVIuzHN7.js.map +1 -0
- package/lib/Route-5sI-urRK.js +14 -0
- package/lib/{Route-xRJ9mJgH.js.map → Route-5sI-urRK.js.map} +1 -1
- package/lib/{SidebarBadge-2JcxswKF.js → SidebarBadge-6EEz-Bwe.js} +47 -47
- package/lib/{SidebarBadge-2JcxswKF.js.map → SidebarBadge-6EEz-Bwe.js.map} +1 -1
- package/lib/SlotletProvider-CNyl5wU0.js +262 -0
- package/lib/SlotletProvider-CNyl5wU0.js.map +1 -0
- package/lib/Spinner-B9eFggre.js +15 -0
- package/lib/Spinner-B9eFggre.js.map +1 -0
- package/lib/{ZudokuContext-JoyeA9dT.js → ZudokuContext-BHNQL3XO.js} +79 -78
- package/lib/{ZudokuContext-JoyeA9dT.js.map → ZudokuContext-BHNQL3XO.js.map} +1 -1
- package/lib/{_commonjsHelpers-BkfeUUK-.js → _commonjsHelpers-BVfed4GL.js} +3 -3
- package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
- package/lib/{index-BLvMkqjO.js → index-BGY8VjAV.js} +26 -26
- package/lib/{index-BLvMkqjO.js.map → index-BGY8VjAV.js.map} +1 -1
- package/lib/{index-G1-TGLO1.js → index-CbJpF8Yf.js} +8 -8
- package/lib/{index-G1-TGLO1.js.map → index-CbJpF8Yf.js.map} +1 -1
- package/lib/index-ChhUJhLT.js +1771 -0
- package/lib/index-ChhUJhLT.js.map +1 -0
- package/lib/{index-BF4cn28H.js → index-DdUotMOQ.js} +2196 -1953
- package/lib/index-DdUotMOQ.js.map +1 -0
- package/lib/jsx-runtime-B6kdoens.js +635 -0
- package/lib/jsx-runtime-B6kdoens.js.map +1 -0
- package/lib/{router-D2p7Olpn.js → router-BiRCp01d.js} +22 -22
- package/lib/{router-D2p7Olpn.js.map → router-BiRCp01d.js.map} +1 -1
- package/lib/{slugify-DbLhpSPt.js → slugify-CiPVjteN.js} +2 -2
- package/lib/{slugify-DbLhpSPt.js.map → slugify-CiPVjteN.js.map} +1 -1
- package/lib/{state-lIwt9isb.js → state-DsXXkBLH.js} +15 -15
- package/lib/{state-lIwt9isb.js.map → state-DsXXkBLH.js.map} +1 -1
- package/lib/{utils-B8R4grFM.js → utils-BPHLKjns.js} +153 -152
- package/lib/{utils-B8R4grFM.js.map → utils-BPHLKjns.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +21 -16
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +37 -32
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +505 -485
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1782 -1574
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +268 -153
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +6 -5
- package/lib/zudoku.plugin-custom-page.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +13 -12
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -8
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-search-inkeep.js +21 -20
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +4 -9
- package/src/lib/components/navigation/SidebarCategory.tsx +31 -43
- package/src/lib/components/navigation/SidebarItem.tsx +1 -2
- package/dist/lib/icons.d.ts +0 -1
- package/dist/lib/icons.js +0 -2
- package/dist/lib/icons.js.map +0 -1
- package/dist/vite/plugin-icons.d.ts +0 -3
- package/dist/vite/plugin-icons.js +0 -47
- package/dist/vite/plugin-icons.js.map +0 -1
- package/dist/vite/sitemap.d.ts +0 -19
- package/dist/vite/sitemap.js +0 -40
- package/dist/vite/sitemap.js.map +0 -1
- package/lib/AuthenticationPlugin-BMjOjKqE.js +0 -54
- package/lib/CategoryHeading-BE8e6QdS.js +0 -9
- package/lib/DeveloperHint-Bl9gIdNI.js +0 -12
- package/lib/ErrorPage-CPR1XVKW.js +0 -12
- package/lib/Input-BBlyeDuG.js +0 -2192
- package/lib/Input-BBlyeDuG.js.map +0 -1
- package/lib/Markdown-CCNihH_N.js.map +0 -1
- package/lib/MdxPage-BavkYqzi.js +0 -140
- package/lib/MdxPage-BavkYqzi.js.map +0 -1
- package/lib/OperationList-C6Ps2keZ.js +0 -460
- package/lib/OperationList-C6Ps2keZ.js.map +0 -1
- package/lib/Route-xRJ9mJgH.js +0 -13
- package/lib/SlotletProvider-CuB3Ts8r.js +0 -213
- package/lib/SlotletProvider-CuB3Ts8r.js.map +0 -1
- package/lib/Spinner-BlxzaFFF.js +0 -6
- package/lib/Spinner-BlxzaFFF.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/index-BF4cn28H.js.map +0 -1
- package/lib/jsx-runtime-lNnQYwFN.js +0 -2403
- package/lib/jsx-runtime-lNnQYwFN.js.map +0 -1
- package/lib/zudoku.icons.js +0 -2
- package/lib/zudoku.icons.js.map +0 -1
- package/src/lib/icons.ts +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Io = Object.defineProperty;
|
|
2
|
+
var ln = (e) => {
|
|
2
3
|
throw TypeError(e);
|
|
3
4
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var Ao = (e, t, n) => t in e ? Io(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var J = (e, t, n) => Ao(e, typeof t != "symbol" ? t + "" : t, n), cn = (e, t, n) => t.has(e) || ln("Cannot " + n);
|
|
7
|
+
var b = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ae = (e, t, n) => t.has(e) ? ln("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, r) => (cn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
|
+
var lt = (e, t, n, r) => ({
|
|
7
9
|
set _(a) {
|
|
8
10
|
G(e, t, a, n);
|
|
9
11
|
},
|
|
@@ -11,29 +13,128 @@ var st = (e, t, n, r) => ({
|
|
|
11
13
|
return b(e, t, r);
|
|
12
14
|
}
|
|
13
15
|
});
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { E as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { S as
|
|
25
|
-
import { j as
|
|
26
|
-
import {
|
|
27
|
-
import { c as
|
|
28
|
-
import { S as
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
import { H as Dn, a as Ot, M as ko, u as $o, A as Lo, b as Fo } from "./utils-BPHLKjns.js";
|
|
17
|
+
import { d as Ho, a as Uo, R as Bo, N as Ye, L as It, u as zo, O as jn, b as Ko, c as At } from "./index-ChhUJhLT.js";
|
|
18
|
+
import { E as Nn, S as Te, a as qo, R as Vo } from "./SlotletProvider-CNyl5wU0.js";
|
|
19
|
+
import { j as o } from "./jsx-runtime-B6kdoens.js";
|
|
20
|
+
import { M as Qo, c as Go, a as Pn, b as Tn, A as Wo, u as et, h as Yo, d as A, e as Xo, F as Jo, D as Zo, C as ea, P as Ue, f as kt, g as ta, i as _n, R as na, S as ra, j as oa, k as aa, l as On, m as sa, n as pt, o as In, V as An, p as un, B as Dt } from "./index-BGY8VjAV.js";
|
|
21
|
+
import { c as xe, a as O, C as ia, b as kn, u as la, T as ca, M as ua, V as da, d as $t, e as fa, f as ha } from "./Markdown-BZUoEvL7.js";
|
|
22
|
+
import * as h from "react";
|
|
23
|
+
import g, { StrictMode as $n, createContext as Ln, Component as pa, createElement as dn, isValidElement as ma, useState as _e, useLayoutEffect as ga, useEffect as be, useCallback as Fn, Suspense as Hn, memo as Un, useMemo as yt, useContext as va, Fragment as wa, useRef as Lt, forwardRef as ba } from "react";
|
|
24
|
+
import { g as Ft } from "./_commonjsHelpers-BVfed4GL.js";
|
|
25
|
+
import { r as xa } from "./router-BiRCp01d.js";
|
|
26
|
+
import { S as jt, R as ya, T as Ma, C as Sa } from "./index-CbJpF8Yf.js";
|
|
27
|
+
import { S as Bn, h as zn, Q as Ea, n as ee, m as fn, a as hn, b as ve, e as Ca, c as Ra, d as Da, f as ja, o as pn, r as mn, g as Na, i as gn, p as vn, s as Pa, u as Be, j as Ta, Z as _a, k as Oa, l as Kn, q as Ia } from "./ZudokuContext-BHNQL3XO.js";
|
|
28
|
+
import { j as Ht } from "./joinPath-B7kNnUX4.js";
|
|
29
|
+
import { c as qn, P as vt, R as Aa, I as ka, O as $a, C as La, T as Fa, a as Ha, b as Ua, d as Ba, D as za, e as Ka, S as Mt } from "./SidebarBadge-6EEz-Bwe.js";
|
|
30
|
+
import { S as qa } from "./Spinner-B9eFggre.js";
|
|
31
|
+
/**
|
|
32
|
+
* @license lucide-react v0.378.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
const Vn = xe("ChevronRight", [
|
|
38
|
+
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
39
|
+
]);
|
|
40
|
+
/**
|
|
41
|
+
* @license lucide-react v0.378.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
const Va = xe("CircleX", [
|
|
47
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
48
|
+
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
49
|
+
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
50
|
+
]);
|
|
51
|
+
/**
|
|
52
|
+
* @license lucide-react v0.378.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/
|
|
57
|
+
const Qa = xe("Dot", [
|
|
58
|
+
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
|
59
|
+
]);
|
|
60
|
+
/**
|
|
61
|
+
* @license lucide-react v0.378.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/
|
|
66
|
+
const Ga = xe("ExternalLink", [
|
|
67
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
68
|
+
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
69
|
+
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
70
|
+
]);
|
|
71
|
+
/**
|
|
72
|
+
* @license lucide-react v0.378.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/
|
|
77
|
+
const Wa = xe("Menu", [
|
|
78
|
+
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
79
|
+
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
80
|
+
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
81
|
+
]);
|
|
82
|
+
/**
|
|
83
|
+
* @license lucide-react v0.378.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/
|
|
88
|
+
const Ya = xe("MoonStar", [
|
|
89
|
+
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
90
|
+
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
91
|
+
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
92
|
+
]);
|
|
93
|
+
/**
|
|
94
|
+
* @license lucide-react v0.378.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/
|
|
99
|
+
const Xa = xe("PanelLeft", [
|
|
100
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
101
|
+
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
102
|
+
]);
|
|
103
|
+
/**
|
|
104
|
+
* @license lucide-react v0.378.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/
|
|
109
|
+
const Ja = xe("Search", [
|
|
110
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
111
|
+
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
112
|
+
]);
|
|
113
|
+
/**
|
|
114
|
+
* @license lucide-react v0.378.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/
|
|
119
|
+
const Za = xe("Sun", [
|
|
120
|
+
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
121
|
+
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
122
|
+
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
123
|
+
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
|
|
124
|
+
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
|
|
125
|
+
["path", { d: "M2 12h2", key: "1t8f8n" }],
|
|
126
|
+
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
127
|
+
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
128
|
+
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
129
|
+
]);
|
|
130
|
+
function es({ error: e }) {
|
|
131
|
+
return /* @__PURE__ */ o.jsx(Nn, { error: e });
|
|
31
132
|
}
|
|
32
|
-
var
|
|
33
|
-
const
|
|
34
|
-
Object.defineProperty(
|
|
35
|
-
var
|
|
36
|
-
function
|
|
133
|
+
var tt = {};
|
|
134
|
+
const ts = /* @__PURE__ */ Ft(xa), ns = /* @__PURE__ */ Ft(Ho), rs = /* @__PURE__ */ Ft(Uo);
|
|
135
|
+
Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
136
|
+
var os = g, fe = ts, Ut = ns, we = rs;
|
|
137
|
+
function as(e) {
|
|
37
138
|
if (e && e.__esModule) return e;
|
|
38
139
|
var t = /* @__PURE__ */ Object.create(null);
|
|
39
140
|
return e && Object.keys(e).forEach(function(n) {
|
|
@@ -48,99 +149,99 @@ function ts(e) {
|
|
|
48
149
|
}
|
|
49
150
|
}), t.default = e, Object.freeze(t);
|
|
50
151
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
152
|
+
var ue = /* @__PURE__ */ as(os);
|
|
153
|
+
function ss({
|
|
53
154
|
basename: e,
|
|
54
155
|
children: t,
|
|
55
156
|
location: n = "/",
|
|
56
157
|
future: r
|
|
57
158
|
}) {
|
|
58
|
-
typeof n == "string" && (n =
|
|
59
|
-
let a =
|
|
159
|
+
typeof n == "string" && (n = we.parsePath(n));
|
|
160
|
+
let a = fe.Action.Pop, s = {
|
|
60
161
|
pathname: n.pathname || "/",
|
|
61
162
|
search: n.search || "",
|
|
62
163
|
hash: n.hash || "",
|
|
63
164
|
state: n.state != null ? n.state : null,
|
|
64
165
|
key: n.key || "default"
|
|
65
|
-
},
|
|
66
|
-
return /* @__PURE__ */
|
|
166
|
+
}, i = Qn();
|
|
167
|
+
return /* @__PURE__ */ ue.createElement(we.Router, {
|
|
67
168
|
basename: e,
|
|
68
169
|
children: t,
|
|
69
|
-
location:
|
|
170
|
+
location: s,
|
|
70
171
|
navigationType: a,
|
|
71
|
-
navigator:
|
|
172
|
+
navigator: i,
|
|
72
173
|
future: r,
|
|
73
174
|
static: !0
|
|
74
175
|
});
|
|
75
176
|
}
|
|
76
|
-
function
|
|
177
|
+
function is({
|
|
77
178
|
context: e,
|
|
78
179
|
router: t,
|
|
79
180
|
hydrate: n = !0,
|
|
80
181
|
nonce: r
|
|
81
182
|
}) {
|
|
82
|
-
t && e || (process.env.NODE_ENV !== "production" ?
|
|
183
|
+
t && e || (process.env.NODE_ENV !== "production" ? fe.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : fe.UNSAFE_invariant(!1));
|
|
83
184
|
let a = {
|
|
84
185
|
router: t,
|
|
85
|
-
navigator:
|
|
186
|
+
navigator: Qn(),
|
|
86
187
|
static: !0,
|
|
87
188
|
staticContext: e,
|
|
88
189
|
basename: e.basename || "/"
|
|
89
|
-
},
|
|
190
|
+
}, s = /* @__PURE__ */ new Map(), i = "";
|
|
90
191
|
if (n !== !1) {
|
|
91
192
|
let u = {
|
|
92
193
|
loaderData: e.loaderData,
|
|
93
194
|
actionData: e.actionData,
|
|
94
|
-
errors:
|
|
195
|
+
errors: cs(e.errors)
|
|
95
196
|
};
|
|
96
|
-
|
|
197
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${ms(JSON.stringify(JSON.stringify(u)))});`;
|
|
97
198
|
}
|
|
98
199
|
let {
|
|
99
|
-
state:
|
|
200
|
+
state: l
|
|
100
201
|
} = a.router;
|
|
101
|
-
return /* @__PURE__ */
|
|
202
|
+
return /* @__PURE__ */ ue.createElement(ue.Fragment, null, /* @__PURE__ */ ue.createElement(we.UNSAFE_DataRouterContext.Provider, {
|
|
102
203
|
value: a
|
|
103
|
-
}, /* @__PURE__ */
|
|
104
|
-
value:
|
|
105
|
-
}, /* @__PURE__ */
|
|
106
|
-
value:
|
|
107
|
-
}, /* @__PURE__ */
|
|
204
|
+
}, /* @__PURE__ */ ue.createElement(we.UNSAFE_DataRouterStateContext.Provider, {
|
|
205
|
+
value: l
|
|
206
|
+
}, /* @__PURE__ */ ue.createElement(we.UNSAFE_FetchersContext.Provider, {
|
|
207
|
+
value: s
|
|
208
|
+
}, /* @__PURE__ */ ue.createElement(we.UNSAFE_ViewTransitionContext.Provider, {
|
|
108
209
|
value: {
|
|
109
210
|
isTransitioning: !1
|
|
110
211
|
}
|
|
111
|
-
}, /* @__PURE__ */
|
|
212
|
+
}, /* @__PURE__ */ ue.createElement(we.Router, {
|
|
112
213
|
basename: a.basename,
|
|
113
|
-
location:
|
|
114
|
-
navigationType:
|
|
214
|
+
location: l.location,
|
|
215
|
+
navigationType: l.historyAction,
|
|
115
216
|
navigator: a.navigator,
|
|
116
217
|
static: a.static,
|
|
117
218
|
future: {
|
|
118
219
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
119
220
|
}
|
|
120
|
-
}, /* @__PURE__ */
|
|
221
|
+
}, /* @__PURE__ */ ue.createElement(ls, {
|
|
121
222
|
routes: t.routes,
|
|
122
223
|
future: t.future,
|
|
123
|
-
state:
|
|
124
|
-
})))))),
|
|
224
|
+
state: l
|
|
225
|
+
})))))), i ? /* @__PURE__ */ ue.createElement("script", {
|
|
125
226
|
suppressHydrationWarning: !0,
|
|
126
227
|
nonce: r,
|
|
127
228
|
dangerouslySetInnerHTML: {
|
|
128
|
-
__html:
|
|
229
|
+
__html: i
|
|
129
230
|
}
|
|
130
231
|
}) : null);
|
|
131
232
|
}
|
|
132
|
-
function
|
|
233
|
+
function ls({
|
|
133
234
|
routes: e,
|
|
134
235
|
future: t,
|
|
135
236
|
state: n
|
|
136
237
|
}) {
|
|
137
|
-
return
|
|
238
|
+
return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
|
|
138
239
|
}
|
|
139
|
-
function
|
|
240
|
+
function cs(e) {
|
|
140
241
|
if (!e) return null;
|
|
141
242
|
let t = Object.entries(e), n = {};
|
|
142
243
|
for (let [r, a] of t)
|
|
143
|
-
|
|
244
|
+
fe.isRouteErrorResponse(a) ? n[r] = {
|
|
144
245
|
...a,
|
|
145
246
|
__type: "RouteErrorResponse"
|
|
146
247
|
} : a instanceof Error ? n[r] = {
|
|
@@ -154,10 +255,10 @@ function os(e) {
|
|
|
154
255
|
} : n[r] = a;
|
|
155
256
|
return n;
|
|
156
257
|
}
|
|
157
|
-
function
|
|
258
|
+
function Qn() {
|
|
158
259
|
return {
|
|
159
|
-
createHref:
|
|
160
|
-
encodeLocation:
|
|
260
|
+
createHref: Gn,
|
|
261
|
+
encodeLocation: Wn,
|
|
161
262
|
push(e) {
|
|
162
263
|
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
|
|
163
264
|
},
|
|
@@ -175,30 +276,30 @@ function Vn() {
|
|
|
175
276
|
}
|
|
176
277
|
};
|
|
177
278
|
}
|
|
178
|
-
function
|
|
179
|
-
return
|
|
279
|
+
function us(e, t) {
|
|
280
|
+
return fe.createStaticHandler(e, {
|
|
180
281
|
...t,
|
|
181
|
-
mapRouteProperties:
|
|
282
|
+
mapRouteProperties: Ut.UNSAFE_mapRouteProperties
|
|
182
283
|
});
|
|
183
284
|
}
|
|
184
|
-
function
|
|
185
|
-
let r = {}, a =
|
|
186
|
-
let u = r[
|
|
285
|
+
function ds(e, t, n = {}) {
|
|
286
|
+
let r = {}, a = fe.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
|
|
287
|
+
let u = r[l.route.id] || l.route;
|
|
187
288
|
return {
|
|
188
|
-
...
|
|
289
|
+
...l,
|
|
189
290
|
route: u
|
|
190
291
|
};
|
|
191
|
-
}),
|
|
292
|
+
}), i = (l) => `You cannot use router.${l}() on the server because it is a stateless environment`;
|
|
192
293
|
return {
|
|
193
294
|
get basename() {
|
|
194
295
|
return t.basename;
|
|
195
296
|
},
|
|
196
297
|
get future() {
|
|
197
|
-
var
|
|
298
|
+
var l, u;
|
|
198
299
|
return {
|
|
199
300
|
v7_fetcherPersist: !1,
|
|
200
301
|
v7_normalizeFormMethod: !1,
|
|
201
|
-
v7_partialHydration: ((
|
|
302
|
+
v7_partialHydration: ((l = n.future) == null ? void 0 : l.v7_partialHydration) === !0,
|
|
202
303
|
v7_prependBasename: !1,
|
|
203
304
|
v7_relativeSplatPath: ((u = n.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
|
|
204
305
|
v7_skipActionErrorRevalidation: !1
|
|
@@ -206,14 +307,14 @@ function is(e, t, n = {}) {
|
|
|
206
307
|
},
|
|
207
308
|
get state() {
|
|
208
309
|
return {
|
|
209
|
-
historyAction:
|
|
310
|
+
historyAction: fe.Action.Pop,
|
|
210
311
|
location: t.location,
|
|
211
|
-
matches:
|
|
312
|
+
matches: s,
|
|
212
313
|
loaderData: t.loaderData,
|
|
213
314
|
actionData: t.actionData,
|
|
214
315
|
errors: t.errors,
|
|
215
316
|
initialized: !0,
|
|
216
|
-
navigation:
|
|
317
|
+
navigation: fe.IDLE_NAVIGATION,
|
|
217
318
|
restoreScrollPosition: null,
|
|
218
319
|
preventScrollReset: !1,
|
|
219
320
|
revalidation: "idle",
|
|
@@ -227,217 +328,217 @@ function is(e, t, n = {}) {
|
|
|
227
328
|
get window() {
|
|
228
329
|
},
|
|
229
330
|
initialize() {
|
|
230
|
-
throw
|
|
331
|
+
throw i("initialize");
|
|
231
332
|
},
|
|
232
333
|
subscribe() {
|
|
233
|
-
throw
|
|
334
|
+
throw i("subscribe");
|
|
234
335
|
},
|
|
235
336
|
enableScrollRestoration() {
|
|
236
|
-
throw
|
|
337
|
+
throw i("enableScrollRestoration");
|
|
237
338
|
},
|
|
238
339
|
navigate() {
|
|
239
|
-
throw
|
|
340
|
+
throw i("navigate");
|
|
240
341
|
},
|
|
241
342
|
fetch() {
|
|
242
|
-
throw
|
|
343
|
+
throw i("fetch");
|
|
243
344
|
},
|
|
244
345
|
revalidate() {
|
|
245
|
-
throw
|
|
346
|
+
throw i("revalidate");
|
|
246
347
|
},
|
|
247
|
-
createHref:
|
|
248
|
-
encodeLocation:
|
|
348
|
+
createHref: Gn,
|
|
349
|
+
encodeLocation: Wn,
|
|
249
350
|
getFetcher() {
|
|
250
|
-
return
|
|
351
|
+
return fe.IDLE_FETCHER;
|
|
251
352
|
},
|
|
252
353
|
deleteFetcher() {
|
|
253
|
-
throw
|
|
354
|
+
throw i("deleteFetcher");
|
|
254
355
|
},
|
|
255
356
|
dispose() {
|
|
256
|
-
throw
|
|
357
|
+
throw i("dispose");
|
|
257
358
|
},
|
|
258
359
|
getBlocker() {
|
|
259
|
-
return
|
|
360
|
+
return fe.IDLE_BLOCKER;
|
|
260
361
|
},
|
|
261
362
|
deleteBlocker() {
|
|
262
|
-
throw
|
|
363
|
+
throw i("deleteBlocker");
|
|
263
364
|
},
|
|
264
365
|
patchRoutes() {
|
|
265
|
-
throw
|
|
366
|
+
throw i("patchRoutes");
|
|
266
367
|
},
|
|
267
368
|
_internalFetchControllers: /* @__PURE__ */ new Map(),
|
|
268
369
|
_internalActiveDeferreds: /* @__PURE__ */ new Map(),
|
|
269
370
|
_internalSetRoutes() {
|
|
270
|
-
throw
|
|
371
|
+
throw i("_internalSetRoutes");
|
|
271
372
|
}
|
|
272
373
|
};
|
|
273
374
|
}
|
|
274
|
-
function
|
|
275
|
-
return typeof e == "string" ? e :
|
|
375
|
+
function Gn(e) {
|
|
376
|
+
return typeof e == "string" ? e : we.createPath(e);
|
|
276
377
|
}
|
|
277
|
-
function
|
|
278
|
-
let t = typeof e == "string" ? e :
|
|
378
|
+
function Wn(e) {
|
|
379
|
+
let t = typeof e == "string" ? e : we.createPath(e);
|
|
279
380
|
t = t.replace(/ $/, "%20");
|
|
280
|
-
let n =
|
|
381
|
+
let n = fs.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
281
382
|
return {
|
|
282
383
|
pathname: n.pathname,
|
|
283
384
|
search: n.search,
|
|
284
385
|
hash: n.hash
|
|
285
386
|
};
|
|
286
387
|
}
|
|
287
|
-
const
|
|
388
|
+
const fs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, hs = {
|
|
288
389
|
"&": "\\u0026",
|
|
289
390
|
">": "\\u003e",
|
|
290
391
|
"<": "\\u003c",
|
|
291
392
|
"\u2028": "\\u2028",
|
|
292
393
|
"\u2029": "\\u2029"
|
|
293
|
-
},
|
|
294
|
-
function
|
|
295
|
-
return e.replace(
|
|
394
|
+
}, ps = /[&><\u2028\u2029]/g;
|
|
395
|
+
function ms(e) {
|
|
396
|
+
return e.replace(ps, (t) => hs[t]);
|
|
296
397
|
}
|
|
297
|
-
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
const
|
|
398
|
+
tt.StaticRouter = ss;
|
|
399
|
+
var gs = tt.StaticRouterProvider = is;
|
|
400
|
+
tt.createStaticHandler = us;
|
|
401
|
+
tt.createStaticRouter = ds;
|
|
402
|
+
const vs = ({
|
|
302
403
|
router: e,
|
|
303
404
|
hydrate: t = !1
|
|
304
|
-
}) => /* @__PURE__ */
|
|
405
|
+
}) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { children: /* @__PURE__ */ o.jsx(jt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ o.jsx(Bo, { router: e }) }) }) }), ws = ({
|
|
305
406
|
router: e,
|
|
306
407
|
context: t,
|
|
307
408
|
helmetContext: n
|
|
308
|
-
}) => /* @__PURE__ */
|
|
309
|
-
var
|
|
409
|
+
}) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { context: n, children: /* @__PURE__ */ o.jsx(gs, { router: e, context: t }) }) });
|
|
410
|
+
var de, En, bs = (En = class extends Bn {
|
|
310
411
|
constructor(t = {}) {
|
|
311
412
|
super();
|
|
312
|
-
ae(this,
|
|
313
|
-
this.config = t, G(this,
|
|
413
|
+
ae(this, de);
|
|
414
|
+
this.config = t, G(this, de, /* @__PURE__ */ new Map());
|
|
314
415
|
}
|
|
315
416
|
build(t, n, r) {
|
|
316
|
-
const a = n.queryKey,
|
|
317
|
-
let
|
|
318
|
-
return
|
|
417
|
+
const a = n.queryKey, s = n.queryHash ?? zn(a, n);
|
|
418
|
+
let i = this.get(s);
|
|
419
|
+
return i || (i = new Ea({
|
|
319
420
|
cache: this,
|
|
320
421
|
queryKey: a,
|
|
321
|
-
queryHash:
|
|
422
|
+
queryHash: s,
|
|
322
423
|
options: t.defaultQueryOptions(n),
|
|
323
424
|
state: r,
|
|
324
425
|
defaultOptions: t.getQueryDefaults(a)
|
|
325
|
-
}), this.add(
|
|
426
|
+
}), this.add(i)), i;
|
|
326
427
|
}
|
|
327
428
|
add(t) {
|
|
328
|
-
b(this,
|
|
429
|
+
b(this, de).has(t.queryHash) || (b(this, de).set(t.queryHash, t), this.notify({
|
|
329
430
|
type: "added",
|
|
330
431
|
query: t
|
|
331
432
|
}));
|
|
332
433
|
}
|
|
333
434
|
remove(t) {
|
|
334
|
-
const n = b(this,
|
|
335
|
-
n && (t.destroy(), n === t && b(this,
|
|
435
|
+
const n = b(this, de).get(t.queryHash);
|
|
436
|
+
n && (t.destroy(), n === t && b(this, de).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
336
437
|
}
|
|
337
438
|
clear() {
|
|
338
|
-
|
|
439
|
+
ee.batch(() => {
|
|
339
440
|
this.getAll().forEach((t) => {
|
|
340
441
|
this.remove(t);
|
|
341
442
|
});
|
|
342
443
|
});
|
|
343
444
|
}
|
|
344
445
|
get(t) {
|
|
345
|
-
return b(this,
|
|
446
|
+
return b(this, de).get(t);
|
|
346
447
|
}
|
|
347
448
|
getAll() {
|
|
348
|
-
return [...b(this,
|
|
449
|
+
return [...b(this, de).values()];
|
|
349
450
|
}
|
|
350
451
|
find(t) {
|
|
351
452
|
const n = { exact: !0, ...t };
|
|
352
453
|
return this.getAll().find(
|
|
353
|
-
(r) =>
|
|
454
|
+
(r) => fn(n, r)
|
|
354
455
|
);
|
|
355
456
|
}
|
|
356
457
|
findAll(t = {}) {
|
|
357
458
|
const n = this.getAll();
|
|
358
|
-
return Object.keys(t).length > 0 ? n.filter((r) =>
|
|
459
|
+
return Object.keys(t).length > 0 ? n.filter((r) => fn(t, r)) : n;
|
|
359
460
|
}
|
|
360
461
|
notify(t) {
|
|
361
|
-
|
|
462
|
+
ee.batch(() => {
|
|
362
463
|
this.listeners.forEach((n) => {
|
|
363
464
|
n(t);
|
|
364
465
|
});
|
|
365
466
|
});
|
|
366
467
|
}
|
|
367
468
|
onFocus() {
|
|
368
|
-
|
|
469
|
+
ee.batch(() => {
|
|
369
470
|
this.getAll().forEach((t) => {
|
|
370
471
|
t.onFocus();
|
|
371
472
|
});
|
|
372
473
|
});
|
|
373
474
|
}
|
|
374
475
|
onOnline() {
|
|
375
|
-
|
|
476
|
+
ee.batch(() => {
|
|
376
477
|
this.getAll().forEach((t) => {
|
|
377
478
|
t.onOnline();
|
|
378
479
|
});
|
|
379
480
|
});
|
|
380
481
|
}
|
|
381
|
-
},
|
|
482
|
+
}, de = new WeakMap(), En), Z, Ze, Cn, xs = (Cn = class extends Bn {
|
|
382
483
|
constructor(t = {}) {
|
|
383
484
|
super();
|
|
384
|
-
ae(this,
|
|
385
|
-
ae(this,
|
|
386
|
-
this.config = t, G(this,
|
|
485
|
+
ae(this, Z);
|
|
486
|
+
ae(this, Ze);
|
|
487
|
+
this.config = t, G(this, Z, /* @__PURE__ */ new Map()), G(this, Ze, Date.now());
|
|
387
488
|
}
|
|
388
489
|
build(t, n, r) {
|
|
389
|
-
const a = new
|
|
490
|
+
const a = new Qo({
|
|
390
491
|
mutationCache: this,
|
|
391
|
-
mutationId: ++
|
|
492
|
+
mutationId: ++lt(this, Ze)._,
|
|
392
493
|
options: t.defaultMutationOptions(n),
|
|
393
494
|
state: r
|
|
394
495
|
});
|
|
395
496
|
return this.add(a), a;
|
|
396
497
|
}
|
|
397
498
|
add(t) {
|
|
398
|
-
const n =
|
|
399
|
-
r.push(t), b(this,
|
|
499
|
+
const n = ct(t), r = b(this, Z).get(n) ?? [];
|
|
500
|
+
r.push(t), b(this, Z).set(n, r), this.notify({ type: "added", mutation: t });
|
|
400
501
|
}
|
|
401
502
|
remove(t) {
|
|
402
503
|
var r;
|
|
403
|
-
const n =
|
|
404
|
-
if (b(this,
|
|
405
|
-
const a = (r = b(this,
|
|
406
|
-
a && (a.length === 0 ? b(this,
|
|
504
|
+
const n = ct(t);
|
|
505
|
+
if (b(this, Z).has(n)) {
|
|
506
|
+
const a = (r = b(this, Z).get(n)) == null ? void 0 : r.filter((s) => s !== t);
|
|
507
|
+
a && (a.length === 0 ? b(this, Z).delete(n) : b(this, Z).set(n, a));
|
|
407
508
|
}
|
|
408
509
|
this.notify({ type: "removed", mutation: t });
|
|
409
510
|
}
|
|
410
511
|
canRun(t) {
|
|
411
512
|
var r;
|
|
412
|
-
const n = (r = b(this,
|
|
513
|
+
const n = (r = b(this, Z).get(ct(t))) == null ? void 0 : r.find((a) => a.state.status === "pending");
|
|
413
514
|
return !n || n === t;
|
|
414
515
|
}
|
|
415
516
|
runNext(t) {
|
|
416
517
|
var r;
|
|
417
|
-
const n = (r = b(this,
|
|
518
|
+
const n = (r = b(this, Z).get(ct(t))) == null ? void 0 : r.find((a) => a !== t && a.state.isPaused);
|
|
418
519
|
return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
|
|
419
520
|
}
|
|
420
521
|
clear() {
|
|
421
|
-
|
|
522
|
+
ee.batch(() => {
|
|
422
523
|
this.getAll().forEach((t) => {
|
|
423
524
|
this.remove(t);
|
|
424
525
|
});
|
|
425
526
|
});
|
|
426
527
|
}
|
|
427
528
|
getAll() {
|
|
428
|
-
return [...b(this,
|
|
529
|
+
return [...b(this, Z).values()].flat();
|
|
429
530
|
}
|
|
430
531
|
find(t) {
|
|
431
532
|
const n = { exact: !0, ...t };
|
|
432
533
|
return this.getAll().find(
|
|
433
|
-
(r) =>
|
|
534
|
+
(r) => hn(n, r)
|
|
434
535
|
);
|
|
435
536
|
}
|
|
436
537
|
findAll(t = {}) {
|
|
437
|
-
return this.getAll().filter((n) =>
|
|
538
|
+
return this.getAll().filter((n) => hn(t, n));
|
|
438
539
|
}
|
|
439
540
|
notify(t) {
|
|
440
|
-
|
|
541
|
+
ee.batch(() => {
|
|
441
542
|
this.listeners.forEach((n) => {
|
|
442
543
|
n(t);
|
|
443
544
|
});
|
|
@@ -445,74 +546,74 @@ var ue, Rn, hs = (Rn = class extends Hn {
|
|
|
445
546
|
}
|
|
446
547
|
resumePausedMutations() {
|
|
447
548
|
const t = this.getAll().filter((n) => n.state.isPaused);
|
|
448
|
-
return
|
|
549
|
+
return ee.batch(
|
|
449
550
|
() => Promise.all(
|
|
450
|
-
t.map((n) => n.continue().catch(
|
|
551
|
+
t.map((n) => n.continue().catch(ve))
|
|
451
552
|
)
|
|
452
553
|
);
|
|
453
554
|
}
|
|
454
|
-
},
|
|
455
|
-
function
|
|
555
|
+
}, Z = new WeakMap(), Ze = new WeakMap(), Cn);
|
|
556
|
+
function ct(e) {
|
|
456
557
|
var t;
|
|
457
558
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
458
559
|
}
|
|
459
|
-
function
|
|
560
|
+
function ys(e) {
|
|
460
561
|
return {
|
|
461
562
|
onFetch: (t, n) => {
|
|
462
563
|
const r = async () => {
|
|
463
|
-
var
|
|
464
|
-
const a = t.options,
|
|
564
|
+
var y, R, K, H, Q;
|
|
565
|
+
const a = t.options, s = (K = (R = (y = t.fetchOptions) == null ? void 0 : y.meta) == null ? void 0 : R.fetchMore) == null ? void 0 : K.direction, i = ((H = t.state.data) == null ? void 0 : H.pages) || [], l = ((Q = t.state.data) == null ? void 0 : Q.pageParams) || [], u = { pages: [], pageParams: [] };
|
|
465
566
|
let v = !1;
|
|
466
|
-
const
|
|
467
|
-
Object.defineProperty(
|
|
567
|
+
const m = (x) => {
|
|
568
|
+
Object.defineProperty(x, "signal", {
|
|
468
569
|
enumerable: !0,
|
|
469
570
|
get: () => (t.signal.aborted ? v = !0 : t.signal.addEventListener("abort", () => {
|
|
470
571
|
v = !0;
|
|
471
572
|
}), t.signal)
|
|
472
573
|
});
|
|
473
|
-
},
|
|
574
|
+
}, c = Ca(t.options, t.fetchOptions), d = async (x, p, C) => {
|
|
474
575
|
if (v)
|
|
475
576
|
return Promise.reject();
|
|
476
|
-
if (
|
|
477
|
-
return Promise.resolve(
|
|
478
|
-
const
|
|
577
|
+
if (p == null && x.pages.length)
|
|
578
|
+
return Promise.resolve(x);
|
|
579
|
+
const N = {
|
|
479
580
|
queryKey: t.queryKey,
|
|
480
|
-
pageParam:
|
|
481
|
-
direction:
|
|
581
|
+
pageParam: p,
|
|
582
|
+
direction: C ? "backward" : "forward",
|
|
482
583
|
meta: t.options.meta
|
|
483
584
|
};
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
), { maxPages:
|
|
585
|
+
m(N);
|
|
586
|
+
const P = await c(
|
|
587
|
+
N
|
|
588
|
+
), { maxPages: _ } = t.options, w = C ? Ra : Da;
|
|
488
589
|
return {
|
|
489
|
-
pages: w(
|
|
490
|
-
pageParams: w(
|
|
590
|
+
pages: w(x.pages, P, _),
|
|
591
|
+
pageParams: w(x.pageParams, p, _)
|
|
491
592
|
};
|
|
492
593
|
};
|
|
493
594
|
let f;
|
|
494
|
-
if (
|
|
495
|
-
const
|
|
496
|
-
pages:
|
|
497
|
-
pageParams:
|
|
498
|
-
},
|
|
499
|
-
f = await d(
|
|
595
|
+
if (s && i.length) {
|
|
596
|
+
const x = s === "backward", p = x ? Ms : wn, C = {
|
|
597
|
+
pages: i,
|
|
598
|
+
pageParams: l
|
|
599
|
+
}, N = p(a, C);
|
|
600
|
+
f = await d(C, N, x);
|
|
500
601
|
} else {
|
|
501
602
|
f = await d(
|
|
502
603
|
u,
|
|
503
|
-
|
|
604
|
+
l[0] ?? a.initialPageParam
|
|
504
605
|
);
|
|
505
|
-
const
|
|
506
|
-
for (let
|
|
507
|
-
const
|
|
508
|
-
f = await d(f,
|
|
606
|
+
const x = e ?? i.length;
|
|
607
|
+
for (let p = 1; p < x; p++) {
|
|
608
|
+
const C = wn(a, f);
|
|
609
|
+
f = await d(f, C);
|
|
509
610
|
}
|
|
510
611
|
}
|
|
511
612
|
return f;
|
|
512
613
|
};
|
|
513
614
|
t.options.persister ? t.fetchFn = () => {
|
|
514
|
-
var a,
|
|
515
|
-
return (
|
|
615
|
+
var a, s;
|
|
616
|
+
return (s = (a = t.options).persister) == null ? void 0 : s.call(
|
|
516
617
|
a,
|
|
517
618
|
r,
|
|
518
619
|
{
|
|
@@ -526,7 +627,7 @@ function vs(e) {
|
|
|
526
627
|
}
|
|
527
628
|
};
|
|
528
629
|
}
|
|
529
|
-
function
|
|
630
|
+
function wn(e, { pages: t, pageParams: n }) {
|
|
530
631
|
const r = t.length - 1;
|
|
531
632
|
return e.getNextPageParam(
|
|
532
633
|
t[r],
|
|
@@ -535,7 +636,7 @@ function gn(e, { pages: t, pageParams: n }) {
|
|
|
535
636
|
n
|
|
536
637
|
);
|
|
537
638
|
}
|
|
538
|
-
function
|
|
639
|
+
function Ms(e, { pages: t, pageParams: n }) {
|
|
539
640
|
var r;
|
|
540
641
|
return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
|
|
541
642
|
e,
|
|
@@ -545,65 +646,65 @@ function ws(e, { pages: t, pageParams: n }) {
|
|
|
545
646
|
n
|
|
546
647
|
);
|
|
547
648
|
}
|
|
548
|
-
var
|
|
649
|
+
var $, Ee, Ce, $e, Le, Re, Fe, He, Rn, Ss = (Rn = class {
|
|
549
650
|
constructor(e = {}) {
|
|
550
|
-
ae(this,
|
|
551
|
-
ae(this,
|
|
552
|
-
ae(this,
|
|
553
|
-
ae(this, ke);
|
|
651
|
+
ae(this, $);
|
|
652
|
+
ae(this, Ee);
|
|
653
|
+
ae(this, Ce);
|
|
554
654
|
ae(this, $e);
|
|
555
|
-
ae(this, Me);
|
|
556
655
|
ae(this, Le);
|
|
557
|
-
ae(this,
|
|
558
|
-
|
|
656
|
+
ae(this, Re);
|
|
657
|
+
ae(this, Fe);
|
|
658
|
+
ae(this, He);
|
|
659
|
+
G(this, $, e.queryCache || new bs()), G(this, Ee, e.mutationCache || new xs()), G(this, Ce, e.defaultOptions || {}), G(this, $e, /* @__PURE__ */ new Map()), G(this, Le, /* @__PURE__ */ new Map()), G(this, Re, 0);
|
|
559
660
|
}
|
|
560
661
|
mount() {
|
|
561
|
-
|
|
562
|
-
e && (await this.resumePausedMutations(), b(this,
|
|
563
|
-
})), G(this,
|
|
564
|
-
e && (await this.resumePausedMutations(), b(this,
|
|
662
|
+
lt(this, Re)._++, b(this, Re) === 1 && (G(this, Fe, ja.subscribe(async (e) => {
|
|
663
|
+
e && (await this.resumePausedMutations(), b(this, $).onFocus());
|
|
664
|
+
})), G(this, He, pn.subscribe(async (e) => {
|
|
665
|
+
e && (await this.resumePausedMutations(), b(this, $).onOnline());
|
|
565
666
|
})));
|
|
566
667
|
}
|
|
567
668
|
unmount() {
|
|
568
669
|
var e, t;
|
|
569
|
-
|
|
670
|
+
lt(this, Re)._--, b(this, Re) === 0 && ((e = b(this, Fe)) == null || e.call(this), G(this, Fe, void 0), (t = b(this, He)) == null || t.call(this), G(this, He, void 0));
|
|
570
671
|
}
|
|
571
672
|
isFetching(e) {
|
|
572
|
-
return b(this,
|
|
673
|
+
return b(this, $).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
573
674
|
}
|
|
574
675
|
isMutating(e) {
|
|
575
|
-
return b(this,
|
|
676
|
+
return b(this, Ee).findAll({ ...e, status: "pending" }).length;
|
|
576
677
|
}
|
|
577
678
|
getQueryData(e) {
|
|
578
679
|
var n;
|
|
579
680
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
580
|
-
return (n = b(this,
|
|
681
|
+
return (n = b(this, $).get(t.queryHash)) == null ? void 0 : n.state.data;
|
|
581
682
|
}
|
|
582
683
|
ensureQueryData(e) {
|
|
583
684
|
const t = this.getQueryData(e.queryKey);
|
|
584
685
|
if (t === void 0)
|
|
585
686
|
return this.fetchQuery(e);
|
|
586
687
|
{
|
|
587
|
-
const n = this.defaultQueryOptions(e), r = b(this,
|
|
688
|
+
const n = this.defaultQueryOptions(e), r = b(this, $).build(this, n);
|
|
588
689
|
return e.revalidateIfStale && r.isStaleByTime(mn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
|
|
589
690
|
}
|
|
590
691
|
}
|
|
591
692
|
getQueriesData(e) {
|
|
592
|
-
return b(this,
|
|
693
|
+
return b(this, $).findAll(e).map(({ queryKey: t, state: n }) => {
|
|
593
694
|
const r = n.data;
|
|
594
695
|
return [t, r];
|
|
595
696
|
});
|
|
596
697
|
}
|
|
597
698
|
setQueryData(e, t, n) {
|
|
598
|
-
const r = this.defaultQueryOptions({ queryKey: e }), a = b(this,
|
|
699
|
+
const r = this.defaultQueryOptions({ queryKey: e }), a = b(this, $).get(
|
|
599
700
|
r.queryHash
|
|
600
|
-
),
|
|
601
|
-
if (
|
|
602
|
-
return b(this,
|
|
701
|
+
), s = a == null ? void 0 : a.state.data, i = Na(t, s);
|
|
702
|
+
if (i !== void 0)
|
|
703
|
+
return b(this, $).build(this, r).setData(i, { ...n, manual: !0 });
|
|
603
704
|
}
|
|
604
705
|
setQueriesData(e, t, n) {
|
|
605
|
-
return
|
|
606
|
-
() => b(this,
|
|
706
|
+
return ee.batch(
|
|
707
|
+
() => b(this, $).findAll(e).map(({ queryKey: r }) => [
|
|
607
708
|
r,
|
|
608
709
|
this.setQueryData(r, t, n)
|
|
609
710
|
])
|
|
@@ -612,34 +713,34 @@ var L, Re, xe, ke, $e, Me, Le, je, Mn, bs = (Mn = class {
|
|
|
612
713
|
getQueryState(e) {
|
|
613
714
|
var n;
|
|
614
715
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
615
|
-
return (n = b(this,
|
|
716
|
+
return (n = b(this, $).get(t.queryHash)) == null ? void 0 : n.state;
|
|
616
717
|
}
|
|
617
718
|
removeQueries(e) {
|
|
618
|
-
const t = b(this,
|
|
619
|
-
|
|
719
|
+
const t = b(this, $);
|
|
720
|
+
ee.batch(() => {
|
|
620
721
|
t.findAll(e).forEach((n) => {
|
|
621
722
|
t.remove(n);
|
|
622
723
|
});
|
|
623
724
|
});
|
|
624
725
|
}
|
|
625
726
|
resetQueries(e, t) {
|
|
626
|
-
const n = b(this,
|
|
727
|
+
const n = b(this, $), r = {
|
|
627
728
|
type: "active",
|
|
628
729
|
...e
|
|
629
730
|
};
|
|
630
|
-
return
|
|
731
|
+
return ee.batch(() => (n.findAll(e).forEach((a) => {
|
|
631
732
|
a.reset();
|
|
632
733
|
}), this.refetchQueries(r, t)));
|
|
633
734
|
}
|
|
634
735
|
cancelQueries(e = {}, t = {}) {
|
|
635
|
-
const n = { revert: !0, ...t }, r =
|
|
636
|
-
() => b(this,
|
|
736
|
+
const n = { revert: !0, ...t }, r = ee.batch(
|
|
737
|
+
() => b(this, $).findAll(e).map((a) => a.cancel(n))
|
|
637
738
|
);
|
|
638
|
-
return Promise.all(r).then(
|
|
739
|
+
return Promise.all(r).then(ve).catch(ve);
|
|
639
740
|
}
|
|
640
741
|
invalidateQueries(e = {}, t = {}) {
|
|
641
|
-
return
|
|
642
|
-
if (b(this,
|
|
742
|
+
return ee.batch(() => {
|
|
743
|
+
if (b(this, $).findAll(e).forEach((r) => {
|
|
643
744
|
r.invalidate();
|
|
644
745
|
}), e.refetchType === "none")
|
|
645
746
|
return Promise.resolve();
|
|
@@ -654,105 +755,105 @@ var L, Re, xe, ke, $e, Me, Le, je, Mn, bs = (Mn = class {
|
|
|
654
755
|
const n = {
|
|
655
756
|
...t,
|
|
656
757
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
657
|
-
}, r =
|
|
658
|
-
() => b(this,
|
|
659
|
-
let
|
|
660
|
-
return n.throwOnError || (
|
|
758
|
+
}, r = ee.batch(
|
|
759
|
+
() => b(this, $).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
|
|
760
|
+
let s = a.fetch(void 0, n);
|
|
761
|
+
return n.throwOnError || (s = s.catch(ve)), a.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
661
762
|
})
|
|
662
763
|
);
|
|
663
|
-
return Promise.all(r).then(
|
|
764
|
+
return Promise.all(r).then(ve);
|
|
664
765
|
}
|
|
665
766
|
fetchQuery(e) {
|
|
666
767
|
const t = this.defaultQueryOptions(e);
|
|
667
768
|
t.retry === void 0 && (t.retry = !1);
|
|
668
|
-
const n = b(this,
|
|
769
|
+
const n = b(this, $).build(this, t);
|
|
669
770
|
return n.isStaleByTime(
|
|
670
771
|
mn(t.staleTime, n)
|
|
671
772
|
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
672
773
|
}
|
|
673
774
|
prefetchQuery(e) {
|
|
674
|
-
return this.fetchQuery(e).then(
|
|
775
|
+
return this.fetchQuery(e).then(ve).catch(ve);
|
|
675
776
|
}
|
|
676
777
|
fetchInfiniteQuery(e) {
|
|
677
|
-
return e.behavior =
|
|
778
|
+
return e.behavior = ys(e.pages), this.fetchQuery(e);
|
|
678
779
|
}
|
|
679
780
|
prefetchInfiniteQuery(e) {
|
|
680
|
-
return this.fetchInfiniteQuery(e).then(
|
|
781
|
+
return this.fetchInfiniteQuery(e).then(ve).catch(ve);
|
|
681
782
|
}
|
|
682
783
|
resumePausedMutations() {
|
|
683
|
-
return
|
|
784
|
+
return pn.isOnline() ? b(this, Ee).resumePausedMutations() : Promise.resolve();
|
|
684
785
|
}
|
|
685
786
|
getQueryCache() {
|
|
686
|
-
return b(this,
|
|
787
|
+
return b(this, $);
|
|
687
788
|
}
|
|
688
789
|
getMutationCache() {
|
|
689
|
-
return b(this,
|
|
790
|
+
return b(this, Ee);
|
|
690
791
|
}
|
|
691
792
|
getDefaultOptions() {
|
|
692
|
-
return b(this,
|
|
793
|
+
return b(this, Ce);
|
|
693
794
|
}
|
|
694
795
|
setDefaultOptions(e) {
|
|
695
|
-
G(this,
|
|
796
|
+
G(this, Ce, e);
|
|
696
797
|
}
|
|
697
798
|
setQueryDefaults(e, t) {
|
|
698
|
-
b(this,
|
|
799
|
+
b(this, $e).set(gn(e), {
|
|
699
800
|
queryKey: e,
|
|
700
801
|
defaultOptions: t
|
|
701
802
|
});
|
|
702
803
|
}
|
|
703
804
|
getQueryDefaults(e) {
|
|
704
|
-
const t = [...b(this,
|
|
805
|
+
const t = [...b(this, $e).values()];
|
|
705
806
|
let n = {};
|
|
706
807
|
return t.forEach((r) => {
|
|
707
|
-
|
|
808
|
+
vn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
|
|
708
809
|
}), n;
|
|
709
810
|
}
|
|
710
811
|
setMutationDefaults(e, t) {
|
|
711
|
-
b(this,
|
|
812
|
+
b(this, Le).set(gn(e), {
|
|
712
813
|
mutationKey: e,
|
|
713
814
|
defaultOptions: t
|
|
714
815
|
});
|
|
715
816
|
}
|
|
716
817
|
getMutationDefaults(e) {
|
|
717
|
-
const t = [...b(this,
|
|
818
|
+
const t = [...b(this, Le).values()];
|
|
718
819
|
let n = {};
|
|
719
820
|
return t.forEach((r) => {
|
|
720
|
-
|
|
821
|
+
vn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
|
|
721
822
|
}), n;
|
|
722
823
|
}
|
|
723
824
|
defaultQueryOptions(e) {
|
|
724
825
|
if (e._defaulted)
|
|
725
826
|
return e;
|
|
726
827
|
const t = {
|
|
727
|
-
...b(this,
|
|
828
|
+
...b(this, Ce).queries,
|
|
728
829
|
...this.getQueryDefaults(e.queryKey),
|
|
729
830
|
...e,
|
|
730
831
|
_defaulted: !0
|
|
731
832
|
};
|
|
732
|
-
return t.queryHash || (t.queryHash =
|
|
833
|
+
return t.queryHash || (t.queryHash = zn(
|
|
733
834
|
t.queryKey,
|
|
734
835
|
t
|
|
735
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn ===
|
|
836
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Pa && (t.enabled = !1), t;
|
|
736
837
|
}
|
|
737
838
|
defaultMutationOptions(e) {
|
|
738
839
|
return e != null && e._defaulted ? e : {
|
|
739
|
-
...b(this,
|
|
840
|
+
...b(this, Ce).mutations,
|
|
740
841
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
741
842
|
...e,
|
|
742
843
|
_defaulted: !0
|
|
743
844
|
};
|
|
744
845
|
}
|
|
745
846
|
clear() {
|
|
746
|
-
b(this,
|
|
847
|
+
b(this, $).clear(), b(this, Ee).clear();
|
|
747
848
|
}
|
|
748
|
-
},
|
|
749
|
-
const
|
|
849
|
+
}, $ = new WeakMap(), Ee = new WeakMap(), Ce = new WeakMap(), $e = new WeakMap(), Le = new WeakMap(), Re = new WeakMap(), Fe = new WeakMap(), He = new WeakMap(), Rn);
|
|
850
|
+
const Es = Ln(null), St = {
|
|
750
851
|
didCatch: !1,
|
|
751
852
|
error: null
|
|
752
853
|
};
|
|
753
|
-
class
|
|
854
|
+
class Cs extends pa {
|
|
754
855
|
constructor(t) {
|
|
755
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
856
|
+
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = St;
|
|
756
857
|
}
|
|
757
858
|
static getDerivedStateFromError(t) {
|
|
758
859
|
return {
|
|
@@ -765,12 +866,12 @@ class Es extends co {
|
|
|
765
866
|
error: t
|
|
766
867
|
} = this.state;
|
|
767
868
|
if (t !== null) {
|
|
768
|
-
for (var n, r, a = arguments.length,
|
|
769
|
-
|
|
869
|
+
for (var n, r, a = arguments.length, s = new Array(a), i = 0; i < a; i++)
|
|
870
|
+
s[i] = arguments[i];
|
|
770
871
|
(n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
|
|
771
|
-
args:
|
|
872
|
+
args: s,
|
|
772
873
|
reason: "imperative-api"
|
|
773
|
-
}), this.setState(
|
|
874
|
+
}), this.setState(St);
|
|
774
875
|
}
|
|
775
876
|
}
|
|
776
877
|
componentDidCatch(t, n) {
|
|
@@ -784,12 +885,12 @@ class Es extends co {
|
|
|
784
885
|
resetKeys: a
|
|
785
886
|
} = this.props;
|
|
786
887
|
if (r && n.error !== null && Rs(t.resetKeys, a)) {
|
|
787
|
-
var
|
|
788
|
-
(
|
|
888
|
+
var s, i;
|
|
889
|
+
(s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
|
|
789
890
|
next: a,
|
|
790
891
|
prev: t.resetKeys,
|
|
791
892
|
reason: "keys"
|
|
792
|
-
}), this.setState(
|
|
893
|
+
}), this.setState(St);
|
|
793
894
|
}
|
|
794
895
|
}
|
|
795
896
|
render() {
|
|
@@ -799,159 +900,171 @@ class Es extends co {
|
|
|
799
900
|
FallbackComponent: r,
|
|
800
901
|
fallback: a
|
|
801
902
|
} = this.props, {
|
|
802
|
-
didCatch:
|
|
803
|
-
error:
|
|
903
|
+
didCatch: s,
|
|
904
|
+
error: i
|
|
804
905
|
} = this.state;
|
|
805
|
-
let
|
|
806
|
-
if (
|
|
906
|
+
let l = t;
|
|
907
|
+
if (s) {
|
|
807
908
|
const u = {
|
|
808
|
-
error:
|
|
909
|
+
error: i,
|
|
809
910
|
resetErrorBoundary: this.resetErrorBoundary
|
|
810
911
|
};
|
|
811
912
|
if (typeof n == "function")
|
|
812
|
-
|
|
913
|
+
l = n(u);
|
|
813
914
|
else if (r)
|
|
814
|
-
|
|
815
|
-
else if (a === null ||
|
|
816
|
-
|
|
915
|
+
l = dn(r, u);
|
|
916
|
+
else if (a === null || ma(a))
|
|
917
|
+
l = a;
|
|
817
918
|
else
|
|
818
|
-
throw
|
|
919
|
+
throw i;
|
|
819
920
|
}
|
|
820
|
-
return
|
|
921
|
+
return dn(Es.Provider, {
|
|
821
922
|
value: {
|
|
822
|
-
didCatch:
|
|
823
|
-
error:
|
|
923
|
+
didCatch: s,
|
|
924
|
+
error: i,
|
|
824
925
|
resetErrorBoundary: this.resetErrorBoundary
|
|
825
926
|
}
|
|
826
|
-
},
|
|
927
|
+
}, l);
|
|
827
928
|
}
|
|
828
929
|
}
|
|
829
930
|
function Rs() {
|
|
830
931
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
831
932
|
return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
|
|
832
933
|
}
|
|
833
|
-
const
|
|
834
|
-
class
|
|
934
|
+
const Ds = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", js = (e) => "getRoutes" in e && typeof e.getRoutes == "function", Ns = (e) => "renderSearch" in e && typeof e.renderSearch == "function", Ps = (e) => "initialize" in e && typeof e.initialize == "function", Ts = (e) => "getHead" in e && typeof e.getHead == "function", _s = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Os = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Yn = new Ss();
|
|
935
|
+
class Is {
|
|
835
936
|
constructor(t) {
|
|
836
|
-
this
|
|
937
|
+
J(this, "plugins");
|
|
938
|
+
J(this, "sidebars");
|
|
939
|
+
J(this, "topNavigation");
|
|
940
|
+
J(this, "meta");
|
|
941
|
+
J(this, "page");
|
|
942
|
+
J(this, "authentication");
|
|
943
|
+
J(this, "navigationPlugins");
|
|
944
|
+
J(this, "initialize", async () => {
|
|
837
945
|
await Promise.all(
|
|
838
|
-
this.plugins.filter(
|
|
839
|
-
var
|
|
840
|
-
return (
|
|
946
|
+
this.plugins.filter(Ps).map((t) => {
|
|
947
|
+
var n;
|
|
948
|
+
return (n = t.initialize) == null ? void 0 : n.call(t, this);
|
|
841
949
|
})
|
|
842
950
|
);
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
951
|
+
});
|
|
952
|
+
J(this, "invalidateCache", async (t) => {
|
|
953
|
+
await Yn.invalidateQueries({ queryKey: t });
|
|
954
|
+
});
|
|
955
|
+
J(this, "getApiIdentities", async () => (await Promise.all(
|
|
956
|
+
this.plugins.filter(Os).map((n) => n.getIdentities(this))
|
|
957
|
+
)).flat());
|
|
958
|
+
J(this, "getPluginSidebar", async (t) => (await Promise.all(
|
|
848
959
|
this.navigationPlugins.map(
|
|
849
|
-
(
|
|
850
|
-
var
|
|
851
|
-
return (
|
|
960
|
+
(r) => {
|
|
961
|
+
var a;
|
|
962
|
+
return (a = r.getSidebar) == null ? void 0 : a.call(r, Ht(t));
|
|
852
963
|
}
|
|
853
964
|
)
|
|
854
|
-
)).flatMap((
|
|
965
|
+
)).flatMap((r) => r ?? []));
|
|
966
|
+
J(this, "signRequest", async (t) => {
|
|
855
967
|
if (!this.authentication)
|
|
856
968
|
throw new Error("No authentication provider configured");
|
|
857
|
-
const
|
|
858
|
-
return
|
|
859
|
-
}
|
|
969
|
+
const n = await this.authentication.getAccessToken();
|
|
970
|
+
return t.headers.set("Authorization", `Bearer ${n}`), t;
|
|
971
|
+
});
|
|
972
|
+
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(js), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
|
|
860
973
|
}
|
|
861
974
|
}
|
|
862
|
-
function
|
|
863
|
-
return /* @__PURE__ */
|
|
975
|
+
function As({ error: e, resetErrorBoundary: t }) {
|
|
976
|
+
return /* @__PURE__ */ o.jsx(Nn, { error: e });
|
|
864
977
|
}
|
|
865
|
-
const
|
|
866
|
-
(!
|
|
867
|
-
var
|
|
868
|
-
ltr: [...
|
|
869
|
-
rtl: [...
|
|
870
|
-
},
|
|
978
|
+
const ut = globalThis;
|
|
979
|
+
(!ut.requestIdleCallback || !ut.cancelIdleCallback) && (ut.requestIdleCallback = (e) => setTimeout(e, 1), ut.cancelIdleCallback = clearTimeout);
|
|
980
|
+
var Nt = ["Enter", " "], ks = ["ArrowDown", "PageUp", "Home"], Xn = ["ArrowUp", "PageDown", "End"], $s = [...ks, ...Xn], Ls = {
|
|
981
|
+
ltr: [...Nt, "ArrowRight"],
|
|
982
|
+
rtl: [...Nt, "ArrowLeft"]
|
|
983
|
+
}, Fs = {
|
|
871
984
|
ltr: ["ArrowLeft"],
|
|
872
985
|
rtl: ["ArrowRight"]
|
|
873
|
-
},
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
]),
|
|
878
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange:
|
|
879
|
-
return
|
|
986
|
+
}, nt = "Menu", [Xe, Hs, Us] = Go(nt), [Oe, Jn] = Pn(nt, [
|
|
987
|
+
Us,
|
|
988
|
+
Tn,
|
|
989
|
+
qn
|
|
990
|
+
]), rt = Tn(), Zn = qn(), [er, De] = Oe(nt), [Bs, ot] = Oe(nt), tr = (e) => {
|
|
991
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = e, l = rt(t), [u, v] = h.useState(null), m = h.useRef(!1), c = kt(s), d = aa(a);
|
|
992
|
+
return h.useEffect(() => {
|
|
880
993
|
const f = () => {
|
|
881
|
-
|
|
882
|
-
},
|
|
994
|
+
m.current = !0, document.addEventListener("pointerdown", y, { capture: !0, once: !0 }), document.addEventListener("pointermove", y, { capture: !0, once: !0 });
|
|
995
|
+
}, y = () => m.current = !1;
|
|
883
996
|
return document.addEventListener("keydown", f, { capture: !0 }), () => {
|
|
884
|
-
document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown",
|
|
997
|
+
document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown", y, { capture: !0 }), document.removeEventListener("pointermove", y, { capture: !0 });
|
|
885
998
|
};
|
|
886
|
-
}, []), /* @__PURE__ */
|
|
887
|
-
|
|
999
|
+
}, []), /* @__PURE__ */ o.jsx(On, { ...l, children: /* @__PURE__ */ o.jsx(
|
|
1000
|
+
er,
|
|
888
1001
|
{
|
|
889
1002
|
scope: t,
|
|
890
1003
|
open: n,
|
|
891
|
-
onOpenChange:
|
|
1004
|
+
onOpenChange: c,
|
|
892
1005
|
content: u,
|
|
893
1006
|
onContentChange: v,
|
|
894
|
-
children: /* @__PURE__ */
|
|
895
|
-
|
|
1007
|
+
children: /* @__PURE__ */ o.jsx(
|
|
1008
|
+
Bs,
|
|
896
1009
|
{
|
|
897
1010
|
scope: t,
|
|
898
|
-
onClose:
|
|
899
|
-
isUsingKeyboardRef:
|
|
1011
|
+
onClose: h.useCallback(() => c(!1), [c]),
|
|
1012
|
+
isUsingKeyboardRef: m,
|
|
900
1013
|
dir: d,
|
|
901
|
-
modal:
|
|
1014
|
+
modal: i,
|
|
902
1015
|
children: r
|
|
903
1016
|
}
|
|
904
1017
|
)
|
|
905
1018
|
}
|
|
906
1019
|
) });
|
|
907
1020
|
};
|
|
908
|
-
|
|
909
|
-
var
|
|
1021
|
+
tr.displayName = nt;
|
|
1022
|
+
var zs = "MenuAnchor", Bt = h.forwardRef(
|
|
910
1023
|
(e, t) => {
|
|
911
|
-
const { __scopeMenu: n, ...r } = e, a =
|
|
912
|
-
return /* @__PURE__ */
|
|
1024
|
+
const { __scopeMenu: n, ...r } = e, a = rt(n);
|
|
1025
|
+
return /* @__PURE__ */ o.jsx(Wo, { ...a, ...r, ref: t });
|
|
913
1026
|
}
|
|
914
1027
|
);
|
|
915
|
-
|
|
916
|
-
var
|
|
1028
|
+
Bt.displayName = zs;
|
|
1029
|
+
var zt = "MenuPortal", [Ks, nr] = Oe(zt, {
|
|
917
1030
|
forceMount: void 0
|
|
918
|
-
}),
|
|
919
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: a } = e,
|
|
920
|
-
return /* @__PURE__ */
|
|
1031
|
+
}), rr = (e) => {
|
|
1032
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, s = De(zt, t);
|
|
1033
|
+
return /* @__PURE__ */ o.jsx(Ks, { scope: t, forceMount: n, children: /* @__PURE__ */ o.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ o.jsx(sa, { asChild: !0, container: a, children: r }) }) });
|
|
921
1034
|
};
|
|
922
|
-
|
|
923
|
-
var
|
|
1035
|
+
rr.displayName = zt;
|
|
1036
|
+
var se = "MenuContent", [qs, Kt] = Oe(se), or = h.forwardRef(
|
|
924
1037
|
(e, t) => {
|
|
925
|
-
const n =
|
|
926
|
-
return /* @__PURE__ */
|
|
1038
|
+
const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = De(se, e.__scopeMenu), i = ot(se, e.__scopeMenu);
|
|
1039
|
+
return /* @__PURE__ */ o.jsx(Xe.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Xe.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ o.jsx(Vs, { ...a, ref: t }) : /* @__PURE__ */ o.jsx(Qs, { ...a, ref: t }) }) }) });
|
|
927
1040
|
}
|
|
928
|
-
),
|
|
1041
|
+
), Vs = h.forwardRef(
|
|
929
1042
|
(e, t) => {
|
|
930
|
-
const n =
|
|
931
|
-
return
|
|
932
|
-
const
|
|
933
|
-
if (
|
|
934
|
-
}, []), /* @__PURE__ */
|
|
935
|
-
|
|
1043
|
+
const n = De(se, e.__scopeMenu), r = h.useRef(null), a = et(t, r);
|
|
1044
|
+
return h.useEffect(() => {
|
|
1045
|
+
const s = r.current;
|
|
1046
|
+
if (s) return Yo(s);
|
|
1047
|
+
}, []), /* @__PURE__ */ o.jsx(
|
|
1048
|
+
qt,
|
|
936
1049
|
{
|
|
937
1050
|
...e,
|
|
938
1051
|
ref: a,
|
|
939
1052
|
trapFocus: n.open,
|
|
940
1053
|
disableOutsidePointerEvents: n.open,
|
|
941
1054
|
disableOutsideScroll: !0,
|
|
942
|
-
onFocusOutside:
|
|
1055
|
+
onFocusOutside: A(
|
|
943
1056
|
e.onFocusOutside,
|
|
944
|
-
(
|
|
1057
|
+
(s) => s.preventDefault(),
|
|
945
1058
|
{ checkForDefaultPrevented: !1 }
|
|
946
1059
|
),
|
|
947
1060
|
onDismiss: () => n.onOpenChange(!1)
|
|
948
1061
|
}
|
|
949
1062
|
);
|
|
950
1063
|
}
|
|
951
|
-
),
|
|
952
|
-
const n =
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
-
|
|
1064
|
+
), Qs = h.forwardRef((e, t) => {
|
|
1065
|
+
const n = De(se, e.__scopeMenu);
|
|
1066
|
+
return /* @__PURE__ */ o.jsx(
|
|
1067
|
+
qt,
|
|
955
1068
|
{
|
|
956
1069
|
...e,
|
|
957
1070
|
ref: t,
|
|
@@ -961,128 +1074,128 @@ var oe = "MenuContent", [Us, Bt] = _e(oe), nr = c.forwardRef(
|
|
|
961
1074
|
onDismiss: () => n.onOpenChange(!1)
|
|
962
1075
|
}
|
|
963
1076
|
);
|
|
964
|
-
}),
|
|
1077
|
+
}), qt = h.forwardRef(
|
|
965
1078
|
(e, t) => {
|
|
966
1079
|
const {
|
|
967
1080
|
__scopeMenu: n,
|
|
968
1081
|
loop: r = !1,
|
|
969
1082
|
trapFocus: a,
|
|
970
|
-
onOpenAutoFocus:
|
|
971
|
-
onCloseAutoFocus:
|
|
972
|
-
disableOutsidePointerEvents:
|
|
1083
|
+
onOpenAutoFocus: s,
|
|
1084
|
+
onCloseAutoFocus: i,
|
|
1085
|
+
disableOutsidePointerEvents: l,
|
|
973
1086
|
onEntryFocus: u,
|
|
974
1087
|
onEscapeKeyDown: v,
|
|
975
|
-
onPointerDownOutside:
|
|
976
|
-
onFocusOutside:
|
|
1088
|
+
onPointerDownOutside: m,
|
|
1089
|
+
onFocusOutside: c,
|
|
977
1090
|
onInteractOutside: d,
|
|
978
1091
|
onDismiss: f,
|
|
979
|
-
disableOutsideScroll:
|
|
980
|
-
...
|
|
981
|
-
} = e, K =
|
|
982
|
-
var
|
|
983
|
-
const U =
|
|
984
|
-
(function
|
|
985
|
-
|
|
986
|
-
})(U),
|
|
1092
|
+
disableOutsideScroll: y,
|
|
1093
|
+
...R
|
|
1094
|
+
} = e, K = De(se, n), H = ot(se, n), Q = rt(n), x = Zn(n), p = Hs(n), [C, N] = h.useState(null), P = h.useRef(null), _ = et(t, P, K.onContentChange), w = h.useRef(0), L = h.useRef(""), te = h.useRef(0), V = h.useRef(null), q = h.useRef("right"), X = h.useRef(0), Ie = y ? na : h.Fragment, he = y ? { as: ra, allowPinchZoom: !0 } : void 0, ze = (E) => {
|
|
1095
|
+
var le, ge;
|
|
1096
|
+
const U = L.current + E, Y = p().filter((re) => !re.disabled), ne = document.activeElement, je = (le = Y.find((re) => re.ref.current === ne)) == null ? void 0 : le.textValue, pe = Y.map((re) => re.textValue), Me = ai(pe, U, je), me = (ge = Y.find((re) => re.textValue === Me)) == null ? void 0 : ge.ref.current;
|
|
1097
|
+
(function re(M) {
|
|
1098
|
+
L.current = M, window.clearTimeout(w.current), M !== "" && (w.current = window.setTimeout(() => re(""), 1e3));
|
|
1099
|
+
})(U), me && setTimeout(() => me.focus());
|
|
987
1100
|
};
|
|
988
|
-
|
|
989
|
-
const
|
|
990
|
-
var Y,
|
|
991
|
-
return
|
|
1101
|
+
h.useEffect(() => () => window.clearTimeout(w.current), []), Xo();
|
|
1102
|
+
const ye = h.useCallback((E) => {
|
|
1103
|
+
var Y, ne;
|
|
1104
|
+
return q.current === ((Y = V.current) == null ? void 0 : Y.side) && ii(E, (ne = V.current) == null ? void 0 : ne.area);
|
|
992
1105
|
}, []);
|
|
993
|
-
return /* @__PURE__ */
|
|
994
|
-
|
|
1106
|
+
return /* @__PURE__ */ o.jsx(
|
|
1107
|
+
qs,
|
|
995
1108
|
{
|
|
996
1109
|
scope: n,
|
|
997
|
-
searchRef:
|
|
998
|
-
onItemEnter:
|
|
999
|
-
(
|
|
1000
|
-
|
|
1110
|
+
searchRef: L,
|
|
1111
|
+
onItemEnter: h.useCallback(
|
|
1112
|
+
(E) => {
|
|
1113
|
+
ye(E) && E.preventDefault();
|
|
1001
1114
|
},
|
|
1002
|
-
[
|
|
1115
|
+
[ye]
|
|
1003
1116
|
),
|
|
1004
|
-
onItemLeave:
|
|
1005
|
-
(
|
|
1117
|
+
onItemLeave: h.useCallback(
|
|
1118
|
+
(E) => {
|
|
1006
1119
|
var U;
|
|
1007
|
-
|
|
1120
|
+
ye(E) || ((U = P.current) == null || U.focus(), N(null));
|
|
1008
1121
|
},
|
|
1009
|
-
[
|
|
1122
|
+
[ye]
|
|
1010
1123
|
),
|
|
1011
|
-
onTriggerLeave:
|
|
1012
|
-
(
|
|
1013
|
-
|
|
1124
|
+
onTriggerLeave: h.useCallback(
|
|
1125
|
+
(E) => {
|
|
1126
|
+
ye(E) && E.preventDefault();
|
|
1014
1127
|
},
|
|
1015
|
-
[
|
|
1128
|
+
[ye]
|
|
1016
1129
|
),
|
|
1017
|
-
pointerGraceTimerRef:
|
|
1018
|
-
onPointerGraceIntentChange:
|
|
1019
|
-
|
|
1130
|
+
pointerGraceTimerRef: te,
|
|
1131
|
+
onPointerGraceIntentChange: h.useCallback((E) => {
|
|
1132
|
+
V.current = E;
|
|
1020
1133
|
}, []),
|
|
1021
|
-
children: /* @__PURE__ */
|
|
1022
|
-
|
|
1134
|
+
children: /* @__PURE__ */ o.jsx(Ie, { ...he, children: /* @__PURE__ */ o.jsx(
|
|
1135
|
+
Jo,
|
|
1023
1136
|
{
|
|
1024
1137
|
asChild: !0,
|
|
1025
1138
|
trapped: a,
|
|
1026
|
-
onMountAutoFocus:
|
|
1139
|
+
onMountAutoFocus: A(s, (E) => {
|
|
1027
1140
|
var U;
|
|
1028
|
-
|
|
1141
|
+
E.preventDefault(), (U = P.current) == null || U.focus({ preventScroll: !0 });
|
|
1029
1142
|
}),
|
|
1030
|
-
onUnmountAutoFocus:
|
|
1031
|
-
children: /* @__PURE__ */
|
|
1032
|
-
|
|
1143
|
+
onUnmountAutoFocus: i,
|
|
1144
|
+
children: /* @__PURE__ */ o.jsx(
|
|
1145
|
+
Zo,
|
|
1033
1146
|
{
|
|
1034
1147
|
asChild: !0,
|
|
1035
|
-
disableOutsidePointerEvents:
|
|
1148
|
+
disableOutsidePointerEvents: l,
|
|
1036
1149
|
onEscapeKeyDown: v,
|
|
1037
|
-
onPointerDownOutside:
|
|
1038
|
-
onFocusOutside:
|
|
1150
|
+
onPointerDownOutside: m,
|
|
1151
|
+
onFocusOutside: c,
|
|
1039
1152
|
onInteractOutside: d,
|
|
1040
1153
|
onDismiss: f,
|
|
1041
|
-
children: /* @__PURE__ */
|
|
1042
|
-
|
|
1154
|
+
children: /* @__PURE__ */ o.jsx(
|
|
1155
|
+
Aa,
|
|
1043
1156
|
{
|
|
1044
1157
|
asChild: !0,
|
|
1045
|
-
...
|
|
1158
|
+
...x,
|
|
1046
1159
|
dir: H.dir,
|
|
1047
1160
|
orientation: "vertical",
|
|
1048
1161
|
loop: r,
|
|
1049
|
-
currentTabStopId:
|
|
1050
|
-
onCurrentTabStopIdChange:
|
|
1051
|
-
onEntryFocus:
|
|
1052
|
-
H.isUsingKeyboardRef.current ||
|
|
1162
|
+
currentTabStopId: C,
|
|
1163
|
+
onCurrentTabStopIdChange: N,
|
|
1164
|
+
onEntryFocus: A(u, (E) => {
|
|
1165
|
+
H.isUsingKeyboardRef.current || E.preventDefault();
|
|
1053
1166
|
}),
|
|
1054
1167
|
preventScrollOnEntryFocus: !0,
|
|
1055
|
-
children: /* @__PURE__ */
|
|
1056
|
-
|
|
1168
|
+
children: /* @__PURE__ */ o.jsx(
|
|
1169
|
+
ea,
|
|
1057
1170
|
{
|
|
1058
1171
|
role: "menu",
|
|
1059
1172
|
"aria-orientation": "vertical",
|
|
1060
|
-
"data-state":
|
|
1173
|
+
"data-state": yr(K.open),
|
|
1061
1174
|
"data-radix-menu-content": "",
|
|
1062
1175
|
dir: H.dir,
|
|
1063
|
-
...
|
|
1064
|
-
...
|
|
1065
|
-
ref:
|
|
1066
|
-
style: { outline: "none", ...
|
|
1067
|
-
onKeyDown:
|
|
1068
|
-
const Y =
|
|
1069
|
-
Y && (
|
|
1070
|
-
const
|
|
1071
|
-
if (
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1176
|
+
...Q,
|
|
1177
|
+
...R,
|
|
1178
|
+
ref: _,
|
|
1179
|
+
style: { outline: "none", ...R.style },
|
|
1180
|
+
onKeyDown: A(R.onKeyDown, (E) => {
|
|
1181
|
+
const Y = E.target.closest("[data-radix-menu-content]") === E.currentTarget, ne = E.ctrlKey || E.altKey || E.metaKey, je = E.key.length === 1;
|
|
1182
|
+
Y && (E.key === "Tab" && E.preventDefault(), !ne && je && ze(E.key));
|
|
1183
|
+
const pe = P.current;
|
|
1184
|
+
if (E.target !== pe || !$s.includes(E.key)) return;
|
|
1185
|
+
E.preventDefault();
|
|
1186
|
+
const me = p().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
1187
|
+
Xn.includes(E.key) && me.reverse(), ri(me);
|
|
1075
1188
|
}),
|
|
1076
|
-
onBlur:
|
|
1077
|
-
|
|
1189
|
+
onBlur: A(e.onBlur, (E) => {
|
|
1190
|
+
E.currentTarget.contains(E.target) || (window.clearTimeout(w.current), L.current = "");
|
|
1078
1191
|
}),
|
|
1079
|
-
onPointerMove:
|
|
1192
|
+
onPointerMove: A(
|
|
1080
1193
|
e.onPointerMove,
|
|
1081
|
-
|
|
1082
|
-
const U =
|
|
1083
|
-
if (
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1194
|
+
Je((E) => {
|
|
1195
|
+
const U = E.target, Y = X.current !== E.clientX;
|
|
1196
|
+
if (E.currentTarget.contains(U) && Y) {
|
|
1197
|
+
const ne = E.clientX > X.current ? "right" : "left";
|
|
1198
|
+
q.current = ne, X.current = E.clientX;
|
|
1086
1199
|
}
|
|
1087
1200
|
})
|
|
1088
1201
|
)
|
|
@@ -1098,140 +1211,140 @@ var oe = "MenuContent", [Us, Bt] = _e(oe), nr = c.forwardRef(
|
|
|
1098
1211
|
);
|
|
1099
1212
|
}
|
|
1100
1213
|
);
|
|
1101
|
-
|
|
1102
|
-
var
|
|
1214
|
+
or.displayName = se;
|
|
1215
|
+
var Gs = "MenuGroup", Vt = h.forwardRef(
|
|
1103
1216
|
(e, t) => {
|
|
1104
1217
|
const { __scopeMenu: n, ...r } = e;
|
|
1105
|
-
return /* @__PURE__ */
|
|
1218
|
+
return /* @__PURE__ */ o.jsx(Ue.div, { role: "group", ...r, ref: t });
|
|
1106
1219
|
}
|
|
1107
1220
|
);
|
|
1108
|
-
|
|
1109
|
-
var
|
|
1221
|
+
Vt.displayName = Gs;
|
|
1222
|
+
var Ws = "MenuLabel", ar = h.forwardRef(
|
|
1110
1223
|
(e, t) => {
|
|
1111
1224
|
const { __scopeMenu: n, ...r } = e;
|
|
1112
|
-
return /* @__PURE__ */
|
|
1225
|
+
return /* @__PURE__ */ o.jsx(Ue.div, { ...r, ref: t });
|
|
1113
1226
|
}
|
|
1114
1227
|
);
|
|
1115
|
-
|
|
1116
|
-
var mt = "MenuItem",
|
|
1228
|
+
ar.displayName = Ws;
|
|
1229
|
+
var mt = "MenuItem", bn = "menu.itemSelect", wt = h.forwardRef(
|
|
1117
1230
|
(e, t) => {
|
|
1118
|
-
const { disabled: n = !1, onSelect: r, ...a } = e,
|
|
1119
|
-
const
|
|
1120
|
-
if (!n &&
|
|
1121
|
-
const d = new CustomEvent(
|
|
1122
|
-
|
|
1231
|
+
const { disabled: n = !1, onSelect: r, ...a } = e, s = h.useRef(null), i = ot(mt, e.__scopeMenu), l = Kt(mt, e.__scopeMenu), u = et(t, s), v = h.useRef(!1), m = () => {
|
|
1232
|
+
const c = s.current;
|
|
1233
|
+
if (!n && c) {
|
|
1234
|
+
const d = new CustomEvent(bn, { bubbles: !0, cancelable: !0 });
|
|
1235
|
+
c.addEventListener(bn, (f) => r == null ? void 0 : r(f), { once: !0 }), oa(c, d), d.defaultPrevented ? v.current = !1 : i.onClose();
|
|
1123
1236
|
}
|
|
1124
1237
|
};
|
|
1125
|
-
return /* @__PURE__ */
|
|
1126
|
-
|
|
1238
|
+
return /* @__PURE__ */ o.jsx(
|
|
1239
|
+
sr,
|
|
1127
1240
|
{
|
|
1128
1241
|
...a,
|
|
1129
1242
|
ref: u,
|
|
1130
1243
|
disabled: n,
|
|
1131
|
-
onClick:
|
|
1132
|
-
onPointerDown: (
|
|
1244
|
+
onClick: A(e.onClick, m),
|
|
1245
|
+
onPointerDown: (c) => {
|
|
1133
1246
|
var d;
|
|
1134
|
-
(d = e.onPointerDown) == null || d.call(e,
|
|
1247
|
+
(d = e.onPointerDown) == null || d.call(e, c), v.current = !0;
|
|
1135
1248
|
},
|
|
1136
|
-
onPointerUp:
|
|
1249
|
+
onPointerUp: A(e.onPointerUp, (c) => {
|
|
1137
1250
|
var d;
|
|
1138
|
-
v.current || (d =
|
|
1251
|
+
v.current || (d = c.currentTarget) == null || d.click();
|
|
1139
1252
|
}),
|
|
1140
|
-
onKeyDown:
|
|
1141
|
-
const d =
|
|
1142
|
-
n || d &&
|
|
1253
|
+
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1254
|
+
const d = l.searchRef.current !== "";
|
|
1255
|
+
n || d && c.key === " " || Nt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
|
|
1143
1256
|
})
|
|
1144
1257
|
}
|
|
1145
1258
|
);
|
|
1146
1259
|
}
|
|
1147
1260
|
);
|
|
1148
|
-
|
|
1149
|
-
var
|
|
1261
|
+
wt.displayName = mt;
|
|
1262
|
+
var sr = h.forwardRef(
|
|
1150
1263
|
(e, t) => {
|
|
1151
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...
|
|
1152
|
-
return
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
}, [
|
|
1156
|
-
|
|
1264
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = e, i = Kt(mt, n), l = Zn(n), u = h.useRef(null), v = et(t, u), [m, c] = h.useState(!1), [d, f] = h.useState("");
|
|
1265
|
+
return h.useEffect(() => {
|
|
1266
|
+
const y = u.current;
|
|
1267
|
+
y && f((y.textContent ?? "").trim());
|
|
1268
|
+
}, [s.children]), /* @__PURE__ */ o.jsx(
|
|
1269
|
+
Xe.ItemSlot,
|
|
1157
1270
|
{
|
|
1158
1271
|
scope: n,
|
|
1159
1272
|
disabled: r,
|
|
1160
1273
|
textValue: a ?? d,
|
|
1161
|
-
children: /* @__PURE__ */
|
|
1162
|
-
|
|
1274
|
+
children: /* @__PURE__ */ o.jsx(ka, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ o.jsx(
|
|
1275
|
+
Ue.div,
|
|
1163
1276
|
{
|
|
1164
1277
|
role: "menuitem",
|
|
1165
|
-
"data-highlighted":
|
|
1278
|
+
"data-highlighted": m ? "" : void 0,
|
|
1166
1279
|
"aria-disabled": r || void 0,
|
|
1167
1280
|
"data-disabled": r ? "" : void 0,
|
|
1168
|
-
...
|
|
1281
|
+
...s,
|
|
1169
1282
|
ref: v,
|
|
1170
|
-
onPointerMove:
|
|
1283
|
+
onPointerMove: A(
|
|
1171
1284
|
e.onPointerMove,
|
|
1172
|
-
|
|
1173
|
-
r ?
|
|
1285
|
+
Je((y) => {
|
|
1286
|
+
r ? i.onItemLeave(y) : (i.onItemEnter(y), y.defaultPrevented || y.currentTarget.focus({ preventScroll: !0 }));
|
|
1174
1287
|
})
|
|
1175
1288
|
),
|
|
1176
|
-
onPointerLeave:
|
|
1289
|
+
onPointerLeave: A(
|
|
1177
1290
|
e.onPointerLeave,
|
|
1178
|
-
|
|
1291
|
+
Je((y) => i.onItemLeave(y))
|
|
1179
1292
|
),
|
|
1180
|
-
onFocus:
|
|
1181
|
-
onBlur:
|
|
1293
|
+
onFocus: A(e.onFocus, () => c(!0)),
|
|
1294
|
+
onBlur: A(e.onBlur, () => c(!1))
|
|
1182
1295
|
}
|
|
1183
1296
|
) })
|
|
1184
1297
|
}
|
|
1185
1298
|
);
|
|
1186
1299
|
}
|
|
1187
|
-
),
|
|
1300
|
+
), Ys = "MenuCheckboxItem", ir = h.forwardRef(
|
|
1188
1301
|
(e, t) => {
|
|
1189
1302
|
const { checked: n = !1, onCheckedChange: r, ...a } = e;
|
|
1190
|
-
return /* @__PURE__ */
|
|
1191
|
-
|
|
1303
|
+
return /* @__PURE__ */ o.jsx(fr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ o.jsx(
|
|
1304
|
+
wt,
|
|
1192
1305
|
{
|
|
1193
1306
|
role: "menuitemcheckbox",
|
|
1194
|
-
"aria-checked":
|
|
1307
|
+
"aria-checked": gt(n) ? "mixed" : n,
|
|
1195
1308
|
...a,
|
|
1196
1309
|
ref: t,
|
|
1197
|
-
"data-state":
|
|
1198
|
-
onSelect:
|
|
1310
|
+
"data-state": Wt(n),
|
|
1311
|
+
onSelect: A(
|
|
1199
1312
|
a.onSelect,
|
|
1200
|
-
() => r == null ? void 0 : r(
|
|
1313
|
+
() => r == null ? void 0 : r(gt(n) ? !0 : !n),
|
|
1201
1314
|
{ checkForDefaultPrevented: !1 }
|
|
1202
1315
|
)
|
|
1203
1316
|
}
|
|
1204
1317
|
) });
|
|
1205
1318
|
}
|
|
1206
1319
|
);
|
|
1207
|
-
|
|
1208
|
-
var
|
|
1209
|
-
|
|
1320
|
+
ir.displayName = Ys;
|
|
1321
|
+
var lr = "MenuRadioGroup", [Xs, Js] = Oe(
|
|
1322
|
+
lr,
|
|
1210
1323
|
{ value: void 0, onValueChange: () => {
|
|
1211
1324
|
} }
|
|
1212
|
-
),
|
|
1325
|
+
), cr = h.forwardRef(
|
|
1213
1326
|
(e, t) => {
|
|
1214
|
-
const { value: n, onValueChange: r, ...a } = e,
|
|
1215
|
-
return /* @__PURE__ */
|
|
1327
|
+
const { value: n, onValueChange: r, ...a } = e, s = kt(r);
|
|
1328
|
+
return /* @__PURE__ */ o.jsx(Xs, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ o.jsx(Vt, { ...a, ref: t }) });
|
|
1216
1329
|
}
|
|
1217
1330
|
);
|
|
1218
|
-
|
|
1219
|
-
var
|
|
1331
|
+
cr.displayName = lr;
|
|
1332
|
+
var ur = "MenuRadioItem", dr = h.forwardRef(
|
|
1220
1333
|
(e, t) => {
|
|
1221
|
-
const { value: n, ...r } = e, a =
|
|
1222
|
-
return /* @__PURE__ */
|
|
1223
|
-
|
|
1334
|
+
const { value: n, ...r } = e, a = Js(ur, e.__scopeMenu), s = n === a.value;
|
|
1335
|
+
return /* @__PURE__ */ o.jsx(fr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ o.jsx(
|
|
1336
|
+
wt,
|
|
1224
1337
|
{
|
|
1225
1338
|
role: "menuitemradio",
|
|
1226
|
-
"aria-checked":
|
|
1339
|
+
"aria-checked": s,
|
|
1227
1340
|
...r,
|
|
1228
1341
|
ref: t,
|
|
1229
|
-
"data-state":
|
|
1230
|
-
onSelect:
|
|
1342
|
+
"data-state": Wt(s),
|
|
1343
|
+
onSelect: A(
|
|
1231
1344
|
r.onSelect,
|
|
1232
1345
|
() => {
|
|
1233
|
-
var
|
|
1234
|
-
return (
|
|
1346
|
+
var i;
|
|
1347
|
+
return (i = a.onValueChange) == null ? void 0 : i.call(a, n);
|
|
1235
1348
|
},
|
|
1236
1349
|
{ checkForDefaultPrevented: !1 }
|
|
1237
1350
|
)
|
|
@@ -1239,35 +1352,35 @@ var cr = "MenuRadioItem", lr = c.forwardRef(
|
|
|
1239
1352
|
) });
|
|
1240
1353
|
}
|
|
1241
1354
|
);
|
|
1242
|
-
|
|
1243
|
-
var
|
|
1244
|
-
|
|
1355
|
+
dr.displayName = ur;
|
|
1356
|
+
var Qt = "MenuItemIndicator", [fr, Zs] = Oe(
|
|
1357
|
+
Qt,
|
|
1245
1358
|
{ checked: !1 }
|
|
1246
|
-
),
|
|
1359
|
+
), hr = h.forwardRef(
|
|
1247
1360
|
(e, t) => {
|
|
1248
|
-
const { __scopeMenu: n, forceMount: r, ...a } = e,
|
|
1249
|
-
return /* @__PURE__ */
|
|
1250
|
-
|
|
1361
|
+
const { __scopeMenu: n, forceMount: r, ...a } = e, s = Zs(Qt, n);
|
|
1362
|
+
return /* @__PURE__ */ o.jsx(
|
|
1363
|
+
vt,
|
|
1251
1364
|
{
|
|
1252
|
-
present: r ||
|
|
1253
|
-
children: /* @__PURE__ */
|
|
1254
|
-
|
|
1365
|
+
present: r || gt(s.checked) || s.checked === !0,
|
|
1366
|
+
children: /* @__PURE__ */ o.jsx(
|
|
1367
|
+
Ue.span,
|
|
1255
1368
|
{
|
|
1256
1369
|
...a,
|
|
1257
1370
|
ref: t,
|
|
1258
|
-
"data-state":
|
|
1371
|
+
"data-state": Wt(s.checked)
|
|
1259
1372
|
}
|
|
1260
1373
|
)
|
|
1261
1374
|
}
|
|
1262
1375
|
);
|
|
1263
1376
|
}
|
|
1264
1377
|
);
|
|
1265
|
-
|
|
1266
|
-
var
|
|
1378
|
+
hr.displayName = Qt;
|
|
1379
|
+
var ei = "MenuSeparator", pr = h.forwardRef(
|
|
1267
1380
|
(e, t) => {
|
|
1268
1381
|
const { __scopeMenu: n, ...r } = e;
|
|
1269
|
-
return /* @__PURE__ */
|
|
1270
|
-
|
|
1382
|
+
return /* @__PURE__ */ o.jsx(
|
|
1383
|
+
Ue.div,
|
|
1271
1384
|
{
|
|
1272
1385
|
role: "separator",
|
|
1273
1386
|
"aria-orientation": "horizontal",
|
|
@@ -1277,31 +1390,31 @@ var Ys = "MenuSeparator", fr = c.forwardRef(
|
|
|
1277
1390
|
);
|
|
1278
1391
|
}
|
|
1279
1392
|
);
|
|
1280
|
-
|
|
1281
|
-
var
|
|
1393
|
+
pr.displayName = ei;
|
|
1394
|
+
var ti = "MenuArrow", mr = h.forwardRef(
|
|
1282
1395
|
(e, t) => {
|
|
1283
|
-
const { __scopeMenu: n, ...r } = e, a =
|
|
1284
|
-
return /* @__PURE__ */
|
|
1396
|
+
const { __scopeMenu: n, ...r } = e, a = rt(n);
|
|
1397
|
+
return /* @__PURE__ */ o.jsx(ta, { ...a, ...r, ref: t });
|
|
1285
1398
|
}
|
|
1286
1399
|
);
|
|
1287
|
-
mr.displayName =
|
|
1288
|
-
var
|
|
1289
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: a } = e,
|
|
1290
|
-
return
|
|
1291
|
-
|
|
1400
|
+
mr.displayName = ti;
|
|
1401
|
+
var Gt = "MenuSub", [ni, gr] = Oe(Gt), vr = (e) => {
|
|
1402
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: a } = e, s = De(Gt, t), i = rt(t), [l, u] = h.useState(null), [v, m] = h.useState(null), c = kt(a);
|
|
1403
|
+
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ o.jsx(On, { ...i, children: /* @__PURE__ */ o.jsx(
|
|
1404
|
+
er,
|
|
1292
1405
|
{
|
|
1293
1406
|
scope: t,
|
|
1294
1407
|
open: r,
|
|
1295
|
-
onOpenChange:
|
|
1408
|
+
onOpenChange: c,
|
|
1296
1409
|
content: v,
|
|
1297
|
-
onContentChange:
|
|
1298
|
-
children: /* @__PURE__ */
|
|
1299
|
-
|
|
1410
|
+
onContentChange: m,
|
|
1411
|
+
children: /* @__PURE__ */ o.jsx(
|
|
1412
|
+
ni,
|
|
1300
1413
|
{
|
|
1301
1414
|
scope: t,
|
|
1302
|
-
contentId:
|
|
1303
|
-
triggerId:
|
|
1304
|
-
trigger:
|
|
1415
|
+
contentId: pt(),
|
|
1416
|
+
triggerId: pt(),
|
|
1417
|
+
trigger: l,
|
|
1305
1418
|
onTriggerChange: u,
|
|
1306
1419
|
children: n
|
|
1307
1420
|
}
|
|
@@ -1309,240 +1422,240 @@ var Qt = "MenuSub", [Js, pr] = _e(Qt), hr = (e) => {
|
|
|
1309
1422
|
}
|
|
1310
1423
|
) });
|
|
1311
1424
|
};
|
|
1312
|
-
|
|
1313
|
-
var
|
|
1425
|
+
vr.displayName = Gt;
|
|
1426
|
+
var Ge = "MenuSubTrigger", wr = h.forwardRef(
|
|
1314
1427
|
(e, t) => {
|
|
1315
|
-
const n =
|
|
1316
|
-
|
|
1428
|
+
const n = De(Ge, e.__scopeMenu), r = ot(Ge, e.__scopeMenu), a = gr(Ge, e.__scopeMenu), s = Kt(Ge, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, v = { __scopeMenu: e.__scopeMenu }, m = h.useCallback(() => {
|
|
1429
|
+
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1317
1430
|
}, []);
|
|
1318
|
-
return
|
|
1319
|
-
const
|
|
1431
|
+
return h.useEffect(() => m, [m]), h.useEffect(() => {
|
|
1432
|
+
const c = l.current;
|
|
1320
1433
|
return () => {
|
|
1321
|
-
window.clearTimeout(
|
|
1434
|
+
window.clearTimeout(c), u(null);
|
|
1322
1435
|
};
|
|
1323
|
-
}, [
|
|
1324
|
-
|
|
1436
|
+
}, [l, u]), /* @__PURE__ */ o.jsx(Bt, { asChild: !0, ...v, children: /* @__PURE__ */ o.jsx(
|
|
1437
|
+
sr,
|
|
1325
1438
|
{
|
|
1326
1439
|
id: a.triggerId,
|
|
1327
1440
|
"aria-haspopup": "menu",
|
|
1328
1441
|
"aria-expanded": n.open,
|
|
1329
1442
|
"aria-controls": a.contentId,
|
|
1330
|
-
"data-state":
|
|
1443
|
+
"data-state": yr(n.open),
|
|
1331
1444
|
...e,
|
|
1332
|
-
ref:
|
|
1333
|
-
onClick: (
|
|
1445
|
+
ref: _n(t, a.onTriggerChange),
|
|
1446
|
+
onClick: (c) => {
|
|
1334
1447
|
var d;
|
|
1335
|
-
(d = e.onClick) == null || d.call(e,
|
|
1448
|
+
(d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1336
1449
|
},
|
|
1337
|
-
onPointerMove:
|
|
1450
|
+
onPointerMove: A(
|
|
1338
1451
|
e.onPointerMove,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
n.onOpenChange(!0),
|
|
1452
|
+
Je((c) => {
|
|
1453
|
+
s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
1454
|
+
n.onOpenChange(!0), m();
|
|
1342
1455
|
}, 100));
|
|
1343
1456
|
})
|
|
1344
1457
|
),
|
|
1345
|
-
onPointerLeave:
|
|
1458
|
+
onPointerLeave: A(
|
|
1346
1459
|
e.onPointerLeave,
|
|
1347
|
-
|
|
1348
|
-
var f,
|
|
1349
|
-
|
|
1460
|
+
Je((c) => {
|
|
1461
|
+
var f, y;
|
|
1462
|
+
m();
|
|
1350
1463
|
const d = (f = n.content) == null ? void 0 : f.getBoundingClientRect();
|
|
1351
1464
|
if (d) {
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1465
|
+
const R = (y = n.content) == null ? void 0 : y.dataset.side, K = R === "right", H = K ? -5 : 5, Q = d[K ? "left" : "right"], x = d[K ? "right" : "left"];
|
|
1466
|
+
s.onPointerGraceIntentChange({
|
|
1354
1467
|
area: [
|
|
1355
1468
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1356
1469
|
// consistently within polygon bounds
|
|
1357
|
-
{ x:
|
|
1358
|
-
{ x:
|
|
1359
|
-
{ x
|
|
1360
|
-
{ x
|
|
1361
|
-
{ x:
|
|
1470
|
+
{ x: c.clientX + H, y: c.clientY },
|
|
1471
|
+
{ x: Q, y: d.top },
|
|
1472
|
+
{ x, y: d.top },
|
|
1473
|
+
{ x, y: d.bottom },
|
|
1474
|
+
{ x: Q, y: d.bottom }
|
|
1362
1475
|
],
|
|
1363
|
-
side:
|
|
1364
|
-
}), window.clearTimeout(
|
|
1365
|
-
() =>
|
|
1476
|
+
side: R
|
|
1477
|
+
}), window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
1478
|
+
() => s.onPointerGraceIntentChange(null),
|
|
1366
1479
|
300
|
|
1367
1480
|
);
|
|
1368
1481
|
} else {
|
|
1369
|
-
if (
|
|
1370
|
-
|
|
1482
|
+
if (s.onTriggerLeave(c), c.defaultPrevented) return;
|
|
1483
|
+
s.onPointerGraceIntentChange(null);
|
|
1371
1484
|
}
|
|
1372
1485
|
})
|
|
1373
1486
|
),
|
|
1374
|
-
onKeyDown:
|
|
1487
|
+
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1375
1488
|
var f;
|
|
1376
|
-
const d =
|
|
1377
|
-
e.disabled || d &&
|
|
1489
|
+
const d = s.searchRef.current !== "";
|
|
1490
|
+
e.disabled || d && c.key === " " || Ls[r.dir].includes(c.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), c.preventDefault());
|
|
1378
1491
|
})
|
|
1379
1492
|
}
|
|
1380
1493
|
) });
|
|
1381
1494
|
}
|
|
1382
1495
|
);
|
|
1383
|
-
|
|
1384
|
-
var
|
|
1496
|
+
wr.displayName = Ge;
|
|
1497
|
+
var br = "MenuSubContent", xr = h.forwardRef(
|
|
1385
1498
|
(e, t) => {
|
|
1386
|
-
const n =
|
|
1387
|
-
return /* @__PURE__ */
|
|
1388
|
-
|
|
1499
|
+
const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = De(se, e.__scopeMenu), i = ot(se, e.__scopeMenu), l = gr(br, e.__scopeMenu), u = h.useRef(null), v = et(t, u);
|
|
1500
|
+
return /* @__PURE__ */ o.jsx(Xe.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Xe.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(
|
|
1501
|
+
qt,
|
|
1389
1502
|
{
|
|
1390
|
-
id:
|
|
1391
|
-
"aria-labelledby":
|
|
1503
|
+
id: l.contentId,
|
|
1504
|
+
"aria-labelledby": l.triggerId,
|
|
1392
1505
|
...a,
|
|
1393
1506
|
ref: v,
|
|
1394
1507
|
align: "start",
|
|
1395
|
-
side:
|
|
1508
|
+
side: i.dir === "rtl" ? "left" : "right",
|
|
1396
1509
|
disableOutsidePointerEvents: !1,
|
|
1397
1510
|
disableOutsideScroll: !1,
|
|
1398
1511
|
trapFocus: !1,
|
|
1399
|
-
onOpenAutoFocus: (
|
|
1400
|
-
var
|
|
1401
|
-
|
|
1512
|
+
onOpenAutoFocus: (m) => {
|
|
1513
|
+
var c;
|
|
1514
|
+
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), m.preventDefault();
|
|
1402
1515
|
},
|
|
1403
|
-
onCloseAutoFocus: (
|
|
1404
|
-
onFocusOutside:
|
|
1405
|
-
|
|
1516
|
+
onCloseAutoFocus: (m) => m.preventDefault(),
|
|
1517
|
+
onFocusOutside: A(e.onFocusOutside, (m) => {
|
|
1518
|
+
m.target !== l.trigger && s.onOpenChange(!1);
|
|
1406
1519
|
}),
|
|
1407
|
-
onEscapeKeyDown:
|
|
1408
|
-
|
|
1520
|
+
onEscapeKeyDown: A(e.onEscapeKeyDown, (m) => {
|
|
1521
|
+
i.onClose(), m.preventDefault();
|
|
1409
1522
|
}),
|
|
1410
|
-
onKeyDown:
|
|
1523
|
+
onKeyDown: A(e.onKeyDown, (m) => {
|
|
1411
1524
|
var f;
|
|
1412
|
-
const
|
|
1413
|
-
|
|
1525
|
+
const c = m.currentTarget.contains(m.target), d = Fs[i.dir].includes(m.key);
|
|
1526
|
+
c && d && (s.onOpenChange(!1), (f = l.trigger) == null || f.focus(), m.preventDefault());
|
|
1414
1527
|
})
|
|
1415
1528
|
}
|
|
1416
1529
|
) }) }) });
|
|
1417
1530
|
}
|
|
1418
1531
|
);
|
|
1419
|
-
|
|
1420
|
-
function
|
|
1532
|
+
xr.displayName = br;
|
|
1533
|
+
function yr(e) {
|
|
1421
1534
|
return e ? "open" : "closed";
|
|
1422
1535
|
}
|
|
1423
|
-
function
|
|
1536
|
+
function gt(e) {
|
|
1424
1537
|
return e === "indeterminate";
|
|
1425
1538
|
}
|
|
1426
|
-
function
|
|
1427
|
-
return
|
|
1539
|
+
function Wt(e) {
|
|
1540
|
+
return gt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1428
1541
|
}
|
|
1429
|
-
function
|
|
1542
|
+
function ri(e) {
|
|
1430
1543
|
const t = document.activeElement;
|
|
1431
1544
|
for (const n of e)
|
|
1432
1545
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
1433
1546
|
}
|
|
1434
|
-
function
|
|
1547
|
+
function oi(e, t) {
|
|
1435
1548
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1436
1549
|
}
|
|
1437
|
-
function
|
|
1438
|
-
const a = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t,
|
|
1439
|
-
let
|
|
1440
|
-
a.length === 1 && (
|
|
1441
|
-
const u =
|
|
1550
|
+
function ai(e, t, n) {
|
|
1551
|
+
const a = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1552
|
+
let i = oi(e, Math.max(s, 0));
|
|
1553
|
+
a.length === 1 && (i = i.filter((v) => v !== n));
|
|
1554
|
+
const u = i.find(
|
|
1442
1555
|
(v) => v.toLowerCase().startsWith(a.toLowerCase())
|
|
1443
1556
|
);
|
|
1444
1557
|
return u !== n ? u : void 0;
|
|
1445
1558
|
}
|
|
1446
|
-
function
|
|
1559
|
+
function si(e, t) {
|
|
1447
1560
|
const { x: n, y: r } = e;
|
|
1448
1561
|
let a = !1;
|
|
1449
|
-
for (let
|
|
1450
|
-
const
|
|
1451
|
-
u > r !=
|
|
1562
|
+
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
1563
|
+
const l = t[s].x, u = t[s].y, v = t[i].x, m = t[i].y;
|
|
1564
|
+
u > r != m > r && n < (v - l) * (r - u) / (m - u) + l && (a = !a);
|
|
1452
1565
|
}
|
|
1453
1566
|
return a;
|
|
1454
1567
|
}
|
|
1455
|
-
function
|
|
1568
|
+
function ii(e, t) {
|
|
1456
1569
|
if (!t) return !1;
|
|
1457
1570
|
const n = { x: e.clientX, y: e.clientY };
|
|
1458
|
-
return
|
|
1571
|
+
return si(n, t);
|
|
1459
1572
|
}
|
|
1460
|
-
function
|
|
1573
|
+
function Je(e) {
|
|
1461
1574
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1462
1575
|
}
|
|
1463
|
-
var
|
|
1464
|
-
|
|
1465
|
-
[
|
|
1466
|
-
), W =
|
|
1576
|
+
var li = tr, ci = Bt, ui = rr, di = or, fi = Vt, hi = ar, pi = wt, mi = ir, gi = cr, vi = dr, wi = hr, bi = pr, xi = mr, yi = vr, Mi = wr, Si = xr, Yt = "DropdownMenu", [Ei, Jl] = Pn(
|
|
1577
|
+
Yt,
|
|
1578
|
+
[Jn]
|
|
1579
|
+
), W = Jn(), [Ci, Mr] = Ei(Yt), Sr = (e) => {
|
|
1467
1580
|
const {
|
|
1468
1581
|
__scopeDropdownMenu: t,
|
|
1469
1582
|
children: n,
|
|
1470
1583
|
dir: r,
|
|
1471
1584
|
open: a,
|
|
1472
|
-
defaultOpen:
|
|
1473
|
-
onOpenChange:
|
|
1474
|
-
modal:
|
|
1475
|
-
} = e, u = W(t), v =
|
|
1585
|
+
defaultOpen: s,
|
|
1586
|
+
onOpenChange: i,
|
|
1587
|
+
modal: l = !0
|
|
1588
|
+
} = e, u = W(t), v = h.useRef(null), [m = !1, c] = In({
|
|
1476
1589
|
prop: a,
|
|
1477
|
-
defaultProp:
|
|
1478
|
-
onChange:
|
|
1590
|
+
defaultProp: s,
|
|
1591
|
+
onChange: i
|
|
1479
1592
|
});
|
|
1480
|
-
return /* @__PURE__ */
|
|
1481
|
-
|
|
1593
|
+
return /* @__PURE__ */ o.jsx(
|
|
1594
|
+
Ci,
|
|
1482
1595
|
{
|
|
1483
1596
|
scope: t,
|
|
1484
|
-
triggerId:
|
|
1597
|
+
triggerId: pt(),
|
|
1485
1598
|
triggerRef: v,
|
|
1486
|
-
contentId:
|
|
1487
|
-
open:
|
|
1488
|
-
onOpenChange:
|
|
1489
|
-
onOpenToggle:
|
|
1490
|
-
modal:
|
|
1491
|
-
children: /* @__PURE__ */
|
|
1599
|
+
contentId: pt(),
|
|
1600
|
+
open: m,
|
|
1601
|
+
onOpenChange: c,
|
|
1602
|
+
onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
|
|
1603
|
+
modal: l,
|
|
1604
|
+
children: /* @__PURE__ */ o.jsx(li, { ...u, open: m, onOpenChange: c, dir: r, modal: l, children: n })
|
|
1492
1605
|
}
|
|
1493
1606
|
);
|
|
1494
1607
|
};
|
|
1495
|
-
|
|
1496
|
-
var
|
|
1608
|
+
Sr.displayName = Yt;
|
|
1609
|
+
var Er = "DropdownMenuTrigger", Cr = h.forwardRef(
|
|
1497
1610
|
(e, t) => {
|
|
1498
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e,
|
|
1499
|
-
return /* @__PURE__ */
|
|
1500
|
-
|
|
1611
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e, s = Mr(Er, n), i = W(n);
|
|
1612
|
+
return /* @__PURE__ */ o.jsx(ci, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
|
|
1613
|
+
Ue.button,
|
|
1501
1614
|
{
|
|
1502
1615
|
type: "button",
|
|
1503
|
-
id:
|
|
1616
|
+
id: s.triggerId,
|
|
1504
1617
|
"aria-haspopup": "menu",
|
|
1505
|
-
"aria-expanded":
|
|
1506
|
-
"aria-controls":
|
|
1507
|
-
"data-state":
|
|
1618
|
+
"aria-expanded": s.open,
|
|
1619
|
+
"aria-controls": s.open ? s.contentId : void 0,
|
|
1620
|
+
"data-state": s.open ? "open" : "closed",
|
|
1508
1621
|
"data-disabled": r ? "" : void 0,
|
|
1509
1622
|
disabled: r,
|
|
1510
1623
|
...a,
|
|
1511
|
-
ref:
|
|
1512
|
-
onPointerDown:
|
|
1513
|
-
!r &&
|
|
1624
|
+
ref: _n(t, s.triggerRef),
|
|
1625
|
+
onPointerDown: A(e.onPointerDown, (l) => {
|
|
1626
|
+
!r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
|
|
1514
1627
|
}),
|
|
1515
|
-
onKeyDown:
|
|
1516
|
-
r || (["Enter", " "].includes(
|
|
1628
|
+
onKeyDown: A(e.onKeyDown, (l) => {
|
|
1629
|
+
r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
|
|
1517
1630
|
})
|
|
1518
1631
|
}
|
|
1519
1632
|
) });
|
|
1520
1633
|
}
|
|
1521
1634
|
);
|
|
1522
|
-
|
|
1523
|
-
var Ri = "DropdownMenuPortal",
|
|
1635
|
+
Cr.displayName = Er;
|
|
1636
|
+
var Ri = "DropdownMenuPortal", Rr = (e) => {
|
|
1524
1637
|
const { __scopeDropdownMenu: t, ...n } = e, r = W(t);
|
|
1525
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ o.jsx(ui, { ...r, ...n });
|
|
1526
1639
|
};
|
|
1527
|
-
|
|
1528
|
-
var
|
|
1640
|
+
Rr.displayName = Ri;
|
|
1641
|
+
var Dr = "DropdownMenuContent", jr = h.forwardRef(
|
|
1529
1642
|
(e, t) => {
|
|
1530
|
-
const { __scopeDropdownMenu: n, ...r } = e, a =
|
|
1531
|
-
return /* @__PURE__ */
|
|
1532
|
-
|
|
1643
|
+
const { __scopeDropdownMenu: n, ...r } = e, a = Mr(Dr, n), s = W(n), i = h.useRef(!1);
|
|
1644
|
+
return /* @__PURE__ */ o.jsx(
|
|
1645
|
+
di,
|
|
1533
1646
|
{
|
|
1534
1647
|
id: a.contentId,
|
|
1535
1648
|
"aria-labelledby": a.triggerId,
|
|
1536
|
-
...
|
|
1649
|
+
...s,
|
|
1537
1650
|
...r,
|
|
1538
1651
|
ref: t,
|
|
1539
|
-
onCloseAutoFocus:
|
|
1652
|
+
onCloseAutoFocus: A(e.onCloseAutoFocus, (l) => {
|
|
1540
1653
|
var u;
|
|
1541
|
-
|
|
1654
|
+
i.current || (u = a.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
|
|
1542
1655
|
}),
|
|
1543
|
-
onInteractOutside:
|
|
1544
|
-
const u =
|
|
1545
|
-
(!a.modal ||
|
|
1656
|
+
onInteractOutside: A(e.onInteractOutside, (l) => {
|
|
1657
|
+
const u = l.detail.originalEvent, v = u.button === 0 && u.ctrlKey === !0, m = u.button === 2 || v;
|
|
1658
|
+
(!a.modal || m) && (i.current = !0);
|
|
1546
1659
|
}),
|
|
1547
1660
|
style: {
|
|
1548
1661
|
...e.style,
|
|
@@ -1556,76 +1669,76 @@ var Sr = "DropdownMenuContent", Cr = c.forwardRef(
|
|
|
1556
1669
|
);
|
|
1557
1670
|
}
|
|
1558
1671
|
);
|
|
1559
|
-
|
|
1560
|
-
var
|
|
1672
|
+
jr.displayName = Dr;
|
|
1673
|
+
var Di = "DropdownMenuGroup", ji = h.forwardRef(
|
|
1561
1674
|
(e, t) => {
|
|
1562
1675
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1563
|
-
return /* @__PURE__ */
|
|
1676
|
+
return /* @__PURE__ */ o.jsx(fi, { ...a, ...r, ref: t });
|
|
1564
1677
|
}
|
|
1565
1678
|
);
|
|
1566
|
-
|
|
1567
|
-
var
|
|
1679
|
+
ji.displayName = Di;
|
|
1680
|
+
var Ni = "DropdownMenuLabel", Nr = h.forwardRef(
|
|
1568
1681
|
(e, t) => {
|
|
1569
1682
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1570
|
-
return /* @__PURE__ */
|
|
1683
|
+
return /* @__PURE__ */ o.jsx(hi, { ...a, ...r, ref: t });
|
|
1571
1684
|
}
|
|
1572
1685
|
);
|
|
1573
|
-
|
|
1574
|
-
var
|
|
1686
|
+
Nr.displayName = Ni;
|
|
1687
|
+
var Pi = "DropdownMenuItem", Pr = h.forwardRef(
|
|
1575
1688
|
(e, t) => {
|
|
1576
1689
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1577
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ o.jsx(pi, { ...a, ...r, ref: t });
|
|
1578
1691
|
}
|
|
1579
1692
|
);
|
|
1580
|
-
|
|
1581
|
-
var
|
|
1693
|
+
Pr.displayName = Pi;
|
|
1694
|
+
var Ti = "DropdownMenuCheckboxItem", Tr = h.forwardRef((e, t) => {
|
|
1582
1695
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1583
|
-
return /* @__PURE__ */
|
|
1696
|
+
return /* @__PURE__ */ o.jsx(mi, { ...a, ...r, ref: t });
|
|
1584
1697
|
});
|
|
1585
|
-
|
|
1586
|
-
var
|
|
1698
|
+
Tr.displayName = Ti;
|
|
1699
|
+
var _i = "DropdownMenuRadioGroup", Oi = h.forwardRef((e, t) => {
|
|
1587
1700
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1588
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ o.jsx(gi, { ...a, ...r, ref: t });
|
|
1589
1702
|
});
|
|
1590
|
-
|
|
1591
|
-
var
|
|
1703
|
+
Oi.displayName = _i;
|
|
1704
|
+
var Ii = "DropdownMenuRadioItem", _r = h.forwardRef((e, t) => {
|
|
1592
1705
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1593
|
-
return /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ o.jsx(vi, { ...a, ...r, ref: t });
|
|
1594
1707
|
});
|
|
1595
|
-
|
|
1596
|
-
var
|
|
1708
|
+
_r.displayName = Ii;
|
|
1709
|
+
var Ai = "DropdownMenuItemIndicator", Or = h.forwardRef((e, t) => {
|
|
1597
1710
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1598
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ o.jsx(wi, { ...a, ...r, ref: t });
|
|
1599
1712
|
});
|
|
1600
|
-
|
|
1601
|
-
var
|
|
1713
|
+
Or.displayName = Ai;
|
|
1714
|
+
var ki = "DropdownMenuSeparator", Ir = h.forwardRef((e, t) => {
|
|
1602
1715
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1603
|
-
return /* @__PURE__ */
|
|
1716
|
+
return /* @__PURE__ */ o.jsx(bi, { ...a, ...r, ref: t });
|
|
1604
1717
|
});
|
|
1605
|
-
|
|
1606
|
-
var
|
|
1718
|
+
Ir.displayName = ki;
|
|
1719
|
+
var $i = "DropdownMenuArrow", Li = h.forwardRef(
|
|
1607
1720
|
(e, t) => {
|
|
1608
1721
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1609
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ o.jsx(xi, { ...a, ...r, ref: t });
|
|
1610
1723
|
}
|
|
1611
1724
|
);
|
|
1612
|
-
|
|
1613
|
-
var
|
|
1614
|
-
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: a, defaultOpen:
|
|
1725
|
+
Li.displayName = $i;
|
|
1726
|
+
var Fi = (e) => {
|
|
1727
|
+
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: a, defaultOpen: s } = e, i = W(t), [l = !1, u] = In({
|
|
1615
1728
|
prop: r,
|
|
1616
|
-
defaultProp:
|
|
1729
|
+
defaultProp: s,
|
|
1617
1730
|
onChange: a
|
|
1618
1731
|
});
|
|
1619
|
-
return /* @__PURE__ */
|
|
1620
|
-
},
|
|
1732
|
+
return /* @__PURE__ */ o.jsx(yi, { ...i, open: l, onOpenChange: u, children: n });
|
|
1733
|
+
}, Hi = "DropdownMenuSubTrigger", Ar = h.forwardRef((e, t) => {
|
|
1621
1734
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1622
|
-
return /* @__PURE__ */
|
|
1735
|
+
return /* @__PURE__ */ o.jsx(Mi, { ...a, ...r, ref: t });
|
|
1623
1736
|
});
|
|
1624
|
-
|
|
1625
|
-
var
|
|
1737
|
+
Ar.displayName = Hi;
|
|
1738
|
+
var Ui = "DropdownMenuSubContent", kr = h.forwardRef((e, t) => {
|
|
1626
1739
|
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1627
|
-
return /* @__PURE__ */
|
|
1628
|
-
|
|
1740
|
+
return /* @__PURE__ */ o.jsx(
|
|
1741
|
+
Si,
|
|
1629
1742
|
{
|
|
1630
1743
|
...a,
|
|
1631
1744
|
...r,
|
|
@@ -1641,54 +1754,56 @@ var Li = "DropdownMenuSubContent", Ar = c.forwardRef((e, t) => {
|
|
|
1641
1754
|
}
|
|
1642
1755
|
);
|
|
1643
1756
|
});
|
|
1644
|
-
|
|
1645
|
-
var
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1757
|
+
kr.displayName = Ui;
|
|
1758
|
+
var Bi = Sr, zi = Cr, $r = Rr, Lr = jr, Fr = Nr, Hr = Pr, Ur = Tr, Br = _r, zr = Or, Kr = Ir, Ki = Fi, qr = Ar, Vr = kr;
|
|
1759
|
+
const qi = Bi, Vi = zi, Qi = $r, Gi = Ki, Qr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1760
|
+
qr,
|
|
1648
1761
|
{
|
|
1649
1762
|
ref: a,
|
|
1650
|
-
className:
|
|
1763
|
+
className: O(
|
|
1651
1764
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1652
1765
|
t && "pl-8",
|
|
1653
1766
|
e
|
|
1654
1767
|
),
|
|
1655
|
-
...r
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1768
|
+
...r,
|
|
1769
|
+
children: [
|
|
1770
|
+
n,
|
|
1771
|
+
/* @__PURE__ */ o.jsx(Vn, { className: "ml-auto h-4 w-4" })
|
|
1772
|
+
]
|
|
1773
|
+
}
|
|
1659
1774
|
));
|
|
1660
|
-
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1775
|
+
Qr.displayName = qr.displayName;
|
|
1776
|
+
const Gr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
1777
|
+
Vr,
|
|
1663
1778
|
{
|
|
1664
1779
|
ref: n,
|
|
1665
|
-
className:
|
|
1780
|
+
className: O(
|
|
1666
1781
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1667
1782
|
e
|
|
1668
1783
|
),
|
|
1669
1784
|
...t
|
|
1670
1785
|
}
|
|
1671
1786
|
));
|
|
1672
|
-
|
|
1673
|
-
const
|
|
1674
|
-
|
|
1787
|
+
Gr.displayName = Vr.displayName;
|
|
1788
|
+
const Wr = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ o.jsx($r, { children: /* @__PURE__ */ o.jsx(
|
|
1789
|
+
Lr,
|
|
1675
1790
|
{
|
|
1676
1791
|
ref: r,
|
|
1677
1792
|
sideOffset: t,
|
|
1678
|
-
className:
|
|
1793
|
+
className: O(
|
|
1679
1794
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1680
1795
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1681
1796
|
e
|
|
1682
1797
|
),
|
|
1683
1798
|
...n
|
|
1684
1799
|
}
|
|
1685
|
-
)));
|
|
1686
|
-
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1800
|
+
) }));
|
|
1801
|
+
Wr.displayName = Lr.displayName;
|
|
1802
|
+
const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1803
|
+
Hr,
|
|
1689
1804
|
{
|
|
1690
1805
|
ref: r,
|
|
1691
|
-
className:
|
|
1806
|
+
className: O(
|
|
1692
1807
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1693
1808
|
t && "pl-8",
|
|
1694
1809
|
e
|
|
@@ -1696,41 +1811,45 @@ const Gr = c.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1696
1811
|
...n
|
|
1697
1812
|
}
|
|
1698
1813
|
));
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1814
|
+
Yr.displayName = Hr.displayName;
|
|
1815
|
+
const Wi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1816
|
+
Ur,
|
|
1702
1817
|
{
|
|
1703
1818
|
ref: a,
|
|
1704
|
-
className:
|
|
1819
|
+
className: O(
|
|
1705
1820
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1706
1821
|
e
|
|
1707
1822
|
),
|
|
1708
1823
|
checked: n,
|
|
1709
|
-
...r
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1824
|
+
...r,
|
|
1825
|
+
children: [
|
|
1826
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(zr, { children: /* @__PURE__ */ o.jsx(ia, { className: "h-4 w-4" }) }) }),
|
|
1827
|
+
t
|
|
1828
|
+
]
|
|
1829
|
+
}
|
|
1713
1830
|
));
|
|
1714
|
-
|
|
1715
|
-
const
|
|
1716
|
-
|
|
1831
|
+
Wi.displayName = Ur.displayName;
|
|
1832
|
+
const Yi = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ o.jsxs(
|
|
1833
|
+
Br,
|
|
1717
1834
|
{
|
|
1718
1835
|
ref: r,
|
|
1719
|
-
className:
|
|
1836
|
+
className: O(
|
|
1720
1837
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1721
1838
|
e
|
|
1722
1839
|
),
|
|
1723
|
-
...n
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1840
|
+
...n,
|
|
1841
|
+
children: [
|
|
1842
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(zr, { children: /* @__PURE__ */ o.jsx(Qa, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1843
|
+
t
|
|
1844
|
+
]
|
|
1845
|
+
}
|
|
1727
1846
|
));
|
|
1728
|
-
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1847
|
+
Yi.displayName = Br.displayName;
|
|
1848
|
+
const Xr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1849
|
+
Fr,
|
|
1731
1850
|
{
|
|
1732
1851
|
ref: r,
|
|
1733
|
-
className:
|
|
1852
|
+
className: O(
|
|
1734
1853
|
"px-2 py-1.5 text-sm font-semibold",
|
|
1735
1854
|
t && "pl-8",
|
|
1736
1855
|
e
|
|
@@ -1738,50 +1857,52 @@ const Wr = c.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1738
1857
|
...n
|
|
1739
1858
|
}
|
|
1740
1859
|
));
|
|
1741
|
-
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1860
|
+
Xr.displayName = Fr.displayName;
|
|
1861
|
+
const Jr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
1862
|
+
Kr,
|
|
1744
1863
|
{
|
|
1745
1864
|
ref: n,
|
|
1746
|
-
className:
|
|
1865
|
+
className: O("-mx-1 my-1 h-px bg-muted", e),
|
|
1747
1866
|
...t
|
|
1748
1867
|
}
|
|
1749
1868
|
));
|
|
1750
|
-
|
|
1751
|
-
const
|
|
1869
|
+
Jr.displayName = Kr.displayName;
|
|
1870
|
+
const Xi = {
|
|
1752
1871
|
info: "bg-blue-500",
|
|
1753
1872
|
note: "bg-gray-500",
|
|
1754
1873
|
tip: "bg-green-600",
|
|
1755
1874
|
caution: "bg-orange-500",
|
|
1756
1875
|
danger: "bg-rose-500"
|
|
1757
|
-
},
|
|
1758
|
-
const { page: e } =
|
|
1759
|
-
return !(e != null && e.banner) || !t ? /* @__PURE__ */
|
|
1876
|
+
}, Ji = () => {
|
|
1877
|
+
const { page: e } = Be(), [t, n] = _e(!0);
|
|
1878
|
+
return !(e != null && e.banner) || !t ? /* @__PURE__ */ o.jsx("style", { children: ":root { --banner-height: 0px; }" }) : /* @__PURE__ */ o.jsxs(
|
|
1760
1879
|
"div",
|
|
1761
1880
|
{
|
|
1762
|
-
className:
|
|
1881
|
+
className: O(
|
|
1763
1882
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
1764
|
-
e.banner.color ?
|
|
1765
|
-
)
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1883
|
+
e.banner.color ? Xi[e.banner.color] : "bg-primary"
|
|
1884
|
+
),
|
|
1885
|
+
children: [
|
|
1886
|
+
/* @__PURE__ */ o.jsx("div", { className: "w-full", children: e.banner.message }),
|
|
1887
|
+
e.banner.dismissible && /* @__PURE__ */ o.jsx(
|
|
1888
|
+
"button",
|
|
1889
|
+
{
|
|
1890
|
+
type: "button",
|
|
1891
|
+
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1892
|
+
onClick: () => n(!1),
|
|
1893
|
+
children: /* @__PURE__ */ o.jsx(Va, { size: 16 })
|
|
1894
|
+
}
|
|
1895
|
+
)
|
|
1896
|
+
]
|
|
1897
|
+
}
|
|
1777
1898
|
);
|
|
1778
1899
|
};
|
|
1779
|
-
function
|
|
1900
|
+
function Zi(e) {
|
|
1780
1901
|
if (typeof document > "u") return;
|
|
1781
1902
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1782
1903
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1783
1904
|
}
|
|
1784
|
-
const
|
|
1905
|
+
const Zr = g.createContext({
|
|
1785
1906
|
drawerRef: {
|
|
1786
1907
|
current: null
|
|
1787
1908
|
},
|
|
@@ -1825,47 +1946,47 @@ const Xr = h.createContext({
|
|
|
1825
1946
|
setVisible: () => {
|
|
1826
1947
|
},
|
|
1827
1948
|
direction: "bottom"
|
|
1828
|
-
}),
|
|
1829
|
-
const e =
|
|
1949
|
+
}), bt = () => {
|
|
1950
|
+
const e = g.useContext(Zr);
|
|
1830
1951
|
if (!e)
|
|
1831
1952
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1832
1953
|
return e;
|
|
1833
1954
|
};
|
|
1834
|
-
|
|
1835
|
-
const
|
|
1836
|
-
function
|
|
1955
|
+
Zi("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");
|
|
1956
|
+
const eo = typeof window < "u" ? ga : be;
|
|
1957
|
+
function Pt(...e) {
|
|
1837
1958
|
return (...t) => {
|
|
1838
1959
|
for (let n of e)
|
|
1839
1960
|
typeof n == "function" && n(...t);
|
|
1840
1961
|
};
|
|
1841
1962
|
}
|
|
1842
|
-
function
|
|
1843
|
-
return
|
|
1963
|
+
function el() {
|
|
1964
|
+
return Xt(/^Mac/);
|
|
1844
1965
|
}
|
|
1845
|
-
function
|
|
1846
|
-
return
|
|
1966
|
+
function tl() {
|
|
1967
|
+
return Xt(/^iPhone/);
|
|
1847
1968
|
}
|
|
1848
|
-
function
|
|
1849
|
-
return
|
|
1850
|
-
|
|
1969
|
+
function nl() {
|
|
1970
|
+
return Xt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1971
|
+
el() && navigator.maxTouchPoints > 1;
|
|
1851
1972
|
}
|
|
1852
|
-
function
|
|
1853
|
-
return
|
|
1973
|
+
function to() {
|
|
1974
|
+
return tl() || nl();
|
|
1854
1975
|
}
|
|
1855
|
-
function
|
|
1976
|
+
function Xt(e) {
|
|
1856
1977
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1857
1978
|
}
|
|
1858
|
-
const
|
|
1859
|
-
function
|
|
1979
|
+
const Et = typeof document < "u" && window.visualViewport;
|
|
1980
|
+
function xn(e) {
|
|
1860
1981
|
let t = window.getComputedStyle(e);
|
|
1861
1982
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
1862
1983
|
}
|
|
1863
|
-
function
|
|
1864
|
-
for (
|
|
1984
|
+
function no(e) {
|
|
1985
|
+
for (xn(e) && (e = e.parentElement); e && !xn(e); )
|
|
1865
1986
|
e = e.parentElement;
|
|
1866
1987
|
return e || document.scrollingElement || document.documentElement;
|
|
1867
1988
|
}
|
|
1868
|
-
const
|
|
1989
|
+
const rl = /* @__PURE__ */ new Set([
|
|
1869
1990
|
"checkbox",
|
|
1870
1991
|
"radio",
|
|
1871
1992
|
"range",
|
|
@@ -1876,113 +1997,113 @@ const Zi = /* @__PURE__ */ new Set([
|
|
|
1876
1997
|
"submit",
|
|
1877
1998
|
"reset"
|
|
1878
1999
|
]);
|
|
1879
|
-
let
|
|
1880
|
-
function
|
|
2000
|
+
let dt = 0, Ct;
|
|
2001
|
+
function ol(e = {}) {
|
|
1881
2002
|
let { isDisabled: t } = e;
|
|
1882
|
-
|
|
2003
|
+
eo(() => {
|
|
1883
2004
|
if (!t)
|
|
1884
|
-
return
|
|
1885
|
-
|
|
2005
|
+
return dt++, dt === 1 && (to() ? Ct = sl() : Ct = al()), () => {
|
|
2006
|
+
dt--, dt === 0 && Ct();
|
|
1886
2007
|
};
|
|
1887
2008
|
}, [
|
|
1888
2009
|
t
|
|
1889
2010
|
]);
|
|
1890
2011
|
}
|
|
1891
|
-
function
|
|
1892
|
-
return
|
|
2012
|
+
function al() {
|
|
2013
|
+
return Pt(ro(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1893
2014
|
}
|
|
1894
|
-
function
|
|
1895
|
-
let e, t = 0, n = (
|
|
1896
|
-
e =
|
|
1897
|
-
}, r = (
|
|
2015
|
+
function sl() {
|
|
2016
|
+
let e, t = 0, n = (c) => {
|
|
2017
|
+
e = no(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
|
|
2018
|
+
}, r = (c) => {
|
|
1898
2019
|
if (!e || e === document.documentElement || e === document.body) {
|
|
1899
|
-
|
|
2020
|
+
c.preventDefault();
|
|
1900
2021
|
return;
|
|
1901
2022
|
}
|
|
1902
|
-
let d =
|
|
1903
|
-
|
|
1904
|
-
}, a = (
|
|
1905
|
-
let d =
|
|
1906
|
-
|
|
2023
|
+
let d = c.changedTouches[0].pageY, f = e.scrollTop, y = e.scrollHeight - e.clientHeight;
|
|
2024
|
+
y !== 0 && ((f <= 0 && d > t || f >= y && d < t) && c.preventDefault(), t = d);
|
|
2025
|
+
}, a = (c) => {
|
|
2026
|
+
let d = c.target;
|
|
2027
|
+
Tt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
|
|
1907
2028
|
d.style.transform = "";
|
|
1908
2029
|
}));
|
|
1909
|
-
},
|
|
1910
|
-
let d =
|
|
1911
|
-
|
|
1912
|
-
d.style.transform = "",
|
|
1913
|
-
|
|
1914
|
-
}) :
|
|
2030
|
+
}, s = (c) => {
|
|
2031
|
+
let d = c.target;
|
|
2032
|
+
Tt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
2033
|
+
d.style.transform = "", Et && (Et.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
2034
|
+
yn(d);
|
|
2035
|
+
}) : Et.addEventListener("resize", () => yn(d), {
|
|
1915
2036
|
once: !0
|
|
1916
2037
|
}));
|
|
1917
2038
|
}));
|
|
1918
|
-
},
|
|
2039
|
+
}, i = () => {
|
|
1919
2040
|
window.scrollTo(0, 0);
|
|
1920
|
-
},
|
|
2041
|
+
}, l = window.pageXOffset, u = window.pageYOffset, v = Pt(ro(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1921
2042
|
window.scrollTo(0, 0);
|
|
1922
|
-
let
|
|
2043
|
+
let m = Pt(Ve(document, "touchstart", n, {
|
|
1923
2044
|
passive: !1,
|
|
1924
2045
|
capture: !0
|
|
1925
|
-
}),
|
|
2046
|
+
}), Ve(document, "touchmove", r, {
|
|
1926
2047
|
passive: !1,
|
|
1927
2048
|
capture: !0
|
|
1928
|
-
}),
|
|
2049
|
+
}), Ve(document, "touchend", a, {
|
|
1929
2050
|
passive: !1,
|
|
1930
2051
|
capture: !0
|
|
1931
|
-
}),
|
|
2052
|
+
}), Ve(document, "focus", s, !0), Ve(window, "scroll", i));
|
|
1932
2053
|
return () => {
|
|
1933
|
-
v(),
|
|
2054
|
+
v(), m(), window.scrollTo(l, u);
|
|
1934
2055
|
};
|
|
1935
2056
|
}
|
|
1936
|
-
function
|
|
2057
|
+
function ro(e, t, n) {
|
|
1937
2058
|
let r = e.style[t];
|
|
1938
2059
|
return e.style[t] = n, () => {
|
|
1939
2060
|
e.style[t] = r;
|
|
1940
2061
|
};
|
|
1941
2062
|
}
|
|
1942
|
-
function
|
|
2063
|
+
function Ve(e, t, n, r) {
|
|
1943
2064
|
return e.addEventListener(t, n, r), () => {
|
|
1944
2065
|
e.removeEventListener(t, n, r);
|
|
1945
2066
|
};
|
|
1946
2067
|
}
|
|
1947
|
-
function
|
|
2068
|
+
function yn(e) {
|
|
1948
2069
|
let t = document.scrollingElement || document.documentElement;
|
|
1949
2070
|
for (; e && e !== t; ) {
|
|
1950
|
-
let n =
|
|
2071
|
+
let n = no(e);
|
|
1951
2072
|
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
1952
|
-
let r = n.getBoundingClientRect().top, a = e.getBoundingClientRect().top,
|
|
1953
|
-
const
|
|
1954
|
-
|
|
2073
|
+
let r = n.getBoundingClientRect().top, a = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
|
|
2074
|
+
const i = n.getBoundingClientRect().bottom;
|
|
2075
|
+
s > i && (n.scrollTop += a - r);
|
|
1955
2076
|
}
|
|
1956
2077
|
e = n.parentElement;
|
|
1957
2078
|
}
|
|
1958
2079
|
}
|
|
1959
|
-
function
|
|
1960
|
-
return e instanceof HTMLInputElement && !
|
|
2080
|
+
function Tt(e) {
|
|
2081
|
+
return e instanceof HTMLInputElement && !rl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1961
2082
|
}
|
|
1962
|
-
function
|
|
2083
|
+
function il(e, t) {
|
|
1963
2084
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1964
2085
|
}
|
|
1965
|
-
function
|
|
1966
|
-
return (t) => e.forEach((n) =>
|
|
2086
|
+
function ll(...e) {
|
|
2087
|
+
return (t) => e.forEach((n) => il(n, t));
|
|
1967
2088
|
}
|
|
1968
|
-
function
|
|
1969
|
-
return
|
|
2089
|
+
function oo(...e) {
|
|
2090
|
+
return h.useCallback(ll(...e), e);
|
|
1970
2091
|
}
|
|
1971
|
-
let
|
|
1972
|
-
function
|
|
1973
|
-
const [
|
|
1974
|
-
if (
|
|
1975
|
-
|
|
2092
|
+
let Qe = null;
|
|
2093
|
+
function cl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: a, noBodyStyles: s }) {
|
|
2094
|
+
const [i, l] = g.useState(() => typeof window < "u" ? window.location.href : ""), u = g.useRef(0), v = g.useCallback(() => {
|
|
2095
|
+
if (Qe === null && e && !s) {
|
|
2096
|
+
Qe = {
|
|
1976
2097
|
position: document.body.style.position,
|
|
1977
2098
|
top: document.body.style.top,
|
|
1978
2099
|
left: document.body.style.left,
|
|
1979
2100
|
height: document.body.style.height,
|
|
1980
2101
|
right: "unset"
|
|
1981
2102
|
};
|
|
1982
|
-
const { scrollX:
|
|
2103
|
+
const { scrollX: c, innerHeight: d } = window;
|
|
1983
2104
|
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
1984
2105
|
top: `${-u.current}px`,
|
|
1985
|
-
left: `${-
|
|
2106
|
+
left: `${-c}px`,
|
|
1986
2107
|
right: "0px",
|
|
1987
2108
|
height: "auto"
|
|
1988
2109
|
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
@@ -1992,58 +2113,58 @@ function oc({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
1992
2113
|
}
|
|
1993
2114
|
}, [
|
|
1994
2115
|
e
|
|
1995
|
-
]),
|
|
1996
|
-
if (
|
|
1997
|
-
const
|
|
1998
|
-
Object.assign(document.body.style,
|
|
1999
|
-
if (a &&
|
|
2000
|
-
|
|
2116
|
+
]), m = g.useCallback(() => {
|
|
2117
|
+
if (Qe !== null && !s) {
|
|
2118
|
+
const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
|
|
2119
|
+
Object.assign(document.body.style, Qe), window.requestAnimationFrame(() => {
|
|
2120
|
+
if (a && i !== window.location.href) {
|
|
2121
|
+
l(window.location.href);
|
|
2001
2122
|
return;
|
|
2002
2123
|
}
|
|
2003
|
-
window.scrollTo(d,
|
|
2004
|
-
}),
|
|
2124
|
+
window.scrollTo(d, c);
|
|
2125
|
+
}), Qe = null;
|
|
2005
2126
|
}
|
|
2006
2127
|
}, [
|
|
2007
|
-
|
|
2128
|
+
i
|
|
2008
2129
|
]);
|
|
2009
|
-
return
|
|
2010
|
-
function
|
|
2130
|
+
return g.useEffect(() => {
|
|
2131
|
+
function c() {
|
|
2011
2132
|
u.current = window.scrollY;
|
|
2012
2133
|
}
|
|
2013
|
-
return
|
|
2014
|
-
window.removeEventListener("scroll",
|
|
2134
|
+
return c(), window.addEventListener("scroll", c), () => {
|
|
2135
|
+
window.removeEventListener("scroll", c);
|
|
2015
2136
|
};
|
|
2016
|
-
}, []),
|
|
2137
|
+
}, []), g.useEffect(() => {
|
|
2017
2138
|
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && v(), t || window.setTimeout(() => {
|
|
2018
|
-
|
|
2019
|
-
}, 500)) :
|
|
2139
|
+
m();
|
|
2140
|
+
}, 500)) : m());
|
|
2020
2141
|
}, [
|
|
2021
2142
|
e,
|
|
2022
2143
|
r,
|
|
2023
|
-
|
|
2144
|
+
i,
|
|
2024
2145
|
t,
|
|
2025
2146
|
n,
|
|
2026
2147
|
v,
|
|
2027
|
-
|
|
2148
|
+
m
|
|
2028
2149
|
]), {
|
|
2029
|
-
restorePositionSetting:
|
|
2150
|
+
restorePositionSetting: m
|
|
2030
2151
|
};
|
|
2031
2152
|
}
|
|
2032
|
-
const
|
|
2033
|
-
function
|
|
2153
|
+
const ao = /* @__PURE__ */ new WeakMap();
|
|
2154
|
+
function I(e, t, n = !1) {
|
|
2034
2155
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2035
2156
|
let r = {};
|
|
2036
|
-
Object.entries(t).forEach(([a,
|
|
2157
|
+
Object.entries(t).forEach(([a, s]) => {
|
|
2037
2158
|
if (a.startsWith("--")) {
|
|
2038
|
-
e.style.setProperty(a,
|
|
2159
|
+
e.style.setProperty(a, s);
|
|
2039
2160
|
return;
|
|
2040
2161
|
}
|
|
2041
|
-
r[a] = e.style[a], e.style[a] =
|
|
2042
|
-
}), !n &&
|
|
2162
|
+
r[a] = e.style[a], e.style[a] = s;
|
|
2163
|
+
}), !n && ao.set(e, r);
|
|
2043
2164
|
}
|
|
2044
|
-
function
|
|
2165
|
+
function ft(e, t) {
|
|
2045
2166
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2046
|
-
let n =
|
|
2167
|
+
let n = ao.get(e);
|
|
2047
2168
|
n && (t ? e.style[t] = n[t] : Object.entries(n).forEach(([r, a]) => {
|
|
2048
2169
|
e.style[r] = a;
|
|
2049
2170
|
}));
|
|
@@ -2060,7 +2181,7 @@ const z = (e) => {
|
|
|
2060
2181
|
return e;
|
|
2061
2182
|
}
|
|
2062
2183
|
};
|
|
2063
|
-
function
|
|
2184
|
+
function ht(e, t) {
|
|
2064
2185
|
if (!e)
|
|
2065
2186
|
return null;
|
|
2066
2187
|
const n = window.getComputedStyle(e), r = (
|
|
@@ -2070,10 +2191,10 @@ function dt(e, t) {
|
|
|
2070
2191
|
let a = r.match(/^matrix3d\((.+)\)$/);
|
|
2071
2192
|
return a ? parseFloat(a[1].split(", ")[z(t) ? 13 : 12]) : (a = r.match(/^matrix\((.+)\)$/), a ? parseFloat(a[1].split(", ")[z(t) ? 5 : 4]) : null);
|
|
2072
2193
|
}
|
|
2073
|
-
function
|
|
2194
|
+
function ul(e) {
|
|
2074
2195
|
return 8 * (Math.log(e + 1) - 2);
|
|
2075
2196
|
}
|
|
2076
|
-
const
|
|
2197
|
+
const T = {
|
|
2077
2198
|
DURATION: 0.5,
|
|
2078
2199
|
EASE: [
|
|
2079
2200
|
0.32,
|
|
@@ -2081,155 +2202,155 @@ const _ = {
|
|
|
2081
2202
|
0,
|
|
2082
2203
|
1
|
|
2083
2204
|
]
|
|
2084
|
-
},
|
|
2085
|
-
function
|
|
2086
|
-
const t =
|
|
2087
|
-
return
|
|
2205
|
+
}, so = 0.4;
|
|
2206
|
+
function io(e) {
|
|
2207
|
+
const t = g.useRef(e);
|
|
2208
|
+
return g.useEffect(() => {
|
|
2088
2209
|
t.current = e;
|
|
2089
|
-
}),
|
|
2210
|
+
}), g.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
2090
2211
|
}
|
|
2091
|
-
function
|
|
2092
|
-
const n =
|
|
2093
|
-
return
|
|
2094
|
-
a.current !== r && (
|
|
2212
|
+
function dl({ defaultProp: e, onChange: t }) {
|
|
2213
|
+
const n = g.useState(e), [r] = n, a = g.useRef(r), s = io(t);
|
|
2214
|
+
return g.useEffect(() => {
|
|
2215
|
+
a.current !== r && (s(r), a.current = r);
|
|
2095
2216
|
}, [
|
|
2096
2217
|
r,
|
|
2097
2218
|
a,
|
|
2098
|
-
|
|
2219
|
+
s
|
|
2099
2220
|
]), n;
|
|
2100
2221
|
}
|
|
2101
|
-
function
|
|
2222
|
+
function fl({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2102
2223
|
} }) {
|
|
2103
|
-
const [r, a] =
|
|
2224
|
+
const [r, a] = dl({
|
|
2104
2225
|
defaultProp: t,
|
|
2105
2226
|
onChange: n
|
|
2106
|
-
}),
|
|
2107
|
-
if (
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2227
|
+
}), s = e !== void 0, i = s ? e : r, l = io(n), u = g.useCallback((v) => {
|
|
2228
|
+
if (s) {
|
|
2229
|
+
const c = typeof v == "function" ? v(e) : v;
|
|
2230
|
+
c !== e && l(c);
|
|
2110
2231
|
} else
|
|
2111
2232
|
a(v);
|
|
2112
2233
|
}, [
|
|
2113
|
-
|
|
2234
|
+
s,
|
|
2114
2235
|
e,
|
|
2115
2236
|
a,
|
|
2116
|
-
|
|
2237
|
+
l
|
|
2117
2238
|
]);
|
|
2118
2239
|
return [
|
|
2119
|
-
|
|
2240
|
+
i,
|
|
2120
2241
|
u
|
|
2121
2242
|
];
|
|
2122
2243
|
}
|
|
2123
|
-
function
|
|
2124
|
-
const [u, v] =
|
|
2244
|
+
function hl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: a, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom" }) {
|
|
2245
|
+
const [u, v] = fl({
|
|
2125
2246
|
prop: e,
|
|
2126
2247
|
defaultProp: n == null ? void 0 : n[0],
|
|
2127
2248
|
onChange: t
|
|
2128
|
-
}),
|
|
2249
|
+
}), m = g.useMemo(() => u === (n == null ? void 0 : n[n.length - 1]) || null, [
|
|
2129
2250
|
n,
|
|
2130
2251
|
u
|
|
2131
|
-
]),
|
|
2252
|
+
]), c = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === u || !n, d = g.useMemo(() => n == null ? void 0 : n.findIndex((x) => x === u), [
|
|
2132
2253
|
n,
|
|
2133
2254
|
u
|
|
2134
|
-
]), f =
|
|
2135
|
-
var
|
|
2136
|
-
return (
|
|
2137
|
-
const
|
|
2138
|
-
let
|
|
2139
|
-
if (
|
|
2140
|
-
const w =
|
|
2141
|
-
return
|
|
2255
|
+
]), f = g.useMemo(() => {
|
|
2256
|
+
var x;
|
|
2257
|
+
return (x = n == null ? void 0 : n.map((p) => {
|
|
2258
|
+
const C = typeof window < "u", N = typeof p == "string";
|
|
2259
|
+
let P = 0;
|
|
2260
|
+
if (N && (P = parseInt(p, 10)), z(l)) {
|
|
2261
|
+
const w = N ? P : C ? p * window.innerHeight : 0;
|
|
2262
|
+
return C ? l === "bottom" ? window.innerHeight - w : -window.innerHeight + w : w;
|
|
2142
2263
|
}
|
|
2143
|
-
const
|
|
2144
|
-
return
|
|
2145
|
-
})) != null ?
|
|
2264
|
+
const _ = N ? P : C ? p * window.innerWidth : 0;
|
|
2265
|
+
return C ? l === "right" ? window.innerWidth - _ : -window.innerWidth + _ : _;
|
|
2266
|
+
})) != null ? x : [];
|
|
2146
2267
|
}, [
|
|
2147
2268
|
n
|
|
2148
|
-
]),
|
|
2269
|
+
]), y = g.useMemo(() => d !== null ? f == null ? void 0 : f[d] : null, [
|
|
2149
2270
|
f,
|
|
2150
2271
|
d
|
|
2151
|
-
]),
|
|
2152
|
-
var
|
|
2153
|
-
const
|
|
2154
|
-
|
|
2155
|
-
transition: `transform ${
|
|
2156
|
-
transform: z(
|
|
2157
|
-
}), f &&
|
|
2158
|
-
transition: `opacity ${
|
|
2272
|
+
]), R = g.useCallback((x) => {
|
|
2273
|
+
var p;
|
|
2274
|
+
const C = (p = f == null ? void 0 : f.findIndex((N) => N === x)) != null ? p : null;
|
|
2275
|
+
i(C), I(r.current, {
|
|
2276
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2277
|
+
transform: z(l) ? `translate3d(0, ${x}px, 0)` : `translate3d(${x}px, 0, 0)`
|
|
2278
|
+
}), f && C !== f.length - 1 && C !== s ? I(a.current, {
|
|
2279
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2159
2280
|
opacity: "0"
|
|
2160
|
-
}) :
|
|
2161
|
-
transition: `opacity ${
|
|
2281
|
+
}) : I(a.current, {
|
|
2282
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2162
2283
|
opacity: "1"
|
|
2163
|
-
}), v(
|
|
2284
|
+
}), v(C !== null ? n == null ? void 0 : n[C] : null);
|
|
2164
2285
|
}, [
|
|
2165
2286
|
r.current,
|
|
2166
2287
|
n,
|
|
2167
2288
|
f,
|
|
2168
|
-
|
|
2289
|
+
s,
|
|
2169
2290
|
a,
|
|
2170
2291
|
v
|
|
2171
2292
|
]);
|
|
2172
|
-
|
|
2293
|
+
g.useEffect(() => {
|
|
2173
2294
|
if (u || e) {
|
|
2174
|
-
var
|
|
2175
|
-
const
|
|
2176
|
-
f &&
|
|
2295
|
+
var x;
|
|
2296
|
+
const p = (x = n == null ? void 0 : n.findIndex((C) => C === e || C === u)) != null ? x : -1;
|
|
2297
|
+
f && p !== -1 && typeof f[p] == "number" && R(f[p]);
|
|
2177
2298
|
}
|
|
2178
2299
|
}, [
|
|
2179
2300
|
u,
|
|
2180
2301
|
e,
|
|
2181
2302
|
n,
|
|
2182
2303
|
f,
|
|
2183
|
-
|
|
2304
|
+
R
|
|
2184
2305
|
]);
|
|
2185
|
-
function K({ draggedDistance:
|
|
2186
|
-
if (
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2189
|
-
transition: `opacity ${
|
|
2190
|
-
}),
|
|
2191
|
-
|
|
2306
|
+
function K({ draggedDistance: x, closeDrawer: p, velocity: C, dismissible: N }) {
|
|
2307
|
+
if (s === void 0) return;
|
|
2308
|
+
const P = l === "bottom" || l === "right" ? (y ?? 0) - x : (y ?? 0) + x, _ = d === s - 1, w = d === 0, L = x > 0;
|
|
2309
|
+
if (_ && I(a.current, {
|
|
2310
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2311
|
+
}), C > 2 && !L) {
|
|
2312
|
+
N ? p() : R(f[0]);
|
|
2192
2313
|
return;
|
|
2193
2314
|
}
|
|
2194
|
-
if (
|
|
2195
|
-
|
|
2315
|
+
if (C > 2 && L && f && n) {
|
|
2316
|
+
R(f[n.length - 1]);
|
|
2196
2317
|
return;
|
|
2197
2318
|
}
|
|
2198
|
-
const
|
|
2199
|
-
if (
|
|
2200
|
-
const
|
|
2201
|
-
if (
|
|
2202
|
-
|
|
2319
|
+
const te = f == null ? void 0 : f.reduce((q, X) => typeof q != "number" || typeof X != "number" ? q : Math.abs(X - P) < Math.abs(q - P) ? X : q), V = z(l) ? window.innerHeight : window.innerWidth;
|
|
2320
|
+
if (C > so && Math.abs(x) < V * 0.4) {
|
|
2321
|
+
const q = L ? 1 : -1;
|
|
2322
|
+
if (q > 0 && m) {
|
|
2323
|
+
R(f[n.length - 1]);
|
|
2203
2324
|
return;
|
|
2204
2325
|
}
|
|
2205
|
-
if (w &&
|
|
2206
|
-
|
|
2326
|
+
if (w && q < 0 && N && p(), d === null) return;
|
|
2327
|
+
R(f[d + q]);
|
|
2207
2328
|
return;
|
|
2208
2329
|
}
|
|
2209
|
-
|
|
2330
|
+
R(te);
|
|
2210
2331
|
}
|
|
2211
|
-
function H({ draggedDistance:
|
|
2212
|
-
if (
|
|
2213
|
-
const
|
|
2214
|
-
(
|
|
2215
|
-
transform: z(
|
|
2332
|
+
function H({ draggedDistance: x }) {
|
|
2333
|
+
if (y === null) return;
|
|
2334
|
+
const p = l === "bottom" || l === "right" ? y - x : y + x;
|
|
2335
|
+
(l === "bottom" || l === "right") && p < f[f.length - 1] || (l === "top" || l === "left") && p > f[f.length - 1] || I(r.current, {
|
|
2336
|
+
transform: z(l) ? `translate3d(0, ${p}px, 0)` : `translate3d(${p}px, 0, 0)`
|
|
2216
2337
|
});
|
|
2217
2338
|
}
|
|
2218
|
-
function
|
|
2219
|
-
if (!n || typeof d != "number" || !f ||
|
|
2220
|
-
const
|
|
2221
|
-
if (d >=
|
|
2339
|
+
function Q(x, p) {
|
|
2340
|
+
if (!n || typeof d != "number" || !f || s === void 0) return null;
|
|
2341
|
+
const C = d === s - 1;
|
|
2342
|
+
if (d >= s && p)
|
|
2222
2343
|
return 0;
|
|
2223
|
-
if (
|
|
2224
|
-
if (!
|
|
2225
|
-
const
|
|
2226
|
-
return
|
|
2344
|
+
if (C && !p) return 1;
|
|
2345
|
+
if (!c && !C) return null;
|
|
2346
|
+
const P = C ? d + 1 : d - 1, _ = C ? f[P] - f[P - 1] : f[P + 1] - f[P], w = x / Math.abs(_);
|
|
2347
|
+
return C ? 1 - w : w;
|
|
2227
2348
|
}
|
|
2228
2349
|
return {
|
|
2229
|
-
isLastSnapPoint:
|
|
2350
|
+
isLastSnapPoint: m,
|
|
2230
2351
|
activeSnapPoint: u,
|
|
2231
|
-
shouldFade:
|
|
2232
|
-
getPercentageDragged:
|
|
2352
|
+
shouldFade: c,
|
|
2353
|
+
getPercentageDragged: Q,
|
|
2233
2354
|
setActiveSnapPoint: v,
|
|
2234
2355
|
activeSnapPointIndex: d,
|
|
2235
2356
|
onRelease: K,
|
|
@@ -2237,399 +2358,399 @@ function lc({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2237
2358
|
snapPointsOffset: f
|
|
2238
2359
|
};
|
|
2239
2360
|
}
|
|
2240
|
-
const
|
|
2241
|
-
function
|
|
2242
|
-
var
|
|
2243
|
-
const [
|
|
2244
|
-
|
|
2245
|
-
}, []), { activeSnapPoint:
|
|
2246
|
-
snapPoints:
|
|
2247
|
-
activeSnapPointProp:
|
|
2248
|
-
setActiveSnapPointProp:
|
|
2249
|
-
drawerRef:
|
|
2361
|
+
const pl = 0.25, ml = 100, Mn = 8, Pe = 16, Sn = 26, Rt = "vaul-dragging";
|
|
2362
|
+
function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, onDrag: a, onRelease: s, snapPoints: i, nested: l = !1, setBackgroundColorOnScale: u = !0, closeThreshold: v = pl, scrollLockTimeout: m = ml, dismissible: c = !0, handleOnly: d = !1, fadeFromIndex: f = i && i.length - 1, activeSnapPoint: y, setActiveSnapPoint: R, fixed: K, modal: H = !0, onClose: Q, noBodyStyles: x, direction: p = "bottom", preventScrollRestoration: C = !0, disablePreventScroll: N = !1 }) {
|
|
2363
|
+
var P;
|
|
2364
|
+
const [_ = !1, w] = g.useState(!1), [L, te] = g.useState(!1), [V, q] = g.useState(!1), [X, Ie] = g.useState(!1), [he, ze] = g.useState(!1), [ye, E] = g.useState(!1), U = g.useRef(null), Y = g.useRef(null), ne = g.useRef(null), je = g.useRef(null), pe = g.useRef(null), Me = g.useRef(!1), me = g.useRef(null), le = g.useRef(0), ge = g.useRef(!1), re = g.useRef(0), M = g.useRef(null), tn = g.useRef(((P = M.current) == null ? void 0 : P.getBoundingClientRect().height) || 0), xt = g.useRef(0), yo = g.useCallback((S) => {
|
|
2365
|
+
i && S === qe.length - 1 && (Y.current = /* @__PURE__ */ new Date());
|
|
2366
|
+
}, []), { activeSnapPoint: Mo, activeSnapPointIndex: Ke, setActiveSnapPoint: nn, onRelease: So, snapPointsOffset: qe, onDrag: Eo, shouldFade: rn, getPercentageDragged: Co } = hl({
|
|
2367
|
+
snapPoints: i,
|
|
2368
|
+
activeSnapPointProp: y,
|
|
2369
|
+
setActiveSnapPointProp: R,
|
|
2370
|
+
drawerRef: M,
|
|
2250
2371
|
fadeFromIndex: f,
|
|
2251
2372
|
overlayRef: U,
|
|
2252
|
-
onSnapPointChange:
|
|
2253
|
-
direction:
|
|
2373
|
+
onSnapPointChange: yo,
|
|
2374
|
+
direction: p
|
|
2254
2375
|
});
|
|
2255
|
-
|
|
2256
|
-
isDisabled: !
|
|
2376
|
+
ol({
|
|
2377
|
+
isDisabled: !_ || he || !H || ye || !L || N
|
|
2257
2378
|
});
|
|
2258
|
-
const { restorePositionSetting:
|
|
2259
|
-
isOpen:
|
|
2379
|
+
const { restorePositionSetting: Ro } = cl({
|
|
2380
|
+
isOpen: _,
|
|
2260
2381
|
modal: H,
|
|
2261
|
-
nested:
|
|
2262
|
-
hasBeenOpened:
|
|
2263
|
-
preventScrollRestoration:
|
|
2264
|
-
noBodyStyles:
|
|
2382
|
+
nested: l,
|
|
2383
|
+
hasBeenOpened: L,
|
|
2384
|
+
preventScrollRestoration: C,
|
|
2385
|
+
noBodyStyles: x
|
|
2265
2386
|
});
|
|
2266
|
-
function
|
|
2267
|
-
return (window.innerWidth -
|
|
2387
|
+
function Ae() {
|
|
2388
|
+
return (window.innerWidth - Sn) / window.innerWidth;
|
|
2268
2389
|
}
|
|
2269
|
-
function
|
|
2390
|
+
function Do(S) {
|
|
2270
2391
|
var D;
|
|
2271
|
-
!
|
|
2392
|
+
!c && !i || M.current && !M.current.contains(S.target) || (tn.current = ((D = M.current) == null ? void 0 : D.getBoundingClientRect().height) || 0, ze(!0), ne.current = /* @__PURE__ */ new Date(), to() && window.addEventListener("touchend", () => Me.current = !1, {
|
|
2272
2393
|
once: !0
|
|
2273
|
-
}),
|
|
2394
|
+
}), S.target.setPointerCapture(S.pointerId), le.current = z(p) ? S.clientY : S.clientX);
|
|
2274
2395
|
}
|
|
2275
|
-
function
|
|
2276
|
-
var
|
|
2277
|
-
let
|
|
2278
|
-
const F = (
|
|
2279
|
-
if (
|
|
2396
|
+
function on(S, D) {
|
|
2397
|
+
var k;
|
|
2398
|
+
let j = S;
|
|
2399
|
+
const F = (k = window.getSelection()) == null ? void 0 : k.toString(), B = M.current ? ht(M.current, p) : null, oe = /* @__PURE__ */ new Date();
|
|
2400
|
+
if (j.hasAttribute("data-vaul-no-drag") || j.closest("[data-vaul-no-drag]"))
|
|
2280
2401
|
return !1;
|
|
2281
|
-
if (
|
|
2402
|
+
if (p === "right" || p === "left")
|
|
2282
2403
|
return !0;
|
|
2283
|
-
if (Y.current &&
|
|
2404
|
+
if (Y.current && oe.getTime() - Y.current.getTime() < 500)
|
|
2284
2405
|
return !1;
|
|
2285
|
-
if (B !== null && (
|
|
2406
|
+
if (B !== null && (p === "bottom" ? B > 0 : B < 0))
|
|
2286
2407
|
return !0;
|
|
2287
2408
|
if (F && F.length > 0)
|
|
2288
2409
|
return !1;
|
|
2289
|
-
if (
|
|
2290
|
-
return
|
|
2291
|
-
for (;
|
|
2292
|
-
if (
|
|
2293
|
-
if (
|
|
2294
|
-
return
|
|
2295
|
-
if (
|
|
2410
|
+
if (pe.current && oe.getTime() - pe.current.getTime() < m && B === 0 || D)
|
|
2411
|
+
return pe.current = oe, !1;
|
|
2412
|
+
for (; j; ) {
|
|
2413
|
+
if (j.scrollHeight > j.clientHeight) {
|
|
2414
|
+
if (j.scrollTop !== 0)
|
|
2415
|
+
return pe.current = /* @__PURE__ */ new Date(), !1;
|
|
2416
|
+
if (j.getAttribute("role") === "dialog")
|
|
2296
2417
|
return !0;
|
|
2297
2418
|
}
|
|
2298
|
-
|
|
2419
|
+
j = j.parentNode;
|
|
2299
2420
|
}
|
|
2300
2421
|
return !0;
|
|
2301
2422
|
}
|
|
2302
|
-
function
|
|
2303
|
-
if (
|
|
2304
|
-
const D =
|
|
2305
|
-
if (F &&
|
|
2306
|
-
const B = Math.abs(
|
|
2307
|
-
let ce = B /
|
|
2308
|
-
const
|
|
2309
|
-
if (
|
|
2310
|
-
if (
|
|
2423
|
+
function jo(S) {
|
|
2424
|
+
if (M.current && he) {
|
|
2425
|
+
const D = p === "bottom" || p === "right" ? 1 : -1, k = (le.current - (z(p) ? S.clientY : S.clientX)) * D, j = k > 0, F = i && !c && !j;
|
|
2426
|
+
if (F && Ke === 0) return;
|
|
2427
|
+
const B = Math.abs(k), oe = document.querySelector("[vaul-drawer-wrapper]");
|
|
2428
|
+
let ce = B / tn.current;
|
|
2429
|
+
const Se = Co(B, j);
|
|
2430
|
+
if (Se !== null && (ce = Se), F && ce >= 1 || !Me.current && !on(S.target, j)) return;
|
|
2431
|
+
if (M.current.classList.add(Rt), Me.current = !0, I(M.current, {
|
|
2311
2432
|
transition: "none"
|
|
2312
|
-
}),
|
|
2433
|
+
}), I(U.current, {
|
|
2313
2434
|
transition: "none"
|
|
2314
|
-
}),
|
|
2315
|
-
draggedDistance:
|
|
2316
|
-
}),
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2319
|
-
transform: z(
|
|
2435
|
+
}), i && Eo({
|
|
2436
|
+
draggedDistance: k
|
|
2437
|
+
}), j && !i) {
|
|
2438
|
+
const Ne = ul(k), it = Math.min(Ne * -1, 0) * D;
|
|
2439
|
+
I(M.current, {
|
|
2440
|
+
transform: z(p) ? `translate3d(0, ${it}px, 0)` : `translate3d(${it}px, 0, 0)`
|
|
2320
2441
|
});
|
|
2321
2442
|
return;
|
|
2322
2443
|
}
|
|
2323
|
-
const
|
|
2324
|
-
if ((
|
|
2325
|
-
opacity: `${
|
|
2444
|
+
const st = 1 - ce;
|
|
2445
|
+
if ((rn || f && Ke === f - 1) && (a == null || a(S, ce), I(U.current, {
|
|
2446
|
+
opacity: `${st}`,
|
|
2326
2447
|
transition: "none"
|
|
2327
|
-
}, !0)),
|
|
2328
|
-
const
|
|
2329
|
-
|
|
2330
|
-
borderRadius: `${
|
|
2331
|
-
transform: z(
|
|
2448
|
+
}, !0)), oe && U.current && r) {
|
|
2449
|
+
const Ne = Math.min(Ae() + ce * (1 - Ae()), 1), it = 8 - ce * 8, sn = Math.max(0, 14 - ce * 14);
|
|
2450
|
+
I(oe, {
|
|
2451
|
+
borderRadius: `${it}px`,
|
|
2452
|
+
transform: z(p) ? `scale(${Ne}) translate3d(0, ${sn}px, 0)` : `scale(${Ne}) translate3d(${sn}px, 0, 0)`,
|
|
2332
2453
|
transition: "none"
|
|
2333
2454
|
}, !0);
|
|
2334
2455
|
}
|
|
2335
|
-
if (!
|
|
2336
|
-
const
|
|
2337
|
-
|
|
2338
|
-
transform: z(
|
|
2456
|
+
if (!i) {
|
|
2457
|
+
const Ne = B * D;
|
|
2458
|
+
I(M.current, {
|
|
2459
|
+
transform: z(p) ? `translate3d(0, ${Ne}px, 0)` : `translate3d(${Ne}px, 0, 0)`
|
|
2339
2460
|
});
|
|
2340
2461
|
}
|
|
2341
2462
|
}
|
|
2342
2463
|
}
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
}, []),
|
|
2346
|
-
var
|
|
2464
|
+
g.useEffect(() => () => {
|
|
2465
|
+
at(!1), Ro();
|
|
2466
|
+
}, []), g.useEffect(() => {
|
|
2467
|
+
var S;
|
|
2347
2468
|
function D() {
|
|
2348
|
-
if (!
|
|
2349
|
-
const
|
|
2350
|
-
if (
|
|
2351
|
-
var
|
|
2352
|
-
const F = ((
|
|
2469
|
+
if (!M.current) return;
|
|
2470
|
+
const k = document.activeElement;
|
|
2471
|
+
if (Tt(k) || ge.current) {
|
|
2472
|
+
var j;
|
|
2473
|
+
const F = ((j = window.visualViewport) == null ? void 0 : j.height) || 0;
|
|
2353
2474
|
let B = window.innerHeight - F;
|
|
2354
|
-
const
|
|
2355
|
-
|
|
2356
|
-
const ce =
|
|
2357
|
-
if (Math.abs(
|
|
2358
|
-
const
|
|
2359
|
-
B +=
|
|
2475
|
+
const oe = M.current.getBoundingClientRect().height || 0;
|
|
2476
|
+
xt.current || (xt.current = oe);
|
|
2477
|
+
const ce = M.current.getBoundingClientRect().top;
|
|
2478
|
+
if (Math.abs(re.current - B) > 60 && (ge.current = !ge.current), i && i.length > 0 && qe && Ke) {
|
|
2479
|
+
const Se = qe[Ke] || 0;
|
|
2480
|
+
B += Se;
|
|
2360
2481
|
}
|
|
2361
|
-
if (
|
|
2362
|
-
const
|
|
2363
|
-
let
|
|
2364
|
-
|
|
2482
|
+
if (re.current = B, oe > F || ge.current) {
|
|
2483
|
+
const Se = M.current.getBoundingClientRect().height;
|
|
2484
|
+
let st = Se;
|
|
2485
|
+
Se > F && (st = F - Sn), K ? M.current.style.height = `${Se - Math.max(B, 0)}px` : M.current.style.height = `${Math.max(st, F - ce)}px`;
|
|
2365
2486
|
} else
|
|
2366
|
-
|
|
2367
|
-
|
|
2487
|
+
M.current.style.height = `${xt.current}px`;
|
|
2488
|
+
i && i.length > 0 && !ge.current ? M.current.style.bottom = "0px" : M.current.style.bottom = `${Math.max(B, 0)}px`;
|
|
2368
2489
|
}
|
|
2369
2490
|
}
|
|
2370
|
-
return (
|
|
2371
|
-
var
|
|
2372
|
-
return (
|
|
2491
|
+
return (S = window.visualViewport) == null || S.addEventListener("resize", D), () => {
|
|
2492
|
+
var k;
|
|
2493
|
+
return (k = window.visualViewport) == null ? void 0 : k.removeEventListener("resize", D);
|
|
2373
2494
|
};
|
|
2374
2495
|
}, [
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2496
|
+
Ke,
|
|
2497
|
+
i,
|
|
2498
|
+
qe
|
|
2378
2499
|
]);
|
|
2379
|
-
function
|
|
2380
|
-
|
|
2381
|
-
transform: z(
|
|
2382
|
-
transition: `transform ${
|
|
2383
|
-
}),
|
|
2500
|
+
function ke() {
|
|
2501
|
+
M.current && (No(), Q == null || Q(), I(M.current, {
|
|
2502
|
+
transform: z(p) ? `translate3d(0, ${p === "bottom" ? "100%" : "-100%"}, 0)` : `translate3d(${p === "right" ? "100%" : "-100%"}, 0, 0)`,
|
|
2503
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2504
|
+
}), I(U.current, {
|
|
2384
2505
|
opacity: "0",
|
|
2385
|
-
transition: `opacity ${
|
|
2386
|
-
}),
|
|
2387
|
-
|
|
2506
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2507
|
+
}), at(!1), setTimeout(() => {
|
|
2508
|
+
q(!1), w(!1);
|
|
2388
2509
|
}, 300), setTimeout(() => {
|
|
2389
|
-
|
|
2390
|
-
},
|
|
2510
|
+
i && nn(i[0]);
|
|
2511
|
+
}, T.DURATION * 1e3));
|
|
2391
2512
|
}
|
|
2392
|
-
|
|
2393
|
-
if (!
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2513
|
+
g.useEffect(() => {
|
|
2514
|
+
if (!_ && r) {
|
|
2515
|
+
const S = setTimeout(() => {
|
|
2516
|
+
ft(document.body);
|
|
2396
2517
|
}, 200);
|
|
2397
|
-
return () => clearTimeout(
|
|
2518
|
+
return () => clearTimeout(S);
|
|
2398
2519
|
}
|
|
2399
2520
|
}, [
|
|
2400
|
-
|
|
2521
|
+
_,
|
|
2401
2522
|
r
|
|
2402
|
-
]),
|
|
2403
|
-
e ? (w(!0),
|
|
2523
|
+
]), eo(() => {
|
|
2524
|
+
e ? (w(!0), te(!0)) : ke();
|
|
2404
2525
|
}, [
|
|
2405
2526
|
e
|
|
2406
|
-
]),
|
|
2407
|
-
X && (t == null || t(
|
|
2527
|
+
]), g.useEffect(() => {
|
|
2528
|
+
X && (t == null || t(_));
|
|
2408
2529
|
}, [
|
|
2409
|
-
|
|
2410
|
-
]),
|
|
2411
|
-
|
|
2530
|
+
_
|
|
2531
|
+
]), g.useEffect(() => {
|
|
2532
|
+
Ie(!0);
|
|
2412
2533
|
}, []);
|
|
2413
|
-
function
|
|
2414
|
-
if (!
|
|
2415
|
-
const
|
|
2416
|
-
|
|
2534
|
+
function an() {
|
|
2535
|
+
if (!M.current) return;
|
|
2536
|
+
const S = document.querySelector("[vaul-drawer-wrapper]"), D = ht(M.current, p);
|
|
2537
|
+
I(M.current, {
|
|
2417
2538
|
transform: "translate3d(0, 0, 0)",
|
|
2418
|
-
transition: `transform ${
|
|
2419
|
-
}),
|
|
2420
|
-
transition: `opacity ${
|
|
2539
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2540
|
+
}), I(U.current, {
|
|
2541
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2421
2542
|
opacity: "1"
|
|
2422
|
-
}), r && D && D > 0 &&
|
|
2423
|
-
borderRadius: `${
|
|
2543
|
+
}), r && D && D > 0 && _ && I(S, {
|
|
2544
|
+
borderRadius: `${Mn}px`,
|
|
2424
2545
|
overflow: "hidden",
|
|
2425
|
-
...z(
|
|
2426
|
-
transform: `scale(${
|
|
2546
|
+
...z(p) ? {
|
|
2547
|
+
transform: `scale(${Ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2427
2548
|
transformOrigin: "top"
|
|
2428
2549
|
} : {
|
|
2429
|
-
transform: `scale(${
|
|
2550
|
+
transform: `scale(${Ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2430
2551
|
transformOrigin: "left"
|
|
2431
2552
|
},
|
|
2432
2553
|
transitionProperty: "transform, border-radius",
|
|
2433
|
-
transitionDuration: `${
|
|
2434
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2554
|
+
transitionDuration: `${T.DURATION}s`,
|
|
2555
|
+
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2435
2556
|
}, !0);
|
|
2436
2557
|
}
|
|
2437
|
-
function
|
|
2438
|
-
!
|
|
2439
|
-
}
|
|
2440
|
-
function
|
|
2441
|
-
if (!
|
|
2442
|
-
|
|
2443
|
-
const D =
|
|
2444
|
-
if (!
|
|
2445
|
-
const
|
|
2446
|
-
if (F > 0.05 && (
|
|
2447
|
-
|
|
2448
|
-
}, 200)),
|
|
2449
|
-
|
|
2450
|
-
draggedDistance:
|
|
2451
|
-
closeDrawer:
|
|
2558
|
+
function No() {
|
|
2559
|
+
!he || !M.current || (M.current.classList.remove(Rt), Me.current = !1, ze(!1), je.current = /* @__PURE__ */ new Date());
|
|
2560
|
+
}
|
|
2561
|
+
function Po(S) {
|
|
2562
|
+
if (!he || !M.current) return;
|
|
2563
|
+
M.current.classList.remove(Rt), Me.current = !1, ze(!1), je.current = /* @__PURE__ */ new Date();
|
|
2564
|
+
const D = ht(M.current, p);
|
|
2565
|
+
if (!on(S.target, !1) || !D || Number.isNaN(D) || ne.current === null) return;
|
|
2566
|
+
const k = je.current.getTime() - ne.current.getTime(), j = le.current - (z(p) ? S.clientY : S.clientX), F = Math.abs(j) / k;
|
|
2567
|
+
if (F > 0.05 && (E(!0), setTimeout(() => {
|
|
2568
|
+
E(!1);
|
|
2569
|
+
}, 200)), i) {
|
|
2570
|
+
So({
|
|
2571
|
+
draggedDistance: j * (p === "bottom" || p === "right" ? 1 : -1),
|
|
2572
|
+
closeDrawer: ke,
|
|
2452
2573
|
velocity: F,
|
|
2453
|
-
dismissible:
|
|
2454
|
-
}),
|
|
2574
|
+
dismissible: c
|
|
2575
|
+
}), s == null || s(S, !0);
|
|
2455
2576
|
return;
|
|
2456
2577
|
}
|
|
2457
|
-
if (
|
|
2458
|
-
|
|
2578
|
+
if (p === "bottom" || p === "right" ? j > 0 : j < 0) {
|
|
2579
|
+
an(), s == null || s(S, !0);
|
|
2459
2580
|
return;
|
|
2460
2581
|
}
|
|
2461
|
-
if (F >
|
|
2462
|
-
|
|
2582
|
+
if (F > so) {
|
|
2583
|
+
ke(), s == null || s(S, !1);
|
|
2463
2584
|
return;
|
|
2464
2585
|
}
|
|
2465
2586
|
var B;
|
|
2466
|
-
const
|
|
2467
|
-
if (D >=
|
|
2468
|
-
|
|
2587
|
+
const oe = Math.min((B = M.current.getBoundingClientRect().height) != null ? B : 0, window.innerHeight);
|
|
2588
|
+
if (D >= oe * v) {
|
|
2589
|
+
ke(), s == null || s(S, !1);
|
|
2469
2590
|
return;
|
|
2470
2591
|
}
|
|
2471
|
-
|
|
2592
|
+
s == null || s(S, !0), an();
|
|
2472
2593
|
}
|
|
2473
|
-
|
|
2474
|
-
|
|
2594
|
+
g.useEffect(() => {
|
|
2595
|
+
_ && (I(document.documentElement, {
|
|
2475
2596
|
scrollBehavior: "auto"
|
|
2476
|
-
}), Y.current = /* @__PURE__ */ new Date(),
|
|
2597
|
+
}), Y.current = /* @__PURE__ */ new Date(), at(!0));
|
|
2477
2598
|
}, [
|
|
2478
|
-
|
|
2479
|
-
]),
|
|
2480
|
-
if (
|
|
2481
|
-
var
|
|
2482
|
-
const D =
|
|
2483
|
-
D == null || D.forEach((
|
|
2484
|
-
const
|
|
2485
|
-
(
|
|
2599
|
+
_
|
|
2600
|
+
]), g.useEffect(() => {
|
|
2601
|
+
if (M.current && V) {
|
|
2602
|
+
var S;
|
|
2603
|
+
const D = M == null || (S = M.current) == null ? void 0 : S.querySelectorAll("*");
|
|
2604
|
+
D == null || D.forEach((k) => {
|
|
2605
|
+
const j = k;
|
|
2606
|
+
(j.scrollHeight > j.clientHeight || j.scrollWidth > j.clientWidth) && j.classList.add("vaul-scrollable");
|
|
2486
2607
|
});
|
|
2487
2608
|
}
|
|
2488
2609
|
}, [
|
|
2489
|
-
|
|
2610
|
+
V
|
|
2490
2611
|
]);
|
|
2491
|
-
function
|
|
2612
|
+
function at(S) {
|
|
2492
2613
|
const D = document.querySelector("[vaul-drawer-wrapper]");
|
|
2493
|
-
!D || !r || (
|
|
2614
|
+
!D || !r || (S ? (u && (x || (I(document.body, {
|
|
2494
2615
|
background: document.body.style.backgroundColor || document.body.style.background
|
|
2495
|
-
}),
|
|
2616
|
+
}), I(document.body, {
|
|
2496
2617
|
background: "black"
|
|
2497
|
-
}, !0))),
|
|
2498
|
-
borderRadius: `${
|
|
2618
|
+
}, !0))), I(D, {
|
|
2619
|
+
borderRadius: `${Mn}px`,
|
|
2499
2620
|
overflow: "hidden",
|
|
2500
|
-
...z(
|
|
2501
|
-
transform: `scale(${
|
|
2621
|
+
...z(p) ? {
|
|
2622
|
+
transform: `scale(${Ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2502
2623
|
transformOrigin: "top"
|
|
2503
2624
|
} : {
|
|
2504
|
-
transform: `scale(${
|
|
2625
|
+
transform: `scale(${Ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2505
2626
|
transformOrigin: "left"
|
|
2506
2627
|
},
|
|
2507
2628
|
transitionProperty: "transform, border-radius",
|
|
2508
|
-
transitionDuration: `${
|
|
2509
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2510
|
-
})) : (
|
|
2629
|
+
transitionDuration: `${T.DURATION}s`,
|
|
2630
|
+
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2631
|
+
})) : (ft(D, "overflow"), ft(D, "transform"), ft(D, "borderRadius"), I(D, {
|
|
2511
2632
|
transitionProperty: "transform, border-radius",
|
|
2512
|
-
transitionDuration: `${
|
|
2513
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2633
|
+
transitionDuration: `${T.DURATION}s`,
|
|
2634
|
+
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2514
2635
|
})));
|
|
2515
2636
|
}
|
|
2516
|
-
function
|
|
2517
|
-
const D =
|
|
2518
|
-
|
|
2519
|
-
transition: `transform ${
|
|
2520
|
-
transform: `scale(${D}) translate3d(0, ${
|
|
2521
|
-
}), !
|
|
2522
|
-
const
|
|
2523
|
-
|
|
2637
|
+
function To(S) {
|
|
2638
|
+
const D = S ? (window.innerWidth - Pe) / window.innerWidth : 1, k = S ? -Pe : 0;
|
|
2639
|
+
me.current && window.clearTimeout(me.current), I(M.current, {
|
|
2640
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2641
|
+
transform: `scale(${D}) translate3d(0, ${k}px, 0)`
|
|
2642
|
+
}), !S && M.current && (me.current = setTimeout(() => {
|
|
2643
|
+
const j = ht(M.current, p);
|
|
2644
|
+
I(M.current, {
|
|
2524
2645
|
transition: "none",
|
|
2525
|
-
transform: z(
|
|
2646
|
+
transform: z(p) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
|
|
2526
2647
|
});
|
|
2527
2648
|
}, 500));
|
|
2528
2649
|
}
|
|
2529
|
-
function
|
|
2650
|
+
function _o(S, D) {
|
|
2530
2651
|
if (D < 0) return;
|
|
2531
|
-
const
|
|
2532
|
-
|
|
2533
|
-
transform: z(
|
|
2652
|
+
const k = z(p) ? window.innerHeight : window.innerWidth, j = (k - Pe) / k, F = j + D * (1 - j), B = -Pe + D * Pe;
|
|
2653
|
+
I(M.current, {
|
|
2654
|
+
transform: z(p) ? `scale(${F}) translate3d(0, ${B}px, 0)` : `scale(${F}) translate3d(${B}px, 0, 0)`,
|
|
2534
2655
|
transition: "none"
|
|
2535
2656
|
});
|
|
2536
2657
|
}
|
|
2537
|
-
function
|
|
2538
|
-
const
|
|
2539
|
-
D &&
|
|
2540
|
-
transition: `transform ${
|
|
2541
|
-
transform: z(
|
|
2658
|
+
function Oo(S, D) {
|
|
2659
|
+
const k = z(p) ? window.innerHeight : window.innerWidth, j = D ? (k - Pe) / k : 1, F = D ? -Pe : 0;
|
|
2660
|
+
D && I(M.current, {
|
|
2661
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2662
|
+
transform: z(p) ? `scale(${j}) translate3d(0, ${F}px, 0)` : `scale(${j}) translate3d(${F}px, 0, 0)`
|
|
2542
2663
|
});
|
|
2543
2664
|
}
|
|
2544
|
-
return /* @__PURE__ */
|
|
2665
|
+
return /* @__PURE__ */ g.createElement(Ka, {
|
|
2545
2666
|
modal: H,
|
|
2546
|
-
onOpenChange: (
|
|
2667
|
+
onOpenChange: (S) => {
|
|
2547
2668
|
if (e !== void 0) {
|
|
2548
|
-
t == null || t(
|
|
2669
|
+
t == null || t(S);
|
|
2549
2670
|
return;
|
|
2550
2671
|
}
|
|
2551
|
-
|
|
2672
|
+
S ? (te(!0), w(S)) : ke();
|
|
2552
2673
|
},
|
|
2553
|
-
open:
|
|
2554
|
-
}, /* @__PURE__ */
|
|
2674
|
+
open: _
|
|
2675
|
+
}, /* @__PURE__ */ g.createElement(Zr.Provider, {
|
|
2555
2676
|
value: {
|
|
2556
|
-
visible:
|
|
2557
|
-
activeSnapPoint:
|
|
2558
|
-
snapPoints:
|
|
2559
|
-
setActiveSnapPoint:
|
|
2560
|
-
drawerRef:
|
|
2677
|
+
visible: V,
|
|
2678
|
+
activeSnapPoint: Mo,
|
|
2679
|
+
snapPoints: i,
|
|
2680
|
+
setActiveSnapPoint: nn,
|
|
2681
|
+
drawerRef: M,
|
|
2561
2682
|
overlayRef: U,
|
|
2562
|
-
scaleBackground:
|
|
2683
|
+
scaleBackground: at,
|
|
2563
2684
|
onOpenChange: t,
|
|
2564
|
-
onPress:
|
|
2565
|
-
setVisible:
|
|
2566
|
-
onRelease:
|
|
2567
|
-
onDrag:
|
|
2568
|
-
dismissible:
|
|
2685
|
+
onPress: Do,
|
|
2686
|
+
setVisible: q,
|
|
2687
|
+
onRelease: Po,
|
|
2688
|
+
onDrag: jo,
|
|
2689
|
+
dismissible: c,
|
|
2569
2690
|
handleOnly: d,
|
|
2570
|
-
isOpen:
|
|
2571
|
-
isDragging:
|
|
2572
|
-
shouldFade:
|
|
2573
|
-
closeDrawer:
|
|
2574
|
-
onNestedDrag:
|
|
2575
|
-
onNestedOpenChange:
|
|
2576
|
-
onNestedRelease:
|
|
2577
|
-
keyboardIsOpen:
|
|
2691
|
+
isOpen: _,
|
|
2692
|
+
isDragging: he,
|
|
2693
|
+
shouldFade: rn,
|
|
2694
|
+
closeDrawer: ke,
|
|
2695
|
+
onNestedDrag: _o,
|
|
2696
|
+
onNestedOpenChange: To,
|
|
2697
|
+
onNestedRelease: Oo,
|
|
2698
|
+
keyboardIsOpen: ge,
|
|
2578
2699
|
openProp: e,
|
|
2579
2700
|
modal: H,
|
|
2580
|
-
snapPointsOffset:
|
|
2581
|
-
direction:
|
|
2701
|
+
snapPointsOffset: qe,
|
|
2702
|
+
direction: p
|
|
2582
2703
|
}
|
|
2583
2704
|
}, n));
|
|
2584
2705
|
}
|
|
2585
|
-
const
|
|
2586
|
-
const { visible: a, closeDrawer:
|
|
2706
|
+
const gl = 250, vl = 120, co = /* @__PURE__ */ g.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2707
|
+
const { visible: a, closeDrawer: s, isDragging: i, snapPoints: l, activeSnapPoint: u, setActiveSnapPoint: v, dismissible: m, handleOnly: c, onPress: d, onDrag: f } = bt(), y = g.useRef(null), R = g.useRef(!1);
|
|
2587
2708
|
function K() {
|
|
2588
|
-
if (
|
|
2589
|
-
|
|
2709
|
+
if (R.current) {
|
|
2710
|
+
x();
|
|
2590
2711
|
return;
|
|
2591
2712
|
}
|
|
2592
2713
|
window.setTimeout(() => {
|
|
2593
2714
|
H();
|
|
2594
|
-
},
|
|
2715
|
+
}, vl);
|
|
2595
2716
|
}
|
|
2596
2717
|
function H() {
|
|
2597
|
-
if (
|
|
2598
|
-
|
|
2718
|
+
if (i || e || R.current) {
|
|
2719
|
+
x();
|
|
2599
2720
|
return;
|
|
2600
2721
|
}
|
|
2601
|
-
if (
|
|
2602
|
-
|
|
2722
|
+
if (x(), (!l || l.length === 0) && m) {
|
|
2723
|
+
s();
|
|
2603
2724
|
return;
|
|
2604
2725
|
}
|
|
2605
|
-
if (u ===
|
|
2606
|
-
|
|
2726
|
+
if (u === l[l.length - 1] && m) {
|
|
2727
|
+
s();
|
|
2607
2728
|
return;
|
|
2608
2729
|
}
|
|
2609
|
-
const
|
|
2610
|
-
if (
|
|
2611
|
-
const
|
|
2612
|
-
v(
|
|
2730
|
+
const C = l.findIndex((P) => P === u);
|
|
2731
|
+
if (C === -1) return;
|
|
2732
|
+
const N = l[C + 1];
|
|
2733
|
+
v(N);
|
|
2613
2734
|
}
|
|
2614
|
-
function
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
},
|
|
2735
|
+
function Q() {
|
|
2736
|
+
y.current = window.setTimeout(() => {
|
|
2737
|
+
R.current = !0;
|
|
2738
|
+
}, gl);
|
|
2618
2739
|
}
|
|
2619
|
-
function
|
|
2620
|
-
window.clearTimeout(
|
|
2740
|
+
function x() {
|
|
2741
|
+
window.clearTimeout(y.current), R.current = !1;
|
|
2621
2742
|
}
|
|
2622
|
-
return /* @__PURE__ */
|
|
2743
|
+
return /* @__PURE__ */ g.createElement("div", {
|
|
2623
2744
|
onClick: K,
|
|
2624
2745
|
onDoubleClick: () => {
|
|
2625
|
-
|
|
2746
|
+
R.current = !0, s();
|
|
2626
2747
|
},
|
|
2627
|
-
onPointerCancel:
|
|
2628
|
-
onPointerDown: (
|
|
2629
|
-
|
|
2748
|
+
onPointerCancel: x,
|
|
2749
|
+
onPointerDown: (p) => {
|
|
2750
|
+
c && d(p), Q();
|
|
2630
2751
|
},
|
|
2631
|
-
onPointerMove: (
|
|
2632
|
-
|
|
2752
|
+
onPointerMove: (p) => {
|
|
2753
|
+
c && f(p);
|
|
2633
2754
|
},
|
|
2634
2755
|
// onPointerUp is already handled by the content component
|
|
2635
2756
|
ref: r,
|
|
@@ -2637,47 +2758,47 @@ const fc = 250, mc = 120, ia = /* @__PURE__ */ h.forwardRef(function({ preventCy
|
|
|
2637
2758
|
"vaul-handle": "",
|
|
2638
2759
|
"aria-hidden": "true",
|
|
2639
2760
|
...n
|
|
2640
|
-
}, /* @__PURE__ */
|
|
2761
|
+
}, /* @__PURE__ */ g.createElement("span", {
|
|
2641
2762
|
"vaul-handle-hitarea": "",
|
|
2642
2763
|
"aria-hidden": "true"
|
|
2643
2764
|
}, t));
|
|
2644
2765
|
});
|
|
2645
|
-
|
|
2646
|
-
const
|
|
2647
|
-
const { overlayRef: r, snapPoints: a, onRelease:
|
|
2648
|
-
return /* @__PURE__ */
|
|
2649
|
-
onMouseUp:
|
|
2766
|
+
co.displayName = "Drawer.Handle";
|
|
2767
|
+
const uo = /* @__PURE__ */ g.forwardRef(function({ children: e, ...t }, n) {
|
|
2768
|
+
const { overlayRef: r, snapPoints: a, onRelease: s, shouldFade: i, isOpen: l, visible: u } = bt(), v = oo(n, r), m = a && a.length > 0;
|
|
2769
|
+
return /* @__PURE__ */ g.createElement($a, {
|
|
2770
|
+
onMouseUp: s,
|
|
2650
2771
|
ref: v,
|
|
2651
2772
|
"vaul-drawer-visible": u ? "true" : "false",
|
|
2652
2773
|
"vaul-overlay": "",
|
|
2653
|
-
"vaul-snap-points":
|
|
2654
|
-
"vaul-snap-points-overlay":
|
|
2774
|
+
"vaul-snap-points": l && m ? "true" : "false",
|
|
2775
|
+
"vaul-snap-points-overlay": l && i ? "true" : "false",
|
|
2655
2776
|
...t
|
|
2656
2777
|
});
|
|
2657
2778
|
});
|
|
2658
|
-
|
|
2659
|
-
const
|
|
2660
|
-
const { drawerRef:
|
|
2661
|
-
if (
|
|
2662
|
-
const
|
|
2779
|
+
uo.displayName = "Drawer.Overlay";
|
|
2780
|
+
const fo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: r, ...a }, s) {
|
|
2781
|
+
const { drawerRef: i, onPress: l, onRelease: u, onDrag: v, dismissible: m, keyboardIsOpen: c, snapPointsOffset: d, visible: f, closeDrawer: y, modal: R, openProp: K, onOpenChange: H, setVisible: Q, handleOnly: x, direction: p } = bt(), C = oo(s, i), N = g.useRef(null), P = g.useRef(!1), _ = (w, L, te = 0) => {
|
|
2782
|
+
if (P.current) return !0;
|
|
2783
|
+
const V = Math.abs(w.y), q = Math.abs(w.x), X = q > V, Ie = [
|
|
2663
2784
|
"bottom",
|
|
2664
2785
|
"right"
|
|
2665
|
-
].includes(
|
|
2666
|
-
if (
|
|
2667
|
-
if (!(w.x *
|
|
2786
|
+
].includes(L) ? 1 : -1;
|
|
2787
|
+
if (L === "left" || L === "right") {
|
|
2788
|
+
if (!(w.x * Ie < 0) && q >= 0 && q <= te)
|
|
2668
2789
|
return X;
|
|
2669
|
-
} else if (!(w.y *
|
|
2790
|
+
} else if (!(w.y * Ie < 0) && V >= 0 && V <= te)
|
|
2670
2791
|
return !X;
|
|
2671
|
-
return
|
|
2792
|
+
return P.current = !0, !0;
|
|
2672
2793
|
};
|
|
2673
|
-
return
|
|
2674
|
-
|
|
2675
|
-
}, []), /* @__PURE__ */
|
|
2794
|
+
return g.useEffect(() => {
|
|
2795
|
+
Q(!0);
|
|
2796
|
+
}, []), /* @__PURE__ */ g.createElement(La, {
|
|
2676
2797
|
"vaul-drawer": "",
|
|
2677
|
-
"vaul-drawer-direction":
|
|
2798
|
+
"vaul-drawer-direction": p,
|
|
2678
2799
|
"vaul-drawer-visible": f ? "true" : "false",
|
|
2679
2800
|
...a,
|
|
2680
|
-
ref:
|
|
2801
|
+
ref: C,
|
|
2681
2802
|
style: d && d.length > 0 ? {
|
|
2682
2803
|
"--snap-point-height": `${d[0]}px`,
|
|
2683
2804
|
...r
|
|
@@ -2686,370 +2807,419 @@ const la = /* @__PURE__ */ h.forwardRef(function({ onOpenAutoFocus: e, onPointer
|
|
|
2686
2807
|
if (e)
|
|
2687
2808
|
e(w);
|
|
2688
2809
|
else {
|
|
2689
|
-
var
|
|
2690
|
-
w.preventDefault(), (
|
|
2810
|
+
var L;
|
|
2811
|
+
w.preventDefault(), (L = i.current) == null || L.focus();
|
|
2691
2812
|
}
|
|
2692
2813
|
},
|
|
2693
2814
|
onPointerDown: (w) => {
|
|
2694
|
-
|
|
2815
|
+
x || (a.onPointerDown == null || a.onPointerDown.call(a, w), N.current = {
|
|
2695
2816
|
x: w.clientX,
|
|
2696
2817
|
y: w.clientY
|
|
2697
|
-
},
|
|
2818
|
+
}, l(w));
|
|
2698
2819
|
},
|
|
2699
2820
|
onPointerDownOutside: (w) => {
|
|
2700
|
-
if (t == null || t(w), !
|
|
2821
|
+
if (t == null || t(w), !R || w.defaultPrevented) {
|
|
2701
2822
|
w.preventDefault();
|
|
2702
2823
|
return;
|
|
2703
2824
|
}
|
|
2704
|
-
|
|
2825
|
+
c.current && (c.current = !1), w.preventDefault(), H == null || H(!1), !(!m || K !== void 0) && y();
|
|
2705
2826
|
},
|
|
2706
2827
|
onFocusOutside: (w) => {
|
|
2707
|
-
if (!
|
|
2828
|
+
if (!R) {
|
|
2708
2829
|
w.preventDefault();
|
|
2709
2830
|
return;
|
|
2710
2831
|
}
|
|
2711
2832
|
},
|
|
2712
2833
|
onEscapeKeyDown: (w) => {
|
|
2713
|
-
if (!
|
|
2834
|
+
if (!R) {
|
|
2714
2835
|
w.preventDefault();
|
|
2715
2836
|
return;
|
|
2716
2837
|
}
|
|
2717
2838
|
},
|
|
2718
2839
|
onPointerMove: (w) => {
|
|
2719
|
-
if (
|
|
2720
|
-
const
|
|
2721
|
-
|
|
2722
|
-
x:
|
|
2723
|
-
y:
|
|
2724
|
-
},
|
|
2840
|
+
if (x || (a.onPointerMove == null || a.onPointerMove.call(a, w), !N.current)) return;
|
|
2841
|
+
const L = w.clientY - N.current.y, te = w.clientX - N.current.x, V = w.pointerType === "touch" ? 10 : 2;
|
|
2842
|
+
_({
|
|
2843
|
+
x: te,
|
|
2844
|
+
y: L
|
|
2845
|
+
}, p, V) ? v(w) : (Math.abs(te) > V || Math.abs(L) > V) && (N.current = null);
|
|
2725
2846
|
},
|
|
2726
2847
|
onPointerUp: (w) => {
|
|
2727
|
-
a.onPointerUp == null || a.onPointerUp.call(a, w),
|
|
2848
|
+
a.onPointerUp == null || a.onPointerUp.call(a, w), N.current = null, P.current = !1, u(w);
|
|
2728
2849
|
}
|
|
2729
2850
|
});
|
|
2730
2851
|
});
|
|
2731
|
-
|
|
2732
|
-
function
|
|
2733
|
-
const { onNestedDrag: r, onNestedOpenChange: a, onNestedRelease:
|
|
2852
|
+
fo.displayName = "Drawer.Content";
|
|
2853
|
+
function wl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2854
|
+
const { onNestedDrag: r, onNestedOpenChange: a, onNestedRelease: s } = bt();
|
|
2734
2855
|
if (!r)
|
|
2735
2856
|
throw new Error("Drawer.NestedRoot must be placed in another drawer");
|
|
2736
|
-
return /* @__PURE__ */
|
|
2857
|
+
return /* @__PURE__ */ g.createElement(lo, {
|
|
2737
2858
|
nested: !0,
|
|
2738
2859
|
onClose: () => {
|
|
2739
2860
|
a(!1);
|
|
2740
2861
|
},
|
|
2741
|
-
onDrag: (
|
|
2742
|
-
r(
|
|
2862
|
+
onDrag: (i, l) => {
|
|
2863
|
+
r(i, l), e == null || e(i, l);
|
|
2743
2864
|
},
|
|
2744
|
-
onOpenChange: (
|
|
2745
|
-
|
|
2865
|
+
onOpenChange: (i) => {
|
|
2866
|
+
i && a(i), t == null || t(i);
|
|
2746
2867
|
},
|
|
2747
|
-
onRelease:
|
|
2868
|
+
onRelease: s,
|
|
2748
2869
|
...n
|
|
2749
2870
|
});
|
|
2750
2871
|
}
|
|
2751
|
-
const
|
|
2752
|
-
Root:
|
|
2753
|
-
NestedRoot:
|
|
2754
|
-
Content:
|
|
2755
|
-
Handle:
|
|
2756
|
-
Overlay:
|
|
2757
|
-
Trigger:
|
|
2758
|
-
Portal:
|
|
2759
|
-
Close:
|
|
2760
|
-
Title:
|
|
2761
|
-
Description:
|
|
2762
|
-
},
|
|
2872
|
+
const ie = {
|
|
2873
|
+
Root: lo,
|
|
2874
|
+
NestedRoot: wl,
|
|
2875
|
+
Content: fo,
|
|
2876
|
+
Handle: co,
|
|
2877
|
+
Overlay: uo,
|
|
2878
|
+
Trigger: Fa,
|
|
2879
|
+
Portal: Ha,
|
|
2880
|
+
Close: Ua,
|
|
2881
|
+
Title: Ba,
|
|
2882
|
+
Description: za
|
|
2883
|
+
}, Jt = ({
|
|
2763
2884
|
shouldScaleBackground: e = !0,
|
|
2764
2885
|
...t
|
|
2765
|
-
}) => /* @__PURE__ */
|
|
2766
|
-
|
|
2886
|
+
}) => /* @__PURE__ */ o.jsx(
|
|
2887
|
+
ie.Root,
|
|
2767
2888
|
{
|
|
2768
2889
|
shouldScaleBackground: e,
|
|
2769
2890
|
...t
|
|
2770
2891
|
}
|
|
2771
2892
|
);
|
|
2772
|
-
|
|
2773
|
-
const
|
|
2774
|
-
|
|
2893
|
+
Jt.displayName = "Drawer";
|
|
2894
|
+
const ho = ie.Trigger, bl = ie.Portal, xl = ie.Close, po = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2895
|
+
ie.Overlay,
|
|
2775
2896
|
{
|
|
2776
2897
|
ref: n,
|
|
2777
|
-
className:
|
|
2898
|
+
className: O("fixed inset-0 z-50 bg-black/80", e),
|
|
2778
2899
|
...t
|
|
2779
2900
|
}
|
|
2780
2901
|
));
|
|
2781
|
-
|
|
2782
|
-
const
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
)
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2902
|
+
po.displayName = ie.Overlay.displayName;
|
|
2903
|
+
const Zt = h.forwardRef(({ className: e, children: t, hideBar: n = !0, ...r }, a) => /* @__PURE__ */ o.jsxs(bl, { children: [
|
|
2904
|
+
/* @__PURE__ */ o.jsx(po, {}),
|
|
2905
|
+
/* @__PURE__ */ o.jsxs(
|
|
2906
|
+
ie.Content,
|
|
2907
|
+
{
|
|
2908
|
+
ref: a,
|
|
2909
|
+
className: O(
|
|
2910
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2911
|
+
e
|
|
2912
|
+
),
|
|
2913
|
+
...r,
|
|
2914
|
+
children: [
|
|
2915
|
+
!n && /* @__PURE__ */ o.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2916
|
+
t
|
|
2917
|
+
]
|
|
2918
|
+
}
|
|
2919
|
+
)
|
|
2920
|
+
] }));
|
|
2921
|
+
Zt.displayName = "DrawerContent";
|
|
2922
|
+
const en = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2923
|
+
ie.Title,
|
|
2798
2924
|
{
|
|
2799
2925
|
ref: n,
|
|
2800
|
-
className:
|
|
2926
|
+
className: O(
|
|
2801
2927
|
"text-lg font-semibold leading-none tracking-tight",
|
|
2802
2928
|
e
|
|
2803
2929
|
),
|
|
2804
2930
|
...t
|
|
2805
2931
|
}
|
|
2806
2932
|
));
|
|
2807
|
-
|
|
2808
|
-
const
|
|
2809
|
-
|
|
2933
|
+
en.displayName = ie.Title.displayName;
|
|
2934
|
+
const yl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2935
|
+
ie.Description,
|
|
2810
2936
|
{
|
|
2811
2937
|
ref: n,
|
|
2812
|
-
className:
|
|
2938
|
+
className: O("text-sm text-muted-foreground", e),
|
|
2813
2939
|
...t
|
|
2814
2940
|
}
|
|
2815
2941
|
));
|
|
2816
|
-
|
|
2817
|
-
const
|
|
2818
|
-
const { topNavigation: e } =
|
|
2819
|
-
return /* @__PURE__ */
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
"aria-describedby": void 0
|
|
2824
|
-
},
|
|
2825
|
-
/* @__PURE__ */ React.createElement(In, null, /* @__PURE__ */ React.createElement(Jt, null, "Navigation")),
|
|
2826
|
-
/* @__PURE__ */ React.createElement("ul", { className: "flex flex-col items-center gap-4 p-4" }, e.map((t) => /* @__PURE__ */ React.createElement("li", { key: t.label }, /* @__PURE__ */ React.createElement(
|
|
2827
|
-
Ge,
|
|
2942
|
+
yl.displayName = ie.Description.displayName;
|
|
2943
|
+
const Ml = () => {
|
|
2944
|
+
const { topNavigation: e } = Be();
|
|
2945
|
+
return /* @__PURE__ */ o.jsxs(Jt, { direction: "right", children: [
|
|
2946
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ o.jsx(ho, { className: "lg:hidden", children: /* @__PURE__ */ o.jsx(Wa, { size: 22 }) }) }),
|
|
2947
|
+
/* @__PURE__ */ o.jsxs(
|
|
2948
|
+
Zt,
|
|
2828
2949
|
{
|
|
2829
|
-
className:
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2950
|
+
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
|
|
2951
|
+
"aria-describedby": void 0,
|
|
2952
|
+
children: [
|
|
2953
|
+
/* @__PURE__ */ o.jsx(An, { children: /* @__PURE__ */ o.jsx(en, { children: "Navigation" }) }),
|
|
2954
|
+
/* @__PURE__ */ o.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
2955
|
+
Ye,
|
|
2956
|
+
{
|
|
2957
|
+
className: ({ isActive: n }) => kn(
|
|
2958
|
+
"block font-medium border-b-2",
|
|
2959
|
+
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2960
|
+
),
|
|
2961
|
+
to: t.id,
|
|
2962
|
+
children: /* @__PURE__ */ o.jsx(xl, { children: t.label })
|
|
2963
|
+
}
|
|
2964
|
+
) }, t.label)) })
|
|
2965
|
+
]
|
|
2966
|
+
}
|
|
2967
|
+
)
|
|
2968
|
+
] });
|
|
2969
|
+
}, Sl = () => {
|
|
2970
|
+
const e = Be(), [t, n] = _e(!1), r = Fn(() => n(!1), []);
|
|
2971
|
+
be(() => {
|
|
2841
2972
|
if (t)
|
|
2842
2973
|
return;
|
|
2843
|
-
function
|
|
2844
|
-
|
|
2974
|
+
function s(i) {
|
|
2975
|
+
i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), n(!0));
|
|
2845
2976
|
}
|
|
2846
|
-
return window.addEventListener("keydown",
|
|
2847
|
-
window.removeEventListener("keydown",
|
|
2977
|
+
return window.addEventListener("keydown", s), () => {
|
|
2978
|
+
window.removeEventListener("keydown", s);
|
|
2848
2979
|
};
|
|
2849
2980
|
}, [t, n]);
|
|
2850
|
-
const a = e.plugins.find(
|
|
2851
|
-
return a ? /* @__PURE__ */
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2981
|
+
const a = e.plugins.find(Ns);
|
|
2982
|
+
return a ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2983
|
+
/* @__PURE__ */ o.jsxs(
|
|
2984
|
+
"button",
|
|
2985
|
+
{
|
|
2986
|
+
type: "button",
|
|
2987
|
+
onClick: () => n(!0),
|
|
2988
|
+
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72",
|
|
2989
|
+
children: [
|
|
2990
|
+
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
2991
|
+
/* @__PURE__ */ o.jsx(Ja, { size: 14 }),
|
|
2992
|
+
"Search"
|
|
2993
|
+
] }),
|
|
2994
|
+
/* @__PURE__ */ o.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
2995
|
+
]
|
|
2996
|
+
}
|
|
2997
|
+
),
|
|
2998
|
+
/* @__PURE__ */ o.jsx(Hn, { fallback: null, children: a.renderSearch({
|
|
2999
|
+
isOpen: t,
|
|
3000
|
+
onClose: r
|
|
3001
|
+
}) })
|
|
3002
|
+
] }) : null;
|
|
3003
|
+
}, El = () => {
|
|
3004
|
+
const { topNavigation: e } = Be();
|
|
3005
|
+
return e.length <= 1 ? /* @__PURE__ */ o.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ o.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ o.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
3006
|
+
Ye,
|
|
2868
3007
|
{
|
|
2869
|
-
className: ({ isActive: n }) =>
|
|
3008
|
+
className: ({ isActive: n }) => kn(
|
|
2870
3009
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
2871
3010
|
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2872
3011
|
),
|
|
2873
|
-
to: t.id
|
|
2874
|
-
|
|
2875
|
-
t.label
|
|
2876
|
-
)))));
|
|
2877
|
-
}, fa = ({ item: e }) => e.children ? /* @__PURE__ */ React.createElement(Ki, { key: e.label }, /* @__PURE__ */ React.createElement(Vr, null, e.label), /* @__PURE__ */ React.createElement(zi, null, /* @__PURE__ */ React.createElement(Qr, null, e.children.map((t, n) => (
|
|
2878
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
2879
|
-
/* @__PURE__ */ React.createElement(fa, { key: n, item: t })
|
|
2880
|
-
))))) : /* @__PURE__ */ React.createElement(Ot, { to: e.path ?? "" }, /* @__PURE__ */ React.createElement(Gr, { key: e.label }, e.label)), ma = Fn(function() {
|
|
2881
|
-
const t = cn(), [n, r] = no(), { isAuthenticated: a, profile: o, isAuthEnabled: s } = cn(), i = He(), { page: u, plugins: v } = i, p = v.filter((d) => xs(d)).flatMap((d) => d.getProfileMenuItems(i)).map((d) => /* @__PURE__ */ React.createElement(fa, { key: d.label, item: d })), l = n ? ko : $o;
|
|
2882
|
-
return /* @__PURE__ */ React.createElement("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full" }, /* @__PURE__ */ React.createElement(Gi, null), /* @__PURE__ */ React.createElement("div", { className: "max-w-screen-2xl mx-auto" }, /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]" }, /* @__PURE__ */ React.createElement("div", { className: "flex" }, /* @__PURE__ */ React.createElement(Ot, { to: "/" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3.5" }, (u == null ? void 0 : u.logo) && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
2883
|
-
"img",
|
|
2884
|
-
{
|
|
2885
|
-
src: u.logo.src.light,
|
|
2886
|
-
alt: u.logo.alt ?? u.pageTitle,
|
|
2887
|
-
style: { width: u.logo.width },
|
|
2888
|
-
className: I("h-10", n && "hidden"),
|
|
2889
|
-
loading: "lazy"
|
|
3012
|
+
to: t.id,
|
|
3013
|
+
children: t.label
|
|
2890
3014
|
}
|
|
2891
|
-
),
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
{
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
3015
|
+
) }, t.label)) }) });
|
|
3016
|
+
}, mo = ({ item: e }) => e.children ? /* @__PURE__ */ o.jsxs(Gi, { children: [
|
|
3017
|
+
/* @__PURE__ */ o.jsx(Qr, { children: e.label }),
|
|
3018
|
+
/* @__PURE__ */ o.jsx(Qi, { children: /* @__PURE__ */ o.jsx(Gr, { children: e.children.map((t, n) => (
|
|
3019
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
3020
|
+
/* @__PURE__ */ o.jsx(mo, { item: t }, n)
|
|
3021
|
+
)) }) })
|
|
3022
|
+
] }, e.label) : /* @__PURE__ */ o.jsx(It, { to: e.path ?? "", children: /* @__PURE__ */ o.jsx(Yr, { children: e.label }, e.label) }), go = Un(function() {
|
|
3023
|
+
const t = un(), [n, r] = la(), { isAuthenticated: a, profile: s, isAuthEnabled: i } = un(), l = Be(), { page: u, plugins: v } = l, m = v.filter((d) => Ds(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ o.jsx(mo, { item: d }, d.label)), c = n ? Ya : Za;
|
|
3024
|
+
return /* @__PURE__ */ o.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
3025
|
+
/* @__PURE__ */ o.jsx(Ji, {}),
|
|
3026
|
+
/* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
3027
|
+
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
|
|
3028
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(It, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
3029
|
+
(u == null ? void 0 : u.logo) && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3030
|
+
/* @__PURE__ */ o.jsx(
|
|
3031
|
+
"img",
|
|
3032
|
+
{
|
|
3033
|
+
src: u.logo.src.light,
|
|
3034
|
+
alt: u.logo.alt ?? u.pageTitle,
|
|
3035
|
+
style: { width: u.logo.width },
|
|
3036
|
+
className: O("h-10", n && "hidden"),
|
|
3037
|
+
loading: "lazy"
|
|
3038
|
+
}
|
|
3039
|
+
),
|
|
3040
|
+
/* @__PURE__ */ o.jsx(
|
|
3041
|
+
"img",
|
|
3042
|
+
{
|
|
3043
|
+
src: u.logo.src.dark,
|
|
3044
|
+
alt: u.logo.alt ?? u.pageTitle,
|
|
3045
|
+
style: { width: u.logo.width },
|
|
3046
|
+
className: O("h-10", !n && "hidden"),
|
|
3047
|
+
loading: "lazy"
|
|
3048
|
+
}
|
|
3049
|
+
)
|
|
3050
|
+
] }),
|
|
3051
|
+
/* @__PURE__ */ o.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
|
|
3052
|
+
] }) }) }),
|
|
3053
|
+
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
3054
|
+
/* @__PURE__ */ o.jsx("div", { className: "w-full justify-center flex", children: /* @__PURE__ */ o.jsx(Sl, {}) }),
|
|
3055
|
+
/* @__PURE__ */ o.jsx(Ml, {}),
|
|
3056
|
+
/* @__PURE__ */ o.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
3057
|
+
/* @__PURE__ */ o.jsx(Te, { name: "head-navigation-start" }),
|
|
3058
|
+
i && !a ? /* @__PURE__ */ o.jsx(Dt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : m.length > 0 && /* @__PURE__ */ o.jsxs(qi, { modal: !1, children: [
|
|
3059
|
+
/* @__PURE__ */ o.jsx(Vi, { asChild: !0, children: /* @__PURE__ */ o.jsx(Dt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
|
|
3060
|
+
/* @__PURE__ */ o.jsxs(Wr, { className: "w-56", children: [
|
|
3061
|
+
/* @__PURE__ */ o.jsx(Xr, { children: "My Account" }),
|
|
3062
|
+
/* @__PURE__ */ o.jsx(Jr, {}),
|
|
3063
|
+
m
|
|
3064
|
+
] })
|
|
3065
|
+
] }),
|
|
3066
|
+
/* @__PURE__ */ o.jsx(
|
|
3067
|
+
"button",
|
|
3068
|
+
{
|
|
3069
|
+
type: "button",
|
|
3070
|
+
"aria-label": n ? "Switch to light mode" : "Switch to dark mode",
|
|
3071
|
+
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
3072
|
+
onClick: r,
|
|
3073
|
+
children: /* @__PURE__ */ o.jsx(c, { size: 18 })
|
|
3074
|
+
}
|
|
3075
|
+
),
|
|
3076
|
+
/* @__PURE__ */ o.jsx(Te, { name: "head-navigation-end" })
|
|
3077
|
+
] })
|
|
3078
|
+
] })
|
|
3079
|
+
] }),
|
|
3080
|
+
/* @__PURE__ */ o.jsx(El, {})
|
|
3081
|
+
] })
|
|
3082
|
+
] });
|
|
3083
|
+
}), vo = {
|
|
3084
|
+
Header: go
|
|
3085
|
+
}, Cl = Ln(vo), Rl = Cl.Provider, Dl = (e) => {
|
|
3086
|
+
const [t, n] = _e(!1);
|
|
3087
|
+
be(() => {
|
|
3088
|
+
const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
|
|
3089
|
+
n(l);
|
|
2917
3090
|
}, [t]);
|
|
2918
|
-
const r =
|
|
2919
|
-
const
|
|
2920
|
-
document.documentElement.classList.toggle("dark",
|
|
3091
|
+
const r = Fn(() => {
|
|
3092
|
+
const s = !t;
|
|
3093
|
+
document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
|
|
2921
3094
|
}, [t]), a = [t, r];
|
|
2922
|
-
return /* @__PURE__ */
|
|
2923
|
-
},
|
|
3095
|
+
return /* @__PURE__ */ o.jsx(ca.Provider, { value: a, ...e });
|
|
3096
|
+
}, jl = ({
|
|
2924
3097
|
children: e,
|
|
2925
3098
|
context: t
|
|
2926
|
-
}) => (
|
|
3099
|
+
}) => (Ta({
|
|
2927
3100
|
queryFn: async () => (await t.initialize(), !0),
|
|
2928
3101
|
queryKey: ["zudoku-initialize"]
|
|
2929
|
-
}), /* @__PURE__ */
|
|
3102
|
+
}), /* @__PURE__ */ o.jsx(_a.Provider, { value: t, children: e })), Nl = ({
|
|
2930
3103
|
children: e,
|
|
2931
3104
|
...t
|
|
2932
3105
|
}) => {
|
|
2933
|
-
var
|
|
2934
|
-
const n =
|
|
2935
|
-
() => ({ ...
|
|
3106
|
+
var c, d;
|
|
3107
|
+
const n = yt(
|
|
3108
|
+
() => ({ ...vo, ...t.overrides }),
|
|
2936
3109
|
[t.overrides]
|
|
2937
|
-
), r =
|
|
2938
|
-
var
|
|
3110
|
+
), r = yt(() => {
|
|
3111
|
+
var y;
|
|
2939
3112
|
return {
|
|
2940
|
-
...(t.plugins ?? []).filter(
|
|
2941
|
-
(
|
|
2942
|
-
).reduce((
|
|
2943
|
-
...
|
|
2944
|
-
...(
|
|
3113
|
+
...(t.plugins ?? []).filter(_s).flatMap(
|
|
3114
|
+
(R) => R.getMdxComponents ? [R.getMdxComponents()] : []
|
|
3115
|
+
).reduce((R, K) => ({ ...R, ...K }), {}),
|
|
3116
|
+
...ua,
|
|
3117
|
+
...(y = t.mdx) == null ? void 0 : y.components
|
|
2945
3118
|
};
|
|
2946
|
-
}, [(
|
|
2947
|
-
() =>
|
|
2948
|
-
[a,
|
|
2949
|
-
), u =
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
}, [
|
|
2953
|
-
const [v] =
|
|
2954
|
-
var
|
|
2955
|
-
return /* @__PURE__ */
|
|
3119
|
+
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: a } = va(jt), [s, i] = _e(!1), l = yt(
|
|
3120
|
+
() => s ? { stagger: !0 } : { stagger: a },
|
|
3121
|
+
[a, s]
|
|
3122
|
+
), u = zo();
|
|
3123
|
+
be(() => {
|
|
3124
|
+
s || i(!0);
|
|
3125
|
+
}, [s, u.location]);
|
|
3126
|
+
const [v] = _e(() => new Is(t)), m = (d = t.plugins) == null ? void 0 : d.filter(Ts).map((f, y) => {
|
|
3127
|
+
var R;
|
|
3128
|
+
return /* @__PURE__ */ o.jsx(wa, { children: (R = f.getHead) == null ? void 0 : R.call(f) }, y);
|
|
2956
3129
|
});
|
|
2957
|
-
return /* @__PURE__ */
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
3130
|
+
return /* @__PURE__ */ o.jsxs(Oa, { client: Yn, children: [
|
|
3131
|
+
/* @__PURE__ */ o.jsx(Ot, { children: m }),
|
|
3132
|
+
/* @__PURE__ */ o.jsx(jt.Provider, { value: l, children: /* @__PURE__ */ o.jsx(jl, { context: v, children: /* @__PURE__ */ o.jsx(ko, { components: r, children: /* @__PURE__ */ o.jsx(Dl, { children: /* @__PURE__ */ o.jsx(Rl, { value: n, children: /* @__PURE__ */ o.jsx(qo, { slotlets: t.slotlets, children: /* @__PURE__ */ o.jsx(da, { children: e ?? /* @__PURE__ */ o.jsx(jn, {}) }) }) }) }) }) }) })
|
|
3133
|
+
] });
|
|
3134
|
+
}, Pl = Un(Nl), wo = (e) => /* @__PURE__ */ o.jsx(Cs, { FallbackComponent: As, children: /* @__PURE__ */ o.jsx(Pl, { ...e }) });
|
|
3135
|
+
wo.displayName = "DevPortal";
|
|
3136
|
+
const Tl = ({
|
|
2961
3137
|
category: e,
|
|
2962
3138
|
level: t
|
|
2963
3139
|
}) => {
|
|
2964
3140
|
var d;
|
|
2965
|
-
const n =
|
|
2966
|
-
|
|
2967
|
-
r &&
|
|
3141
|
+
const n = Kn(), r = $o(e), [a, s] = _e(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [v, m] = _e(u);
|
|
3142
|
+
be(() => {
|
|
3143
|
+
r && m(!0);
|
|
2968
3144
|
}, [r]);
|
|
2969
|
-
const
|
|
3145
|
+
const c = i && /* @__PURE__ */ o.jsx(
|
|
2970
3146
|
"button",
|
|
2971
3147
|
{
|
|
2972
3148
|
type: "button",
|
|
2973
3149
|
onClick: (f) => {
|
|
2974
|
-
f.preventDefault(),
|
|
2975
|
-
}
|
|
2976
|
-
},
|
|
2977
|
-
/* @__PURE__ */ React.createElement(
|
|
2978
|
-
zn,
|
|
2979
|
-
{
|
|
2980
|
-
size: 16,
|
|
2981
|
-
className: I(
|
|
2982
|
-
a && "transition",
|
|
2983
|
-
"shrink-0 group-data-[state=open]:rotate-90"
|
|
2984
|
-
)
|
|
2985
|
-
}
|
|
2986
|
-
)
|
|
2987
|
-
);
|
|
2988
|
-
return /* @__PURE__ */ React.createElement(
|
|
2989
|
-
go,
|
|
2990
|
-
{
|
|
2991
|
-
className: I("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
|
|
2992
|
-
defaultOpen: u,
|
|
2993
|
-
open: v,
|
|
2994
|
-
onOpenChange: () => p(!0)
|
|
2995
|
-
},
|
|
2996
|
-
/* @__PURE__ */ React.createElement(vo, { className: "group", asChild: !0, disabled: !s }, /* @__PURE__ */ React.createElement(
|
|
2997
|
-
"div",
|
|
2998
|
-
{
|
|
2999
|
-
className: I(
|
|
3000
|
-
"text-start",
|
|
3001
|
-
qe({ isActive: !1, isTopLevel: t === 0 }),
|
|
3002
|
-
s ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
3003
|
-
)
|
|
3150
|
+
f.preventDefault(), m((y) => !y), s(!0);
|
|
3004
3151
|
},
|
|
3005
|
-
|
|
3006
|
-
|
|
3152
|
+
children: /* @__PURE__ */ o.jsx(
|
|
3153
|
+
Vn,
|
|
3007
3154
|
{
|
|
3008
3155
|
size: 16,
|
|
3009
|
-
className:
|
|
3156
|
+
className: O(
|
|
3157
|
+
a && "transition",
|
|
3158
|
+
"shrink-0 group-data-[state=open]:rotate-90"
|
|
3159
|
+
)
|
|
3010
3160
|
}
|
|
3011
|
-
)
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3161
|
+
)
|
|
3162
|
+
}
|
|
3163
|
+
);
|
|
3164
|
+
return /* @__PURE__ */ o.jsxs(
|
|
3165
|
+
ya,
|
|
3166
|
+
{
|
|
3167
|
+
className: O("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
|
|
3168
|
+
defaultOpen: u,
|
|
3169
|
+
open: v,
|
|
3170
|
+
onOpenChange: () => m(!0),
|
|
3171
|
+
children: [
|
|
3172
|
+
/* @__PURE__ */ o.jsx(
|
|
3173
|
+
Ma,
|
|
3021
3174
|
{
|
|
3022
|
-
className:
|
|
3023
|
-
"
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3175
|
+
className: O(
|
|
3176
|
+
"group text-start",
|
|
3177
|
+
We({ isActive: !1, isTopLevel: t === 0 }),
|
|
3178
|
+
i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
3179
|
+
),
|
|
3180
|
+
asChild: !0,
|
|
3181
|
+
disabled: !i,
|
|
3182
|
+
children: ((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ o.jsx(Ye, { to: Ht(n == null ? void 0 : n.id, e.link.id), children: ({ isActive: f }) => /* @__PURE__ */ o.jsxs(
|
|
3183
|
+
"div",
|
|
3184
|
+
{
|
|
3185
|
+
className: O(
|
|
3186
|
+
"flex items-center gap-2 justify-between w-full",
|
|
3187
|
+
f ? "text-primary font-medium" : "text-foreground/80"
|
|
3188
|
+
),
|
|
3189
|
+
children: [
|
|
3190
|
+
/* @__PURE__ */ o.jsx("div", { className: "truncate", children: e.label }),
|
|
3191
|
+
c
|
|
3192
|
+
]
|
|
3193
|
+
}
|
|
3194
|
+
) }) : /* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
3195
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
3196
|
+
c
|
|
3197
|
+
] })
|
|
3198
|
+
}
|
|
3199
|
+
),
|
|
3200
|
+
/* @__PURE__ */ o.jsx(
|
|
3201
|
+
Sa,
|
|
3202
|
+
{
|
|
3203
|
+
className: O(
|
|
3204
|
+
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
3205
|
+
a && "CollapsibleContent",
|
|
3206
|
+
"ms-[calc(var(--padding-nav-item)*1.125)]"
|
|
3207
|
+
),
|
|
3208
|
+
children: /* @__PURE__ */ o.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((f) => /* @__PURE__ */ o.jsx(
|
|
3209
|
+
_t,
|
|
3210
|
+
{
|
|
3211
|
+
level: t + 1,
|
|
3212
|
+
item: f
|
|
3213
|
+
},
|
|
3214
|
+
("id" in f ? f.id : "") + ("href" in f ? f.href : "") + f.label
|
|
3215
|
+
)) })
|
|
3216
|
+
}
|
|
3039
3217
|
)
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
Tt,
|
|
3043
|
-
{
|
|
3044
|
-
key: ("id" in f ? f.id : "") + ("href" in f ? f.href : "") + f.label,
|
|
3045
|
-
level: t + 1,
|
|
3046
|
-
item: f
|
|
3047
|
-
}
|
|
3048
|
-
)))
|
|
3049
|
-
)
|
|
3218
|
+
]
|
|
3219
|
+
}
|
|
3050
3220
|
);
|
|
3051
|
-
},
|
|
3052
|
-
"flex
|
|
3221
|
+
}, We = fa(
|
|
3222
|
+
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
3053
3223
|
{
|
|
3054
3224
|
variants: {
|
|
3055
3225
|
isTopLevel: {
|
|
@@ -3065,171 +3235,209 @@ const Dc = ({
|
|
|
3065
3235
|
}
|
|
3066
3236
|
}
|
|
3067
3237
|
}
|
|
3068
|
-
),
|
|
3238
|
+
), bo = "data-anchor", _t = ({
|
|
3069
3239
|
item: e,
|
|
3070
3240
|
level: t = 0
|
|
3071
3241
|
}) => {
|
|
3072
|
-
const n =
|
|
3242
|
+
const n = Kn(), { activeAnchor: r } = $t(), [a] = Ko();
|
|
3073
3243
|
switch (e.type) {
|
|
3074
3244
|
case "category":
|
|
3075
|
-
return /* @__PURE__ */
|
|
3245
|
+
return /* @__PURE__ */ o.jsx(Tl, { category: e, level: t });
|
|
3076
3246
|
case "doc":
|
|
3077
|
-
return /* @__PURE__ */
|
|
3078
|
-
|
|
3247
|
+
return /* @__PURE__ */ o.jsx(
|
|
3248
|
+
Ye,
|
|
3079
3249
|
{
|
|
3080
|
-
className: ({ isActive:
|
|
3081
|
-
to:
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3250
|
+
className: ({ isActive: s }) => We({ isActive: s, isTopLevel: t === 0 }),
|
|
3251
|
+
to: Ht(n == null ? void 0 : n.id, e.id),
|
|
3252
|
+
children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3253
|
+
/* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3254
|
+
/* @__PURE__ */ o.jsx(Mt, { ...e.badge })
|
|
3255
|
+
] }) : e.label
|
|
3256
|
+
}
|
|
3085
3257
|
);
|
|
3086
3258
|
case "link":
|
|
3087
|
-
return e.href.startsWith("#") ? /* @__PURE__ */
|
|
3088
|
-
|
|
3259
|
+
return e.href.startsWith("#") ? /* @__PURE__ */ o.jsx(
|
|
3260
|
+
Lo,
|
|
3089
3261
|
{
|
|
3090
3262
|
to: { hash: e.href, search: a.toString() },
|
|
3091
|
-
[
|
|
3092
|
-
className:
|
|
3263
|
+
[bo]: e.href.slice(1),
|
|
3264
|
+
className: O(
|
|
3093
3265
|
"flex gap-2.5 justify-between",
|
|
3094
3266
|
t === 0 && "-mx-[--padding-nav-item]",
|
|
3095
|
-
|
|
3267
|
+
We({
|
|
3096
3268
|
isActive: e.href.slice(1) === r
|
|
3097
3269
|
})
|
|
3098
|
-
)
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3270
|
+
),
|
|
3271
|
+
children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3272
|
+
/* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3273
|
+
/* @__PURE__ */ o.jsx(Mt, { ...e.badge })
|
|
3274
|
+
] }) : /* @__PURE__ */ o.jsx("span", { className: "break-all", children: e.label })
|
|
3275
|
+
}
|
|
3276
|
+
) : e.href.startsWith("http") ? /* @__PURE__ */ o.jsxs(
|
|
3102
3277
|
"a",
|
|
3103
3278
|
{
|
|
3104
|
-
className:
|
|
3105
|
-
|
|
3279
|
+
className: O(
|
|
3280
|
+
We({ isTopLevel: t === 0 }),
|
|
3106
3281
|
"block"
|
|
3107
3282
|
),
|
|
3108
3283
|
href: e.href,
|
|
3109
3284
|
target: "_blank",
|
|
3110
|
-
rel: "noopener noreferrer"
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3285
|
+
rel: "noopener noreferrer",
|
|
3286
|
+
children: [
|
|
3287
|
+
/* @__PURE__ */ o.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
3288
|
+
/* @__PURE__ */ o.jsxs("span", { className: "whitespace-nowrap", children: [
|
|
3289
|
+
" ",
|
|
3290
|
+
/* @__PURE__ */ o.jsx(Ga, { className: "inline ml-1", size: 12 })
|
|
3291
|
+
] })
|
|
3292
|
+
]
|
|
3293
|
+
}
|
|
3294
|
+
) : /* @__PURE__ */ o.jsx(
|
|
3295
|
+
Ye,
|
|
3116
3296
|
{
|
|
3117
|
-
className:
|
|
3118
|
-
to: e.href
|
|
3119
|
-
|
|
3120
|
-
|
|
3297
|
+
className: O("flex gap-2.5 justify-between", We()),
|
|
3298
|
+
to: e.href,
|
|
3299
|
+
children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3300
|
+
/* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3301
|
+
/* @__PURE__ */ o.jsx(Mt, { ...e.badge })
|
|
3302
|
+
] }) : /* @__PURE__ */ o.jsx("span", { className: "break-all", children: e.label })
|
|
3303
|
+
}
|
|
3121
3304
|
);
|
|
3122
3305
|
}
|
|
3123
|
-
},
|
|
3306
|
+
}, _l = (e, t = { block: "center" }) => {
|
|
3124
3307
|
if (!e) return;
|
|
3125
3308
|
const n = e.getBoundingClientRect();
|
|
3126
3309
|
n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
3127
|
-
},
|
|
3128
|
-
const e =
|
|
3129
|
-
|
|
3310
|
+
}, Ol = () => {
|
|
3311
|
+
const e = At(), { setActiveAnchor: t } = $t();
|
|
3312
|
+
be(() => {
|
|
3130
3313
|
if (!e.hash) return;
|
|
3131
3314
|
const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
|
|
3132
|
-
const a = document.getElementById(n),
|
|
3133
|
-
return a ? (a.scrollIntoView(),
|
|
3315
|
+
const a = document.getElementById(n), s = document.querySelector(`[${bo}="${n}"]`);
|
|
3316
|
+
return a ? (a.scrollIntoView(), _l(s), requestIdleCallback(() => t(n)), !0) : !1;
|
|
3134
3317
|
};
|
|
3135
3318
|
if (!r()) {
|
|
3136
|
-
const a = new MutationObserver((
|
|
3137
|
-
r() &&
|
|
3319
|
+
const a = new MutationObserver((s, i) => {
|
|
3320
|
+
r() && i.disconnect();
|
|
3138
3321
|
});
|
|
3139
3322
|
return a.observe(document.body, { childList: !0, subtree: !0 }), () => a.disconnect();
|
|
3140
3323
|
}
|
|
3141
3324
|
}, [e.hash, t]);
|
|
3142
|
-
},
|
|
3143
|
-
const e =
|
|
3144
|
-
|
|
3325
|
+
}, Il = () => {
|
|
3326
|
+
const e = At(), t = Lt(e.pathname);
|
|
3327
|
+
be(() => {
|
|
3145
3328
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
3146
3329
|
}, [e.pathname]);
|
|
3147
|
-
},
|
|
3330
|
+
}, xo = ba(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ o.jsx(
|
|
3148
3331
|
"nav",
|
|
3149
3332
|
{
|
|
3150
3333
|
"data-navigation": String(n),
|
|
3151
|
-
className:
|
|
3334
|
+
className: O(
|
|
3152
3335
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
3153
3336
|
"px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
3154
3337
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
3155
3338
|
t
|
|
3156
3339
|
),
|
|
3157
|
-
ref: r
|
|
3158
|
-
|
|
3159
|
-
|
|
3340
|
+
ref: r,
|
|
3341
|
+
children: e
|
|
3342
|
+
}
|
|
3160
3343
|
));
|
|
3161
|
-
|
|
3162
|
-
const
|
|
3163
|
-
const e =
|
|
3164
|
-
return /* @__PURE__ */
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
ref: e,
|
|
3168
|
-
pushMainContent: t.data.items.length > 0
|
|
3169
|
-
},
|
|
3170
|
-
/* @__PURE__ */ React.createElement(Pe, { name: "zudoku-before-navigation" }),
|
|
3171
|
-
t.data.items.map((n) => /* @__PURE__ */ React.createElement(Tt, { key: n.label, item: n })),
|
|
3172
|
-
/* @__PURE__ */ React.createElement(Pe, { name: "zudoku-after-navigation" })
|
|
3173
|
-
), /* @__PURE__ */ React.createElement(
|
|
3174
|
-
Xt,
|
|
3175
|
-
{
|
|
3176
|
-
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
|
|
3177
|
-
"aria-describedby": void 0
|
|
3178
|
-
},
|
|
3179
|
-
/* @__PURE__ */ React.createElement(In, null, /* @__PURE__ */ React.createElement(Jt, null, "Sidebar")),
|
|
3180
|
-
t.data.items.map((n) => /* @__PURE__ */ React.createElement(Tt, { key: n.label, item: n }))
|
|
3181
|
-
));
|
|
3182
|
-
}, Oc = ({ children: e }) => {
|
|
3183
|
-
const t = It(), { setActiveAnchor: n } = kt(), { meta: r, authentication: a } = He();
|
|
3184
|
-
Pc(), Tc();
|
|
3185
|
-
const o = $t(t.pathname);
|
|
3186
|
-
return we(() => {
|
|
3187
|
-
var s;
|
|
3188
|
-
(s = a == null ? void 0 : a.pageLoad) == null || s.call(a);
|
|
3189
|
-
}, [a]), we(() => {
|
|
3190
|
-
t.pathname !== o.current && n(""), o.current = t.pathname;
|
|
3191
|
-
}, [t.pathname, n]), /* @__PURE__ */ React.createElement(React.Fragment, null, !1, /* @__PURE__ */ React.createElement(_t, { titleTemplate: r == null ? void 0 : r.title }, (r == null ? void 0 : r.description) && /* @__PURE__ */ React.createElement("meta", { name: "description", content: r.description }), (r == null ? void 0 : r.favicon) && /* @__PURE__ */ React.createElement("link", { rel: "icon", href: r.favicon })), /* @__PURE__ */ React.createElement(Pe, { name: "layout-before-head" }), /* @__PURE__ */ React.createElement(ma, null), /* @__PURE__ */ React.createElement("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12" }, /* @__PURE__ */ React.createElement(
|
|
3192
|
-
jn,
|
|
3193
|
-
{
|
|
3194
|
-
fallback: /* @__PURE__ */ React.createElement("main", { className: "grid h-full place-items-center" }, /* @__PURE__ */ React.createElement(Wo, null))
|
|
3195
|
-
},
|
|
3196
|
-
/* @__PURE__ */ React.createElement(Yt, { direction: "left" }, /* @__PURE__ */ React.createElement(_c, null), /* @__PURE__ */ React.createElement(
|
|
3197
|
-
"div",
|
|
3344
|
+
xo.displayName = "SidebarWrapper";
|
|
3345
|
+
const Al = () => {
|
|
3346
|
+
const e = Lt(null), t = Ia();
|
|
3347
|
+
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3348
|
+
/* @__PURE__ */ o.jsxs(
|
|
3349
|
+
xo,
|
|
3198
3350
|
{
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3351
|
+
ref: e,
|
|
3352
|
+
pushMainContent: t.data.items.length > 0,
|
|
3353
|
+
children: [
|
|
3354
|
+
/* @__PURE__ */ o.jsx(Te, { name: "zudoku-before-navigation" }),
|
|
3355
|
+
t.data.items.map((n) => /* @__PURE__ */ o.jsx(_t, { item: n }, n.label)),
|
|
3356
|
+
/* @__PURE__ */ o.jsx(Te, { name: "zudoku-after-navigation" })
|
|
3357
|
+
]
|
|
3358
|
+
}
|
|
3359
|
+
),
|
|
3360
|
+
/* @__PURE__ */ o.jsxs(
|
|
3361
|
+
Zt,
|
|
3207
3362
|
{
|
|
3208
|
-
className:
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
)
|
|
3221
|
-
|
|
3363
|
+
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
|
|
3364
|
+
"aria-describedby": void 0,
|
|
3365
|
+
children: [
|
|
3366
|
+
/* @__PURE__ */ o.jsx(An, { children: /* @__PURE__ */ o.jsx(en, { children: "Sidebar" }) }),
|
|
3367
|
+
t.data.items.map((n) => /* @__PURE__ */ o.jsx(_t, { item: n }, n.label))
|
|
3368
|
+
]
|
|
3369
|
+
}
|
|
3370
|
+
)
|
|
3371
|
+
] });
|
|
3372
|
+
}, kl = ({ children: e }) => {
|
|
3373
|
+
const t = At(), { setActiveAnchor: n } = $t(), { meta: r, authentication: a } = Be();
|
|
3374
|
+
Ol(), Il();
|
|
3375
|
+
const s = Lt(t.pathname);
|
|
3376
|
+
return be(() => {
|
|
3377
|
+
var i;
|
|
3378
|
+
(i = a == null ? void 0 : a.pageLoad) == null || i.call(a);
|
|
3379
|
+
}, [a]), be(() => {
|
|
3380
|
+
t.pathname !== s.current && n(""), s.current = t.pathname;
|
|
3381
|
+
}, [t.pathname, n]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
3382
|
+
!1,
|
|
3383
|
+
/* @__PURE__ */ o.jsxs(Ot, { titleTemplate: r == null ? void 0 : r.title, children: [
|
|
3384
|
+
(r == null ? void 0 : r.description) && /* @__PURE__ */ o.jsx("meta", { name: "description", content: r.description }),
|
|
3385
|
+
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ o.jsx("link", { rel: "icon", href: r.favicon })
|
|
3386
|
+
] }),
|
|
3387
|
+
/* @__PURE__ */ o.jsx(Te, { name: "layout-before-head" }),
|
|
3388
|
+
/* @__PURE__ */ o.jsx(go, {}),
|
|
3389
|
+
/* @__PURE__ */ o.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ o.jsx(
|
|
3390
|
+
Hn,
|
|
3391
|
+
{
|
|
3392
|
+
fallback: /* @__PURE__ */ o.jsx("main", { className: "grid h-full place-items-center", children: /* @__PURE__ */ o.jsx(qa, {}) }),
|
|
3393
|
+
children: /* @__PURE__ */ o.jsxs(Jt, { direction: "left", children: [
|
|
3394
|
+
/* @__PURE__ */ o.jsx(Al, {}),
|
|
3395
|
+
/* @__PURE__ */ o.jsx(
|
|
3396
|
+
"div",
|
|
3397
|
+
{
|
|
3398
|
+
className: O(
|
|
3399
|
+
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
3400
|
+
"peer-data-[navigation=false]:hidden"
|
|
3401
|
+
),
|
|
3402
|
+
children: /* @__PURE__ */ o.jsxs(ho, { className: "flex items-center gap-2", children: [
|
|
3403
|
+
/* @__PURE__ */ o.jsx(Xa, { size: 16, strokeWidth: 1.5 }),
|
|
3404
|
+
/* @__PURE__ */ o.jsx("span", { className: "text-sm", children: "Menu" })
|
|
3405
|
+
] })
|
|
3406
|
+
}
|
|
3407
|
+
),
|
|
3408
|
+
/* @__PURE__ */ o.jsxs(
|
|
3409
|
+
"main",
|
|
3410
|
+
{
|
|
3411
|
+
className: O(
|
|
3412
|
+
"h-full dark:border-white/10 translate-x-0",
|
|
3413
|
+
"lg:overflow-visible",
|
|
3414
|
+
// This works in tandem with the `SidebarWrapper` component
|
|
3415
|
+
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
3416
|
+
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
3417
|
+
),
|
|
3418
|
+
children: [
|
|
3419
|
+
/* @__PURE__ */ o.jsx(Te, { name: "zudoku-before-content" }),
|
|
3420
|
+
e ?? /* @__PURE__ */ o.jsx(jn, {}),
|
|
3421
|
+
/* @__PURE__ */ o.jsx(Te, { name: "zudoku-after-content" })
|
|
3422
|
+
]
|
|
3423
|
+
}
|
|
3424
|
+
)
|
|
3425
|
+
] })
|
|
3426
|
+
}
|
|
3427
|
+
) })
|
|
3428
|
+
] });
|
|
3429
|
+
}, Zl = Fo, ec = ha, tc = wo, nc = kl, rc = It, oc = Vo, ac = es, sc = vs, ic = ws, lc = Dt, cc = Ot;
|
|
3222
3430
|
export {
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3431
|
+
sc as Bootstrap,
|
|
3432
|
+
ic as BootstrapStatic,
|
|
3433
|
+
lc as Button,
|
|
3434
|
+
ec as Callout,
|
|
3435
|
+
tc as DevPortal,
|
|
3436
|
+
cc as Head,
|
|
3437
|
+
nc as Layout,
|
|
3438
|
+
rc as Link,
|
|
3439
|
+
oc as RouterError,
|
|
3440
|
+
ac as ServerError,
|
|
3441
|
+
Zl as useMDXComponents
|
|
3234
3442
|
};
|
|
3235
3443
|
//# sourceMappingURL=zudoku.components.js.map
|