zudoku 0.13.7 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +2 -2
- package/dist/app/entry.client.js +2 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +3 -0
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +6 -21
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
- package/dist/config/validators/SidebarSchema.d.ts +24 -1
- package/dist/config/validators/SidebarSchema.js +76 -39
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +329 -264
- package/dist/config/validators/validate.js +11 -10
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/components/Header.js +5 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/SyntaxHighlight.js +4 -1
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +30 -5
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +6 -12
- package/dist/lib/components/context/ZudokuContext.js +26 -20
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +3 -3
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +2 -4
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -3
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +10 -14
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +3 -7
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +5 -6
- package/dist/lib/plugins/markdown/index.js +31 -3
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
- package/dist/lib/plugins/markdown/resolver.js +75 -0
- package/dist/lib/plugins/markdown/resolver.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +7 -2
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +11 -6
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/debug.d.ts +1 -0
- package/dist/vite/debug.js +10 -0
- package/dist/vite/debug.js.map +1 -0
- package/dist/vite/plugin-config-reload.js +0 -2
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-docs.js +37 -26
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -1
- package/dist/vite/plugin-frontmatter.js +27 -24
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-sidebar.js +7 -6
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +1 -1
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +5 -1
- package/dist/vite/prerender.js +6 -5
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{utils-B2yoT99j.js → AnchorLink-BbB2q-jx.js} +214 -258
- package/lib/AnchorLink-BbB2q-jx.js.map +1 -0
- package/lib/{AuthenticationPlugin-Bpdes0cJ.js → AuthenticationPlugin-C9BHGXlE.js} +2 -2
- package/lib/{AuthenticationPlugin-Bpdes0cJ.js.map → AuthenticationPlugin-C9BHGXlE.js.map} +1 -1
- package/lib/{Markdown-1BO9EA_X.js → Markdown-BDcCAWwm.js} +18 -16
- package/lib/{Markdown-1BO9EA_X.js.map → Markdown-BDcCAWwm.js.map} +1 -1
- package/lib/{MdxPage-BEOcOICU.js → MdxPage-DKMH_t0f.js} +14 -13
- package/lib/{MdxPage-BEOcOICU.js.map → MdxPage-DKMH_t0f.js.map} +1 -1
- package/lib/{OperationList-Cea2Yt8e.js → OperationList-DnaAtLxP.js} +3 -3
- package/lib/OperationList-DnaAtLxP.js.map +1 -0
- package/lib/{Route-BHT-onwf.js → Route-DSbLrlig.js} +2 -2
- package/lib/{Route-BHT-onwf.js.map → Route-DSbLrlig.js.map} +1 -1
- package/lib/{Select-m1aXZGAP.js → Select-Bagt3Bme.js} +3 -3
- package/lib/{Select-m1aXZGAP.js.map → Select-Bagt3Bme.js.map} +1 -1
- package/lib/{SlotletProvider-CPfsBw39.js → SlotletProvider-4Naek_5M.js} +2 -2
- package/lib/{SlotletProvider-CPfsBw39.js.map → SlotletProvider-4Naek_5M.js.map} +1 -1
- package/lib/{ZudokuContext-D1D8Anlj.js → ZudokuContext-BKXGJTmu.js} +459 -410
- package/lib/ZudokuContext-BKXGJTmu.js.map +1 -0
- package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
- package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
- package/lib/assets/worker-Bf8vjASY.js.map +1 -1
- package/lib/{hook-JSRuxV1P.js → hook-sn0zMTkE.js} +2 -2
- package/lib/{hook-JSRuxV1P.js.map → hook-sn0zMTkE.js.map} +1 -1
- package/lib/{index-Cj-F-4ME.js → index-B3F9d8oi.js} +430 -433
- package/lib/index-B3F9d8oi.js.map +1 -0
- package/lib/{urql-core-KJnLL26g.js → urql-core-CqTI9H6N.js} +289 -261
- package/lib/urql-core-CqTI9H6N.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +454 -444
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +93 -27
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -7
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +3 -3
- package/src/app/entry.client.tsx +4 -2
- package/src/app/entry.server.tsx +4 -0
- package/src/app/main.css +4 -0
- package/src/app/main.tsx +9 -25
- package/src/app/standalone.tsx +1 -1
- package/src/lib/components/Header.tsx +10 -2
- package/src/lib/components/SyntaxHighlight.tsx +5 -1
- package/src/lib/components/TopNavigation.tsx +58 -24
- package/src/lib/components/context/ZudokuContext.ts +28 -20
- package/src/lib/components/navigation/Sidebar.tsx +5 -5
- package/src/lib/components/navigation/SidebarCategory.tsx +2 -4
- package/src/lib/components/navigation/SidebarItem.tsx +1 -3
- package/src/lib/components/navigation/utils.ts +11 -16
- package/src/lib/core/DevPortalContext.ts +3 -7
- package/src/lib/core/plugins.ts +2 -0
- package/src/lib/plugins/markdown/index.tsx +49 -12
- package/src/lib/plugins/markdown/resolver.ts +92 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/client/worker.ts +2 -2
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +0 -1
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
- package/dist/lib/plugins/markdown/generateRoutes.js +0 -21
- package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
- package/dist/lib/ui/Note.d.ts +0 -8
- package/dist/lib/ui/Note.js +0 -23
- package/dist/lib/ui/Note.js.map +0 -1
- package/lib/OperationList-Cea2Yt8e.js.map +0 -1
- package/lib/ZudokuContext-D1D8Anlj.js.map +0 -1
- package/lib/index-Cj-F-4ME.js.map +0 -1
- package/lib/joinPath-B7kNnUX4.js +0 -8
- package/lib/joinPath-B7kNnUX4.js.map +0 -1
- package/lib/ui/Note.js +0 -51
- package/lib/ui/Note.js.map +0 -1
- package/lib/urql-core-KJnLL26g.js.map +0 -1
- package/lib/utils-B2yoT99j.js.map +0 -1
- package/src/lib/plugins/markdown/generateRoutes.tsx +0 -38
- package/src/lib/ui/Note.tsx +0 -58
package/lib/zudoku.components.js
CHANGED
|
@@ -1,50 +1,49 @@
|
|
|
1
1
|
var ut = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var ye = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
-
var
|
|
7
|
-
var l = (t, e, r) => (
|
|
6
|
+
var v = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), je = (t, e, r) => e.has(t) || ye("Cannot " + r);
|
|
7
|
+
var l = (t, e, r) => (je(t, e, "read from private field"), r ? r.call(t) : e.get(t)), y = (t, e, r) => e.has(t) ? ye("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), g = (t, e, r, s) => (je(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
|
|
8
8
|
var X = (t, e, r, s) => ({
|
|
9
9
|
set _(n) {
|
|
10
|
-
|
|
10
|
+
g(t, e, n, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
13
|
return l(t, e, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import {
|
|
17
|
-
import { e as
|
|
18
|
-
import { u as
|
|
19
|
-
import { E as
|
|
16
|
+
import { a as Te, H as ce, M as ht, A as ft, u as gt } from "./AnchorLink-BbB2q-jx.js";
|
|
17
|
+
import { e as mt, f as pt, R as vt, L as te, g as G, h as xt, O as _e, i as bt, b as yt, u as ue } from "./index-CRo94sKK.js";
|
|
18
|
+
import { u as jt } from "./state-CsuHT8ZO.js";
|
|
19
|
+
import { E as Fe, S as k, a as wt, R as Nt } from "./SlotletProvider-4Naek_5M.js";
|
|
20
20
|
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
21
|
-
import { Button as
|
|
22
|
-
import { Callout as
|
|
23
|
-
import
|
|
24
|
-
import { a as
|
|
25
|
-
import { B as
|
|
26
|
-
import { a as
|
|
27
|
-
import { C as
|
|
28
|
-
import { S as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { c as M } from "./cn-BmFQLtkS.js";
|
|
21
|
+
import { Button as ie } from "./ui/Button.js";
|
|
22
|
+
import { Callout as Pt } from "./ui/Callout.js";
|
|
23
|
+
import St, { StrictMode as Qe, createContext as Le, Component as Ct, createElement as we, useState as Q, useCallback as Be, useEffect as _, Suspense as de, memo as He, useMemo as re, useContext as Et, Fragment as kt, useRef as he, forwardRef as At } from "react";
|
|
24
|
+
import { a as fe } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
25
|
+
import { B as Mt } from "./router-BsfSoK2j.js";
|
|
26
|
+
import { a as oe } from "./StaggeredRender-DDHSzQKE.js";
|
|
27
|
+
import { C as Dt } from "./ClientOnly-CVN6leDu.js";
|
|
28
|
+
import { S as ze, i as qe, Q as Ot, n as b, m as Ne, j as Pe, k as M, l as Rt, o as It, p as Tt, q as _t, r as Se, t as Ce, v as Ft, h as Ee, w as ke, x as Qt, y as U, u as F, z as Ke, A as Lt, g as Bt, Z as Ht, B as zt, C as qt } from "./ZudokuContext-BKXGJTmu.js";
|
|
29
|
+
import { M as Kt, u as ee } from "./hook-sn0zMTkE.js";
|
|
30
|
+
import { a as $t, T as Ut, b as Vt, V as Wt, u as ge } from "./Markdown-BDcCAWwm.js";
|
|
31
|
+
import { CircleXIcon as Yt, SearchIcon as Xt, MenuIcon as Zt, MoonStarIcon as Jt, SunIcon as Gt, ChevronRightIcon as er, ExternalLinkIcon as tr, PanelLeftIcon as rr } from "lucide-react";
|
|
32
|
+
import { DropdownMenu as ar, DropdownMenuTrigger as sr, DropdownMenuContent as nr, DropdownMenuLabel as ir, DropdownMenuSeparator as or, DropdownMenuSub as lr, DropdownMenuSubTrigger as cr, DropdownMenuPortal as ur, DropdownMenuSubContent as dr, DropdownMenuItem as hr } from "./ui/DropdownMenu.js";
|
|
33
|
+
import { c as A } from "./cn-BmFQLtkS.js";
|
|
35
34
|
import { VisuallyHidden as $e } from "@radix-ui/react-visually-hidden";
|
|
36
|
-
import { a as Ue, c as
|
|
35
|
+
import { a as Ue, c as fr } from "./index-BuAyrJe3.js";
|
|
37
36
|
import { Drawer as Ve, DrawerTrigger as We, DrawerContent as Ye, DrawerTitle as Xe, DrawerClose as gr } from "./ui/Drawer.js";
|
|
38
|
-
import { S as
|
|
39
|
-
import * as
|
|
40
|
-
function
|
|
41
|
-
return /* @__PURE__ */ a.jsx(
|
|
37
|
+
import { S as ae, a as mr } from "./Spinner-C6zroowC.js";
|
|
38
|
+
import * as se from "@radix-ui/react-collapsible";
|
|
39
|
+
function pr({ error: t }) {
|
|
40
|
+
return /* @__PURE__ */ a.jsx(Fe, { error: t });
|
|
42
41
|
}
|
|
43
42
|
var W = {};
|
|
44
|
-
const
|
|
43
|
+
const vr = /* @__PURE__ */ fe(Mt), xr = /* @__PURE__ */ fe(mt), br = /* @__PURE__ */ fe(pt);
|
|
45
44
|
Object.defineProperty(W, "__esModule", { value: !0 });
|
|
46
|
-
var
|
|
47
|
-
function
|
|
45
|
+
var yr = St, E = vr, me = xr, D = br;
|
|
46
|
+
function jr(t) {
|
|
48
47
|
if (t && t.__esModule) return t;
|
|
49
48
|
var e = /* @__PURE__ */ Object.create(null);
|
|
50
49
|
return t && Object.keys(t).forEach(function(r) {
|
|
@@ -59,27 +58,27 @@ function wr(t) {
|
|
|
59
58
|
}
|
|
60
59
|
}), e.default = t, Object.freeze(e);
|
|
61
60
|
}
|
|
62
|
-
var S = /* @__PURE__ */
|
|
63
|
-
function
|
|
61
|
+
var S = /* @__PURE__ */ jr(yr);
|
|
62
|
+
function wr({
|
|
64
63
|
basename: t,
|
|
65
64
|
children: e,
|
|
66
65
|
location: r = "/",
|
|
67
66
|
future: s
|
|
68
67
|
}) {
|
|
69
|
-
typeof r == "string" && (r =
|
|
70
|
-
let n = E.Action.Pop,
|
|
68
|
+
typeof r == "string" && (r = D.parsePath(r));
|
|
69
|
+
let n = E.Action.Pop, i = {
|
|
71
70
|
pathname: r.pathname || "/",
|
|
72
71
|
search: r.search || "",
|
|
73
72
|
hash: r.hash || "",
|
|
74
73
|
state: r.state != null ? r.state : null,
|
|
75
74
|
key: r.key || "default"
|
|
76
|
-
},
|
|
77
|
-
return /* @__PURE__ */ S.createElement(
|
|
75
|
+
}, o = Ze();
|
|
76
|
+
return /* @__PURE__ */ S.createElement(D.Router, {
|
|
78
77
|
basename: t,
|
|
79
78
|
children: e,
|
|
80
|
-
location:
|
|
79
|
+
location: i,
|
|
81
80
|
navigationType: n,
|
|
82
|
-
navigator:
|
|
81
|
+
navigator: o,
|
|
83
82
|
future: s,
|
|
84
83
|
static: !0
|
|
85
84
|
});
|
|
@@ -97,57 +96,57 @@ function Nr({
|
|
|
97
96
|
static: !0,
|
|
98
97
|
staticContext: t,
|
|
99
98
|
basename: t.basename || "/"
|
|
100
|
-
},
|
|
99
|
+
}, i = /* @__PURE__ */ new Map(), o = "";
|
|
101
100
|
if (r !== !1) {
|
|
102
|
-
let
|
|
101
|
+
let c = {
|
|
103
102
|
loaderData: t.loaderData,
|
|
104
103
|
actionData: t.actionData,
|
|
105
|
-
errors:
|
|
104
|
+
errors: Sr(t.errors)
|
|
106
105
|
};
|
|
107
|
-
|
|
106
|
+
o = `window.__staticRouterHydrationData = JSON.parse(${Dr(JSON.stringify(JSON.stringify(c)))});`;
|
|
108
107
|
}
|
|
109
108
|
let {
|
|
110
|
-
state:
|
|
109
|
+
state: u
|
|
111
110
|
} = n.router;
|
|
112
|
-
return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(
|
|
111
|
+
return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterContext.Provider, {
|
|
113
112
|
value: n
|
|
114
|
-
}, /* @__PURE__ */ S.createElement(
|
|
115
|
-
value:
|
|
116
|
-
}, /* @__PURE__ */ S.createElement(
|
|
117
|
-
value:
|
|
118
|
-
}, /* @__PURE__ */ S.createElement(
|
|
113
|
+
}, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterStateContext.Provider, {
|
|
114
|
+
value: u
|
|
115
|
+
}, /* @__PURE__ */ S.createElement(D.UNSAFE_FetchersContext.Provider, {
|
|
116
|
+
value: i
|
|
117
|
+
}, /* @__PURE__ */ S.createElement(D.UNSAFE_ViewTransitionContext.Provider, {
|
|
119
118
|
value: {
|
|
120
119
|
isTransitioning: !1
|
|
121
120
|
}
|
|
122
|
-
}, /* @__PURE__ */ S.createElement(
|
|
121
|
+
}, /* @__PURE__ */ S.createElement(D.Router, {
|
|
123
122
|
basename: n.basename,
|
|
124
|
-
location:
|
|
125
|
-
navigationType:
|
|
123
|
+
location: u.location,
|
|
124
|
+
navigationType: u.historyAction,
|
|
126
125
|
navigator: n.navigator,
|
|
127
126
|
static: n.static,
|
|
128
127
|
future: {
|
|
129
128
|
v7_relativeSplatPath: e.future.v7_relativeSplatPath
|
|
130
129
|
}
|
|
131
|
-
}, /* @__PURE__ */ S.createElement(
|
|
130
|
+
}, /* @__PURE__ */ S.createElement(Pr, {
|
|
132
131
|
routes: e.routes,
|
|
133
132
|
future: e.future,
|
|
134
|
-
state:
|
|
135
|
-
})))))),
|
|
133
|
+
state: u
|
|
134
|
+
})))))), o ? /* @__PURE__ */ S.createElement("script", {
|
|
136
135
|
suppressHydrationWarning: !0,
|
|
137
136
|
nonce: s,
|
|
138
137
|
dangerouslySetInnerHTML: {
|
|
139
|
-
__html:
|
|
138
|
+
__html: o
|
|
140
139
|
}
|
|
141
140
|
}) : null);
|
|
142
141
|
}
|
|
143
|
-
function
|
|
142
|
+
function Pr({
|
|
144
143
|
routes: t,
|
|
145
144
|
future: e,
|
|
146
145
|
state: r
|
|
147
146
|
}) {
|
|
148
147
|
return me.UNSAFE_useRoutesImpl(t, void 0, r, e);
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function Sr(t) {
|
|
151
150
|
if (!t) return null;
|
|
152
151
|
let e = Object.entries(t), r = {};
|
|
153
152
|
for (let [s, n] of e)
|
|
@@ -186,32 +185,32 @@ function Ze() {
|
|
|
186
185
|
}
|
|
187
186
|
};
|
|
188
187
|
}
|
|
189
|
-
function
|
|
188
|
+
function Cr(t, e) {
|
|
190
189
|
return E.createStaticHandler(t, {
|
|
191
190
|
...e,
|
|
192
191
|
mapRouteProperties: me.UNSAFE_mapRouteProperties
|
|
193
192
|
});
|
|
194
193
|
}
|
|
195
|
-
function
|
|
196
|
-
let s = {}, n = E.UNSAFE_convertRoutesToDataRoutes(t, me.UNSAFE_mapRouteProperties, void 0, s),
|
|
197
|
-
let
|
|
194
|
+
function Er(t, e, r = {}) {
|
|
195
|
+
let s = {}, n = E.UNSAFE_convertRoutesToDataRoutes(t, me.UNSAFE_mapRouteProperties, void 0, s), i = e.matches.map((u) => {
|
|
196
|
+
let c = s[u.route.id] || u.route;
|
|
198
197
|
return {
|
|
199
|
-
...
|
|
200
|
-
route:
|
|
198
|
+
...u,
|
|
199
|
+
route: c
|
|
201
200
|
};
|
|
202
|
-
}),
|
|
201
|
+
}), o = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
|
|
203
202
|
return {
|
|
204
203
|
get basename() {
|
|
205
204
|
return e.basename;
|
|
206
205
|
},
|
|
207
206
|
get future() {
|
|
208
|
-
var
|
|
207
|
+
var u, c;
|
|
209
208
|
return {
|
|
210
209
|
v7_fetcherPersist: !1,
|
|
211
210
|
v7_normalizeFormMethod: !1,
|
|
212
|
-
v7_partialHydration: ((
|
|
211
|
+
v7_partialHydration: ((u = r.future) == null ? void 0 : u.v7_partialHydration) === !0,
|
|
213
212
|
v7_prependBasename: !1,
|
|
214
|
-
v7_relativeSplatPath: ((
|
|
213
|
+
v7_relativeSplatPath: ((c = r.future) == null ? void 0 : c.v7_relativeSplatPath) === !0,
|
|
215
214
|
v7_skipActionErrorRevalidation: !1
|
|
216
215
|
};
|
|
217
216
|
},
|
|
@@ -219,7 +218,7 @@ function kr(t, e, r = {}) {
|
|
|
219
218
|
return {
|
|
220
219
|
historyAction: E.Action.Pop,
|
|
221
220
|
location: e.location,
|
|
222
|
-
matches:
|
|
221
|
+
matches: i,
|
|
223
222
|
loaderData: e.loaderData,
|
|
224
223
|
actionData: e.actionData,
|
|
225
224
|
errors: e.errors,
|
|
@@ -238,22 +237,22 @@ function kr(t, e, r = {}) {
|
|
|
238
237
|
get window() {
|
|
239
238
|
},
|
|
240
239
|
initialize() {
|
|
241
|
-
throw
|
|
240
|
+
throw o("initialize");
|
|
242
241
|
},
|
|
243
242
|
subscribe() {
|
|
244
|
-
throw
|
|
243
|
+
throw o("subscribe");
|
|
245
244
|
},
|
|
246
245
|
enableScrollRestoration() {
|
|
247
|
-
throw
|
|
246
|
+
throw o("enableScrollRestoration");
|
|
248
247
|
},
|
|
249
248
|
navigate() {
|
|
250
|
-
throw
|
|
249
|
+
throw o("navigate");
|
|
251
250
|
},
|
|
252
251
|
fetch() {
|
|
253
|
-
throw
|
|
252
|
+
throw o("fetch");
|
|
254
253
|
},
|
|
255
254
|
revalidate() {
|
|
256
|
-
throw
|
|
255
|
+
throw o("revalidate");
|
|
257
256
|
},
|
|
258
257
|
createHref: Je,
|
|
259
258
|
encodeLocation: Ge,
|
|
@@ -261,79 +260,79 @@ function kr(t, e, r = {}) {
|
|
|
261
260
|
return E.IDLE_FETCHER;
|
|
262
261
|
},
|
|
263
262
|
deleteFetcher() {
|
|
264
|
-
throw
|
|
263
|
+
throw o("deleteFetcher");
|
|
265
264
|
},
|
|
266
265
|
dispose() {
|
|
267
|
-
throw
|
|
266
|
+
throw o("dispose");
|
|
268
267
|
},
|
|
269
268
|
getBlocker() {
|
|
270
269
|
return E.IDLE_BLOCKER;
|
|
271
270
|
},
|
|
272
271
|
deleteBlocker() {
|
|
273
|
-
throw
|
|
272
|
+
throw o("deleteBlocker");
|
|
274
273
|
},
|
|
275
274
|
patchRoutes() {
|
|
276
|
-
throw
|
|
275
|
+
throw o("patchRoutes");
|
|
277
276
|
},
|
|
278
277
|
_internalFetchControllers: /* @__PURE__ */ new Map(),
|
|
279
278
|
_internalActiveDeferreds: /* @__PURE__ */ new Map(),
|
|
280
279
|
_internalSetRoutes() {
|
|
281
|
-
throw
|
|
280
|
+
throw o("_internalSetRoutes");
|
|
282
281
|
}
|
|
283
282
|
};
|
|
284
283
|
}
|
|
285
284
|
function Je(t) {
|
|
286
|
-
return typeof t == "string" ? t :
|
|
285
|
+
return typeof t == "string" ? t : D.createPath(t);
|
|
287
286
|
}
|
|
288
287
|
function Ge(t) {
|
|
289
|
-
let e = typeof t == "string" ? t :
|
|
288
|
+
let e = typeof t == "string" ? t : D.createPath(t);
|
|
290
289
|
e = e.replace(/ $/, "%20");
|
|
291
|
-
let r =
|
|
290
|
+
let r = kr.test(e) ? new URL(e) : new URL(e, "http://localhost");
|
|
292
291
|
return {
|
|
293
292
|
pathname: r.pathname,
|
|
294
293
|
search: r.search,
|
|
295
294
|
hash: r.hash
|
|
296
295
|
};
|
|
297
296
|
}
|
|
298
|
-
const
|
|
297
|
+
const kr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ar = {
|
|
299
298
|
"&": "\\u0026",
|
|
300
299
|
">": "\\u003e",
|
|
301
300
|
"<": "\\u003c",
|
|
302
301
|
"\u2028": "\\u2028",
|
|
303
302
|
"\u2029": "\\u2029"
|
|
304
|
-
},
|
|
305
|
-
function
|
|
306
|
-
return t.replace(
|
|
303
|
+
}, Mr = /[&><\u2028\u2029]/g;
|
|
304
|
+
function Dr(t) {
|
|
305
|
+
return t.replace(Mr, (e) => Ar[e]);
|
|
307
306
|
}
|
|
308
|
-
W.StaticRouter =
|
|
309
|
-
var
|
|
310
|
-
W.createStaticHandler =
|
|
311
|
-
W.createStaticRouter =
|
|
312
|
-
const
|
|
307
|
+
W.StaticRouter = wr;
|
|
308
|
+
var Or = W.StaticRouterProvider = Nr;
|
|
309
|
+
W.createStaticHandler = Cr;
|
|
310
|
+
W.createStaticRouter = Er;
|
|
311
|
+
const Rr = ({
|
|
313
312
|
router: t,
|
|
314
313
|
hydrate: e = !1
|
|
315
|
-
}) => /* @__PURE__ */ a.jsx(
|
|
314
|
+
}) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { children: /* @__PURE__ */ a.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ a.jsx(vt, { router: t }) }) }) }), Ir = ({
|
|
316
315
|
router: t,
|
|
317
316
|
context: e,
|
|
318
317
|
helmetContext: r
|
|
319
|
-
}) => /* @__PURE__ */ a.jsx(
|
|
320
|
-
var C,
|
|
318
|
+
}) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { context: r, children: /* @__PURE__ */ a.jsx(Or, { router: t, context: e }) }) });
|
|
319
|
+
var C, Oe, Tr = (Oe = class extends ze {
|
|
321
320
|
constructor(e = {}) {
|
|
322
321
|
super();
|
|
323
|
-
|
|
324
|
-
this.config = e,
|
|
322
|
+
y(this, C);
|
|
323
|
+
this.config = e, g(this, C, /* @__PURE__ */ new Map());
|
|
325
324
|
}
|
|
326
325
|
build(e, r, s) {
|
|
327
|
-
const n = r.queryKey,
|
|
328
|
-
let
|
|
329
|
-
return
|
|
326
|
+
const n = r.queryKey, i = r.queryHash ?? qe(n, r);
|
|
327
|
+
let o = this.get(i);
|
|
328
|
+
return o || (o = new Ot({
|
|
330
329
|
cache: this,
|
|
331
330
|
queryKey: n,
|
|
332
|
-
queryHash:
|
|
331
|
+
queryHash: i,
|
|
333
332
|
options: e.defaultQueryOptions(r),
|
|
334
333
|
state: s,
|
|
335
334
|
defaultOptions: e.getQueryDefaults(n)
|
|
336
|
-
}), this.add(
|
|
335
|
+
}), this.add(o)), o;
|
|
337
336
|
}
|
|
338
337
|
add(e) {
|
|
339
338
|
l(this, C).has(e.queryHash) || (l(this, C).set(e.queryHash, e), this.notify({
|
|
@@ -346,7 +345,7 @@ var C, Ae, _r = (Ae = class extends qe {
|
|
|
346
345
|
r && (e.destroy(), r === e && l(this, C).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
347
346
|
}
|
|
348
347
|
clear() {
|
|
349
|
-
|
|
348
|
+
b.batch(() => {
|
|
350
349
|
this.getAll().forEach((e) => {
|
|
351
350
|
this.remove(e);
|
|
352
351
|
});
|
|
@@ -361,43 +360,43 @@ var C, Ae, _r = (Ae = class extends qe {
|
|
|
361
360
|
find(e) {
|
|
362
361
|
const r = { exact: !0, ...e };
|
|
363
362
|
return this.getAll().find(
|
|
364
|
-
(s) =>
|
|
363
|
+
(s) => Ne(r, s)
|
|
365
364
|
);
|
|
366
365
|
}
|
|
367
366
|
findAll(e = {}) {
|
|
368
367
|
const r = this.getAll();
|
|
369
|
-
return Object.keys(e).length > 0 ? r.filter((s) =>
|
|
368
|
+
return Object.keys(e).length > 0 ? r.filter((s) => Ne(e, s)) : r;
|
|
370
369
|
}
|
|
371
370
|
notify(e) {
|
|
372
|
-
|
|
371
|
+
b.batch(() => {
|
|
373
372
|
this.listeners.forEach((r) => {
|
|
374
373
|
r(e);
|
|
375
374
|
});
|
|
376
375
|
});
|
|
377
376
|
}
|
|
378
377
|
onFocus() {
|
|
379
|
-
|
|
378
|
+
b.batch(() => {
|
|
380
379
|
this.getAll().forEach((e) => {
|
|
381
380
|
e.onFocus();
|
|
382
381
|
});
|
|
383
382
|
});
|
|
384
383
|
}
|
|
385
384
|
onOnline() {
|
|
386
|
-
|
|
385
|
+
b.batch(() => {
|
|
387
386
|
this.getAll().forEach((e) => {
|
|
388
387
|
e.onOnline();
|
|
389
388
|
});
|
|
390
389
|
});
|
|
391
390
|
}
|
|
392
|
-
}, C = new WeakMap(),
|
|
391
|
+
}, C = new WeakMap(), Oe), x, V, Re, _r = (Re = class extends ze {
|
|
393
392
|
constructor(e = {}) {
|
|
394
393
|
super();
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
this.config = e,
|
|
394
|
+
y(this, x);
|
|
395
|
+
y(this, V);
|
|
396
|
+
this.config = e, g(this, x, /* @__PURE__ */ new Map()), g(this, V, Date.now());
|
|
398
397
|
}
|
|
399
398
|
build(e, r, s) {
|
|
400
|
-
const n = new
|
|
399
|
+
const n = new Kt({
|
|
401
400
|
mutationCache: this,
|
|
402
401
|
mutationId: ++X(this, V)._,
|
|
403
402
|
options: e.defaultMutationOptions(r),
|
|
@@ -406,37 +405,37 @@ var C, Ae, _r = (Ae = class extends qe {
|
|
|
406
405
|
return this.add(n), n;
|
|
407
406
|
}
|
|
408
407
|
add(e) {
|
|
409
|
-
const r = Z(e), s = l(this,
|
|
410
|
-
s.push(e), l(this,
|
|
408
|
+
const r = Z(e), s = l(this, x).get(r) ?? [];
|
|
409
|
+
s.push(e), l(this, x).set(r, s), this.notify({ type: "added", mutation: e });
|
|
411
410
|
}
|
|
412
411
|
remove(e) {
|
|
413
412
|
var s;
|
|
414
413
|
const r = Z(e);
|
|
415
|
-
if (l(this,
|
|
416
|
-
const n = (s = l(this,
|
|
417
|
-
n && (n.length === 0 ? l(this,
|
|
414
|
+
if (l(this, x).has(r)) {
|
|
415
|
+
const n = (s = l(this, x).get(r)) == null ? void 0 : s.filter((i) => i !== e);
|
|
416
|
+
n && (n.length === 0 ? l(this, x).delete(r) : l(this, x).set(r, n));
|
|
418
417
|
}
|
|
419
418
|
this.notify({ type: "removed", mutation: e });
|
|
420
419
|
}
|
|
421
420
|
canRun(e) {
|
|
422
421
|
var s;
|
|
423
|
-
const r = (s = l(this,
|
|
422
|
+
const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n.state.status === "pending");
|
|
424
423
|
return !r || r === e;
|
|
425
424
|
}
|
|
426
425
|
runNext(e) {
|
|
427
426
|
var s;
|
|
428
|
-
const r = (s = l(this,
|
|
427
|
+
const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n !== e && n.state.isPaused);
|
|
429
428
|
return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
|
|
430
429
|
}
|
|
431
430
|
clear() {
|
|
432
|
-
|
|
431
|
+
b.batch(() => {
|
|
433
432
|
this.getAll().forEach((e) => {
|
|
434
433
|
this.remove(e);
|
|
435
434
|
});
|
|
436
435
|
});
|
|
437
436
|
}
|
|
438
437
|
getAll() {
|
|
439
|
-
return [...l(this,
|
|
438
|
+
return [...l(this, x).values()].flat();
|
|
440
439
|
}
|
|
441
440
|
find(e) {
|
|
442
441
|
const r = { exact: !0, ...e };
|
|
@@ -448,7 +447,7 @@ var C, Ae, _r = (Ae = class extends qe {
|
|
|
448
447
|
return this.getAll().filter((r) => Pe(e, r));
|
|
449
448
|
}
|
|
450
449
|
notify(e) {
|
|
451
|
-
|
|
450
|
+
b.batch(() => {
|
|
452
451
|
this.listeners.forEach((r) => {
|
|
453
452
|
r(e);
|
|
454
453
|
});
|
|
@@ -456,74 +455,74 @@ var C, Ae, _r = (Ae = class extends qe {
|
|
|
456
455
|
}
|
|
457
456
|
resumePausedMutations() {
|
|
458
457
|
const e = this.getAll().filter((r) => r.state.isPaused);
|
|
459
|
-
return
|
|
458
|
+
return b.batch(
|
|
460
459
|
() => Promise.all(
|
|
461
|
-
e.map((r) => r.continue().catch(
|
|
460
|
+
e.map((r) => r.continue().catch(M))
|
|
462
461
|
)
|
|
463
462
|
);
|
|
464
463
|
}
|
|
465
|
-
},
|
|
464
|
+
}, x = new WeakMap(), V = new WeakMap(), Re);
|
|
466
465
|
function Z(t) {
|
|
467
466
|
var e;
|
|
468
467
|
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
469
468
|
}
|
|
470
|
-
function
|
|
469
|
+
function Ae(t) {
|
|
471
470
|
return {
|
|
472
471
|
onFetch: (e, r) => {
|
|
473
|
-
var
|
|
474
|
-
const s = e.options, n = (
|
|
475
|
-
let
|
|
476
|
-
const
|
|
477
|
-
let
|
|
478
|
-
const
|
|
479
|
-
Object.defineProperty(
|
|
472
|
+
var j, N, p, P, h;
|
|
473
|
+
const s = e.options, n = (p = (N = (j = e.fetchOptions) == null ? void 0 : j.meta) == null ? void 0 : N.fetchMore) == null ? void 0 : p.direction, i = ((P = e.state.data) == null ? void 0 : P.pages) || [], o = ((h = e.state.data) == null ? void 0 : h.pageParams) || [];
|
|
474
|
+
let u = { pages: [], pageParams: [] }, c = 0;
|
|
475
|
+
const m = async () => {
|
|
476
|
+
let f = !1;
|
|
477
|
+
const L = (w) => {
|
|
478
|
+
Object.defineProperty(w, "signal", {
|
|
480
479
|
enumerable: !0,
|
|
481
|
-
get: () => (e.signal.aborted ?
|
|
482
|
-
|
|
480
|
+
get: () => (e.signal.aborted ? f = !0 : e.signal.addEventListener("abort", () => {
|
|
481
|
+
f = !0;
|
|
483
482
|
}), e.signal)
|
|
484
483
|
});
|
|
485
|
-
}, lt =
|
|
486
|
-
if (
|
|
484
|
+
}, lt = Rt(e.options, e.fetchOptions), ve = async (w, O, K) => {
|
|
485
|
+
if (f)
|
|
487
486
|
return Promise.reject();
|
|
488
|
-
if (
|
|
489
|
-
return Promise.resolve(
|
|
487
|
+
if (O == null && w.pages.length)
|
|
488
|
+
return Promise.resolve(w);
|
|
490
489
|
const Y = {
|
|
491
490
|
queryKey: e.queryKey,
|
|
492
|
-
pageParam:
|
|
491
|
+
pageParam: O,
|
|
493
492
|
direction: K ? "backward" : "forward",
|
|
494
493
|
meta: e.options.meta
|
|
495
494
|
};
|
|
496
|
-
|
|
495
|
+
L(Y);
|
|
497
496
|
const ct = await lt(
|
|
498
497
|
Y
|
|
499
|
-
), { maxPages:
|
|
498
|
+
), { maxPages: xe } = e.options, be = K ? It : Tt;
|
|
500
499
|
return {
|
|
501
|
-
pages:
|
|
502
|
-
pageParams:
|
|
500
|
+
pages: be(w.pages, ct, xe),
|
|
501
|
+
pageParams: be(w.pageParams, O, xe)
|
|
503
502
|
};
|
|
504
503
|
};
|
|
505
|
-
if (n &&
|
|
506
|
-
const
|
|
507
|
-
pages:
|
|
508
|
-
pageParams:
|
|
509
|
-
}, Y =
|
|
510
|
-
|
|
504
|
+
if (n && i.length) {
|
|
505
|
+
const w = n === "backward", O = w ? Fr : Me, K = {
|
|
506
|
+
pages: i,
|
|
507
|
+
pageParams: o
|
|
508
|
+
}, Y = O(s, K);
|
|
509
|
+
u = await ve(K, Y, w);
|
|
511
510
|
} else {
|
|
512
|
-
const
|
|
511
|
+
const w = t ?? i.length;
|
|
513
512
|
do {
|
|
514
|
-
const
|
|
515
|
-
if (
|
|
513
|
+
const O = c === 0 ? o[0] ?? s.initialPageParam : Me(s, u);
|
|
514
|
+
if (c > 0 && O == null)
|
|
516
515
|
break;
|
|
517
|
-
|
|
518
|
-
} while (
|
|
516
|
+
u = await ve(u, O), c++;
|
|
517
|
+
} while (c < w);
|
|
519
518
|
}
|
|
520
|
-
return
|
|
519
|
+
return u;
|
|
521
520
|
};
|
|
522
521
|
e.options.persister ? e.fetchFn = () => {
|
|
523
|
-
var
|
|
524
|
-
return (
|
|
525
|
-
|
|
526
|
-
|
|
522
|
+
var f, L;
|
|
523
|
+
return (L = (f = e.options).persister) == null ? void 0 : L.call(
|
|
524
|
+
f,
|
|
525
|
+
m,
|
|
527
526
|
{
|
|
528
527
|
queryKey: e.queryKey,
|
|
529
528
|
meta: e.options.meta,
|
|
@@ -531,7 +530,7 @@ function ke(t) {
|
|
|
531
530
|
},
|
|
532
531
|
r
|
|
533
532
|
);
|
|
534
|
-
} : e.fetchFn =
|
|
533
|
+
} : e.fetchFn = m;
|
|
535
534
|
}
|
|
536
535
|
};
|
|
537
536
|
}
|
|
@@ -544,69 +543,69 @@ function Me(t, { pages: e, pageParams: r }) {
|
|
|
544
543
|
r
|
|
545
544
|
) : void 0;
|
|
546
545
|
}
|
|
547
|
-
function
|
|
546
|
+
function Fr(t, { pages: e, pageParams: r }) {
|
|
548
547
|
var s;
|
|
549
548
|
return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
|
|
550
549
|
}
|
|
551
|
-
var
|
|
550
|
+
var d, R, I, B, H, T, z, q, Ie, Qr = (Ie = class {
|
|
552
551
|
constructor(t = {}) {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
552
|
+
y(this, d);
|
|
553
|
+
y(this, R);
|
|
554
|
+
y(this, I);
|
|
555
|
+
y(this, B);
|
|
556
|
+
y(this, H);
|
|
557
|
+
y(this, T);
|
|
558
|
+
y(this, z);
|
|
559
|
+
y(this, q);
|
|
560
|
+
g(this, d, t.queryCache || new Tr()), g(this, R, t.mutationCache || new _r()), g(this, I, t.defaultOptions || {}), g(this, B, /* @__PURE__ */ new Map()), g(this, H, /* @__PURE__ */ new Map()), g(this, T, 0);
|
|
562
561
|
}
|
|
563
562
|
mount() {
|
|
564
|
-
X(this,
|
|
565
|
-
t && (await this.resumePausedMutations(), l(this,
|
|
566
|
-
})),
|
|
567
|
-
t && (await this.resumePausedMutations(), l(this,
|
|
563
|
+
X(this, T)._++, l(this, T) === 1 && (g(this, z, _t.subscribe(async (t) => {
|
|
564
|
+
t && (await this.resumePausedMutations(), l(this, d).onFocus());
|
|
565
|
+
})), g(this, q, Se.subscribe(async (t) => {
|
|
566
|
+
t && (await this.resumePausedMutations(), l(this, d).onOnline());
|
|
568
567
|
})));
|
|
569
568
|
}
|
|
570
569
|
unmount() {
|
|
571
570
|
var t, e;
|
|
572
|
-
X(this,
|
|
571
|
+
X(this, T)._--, l(this, T) === 0 && ((t = l(this, z)) == null || t.call(this), g(this, z, void 0), (e = l(this, q)) == null || e.call(this), g(this, q, void 0));
|
|
573
572
|
}
|
|
574
573
|
isFetching(t) {
|
|
575
|
-
return l(this,
|
|
574
|
+
return l(this, d).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
576
575
|
}
|
|
577
576
|
isMutating(t) {
|
|
578
|
-
return l(this,
|
|
577
|
+
return l(this, R).findAll({ ...t, status: "pending" }).length;
|
|
579
578
|
}
|
|
580
579
|
getQueryData(t) {
|
|
581
580
|
var r;
|
|
582
581
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
583
|
-
return (r = l(this,
|
|
582
|
+
return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state.data;
|
|
584
583
|
}
|
|
585
584
|
ensureQueryData(t) {
|
|
586
585
|
const e = this.getQueryData(t.queryKey);
|
|
587
586
|
if (e === void 0)
|
|
588
587
|
return this.fetchQuery(t);
|
|
589
588
|
{
|
|
590
|
-
const r = this.defaultQueryOptions(t), s = l(this,
|
|
591
|
-
return t.revalidateIfStale && s.isStaleByTime(
|
|
589
|
+
const r = this.defaultQueryOptions(t), s = l(this, d).build(this, r);
|
|
590
|
+
return t.revalidateIfStale && s.isStaleByTime(Ce(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(e);
|
|
592
591
|
}
|
|
593
592
|
}
|
|
594
593
|
getQueriesData(t) {
|
|
595
|
-
return l(this,
|
|
594
|
+
return l(this, d).findAll(t).map(({ queryKey: e, state: r }) => {
|
|
596
595
|
const s = r.data;
|
|
597
596
|
return [e, s];
|
|
598
597
|
});
|
|
599
598
|
}
|
|
600
599
|
setQueryData(t, e, r) {
|
|
601
|
-
const s = this.defaultQueryOptions({ queryKey: t }), n = l(this,
|
|
600
|
+
const s = this.defaultQueryOptions({ queryKey: t }), n = l(this, d).get(
|
|
602
601
|
s.queryHash
|
|
603
|
-
),
|
|
604
|
-
if (
|
|
605
|
-
return l(this,
|
|
602
|
+
), i = n == null ? void 0 : n.state.data, o = Ft(e, i);
|
|
603
|
+
if (o !== void 0)
|
|
604
|
+
return l(this, d).build(this, s).setData(o, { ...r, manual: !0 });
|
|
606
605
|
}
|
|
607
606
|
setQueriesData(t, e, r) {
|
|
608
|
-
return
|
|
609
|
-
() => l(this,
|
|
607
|
+
return b.batch(
|
|
608
|
+
() => l(this, d).findAll(t).map(({ queryKey: s }) => [
|
|
610
609
|
s,
|
|
611
610
|
this.setQueryData(s, e, r)
|
|
612
611
|
])
|
|
@@ -615,34 +614,34 @@ var h, T, I, B, H, _, q, z, Re, Lr = (Re = class {
|
|
|
615
614
|
getQueryState(t) {
|
|
616
615
|
var r;
|
|
617
616
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
618
|
-
return (r = l(this,
|
|
617
|
+
return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state;
|
|
619
618
|
}
|
|
620
619
|
removeQueries(t) {
|
|
621
|
-
const e = l(this,
|
|
622
|
-
|
|
620
|
+
const e = l(this, d);
|
|
621
|
+
b.batch(() => {
|
|
623
622
|
e.findAll(t).forEach((r) => {
|
|
624
623
|
e.remove(r);
|
|
625
624
|
});
|
|
626
625
|
});
|
|
627
626
|
}
|
|
628
627
|
resetQueries(t, e) {
|
|
629
|
-
const r = l(this,
|
|
628
|
+
const r = l(this, d), s = {
|
|
630
629
|
type: "active",
|
|
631
630
|
...t
|
|
632
631
|
};
|
|
633
|
-
return
|
|
632
|
+
return b.batch(() => (r.findAll(t).forEach((n) => {
|
|
634
633
|
n.reset();
|
|
635
634
|
}), this.refetchQueries(s, e)));
|
|
636
635
|
}
|
|
637
636
|
cancelQueries(t = {}, e = {}) {
|
|
638
|
-
const r = { revert: !0, ...e }, s =
|
|
639
|
-
() => l(this,
|
|
637
|
+
const r = { revert: !0, ...e }, s = b.batch(
|
|
638
|
+
() => l(this, d).findAll(t).map((n) => n.cancel(r))
|
|
640
639
|
);
|
|
641
|
-
return Promise.all(s).then(
|
|
640
|
+
return Promise.all(s).then(M).catch(M);
|
|
642
641
|
}
|
|
643
642
|
invalidateQueries(t = {}, e = {}) {
|
|
644
|
-
return
|
|
645
|
-
if (l(this,
|
|
643
|
+
return b.batch(() => {
|
|
644
|
+
if (l(this, d).findAll(t).forEach((s) => {
|
|
646
645
|
s.invalidate();
|
|
647
646
|
}), t.refetchType === "none")
|
|
648
647
|
return Promise.resolve();
|
|
@@ -657,51 +656,51 @@ var h, T, I, B, H, _, q, z, Re, Lr = (Re = class {
|
|
|
657
656
|
const r = {
|
|
658
657
|
...e,
|
|
659
658
|
cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
|
|
660
|
-
}, s =
|
|
661
|
-
() => l(this,
|
|
662
|
-
let
|
|
663
|
-
return r.throwOnError || (
|
|
659
|
+
}, s = b.batch(
|
|
660
|
+
() => l(this, d).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
|
|
661
|
+
let i = n.fetch(void 0, r);
|
|
662
|
+
return r.throwOnError || (i = i.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : i;
|
|
664
663
|
})
|
|
665
664
|
);
|
|
666
|
-
return Promise.all(s).then(
|
|
665
|
+
return Promise.all(s).then(M);
|
|
667
666
|
}
|
|
668
667
|
fetchQuery(t) {
|
|
669
668
|
const e = this.defaultQueryOptions(t);
|
|
670
669
|
e.retry === void 0 && (e.retry = !1);
|
|
671
|
-
const r = l(this,
|
|
670
|
+
const r = l(this, d).build(this, e);
|
|
672
671
|
return r.isStaleByTime(
|
|
673
|
-
|
|
672
|
+
Ce(e.staleTime, r)
|
|
674
673
|
) ? r.fetch(e) : Promise.resolve(r.state.data);
|
|
675
674
|
}
|
|
676
675
|
prefetchQuery(t) {
|
|
677
|
-
return this.fetchQuery(t).then(
|
|
676
|
+
return this.fetchQuery(t).then(M).catch(M);
|
|
678
677
|
}
|
|
679
678
|
fetchInfiniteQuery(t) {
|
|
680
|
-
return t.behavior =
|
|
679
|
+
return t.behavior = Ae(t.pages), this.fetchQuery(t);
|
|
681
680
|
}
|
|
682
681
|
prefetchInfiniteQuery(t) {
|
|
683
|
-
return this.fetchInfiniteQuery(t).then(
|
|
682
|
+
return this.fetchInfiniteQuery(t).then(M).catch(M);
|
|
684
683
|
}
|
|
685
684
|
ensureInfiniteQueryData(t) {
|
|
686
|
-
return t.behavior =
|
|
685
|
+
return t.behavior = Ae(t.pages), this.ensureQueryData(t);
|
|
687
686
|
}
|
|
688
687
|
resumePausedMutations() {
|
|
689
|
-
return
|
|
688
|
+
return Se.isOnline() ? l(this, R).resumePausedMutations() : Promise.resolve();
|
|
690
689
|
}
|
|
691
690
|
getQueryCache() {
|
|
692
|
-
return l(this,
|
|
691
|
+
return l(this, d);
|
|
693
692
|
}
|
|
694
693
|
getMutationCache() {
|
|
695
|
-
return l(this,
|
|
694
|
+
return l(this, R);
|
|
696
695
|
}
|
|
697
696
|
getDefaultOptions() {
|
|
698
697
|
return l(this, I);
|
|
699
698
|
}
|
|
700
699
|
setDefaultOptions(t) {
|
|
701
|
-
|
|
700
|
+
g(this, I, t);
|
|
702
701
|
}
|
|
703
702
|
setQueryDefaults(t, e) {
|
|
704
|
-
l(this, B).set(
|
|
703
|
+
l(this, B).set(Ee(t), {
|
|
705
704
|
queryKey: t,
|
|
706
705
|
defaultOptions: e
|
|
707
706
|
});
|
|
@@ -710,11 +709,11 @@ var h, T, I, B, H, _, q, z, Re, Lr = (Re = class {
|
|
|
710
709
|
const e = [...l(this, B).values()];
|
|
711
710
|
let r = {};
|
|
712
711
|
return e.forEach((s) => {
|
|
713
|
-
|
|
712
|
+
ke(t, s.queryKey) && (r = { ...r, ...s.defaultOptions });
|
|
714
713
|
}), r;
|
|
715
714
|
}
|
|
716
715
|
setMutationDefaults(t, e) {
|
|
717
|
-
l(this, H).set(
|
|
716
|
+
l(this, H).set(Ee(t), {
|
|
718
717
|
mutationKey: t,
|
|
719
718
|
defaultOptions: e
|
|
720
719
|
});
|
|
@@ -723,7 +722,7 @@ var h, T, I, B, H, _, q, z, Re, Lr = (Re = class {
|
|
|
723
722
|
const e = [...l(this, H).values()];
|
|
724
723
|
let r = {};
|
|
725
724
|
return e.forEach((s) => {
|
|
726
|
-
|
|
725
|
+
ke(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
|
|
727
726
|
}), r;
|
|
728
727
|
}
|
|
729
728
|
defaultQueryOptions(t) {
|
|
@@ -735,10 +734,10 @@ var h, T, I, B, H, _, q, z, Re, Lr = (Re = class {
|
|
|
735
734
|
...t,
|
|
736
735
|
_defaulted: !0
|
|
737
736
|
};
|
|
738
|
-
return e.queryHash || (e.queryHash =
|
|
737
|
+
return e.queryHash || (e.queryHash = qe(
|
|
739
738
|
e.queryKey,
|
|
740
739
|
e
|
|
741
|
-
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn ===
|
|
740
|
+
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Qt && (e.enabled = !1), e;
|
|
742
741
|
}
|
|
743
742
|
defaultMutationOptions(t) {
|
|
744
743
|
return t != null && t._defaulted ? t : {
|
|
@@ -749,16 +748,16 @@ var h, T, I, B, H, _, q, z, Re, Lr = (Re = class {
|
|
|
749
748
|
};
|
|
750
749
|
}
|
|
751
750
|
clear() {
|
|
752
|
-
l(this,
|
|
751
|
+
l(this, d).clear(), l(this, R).clear();
|
|
753
752
|
}
|
|
754
|
-
},
|
|
755
|
-
const
|
|
753
|
+
}, d = new WeakMap(), R = new WeakMap(), I = new WeakMap(), B = new WeakMap(), H = new WeakMap(), T = new WeakMap(), z = new WeakMap(), q = new WeakMap(), Ie);
|
|
754
|
+
const Lr = Le(null), ne = {
|
|
756
755
|
didCatch: !1,
|
|
757
756
|
error: null
|
|
758
757
|
};
|
|
759
|
-
class
|
|
758
|
+
class Br extends Ct {
|
|
760
759
|
constructor(e) {
|
|
761
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
760
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
|
|
762
761
|
}
|
|
763
762
|
static getDerivedStateFromError(e) {
|
|
764
763
|
return {
|
|
@@ -771,12 +770,12 @@ class Hr extends Et {
|
|
|
771
770
|
error: e
|
|
772
771
|
} = this.state;
|
|
773
772
|
if (e !== null) {
|
|
774
|
-
for (var r, s, n = arguments.length,
|
|
775
|
-
o
|
|
773
|
+
for (var r, s, n = arguments.length, i = new Array(n), o = 0; o < n; o++)
|
|
774
|
+
i[o] = arguments[o];
|
|
776
775
|
(r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
|
|
777
|
-
args:
|
|
776
|
+
args: i,
|
|
778
777
|
reason: "imperative-api"
|
|
779
|
-
}), this.setState(
|
|
778
|
+
}), this.setState(ne);
|
|
780
779
|
}
|
|
781
780
|
}
|
|
782
781
|
componentDidCatch(e, r) {
|
|
@@ -789,13 +788,13 @@ class Hr extends Et {
|
|
|
789
788
|
} = this.state, {
|
|
790
789
|
resetKeys: n
|
|
791
790
|
} = this.props;
|
|
792
|
-
if (s && r.error !== null &&
|
|
793
|
-
var
|
|
794
|
-
(
|
|
791
|
+
if (s && r.error !== null && Hr(e.resetKeys, n)) {
|
|
792
|
+
var i, o;
|
|
793
|
+
(i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
|
|
795
794
|
next: n,
|
|
796
795
|
prev: e.resetKeys,
|
|
797
796
|
reason: "keys"
|
|
798
|
-
}), this.setState(
|
|
797
|
+
}), this.setState(ne);
|
|
799
798
|
}
|
|
800
799
|
}
|
|
801
800
|
render() {
|
|
@@ -805,80 +804,80 @@ class Hr extends Et {
|
|
|
805
804
|
FallbackComponent: s,
|
|
806
805
|
fallback: n
|
|
807
806
|
} = this.props, {
|
|
808
|
-
didCatch:
|
|
809
|
-
error:
|
|
807
|
+
didCatch: i,
|
|
808
|
+
error: o
|
|
810
809
|
} = this.state;
|
|
811
|
-
let
|
|
812
|
-
if (
|
|
813
|
-
const
|
|
814
|
-
error:
|
|
810
|
+
let u = e;
|
|
811
|
+
if (i) {
|
|
812
|
+
const c = {
|
|
813
|
+
error: o,
|
|
815
814
|
resetErrorBoundary: this.resetErrorBoundary
|
|
816
815
|
};
|
|
817
816
|
if (typeof r == "function")
|
|
818
|
-
|
|
817
|
+
u = r(c);
|
|
819
818
|
else if (s)
|
|
820
|
-
|
|
821
|
-
else if (n
|
|
822
|
-
|
|
819
|
+
u = we(s, c);
|
|
820
|
+
else if (n !== void 0)
|
|
821
|
+
u = n;
|
|
823
822
|
else
|
|
824
|
-
throw
|
|
823
|
+
throw o;
|
|
825
824
|
}
|
|
826
|
-
return
|
|
825
|
+
return we(Lr.Provider, {
|
|
827
826
|
value: {
|
|
828
|
-
didCatch:
|
|
829
|
-
error:
|
|
827
|
+
didCatch: i,
|
|
828
|
+
error: o,
|
|
830
829
|
resetErrorBoundary: this.resetErrorBoundary
|
|
831
830
|
}
|
|
832
|
-
},
|
|
831
|
+
}, u);
|
|
833
832
|
}
|
|
834
833
|
}
|
|
835
|
-
function
|
|
834
|
+
function Hr() {
|
|
836
835
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
837
836
|
return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
|
|
838
837
|
}
|
|
839
|
-
const zr = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function",
|
|
840
|
-
class
|
|
838
|
+
const zr = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", qr = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Kr = (t) => "renderSearch" in t && typeof t.renderSearch == "function", $r = (t) => "initialize" in t && typeof t.initialize == "function", Ur = (t) => "getHead" in t && typeof t.getHead == "function", Vr = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Wr = (t) => "getIdentities" in t && typeof t.getIdentities == "function", et = new Qr();
|
|
839
|
+
class Yr {
|
|
841
840
|
constructor(e) {
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
841
|
+
v(this, "plugins");
|
|
842
|
+
v(this, "sidebars");
|
|
843
|
+
v(this, "topNavigation");
|
|
844
|
+
v(this, "meta");
|
|
845
|
+
v(this, "page");
|
|
846
|
+
v(this, "authentication");
|
|
847
|
+
v(this, "navigationPlugins");
|
|
848
|
+
v(this, "initialize", async () => {
|
|
850
849
|
await Promise.all(
|
|
851
|
-
this.plugins.filter(
|
|
850
|
+
this.plugins.filter($r).map((e) => {
|
|
852
851
|
var r;
|
|
853
852
|
return (r = e.initialize) == null ? void 0 : r.call(e, this);
|
|
854
853
|
})
|
|
855
854
|
);
|
|
856
855
|
});
|
|
857
|
-
|
|
856
|
+
v(this, "invalidateCache", async (e) => {
|
|
858
857
|
await et.invalidateQueries({ queryKey: e });
|
|
859
858
|
});
|
|
860
|
-
|
|
861
|
-
this.plugins.filter(
|
|
859
|
+
v(this, "getApiIdentities", async () => (await Promise.all(
|
|
860
|
+
this.plugins.filter(Wr).map((r) => r.getIdentities(this))
|
|
862
861
|
)).flat());
|
|
863
|
-
|
|
862
|
+
v(this, "getPluginSidebar", async (e) => (await Promise.all(
|
|
864
863
|
this.navigationPlugins.map(
|
|
865
864
|
(s) => {
|
|
866
865
|
var n;
|
|
867
|
-
return (n = s.getSidebar) == null ? void 0 : n.call(s,
|
|
866
|
+
return (n = s.getSidebar) == null ? void 0 : n.call(s, U(e));
|
|
868
867
|
}
|
|
869
868
|
)
|
|
870
869
|
)).flatMap((s) => s ?? []));
|
|
871
|
-
|
|
870
|
+
v(this, "signRequest", async (e) => {
|
|
872
871
|
if (!this.authentication)
|
|
873
872
|
throw new Error("No authentication provider configured");
|
|
874
873
|
const r = await this.authentication.getAccessToken();
|
|
875
874
|
return e.headers.set("Authorization", `Bearer ${r}`), e;
|
|
876
875
|
});
|
|
877
|
-
this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
876
|
+
this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(qr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
|
|
878
877
|
}
|
|
879
878
|
}
|
|
880
|
-
function
|
|
881
|
-
return /* @__PURE__ */ a.jsx(
|
|
879
|
+
function Xr({ error: t, resetErrorBoundary: e }) {
|
|
880
|
+
return /* @__PURE__ */ a.jsx(Fe, { error: t });
|
|
882
881
|
}
|
|
883
882
|
const J = globalThis;
|
|
884
883
|
(!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
|
|
@@ -888,15 +887,15 @@ const De = {
|
|
|
888
887
|
tip: "bg-green-600",
|
|
889
888
|
caution: "bg-orange-500",
|
|
890
889
|
danger: "bg-rose-500"
|
|
891
|
-
},
|
|
892
|
-
const { page: t } =
|
|
890
|
+
}, Zr = () => {
|
|
891
|
+
const { page: t } = F(), [e, r] = Q(!0);
|
|
893
892
|
if (!(t != null && t.banner) || !e)
|
|
894
893
|
return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
895
894
|
const s = t.banner.color && t.banner.color in De ? De[t.banner.color] : t.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: t.banner.color };
|
|
896
895
|
return /* @__PURE__ */ a.jsxs(
|
|
897
896
|
"div",
|
|
898
897
|
{
|
|
899
|
-
className:
|
|
898
|
+
className: A(
|
|
900
899
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
901
900
|
s
|
|
902
901
|
),
|
|
@@ -909,25 +908,25 @@ const De = {
|
|
|
909
908
|
type: "button",
|
|
910
909
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
911
910
|
onClick: () => r(!1),
|
|
912
|
-
children: /* @__PURE__ */ a.jsx(
|
|
911
|
+
children: /* @__PURE__ */ a.jsx(Yt, { size: 16 })
|
|
913
912
|
}
|
|
914
913
|
)
|
|
915
914
|
]
|
|
916
915
|
}
|
|
917
916
|
);
|
|
918
917
|
}, tt = () => {
|
|
919
|
-
const t =
|
|
920
|
-
|
|
918
|
+
const t = F(), [e, r] = Q(!1), s = Be(() => r(!1), []);
|
|
919
|
+
_(() => {
|
|
921
920
|
if (e)
|
|
922
921
|
return;
|
|
923
|
-
function o
|
|
924
|
-
|
|
922
|
+
function i(o) {
|
|
923
|
+
o.key === "k" && (o.metaKey || o.ctrlKey) && (o.preventDefault(), r(!0));
|
|
925
924
|
}
|
|
926
|
-
return window.addEventListener("keydown",
|
|
927
|
-
window.removeEventListener("keydown",
|
|
925
|
+
return window.addEventListener("keydown", i), () => {
|
|
926
|
+
window.removeEventListener("keydown", i);
|
|
928
927
|
};
|
|
929
928
|
}, [e, r]);
|
|
930
|
-
const n = t.plugins.find(
|
|
929
|
+
const n = t.plugins.find(Kr);
|
|
931
930
|
return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
932
931
|
/* @__PURE__ */ a.jsxs(
|
|
933
932
|
"button",
|
|
@@ -937,35 +936,46 @@ const De = {
|
|
|
937
936
|
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",
|
|
938
937
|
children: [
|
|
939
938
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
940
|
-
/* @__PURE__ */ a.jsx(
|
|
939
|
+
/* @__PURE__ */ a.jsx(Xt, { size: 14 }),
|
|
941
940
|
"Search"
|
|
942
941
|
] }),
|
|
943
942
|
/* @__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" })
|
|
944
943
|
]
|
|
945
944
|
}
|
|
946
945
|
),
|
|
947
|
-
/* @__PURE__ */ a.jsx(
|
|
946
|
+
/* @__PURE__ */ a.jsx(de, { fallback: null, children: n.renderSearch({
|
|
948
947
|
isOpen: e,
|
|
949
948
|
onClose: s
|
|
950
949
|
}) })
|
|
951
950
|
] }) : null;
|
|
952
|
-
}, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always",
|
|
953
|
-
const { topNavigation: t } =
|
|
954
|
-
return t.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
955
|
-
|
|
951
|
+
}, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Jr = () => {
|
|
952
|
+
const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
|
|
953
|
+
return t.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(de, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(Gr, { ...r }) }, r.id)) }) }) });
|
|
954
|
+
}, Gr = ({ id: t, label: e, default: r }) => {
|
|
955
|
+
var c;
|
|
956
|
+
const { sidebars: s } = F(), n = Ke(), i = s[t], o = r ?? (i ? Lt(i, (m) => {
|
|
957
|
+
if (m.type === "doc") return U(m.id);
|
|
958
|
+
}) : U(t));
|
|
959
|
+
if (!o)
|
|
960
|
+
throw new Error(
|
|
961
|
+
`No links found in top navigation for top navigation '${t}'. Check that the sidebar isn't empty or that a default link set.`
|
|
962
|
+
);
|
|
963
|
+
const u = ((c = n.data.topNavItem) == null ? void 0 : c.id) === t;
|
|
964
|
+
return /* @__PURE__ */ a.jsx(
|
|
965
|
+
te,
|
|
956
966
|
{
|
|
957
|
-
className:
|
|
967
|
+
className: Ue(
|
|
958
968
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
959
|
-
|
|
969
|
+
u ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
960
970
|
),
|
|
961
|
-
to:
|
|
962
|
-
children:
|
|
971
|
+
to: o,
|
|
972
|
+
children: e
|
|
963
973
|
}
|
|
964
|
-
)
|
|
974
|
+
);
|
|
965
975
|
}, ea = () => {
|
|
966
|
-
const { topNavigation: t } =
|
|
976
|
+
const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
|
|
967
977
|
return /* @__PURE__ */ a.jsxs(Ve, { direction: "right", children: [
|
|
968
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(
|
|
978
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Zt, { size: 22 }) }) }),
|
|
969
979
|
/* @__PURE__ */ a.jsxs(
|
|
970
980
|
Ye,
|
|
971
981
|
{
|
|
@@ -975,7 +985,7 @@ const De = {
|
|
|
975
985
|
/* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Navigation" }) }),
|
|
976
986
|
/* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(tt, {}) }),
|
|
977
987
|
/* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
978
|
-
|
|
988
|
+
G,
|
|
979
989
|
{
|
|
980
990
|
className: ({ isActive: s }) => Ue(
|
|
981
991
|
"block font-medium border-b-2",
|
|
@@ -989,54 +999,54 @@ const De = {
|
|
|
989
999
|
}
|
|
990
1000
|
)
|
|
991
1001
|
] });
|
|
992
|
-
}, at = ({ item: t }) => t.children ? /* @__PURE__ */ a.jsxs(
|
|
993
|
-
/* @__PURE__ */ a.jsx(
|
|
994
|
-
/* @__PURE__ */ a.jsx(
|
|
1002
|
+
}, at = ({ item: t }) => t.children ? /* @__PURE__ */ a.jsxs(lr, { children: [
|
|
1003
|
+
/* @__PURE__ */ a.jsx(cr, { children: t.label }),
|
|
1004
|
+
/* @__PURE__ */ a.jsx(ur, { children: /* @__PURE__ */ a.jsx(dr, { children: t.children.map((e, r) => (
|
|
995
1005
|
// eslint-disable-next-line react/no-array-index-key
|
|
996
1006
|
/* @__PURE__ */ a.jsx(at, { item: e }, r)
|
|
997
1007
|
)) }) })
|
|
998
|
-
] }, t.label) : /* @__PURE__ */ a.jsx(
|
|
999
|
-
const e = ee(), [r, s] =
|
|
1008
|
+
] }, t.label) : /* @__PURE__ */ a.jsx(te, { to: t.path ?? "", children: /* @__PURE__ */ a.jsx(hr, { children: t.label }, t.label) }), st = He(function() {
|
|
1009
|
+
const e = ee(), [r, s] = $t(), { isAuthenticated: n, profile: i, isAuthEnabled: o } = ee(), u = F(), { page: c, plugins: m } = u, j = m.filter((p) => zr(p)).flatMap((p) => p.getProfileMenuItems(u)).map((p) => /* @__PURE__ */ a.jsx(at, { item: p }, p.label)), N = r ? Jt : Gt;
|
|
1000
1010
|
return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
1001
|
-
/* @__PURE__ */ a.jsx(
|
|
1011
|
+
/* @__PURE__ */ a.jsx(Zr, {}),
|
|
1002
1012
|
/* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1003
1013
|
/* @__PURE__ */ a.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: [
|
|
1004
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(
|
|
1005
|
-
(
|
|
1014
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(te, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
1015
|
+
(c == null ? void 0 : c.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1006
1016
|
/* @__PURE__ */ a.jsx(
|
|
1007
1017
|
"img",
|
|
1008
1018
|
{
|
|
1009
|
-
src:
|
|
1010
|
-
alt:
|
|
1011
|
-
style: { width:
|
|
1012
|
-
className:
|
|
1019
|
+
src: /https?:\/\//.test(c.logo.src.light) ? c.logo.src.light : "/" + c.logo.src.light,
|
|
1020
|
+
alt: c.logo.alt ?? c.pageTitle,
|
|
1021
|
+
style: { width: c.logo.width },
|
|
1022
|
+
className: A("h-10", r && "hidden"),
|
|
1013
1023
|
loading: "lazy"
|
|
1014
1024
|
}
|
|
1015
1025
|
),
|
|
1016
1026
|
/* @__PURE__ */ a.jsx(
|
|
1017
1027
|
"img",
|
|
1018
1028
|
{
|
|
1019
|
-
src:
|
|
1020
|
-
alt:
|
|
1021
|
-
style: { width:
|
|
1022
|
-
className:
|
|
1029
|
+
src: /https?:\/\//.test(c.logo.src.dark) ? c.logo.src.dark : "/" + c.logo.src.dark,
|
|
1030
|
+
alt: c.logo.alt ?? c.pageTitle,
|
|
1031
|
+
style: { width: c.logo.width },
|
|
1032
|
+
className: A("h-10", !r && "hidden"),
|
|
1023
1033
|
loading: "lazy"
|
|
1024
1034
|
}
|
|
1025
1035
|
)
|
|
1026
1036
|
] }),
|
|
1027
|
-
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children:
|
|
1037
|
+
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: c == null ? void 0 : c.pageTitle })
|
|
1028
1038
|
] }) }) }),
|
|
1029
1039
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
1030
1040
|
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(tt, {}) }),
|
|
1031
1041
|
/* @__PURE__ */ a.jsx(ea, {}),
|
|
1032
1042
|
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
1033
1043
|
/* @__PURE__ */ a.jsx(k, { name: "head-navigation-start" }),
|
|
1034
|
-
|
|
1035
|
-
/* @__PURE__ */ a.jsx(
|
|
1036
|
-
/* @__PURE__ */ a.jsxs(
|
|
1037
|
-
/* @__PURE__ */ a.jsx(
|
|
1038
|
-
/* @__PURE__ */ a.jsx(
|
|
1039
|
-
|
|
1044
|
+
o && !n ? /* @__PURE__ */ a.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" }) : j.length > 0 && /* @__PURE__ */ a.jsxs(ar, { modal: !1, children: [
|
|
1045
|
+
/* @__PURE__ */ a.jsx(sr, { asChild: !0, children: /* @__PURE__ */ a.jsx(ie, { variant: "ghost", children: i != null && i.email ? `${i.email}` : "My Account" }) }),
|
|
1046
|
+
/* @__PURE__ */ a.jsxs(nr, { className: "w-56", children: [
|
|
1047
|
+
/* @__PURE__ */ a.jsx(ir, { children: "My Account" }),
|
|
1048
|
+
/* @__PURE__ */ a.jsx(or, {}),
|
|
1049
|
+
j
|
|
1040
1050
|
] })
|
|
1041
1051
|
] }),
|
|
1042
1052
|
/* @__PURE__ */ a.jsx(
|
|
@@ -1046,7 +1056,7 @@ const De = {
|
|
|
1046
1056
|
"aria-label": r ? "Switch to light mode" : "Switch to dark mode",
|
|
1047
1057
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
1048
1058
|
onClick: s,
|
|
1049
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1059
|
+
children: /* @__PURE__ */ a.jsx(N, { size: 18 })
|
|
1050
1060
|
}
|
|
1051
1061
|
),
|
|
1052
1062
|
/* @__PURE__ */ a.jsx(k, { name: "head-navigation-end" })
|
|
@@ -1054,85 +1064,85 @@ const De = {
|
|
|
1054
1064
|
] })
|
|
1055
1065
|
] }),
|
|
1056
1066
|
/* @__PURE__ */ a.jsx(k, { name: "top-navigation-before" }),
|
|
1057
|
-
/* @__PURE__ */ a.jsx(
|
|
1067
|
+
/* @__PURE__ */ a.jsx(Jr, {}),
|
|
1058
1068
|
/* @__PURE__ */ a.jsx(k, { name: "top-navigation-after" })
|
|
1059
1069
|
] })
|
|
1060
1070
|
] });
|
|
1061
1071
|
}), nt = {
|
|
1062
1072
|
Header: st
|
|
1063
|
-
}, ta =
|
|
1073
|
+
}, ta = Le(nt), ra = ta.Provider, aa = (t) => {
|
|
1064
1074
|
const [e, r] = Q(!1);
|
|
1065
|
-
|
|
1066
|
-
const
|
|
1067
|
-
r(
|
|
1075
|
+
_(() => {
|
|
1076
|
+
const i = localStorage.getItem("theme"), o = window.matchMedia("(prefers-color-scheme: dark)"), u = i === "dark" || !i && o.matches;
|
|
1077
|
+
r(u);
|
|
1068
1078
|
}, [e]);
|
|
1069
|
-
const s =
|
|
1070
|
-
const
|
|
1071
|
-
document.documentElement.classList.toggle("dark",
|
|
1079
|
+
const s = Be(() => {
|
|
1080
|
+
const i = !e;
|
|
1081
|
+
document.documentElement.classList.toggle("dark", i), localStorage.setItem("theme", i ? "dark" : "light"), r(i);
|
|
1072
1082
|
}, [e]), n = [e, s];
|
|
1073
|
-
return /* @__PURE__ */ a.jsx(
|
|
1083
|
+
return /* @__PURE__ */ a.jsx(Ut.Provider, { value: n, ...t });
|
|
1074
1084
|
}, sa = ({
|
|
1075
1085
|
children: t,
|
|
1076
1086
|
context: e
|
|
1077
|
-
}) => (
|
|
1087
|
+
}) => (Bt({
|
|
1078
1088
|
queryFn: async () => (await e.initialize(), !0),
|
|
1079
1089
|
queryKey: ["zudoku-initialize"]
|
|
1080
|
-
}), /* @__PURE__ */ a.jsx(
|
|
1090
|
+
}), /* @__PURE__ */ a.jsx(Ht.Provider, { value: e, children: t })), na = ({
|
|
1081
1091
|
children: t,
|
|
1082
1092
|
...e
|
|
1083
1093
|
}) => {
|
|
1084
|
-
var
|
|
1085
|
-
const r =
|
|
1094
|
+
var N, p;
|
|
1095
|
+
const r = re(
|
|
1086
1096
|
() => ({ ...nt, ...e.overrides }),
|
|
1087
1097
|
[e.overrides]
|
|
1088
|
-
), s =
|
|
1089
|
-
var
|
|
1098
|
+
), s = re(() => {
|
|
1099
|
+
var h;
|
|
1090
1100
|
return {
|
|
1091
|
-
...(e.plugins ?? []).filter(
|
|
1092
|
-
(
|
|
1093
|
-
).reduce((
|
|
1094
|
-
...
|
|
1095
|
-
...(
|
|
1101
|
+
...(e.plugins ?? []).filter(Vr).flatMap(
|
|
1102
|
+
(f) => f.getMdxComponents ? [f.getMdxComponents()] : []
|
|
1103
|
+
).reduce((f, L) => ({ ...f, ...L }), {}),
|
|
1104
|
+
...Vt,
|
|
1105
|
+
...(h = e.mdx) == null ? void 0 : h.components
|
|
1096
1106
|
};
|
|
1097
|
-
}, [(
|
|
1098
|
-
() =>
|
|
1099
|
-
[n,
|
|
1100
|
-
),
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
}, [
|
|
1104
|
-
const [
|
|
1105
|
-
var
|
|
1106
|
-
return /* @__PURE__ */ a.jsx(
|
|
1107
|
+
}, [(N = e.mdx) == null ? void 0 : N.components, e.plugins]), { stagger: n } = Et(oe), [i, o] = Q(!1), u = re(
|
|
1108
|
+
() => i ? { stagger: !0 } : { stagger: n },
|
|
1109
|
+
[n, i]
|
|
1110
|
+
), c = xt();
|
|
1111
|
+
_(() => {
|
|
1112
|
+
i || o(!0);
|
|
1113
|
+
}, [i, c.location]);
|
|
1114
|
+
const [m] = Q(() => new Yr(e)), j = (p = e.plugins) == null ? void 0 : p.filter(Ur).map((P, h) => {
|
|
1115
|
+
var f;
|
|
1116
|
+
return /* @__PURE__ */ a.jsx(kt, { children: (f = P.getHead) == null ? void 0 : f.call(P) }, h);
|
|
1107
1117
|
});
|
|
1108
1118
|
return /* @__PURE__ */ a.jsxs(zt, { client: et, children: [
|
|
1109
|
-
/* @__PURE__ */ a.jsx(
|
|
1110
|
-
/* @__PURE__ */ a.jsx(
|
|
1119
|
+
/* @__PURE__ */ a.jsx(ce, { children: j }),
|
|
1120
|
+
/* @__PURE__ */ a.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ a.jsx(sa, { context: m, children: /* @__PURE__ */ a.jsx(ht, { components: s, children: /* @__PURE__ */ a.jsx(aa, { children: /* @__PURE__ */ a.jsx(ra, { value: r, children: /* @__PURE__ */ a.jsx(wt, { slotlets: e.slotlets, children: /* @__PURE__ */ a.jsx(Wt, { children: t ?? /* @__PURE__ */ a.jsx(_e, {}) }) }) }) }) }) }) })
|
|
1111
1121
|
] });
|
|
1112
|
-
}, ia = He(na),
|
|
1113
|
-
|
|
1122
|
+
}, ia = He(na), pe = (t) => /* @__PURE__ */ a.jsx(Br, { FallbackComponent: Xr, children: /* @__PURE__ */ a.jsx(ia, { ...t }) });
|
|
1123
|
+
pe.displayName = "DevPortal";
|
|
1114
1124
|
const oa = ({
|
|
1115
1125
|
category: t,
|
|
1116
1126
|
level: e
|
|
1117
1127
|
}) => {
|
|
1118
|
-
var
|
|
1119
|
-
const r =
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
}, [
|
|
1123
|
-
const
|
|
1128
|
+
var p, P;
|
|
1129
|
+
const r = qt(t), [s, n] = Q(!1), i = t.collapsible ?? !0, o = t.collapsed ?? !0, u = !!(!i || !o || r), [c, m] = Q(u), j = bt(((p = t.link) == null ? void 0 : p.id) ?? "");
|
|
1130
|
+
_(() => {
|
|
1131
|
+
r && m(!0);
|
|
1132
|
+
}, [r]);
|
|
1133
|
+
const N = i && /* @__PURE__ */ a.jsx(
|
|
1124
1134
|
"button",
|
|
1125
1135
|
{
|
|
1126
1136
|
type: "button",
|
|
1127
|
-
onClick: (
|
|
1128
|
-
|
|
1137
|
+
onClick: (h) => {
|
|
1138
|
+
h.preventDefault(), m((f) => !f), n(!0);
|
|
1129
1139
|
},
|
|
1130
1140
|
children: /* @__PURE__ */ a.jsx(
|
|
1131
|
-
|
|
1141
|
+
er,
|
|
1132
1142
|
{
|
|
1133
1143
|
size: 16,
|
|
1134
|
-
className:
|
|
1135
|
-
|
|
1144
|
+
className: A(
|
|
1145
|
+
s && "transition",
|
|
1136
1146
|
"shrink-0 group-data-[state=open]:rotate-90"
|
|
1137
1147
|
)
|
|
1138
1148
|
}
|
|
@@ -1140,17 +1150,17 @@ const oa = ({
|
|
|
1140
1150
|
}
|
|
1141
1151
|
);
|
|
1142
1152
|
return /* @__PURE__ */ a.jsxs(
|
|
1143
|
-
|
|
1153
|
+
se.Root,
|
|
1144
1154
|
{
|
|
1145
1155
|
className: "flex flex-col",
|
|
1146
1156
|
defaultOpen: u,
|
|
1147
|
-
open:
|
|
1148
|
-
onOpenChange: () =>
|
|
1157
|
+
open: c,
|
|
1158
|
+
onOpenChange: () => m(!0),
|
|
1149
1159
|
children: [
|
|
1150
|
-
/* @__PURE__ */ a.jsx(
|
|
1160
|
+
/* @__PURE__ */ a.jsx(se.Trigger, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
|
|
1151
1161
|
"div",
|
|
1152
1162
|
{
|
|
1153
|
-
onClick: () =>
|
|
1163
|
+
onClick: () => n(!0),
|
|
1154
1164
|
className: $({
|
|
1155
1165
|
isActive: !1,
|
|
1156
1166
|
isTopLevel: e === 0,
|
|
@@ -1164,62 +1174,62 @@ const oa = ({
|
|
|
1164
1174
|
t.icon,
|
|
1165
1175
|
{
|
|
1166
1176
|
size: 16,
|
|
1167
|
-
className:
|
|
1177
|
+
className: A(
|
|
1168
1178
|
"align-[-0.125em] -translate-x-1",
|
|
1169
|
-
|
|
1179
|
+
j && "text-primary"
|
|
1170
1180
|
)
|
|
1171
1181
|
}
|
|
1172
1182
|
),
|
|
1173
|
-
((
|
|
1174
|
-
|
|
1183
|
+
((P = t.link) == null ? void 0 : P.type) === "doc" ? /* @__PURE__ */ a.jsx(
|
|
1184
|
+
G,
|
|
1175
1185
|
{
|
|
1176
|
-
to:
|
|
1186
|
+
to: U(t.link.id),
|
|
1177
1187
|
className: "flex-1",
|
|
1178
1188
|
onClick: () => {
|
|
1179
|
-
|
|
1189
|
+
j && !c && m(!0);
|
|
1180
1190
|
},
|
|
1181
1191
|
children: /* @__PURE__ */ a.jsxs(
|
|
1182
1192
|
"div",
|
|
1183
1193
|
{
|
|
1184
|
-
className:
|
|
1194
|
+
className: A(
|
|
1185
1195
|
"flex items-center gap-2 justify-between w-full",
|
|
1186
|
-
|
|
1196
|
+
j ? "text-primary" : "text-foreground/80"
|
|
1187
1197
|
),
|
|
1188
1198
|
children: [
|
|
1189
1199
|
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: t.label }),
|
|
1190
|
-
|
|
1200
|
+
N
|
|
1191
1201
|
]
|
|
1192
1202
|
}
|
|
1193
1203
|
)
|
|
1194
1204
|
}
|
|
1195
1205
|
) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
1196
1206
|
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: t.label }),
|
|
1197
|
-
|
|
1207
|
+
N
|
|
1198
1208
|
] })
|
|
1199
1209
|
]
|
|
1200
1210
|
}
|
|
1201
1211
|
) }),
|
|
1202
1212
|
/* @__PURE__ */ a.jsx(
|
|
1203
|
-
|
|
1213
|
+
se.Content,
|
|
1204
1214
|
{
|
|
1205
|
-
className:
|
|
1215
|
+
className: A(
|
|
1206
1216
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
1207
|
-
|
|
1217
|
+
s && "CollapsibleContent"
|
|
1208
1218
|
),
|
|
1209
|
-
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: t.items.map((
|
|
1210
|
-
|
|
1219
|
+
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: t.items.map((h) => /* @__PURE__ */ a.jsx(
|
|
1220
|
+
le,
|
|
1211
1221
|
{
|
|
1212
1222
|
level: e + 1,
|
|
1213
|
-
item:
|
|
1223
|
+
item: h
|
|
1214
1224
|
},
|
|
1215
|
-
("id" in
|
|
1225
|
+
("id" in h ? h.id : "") + ("href" in h ? h.href : "") + h.label
|
|
1216
1226
|
)) })
|
|
1217
1227
|
}
|
|
1218
1228
|
)
|
|
1219
1229
|
]
|
|
1220
1230
|
}
|
|
1221
1231
|
);
|
|
1222
|
-
}, $ =
|
|
1232
|
+
}, $ = fr(
|
|
1223
1233
|
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
1224
1234
|
{
|
|
1225
1235
|
variants: {
|
|
@@ -1240,44 +1250,44 @@ const oa = ({
|
|
|
1240
1250
|
isActive: !1
|
|
1241
1251
|
}
|
|
1242
1252
|
}
|
|
1243
|
-
), it = "data-anchor",
|
|
1253
|
+
), it = "data-anchor", le = ({
|
|
1244
1254
|
item: t,
|
|
1245
1255
|
level: e = 0
|
|
1246
1256
|
}) => {
|
|
1247
|
-
var
|
|
1248
|
-
const
|
|
1257
|
+
var n, i;
|
|
1258
|
+
const { activeAnchor: r } = ge(), [s] = yt();
|
|
1249
1259
|
switch (t.type) {
|
|
1250
1260
|
case "category":
|
|
1251
1261
|
return /* @__PURE__ */ a.jsx(oa, { category: t, level: e });
|
|
1252
1262
|
case "doc":
|
|
1253
1263
|
return /* @__PURE__ */ a.jsxs(
|
|
1254
|
-
|
|
1264
|
+
G,
|
|
1255
1265
|
{
|
|
1256
|
-
className: ({ isActive:
|
|
1257
|
-
to:
|
|
1266
|
+
className: ({ isActive: o }) => $({ isActive: o, isTopLevel: e === 0 }),
|
|
1267
|
+
to: U(t.id),
|
|
1258
1268
|
children: [
|
|
1259
1269
|
t.icon && /* @__PURE__ */ a.jsx(t.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
1260
1270
|
t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1261
1271
|
/* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: t.label, children: t.label }),
|
|
1262
|
-
/* @__PURE__ */ a.jsx(
|
|
1272
|
+
/* @__PURE__ */ a.jsx(ae, { ...t.badge })
|
|
1263
1273
|
] }) : t.label
|
|
1264
1274
|
]
|
|
1265
1275
|
}
|
|
1266
1276
|
);
|
|
1267
1277
|
case "link":
|
|
1268
1278
|
return t.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
|
|
1269
|
-
|
|
1279
|
+
ft,
|
|
1270
1280
|
{
|
|
1271
|
-
to: { hash: t.href, search:
|
|
1281
|
+
to: { hash: t.href, search: s.toString() },
|
|
1272
1282
|
[it]: t.href.slice(1),
|
|
1273
1283
|
className: $({
|
|
1274
|
-
isActive: t.href.slice(1) ===
|
|
1284
|
+
isActive: t.href.slice(1) === r,
|
|
1275
1285
|
isTopLevel: e === 0,
|
|
1276
|
-
className: ((
|
|
1286
|
+
className: ((n = t.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
|
|
1277
1287
|
}),
|
|
1278
1288
|
children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1279
1289
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
|
|
1280
|
-
/* @__PURE__ */ a.jsx(
|
|
1290
|
+
/* @__PURE__ */ a.jsx(ae, { ...t.badge })
|
|
1281
1291
|
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
|
|
1282
1292
|
}
|
|
1283
1293
|
) : t.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
|
|
@@ -1289,11 +1299,11 @@ const oa = ({
|
|
|
1289
1299
|
rel: "noopener noreferrer",
|
|
1290
1300
|
children: [
|
|
1291
1301
|
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: t.label }),
|
|
1292
|
-
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(
|
|
1302
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(tr, { className: "inline -translate-y-0.5", size: 12 }) })
|
|
1293
1303
|
]
|
|
1294
1304
|
}
|
|
1295
1305
|
) : /* @__PURE__ */ a.jsx(
|
|
1296
|
-
|
|
1306
|
+
G,
|
|
1297
1307
|
{
|
|
1298
1308
|
className: $({
|
|
1299
1309
|
className: ((i = t.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
|
|
@@ -1301,7 +1311,7 @@ const oa = ({
|
|
|
1301
1311
|
to: t.href,
|
|
1302
1312
|
children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1303
1313
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
|
|
1304
|
-
/* @__PURE__ */ a.jsx(
|
|
1314
|
+
/* @__PURE__ */ a.jsx(ae, { ...t.badge })
|
|
1305
1315
|
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
|
|
1306
1316
|
}
|
|
1307
1317
|
);
|
|
@@ -1311,30 +1321,30 @@ const oa = ({
|
|
|
1311
1321
|
const r = t.getBoundingClientRect();
|
|
1312
1322
|
r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || t.scrollIntoView(e);
|
|
1313
1323
|
}, ca = () => {
|
|
1314
|
-
const t = ue(), { setActiveAnchor: e } =
|
|
1315
|
-
|
|
1324
|
+
const t = ue(), { setActiveAnchor: e } = ge();
|
|
1325
|
+
_(() => {
|
|
1316
1326
|
if (!t.hash) return;
|
|
1317
1327
|
const r = decodeURIComponent(t.hash.split("/")[0].slice(1)), s = () => {
|
|
1318
|
-
const n = document.getElementById(r),
|
|
1319
|
-
return n ? (n.scrollIntoView(), la(
|
|
1328
|
+
const n = document.getElementById(r), i = document.querySelector(`[${it}="${r}"]`);
|
|
1329
|
+
return n ? (n.scrollIntoView(), la(i), requestIdleCallback(() => e(r)), !0) : !1;
|
|
1320
1330
|
};
|
|
1321
1331
|
if (!s()) {
|
|
1322
|
-
const n = new MutationObserver((
|
|
1323
|
-
s() &&
|
|
1332
|
+
const n = new MutationObserver((i, o) => {
|
|
1333
|
+
s() && o.disconnect();
|
|
1324
1334
|
});
|
|
1325
1335
|
return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
|
|
1326
1336
|
}
|
|
1327
1337
|
}, [t.hash, e]);
|
|
1328
1338
|
}, ua = () => {
|
|
1329
|
-
const t = ue(), e =
|
|
1330
|
-
|
|
1339
|
+
const t = ue(), e = he(t.pathname);
|
|
1340
|
+
_(() => {
|
|
1331
1341
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
1332
1342
|
}, [t.pathname]);
|
|
1333
1343
|
}, ot = At(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
|
|
1334
1344
|
"nav",
|
|
1335
1345
|
{
|
|
1336
1346
|
"data-navigation": String(r),
|
|
1337
|
-
className:
|
|
1347
|
+
className: A(
|
|
1338
1348
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
1339
1349
|
"px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
1340
1350
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
@@ -1346,16 +1356,16 @@ const oa = ({
|
|
|
1346
1356
|
));
|
|
1347
1357
|
ot.displayName = "SidebarWrapper";
|
|
1348
1358
|
const da = () => {
|
|
1349
|
-
const t =
|
|
1359
|
+
const t = he(null), e = Ke();
|
|
1350
1360
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1351
1361
|
/* @__PURE__ */ a.jsxs(
|
|
1352
1362
|
ot,
|
|
1353
1363
|
{
|
|
1354
1364
|
ref: t,
|
|
1355
|
-
pushMainContent: e.data.
|
|
1365
|
+
pushMainContent: e.data.sidebar.length > 0,
|
|
1356
1366
|
children: [
|
|
1357
1367
|
/* @__PURE__ */ a.jsx(k, { name: "zudoku-before-navigation" }),
|
|
1358
|
-
e.data.
|
|
1368
|
+
e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label)),
|
|
1359
1369
|
/* @__PURE__ */ a.jsx(k, { name: "zudoku-after-navigation" })
|
|
1360
1370
|
]
|
|
1361
1371
|
}
|
|
@@ -1367,23 +1377,23 @@ const da = () => {
|
|
|
1367
1377
|
"aria-describedby": void 0,
|
|
1368
1378
|
children: [
|
|
1369
1379
|
/* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Sidebar" }) }),
|
|
1370
|
-
e.data.
|
|
1380
|
+
e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label))
|
|
1371
1381
|
]
|
|
1372
1382
|
}
|
|
1373
1383
|
)
|
|
1374
1384
|
] });
|
|
1375
1385
|
}, ha = ({ children: t }) => {
|
|
1376
|
-
const e = ue(), { setActiveAnchor: r } =
|
|
1386
|
+
const e = ue(), { setActiveAnchor: r } = ge(), { meta: s, authentication: n } = F();
|
|
1377
1387
|
ca(), ua();
|
|
1378
|
-
const
|
|
1379
|
-
return
|
|
1380
|
-
var
|
|
1381
|
-
(
|
|
1382
|
-
}, [n]),
|
|
1383
|
-
e.pathname !==
|
|
1388
|
+
const i = he(e.pathname);
|
|
1389
|
+
return _(() => {
|
|
1390
|
+
var o;
|
|
1391
|
+
(o = n == null ? void 0 : n.pageLoad) == null || o.call(n);
|
|
1392
|
+
}, [n]), _(() => {
|
|
1393
|
+
e.pathname !== i.current && r(""), i.current = e.pathname;
|
|
1384
1394
|
}, [e.pathname, r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1385
1395
|
!1,
|
|
1386
|
-
/* @__PURE__ */ a.jsxs(
|
|
1396
|
+
/* @__PURE__ */ a.jsxs(ce, { titleTemplate: s == null ? void 0 : s.title, children: [
|
|
1387
1397
|
(s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
|
|
1388
1398
|
(s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
|
|
1389
1399
|
] }),
|
|
@@ -1391,20 +1401,20 @@ const da = () => {
|
|
|
1391
1401
|
/* @__PURE__ */ a.jsx(st, {}),
|
|
1392
1402
|
/* @__PURE__ */ a.jsx(k, { name: "layout-after-head" }),
|
|
1393
1403
|
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
|
|
1394
|
-
|
|
1404
|
+
de,
|
|
1395
1405
|
{
|
|
1396
|
-
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(
|
|
1406
|
+
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(mr, {}) }),
|
|
1397
1407
|
children: /* @__PURE__ */ a.jsxs(Ve, { direction: "left", children: [
|
|
1398
1408
|
/* @__PURE__ */ a.jsx(da, {}),
|
|
1399
1409
|
/* @__PURE__ */ a.jsx(
|
|
1400
1410
|
"div",
|
|
1401
1411
|
{
|
|
1402
|
-
className:
|
|
1412
|
+
className: A(
|
|
1403
1413
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
1404
1414
|
"peer-data-[navigation=false]:hidden"
|
|
1405
1415
|
),
|
|
1406
1416
|
children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
|
|
1407
|
-
/* @__PURE__ */ a.jsx(
|
|
1417
|
+
/* @__PURE__ */ a.jsx(rr, { size: 16, strokeWidth: 1.5 }),
|
|
1408
1418
|
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
1409
1419
|
] })
|
|
1410
1420
|
}
|
|
@@ -1412,7 +1422,7 @@ const da = () => {
|
|
|
1412
1422
|
/* @__PURE__ */ a.jsxs(
|
|
1413
1423
|
"main",
|
|
1414
1424
|
{
|
|
1415
|
-
className:
|
|
1425
|
+
className: A(
|
|
1416
1426
|
"h-full dark:border-white/10 translate-x-0",
|
|
1417
1427
|
"lg:overflow-visible",
|
|
1418
1428
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -1421,7 +1431,7 @@ const da = () => {
|
|
|
1421
1431
|
),
|
|
1422
1432
|
children: [
|
|
1423
1433
|
/* @__PURE__ */ a.jsx(k, { name: "zudoku-before-content" }),
|
|
1424
|
-
t ?? /* @__PURE__ */ a.jsx(
|
|
1434
|
+
t ?? /* @__PURE__ */ a.jsx(_e, {}),
|
|
1425
1435
|
/* @__PURE__ */ a.jsx(k, { name: "zudoku-after-content" })
|
|
1426
1436
|
]
|
|
1427
1437
|
}
|
|
@@ -1430,22 +1440,22 @@ const da = () => {
|
|
|
1430
1440
|
}
|
|
1431
1441
|
) })
|
|
1432
1442
|
] });
|
|
1433
|
-
},
|
|
1443
|
+
}, _a = gt, Fa = pe, Qa = ha, La = Nt, Ba = pr, Ha = Rr, za = Ir, qa = ce, Ka = F, $a = jt, Ua = pe, Va = Pt, Wa = Dt, Ya = ie, Xa = te;
|
|
1434
1444
|
export {
|
|
1435
|
-
|
|
1445
|
+
Ha as Bootstrap,
|
|
1436
1446
|
za as BootstrapStatic,
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1447
|
+
Ya as Button,
|
|
1448
|
+
Va as Callout,
|
|
1449
|
+
Wa as ClientOnly,
|
|
1450
|
+
Fa as DevPortal,
|
|
1451
|
+
qa as Head,
|
|
1452
|
+
Qa as Layout,
|
|
1453
|
+
Xa as Link,
|
|
1454
|
+
La as RouterError,
|
|
1455
|
+
Ba as ServerError,
|
|
1456
|
+
Ua as Zudoku,
|
|
1457
|
+
$a as useAuth,
|
|
1458
|
+
_a as useMDXComponents,
|
|
1459
|
+
Ka as useZudoku
|
|
1450
1460
|
};
|
|
1451
1461
|
//# sourceMappingURL=zudoku.components.js.map
|