zudoku 0.0.0-fa903e7 → 0.0.0-fc5c03b
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/client.d.ts +7 -0
- package/dist/app/entry.client.d.ts +1 -0
- package/dist/app/entry.client.js +13 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +1 -0
- package/dist/app/entry.server.js +1 -0
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +2 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.d.ts +3 -0
- package/dist/app/sentry.js +19 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/tailwind.d.ts +2 -1
- package/dist/app/tailwind.js +64 -52
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cli.js +0 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/config/common.d.ts +8 -0
- package/dist/config/common.js +2 -0
- package/dist/config/common.js.map +1 -0
- package/dist/config/config.d.ts +3 -2
- package/dist/config/loader.d.ts +20 -0
- package/dist/config/loader.js +154 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +4911 -0
- package/dist/config/validators/common.js +276 -0
- package/dist/config/validators/common.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -0
- package/dist/config/validators/icon-types.js +2 -0
- package/dist/config/validators/icon-types.js.map +1 -0
- package/dist/config/validators/validate.d.ts +760 -524
- package/dist/config/validators/validate.js +9 -234
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +7 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +4 -4
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +1 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/Search.d.ts +3 -1
- package/dist/lib/components/Search.js +3 -3
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +0 -4
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +2 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +3 -4
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
- package/dist/lib/components/navigation/SidebarItem.js +5 -10
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -1
- package/dist/lib/oas/graphql/index.js +4 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +6 -0
- package/dist/lib/plugins/api-catalog/Catalog.js +29 -0
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
- package/dist/lib/plugins/api-catalog/index.d.ts +23 -0
- package/dist/lib/plugins/api-catalog/index.js +15 -0
- package/dist/lib/plugins/api-catalog/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +2 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +2 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +47 -2
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/build.js +15 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +6 -4
- package/dist/vite/config.js +42 -15
- 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 +12 -3
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +25 -16
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api.js +44 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -0
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.js +20 -0
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +48 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
- package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
- package/dist/vite/plugin-theme-css.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -1
- package/dist/vite/prerender.js +2 -2
- package/dist/vite/prerender.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/env.d.ts +6 -0
- package/dist/zuplo/env.js +9 -0
- package/dist/zuplo/env.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +2 -2
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/AnchorLink-BR0MvI7n.js +35 -0
- package/lib/AnchorLink-BR0MvI7n.js.map +1 -0
- package/lib/{Markdown-ievDDhFT.js → Markdown-CRsmPPfY.js} +13084 -13096
- package/lib/Markdown-CRsmPPfY.js.map +1 -0
- package/lib/{MdxPage-B2FpJ9KC.js → MdxPage-Wp8QU0-q.js} +85 -80
- package/lib/MdxPage-Wp8QU0-q.js.map +1 -0
- package/lib/{OperationList-BkNQEsNs.js → OperationList-u8xHU9-b.js} +982 -969
- package/lib/{OperationList-BkNQEsNs.js.map → OperationList-u8xHU9-b.js.map} +1 -1
- package/lib/{SlotletProvider-DyomlzGx.js → SlotletProvider-BgvYIPQe.js} +2 -2
- package/lib/{SlotletProvider-DyomlzGx.js.map → SlotletProvider-BgvYIPQe.js.map} +1 -1
- package/lib/{SyntaxHighlight-DkLOsjHS.js → SyntaxHighlight-C31iouiO.js} +1 -3
- package/lib/{SyntaxHighlight-DkLOsjHS.js.map → SyntaxHighlight-C31iouiO.js.map} +1 -1
- package/lib/assets/{worker-BHClFO3A.js → worker-C_2va8B8.js} +435 -432
- package/lib/assets/{worker-BHClFO3A.js.map → worker-C_2va8B8.js.map} +1 -1
- package/lib/{createServer-CpJlUPtn.js → createServer-BCAHdrpE.js} +5 -2
- package/lib/{createServer-CpJlUPtn.js.map → createServer-BCAHdrpE.js.map} +1 -1
- package/lib/{index-C7SaIME0.js → index-CmdLGbbk.js} +7 -5
- package/lib/index-CmdLGbbk.js.map +1 -0
- package/lib/{AnchorLink-CDlhr8gL.js → index.esm-Bm8pj-bc.js} +223 -254
- package/lib/index.esm-Bm8pj-bc.js.map +1 -0
- package/lib/ui/Drawer.js +79 -79
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/zudoku.auth-openid.js +42 -37
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +386 -367
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +121 -0
- package/lib/zudoku.plugin-api-catalog.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/package.json +19 -6
- package/src/app/entry.client.tsx +15 -0
- package/src/app/entry.server.tsx +1 -0
- package/src/app/main.tsx +5 -1
- package/src/app/sentry.ts +24 -0
- package/src/app/tailwind.ts +67 -52
- package/src/lib/authentication/providers/openid.tsx +7 -2
- package/src/lib/components/Heading.tsx +13 -13
- package/src/lib/components/Layout.tsx +8 -3
- package/src/lib/components/Markdown.tsx +1 -1
- package/src/lib/components/MobileTopNavigation.tsx +18 -18
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/Search.tsx +3 -3
- package/src/lib/components/SyntaxHighlight.tsx +0 -4
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +18 -8
- package/src/lib/components/navigation/SidebarCategory.tsx +10 -9
- package/src/lib/components/navigation/SidebarItem.tsx +10 -13
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/core/ZudokuContext.ts +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +124 -0
- package/src/lib/plugins/api-catalog/index.tsx +50 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +2 -0
- package/src/lib/plugins/markdown/index.tsx +2 -1
- package/src/lib/plugins/markdown/resolver.ts +2 -4
- package/src/lib/plugins/openapi/OperationList.tsx +64 -3
- package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +2 -5
- package/dist/vite/plugin-custom-css.js.map +0 -1
- package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
- package/lib/Markdown-ievDDhFT.js.map +0 -1
- package/lib/MdxPage-B2FpJ9KC.js.map +0 -1
- package/lib/index-C7SaIME0.js.map +0 -1
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
var yt = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Ce = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var bt = (e, t, r) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
-
var S = (e, t, r) => bt(e, typeof t != "symbol" ? t + "" : t, r),
|
|
7
|
-
var
|
|
6
|
+
var S = (e, t, r) => bt(e, typeof t != "symbol" ? t + "" : t, r), Pe = (e, t, r) => t.has(e) || Ce("Cannot " + r);
|
|
7
|
+
var u = (e, t, r) => (Pe(e, t, "read from private field"), r ? r.call(e) : t.get(e)), N = (e, t, r) => t.has(e) ? Ce("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), y = (e, t, r, s) => (Pe(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
|
|
8
8
|
var J = (e, t, r, s) => ({
|
|
9
9
|
set _(n) {
|
|
10
10
|
y(e, t, n, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return u(e, t, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { a as He,
|
|
17
|
-
import { d as
|
|
18
|
-
import { u as
|
|
19
|
-
import { E as Ue, S as
|
|
16
|
+
import { a as He, H as me } from "./index.esm-Bm8pj-bc.js";
|
|
17
|
+
import { d as jt, R as wt, N as ae, u as St, L as ge } from "./index-Yn8c3UWE.js";
|
|
18
|
+
import { u as Nt } from "./state-tsXBLONe.js";
|
|
19
|
+
import { E as Ue, S as O, a as Et, R as Ct } from "./SlotletProvider-BgvYIPQe.js";
|
|
20
20
|
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
21
|
-
import { Button as
|
|
22
|
-
import { Callout as
|
|
23
|
-
import { S as $e, l as Ke, Q as
|
|
24
|
-
import { M as
|
|
21
|
+
import { Button as Pt } from "./ui/Button.js";
|
|
22
|
+
import { Callout as kt } from "./ui/Callout.js";
|
|
23
|
+
import { S as $e, l as Ke, Q as Dt, n as w, m as ke, o as De, p as A, q as Ot, r as At, t as Mt, v as Rt, w as Oe, x as Ae, y as It, h as Me, z as Re, A as Tt, d as _t, B as Ve, C as Qt, j as q, u as F, D as Ze, E as Ft, g as qt, Z as zt } from "./utils-DcpDOncX.js";
|
|
24
|
+
import { M as Bt, u as se } from "./hook-hEqe7fPB.js";
|
|
25
25
|
import * as G from "react";
|
|
26
|
-
import Ye, { StrictMode as We, useState as
|
|
27
|
-
import { a as xe, c as
|
|
28
|
-
import { B as
|
|
29
|
-
import { I as
|
|
26
|
+
import Ye, { StrictMode as We, useState as Q, useEffect as z, useRef as pe, useCallback as Lt, Suspense as ve, memo as Xe, forwardRef as Ht, createContext as Je, Component as Ut, createElement as Ie, useMemo as ne, useContext as $t, Fragment as Kt } from "react";
|
|
27
|
+
import { a as xe, c as Vt } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
28
|
+
import { B as Zt } from "./router-lfyopgBI.js";
|
|
29
|
+
import { I as Yt, y as Wt, u as ye, j as be, O as Ge } from "./index-Czzd9rjU.js";
|
|
30
30
|
import { S as ue, a as ie } from "./SidebarBadge-DxFJcJ6V.js";
|
|
31
31
|
import { C as je } from "./ClientOnly-E7hGysn1.js";
|
|
32
|
-
import { ChevronRightIcon as
|
|
32
|
+
import { ChevronRightIcon as Xt, ExternalLinkIcon as Jt, CircleXIcon as Gt, SearchIcon as er, MoonStarIcon as tr, SunIcon as rr, MenuIcon as ar, PanelLeftIcon as sr } from "lucide-react";
|
|
33
33
|
import { Drawer as et, DrawerTrigger as tt, DrawerContent as rt, DrawerTitle as at } from "./ui/Drawer.js";
|
|
34
34
|
import { c as R } from "./cn-BmFQLtkS.js";
|
|
35
|
-
import { u as we, a as
|
|
36
|
-
import { c as
|
|
35
|
+
import { u as we, a as nr, V as ir } from "./Markdown-CRsmPPfY.js";
|
|
36
|
+
import { c as or, a as lr } from "./index-BuAyrJe3.js";
|
|
37
|
+
import { A as cr, M as ur, u as dr } from "./AnchorLink-BR0MvI7n.js";
|
|
37
38
|
import * as oe from "@radix-ui/react-collapsible";
|
|
38
39
|
import { B as de } from "./Button-jK0EsymC.js";
|
|
39
40
|
import { DropdownMenu as hr, DropdownMenuTrigger as fr, DropdownMenuContent as mr, DropdownMenuLabel as gr, DropdownMenuSeparator as le, DropdownMenuSub as pr, DropdownMenuSubTrigger as vr, DropdownMenuPortal as xr, DropdownMenuSubContent as yr, DropdownMenuItem as br } from "./ui/DropdownMenu.js";
|
|
40
41
|
import { VisuallyHidden as st } from "@radix-ui/react-visually-hidden";
|
|
41
|
-
import { z as jr, J as wr } from "./SyntaxHighlight-
|
|
42
|
+
import { z as jr, J as wr } from "./SyntaxHighlight-C31iouiO.js";
|
|
42
43
|
import { Z as Sr } from "./invariant-Caa8-XvF.js";
|
|
43
44
|
import { S as Nr } from "./Spinner-3cQDBVGr.js";
|
|
44
45
|
function Er({ error: e }) {
|
|
45
46
|
return /* @__PURE__ */ a.jsx(Ue, { error: e });
|
|
46
47
|
}
|
|
47
|
-
var k,
|
|
48
|
+
var k, ze, Cr = (ze = class extends $e {
|
|
48
49
|
constructor(t = {}) {
|
|
49
50
|
super();
|
|
50
51
|
N(this, k);
|
|
@@ -53,7 +54,7 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
53
54
|
build(t, r, s) {
|
|
54
55
|
const n = r.queryKey, o = r.queryHash ?? Ke(n, r);
|
|
55
56
|
let i = this.get(o);
|
|
56
|
-
return i || (i = new
|
|
57
|
+
return i || (i = new Dt({
|
|
57
58
|
cache: this,
|
|
58
59
|
queryKey: n,
|
|
59
60
|
queryHash: o,
|
|
@@ -63,14 +64,14 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
63
64
|
}), this.add(i)), i;
|
|
64
65
|
}
|
|
65
66
|
add(t) {
|
|
66
|
-
|
|
67
|
+
u(this, k).has(t.queryHash) || (u(this, k).set(t.queryHash, t), this.notify({
|
|
67
68
|
type: "added",
|
|
68
69
|
query: t
|
|
69
70
|
}));
|
|
70
71
|
}
|
|
71
72
|
remove(t) {
|
|
72
|
-
const r =
|
|
73
|
-
r && (t.destroy(), r === t &&
|
|
73
|
+
const r = u(this, k).get(t.queryHash);
|
|
74
|
+
r && (t.destroy(), r === t && u(this, k).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
74
75
|
}
|
|
75
76
|
clear() {
|
|
76
77
|
w.batch(() => {
|
|
@@ -80,10 +81,10 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
83
|
get(t) {
|
|
83
|
-
return
|
|
84
|
+
return u(this, k).get(t);
|
|
84
85
|
}
|
|
85
86
|
getAll() {
|
|
86
|
-
return [...
|
|
87
|
+
return [...u(this, k).values()];
|
|
87
88
|
}
|
|
88
89
|
find(t) {
|
|
89
90
|
const r = { exact: !0, ...t };
|
|
@@ -116,7 +117,7 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
116
117
|
});
|
|
117
118
|
});
|
|
118
119
|
}
|
|
119
|
-
}, k = new WeakMap(),
|
|
120
|
+
}, k = new WeakMap(), ze), j, Z, Be, Pr = (Be = class extends $e {
|
|
120
121
|
constructor(t = {}) {
|
|
121
122
|
super();
|
|
122
123
|
N(this, j);
|
|
@@ -124,7 +125,7 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
124
125
|
this.config = t, y(this, j, /* @__PURE__ */ new Map()), y(this, Z, Date.now());
|
|
125
126
|
}
|
|
126
127
|
build(t, r, s) {
|
|
127
|
-
const n = new
|
|
128
|
+
const n = new Bt({
|
|
128
129
|
mutationCache: this,
|
|
129
130
|
mutationId: ++J(this, Z)._,
|
|
130
131
|
options: t.defaultMutationOptions(r),
|
|
@@ -133,26 +134,26 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
133
134
|
return this.add(n), n;
|
|
134
135
|
}
|
|
135
136
|
add(t) {
|
|
136
|
-
const r = ee(t), s =
|
|
137
|
-
s.push(t),
|
|
137
|
+
const r = ee(t), s = u(this, j).get(r) ?? [];
|
|
138
|
+
s.push(t), u(this, j).set(r, s), this.notify({ type: "added", mutation: t });
|
|
138
139
|
}
|
|
139
140
|
remove(t) {
|
|
140
141
|
var s;
|
|
141
142
|
const r = ee(t);
|
|
142
|
-
if (
|
|
143
|
-
const n = (s =
|
|
144
|
-
n && (n.length === 0 ?
|
|
143
|
+
if (u(this, j).has(r)) {
|
|
144
|
+
const n = (s = u(this, j).get(r)) == null ? void 0 : s.filter((o) => o !== t);
|
|
145
|
+
n && (n.length === 0 ? u(this, j).delete(r) : u(this, j).set(r, n));
|
|
145
146
|
}
|
|
146
147
|
this.notify({ type: "removed", mutation: t });
|
|
147
148
|
}
|
|
148
149
|
canRun(t) {
|
|
149
150
|
var s;
|
|
150
|
-
const r = (s =
|
|
151
|
+
const r = (s = u(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n.state.status === "pending");
|
|
151
152
|
return !r || r === t;
|
|
152
153
|
}
|
|
153
154
|
runNext(t) {
|
|
154
155
|
var s;
|
|
155
|
-
const r = (s =
|
|
156
|
+
const r = (s = u(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n !== t && n.state.isPaused);
|
|
156
157
|
return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
|
|
157
158
|
}
|
|
158
159
|
clear() {
|
|
@@ -163,16 +164,16 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
163
164
|
});
|
|
164
165
|
}
|
|
165
166
|
getAll() {
|
|
166
|
-
return [...
|
|
167
|
+
return [...u(this, j).values()].flat();
|
|
167
168
|
}
|
|
168
169
|
find(t) {
|
|
169
170
|
const r = { exact: !0, ...t };
|
|
170
171
|
return this.getAll().find(
|
|
171
|
-
(s) =>
|
|
172
|
+
(s) => De(r, s)
|
|
172
173
|
);
|
|
173
174
|
}
|
|
174
175
|
findAll(t = {}) {
|
|
175
|
-
return this.getAll().filter((r) =>
|
|
176
|
+
return this.getAll().filter((r) => De(t, r));
|
|
176
177
|
}
|
|
177
178
|
notify(t) {
|
|
178
179
|
w.batch(() => {
|
|
@@ -185,11 +186,11 @@ var k, Le, Pr = (Le = class extends $e {
|
|
|
185
186
|
const t = this.getAll().filter((r) => r.state.isPaused);
|
|
186
187
|
return w.batch(
|
|
187
188
|
() => Promise.all(
|
|
188
|
-
t.map((r) => r.continue().catch(
|
|
189
|
+
t.map((r) => r.continue().catch(A))
|
|
189
190
|
)
|
|
190
191
|
);
|
|
191
192
|
}
|
|
192
|
-
}, j = new WeakMap(), Z = new WeakMap(),
|
|
193
|
+
}, j = new WeakMap(), Z = new WeakMap(), Be);
|
|
193
194
|
function ee(e) {
|
|
194
195
|
var t;
|
|
195
196
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
@@ -197,59 +198,59 @@ function ee(e) {
|
|
|
197
198
|
function Te(e) {
|
|
198
199
|
return {
|
|
199
200
|
onFetch: (t, r) => {
|
|
200
|
-
var
|
|
201
|
-
const s = t.options, n = (h = (
|
|
202
|
-
let
|
|
201
|
+
var f, m, h, p, v;
|
|
202
|
+
const s = t.options, n = (h = (m = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : m.fetchMore) == null ? void 0 : h.direction, o = ((p = t.state.data) == null ? void 0 : p.pages) || [], i = ((v = t.state.data) == null ? void 0 : v.pageParams) || [];
|
|
203
|
+
let c = { pages: [], pageParams: [] }, d = 0;
|
|
203
204
|
const l = async () => {
|
|
204
|
-
let
|
|
205
|
+
let g = !1;
|
|
205
206
|
const E = (b) => {
|
|
206
207
|
Object.defineProperty(b, "signal", {
|
|
207
208
|
enumerable: !0,
|
|
208
|
-
get: () => (t.signal.aborted ?
|
|
209
|
-
|
|
209
|
+
get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
|
|
210
|
+
g = !0;
|
|
210
211
|
}), t.signal)
|
|
211
212
|
});
|
|
212
|
-
}, W =
|
|
213
|
-
if (
|
|
213
|
+
}, W = Ot(t.options, t.fetchOptions), $ = async (b, C, K) => {
|
|
214
|
+
if (g)
|
|
214
215
|
return Promise.reject();
|
|
215
|
-
if (
|
|
216
|
+
if (C == null && b.pages.length)
|
|
216
217
|
return Promise.resolve(b);
|
|
217
218
|
const X = {
|
|
218
219
|
queryKey: t.queryKey,
|
|
219
|
-
pageParam:
|
|
220
|
+
pageParam: C,
|
|
220
221
|
direction: K ? "backward" : "forward",
|
|
221
222
|
meta: t.options.meta
|
|
222
223
|
};
|
|
223
224
|
E(X);
|
|
224
225
|
const xt = await W(
|
|
225
226
|
X
|
|
226
|
-
), { maxPages: Ne } = t.options, Ee = K ?
|
|
227
|
+
), { maxPages: Ne } = t.options, Ee = K ? At : Mt;
|
|
227
228
|
return {
|
|
228
229
|
pages: Ee(b.pages, xt, Ne),
|
|
229
|
-
pageParams: Ee(b.pageParams,
|
|
230
|
+
pageParams: Ee(b.pageParams, C, Ne)
|
|
230
231
|
};
|
|
231
232
|
};
|
|
232
233
|
if (n && o.length) {
|
|
233
|
-
const b = n === "backward",
|
|
234
|
+
const b = n === "backward", C = b ? kr : _e, K = {
|
|
234
235
|
pages: o,
|
|
235
236
|
pageParams: i
|
|
236
|
-
}, X =
|
|
237
|
-
|
|
237
|
+
}, X = C(s, K);
|
|
238
|
+
c = await $(K, X, b);
|
|
238
239
|
} else {
|
|
239
240
|
const b = e ?? o.length;
|
|
240
241
|
do {
|
|
241
|
-
const
|
|
242
|
-
if (d > 0 &&
|
|
242
|
+
const C = d === 0 ? i[0] ?? s.initialPageParam : _e(s, c);
|
|
243
|
+
if (d > 0 && C == null)
|
|
243
244
|
break;
|
|
244
|
-
|
|
245
|
+
c = await $(c, C), d++;
|
|
245
246
|
} while (d < b);
|
|
246
247
|
}
|
|
247
|
-
return
|
|
248
|
+
return c;
|
|
248
249
|
};
|
|
249
250
|
t.options.persister ? t.fetchFn = () => {
|
|
250
|
-
var
|
|
251
|
-
return (E = (
|
|
252
|
-
|
|
251
|
+
var g, E;
|
|
252
|
+
return (E = (g = t.options).persister) == null ? void 0 : E.call(
|
|
253
|
+
g,
|
|
253
254
|
l,
|
|
254
255
|
{
|
|
255
256
|
queryKey: t.queryKey,
|
|
@@ -275,65 +276,65 @@ function kr(e, { pages: t, pageParams: r }) {
|
|
|
275
276
|
var s;
|
|
276
277
|
return t.length > 0 ? (s = e.getPreviousPageParam) == null ? void 0 : s.call(e, t[0], t, r[0], r) : void 0;
|
|
277
278
|
}
|
|
278
|
-
var x, I, T,
|
|
279
|
+
var x, I, T, B, L, _, H, U, Le, Dr = (Le = class {
|
|
279
280
|
constructor(e = {}) {
|
|
280
281
|
N(this, x);
|
|
281
282
|
N(this, I);
|
|
282
283
|
N(this, T);
|
|
283
|
-
N(this, z);
|
|
284
284
|
N(this, B);
|
|
285
|
+
N(this, L);
|
|
285
286
|
N(this, _);
|
|
286
287
|
N(this, H);
|
|
287
288
|
N(this, U);
|
|
288
|
-
y(this, x, e.queryCache || new
|
|
289
|
+
y(this, x, e.queryCache || new Cr()), y(this, I, e.mutationCache || new Pr()), y(this, T, e.defaultOptions || {}), y(this, B, /* @__PURE__ */ new Map()), y(this, L, /* @__PURE__ */ new Map()), y(this, _, 0);
|
|
289
290
|
}
|
|
290
291
|
mount() {
|
|
291
|
-
J(this, _)._++,
|
|
292
|
-
e && (await this.resumePausedMutations(),
|
|
293
|
-
})), y(this, U,
|
|
294
|
-
e && (await this.resumePausedMutations(),
|
|
292
|
+
J(this, _)._++, u(this, _) === 1 && (y(this, H, Rt.subscribe(async (e) => {
|
|
293
|
+
e && (await this.resumePausedMutations(), u(this, x).onFocus());
|
|
294
|
+
})), y(this, U, Oe.subscribe(async (e) => {
|
|
295
|
+
e && (await this.resumePausedMutations(), u(this, x).onOnline());
|
|
295
296
|
})));
|
|
296
297
|
}
|
|
297
298
|
unmount() {
|
|
298
299
|
var e, t;
|
|
299
|
-
J(this, _)._--,
|
|
300
|
+
J(this, _)._--, u(this, _) === 0 && ((e = u(this, H)) == null || e.call(this), y(this, H, void 0), (t = u(this, U)) == null || t.call(this), y(this, U, void 0));
|
|
300
301
|
}
|
|
301
302
|
isFetching(e) {
|
|
302
|
-
return
|
|
303
|
+
return u(this, x).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
303
304
|
}
|
|
304
305
|
isMutating(e) {
|
|
305
|
-
return
|
|
306
|
+
return u(this, I).findAll({ ...e, status: "pending" }).length;
|
|
306
307
|
}
|
|
307
308
|
getQueryData(e) {
|
|
308
309
|
var r;
|
|
309
310
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
310
|
-
return (r =
|
|
311
|
+
return (r = u(this, x).get(t.queryHash)) == null ? void 0 : r.state.data;
|
|
311
312
|
}
|
|
312
313
|
ensureQueryData(e) {
|
|
313
314
|
const t = this.getQueryData(e.queryKey);
|
|
314
315
|
if (t === void 0)
|
|
315
316
|
return this.fetchQuery(e);
|
|
316
317
|
{
|
|
317
|
-
const r = this.defaultQueryOptions(e), s =
|
|
318
|
-
return e.revalidateIfStale && s.isStaleByTime(
|
|
318
|
+
const r = this.defaultQueryOptions(e), s = u(this, x).build(this, r);
|
|
319
|
+
return e.revalidateIfStale && s.isStaleByTime(Ae(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(t);
|
|
319
320
|
}
|
|
320
321
|
}
|
|
321
322
|
getQueriesData(e) {
|
|
322
|
-
return
|
|
323
|
+
return u(this, x).findAll(e).map(({ queryKey: t, state: r }) => {
|
|
323
324
|
const s = r.data;
|
|
324
325
|
return [t, s];
|
|
325
326
|
});
|
|
326
327
|
}
|
|
327
328
|
setQueryData(e, t, r) {
|
|
328
|
-
const s = this.defaultQueryOptions({ queryKey: e }), n =
|
|
329
|
+
const s = this.defaultQueryOptions({ queryKey: e }), n = u(this, x).get(
|
|
329
330
|
s.queryHash
|
|
330
|
-
), o = n == null ? void 0 : n.state.data, i =
|
|
331
|
+
), o = n == null ? void 0 : n.state.data, i = It(t, o);
|
|
331
332
|
if (i !== void 0)
|
|
332
|
-
return
|
|
333
|
+
return u(this, x).build(this, s).setData(i, { ...r, manual: !0 });
|
|
333
334
|
}
|
|
334
335
|
setQueriesData(e, t, r) {
|
|
335
336
|
return w.batch(
|
|
336
|
-
() =>
|
|
337
|
+
() => u(this, x).findAll(e).map(({ queryKey: s }) => [
|
|
337
338
|
s,
|
|
338
339
|
this.setQueryData(s, t, r)
|
|
339
340
|
])
|
|
@@ -342,10 +343,10 @@ var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
|
|
|
342
343
|
getQueryState(e) {
|
|
343
344
|
var r;
|
|
344
345
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
345
|
-
return (r =
|
|
346
|
+
return (r = u(this, x).get(t.queryHash)) == null ? void 0 : r.state;
|
|
346
347
|
}
|
|
347
348
|
removeQueries(e) {
|
|
348
|
-
const t =
|
|
349
|
+
const t = u(this, x);
|
|
349
350
|
w.batch(() => {
|
|
350
351
|
t.findAll(e).forEach((r) => {
|
|
351
352
|
t.remove(r);
|
|
@@ -353,7 +354,7 @@ var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
|
|
|
353
354
|
});
|
|
354
355
|
}
|
|
355
356
|
resetQueries(e, t) {
|
|
356
|
-
const r =
|
|
357
|
+
const r = u(this, x), s = {
|
|
357
358
|
type: "active",
|
|
358
359
|
...e
|
|
359
360
|
};
|
|
@@ -363,13 +364,13 @@ var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
|
|
|
363
364
|
}
|
|
364
365
|
cancelQueries(e = {}, t = {}) {
|
|
365
366
|
const r = { revert: !0, ...t }, s = w.batch(
|
|
366
|
-
() =>
|
|
367
|
+
() => u(this, x).findAll(e).map((n) => n.cancel(r))
|
|
367
368
|
);
|
|
368
|
-
return Promise.all(s).then(
|
|
369
|
+
return Promise.all(s).then(A).catch(A);
|
|
369
370
|
}
|
|
370
371
|
invalidateQueries(e = {}, t = {}) {
|
|
371
372
|
return w.batch(() => {
|
|
372
|
-
if (
|
|
373
|
+
if (u(this, x).findAll(e).forEach((s) => {
|
|
373
374
|
s.invalidate();
|
|
374
375
|
}), e.refetchType === "none")
|
|
375
376
|
return Promise.resolve();
|
|
@@ -385,69 +386,69 @@ var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
|
|
|
385
386
|
...t,
|
|
386
387
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
387
388
|
}, s = w.batch(
|
|
388
|
-
() =>
|
|
389
|
+
() => u(this, x).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
|
|
389
390
|
let o = n.fetch(void 0, r);
|
|
390
|
-
return r.throwOnError || (o = o.catch(
|
|
391
|
+
return r.throwOnError || (o = o.catch(A)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
|
|
391
392
|
})
|
|
392
393
|
);
|
|
393
|
-
return Promise.all(s).then(
|
|
394
|
+
return Promise.all(s).then(A);
|
|
394
395
|
}
|
|
395
396
|
fetchQuery(e) {
|
|
396
397
|
const t = this.defaultQueryOptions(e);
|
|
397
398
|
t.retry === void 0 && (t.retry = !1);
|
|
398
|
-
const r =
|
|
399
|
+
const r = u(this, x).build(this, t);
|
|
399
400
|
return r.isStaleByTime(
|
|
400
|
-
|
|
401
|
+
Ae(t.staleTime, r)
|
|
401
402
|
) ? r.fetch(t) : Promise.resolve(r.state.data);
|
|
402
403
|
}
|
|
403
404
|
prefetchQuery(e) {
|
|
404
|
-
return this.fetchQuery(e).then(
|
|
405
|
+
return this.fetchQuery(e).then(A).catch(A);
|
|
405
406
|
}
|
|
406
407
|
fetchInfiniteQuery(e) {
|
|
407
408
|
return e.behavior = Te(e.pages), this.fetchQuery(e);
|
|
408
409
|
}
|
|
409
410
|
prefetchInfiniteQuery(e) {
|
|
410
|
-
return this.fetchInfiniteQuery(e).then(
|
|
411
|
+
return this.fetchInfiniteQuery(e).then(A).catch(A);
|
|
411
412
|
}
|
|
412
413
|
ensureInfiniteQueryData(e) {
|
|
413
414
|
return e.behavior = Te(e.pages), this.ensureQueryData(e);
|
|
414
415
|
}
|
|
415
416
|
resumePausedMutations() {
|
|
416
|
-
return
|
|
417
|
+
return Oe.isOnline() ? u(this, I).resumePausedMutations() : Promise.resolve();
|
|
417
418
|
}
|
|
418
419
|
getQueryCache() {
|
|
419
|
-
return
|
|
420
|
+
return u(this, x);
|
|
420
421
|
}
|
|
421
422
|
getMutationCache() {
|
|
422
|
-
return
|
|
423
|
+
return u(this, I);
|
|
423
424
|
}
|
|
424
425
|
getDefaultOptions() {
|
|
425
|
-
return
|
|
426
|
+
return u(this, T);
|
|
426
427
|
}
|
|
427
428
|
setDefaultOptions(e) {
|
|
428
429
|
y(this, T, e);
|
|
429
430
|
}
|
|
430
431
|
setQueryDefaults(e, t) {
|
|
431
|
-
|
|
432
|
+
u(this, B).set(Me(e), {
|
|
432
433
|
queryKey: e,
|
|
433
434
|
defaultOptions: t
|
|
434
435
|
});
|
|
435
436
|
}
|
|
436
437
|
getQueryDefaults(e) {
|
|
437
|
-
const t = [...
|
|
438
|
+
const t = [...u(this, B).values()];
|
|
438
439
|
let r = {};
|
|
439
440
|
return t.forEach((s) => {
|
|
440
441
|
Re(e, s.queryKey) && (r = { ...r, ...s.defaultOptions });
|
|
441
442
|
}), r;
|
|
442
443
|
}
|
|
443
444
|
setMutationDefaults(e, t) {
|
|
444
|
-
|
|
445
|
+
u(this, L).set(Me(e), {
|
|
445
446
|
mutationKey: e,
|
|
446
447
|
defaultOptions: t
|
|
447
448
|
});
|
|
448
449
|
}
|
|
449
450
|
getMutationDefaults(e) {
|
|
450
|
-
const t = [...
|
|
451
|
+
const t = [...u(this, L).values()];
|
|
451
452
|
let r = {};
|
|
452
453
|
return t.forEach((s) => {
|
|
453
454
|
Re(e, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
|
|
@@ -457,7 +458,7 @@ var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
|
|
|
457
458
|
if (e._defaulted)
|
|
458
459
|
return e;
|
|
459
460
|
const t = {
|
|
460
|
-
...
|
|
461
|
+
...u(this, T).queries,
|
|
461
462
|
...this.getQueryDefaults(e.queryKey),
|
|
462
463
|
...e,
|
|
463
464
|
_defaulted: !0
|
|
@@ -465,109 +466,109 @@ var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
|
|
|
465
466
|
return t.queryHash || (t.queryHash = Ke(
|
|
466
467
|
t.queryKey,
|
|
467
468
|
t
|
|
468
|
-
)), 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 ===
|
|
469
|
+
)), 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 === Tt && (t.enabled = !1), t;
|
|
469
470
|
}
|
|
470
471
|
defaultMutationOptions(e) {
|
|
471
472
|
return e != null && e._defaulted ? e : {
|
|
472
|
-
...
|
|
473
|
+
...u(this, T).mutations,
|
|
473
474
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
474
475
|
...e,
|
|
475
476
|
_defaulted: !0
|
|
476
477
|
};
|
|
477
478
|
}
|
|
478
479
|
clear() {
|
|
479
|
-
|
|
480
|
+
u(this, x).clear(), u(this, I).clear();
|
|
480
481
|
}
|
|
481
|
-
}, x = new WeakMap(), I = new WeakMap(), T = new WeakMap(),
|
|
482
|
-
function
|
|
482
|
+
}, x = new WeakMap(), I = new WeakMap(), T = new WeakMap(), B = new WeakMap(), L = new WeakMap(), _ = new WeakMap(), H = new WeakMap(), U = new WeakMap(), Le);
|
|
483
|
+
function Or(e) {
|
|
483
484
|
return e;
|
|
484
485
|
}
|
|
485
|
-
function
|
|
486
|
+
function Qe(e, t, r) {
|
|
486
487
|
var d, l;
|
|
487
488
|
if (typeof t != "object" || t === null)
|
|
488
489
|
return;
|
|
489
|
-
const s = e.getMutationCache(), n = e.getQueryCache(), o = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((l = e.getDefaultOptions().hydrate) == null ? void 0 : l.deserializeData) ??
|
|
490
|
-
i.forEach(({ state:
|
|
491
|
-
var h,
|
|
490
|
+
const s = e.getMutationCache(), n = e.getQueryCache(), o = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((l = e.getDefaultOptions().hydrate) == null ? void 0 : l.deserializeData) ?? Or, i = t.mutations || [], c = t.queries || [];
|
|
491
|
+
i.forEach(({ state: f, ...m }) => {
|
|
492
|
+
var h, p;
|
|
492
493
|
s.build(
|
|
493
494
|
e,
|
|
494
495
|
{
|
|
495
496
|
...(h = e.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
|
|
496
|
-
...(
|
|
497
|
-
...
|
|
497
|
+
...(p = r == null ? void 0 : r.defaultOptions) == null ? void 0 : p.mutations,
|
|
498
|
+
...m
|
|
498
499
|
},
|
|
499
|
-
|
|
500
|
+
f
|
|
500
501
|
);
|
|
501
|
-
}),
|
|
502
|
+
}), c.forEach(({ queryKey: f, state: m, queryHash: h, meta: p, promise: v }) => {
|
|
502
503
|
var W, $;
|
|
503
|
-
let
|
|
504
|
-
const E =
|
|
505
|
-
if (
|
|
506
|
-
if (
|
|
507
|
-
const { fetchStatus: b, ...
|
|
508
|
-
|
|
509
|
-
...
|
|
504
|
+
let g = n.get(h);
|
|
505
|
+
const E = m.data === void 0 ? m.data : o(m.data);
|
|
506
|
+
if (g) {
|
|
507
|
+
if (g.state.dataUpdatedAt < m.dataUpdatedAt) {
|
|
508
|
+
const { fetchStatus: b, ...C } = m;
|
|
509
|
+
g.setState({
|
|
510
|
+
...C,
|
|
510
511
|
data: E
|
|
511
512
|
});
|
|
512
513
|
}
|
|
513
514
|
} else
|
|
514
|
-
|
|
515
|
+
g = n.build(
|
|
515
516
|
e,
|
|
516
517
|
{
|
|
517
518
|
...(W = e.getDefaultOptions().hydrate) == null ? void 0 : W.queries,
|
|
518
519
|
...($ = r == null ? void 0 : r.defaultOptions) == null ? void 0 : $.queries,
|
|
519
|
-
queryKey:
|
|
520
|
+
queryKey: f,
|
|
520
521
|
queryHash: h,
|
|
521
|
-
meta:
|
|
522
|
+
meta: p
|
|
522
523
|
},
|
|
523
524
|
// Reset fetch status to idle to avoid
|
|
524
525
|
// query being stuck in fetching state upon hydration
|
|
525
526
|
{
|
|
526
|
-
...
|
|
527
|
+
...m,
|
|
527
528
|
data: E,
|
|
528
529
|
fetchStatus: "idle"
|
|
529
530
|
}
|
|
530
531
|
);
|
|
531
532
|
if (v) {
|
|
532
533
|
const b = Promise.resolve(v).then(o);
|
|
533
|
-
|
|
534
|
+
g.fetch(void 0, { initialPromise: b });
|
|
534
535
|
}
|
|
535
536
|
});
|
|
536
537
|
}
|
|
537
|
-
var
|
|
538
|
+
var Ar = ({
|
|
538
539
|
children: e,
|
|
539
540
|
options: t = {},
|
|
540
541
|
state: r,
|
|
541
542
|
queryClient: s
|
|
542
543
|
}) => {
|
|
543
|
-
const n =
|
|
544
|
-
return
|
|
544
|
+
const n = _t(s), [o, i] = G.useState(), c = G.useRef(t);
|
|
545
|
+
return c.current = t, G.useMemo(() => {
|
|
545
546
|
if (r) {
|
|
546
547
|
if (typeof r != "object")
|
|
547
548
|
return;
|
|
548
|
-
const d = n.getQueryCache(), l = r.queries || [],
|
|
549
|
+
const d = n.getQueryCache(), l = r.queries || [], f = [], m = [];
|
|
549
550
|
for (const h of l) {
|
|
550
|
-
const
|
|
551
|
-
if (!
|
|
552
|
-
|
|
551
|
+
const p = d.get(h.queryHash);
|
|
552
|
+
if (!p)
|
|
553
|
+
f.push(h);
|
|
553
554
|
else {
|
|
554
|
-
const v = h.state.dataUpdatedAt >
|
|
555
|
+
const v = h.state.dataUpdatedAt > p.state.dataUpdatedAt, g = o == null ? void 0 : o.find(
|
|
555
556
|
(E) => E.queryHash === h.queryHash
|
|
556
557
|
);
|
|
557
|
-
v && (!
|
|
558
|
+
v && (!g || h.state.dataUpdatedAt > g.state.dataUpdatedAt) && m.push(h);
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
|
-
|
|
561
|
-
(h) => h ? [...h, ...
|
|
561
|
+
f.length > 0 && Qe(n, { queries: f }, c.current), m.length > 0 && i(
|
|
562
|
+
(h) => h ? [...h, ...m] : m
|
|
562
563
|
);
|
|
563
564
|
}
|
|
564
565
|
}, [n, o, r]), G.useEffect(() => {
|
|
565
|
-
o && (
|
|
566
|
+
o && (Qe(n, { queries: o }, c.current), i(void 0));
|
|
566
567
|
}, [n, o]), e;
|
|
567
568
|
}, Y = {};
|
|
568
|
-
const Mr = /* @__PURE__ */ xe(
|
|
569
|
+
const Mr = /* @__PURE__ */ xe(Zt), Rr = /* @__PURE__ */ xe(Yt), Ir = /* @__PURE__ */ xe(jt);
|
|
569
570
|
Object.defineProperty(Y, "__esModule", { value: !0 });
|
|
570
|
-
var Tr = Ye,
|
|
571
|
+
var Tr = Ye, D = Mr, Se = Rr, M = Ir;
|
|
571
572
|
function _r(e) {
|
|
572
573
|
if (e && e.__esModule) return e;
|
|
573
574
|
var t = /* @__PURE__ */ Object.create(null);
|
|
@@ -583,22 +584,22 @@ function _r(e) {
|
|
|
583
584
|
}
|
|
584
585
|
}), t.default = e, Object.freeze(t);
|
|
585
586
|
}
|
|
586
|
-
var
|
|
587
|
-
function
|
|
587
|
+
var P = /* @__PURE__ */ _r(Tr);
|
|
588
|
+
function Qr({
|
|
588
589
|
basename: e,
|
|
589
590
|
children: t,
|
|
590
591
|
location: r = "/",
|
|
591
592
|
future: s
|
|
592
593
|
}) {
|
|
593
594
|
typeof r == "string" && (r = M.parsePath(r));
|
|
594
|
-
let n =
|
|
595
|
+
let n = D.Action.Pop, o = {
|
|
595
596
|
pathname: r.pathname || "/",
|
|
596
597
|
search: r.search || "",
|
|
597
598
|
hash: r.hash || "",
|
|
598
599
|
state: r.state != null ? r.state : null,
|
|
599
600
|
key: r.key || "default"
|
|
600
601
|
}, i = nt();
|
|
601
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ P.createElement(M.Router, {
|
|
602
603
|
basename: e,
|
|
603
604
|
children: t,
|
|
604
605
|
location: o,
|
|
@@ -608,13 +609,13 @@ function Fr({
|
|
|
608
609
|
static: !0
|
|
609
610
|
});
|
|
610
611
|
}
|
|
611
|
-
function
|
|
612
|
+
function Fr({
|
|
612
613
|
context: e,
|
|
613
614
|
router: t,
|
|
614
615
|
hydrate: r = !0,
|
|
615
616
|
nonce: s
|
|
616
617
|
}) {
|
|
617
|
-
t && e || (process.env.NODE_ENV !== "production" ?
|
|
618
|
+
t && e || (process.env.NODE_ENV !== "production" ? D.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : D.UNSAFE_invariant(!1));
|
|
618
619
|
let n = {
|
|
619
620
|
router: t,
|
|
620
621
|
navigator: nt(),
|
|
@@ -626,37 +627,37 @@ function Qr({
|
|
|
626
627
|
let d = {
|
|
627
628
|
loaderData: e.loaderData,
|
|
628
629
|
actionData: e.actionData,
|
|
629
|
-
errors:
|
|
630
|
+
errors: zr(e.errors)
|
|
630
631
|
};
|
|
631
632
|
i = `window.__staticRouterHydrationData = JSON.parse(${Kr(JSON.stringify(JSON.stringify(d)))});`;
|
|
632
633
|
}
|
|
633
634
|
let {
|
|
634
|
-
state:
|
|
635
|
+
state: c
|
|
635
636
|
} = n.router;
|
|
636
|
-
return /* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement(M.UNSAFE_DataRouterContext.Provider, {
|
|
637
638
|
value: n
|
|
638
|
-
}, /* @__PURE__ */
|
|
639
|
-
value:
|
|
640
|
-
}, /* @__PURE__ */
|
|
639
|
+
}, /* @__PURE__ */ P.createElement(M.UNSAFE_DataRouterStateContext.Provider, {
|
|
640
|
+
value: c
|
|
641
|
+
}, /* @__PURE__ */ P.createElement(M.UNSAFE_FetchersContext.Provider, {
|
|
641
642
|
value: o
|
|
642
|
-
}, /* @__PURE__ */
|
|
643
|
+
}, /* @__PURE__ */ P.createElement(M.UNSAFE_ViewTransitionContext.Provider, {
|
|
643
644
|
value: {
|
|
644
645
|
isTransitioning: !1
|
|
645
646
|
}
|
|
646
|
-
}, /* @__PURE__ */
|
|
647
|
+
}, /* @__PURE__ */ P.createElement(M.Router, {
|
|
647
648
|
basename: n.basename,
|
|
648
|
-
location:
|
|
649
|
-
navigationType:
|
|
649
|
+
location: c.location,
|
|
650
|
+
navigationType: c.historyAction,
|
|
650
651
|
navigator: n.navigator,
|
|
651
652
|
static: n.static,
|
|
652
653
|
future: {
|
|
653
654
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
654
655
|
}
|
|
655
|
-
}, /* @__PURE__ */
|
|
656
|
+
}, /* @__PURE__ */ P.createElement(qr, {
|
|
656
657
|
routes: t.routes,
|
|
657
658
|
future: t.future,
|
|
658
|
-
state:
|
|
659
|
-
})))))), i ? /* @__PURE__ */
|
|
659
|
+
state: c
|
|
660
|
+
})))))), i ? /* @__PURE__ */ P.createElement("script", {
|
|
660
661
|
suppressHydrationWarning: !0,
|
|
661
662
|
nonce: s,
|
|
662
663
|
dangerouslySetInnerHTML: {
|
|
@@ -671,11 +672,11 @@ function qr({
|
|
|
671
672
|
}) {
|
|
672
673
|
return Se.UNSAFE_useRoutesImpl(e, void 0, r, t);
|
|
673
674
|
}
|
|
674
|
-
function
|
|
675
|
+
function zr(e) {
|
|
675
676
|
if (!e) return null;
|
|
676
677
|
let t = Object.entries(e), r = {};
|
|
677
678
|
for (let [s, n] of t)
|
|
678
|
-
|
|
679
|
+
D.isRouteErrorResponse(n) ? r[s] = {
|
|
679
680
|
...n,
|
|
680
681
|
__type: "RouteErrorResponse"
|
|
681
682
|
} : n instanceof Error ? r[s] = {
|
|
@@ -710,30 +711,30 @@ function nt() {
|
|
|
710
711
|
}
|
|
711
712
|
};
|
|
712
713
|
}
|
|
713
|
-
function
|
|
714
|
-
return
|
|
714
|
+
function Br(e, t) {
|
|
715
|
+
return D.createStaticHandler(e, {
|
|
715
716
|
...t,
|
|
716
717
|
mapRouteProperties: Se.UNSAFE_mapRouteProperties
|
|
717
718
|
});
|
|
718
719
|
}
|
|
719
|
-
function
|
|
720
|
-
let s = {}, n =
|
|
721
|
-
let d = s[
|
|
720
|
+
function Lr(e, t, r = {}) {
|
|
721
|
+
let s = {}, n = D.UNSAFE_convertRoutesToDataRoutes(e, Se.UNSAFE_mapRouteProperties, void 0, s), o = t.matches.map((c) => {
|
|
722
|
+
let d = s[c.route.id] || c.route;
|
|
722
723
|
return {
|
|
723
|
-
...
|
|
724
|
+
...c,
|
|
724
725
|
route: d
|
|
725
726
|
};
|
|
726
|
-
}), i = (
|
|
727
|
+
}), i = (c) => `You cannot use router.${c}() on the server because it is a stateless environment`;
|
|
727
728
|
return {
|
|
728
729
|
get basename() {
|
|
729
730
|
return t.basename;
|
|
730
731
|
},
|
|
731
732
|
get future() {
|
|
732
|
-
var
|
|
733
|
+
var c, d;
|
|
733
734
|
return {
|
|
734
735
|
v7_fetcherPersist: !1,
|
|
735
736
|
v7_normalizeFormMethod: !1,
|
|
736
|
-
v7_partialHydration: ((
|
|
737
|
+
v7_partialHydration: ((c = r.future) == null ? void 0 : c.v7_partialHydration) === !0,
|
|
737
738
|
v7_prependBasename: !1,
|
|
738
739
|
v7_relativeSplatPath: ((d = r.future) == null ? void 0 : d.v7_relativeSplatPath) === !0,
|
|
739
740
|
v7_skipActionErrorRevalidation: !1
|
|
@@ -741,14 +742,14 @@ function Br(e, t, r = {}) {
|
|
|
741
742
|
},
|
|
742
743
|
get state() {
|
|
743
744
|
return {
|
|
744
|
-
historyAction:
|
|
745
|
+
historyAction: D.Action.Pop,
|
|
745
746
|
location: t.location,
|
|
746
747
|
matches: o,
|
|
747
748
|
loaderData: t.loaderData,
|
|
748
749
|
actionData: t.actionData,
|
|
749
750
|
errors: t.errors,
|
|
750
751
|
initialized: !0,
|
|
751
|
-
navigation:
|
|
752
|
+
navigation: D.IDLE_NAVIGATION,
|
|
752
753
|
restoreScrollPosition: null,
|
|
753
754
|
preventScrollReset: !1,
|
|
754
755
|
revalidation: "idle",
|
|
@@ -782,7 +783,7 @@ function Br(e, t, r = {}) {
|
|
|
782
783
|
createHref: it,
|
|
783
784
|
encodeLocation: ot,
|
|
784
785
|
getFetcher() {
|
|
785
|
-
return
|
|
786
|
+
return D.IDLE_FETCHER;
|
|
786
787
|
},
|
|
787
788
|
deleteFetcher() {
|
|
788
789
|
throw i("deleteFetcher");
|
|
@@ -791,7 +792,7 @@ function Br(e, t, r = {}) {
|
|
|
791
792
|
throw i("dispose");
|
|
792
793
|
},
|
|
793
794
|
getBlocker() {
|
|
794
|
-
return
|
|
795
|
+
return D.IDLE_BLOCKER;
|
|
795
796
|
},
|
|
796
797
|
deleteBlocker() {
|
|
797
798
|
throw i("deleteBlocker");
|
|
@@ -829,11 +830,11 @@ const Hr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ur = {
|
|
|
829
830
|
function Kr(e) {
|
|
830
831
|
return e.replace($r, (t) => Ur[t]);
|
|
831
832
|
}
|
|
832
|
-
Y.StaticRouter =
|
|
833
|
-
var Vr = Y.StaticRouterProvider =
|
|
834
|
-
Y.createStaticHandler =
|
|
835
|
-
Y.createStaticRouter =
|
|
836
|
-
const Zr = new
|
|
833
|
+
Y.StaticRouter = Qr;
|
|
834
|
+
var Vr = Y.StaticRouterProvider = Fr;
|
|
835
|
+
Y.createStaticHandler = Br;
|
|
836
|
+
Y.createStaticRouter = Lr;
|
|
837
|
+
const Zr = new Dr({
|
|
837
838
|
defaultOptions: {
|
|
838
839
|
queries: {
|
|
839
840
|
staleTime: 1e3 * 60 * 5
|
|
@@ -842,8 +843,8 @@ const Zr = new Ar({
|
|
|
842
843
|
}), Yr = ({
|
|
843
844
|
router: e,
|
|
844
845
|
hydrate: t = !1
|
|
845
|
-
}) => /* @__PURE__ */ a.jsx(We, { children: /* @__PURE__ */ a.jsx(Ve, { client: Zr, children: /* @__PURE__ */ a.jsx(
|
|
846
|
-
|
|
846
|
+
}) => /* @__PURE__ */ a.jsx(We, { children: /* @__PURE__ */ a.jsx(Ve, { client: Zr, children: /* @__PURE__ */ a.jsx(Ar, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(He, { children: /* @__PURE__ */ a.jsx(ue.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(
|
|
847
|
+
wt,
|
|
847
848
|
{
|
|
848
849
|
router: e,
|
|
849
850
|
future: { v7_startTransition: !0 }
|
|
@@ -858,35 +859,35 @@ var he = { exports: {} };
|
|
|
858
859
|
(function(e, t) {
|
|
859
860
|
(function(r, s) {
|
|
860
861
|
s(t, Ye);
|
|
861
|
-
})(
|
|
862
|
+
})(Vt, function(r, s) {
|
|
862
863
|
const n = {
|
|
863
864
|
delay: 500,
|
|
864
865
|
minDuration: 200,
|
|
865
866
|
ssr: !0
|
|
866
867
|
};
|
|
867
868
|
function o() {
|
|
868
|
-
const [
|
|
869
|
+
const [c, d] = s.useState(!0);
|
|
869
870
|
return s.useEffect(() => {
|
|
870
871
|
d(!1);
|
|
871
|
-
}, []),
|
|
872
|
+
}, []), c;
|
|
872
873
|
}
|
|
873
|
-
function i(
|
|
874
|
+
function i(c, d) {
|
|
874
875
|
d = Object.assign({}, n, d);
|
|
875
|
-
const l = o() && d.ssr,
|
|
876
|
+
const l = o() && d.ssr, f = l && c ? "DISPLAY" : "IDLE", [m, h] = s.useState(f), p = s.useRef(null);
|
|
876
877
|
return s.useEffect(() => {
|
|
877
|
-
if (
|
|
878
|
-
clearTimeout(
|
|
878
|
+
if (c && (m === "IDLE" || l)) {
|
|
879
|
+
clearTimeout(p.current);
|
|
879
880
|
const v = l ? 0 : d.delay;
|
|
880
|
-
|
|
881
|
-
if (!
|
|
881
|
+
p.current = setTimeout(() => {
|
|
882
|
+
if (!c)
|
|
882
883
|
return h("IDLE");
|
|
883
|
-
|
|
884
|
+
p.current = setTimeout(() => {
|
|
884
885
|
h("EXPIRE");
|
|
885
886
|
}, d.minDuration), h("DISPLAY");
|
|
886
887
|
}, v), l || h("DELAY");
|
|
887
888
|
}
|
|
888
|
-
!
|
|
889
|
-
}, [
|
|
889
|
+
!c && m !== "DISPLAY" && (clearTimeout(p.current), h("IDLE"));
|
|
890
|
+
}, [c, m, d.delay, d.minDuration, l]), s.useEffect(() => () => clearTimeout(p.current), []), m === "DISPLAY" || m === "EXPIRE";
|
|
890
891
|
}
|
|
891
892
|
r.defaultOptions = n, r.useSpinDelay = i;
|
|
892
893
|
});
|
|
@@ -894,22 +895,22 @@ var he = { exports: {} };
|
|
|
894
895
|
var Xr = he.exports;
|
|
895
896
|
const Jr = ({
|
|
896
897
|
category: e,
|
|
897
|
-
|
|
898
|
+
onRequestClose: t
|
|
898
899
|
}) => {
|
|
899
|
-
var h,
|
|
900
|
-
const r =
|
|
901
|
-
|
|
900
|
+
var h, p;
|
|
901
|
+
const r = Qt(e), [s, n] = Q(!1), o = e.collapsible ?? !0, i = e.collapsed ?? !0, c = !!(!o || !i || r), [d, l] = Q(c), f = Wt(((h = e.link) == null ? void 0 : h.id) ?? "");
|
|
902
|
+
z(() => {
|
|
902
903
|
r && l(!0);
|
|
903
904
|
}, [r]);
|
|
904
|
-
const
|
|
905
|
+
const m = o && /* @__PURE__ */ a.jsx(
|
|
905
906
|
"button",
|
|
906
907
|
{
|
|
907
908
|
type: "button",
|
|
908
909
|
onClick: (v) => {
|
|
909
|
-
v.preventDefault(), l((
|
|
910
|
+
v.preventDefault(), l((g) => !g), n(!0);
|
|
910
911
|
},
|
|
911
912
|
children: /* @__PURE__ */ a.jsx(
|
|
912
|
-
|
|
913
|
+
Xt,
|
|
913
914
|
{
|
|
914
915
|
size: 16,
|
|
915
916
|
className: R(
|
|
@@ -924,7 +925,7 @@ const Jr = ({
|
|
|
924
925
|
oe.Root,
|
|
925
926
|
{
|
|
926
927
|
className: "flex flex-col",
|
|
927
|
-
defaultOpen:
|
|
928
|
+
defaultOpen: c,
|
|
928
929
|
open: d,
|
|
929
930
|
onOpenChange: () => l(!0),
|
|
930
931
|
children: [
|
|
@@ -934,7 +935,6 @@ const Jr = ({
|
|
|
934
935
|
onClick: () => n(!0),
|
|
935
936
|
className: V({
|
|
936
937
|
isActive: !1,
|
|
937
|
-
isTopLevel: t === 0,
|
|
938
938
|
className: [
|
|
939
939
|
"text-start",
|
|
940
940
|
o ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
@@ -945,37 +945,34 @@ const Jr = ({
|
|
|
945
945
|
e.icon,
|
|
946
946
|
{
|
|
947
947
|
size: 16,
|
|
948
|
-
className: R(
|
|
949
|
-
"align-[-0.125em] -translate-x-1",
|
|
950
|
-
p && "text-primary"
|
|
951
|
-
)
|
|
948
|
+
className: R("align-[-0.125em] ", f && "text-primary")
|
|
952
949
|
}
|
|
953
950
|
),
|
|
954
|
-
((
|
|
951
|
+
((p = e.link) == null ? void 0 : p.type) === "doc" ? /* @__PURE__ */ a.jsx(
|
|
955
952
|
ae,
|
|
956
953
|
{
|
|
957
|
-
to:
|
|
954
|
+
to: q(e.link.id),
|
|
958
955
|
className: "flex-1",
|
|
959
956
|
onClick: () => {
|
|
960
|
-
|
|
957
|
+
f && !d && l(!0);
|
|
961
958
|
},
|
|
962
959
|
children: /* @__PURE__ */ a.jsxs(
|
|
963
960
|
"div",
|
|
964
961
|
{
|
|
965
962
|
className: R(
|
|
966
963
|
"flex items-center gap-2 justify-between w-full",
|
|
967
|
-
|
|
964
|
+
f ? "text-primary" : "text-foreground/80"
|
|
968
965
|
),
|
|
969
966
|
children: [
|
|
970
967
|
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
|
|
971
|
-
|
|
968
|
+
m
|
|
972
969
|
]
|
|
973
970
|
}
|
|
974
971
|
)
|
|
975
972
|
}
|
|
976
973
|
) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
977
974
|
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
978
|
-
|
|
975
|
+
m
|
|
979
976
|
] })
|
|
980
977
|
]
|
|
981
978
|
}
|
|
@@ -985,29 +982,32 @@ const Jr = ({
|
|
|
985
982
|
{
|
|
986
983
|
className: R(
|
|
987
984
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
988
|
-
s && "CollapsibleContent"
|
|
985
|
+
s && "CollapsibleContent",
|
|
986
|
+
"ms-6 my-1"
|
|
989
987
|
),
|
|
990
|
-
children: /* @__PURE__ */ a.jsx(
|
|
991
|
-
|
|
988
|
+
children: /* @__PURE__ */ a.jsx(
|
|
989
|
+
"ul",
|
|
992
990
|
{
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
991
|
+
className: "relative after:absolute after:-left-[--padding-nav-item] after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border",
|
|
992
|
+
children: e.items.map((v) => /* @__PURE__ */ a.jsx(
|
|
993
|
+
fe,
|
|
994
|
+
{
|
|
995
|
+
onRequestClose: t,
|
|
996
|
+
item: v
|
|
997
|
+
},
|
|
998
|
+
("id" in v ? v.id : "") + ("href" in v ? v.href : "") + v.label
|
|
999
|
+
))
|
|
1000
|
+
}
|
|
1001
|
+
)
|
|
998
1002
|
}
|
|
999
1003
|
)
|
|
1000
1004
|
]
|
|
1001
1005
|
}
|
|
1002
1006
|
);
|
|
1003
|
-
}, V =
|
|
1007
|
+
}, V = or(
|
|
1004
1008
|
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
1005
1009
|
{
|
|
1006
1010
|
variants: {
|
|
1007
|
-
isTopLevel: {
|
|
1008
|
-
true: "font-medium -mx-[--padding-nav-item]",
|
|
1009
|
-
false: "-mr-[--padding-nav-item] ml-[--padding-nav-item]"
|
|
1010
|
-
},
|
|
1011
1011
|
isActive: {
|
|
1012
1012
|
true: "text-primary font-medium",
|
|
1013
1013
|
false: "text-foreground/80"
|
|
@@ -1023,19 +1023,20 @@ const Jr = ({
|
|
|
1023
1023
|
}
|
|
1024
1024
|
), lt = "data-anchor", fe = ({
|
|
1025
1025
|
item: e,
|
|
1026
|
-
|
|
1026
|
+
onRequestClose: t
|
|
1027
1027
|
}) => {
|
|
1028
1028
|
var n, o;
|
|
1029
|
-
const { activeAnchor: r } = we(), [s] =
|
|
1029
|
+
const { activeAnchor: r } = we(), [s] = St();
|
|
1030
1030
|
switch (e.type) {
|
|
1031
1031
|
case "category":
|
|
1032
|
-
return /* @__PURE__ */ a.jsx(Jr, { category: e,
|
|
1032
|
+
return /* @__PURE__ */ a.jsx(Jr, { category: e, onRequestClose: t });
|
|
1033
1033
|
case "doc":
|
|
1034
1034
|
return /* @__PURE__ */ a.jsxs(
|
|
1035
1035
|
ae,
|
|
1036
1036
|
{
|
|
1037
|
-
className: ({ isActive: i }) => V({ isActive: i
|
|
1038
|
-
to:
|
|
1037
|
+
className: ({ isActive: i }) => V({ isActive: i }),
|
|
1038
|
+
to: q(e.id),
|
|
1039
|
+
onClick: t,
|
|
1039
1040
|
children: [
|
|
1040
1041
|
e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
1041
1042
|
e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -1047,15 +1048,15 @@ const Jr = ({
|
|
|
1047
1048
|
);
|
|
1048
1049
|
case "link":
|
|
1049
1050
|
return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
|
|
1050
|
-
|
|
1051
|
+
cr,
|
|
1051
1052
|
{
|
|
1052
1053
|
to: { hash: e.href, search: s.toString() },
|
|
1053
1054
|
[lt]: e.href.slice(1),
|
|
1054
1055
|
className: V({
|
|
1055
1056
|
isActive: e.href.slice(1) === r,
|
|
1056
|
-
isTopLevel: t === 0,
|
|
1057
1057
|
className: ((n = e.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
|
|
1058
1058
|
}),
|
|
1059
|
+
onClick: t,
|
|
1059
1060
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1060
1061
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
1061
1062
|
/* @__PURE__ */ a.jsx(ie, { ...e.badge })
|
|
@@ -1064,13 +1065,14 @@ const Jr = ({
|
|
|
1064
1065
|
) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
|
|
1065
1066
|
"a",
|
|
1066
1067
|
{
|
|
1067
|
-
className: V(
|
|
1068
|
+
className: V(),
|
|
1068
1069
|
href: e.href,
|
|
1069
1070
|
target: "_blank",
|
|
1070
1071
|
rel: "noopener noreferrer",
|
|
1072
|
+
onClick: t,
|
|
1071
1073
|
children: [
|
|
1072
1074
|
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
1073
|
-
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(
|
|
1075
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(Jt, { className: "inline -translate-y-0.5", size: 12 }) })
|
|
1074
1076
|
]
|
|
1075
1077
|
}
|
|
1076
1078
|
) : /* @__PURE__ */ a.jsx(
|
|
@@ -1093,7 +1095,7 @@ const Jr = ({
|
|
|
1093
1095
|
r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
1094
1096
|
}, ea = () => {
|
|
1095
1097
|
const e = ye(), { setActiveAnchor: t } = we();
|
|
1096
|
-
|
|
1098
|
+
z(() => {
|
|
1097
1099
|
if (!e.hash) return;
|
|
1098
1100
|
const r = decodeURIComponent(e.hash.split("/")[0].slice(1)), s = () => {
|
|
1099
1101
|
const n = document.getElementById(r), o = document.querySelector(`[${lt}="${r}"]`);
|
|
@@ -1108,7 +1110,7 @@ const Jr = ({
|
|
|
1108
1110
|
}, [e.hash, t]);
|
|
1109
1111
|
}, ta = () => {
|
|
1110
1112
|
const e = ye(), t = pe(e.pathname);
|
|
1111
|
-
|
|
1113
|
+
z(() => {
|
|
1112
1114
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
1113
1115
|
}, [e.pathname]);
|
|
1114
1116
|
};
|
|
@@ -1124,17 +1126,17 @@ function ra({
|
|
|
1124
1126
|
}
|
|
1125
1127
|
);
|
|
1126
1128
|
}
|
|
1127
|
-
const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", sa = (e) => "getRoutes" in e && typeof e.getRoutes == "function", na = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ia = (e) => "initialize" in e && typeof e.initialize == "function", oa = (e) => "getHead" in e && typeof e.getHead == "function", la = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", ca = (e) => "getIdentities" in e && typeof e.getIdentities == "function",
|
|
1129
|
+
const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", sa = (e) => "getRoutes" in e && typeof e.getRoutes == "function", na = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ia = (e) => "initialize" in e && typeof e.initialize == "function", oa = (e) => "getHead" in e && typeof e.getHead == "function", la = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", ca = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Fe = {
|
|
1128
1130
|
info: "bg-blue-500",
|
|
1129
1131
|
note: "bg-gray-500",
|
|
1130
1132
|
tip: "bg-green-600",
|
|
1131
1133
|
caution: "bg-orange-500",
|
|
1132
1134
|
danger: "bg-rose-500"
|
|
1133
1135
|
}, ua = () => {
|
|
1134
|
-
const { page: e } = F(), [t, r] =
|
|
1136
|
+
const { page: e } = F(), [t, r] = Q(!0);
|
|
1135
1137
|
if (!(e != null && e.banner) || !t)
|
|
1136
1138
|
return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
1137
|
-
const s = e.banner.color && e.banner.color in
|
|
1139
|
+
const s = e.banner.color && e.banner.color in Fe ? Fe[e.banner.color] : e.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: e.banner.color };
|
|
1138
1140
|
return /* @__PURE__ */ a.jsxs(
|
|
1139
1141
|
"div",
|
|
1140
1142
|
{
|
|
@@ -1151,48 +1153,48 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1151
1153
|
type: "button",
|
|
1152
1154
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1153
1155
|
onClick: () => r(!1),
|
|
1154
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1156
|
+
children: /* @__PURE__ */ a.jsx(Gt, { size: 16 })
|
|
1155
1157
|
}
|
|
1156
1158
|
)
|
|
1157
1159
|
]
|
|
1158
1160
|
}
|
|
1159
1161
|
);
|
|
1160
|
-
}, ct = () => {
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1163
|
-
if (
|
|
1162
|
+
}, ct = ({ className: e }) => {
|
|
1163
|
+
const t = F(), [r, s] = Q(!1), n = Lt(() => s(!1), []);
|
|
1164
|
+
z(() => {
|
|
1165
|
+
if (r)
|
|
1164
1166
|
return;
|
|
1165
|
-
function
|
|
1166
|
-
|
|
1167
|
+
function i(c) {
|
|
1168
|
+
c.key === "k" && (c.metaKey || c.ctrlKey) && (c.preventDefault(), s(!0));
|
|
1167
1169
|
}
|
|
1168
|
-
return window.addEventListener("keydown",
|
|
1169
|
-
window.removeEventListener("keydown",
|
|
1170
|
+
return window.addEventListener("keydown", i), () => {
|
|
1171
|
+
window.removeEventListener("keydown", i);
|
|
1170
1172
|
};
|
|
1171
|
-
}, [
|
|
1172
|
-
const
|
|
1173
|
-
return
|
|
1173
|
+
}, [r, s]);
|
|
1174
|
+
const o = t.plugins.find(na);
|
|
1175
|
+
return o ? /* @__PURE__ */ a.jsxs("div", { className: e, children: [
|
|
1174
1176
|
/* @__PURE__ */ a.jsxs(
|
|
1175
1177
|
"button",
|
|
1176
1178
|
{
|
|
1177
1179
|
type: "button",
|
|
1178
|
-
onClick: () =>
|
|
1180
|
+
onClick: () => s(!0),
|
|
1179
1181
|
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-full sm:w-72",
|
|
1180
1182
|
children: [
|
|
1181
1183
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
1182
|
-
/* @__PURE__ */ a.jsx(
|
|
1184
|
+
/* @__PURE__ */ a.jsx(er, { size: 14 }),
|
|
1183
1185
|
"Search"
|
|
1184
1186
|
] }),
|
|
1185
1187
|
/* @__PURE__ */ a.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" })
|
|
1186
1188
|
]
|
|
1187
1189
|
}
|
|
1188
1190
|
),
|
|
1189
|
-
/* @__PURE__ */ a.jsx(ve, { fallback: null, children:
|
|
1190
|
-
isOpen:
|
|
1191
|
-
onClose:
|
|
1191
|
+
/* @__PURE__ */ a.jsx(ve, { fallback: null, children: o.renderSearch({
|
|
1192
|
+
isOpen: r,
|
|
1193
|
+
onClose: n
|
|
1192
1194
|
}) })
|
|
1193
1195
|
] }) : null;
|
|
1194
1196
|
}, ut = () => {
|
|
1195
|
-
const { resolvedTheme: e, setTheme: t } = jr(), r = e === "dark" ?
|
|
1197
|
+
const { resolvedTheme: e, setTheme: t } = jr(), r = e === "dark" ? tr : rr;
|
|
1196
1198
|
return /* @__PURE__ */ a.jsx(je, { children: /* @__PURE__ */ a.jsx(
|
|
1197
1199
|
de,
|
|
1198
1200
|
{
|
|
@@ -1212,9 +1214,9 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1212
1214
|
default: r
|
|
1213
1215
|
}) => {
|
|
1214
1216
|
var l;
|
|
1215
|
-
const { sidebars: s } = F(), n = s[e], o = Ze(), i = !!be().location,
|
|
1216
|
-
if (
|
|
1217
|
-
}) :
|
|
1217
|
+
const { sidebars: s } = F(), n = s[e], o = Ze(), i = !!be().location, c = ((l = o.topNavItem) == null ? void 0 : l.id) === e && !i, d = r ?? (n ? Ft(n, (f) => {
|
|
1218
|
+
if (f.type === "doc") return q(f.id);
|
|
1219
|
+
}) : q(e));
|
|
1218
1220
|
if (!d)
|
|
1219
1221
|
throw new Sr("Page not found.", {
|
|
1220
1222
|
developerHint: `No links found in top navigation for '${e}'. Check that the sidebar isn't empty or that a default link is set.`
|
|
@@ -1225,9 +1227,9 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1225
1227
|
/* @__PURE__ */ a.jsx(
|
|
1226
1228
|
ae,
|
|
1227
1229
|
{
|
|
1228
|
-
className: ({ isPending:
|
|
1230
|
+
className: ({ isPending: f }) => lr(
|
|
1229
1231
|
"block lg:py-3.5 font-medium -mb-px border-b-2",
|
|
1230
|
-
|
|
1232
|
+
c || f ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
1231
1233
|
),
|
|
1232
1234
|
to: d,
|
|
1233
1235
|
children: t
|
|
@@ -1235,7 +1237,7 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1235
1237
|
)
|
|
1236
1238
|
);
|
|
1237
1239
|
}, ha = () => {
|
|
1238
|
-
const { topNavigation: e } = F(), { isAuthenticated: t } = se(), [r, s] =
|
|
1240
|
+
const { topNavigation: e } = F(), { isAuthenticated: t } = se(), [r, s] = Q(!1);
|
|
1239
1241
|
return /* @__PURE__ */ a.jsxs(
|
|
1240
1242
|
et,
|
|
1241
1243
|
{
|
|
@@ -1243,20 +1245,20 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1243
1245
|
open: r,
|
|
1244
1246
|
onOpenChange: (n) => s(n),
|
|
1245
1247
|
children: [
|
|
1246
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(tt, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(
|
|
1247
|
-
/* @__PURE__ */ a.
|
|
1248
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(tt, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(ar, { size: 22 }) }) }),
|
|
1249
|
+
/* @__PURE__ */ a.jsx(
|
|
1248
1250
|
rt,
|
|
1249
1251
|
{
|
|
1250
|
-
className: "lg:hidden h-
|
|
1252
|
+
className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
|
|
1251
1253
|
"aria-describedby": void 0,
|
|
1252
|
-
children: [
|
|
1254
|
+
children: /* @__PURE__ */ a.jsxs("div", { className: "p-6 overflow-y-auto overscroll-none", children: [
|
|
1253
1255
|
/* @__PURE__ */ a.jsx(st, { children: /* @__PURE__ */ a.jsx(at, { children: "Navigation" }) }),
|
|
1254
|
-
/* @__PURE__ */ a.jsx(
|
|
1256
|
+
/* @__PURE__ */ a.jsx(ct, { className: "flex p-4" }),
|
|
1255
1257
|
/* @__PURE__ */ a.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
|
|
1256
1258
|
/* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ut, {}) }),
|
|
1257
1259
|
e.filter(dt(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ a.jsx(ht, { ...n }) }) }, n.label))
|
|
1258
1260
|
] })
|
|
1259
|
-
]
|
|
1261
|
+
] })
|
|
1260
1262
|
}
|
|
1261
1263
|
)
|
|
1262
1264
|
]
|
|
@@ -1272,7 +1274,7 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1272
1274
|
e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
|
|
1273
1275
|
e.label
|
|
1274
1276
|
] }, e.label) }), ft = Xe(function() {
|
|
1275
|
-
const t = se(), { isAuthenticated: r, profile: s, isAuthEnabled: n } = se(), o = F(), { page: i, plugins:
|
|
1277
|
+
const t = se(), { isAuthenticated: r, profile: s, isAuthEnabled: n } = se(), o = F(), { page: i, plugins: c } = o, d = c.filter((l) => aa(l)).flatMap((l) => l.getProfileMenuItems(o)).sort((l) => l.weight ?? 0);
|
|
1276
1278
|
return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
1277
1279
|
/* @__PURE__ */ a.jsx(ua, {}),
|
|
1278
1280
|
/* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
@@ -1282,7 +1284,7 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1282
1284
|
/* @__PURE__ */ a.jsx(
|
|
1283
1285
|
"img",
|
|
1284
1286
|
{
|
|
1285
|
-
src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light :
|
|
1287
|
+
src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : q(
|
|
1286
1288
|
"/",
|
|
1287
1289
|
i.logo.src.light
|
|
1288
1290
|
),
|
|
@@ -1295,7 +1297,7 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1295
1297
|
/* @__PURE__ */ a.jsx(
|
|
1296
1298
|
"img",
|
|
1297
1299
|
{
|
|
1298
|
-
src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark :
|
|
1300
|
+
src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : q(
|
|
1299
1301
|
"/",
|
|
1300
1302
|
i.logo.src.dark
|
|
1301
1303
|
),
|
|
@@ -1312,7 +1314,7 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1312
1314
|
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ct, {}) }),
|
|
1313
1315
|
/* @__PURE__ */ a.jsx(ha, {}),
|
|
1314
1316
|
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
1315
|
-
/* @__PURE__ */ a.jsx(
|
|
1317
|
+
/* @__PURE__ */ a.jsx(O, { name: "head-navigation-start" }),
|
|
1316
1318
|
n && /* @__PURE__ */ a.jsx(
|
|
1317
1319
|
je,
|
|
1318
1320
|
{
|
|
@@ -1339,22 +1341,22 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1339
1341
|
}
|
|
1340
1342
|
),
|
|
1341
1343
|
/* @__PURE__ */ a.jsx(ut, {}),
|
|
1342
|
-
/* @__PURE__ */ a.jsx(
|
|
1344
|
+
/* @__PURE__ */ a.jsx(O, { name: "head-navigation-end" })
|
|
1343
1345
|
] })
|
|
1344
1346
|
] })
|
|
1345
1347
|
] }),
|
|
1346
|
-
/* @__PURE__ */ a.jsx(
|
|
1348
|
+
/* @__PURE__ */ a.jsx(O, { name: "top-navigation-before" }),
|
|
1347
1349
|
/* @__PURE__ */ a.jsx(da, {}),
|
|
1348
|
-
/* @__PURE__ */ a.jsx(
|
|
1350
|
+
/* @__PURE__ */ a.jsx(O, { name: "top-navigation-after" })
|
|
1349
1351
|
] })
|
|
1350
1352
|
] });
|
|
1351
|
-
}), mt =
|
|
1353
|
+
}), mt = Ht(({ children: e, className: t, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
|
|
1352
1354
|
"nav",
|
|
1353
1355
|
{
|
|
1354
1356
|
"data-navigation": String(r),
|
|
1355
1357
|
className: R(
|
|
1356
1358
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
1357
|
-
"
|
|
1359
|
+
"-mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
1358
1360
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
1359
1361
|
t
|
|
1360
1362
|
),
|
|
@@ -1363,30 +1365,39 @@ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1363
1365
|
}
|
|
1364
1366
|
));
|
|
1365
1367
|
mt.displayName = "SidebarWrapper";
|
|
1366
|
-
const fa = (
|
|
1367
|
-
|
|
1368
|
+
const fa = ({
|
|
1369
|
+
onRequestClose: e
|
|
1370
|
+
}) => {
|
|
1371
|
+
const t = pe(null), r = Ze();
|
|
1368
1372
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1369
1373
|
/* @__PURE__ */ a.jsxs(
|
|
1370
1374
|
mt,
|
|
1371
1375
|
{
|
|
1372
|
-
ref:
|
|
1373
|
-
pushMainContent:
|
|
1376
|
+
ref: t,
|
|
1377
|
+
pushMainContent: r.sidebar.length > 0,
|
|
1374
1378
|
children: [
|
|
1375
|
-
/* @__PURE__ */ a.jsx(
|
|
1376
|
-
|
|
1377
|
-
/* @__PURE__ */ a.jsx(
|
|
1379
|
+
/* @__PURE__ */ a.jsx(O, { name: "zudoku-before-navigation" }),
|
|
1380
|
+
r.sidebar.map((s) => /* @__PURE__ */ a.jsx(fe, { item: s }, s.label)),
|
|
1381
|
+
/* @__PURE__ */ a.jsx(O, { name: "zudoku-after-navigation" })
|
|
1378
1382
|
]
|
|
1379
1383
|
}
|
|
1380
1384
|
),
|
|
1381
|
-
/* @__PURE__ */ a.
|
|
1385
|
+
/* @__PURE__ */ a.jsx(
|
|
1382
1386
|
rt,
|
|
1383
1387
|
{
|
|
1384
|
-
className: "lg:hidden h-
|
|
1388
|
+
className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
|
|
1385
1389
|
"aria-describedby": void 0,
|
|
1386
|
-
children: [
|
|
1390
|
+
children: /* @__PURE__ */ a.jsxs("div", { className: "p-6 overflow-y-auto overscroll-none", children: [
|
|
1387
1391
|
/* @__PURE__ */ a.jsx(st, { children: /* @__PURE__ */ a.jsx(at, { children: "Sidebar" }) }),
|
|
1388
|
-
|
|
1389
|
-
|
|
1392
|
+
r.sidebar.map((s) => /* @__PURE__ */ a.jsx(
|
|
1393
|
+
fe,
|
|
1394
|
+
{
|
|
1395
|
+
item: s,
|
|
1396
|
+
onRequestClose: e
|
|
1397
|
+
},
|
|
1398
|
+
s.label
|
|
1399
|
+
))
|
|
1400
|
+
] })
|
|
1390
1401
|
}
|
|
1391
1402
|
)
|
|
1392
1403
|
] });
|
|
@@ -1394,64 +1405,72 @@ const fa = () => {
|
|
|
1394
1405
|
const t = ye(), { setActiveAnchor: r } = we(), { meta: s, authentication: n } = F();
|
|
1395
1406
|
ea(), ta();
|
|
1396
1407
|
const o = pe(t.pathname);
|
|
1397
|
-
|
|
1398
|
-
var
|
|
1399
|
-
(
|
|
1400
|
-
}, [n]),
|
|
1408
|
+
z(() => {
|
|
1409
|
+
var f;
|
|
1410
|
+
(f = n == null ? void 0 : n.onPageLoad) == null || f.call(n);
|
|
1411
|
+
}, [n]), z(() => {
|
|
1401
1412
|
t.pathname !== o.current && r(""), o.current = t.pathname;
|
|
1402
1413
|
}, [t.pathname, r]);
|
|
1403
|
-
const i = !!be().location,
|
|
1414
|
+
const i = !!be().location, c = Xr.useSpinDelay(i, {
|
|
1404
1415
|
delay: 300,
|
|
1405
1416
|
minDuration: 500
|
|
1406
|
-
});
|
|
1417
|
+
}), [d, l] = Q(!1);
|
|
1407
1418
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1408
1419
|
!1,
|
|
1409
1420
|
/* @__PURE__ */ a.jsxs(me, { titleTemplate: s == null ? void 0 : s.title, children: [
|
|
1410
1421
|
(s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
|
|
1411
1422
|
(s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
|
|
1412
1423
|
] }),
|
|
1413
|
-
/* @__PURE__ */ a.jsx(
|
|
1424
|
+
/* @__PURE__ */ a.jsx(O, { name: "layout-before-head" }),
|
|
1414
1425
|
/* @__PURE__ */ a.jsx(ft, {}),
|
|
1415
|
-
/* @__PURE__ */ a.jsx(
|
|
1416
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children:
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
"
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
"lg:overflow-visible",
|
|
1437
|
-
// This works in tandem with the `SidebarWrapper` component
|
|
1438
|
-
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
1439
|
-
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
1426
|
+
/* @__PURE__ */ a.jsx(O, { name: "layout-after-head" }),
|
|
1427
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: c ? /* @__PURE__ */ a.jsx(qe, {}) : /* @__PURE__ */ a.jsx(ve, { fallback: /* @__PURE__ */ a.jsx(qe, {}), children: /* @__PURE__ */ a.jsxs(
|
|
1428
|
+
et,
|
|
1429
|
+
{
|
|
1430
|
+
direction: "left",
|
|
1431
|
+
open: d,
|
|
1432
|
+
onOpenChange: (f) => l(f),
|
|
1433
|
+
children: [
|
|
1434
|
+
/* @__PURE__ */ a.jsx(fa, { onRequestClose: () => l(!1) }),
|
|
1435
|
+
/* @__PURE__ */ a.jsx(
|
|
1436
|
+
"div",
|
|
1437
|
+
{
|
|
1438
|
+
className: R(
|
|
1439
|
+
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
1440
|
+
"peer-data-[navigation=false]:hidden"
|
|
1441
|
+
),
|
|
1442
|
+
children: /* @__PURE__ */ a.jsxs(tt, { className: "flex items-center gap-2", children: [
|
|
1443
|
+
/* @__PURE__ */ a.jsx(sr, { size: 16, strokeWidth: 1.5 }),
|
|
1444
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
1445
|
+
] })
|
|
1446
|
+
}
|
|
1440
1447
|
),
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1448
|
+
/* @__PURE__ */ a.jsxs(
|
|
1449
|
+
"main",
|
|
1450
|
+
{
|
|
1451
|
+
className: R(
|
|
1452
|
+
"h-full dark:border-white/10 translate-x-0",
|
|
1453
|
+
"lg:overflow-visible",
|
|
1454
|
+
// This works in tandem with the `SidebarWrapper` component
|
|
1455
|
+
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
1456
|
+
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
1457
|
+
),
|
|
1458
|
+
children: [
|
|
1459
|
+
/* @__PURE__ */ a.jsx(O, { name: "zudoku-before-content" }),
|
|
1460
|
+
e ?? /* @__PURE__ */ a.jsx(Ge, {}),
|
|
1461
|
+
/* @__PURE__ */ a.jsx(O, { name: "zudoku-after-content" })
|
|
1462
|
+
]
|
|
1463
|
+
}
|
|
1464
|
+
)
|
|
1465
|
+
]
|
|
1466
|
+
}
|
|
1467
|
+
) }) })
|
|
1449
1468
|
] });
|
|
1450
1469
|
}, ga = Je(null), ce = {
|
|
1451
1470
|
didCatch: !1,
|
|
1452
1471
|
error: null
|
|
1453
1472
|
};
|
|
1454
|
-
class pa extends
|
|
1473
|
+
class pa extends Ut {
|
|
1455
1474
|
constructor(t) {
|
|
1456
1475
|
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ce;
|
|
1457
1476
|
}
|
|
@@ -1503,18 +1522,18 @@ class pa extends Vt {
|
|
|
1503
1522
|
didCatch: o,
|
|
1504
1523
|
error: i
|
|
1505
1524
|
} = this.state;
|
|
1506
|
-
let
|
|
1525
|
+
let c = t;
|
|
1507
1526
|
if (o) {
|
|
1508
1527
|
const d = {
|
|
1509
1528
|
error: i,
|
|
1510
1529
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1511
1530
|
};
|
|
1512
1531
|
if (typeof r == "function")
|
|
1513
|
-
|
|
1532
|
+
c = r(d);
|
|
1514
1533
|
else if (s)
|
|
1515
|
-
|
|
1534
|
+
c = Ie(s, d);
|
|
1516
1535
|
else if (n !== void 0)
|
|
1517
|
-
|
|
1536
|
+
c = n;
|
|
1518
1537
|
else
|
|
1519
1538
|
throw i;
|
|
1520
1539
|
}
|
|
@@ -1524,7 +1543,7 @@ class pa extends Vt {
|
|
|
1524
1543
|
error: i,
|
|
1525
1544
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1526
1545
|
}
|
|
1527
|
-
},
|
|
1546
|
+
}, c);
|
|
1528
1547
|
}
|
|
1529
1548
|
}
|
|
1530
1549
|
function va() {
|
|
@@ -1555,7 +1574,7 @@ class xa {
|
|
|
1555
1574
|
this.navigationPlugins.map(
|
|
1556
1575
|
(s) => {
|
|
1557
1576
|
var n;
|
|
1558
|
-
return (n = s.getSidebar) == null ? void 0 : n.call(s,
|
|
1577
|
+
return (n = s.getSidebar) == null ? void 0 : n.call(s, q(t));
|
|
1559
1578
|
}
|
|
1560
1579
|
)
|
|
1561
1580
|
)).flatMap((s) => s ?? []));
|
|
@@ -1578,12 +1597,12 @@ const gt = {
|
|
|
1578
1597
|
}, ba = Je(gt), ja = ba.Provider, wa = ({
|
|
1579
1598
|
children: e,
|
|
1580
1599
|
context: t
|
|
1581
|
-
}) => (
|
|
1600
|
+
}) => (qt({
|
|
1582
1601
|
queryFn: async () => (await t.initialize(), !0),
|
|
1583
1602
|
queryKey: ["zudoku-initialize"]
|
|
1584
|
-
}), /* @__PURE__ */ a.jsx(
|
|
1603
|
+
}), /* @__PURE__ */ a.jsx(zt.Provider, { value: t, children: e })), pt = Xe(
|
|
1585
1604
|
({ children: e, ...t }) => {
|
|
1586
|
-
var
|
|
1605
|
+
var m, h;
|
|
1587
1606
|
const r = ne(
|
|
1588
1607
|
() => ({ ...gt, ...t.overrides }),
|
|
1589
1608
|
[t.overrides]
|
|
@@ -1591,49 +1610,49 @@ const gt = {
|
|
|
1591
1610
|
var v;
|
|
1592
1611
|
return {
|
|
1593
1612
|
...(t.plugins ?? []).filter(la).flatMap(
|
|
1594
|
-
(
|
|
1613
|
+
(g) => g.getMdxComponents ? [g.getMdxComponents()] : []
|
|
1595
1614
|
).reduce(
|
|
1596
|
-
(
|
|
1615
|
+
(g, E) => ({ ...g, ...E }),
|
|
1597
1616
|
{}
|
|
1598
1617
|
),
|
|
1599
|
-
...
|
|
1618
|
+
...nr,
|
|
1600
1619
|
...(v = t.mdx) == null ? void 0 : v.components
|
|
1601
1620
|
};
|
|
1602
|
-
}, [(
|
|
1621
|
+
}, [(m = t.mdx) == null ? void 0 : m.components, t.plugins]), { stagger: n } = $t(ue), [o, i] = Q(!1), c = ne(
|
|
1603
1622
|
() => o ? { stagger: !0 } : { stagger: n },
|
|
1604
1623
|
[n, o]
|
|
1605
1624
|
), d = be();
|
|
1606
|
-
|
|
1625
|
+
z(() => {
|
|
1607
1626
|
o || i(!0);
|
|
1608
1627
|
}, [o, d.location]);
|
|
1609
|
-
const [l] =
|
|
1610
|
-
var
|
|
1611
|
-
return /* @__PURE__ */ a.jsx(
|
|
1628
|
+
const [l] = Q(() => new xa(t)), f = (h = t.plugins) == null ? void 0 : h.filter(oa).map((p, v) => {
|
|
1629
|
+
var g;
|
|
1630
|
+
return /* @__PURE__ */ a.jsx(Kt, { children: (g = p.getHead) == null ? void 0 : g.call(p) }, v);
|
|
1612
1631
|
});
|
|
1613
1632
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1614
|
-
/* @__PURE__ */ a.jsx(me, { children:
|
|
1615
|
-
/* @__PURE__ */ a.jsx(ue.Provider, { value:
|
|
1633
|
+
/* @__PURE__ */ a.jsx(me, { children: f }),
|
|
1634
|
+
/* @__PURE__ */ a.jsx(ue.Provider, { value: c, children: /* @__PURE__ */ a.jsx(wa, { context: l, children: /* @__PURE__ */ a.jsx(ur, { components: s, children: /* @__PURE__ */ a.jsx(wr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ a.jsx(ja, { value: r, children: /* @__PURE__ */ a.jsx(Et, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(ir, { children: e ?? /* @__PURE__ */ a.jsx(Ge, {}) }) }) }) }) }) }) })
|
|
1616
1635
|
] });
|
|
1617
1636
|
}
|
|
1618
1637
|
);
|
|
1619
1638
|
pt.displayName = "ZudokoInner";
|
|
1620
1639
|
const vt = (e) => /* @__PURE__ */ a.jsx(pa, { FallbackComponent: ya, children: /* @__PURE__ */ a.jsx(pt, { ...e }) });
|
|
1621
1640
|
vt.displayName = "Zudoku";
|
|
1622
|
-
const
|
|
1641
|
+
const Xa = dr, Ja = ma, Ga = Ct, es = Er, ts = Yr, rs = Wr, as = me, ss = F, ns = Nt, is = vt, os = kt, ls = je, cs = Pt, us = ge;
|
|
1623
1642
|
export {
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1643
|
+
ts as Bootstrap,
|
|
1644
|
+
rs as BootstrapStatic,
|
|
1645
|
+
cs as Button,
|
|
1646
|
+
os as Callout,
|
|
1647
|
+
ls as ClientOnly,
|
|
1648
|
+
as as Head,
|
|
1649
|
+
Ja as Layout,
|
|
1650
|
+
us as Link,
|
|
1651
|
+
Ga as RouterError,
|
|
1652
|
+
es as ServerError,
|
|
1653
|
+
is as Zudoku,
|
|
1654
|
+
ns as useAuth,
|
|
1655
|
+
Xa as useMDXComponents,
|
|
1656
|
+
ss as useZudoku
|
|
1638
1657
|
};
|
|
1639
1658
|
//# sourceMappingURL=zudoku.components.js.map
|