zudoku 0.28.3 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/entry.server.d.ts +1 -1
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/dev/handler.js +5 -0
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/common.d.ts +111 -0
- package/dist/config/validators/common.js +9 -6
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +42 -0
- package/dist/lib/authentication/state.d.ts +9 -0
- package/dist/lib/authentication/state.js +11 -0
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +4 -3
- package/dist/lib/components/Autocomplete.js +2 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/PathRenderer.js +23 -20
- package/dist/lib/components/PathRenderer.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -0
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/oas/graphql/index.d.ts +7 -0
- package/dist/lib/oas/graphql/index.js +7 -6
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +6 -7
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +11 -7
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +4 -4
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +2 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +2 -2
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +20 -4
- package/dist/lib/plugins/openapi/graphql/graphql.js +16 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +57 -28
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +4 -2
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/Headers.js +42 -26
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +4 -4
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -21
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/ui/Input.d.ts +1 -2
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +1 -1
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +6 -4
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/build.js +1 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/plugin-api.js +13 -6
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +18 -12
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +0 -6
- package/dist/vite/prerender/FileWritingResponse.js +42 -0
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +6 -0
- package/dist/vite/prerender/prerender.js +68 -0
- package/dist/vite/prerender/prerender.js.map +1 -0
- package/dist/vite/prerender/worker.d.ts +9 -0
- package/dist/vite/prerender/worker.js +27 -0
- package/dist/vite/prerender/worker.js.map +1 -0
- package/lib/{Markdown-LcMEZ0Sn.js → Markdown-8mv9nhGd.js} +3338 -3360
- package/lib/Markdown-8mv9nhGd.js.map +1 -0
- package/lib/{MdxPage-DkH3V4hV.js → MdxPage-BalfwlsD.js} +3 -3
- package/lib/{MdxPage-DkH3V4hV.js.map → MdxPage-BalfwlsD.js.map} +1 -1
- package/lib/{OperationList-wzZNceUl.js → OperationList-B3VX94x4.js} +500 -493
- package/lib/OperationList-B3VX94x4.js.map +1 -0
- package/lib/{Select-DJkXPPD0.js → Select-BcAbBUmk.js} +2 -2
- package/lib/{Select-DJkXPPD0.js.map → Select-BcAbBUmk.js.map} +1 -1
- package/lib/{SlotletProvider-D1t2ePCI.js → SlotletProvider-D0mFmGJu.js} +2 -2
- package/lib/{SlotletProvider-D1t2ePCI.js.map → SlotletProvider-D0mFmGJu.js.map} +1 -1
- package/lib/{createServer-DIztAu7i.js → createServer-E3cXjB0P.js} +4 -6
- package/lib/{createServer-DIztAu7i.js.map → createServer-E3cXjB0P.js.map} +1 -1
- package/lib/{hook-CiX69UZ6.js → hook-NIpDSpau.js} +2 -2
- package/lib/{hook-CiX69UZ6.js.map → hook-NIpDSpau.js.map} +1 -1
- package/lib/{index-DrR58fsJ.js → index-P0YUtHIb.js} +802 -745
- package/lib/index-P0YUtHIb.js.map +1 -0
- package/lib/state-bfQxaDxU.js +211 -0
- package/lib/{state-mM7uaXTW.js.map → state-bfQxaDxU.js.map} +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/{useScrollToAnchor-DYGn1MT9.js → useScrollToAnchor-BVCQSeKB.js} +29 -28
- package/lib/{useScrollToAnchor-DYGn1MT9.js.map → useScrollToAnchor-BVCQSeKB.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.components.js +348 -347
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +3 -3
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/package.json +3 -1
- package/src/app/demo-cdn.html +31 -31
- package/src/app/entry.server.tsx +1 -1
- package/src/lib/authentication/state.ts +18 -0
- package/src/lib/components/Autocomplete.tsx +6 -4
- package/src/lib/components/PathRenderer.tsx +6 -4
- package/src/lib/components/navigation/SidebarItem.tsx +1 -0
- package/src/lib/oas/graphql/index.ts +10 -9
- package/src/lib/plugins/openapi/Endpoint.tsx +11 -9
- package/src/lib/plugins/openapi/OperationList.tsx +16 -10
- package/src/lib/plugins/openapi/Sidecar.tsx +4 -4
- package/src/lib/plugins/openapi/graphql/gql.ts +4 -4
- package/src/lib/plugins/openapi/graphql/graphql.ts +30 -6
- package/src/lib/plugins/openapi/index.tsx +74 -41
- package/src/lib/plugins/openapi/interfaces.ts +5 -10
- package/src/lib/plugins/openapi/playground/Headers.tsx +125 -89
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +6 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +9 -9
- package/src/lib/plugins/openapi/playground/Playground.tsx +7 -4
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +88 -86
- package/src/lib/ui/Input.tsx +1 -2
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/src/lib/util/useScrollToTop.ts +8 -3
- package/dist/vite/prerender.js +0 -89
- package/dist/vite/prerender.js.map +0 -1
- package/lib/Markdown-LcMEZ0Sn.js.map +0 -1
- package/lib/OperationList-wzZNceUl.js.map +0 -1
- package/lib/index-DrR58fsJ.js.map +0 -1
- package/lib/state-mM7uaXTW.js +0 -202
package/lib/zudoku.components.js
CHANGED
|
@@ -2,57 +2,57 @@ var lt = Object.defineProperty;
|
|
|
2
2
|
var xe = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var ct = (t, e,
|
|
6
|
-
var P = (t, e,
|
|
7
|
-
var l = (t, e,
|
|
8
|
-
var G = (t, e,
|
|
5
|
+
var ct = (t, e, s) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
+
var P = (t, e, s) => ct(t, typeof e != "symbol" ? e + "" : e, s), ye = (t, e, s) => e.has(t) || xe("Cannot " + s);
|
|
7
|
+
var l = (t, e, s) => (ye(t, e, "read from private field"), s ? s.call(t) : e.get(t)), j = (t, e, s) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), y = (t, e, s, r) => (ye(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
|
|
8
|
+
var G = (t, e, s, r) => ({
|
|
9
9
|
set _(a) {
|
|
10
|
-
y(t, e, a,
|
|
10
|
+
y(t, e, a, s);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return l(t, e,
|
|
13
|
+
return l(t, e, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
import { a as Re, H as ie } from "./index.esm-9-TF9KQB.js";
|
|
17
17
|
import { u as oe, m as ut, O as le, R as dt, S as ht, h as ce, f as ft, L as ue } from "./chunk-SYFQ2XB5-QijJrSf0.js";
|
|
18
|
-
import { M as
|
|
18
|
+
import { M as gt, u as z } from "./hook-NIpDSpau.js";
|
|
19
19
|
import { j as n } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
20
20
|
import * as $ from "react";
|
|
21
|
-
import
|
|
21
|
+
import mt, { useEffect as T, createContext as de, StrictMode as Fe, useRef as he, useState as B, useCallback as pt, Suspense as fe, memo as He, forwardRef as xt, Component as yt, createElement as ve, useMemo as te, useContext as vt, Fragment as bt } from "react";
|
|
22
22
|
import { S as ze, m as Be, Q as jt, n as w, o as be, p as je, q as M, r as wt, t as Pt, v as St, w as Ct, x as we, y as Pe, z as kt, h as Se, A as Ce, B as Nt, e as Dt, a as A, C as Le, D as Ke, E as Mt, j as ne, u as Ot, Z as At, F as Et, G as qt } from "./ZudokuContext-dUyBGMap.js";
|
|
23
23
|
import { Z as $e } from "./invariant-Caa8-XvF.js";
|
|
24
|
-
import { E as Ue, S as D, a as It, R as Tt } from "./SlotletProvider-
|
|
24
|
+
import { E as Ue, S as D, a as It, R as Tt } from "./SlotletProvider-D0mFmGJu.js";
|
|
25
25
|
import { Button as Qt } from "./ui/Button.js";
|
|
26
26
|
import { Callout as Rt } from "./ui/Callout.js";
|
|
27
27
|
import * as Ft from "react-dom";
|
|
28
|
-
import { C as
|
|
28
|
+
import { C as ge } from "./ClientOnly-E7hGysn1.js";
|
|
29
29
|
import { CircleXIcon as Ht, SearchIcon as zt, MoonStarIcon as Bt, SunIcon as Lt, MenuIcon as Kt, PanelLeftIcon as $t } from "lucide-react";
|
|
30
30
|
import { Drawer as Ze, DrawerTrigger as Ye, DrawerContent as Ve, DrawerTitle as Xe } from "./ui/Drawer.js";
|
|
31
31
|
import { c as Z } from "./cn-qaFjX9_3.js";
|
|
32
|
-
import { s as Ut, S as ke, a as Zt, M as Yt, u as Vt } from "./useScrollToAnchor-
|
|
33
|
-
import { u as Xt, P as Gt, H as _t, a as Wt, V as Jt, M as
|
|
32
|
+
import { s as Ut, S as ke, a as Zt, M as Yt, u as Vt } from "./useScrollToAnchor-BVCQSeKB.js";
|
|
33
|
+
import { u as Xt, P as Gt, H as _t, a as Wt, V as Jt, M as es } from "./Markdown-8mv9nhGd.js";
|
|
34
34
|
import { B as ee, S as Ge } from "./Spinner-BlzrEEk1.js";
|
|
35
|
-
import { DropdownMenu as
|
|
35
|
+
import { DropdownMenu as ts, DropdownMenuTrigger as ss, DropdownMenuContent as rs, DropdownMenuLabel as ns, DropdownMenuSeparator as se, DropdownMenuSub as as, DropdownMenuSubTrigger as is, DropdownMenuPortal as os, DropdownMenuSubContent as ls, DropdownMenuItem as cs } from "./ui/DropdownMenu.js";
|
|
36
36
|
import { j as Ne } from "./joinUrl-nLx9pD-Z.js";
|
|
37
37
|
import { VisuallyHidden as _e } from "@radix-ui/react-visually-hidden";
|
|
38
|
-
import { z as
|
|
39
|
-
import { a as
|
|
40
|
-
import { C as
|
|
41
|
-
var N, Ie,
|
|
38
|
+
import { z as us, J as ds } from "./SyntaxHighlight-B0L4SC_N.js";
|
|
39
|
+
import { a as hs } from "./index-Djenk2Hj.js";
|
|
40
|
+
import { C as fs } from "./CategoryHeading-MYL1u_6K.js";
|
|
41
|
+
var N, Ie, gs = (Ie = class extends ze {
|
|
42
42
|
constructor(e = {}) {
|
|
43
43
|
super();
|
|
44
44
|
j(this, N);
|
|
45
45
|
this.config = e, y(this, N, /* @__PURE__ */ new Map());
|
|
46
46
|
}
|
|
47
|
-
build(e,
|
|
48
|
-
const a =
|
|
47
|
+
build(e, s, r) {
|
|
48
|
+
const a = s.queryKey, i = s.queryHash ?? Be(a, s);
|
|
49
49
|
let o = this.get(i);
|
|
50
50
|
return o || (o = new jt({
|
|
51
51
|
cache: this,
|
|
52
52
|
queryKey: a,
|
|
53
53
|
queryHash: i,
|
|
54
|
-
options: e.defaultQueryOptions(
|
|
55
|
-
state:
|
|
54
|
+
options: e.defaultQueryOptions(s),
|
|
55
|
+
state: r,
|
|
56
56
|
defaultOptions: e.getQueryDefaults(a)
|
|
57
57
|
}), this.add(o)), o;
|
|
58
58
|
}
|
|
@@ -63,8 +63,8 @@ var N, Ie, mr = (Ie = class extends ze {
|
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
65
|
remove(e) {
|
|
66
|
-
const
|
|
67
|
-
|
|
66
|
+
const s = l(this, N).get(e.queryHash);
|
|
67
|
+
s && (e.destroy(), s === e && l(this, N).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
68
68
|
}
|
|
69
69
|
clear() {
|
|
70
70
|
w.batch(() => {
|
|
@@ -80,19 +80,19 @@ var N, Ie, mr = (Ie = class extends ze {
|
|
|
80
80
|
return [...l(this, N).values()];
|
|
81
81
|
}
|
|
82
82
|
find(e) {
|
|
83
|
-
const
|
|
83
|
+
const s = { exact: !0, ...e };
|
|
84
84
|
return this.getAll().find(
|
|
85
|
-
(
|
|
85
|
+
(r) => be(s, r)
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
88
|
findAll(e = {}) {
|
|
89
|
-
const
|
|
90
|
-
return Object.keys(e).length > 0 ?
|
|
89
|
+
const s = this.getAll();
|
|
90
|
+
return Object.keys(e).length > 0 ? s.filter((r) => be(e, r)) : s;
|
|
91
91
|
}
|
|
92
92
|
notify(e) {
|
|
93
93
|
w.batch(() => {
|
|
94
|
-
this.listeners.forEach((
|
|
95
|
-
|
|
94
|
+
this.listeners.forEach((s) => {
|
|
95
|
+
s(e);
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
}
|
|
@@ -110,7 +110,7 @@ var N, Ie, mr = (Ie = class extends ze {
|
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
}, N = new WeakMap(), Ie), O, C, Y, Te,
|
|
113
|
+
}, N = new WeakMap(), Ie), O, C, Y, Te, ms = (Te = class extends ze {
|
|
114
114
|
constructor(e = {}) {
|
|
115
115
|
super();
|
|
116
116
|
j(this, O);
|
|
@@ -118,42 +118,42 @@ var N, Ie, mr = (Ie = class extends ze {
|
|
|
118
118
|
j(this, Y);
|
|
119
119
|
this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, C, /* @__PURE__ */ new Map()), y(this, Y, 0);
|
|
120
120
|
}
|
|
121
|
-
build(e,
|
|
122
|
-
const a = new
|
|
121
|
+
build(e, s, r) {
|
|
122
|
+
const a = new gt({
|
|
123
123
|
mutationCache: this,
|
|
124
124
|
mutationId: ++G(this, Y)._,
|
|
125
|
-
options: e.defaultMutationOptions(
|
|
126
|
-
state:
|
|
125
|
+
options: e.defaultMutationOptions(s),
|
|
126
|
+
state: r
|
|
127
127
|
});
|
|
128
128
|
return this.add(a), a;
|
|
129
129
|
}
|
|
130
130
|
add(e) {
|
|
131
131
|
l(this, O).add(e);
|
|
132
|
-
const
|
|
133
|
-
if (typeof
|
|
134
|
-
const
|
|
135
|
-
|
|
132
|
+
const s = _(e);
|
|
133
|
+
if (typeof s == "string") {
|
|
134
|
+
const r = l(this, C).get(s);
|
|
135
|
+
r ? r.push(e) : l(this, C).set(s, [e]);
|
|
136
136
|
}
|
|
137
137
|
this.notify({ type: "added", mutation: e });
|
|
138
138
|
}
|
|
139
139
|
remove(e) {
|
|
140
140
|
if (l(this, O).delete(e)) {
|
|
141
|
-
const
|
|
142
|
-
if (typeof
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
if (
|
|
146
|
-
const a =
|
|
147
|
-
a !== -1 &&
|
|
148
|
-
} else
|
|
141
|
+
const s = _(e);
|
|
142
|
+
if (typeof s == "string") {
|
|
143
|
+
const r = l(this, C).get(s);
|
|
144
|
+
if (r)
|
|
145
|
+
if (r.length > 1) {
|
|
146
|
+
const a = r.indexOf(e);
|
|
147
|
+
a !== -1 && r.splice(a, 1);
|
|
148
|
+
} else r[0] === e && l(this, C).delete(s);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
this.notify({ type: "removed", mutation: e });
|
|
152
152
|
}
|
|
153
153
|
canRun(e) {
|
|
154
|
-
const
|
|
155
|
-
if (typeof
|
|
156
|
-
const
|
|
154
|
+
const s = _(e);
|
|
155
|
+
if (typeof s == "string") {
|
|
156
|
+
const r = l(this, C).get(s), a = r == null ? void 0 : r.find(
|
|
157
157
|
(i) => i.state.status === "pending"
|
|
158
158
|
);
|
|
159
159
|
return !a || a === e;
|
|
@@ -161,10 +161,10 @@ var N, Ie, mr = (Ie = class extends ze {
|
|
|
161
161
|
return !0;
|
|
162
162
|
}
|
|
163
163
|
runNext(e) {
|
|
164
|
-
var
|
|
165
|
-
const
|
|
166
|
-
if (typeof
|
|
167
|
-
const a = (
|
|
164
|
+
var r;
|
|
165
|
+
const s = _(e);
|
|
166
|
+
if (typeof s == "string") {
|
|
167
|
+
const a = (r = l(this, C).get(s)) == null ? void 0 : r.find((i) => i !== e && i.state.isPaused);
|
|
168
168
|
return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
|
|
169
169
|
} else
|
|
170
170
|
return Promise.resolve();
|
|
@@ -180,26 +180,26 @@ var N, Ie, mr = (Ie = class extends ze {
|
|
|
180
180
|
return Array.from(l(this, O));
|
|
181
181
|
}
|
|
182
182
|
find(e) {
|
|
183
|
-
const
|
|
183
|
+
const s = { exact: !0, ...e };
|
|
184
184
|
return this.getAll().find(
|
|
185
|
-
(
|
|
185
|
+
(r) => je(s, r)
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
findAll(e = {}) {
|
|
189
|
-
return this.getAll().filter((
|
|
189
|
+
return this.getAll().filter((s) => je(e, s));
|
|
190
190
|
}
|
|
191
191
|
notify(e) {
|
|
192
192
|
w.batch(() => {
|
|
193
|
-
this.listeners.forEach((
|
|
194
|
-
|
|
193
|
+
this.listeners.forEach((s) => {
|
|
194
|
+
s(e);
|
|
195
195
|
});
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
resumePausedMutations() {
|
|
199
|
-
const e = this.getAll().filter((
|
|
199
|
+
const e = this.getAll().filter((s) => s.state.isPaused);
|
|
200
200
|
return w.batch(
|
|
201
201
|
() => Promise.all(
|
|
202
|
-
e.map((
|
|
202
|
+
e.map((s) => s.continue().catch(M))
|
|
203
203
|
)
|
|
204
204
|
);
|
|
205
205
|
}
|
|
@@ -210,21 +210,21 @@ function _(t) {
|
|
|
210
210
|
}
|
|
211
211
|
function De(t) {
|
|
212
212
|
return {
|
|
213
|
-
onFetch: (e,
|
|
214
|
-
var
|
|
215
|
-
const
|
|
213
|
+
onFetch: (e, s) => {
|
|
214
|
+
var g, f, h, x, v;
|
|
215
|
+
const r = e.options, a = (h = (f = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, i = ((x = e.state.data) == null ? void 0 : x.pages) || [], o = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
|
|
216
216
|
let u = { pages: [], pageParams: [] }, d = 0;
|
|
217
217
|
const c = async () => {
|
|
218
|
-
let
|
|
218
|
+
let m = !1;
|
|
219
219
|
const S = (b) => {
|
|
220
220
|
Object.defineProperty(b, "signal", {
|
|
221
221
|
enumerable: !0,
|
|
222
|
-
get: () => (e.signal.aborted ?
|
|
223
|
-
|
|
222
|
+
get: () => (e.signal.aborted ? m = !0 : e.signal.addEventListener("abort", () => {
|
|
223
|
+
m = !0;
|
|
224
224
|
}), e.signal)
|
|
225
225
|
});
|
|
226
226
|
}, V = wt(e.options, e.fetchOptions), L = async (b, k, K) => {
|
|
227
|
-
if (
|
|
227
|
+
if (m)
|
|
228
228
|
return Promise.reject();
|
|
229
229
|
if (k == null && b.pages.length)
|
|
230
230
|
return Promise.resolve(b);
|
|
@@ -237,22 +237,22 @@ function De(t) {
|
|
|
237
237
|
S(X);
|
|
238
238
|
const ot = await V(
|
|
239
239
|
X
|
|
240
|
-
), { maxPages:
|
|
240
|
+
), { maxPages: me } = e.options, pe = K ? Pt : St;
|
|
241
241
|
return {
|
|
242
|
-
pages: pe(b.pages, ot,
|
|
243
|
-
pageParams: pe(b.pageParams, k,
|
|
242
|
+
pages: pe(b.pages, ot, me),
|
|
243
|
+
pageParams: pe(b.pageParams, k, me)
|
|
244
244
|
};
|
|
245
245
|
};
|
|
246
246
|
if (a && i.length) {
|
|
247
|
-
const b = a === "backward", k = b ?
|
|
247
|
+
const b = a === "backward", k = b ? ps : Me, K = {
|
|
248
248
|
pages: i,
|
|
249
249
|
pageParams: o
|
|
250
|
-
}, X = k(
|
|
250
|
+
}, X = k(r, K);
|
|
251
251
|
u = await L(K, X, b);
|
|
252
252
|
} else {
|
|
253
253
|
const b = t ?? i.length;
|
|
254
254
|
do {
|
|
255
|
-
const k = d === 0 ? o[0] ??
|
|
255
|
+
const k = d === 0 ? o[0] ?? r.initialPageParam : Me(r, u);
|
|
256
256
|
if (d > 0 && k == null)
|
|
257
257
|
break;
|
|
258
258
|
u = await L(u, k), d++;
|
|
@@ -261,35 +261,35 @@ function De(t) {
|
|
|
261
261
|
return u;
|
|
262
262
|
};
|
|
263
263
|
e.options.persister ? e.fetchFn = () => {
|
|
264
|
-
var
|
|
265
|
-
return (S = (
|
|
266
|
-
|
|
264
|
+
var m, S;
|
|
265
|
+
return (S = (m = e.options).persister) == null ? void 0 : S.call(
|
|
266
|
+
m,
|
|
267
267
|
c,
|
|
268
268
|
{
|
|
269
269
|
queryKey: e.queryKey,
|
|
270
270
|
meta: e.options.meta,
|
|
271
271
|
signal: e.signal
|
|
272
272
|
},
|
|
273
|
-
|
|
273
|
+
s
|
|
274
274
|
);
|
|
275
275
|
} : e.fetchFn = c;
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
|
-
function Me(t, { pages: e, pageParams:
|
|
280
|
-
const
|
|
279
|
+
function Me(t, { pages: e, pageParams: s }) {
|
|
280
|
+
const r = e.length - 1;
|
|
281
281
|
return e.length > 0 ? t.getNextPageParam(
|
|
282
|
-
e[
|
|
282
|
+
e[r],
|
|
283
283
|
e,
|
|
284
|
-
r
|
|
285
|
-
|
|
284
|
+
s[r],
|
|
285
|
+
s
|
|
286
286
|
) : void 0;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
var
|
|
290
|
-
return e.length > 0 ? (
|
|
288
|
+
function ps(t, { pages: e, pageParams: s }) {
|
|
289
|
+
var r;
|
|
290
|
+
return e.length > 0 ? (r = t.getPreviousPageParam) == null ? void 0 : r.call(t, e[0], e, s[0], s) : void 0;
|
|
291
291
|
}
|
|
292
|
-
var p, E, q, Q, R, I, F, H, Qe,
|
|
292
|
+
var p, E, q, Q, R, I, F, H, Qe, xs = (Qe = class {
|
|
293
293
|
constructor(t = {}) {
|
|
294
294
|
j(this, p);
|
|
295
295
|
j(this, E);
|
|
@@ -299,7 +299,7 @@ var p, E, q, Q, R, I, F, H, Qe, xr = (Qe = class {
|
|
|
299
299
|
j(this, I);
|
|
300
300
|
j(this, F);
|
|
301
301
|
j(this, H);
|
|
302
|
-
y(this, p, t.queryCache || new
|
|
302
|
+
y(this, p, t.queryCache || new gs()), y(this, E, t.mutationCache || new ms()), y(this, q, t.defaultOptions || {}), y(this, Q, /* @__PURE__ */ new Map()), y(this, R, /* @__PURE__ */ new Map()), y(this, I, 0);
|
|
303
303
|
}
|
|
304
304
|
mount() {
|
|
305
305
|
G(this, I)._++, l(this, I) === 1 && (y(this, F, Ct.subscribe(async (t) => {
|
|
@@ -319,97 +319,97 @@ var p, E, q, Q, R, I, F, H, Qe, xr = (Qe = class {
|
|
|
319
319
|
return l(this, E).findAll({ ...t, status: "pending" }).length;
|
|
320
320
|
}
|
|
321
321
|
getQueryData(t) {
|
|
322
|
-
var
|
|
322
|
+
var s;
|
|
323
323
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
324
|
-
return (
|
|
324
|
+
return (s = l(this, p).get(e.queryHash)) == null ? void 0 : s.state.data;
|
|
325
325
|
}
|
|
326
326
|
ensureQueryData(t) {
|
|
327
|
-
const e = this.defaultQueryOptions(t),
|
|
328
|
-
return
|
|
327
|
+
const e = this.defaultQueryOptions(t), s = l(this, p).build(this, e), r = s.state.data;
|
|
328
|
+
return r === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && s.isStaleByTime(Pe(e.staleTime, s)) && this.prefetchQuery(e), Promise.resolve(r));
|
|
329
329
|
}
|
|
330
330
|
getQueriesData(t) {
|
|
331
|
-
return l(this, p).findAll(t).map(({ queryKey: e, state:
|
|
332
|
-
const
|
|
333
|
-
return [e,
|
|
331
|
+
return l(this, p).findAll(t).map(({ queryKey: e, state: s }) => {
|
|
332
|
+
const r = s.data;
|
|
333
|
+
return [e, r];
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
|
-
setQueryData(t, e,
|
|
337
|
-
const
|
|
338
|
-
|
|
336
|
+
setQueryData(t, e, s) {
|
|
337
|
+
const r = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
|
|
338
|
+
r.queryHash
|
|
339
339
|
), i = a == null ? void 0 : a.state.data, o = kt(e, i);
|
|
340
340
|
if (o !== void 0)
|
|
341
|
-
return l(this, p).build(this,
|
|
341
|
+
return l(this, p).build(this, r).setData(o, { ...s, manual: !0 });
|
|
342
342
|
}
|
|
343
|
-
setQueriesData(t, e,
|
|
343
|
+
setQueriesData(t, e, s) {
|
|
344
344
|
return w.batch(
|
|
345
|
-
() => l(this, p).findAll(t).map(({ queryKey:
|
|
346
|
-
|
|
347
|
-
this.setQueryData(
|
|
345
|
+
() => l(this, p).findAll(t).map(({ queryKey: r }) => [
|
|
346
|
+
r,
|
|
347
|
+
this.setQueryData(r, e, s)
|
|
348
348
|
])
|
|
349
349
|
);
|
|
350
350
|
}
|
|
351
351
|
getQueryState(t) {
|
|
352
|
-
var
|
|
352
|
+
var s;
|
|
353
353
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
354
|
-
return (
|
|
354
|
+
return (s = l(this, p).get(
|
|
355
355
|
e.queryHash
|
|
356
|
-
)) == null ? void 0 :
|
|
356
|
+
)) == null ? void 0 : s.state;
|
|
357
357
|
}
|
|
358
358
|
removeQueries(t) {
|
|
359
359
|
const e = l(this, p);
|
|
360
360
|
w.batch(() => {
|
|
361
|
-
e.findAll(t).forEach((
|
|
362
|
-
e.remove(
|
|
361
|
+
e.findAll(t).forEach((s) => {
|
|
362
|
+
e.remove(s);
|
|
363
363
|
});
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
resetQueries(t, e) {
|
|
367
|
-
const
|
|
367
|
+
const s = l(this, p), r = {
|
|
368
368
|
type: "active",
|
|
369
369
|
...t
|
|
370
370
|
};
|
|
371
|
-
return w.batch(() => (
|
|
371
|
+
return w.batch(() => (s.findAll(t).forEach((a) => {
|
|
372
372
|
a.reset();
|
|
373
|
-
}), this.refetchQueries(
|
|
373
|
+
}), this.refetchQueries(r, e)));
|
|
374
374
|
}
|
|
375
375
|
cancelQueries(t, e = {}) {
|
|
376
|
-
const
|
|
377
|
-
() => l(this, p).findAll(t).map((a) => a.cancel(
|
|
376
|
+
const s = { revert: !0, ...e }, r = w.batch(
|
|
377
|
+
() => l(this, p).findAll(t).map((a) => a.cancel(s))
|
|
378
378
|
);
|
|
379
|
-
return Promise.all(
|
|
379
|
+
return Promise.all(r).then(M).catch(M);
|
|
380
380
|
}
|
|
381
381
|
invalidateQueries(t, e = {}) {
|
|
382
382
|
return w.batch(() => {
|
|
383
|
-
if (l(this, p).findAll(t).forEach((
|
|
384
|
-
|
|
383
|
+
if (l(this, p).findAll(t).forEach((r) => {
|
|
384
|
+
r.invalidate();
|
|
385
385
|
}), (t == null ? void 0 : t.refetchType) === "none")
|
|
386
386
|
return Promise.resolve();
|
|
387
|
-
const
|
|
387
|
+
const s = {
|
|
388
388
|
...t,
|
|
389
389
|
type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
|
|
390
390
|
};
|
|
391
|
-
return this.refetchQueries(
|
|
391
|
+
return this.refetchQueries(s, e);
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
refetchQueries(t, e = {}) {
|
|
395
|
-
const
|
|
395
|
+
const s = {
|
|
396
396
|
...e,
|
|
397
397
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
398
|
-
},
|
|
398
|
+
}, r = w.batch(
|
|
399
399
|
() => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
|
|
400
|
-
let i = a.fetch(void 0,
|
|
401
|
-
return
|
|
400
|
+
let i = a.fetch(void 0, s);
|
|
401
|
+
return s.throwOnError || (i = i.catch(M)), a.state.fetchStatus === "paused" ? Promise.resolve() : i;
|
|
402
402
|
})
|
|
403
403
|
);
|
|
404
|
-
return Promise.all(
|
|
404
|
+
return Promise.all(r).then(M);
|
|
405
405
|
}
|
|
406
406
|
fetchQuery(t) {
|
|
407
407
|
const e = this.defaultQueryOptions(t);
|
|
408
408
|
e.retry === void 0 && (e.retry = !1);
|
|
409
|
-
const
|
|
410
|
-
return
|
|
411
|
-
Pe(e.staleTime,
|
|
412
|
-
) ?
|
|
409
|
+
const s = l(this, p).build(this, e);
|
|
410
|
+
return s.isStaleByTime(
|
|
411
|
+
Pe(e.staleTime, s)
|
|
412
|
+
) ? s.fetch(e) : Promise.resolve(s.state.data);
|
|
413
413
|
}
|
|
414
414
|
prefetchQuery(t) {
|
|
415
415
|
return this.fetchQuery(t).then(M).catch(M);
|
|
@@ -445,10 +445,10 @@ var p, E, q, Q, R, I, F, H, Qe, xr = (Qe = class {
|
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
getQueryDefaults(t) {
|
|
448
|
-
const e = [...l(this, Q).values()],
|
|
449
|
-
return e.forEach((
|
|
450
|
-
Ce(t,
|
|
451
|
-
}),
|
|
448
|
+
const e = [...l(this, Q).values()], s = {};
|
|
449
|
+
return e.forEach((r) => {
|
|
450
|
+
Ce(t, r.queryKey) && Object.assign(s, r.defaultOptions);
|
|
451
|
+
}), s;
|
|
452
452
|
}
|
|
453
453
|
setMutationDefaults(t, e) {
|
|
454
454
|
l(this, R).set(Se(t), {
|
|
@@ -458,10 +458,10 @@ var p, E, q, Q, R, I, F, H, Qe, xr = (Qe = class {
|
|
|
458
458
|
}
|
|
459
459
|
getMutationDefaults(t) {
|
|
460
460
|
const e = [...l(this, R).values()];
|
|
461
|
-
let
|
|
462
|
-
return e.forEach((
|
|
463
|
-
Ce(t,
|
|
464
|
-
}),
|
|
461
|
+
let s = {};
|
|
462
|
+
return e.forEach((r) => {
|
|
463
|
+
Ce(t, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
|
|
464
|
+
}), s;
|
|
465
465
|
}
|
|
466
466
|
defaultQueryOptions(t) {
|
|
467
467
|
if (t._defaulted)
|
|
@@ -489,44 +489,44 @@ var p, E, q, Q, R, I, F, H, Qe, xr = (Qe = class {
|
|
|
489
489
|
l(this, p).clear(), l(this, E).clear();
|
|
490
490
|
}
|
|
491
491
|
}, p = new WeakMap(), E = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), R = new WeakMap(), I = new WeakMap(), F = new WeakMap(), H = new WeakMap(), Qe);
|
|
492
|
-
function
|
|
492
|
+
function ys(t) {
|
|
493
493
|
return t;
|
|
494
494
|
}
|
|
495
|
-
function Oe(t, e,
|
|
495
|
+
function Oe(t, e, s) {
|
|
496
496
|
var d, c;
|
|
497
497
|
if (typeof e != "object" || e === null)
|
|
498
498
|
return;
|
|
499
|
-
const
|
|
500
|
-
o.forEach(({ state:
|
|
499
|
+
const r = t.getMutationCache(), a = t.getQueryCache(), i = ((d = s == null ? void 0 : s.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? ys, o = e.mutations || [], u = e.queries || [];
|
|
500
|
+
o.forEach(({ state: g, ...f }) => {
|
|
501
501
|
var h, x;
|
|
502
|
-
|
|
502
|
+
r.build(
|
|
503
503
|
t,
|
|
504
504
|
{
|
|
505
505
|
...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
|
|
506
|
-
...(x =
|
|
506
|
+
...(x = s == null ? void 0 : s.defaultOptions) == null ? void 0 : x.mutations,
|
|
507
507
|
...f
|
|
508
508
|
},
|
|
509
|
-
|
|
509
|
+
g
|
|
510
510
|
);
|
|
511
|
-
}), u.forEach(({ queryKey:
|
|
511
|
+
}), u.forEach(({ queryKey: g, state: f, queryHash: h, meta: x, promise: v }) => {
|
|
512
512
|
var V, L;
|
|
513
|
-
let
|
|
513
|
+
let m = a.get(h);
|
|
514
514
|
const S = f.data === void 0 ? f.data : i(f.data);
|
|
515
|
-
if (
|
|
516
|
-
if (
|
|
515
|
+
if (m) {
|
|
516
|
+
if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
|
|
517
517
|
const { fetchStatus: b, ...k } = f;
|
|
518
|
-
|
|
518
|
+
m.setState({
|
|
519
519
|
...k,
|
|
520
520
|
data: S
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
523
|
} else
|
|
524
|
-
|
|
524
|
+
m = a.build(
|
|
525
525
|
t,
|
|
526
526
|
{
|
|
527
527
|
...(V = t.getDefaultOptions().hydrate) == null ? void 0 : V.queries,
|
|
528
|
-
...(L =
|
|
529
|
-
queryKey:
|
|
528
|
+
...(L = s == null ? void 0 : s.defaultOptions) == null ? void 0 : L.queries,
|
|
529
|
+
queryKey: g,
|
|
530
530
|
queryHash: h,
|
|
531
531
|
meta: x
|
|
532
532
|
},
|
|
@@ -540,59 +540,59 @@ function Oe(t, e, r) {
|
|
|
540
540
|
);
|
|
541
541
|
if (v) {
|
|
542
542
|
const b = Promise.resolve(v).then(i);
|
|
543
|
-
|
|
543
|
+
m.fetch(void 0, { initialPromise: b });
|
|
544
544
|
}
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
-
var
|
|
547
|
+
var vs = ({
|
|
548
548
|
children: t,
|
|
549
549
|
options: e = {},
|
|
550
|
-
state:
|
|
551
|
-
queryClient:
|
|
550
|
+
state: s,
|
|
551
|
+
queryClient: r
|
|
552
552
|
}) => {
|
|
553
|
-
const a = Dt(
|
|
553
|
+
const a = Dt(r), [i, o] = $.useState(), u = $.useRef(e);
|
|
554
554
|
return u.current = e, $.useMemo(() => {
|
|
555
|
-
if (
|
|
556
|
-
if (typeof
|
|
555
|
+
if (s) {
|
|
556
|
+
if (typeof s != "object")
|
|
557
557
|
return;
|
|
558
|
-
const d = a.getQueryCache(), c =
|
|
558
|
+
const d = a.getQueryCache(), c = s.queries || [], g = [], f = [];
|
|
559
559
|
for (const h of c) {
|
|
560
560
|
const x = d.get(h.queryHash);
|
|
561
561
|
if (!x)
|
|
562
|
-
|
|
562
|
+
g.push(h);
|
|
563
563
|
else {
|
|
564
|
-
const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt,
|
|
564
|
+
const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, m = i == null ? void 0 : i.find(
|
|
565
565
|
(S) => S.queryHash === h.queryHash
|
|
566
566
|
);
|
|
567
|
-
v && (!
|
|
567
|
+
v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
|
|
570
|
+
g.length > 0 && Oe(a, { queries: g }, u.current), f.length > 0 && o(
|
|
571
571
|
(h) => h ? [...h, ...f] : f
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
|
-
}, [a, i,
|
|
574
|
+
}, [a, i, s]), $.useEffect(() => {
|
|
575
575
|
i && (Oe(a, { queries: i }, u.current), o(void 0));
|
|
576
576
|
}, [a, i]), t;
|
|
577
577
|
};
|
|
578
|
-
const
|
|
578
|
+
const bs = () => {
|
|
579
579
|
var a;
|
|
580
|
-
const t = z(), e = A(),
|
|
581
|
-
(i) => ut({ path: i, end: !0 },
|
|
580
|
+
const t = z(), e = A(), s = oe(), r = (a = e.options.protectedRoutes) == null ? void 0 : a.some(
|
|
581
|
+
(i) => ut({ path: i, end: !0 }, s.pathname)
|
|
582
582
|
);
|
|
583
583
|
if (T(() => {
|
|
584
584
|
var i;
|
|
585
|
-
|
|
586
|
-
}, [
|
|
585
|
+
r && !t.isAuthenticated && ((i = e.authentication) == null || i.signIn());
|
|
586
|
+
}, [r, t.isAuthenticated, e.authentication]), r && !t.isAuthenticated)
|
|
587
587
|
return null;
|
|
588
|
-
if (
|
|
588
|
+
if (r && !t.isAuthEnabled)
|
|
589
589
|
throw new $e("Authentication is not enabled", {
|
|
590
590
|
title: "Authentication is not enabled",
|
|
591
591
|
developerHint: "To use protectedRoutes you need authentication to be enabled"
|
|
592
592
|
});
|
|
593
593
|
return /* @__PURE__ */ n.jsx(le, {});
|
|
594
594
|
};
|
|
595
|
-
function
|
|
595
|
+
function js({ error: t }) {
|
|
596
596
|
return /* @__PURE__ */ n.jsx(Ue, { error: t });
|
|
597
597
|
}
|
|
598
598
|
/**
|
|
@@ -605,45 +605,45 @@ function jr({ error: t }) {
|
|
|
605
605
|
*
|
|
606
606
|
* @license MIT
|
|
607
607
|
*/
|
|
608
|
-
function
|
|
608
|
+
function ws(t) {
|
|
609
609
|
return /* @__PURE__ */ $.createElement(dt, { flushSync: Ft.flushSync, ...t });
|
|
610
610
|
}
|
|
611
|
-
const ae = de({ stagger: !1 }),
|
|
611
|
+
const ae = de({ stagger: !1 }), Ps = new xs({
|
|
612
612
|
defaultOptions: {
|
|
613
613
|
queries: {
|
|
614
614
|
staleTime: 1e3 * 60 * 5
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
}),
|
|
617
|
+
}), Ss = ({
|
|
618
618
|
router: t,
|
|
619
619
|
hydrate: e = !1
|
|
620
|
-
}) => /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(Le, { client:
|
|
620
|
+
}) => /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(Le, { client: Ps, children: /* @__PURE__ */ n.jsx(vs, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ n.jsx(Re, { children: /* @__PURE__ */ n.jsx(ae.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ n.jsx(ws, { router: t }) }) }) }) }) }), Cs = ({
|
|
621
621
|
router: t,
|
|
622
622
|
context: e,
|
|
623
|
-
queryClient:
|
|
624
|
-
helmetContext:
|
|
625
|
-
}) => /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(Le, { client:
|
|
626
|
-
var U = { exports: {} },
|
|
627
|
-
function
|
|
623
|
+
queryClient: s,
|
|
624
|
+
helmetContext: r
|
|
625
|
+
}) => /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(Le, { client: s, children: /* @__PURE__ */ n.jsx(Re, { context: r, children: /* @__PURE__ */ n.jsx(ht, { router: t, context: e }) }) }) });
|
|
626
|
+
var U = { exports: {} }, ks = U.exports, Ae;
|
|
627
|
+
function Ns() {
|
|
628
628
|
return Ae || (Ae = 1, function(t, e) {
|
|
629
|
-
(function(
|
|
630
|
-
|
|
631
|
-
})(
|
|
629
|
+
(function(s, r) {
|
|
630
|
+
r(e, mt);
|
|
631
|
+
})(ks, function(s, r) {
|
|
632
632
|
const a = {
|
|
633
633
|
delay: 500,
|
|
634
634
|
minDuration: 200,
|
|
635
635
|
ssr: !0
|
|
636
636
|
};
|
|
637
637
|
function i() {
|
|
638
|
-
const [u, d] =
|
|
639
|
-
return
|
|
638
|
+
const [u, d] = r.useState(!0);
|
|
639
|
+
return r.useEffect(() => {
|
|
640
640
|
d(!1);
|
|
641
641
|
}, []), u;
|
|
642
642
|
}
|
|
643
643
|
function o(u, d) {
|
|
644
644
|
d = Object.assign({}, a, d);
|
|
645
|
-
const c = i() && d.ssr,
|
|
646
|
-
return
|
|
645
|
+
const c = i() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [f, h] = r.useState(g), x = r.useRef(null);
|
|
646
|
+
return r.useEffect(() => {
|
|
647
647
|
if (u && (f === "IDLE" || c)) {
|
|
648
648
|
clearTimeout(x.current);
|
|
649
649
|
const v = c ? 0 : d.delay;
|
|
@@ -656,20 +656,21 @@ function Nr() {
|
|
|
656
656
|
}, v), c || h("DELAY");
|
|
657
657
|
}
|
|
658
658
|
!u && f !== "DISPLAY" && (clearTimeout(x.current), h("IDLE"));
|
|
659
|
-
}, [u, f, d.delay, d.minDuration, c]),
|
|
659
|
+
}, [u, f, d.delay, d.minDuration, c]), r.useEffect(() => () => clearTimeout(x.current), []), f === "DISPLAY" || f === "EXPIRE";
|
|
660
660
|
}
|
|
661
|
-
|
|
661
|
+
s.defaultOptions = a, s.useSpinDelay = o;
|
|
662
662
|
});
|
|
663
663
|
}(U, U.exports)), U.exports;
|
|
664
664
|
}
|
|
665
|
-
var
|
|
666
|
-
const
|
|
665
|
+
var Ds = Ns();
|
|
666
|
+
const Ms = () => {
|
|
667
667
|
const t = oe(), e = he(t.pathname);
|
|
668
668
|
T(() => {
|
|
669
|
-
e.current !== t.pathname
|
|
670
|
-
|
|
669
|
+
const s = e.current !== t.pathname, r = t.hash !== "";
|
|
670
|
+
s && !r && window.scrollTo(0, 0), e.current = t.pathname;
|
|
671
|
+
}, [t.pathname, t.hash]);
|
|
671
672
|
};
|
|
672
|
-
function
|
|
673
|
+
function Os({
|
|
673
674
|
className: t,
|
|
674
675
|
...e
|
|
675
676
|
}) {
|
|
@@ -681,23 +682,23 @@ function Or({
|
|
|
681
682
|
}
|
|
682
683
|
);
|
|
683
684
|
}
|
|
684
|
-
const
|
|
685
|
+
const As = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Es = (t) => "getRoutes" in t && typeof t.getRoutes == "function", qs = (t) => "renderSearch" in t && typeof t.renderSearch == "function", Is = (t) => "initialize" in t && typeof t.initialize == "function", Ts = (t) => "getHead" in t && typeof t.getHead == "function", Qs = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Rs = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ee = {
|
|
685
686
|
info: "bg-blue-500",
|
|
686
687
|
note: "bg-gray-500",
|
|
687
688
|
tip: "bg-green-600",
|
|
688
689
|
caution: "bg-orange-500",
|
|
689
690
|
danger: "bg-rose-500"
|
|
690
|
-
},
|
|
691
|
-
const { page: t } = A(), [e,
|
|
691
|
+
}, Fs = () => {
|
|
692
|
+
const { page: t } = A(), [e, s] = B(!0);
|
|
692
693
|
if (!(t != null && t.banner) || !e)
|
|
693
694
|
return /* @__PURE__ */ n.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
694
|
-
const
|
|
695
|
+
const r = t.banner.color && t.banner.color in Ee ? Ee[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = r ? {} : { backgroundColor: t.banner.color };
|
|
695
696
|
return /* @__PURE__ */ n.jsxs(
|
|
696
697
|
"div",
|
|
697
698
|
{
|
|
698
699
|
className: Z(
|
|
699
700
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
700
|
-
|
|
701
|
+
r
|
|
701
702
|
),
|
|
702
703
|
style: a,
|
|
703
704
|
children: [
|
|
@@ -707,7 +708,7 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
707
708
|
{
|
|
708
709
|
type: "button",
|
|
709
710
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
710
|
-
onClick: () =>
|
|
711
|
+
onClick: () => s(!1),
|
|
711
712
|
children: /* @__PURE__ */ n.jsx(Ht, { size: 16 })
|
|
712
713
|
}
|
|
713
714
|
)
|
|
@@ -715,24 +716,24 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
715
716
|
}
|
|
716
717
|
);
|
|
717
718
|
}, We = ({ className: t }) => {
|
|
718
|
-
const e = A(), [
|
|
719
|
+
const e = A(), [s, r] = B(!1), a = pt(() => r(!1), []);
|
|
719
720
|
T(() => {
|
|
720
|
-
if (
|
|
721
|
+
if (s)
|
|
721
722
|
return;
|
|
722
723
|
function o(u) {
|
|
723
|
-
u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(),
|
|
724
|
+
u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), r(!0));
|
|
724
725
|
}
|
|
725
726
|
return window.addEventListener("keydown", o), () => {
|
|
726
727
|
window.removeEventListener("keydown", o);
|
|
727
728
|
};
|
|
728
|
-
}, [
|
|
729
|
-
const i = e.plugins.find(
|
|
729
|
+
}, [s, r]);
|
|
730
|
+
const i = e.plugins.find(qs);
|
|
730
731
|
return i ? /* @__PURE__ */ n.jsxs("div", { className: t, children: [
|
|
731
732
|
/* @__PURE__ */ n.jsxs(
|
|
732
733
|
"button",
|
|
733
734
|
{
|
|
734
735
|
type: "button",
|
|
735
|
-
onClick: () =>
|
|
736
|
+
onClick: () => r(!0),
|
|
736
737
|
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",
|
|
737
738
|
children: [
|
|
738
739
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
@@ -744,33 +745,33 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
744
745
|
}
|
|
745
746
|
),
|
|
746
747
|
/* @__PURE__ */ n.jsx(fe, { fallback: null, children: i.renderSearch({
|
|
747
|
-
isOpen:
|
|
748
|
+
isOpen: s,
|
|
748
749
|
onClose: a
|
|
749
750
|
}) })
|
|
750
751
|
] }) : null;
|
|
751
752
|
}, Je = () => {
|
|
752
|
-
const { resolvedTheme: t, setTheme: e } =
|
|
753
|
-
return /* @__PURE__ */ n.jsx(
|
|
753
|
+
const { resolvedTheme: t, setTheme: e } = us(), s = t === "dark" ? Bt : Lt;
|
|
754
|
+
return /* @__PURE__ */ n.jsx(ge, { fallback: /* @__PURE__ */ n.jsx(ee, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ n.jsx(
|
|
754
755
|
ee,
|
|
755
756
|
{
|
|
756
757
|
variant: "ghost",
|
|
757
758
|
size: "icon",
|
|
758
759
|
"aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
|
|
759
760
|
onClick: () => e(t === "dark" ? "light" : "dark"),
|
|
760
|
-
children: /* @__PURE__ */ n.jsx(
|
|
761
|
+
children: /* @__PURE__ */ n.jsx(s, { size: 18 })
|
|
761
762
|
}
|
|
762
763
|
) });
|
|
763
|
-
}, et = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always",
|
|
764
|
+
}, et = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Hs = () => {
|
|
764
765
|
const { topNavigation: t } = A(), { isAuthenticated: e } = z();
|
|
765
|
-
return t.length <= 1 ? /* @__PURE__ */ n.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ n.jsx(fe, { children: /* @__PURE__ */ n.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ n.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(et(e)).map((
|
|
766
|
+
return t.length <= 1 ? /* @__PURE__ */ n.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ n.jsx(fe, { children: /* @__PURE__ */ n.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ n.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(et(e)).map((s) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(tt, { ...s }) }, s.id)) }) }) });
|
|
766
767
|
}, tt = ({
|
|
767
768
|
id: t,
|
|
768
769
|
label: e,
|
|
769
|
-
default:
|
|
770
|
+
default: s
|
|
770
771
|
}) => {
|
|
771
772
|
var c;
|
|
772
|
-
const { sidebars:
|
|
773
|
-
if (
|
|
773
|
+
const { sidebars: r } = A(), a = r[t], i = Ke(), o = !!ce().location, u = ((c = i.topNavItem) == null ? void 0 : c.id) === t && !o, d = s ?? (a ? Mt(a, (g) => {
|
|
774
|
+
if (g.type === "doc") return ne(g.id);
|
|
774
775
|
}) : ne(t));
|
|
775
776
|
if (!d)
|
|
776
777
|
throw new $e("Page not found.", {
|
|
@@ -782,23 +783,23 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
782
783
|
/* @__PURE__ */ n.jsx(
|
|
783
784
|
ft,
|
|
784
785
|
{
|
|
785
|
-
className: ({ isPending:
|
|
786
|
+
className: ({ isPending: g }) => hs(
|
|
786
787
|
"block lg:py-3.5 font-medium -mb-px",
|
|
787
|
-
u ||
|
|
788
|
+
u || g ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
788
789
|
),
|
|
789
790
|
to: d,
|
|
790
791
|
children: e
|
|
791
792
|
}
|
|
792
793
|
)
|
|
793
794
|
);
|
|
794
|
-
},
|
|
795
|
-
const { topNavigation: t } = A(), { isAuthenticated: e } = z(), [
|
|
795
|
+
}, zs = () => {
|
|
796
|
+
const { topNavigation: t } = A(), { isAuthenticated: e } = z(), [s, r] = B(!1);
|
|
796
797
|
return /* @__PURE__ */ n.jsxs(
|
|
797
798
|
Ze,
|
|
798
799
|
{
|
|
799
800
|
direction: "right",
|
|
800
|
-
open:
|
|
801
|
-
onOpenChange: (a) =>
|
|
801
|
+
open: s,
|
|
802
|
+
onOpenChange: (a) => r(a),
|
|
802
803
|
children: [
|
|
803
804
|
/* @__PURE__ */ n.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ n.jsx(Ye, { className: "lg:hidden", children: /* @__PURE__ */ n.jsx(Kt, { size: 22 }) }) }),
|
|
804
805
|
/* @__PURE__ */ n.jsx(
|
|
@@ -811,7 +812,7 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
811
812
|
/* @__PURE__ */ n.jsx(We, { className: "flex p-4" }),
|
|
812
813
|
/* @__PURE__ */ n.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
|
|
813
814
|
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(Je, {}) }),
|
|
814
|
-
t.filter(et(e)).map((a) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () =>
|
|
815
|
+
t.filter(et(e)).map((a) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () => r(!1), children: /* @__PURE__ */ n.jsx(tt, { ...a }) }) }, a.label))
|
|
815
816
|
] })
|
|
816
817
|
] })
|
|
817
818
|
}
|
|
@@ -819,19 +820,19 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
819
820
|
]
|
|
820
821
|
}
|
|
821
822
|
);
|
|
822
|
-
}, J = ({ item: t }) => t.children ? /* @__PURE__ */ n.jsxs(
|
|
823
|
-
/* @__PURE__ */ n.jsx(
|
|
824
|
-
/* @__PURE__ */ n.jsx(
|
|
823
|
+
}, J = ({ item: t }) => t.children ? /* @__PURE__ */ n.jsxs(as, { children: [
|
|
824
|
+
/* @__PURE__ */ n.jsx(is, { children: t.label }),
|
|
825
|
+
/* @__PURE__ */ n.jsx(os, { children: /* @__PURE__ */ n.jsx(ls, { children: t.children.map((e, s) => (
|
|
825
826
|
// eslint-disable-next-line react/no-array-index-key
|
|
826
|
-
/* @__PURE__ */ n.jsx(J, { item: e },
|
|
827
|
+
/* @__PURE__ */ n.jsx(J, { item: e }, s)
|
|
827
828
|
)) }) })
|
|
828
|
-
] }, t.label) : /* @__PURE__ */ n.jsx(ue, { to: t.path ?? "", children: /* @__PURE__ */ n.jsxs(
|
|
829
|
+
] }, t.label) : /* @__PURE__ */ n.jsx(ue, { to: t.path ?? "", children: /* @__PURE__ */ n.jsxs(cs, { className: "flex gap-2", children: [
|
|
829
830
|
t.icon && /* @__PURE__ */ n.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
|
|
830
831
|
t.label
|
|
831
|
-
] }, t.label) }),
|
|
832
|
-
const e = z(), { isAuthenticated:
|
|
832
|
+
] }, t.label) }), st = He(function() {
|
|
833
|
+
const e = z(), { isAuthenticated: s, profile: r, isAuthEnabled: a } = z(), i = A(), { page: o, plugins: u } = i, d = u.filter((c) => As(c)).flatMap((c) => c.getProfileMenuItems(i)).sort((c) => c.weight ?? 0);
|
|
833
834
|
return /* @__PURE__ */ n.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
834
|
-
/* @__PURE__ */ n.jsx(
|
|
835
|
+
/* @__PURE__ */ n.jsx(Fs, {}),
|
|
835
836
|
/* @__PURE__ */ n.jsx("div", { className: "border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl border-l border-r mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-12 h-[--top-header-height]", children: [
|
|
836
837
|
/* @__PURE__ */ n.jsx("div", { className: "flex", children: /* @__PURE__ */ n.jsx(ue, { to: "/", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
837
838
|
(o == null ? void 0 : o.logo) && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
@@ -866,29 +867,29 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
866
867
|
] }) }) }),
|
|
867
868
|
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
868
869
|
/* @__PURE__ */ n.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ n.jsx(We, {}) }),
|
|
869
|
-
/* @__PURE__ */ n.jsx(
|
|
870
|
+
/* @__PURE__ */ n.jsx(zs, {}),
|
|
870
871
|
/* @__PURE__ */ n.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
871
872
|
/* @__PURE__ */ n.jsx(D, { name: "head-navigation-start" }),
|
|
872
873
|
a && /* @__PURE__ */ n.jsx(
|
|
873
|
-
|
|
874
|
+
ge,
|
|
874
875
|
{
|
|
875
|
-
fallback: /* @__PURE__ */ n.jsx(
|
|
876
|
-
children:
|
|
877
|
-
/* @__PURE__ */ n.jsx(
|
|
878
|
-
/* @__PURE__ */ n.jsxs(
|
|
879
|
-
/* @__PURE__ */ n.jsxs(
|
|
880
|
-
|
|
881
|
-
(
|
|
876
|
+
fallback: /* @__PURE__ */ n.jsx(Os, { className: "rounded h-5 w-24 mr-4" }),
|
|
877
|
+
children: s ? Object.values(d).length > 0 && /* @__PURE__ */ n.jsxs(ts, { modal: !1, children: [
|
|
878
|
+
/* @__PURE__ */ n.jsx(ss, { asChild: !0, children: /* @__PURE__ */ n.jsx(ee, { variant: "ghost", children: r != null && r.name ? `${r.name}` : "My Account" }) }),
|
|
879
|
+
/* @__PURE__ */ n.jsxs(rs, { className: "w-56", children: [
|
|
880
|
+
/* @__PURE__ */ n.jsxs(ns, { children: [
|
|
881
|
+
r != null && r.name ? `${r.name}` : "My Account",
|
|
882
|
+
(r == null ? void 0 : r.email) && /* @__PURE__ */ n.jsx("div", { className: "font-normal text-muted-foreground", children: r.email })
|
|
882
883
|
] }),
|
|
883
|
-
d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ n.jsx(
|
|
884
|
+
d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ n.jsx(se, {}),
|
|
884
885
|
d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ n.jsx(J, { item: c }, c.label)),
|
|
885
886
|
d.filter(
|
|
886
887
|
(c) => !c.category || c.category === "middle"
|
|
887
|
-
).length > 0 && /* @__PURE__ */ n.jsx(
|
|
888
|
+
).length > 0 && /* @__PURE__ */ n.jsx(se, {}),
|
|
888
889
|
d.filter(
|
|
889
890
|
(c) => !c.category || c.category === "middle"
|
|
890
891
|
).map((c) => /* @__PURE__ */ n.jsx(J, { item: c }, c.label)),
|
|
891
|
-
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ n.jsx(
|
|
892
|
+
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ n.jsx(se, {}),
|
|
892
893
|
d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ n.jsx(J, { item: c }, c.label))
|
|
893
894
|
] })
|
|
894
895
|
] }) : /* @__PURE__ */ n.jsx(ee, { variant: "ghost", onClick: () => e.login(), children: "Login" })
|
|
@@ -901,43 +902,43 @@ const Ar = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
901
902
|
] }) }),
|
|
902
903
|
/* @__PURE__ */ n.jsx("div", { className: "border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl mx-auto border-l border-r", children: [
|
|
903
904
|
/* @__PURE__ */ n.jsx(D, { name: "top-navigation-before" }),
|
|
904
|
-
/* @__PURE__ */ n.jsx(
|
|
905
|
+
/* @__PURE__ */ n.jsx(Hs, {}),
|
|
905
906
|
/* @__PURE__ */ n.jsx(D, { name: "top-navigation-after" })
|
|
906
907
|
] }) })
|
|
907
908
|
] });
|
|
908
|
-
}),
|
|
909
|
+
}), rt = xt(({ children: t, className: e, pushMainContent: s }, r) => /* @__PURE__ */ n.jsx(
|
|
909
910
|
"nav",
|
|
910
911
|
{
|
|
911
|
-
"data-navigation": String(
|
|
912
|
+
"data-navigation": String(s),
|
|
912
913
|
className: Z(
|
|
913
914
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10",
|
|
914
915
|
"-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
|
|
915
916
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
916
|
-
!
|
|
917
|
+
!s && "border-r-0",
|
|
917
918
|
e
|
|
918
919
|
),
|
|
919
|
-
ref:
|
|
920
|
+
ref: r,
|
|
920
921
|
children: t
|
|
921
922
|
}
|
|
922
923
|
));
|
|
923
|
-
|
|
924
|
-
const
|
|
924
|
+
rt.displayName = "SidebarWrapper";
|
|
925
|
+
const Bs = ({
|
|
925
926
|
onRequestClose: t
|
|
926
927
|
}) => {
|
|
927
|
-
const e = he(null),
|
|
928
|
+
const e = he(null), s = Ke();
|
|
928
929
|
return T(() => {
|
|
929
930
|
var a;
|
|
930
|
-
const
|
|
931
|
-
Ut(
|
|
931
|
+
const r = (a = e.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
|
|
932
|
+
Ut(r ?? null);
|
|
932
933
|
}, []), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
933
934
|
/* @__PURE__ */ n.jsxs(
|
|
934
|
-
|
|
935
|
+
rt,
|
|
935
936
|
{
|
|
936
937
|
ref: e,
|
|
937
|
-
pushMainContent:
|
|
938
|
+
pushMainContent: s.sidebar.length > 0,
|
|
938
939
|
children: [
|
|
939
940
|
/* @__PURE__ */ n.jsx(D, { name: "zudoku-before-navigation" }),
|
|
940
|
-
|
|
941
|
+
s.sidebar.map((r) => /* @__PURE__ */ n.jsx(ke, { item: r }, r.label)),
|
|
941
942
|
/* @__PURE__ */ n.jsx(D, { name: "zudoku-after-navigation" })
|
|
942
943
|
]
|
|
943
944
|
}
|
|
@@ -949,49 +950,49 @@ const Br = ({
|
|
|
949
950
|
"aria-describedby": void 0,
|
|
950
951
|
children: /* @__PURE__ */ n.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
951
952
|
/* @__PURE__ */ n.jsx(_e, { children: /* @__PURE__ */ n.jsx(Xe, { children: "Sidebar" }) }),
|
|
952
|
-
|
|
953
|
+
s.sidebar.map((r) => /* @__PURE__ */ n.jsx(
|
|
953
954
|
ke,
|
|
954
955
|
{
|
|
955
|
-
item:
|
|
956
|
+
item: r,
|
|
956
957
|
onRequestClose: t
|
|
957
958
|
},
|
|
958
|
-
|
|
959
|
+
r.label
|
|
959
960
|
))
|
|
960
961
|
] })
|
|
961
962
|
}
|
|
962
963
|
)
|
|
963
964
|
] });
|
|
964
|
-
}, qe = () => /* @__PURE__ */ n.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ n.jsx(Ge, {}) }),
|
|
965
|
-
const e = oe(), { setActiveAnchor:
|
|
966
|
-
Zt(),
|
|
965
|
+
}, qe = () => /* @__PURE__ */ n.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ n.jsx(Ge, {}) }), Ls = ({ children: t }) => {
|
|
966
|
+
const e = oe(), { setActiveAnchor: s } = Xt(), { meta: r, authentication: a } = A();
|
|
967
|
+
Zt(), Ms();
|
|
967
968
|
const i = he(e.pathname);
|
|
968
969
|
T(() => {
|
|
969
|
-
var
|
|
970
|
-
(
|
|
970
|
+
var g;
|
|
971
|
+
(g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
|
|
971
972
|
}, [a]), T(() => {
|
|
972
|
-
e.pathname !== i.current &&
|
|
973
|
-
}, [e.pathname,
|
|
974
|
-
const o = !!ce().location, u =
|
|
973
|
+
e.pathname !== i.current && s(""), i.current = e.pathname;
|
|
974
|
+
}, [e.pathname, s]);
|
|
975
|
+
const o = !!ce().location, u = Ds.useSpinDelay(o, {
|
|
975
976
|
delay: 300,
|
|
976
977
|
minDuration: 500
|
|
977
978
|
}), [d, c] = B(!1);
|
|
978
979
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
979
980
|
!1,
|
|
980
|
-
/* @__PURE__ */ n.jsxs(ie, { titleTemplate:
|
|
981
|
-
(
|
|
982
|
-
(
|
|
981
|
+
/* @__PURE__ */ n.jsxs(ie, { titleTemplate: r == null ? void 0 : r.title, children: [
|
|
982
|
+
(r == null ? void 0 : r.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: r.description }),
|
|
983
|
+
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: r.favicon })
|
|
983
984
|
] }),
|
|
984
985
|
/* @__PURE__ */ n.jsx(D, { name: "layout-before-head" }),
|
|
985
|
-
/* @__PURE__ */ n.jsx(
|
|
986
|
+
/* @__PURE__ */ n.jsx(st, {}),
|
|
986
987
|
/* @__PURE__ */ n.jsx(D, { name: "layout-after-head" }),
|
|
987
988
|
/* @__PURE__ */ n.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ n.jsx(qe, {}) : /* @__PURE__ */ n.jsx(fe, { fallback: /* @__PURE__ */ n.jsx(qe, {}), children: /* @__PURE__ */ n.jsxs(
|
|
988
989
|
Ze,
|
|
989
990
|
{
|
|
990
991
|
direction: "left",
|
|
991
992
|
open: d,
|
|
992
|
-
onOpenChange: (
|
|
993
|
+
onOpenChange: (g) => c(g),
|
|
993
994
|
children: [
|
|
994
|
-
/* @__PURE__ */ n.jsx(
|
|
995
|
+
/* @__PURE__ */ n.jsx(Bs, { onRequestClose: () => c(!1) }),
|
|
995
996
|
/* @__PURE__ */ n.jsx(
|
|
996
997
|
"div",
|
|
997
998
|
{
|
|
@@ -1026,15 +1027,15 @@ const Br = ({
|
|
|
1026
1027
|
}
|
|
1027
1028
|
) }) })
|
|
1028
1029
|
] });
|
|
1029
|
-
},
|
|
1030
|
+
}, Ks = ({
|
|
1030
1031
|
title: t = "An error occurred",
|
|
1031
1032
|
message: e,
|
|
1032
|
-
category:
|
|
1033
|
+
category: s
|
|
1033
1034
|
}) => /* @__PURE__ */ n.jsxs("div", { className: Gt + " h-full pt-[--padding-content-top]", children: [
|
|
1034
|
-
|
|
1035
|
+
s && /* @__PURE__ */ n.jsx(fs, { children: s }),
|
|
1035
1036
|
t && /* @__PURE__ */ n.jsx(_t, { level: 1, className: "flex gap-3.5 items-center", children: t }),
|
|
1036
1037
|
/* @__PURE__ */ n.jsx("p", { children: e })
|
|
1037
|
-
] }), $
|
|
1038
|
+
] }), $s = (t) => {
|
|
1038
1039
|
switch (t) {
|
|
1039
1040
|
case 400:
|
|
1040
1041
|
return {
|
|
@@ -1097,23 +1098,23 @@ const Br = ({
|
|
|
1097
1098
|
message: "Something went wrong while processing your request."
|
|
1098
1099
|
};
|
|
1099
1100
|
}
|
|
1100
|
-
},
|
|
1101
|
-
const
|
|
1101
|
+
}, Us = ({ statusCode: t, message: e }) => {
|
|
1102
|
+
const s = $s(t);
|
|
1102
1103
|
return /* @__PURE__ */ n.jsx(
|
|
1103
|
-
|
|
1104
|
+
Ks,
|
|
1104
1105
|
{
|
|
1105
|
-
title:
|
|
1106
|
-
message: e ??
|
|
1106
|
+
title: s.title,
|
|
1107
|
+
message: e ?? s.message,
|
|
1107
1108
|
category: t
|
|
1108
1109
|
}
|
|
1109
1110
|
);
|
|
1110
|
-
},
|
|
1111
|
+
}, Zs = de(null), re = {
|
|
1111
1112
|
didCatch: !1,
|
|
1112
1113
|
error: null
|
|
1113
1114
|
};
|
|
1114
|
-
class
|
|
1115
|
+
class Ys extends yt {
|
|
1115
1116
|
constructor(e) {
|
|
1116
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
1117
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = re;
|
|
1117
1118
|
}
|
|
1118
1119
|
static getDerivedStateFromError(e) {
|
|
1119
1120
|
return {
|
|
@@ -1126,38 +1127,38 @@ class Yr extends yt {
|
|
|
1126
1127
|
error: e
|
|
1127
1128
|
} = this.state;
|
|
1128
1129
|
if (e !== null) {
|
|
1129
|
-
for (var
|
|
1130
|
+
for (var s, r, a = arguments.length, i = new Array(a), o = 0; o < a; o++)
|
|
1130
1131
|
i[o] = arguments[o];
|
|
1131
|
-
(
|
|
1132
|
+
(s = (r = this.props).onReset) === null || s === void 0 || s.call(r, {
|
|
1132
1133
|
args: i,
|
|
1133
1134
|
reason: "imperative-api"
|
|
1134
|
-
}), this.setState(
|
|
1135
|
+
}), this.setState(re);
|
|
1135
1136
|
}
|
|
1136
1137
|
}
|
|
1137
|
-
componentDidCatch(e,
|
|
1138
|
-
var
|
|
1139
|
-
(
|
|
1138
|
+
componentDidCatch(e, s) {
|
|
1139
|
+
var r, a;
|
|
1140
|
+
(r = (a = this.props).onError) === null || r === void 0 || r.call(a, e, s);
|
|
1140
1141
|
}
|
|
1141
|
-
componentDidUpdate(e,
|
|
1142
|
+
componentDidUpdate(e, s) {
|
|
1142
1143
|
const {
|
|
1143
|
-
didCatch:
|
|
1144
|
+
didCatch: r
|
|
1144
1145
|
} = this.state, {
|
|
1145
1146
|
resetKeys: a
|
|
1146
1147
|
} = this.props;
|
|
1147
|
-
if (
|
|
1148
|
+
if (r && s.error !== null && Vs(e.resetKeys, a)) {
|
|
1148
1149
|
var i, o;
|
|
1149
1150
|
(i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
|
|
1150
1151
|
next: a,
|
|
1151
1152
|
prev: e.resetKeys,
|
|
1152
1153
|
reason: "keys"
|
|
1153
|
-
}), this.setState(
|
|
1154
|
+
}), this.setState(re);
|
|
1154
1155
|
}
|
|
1155
1156
|
}
|
|
1156
1157
|
render() {
|
|
1157
1158
|
const {
|
|
1158
1159
|
children: e,
|
|
1159
|
-
fallbackRender:
|
|
1160
|
-
FallbackComponent:
|
|
1160
|
+
fallbackRender: s,
|
|
1161
|
+
FallbackComponent: r,
|
|
1161
1162
|
fallback: a
|
|
1162
1163
|
} = this.props, {
|
|
1163
1164
|
didCatch: i,
|
|
@@ -1169,16 +1170,16 @@ class Yr extends yt {
|
|
|
1169
1170
|
error: o,
|
|
1170
1171
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1171
1172
|
};
|
|
1172
|
-
if (typeof
|
|
1173
|
-
u =
|
|
1174
|
-
else if (
|
|
1175
|
-
u = ve(
|
|
1173
|
+
if (typeof s == "function")
|
|
1174
|
+
u = s(d);
|
|
1175
|
+
else if (r)
|
|
1176
|
+
u = ve(r, d);
|
|
1176
1177
|
else if (a !== void 0)
|
|
1177
1178
|
u = a;
|
|
1178
1179
|
else
|
|
1179
1180
|
throw o;
|
|
1180
1181
|
}
|
|
1181
|
-
return ve(
|
|
1182
|
+
return ve(Zs.Provider, {
|
|
1182
1183
|
value: {
|
|
1183
1184
|
didCatch: i,
|
|
1184
1185
|
error: o,
|
|
@@ -1187,11 +1188,11 @@ class Yr extends yt {
|
|
|
1187
1188
|
}, u);
|
|
1188
1189
|
}
|
|
1189
1190
|
}
|
|
1190
|
-
function
|
|
1191
|
+
function Vs() {
|
|
1191
1192
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1192
|
-
return t.length !== e.length || t.some((
|
|
1193
|
+
return t.length !== e.length || t.some((s, r) => !Object.is(s, e[r]));
|
|
1193
1194
|
}
|
|
1194
|
-
class
|
|
1195
|
+
class Xs {
|
|
1195
1196
|
constructor(e) {
|
|
1196
1197
|
P(this, "plugins");
|
|
1197
1198
|
P(this, "sidebars");
|
|
@@ -1202,40 +1203,40 @@ class Xr {
|
|
|
1202
1203
|
P(this, "navigationPlugins");
|
|
1203
1204
|
P(this, "initialize", async () => {
|
|
1204
1205
|
await Promise.all(
|
|
1205
|
-
this.plugins.filter(
|
|
1206
|
-
var
|
|
1207
|
-
return (
|
|
1206
|
+
this.plugins.filter(Is).map((e) => {
|
|
1207
|
+
var s;
|
|
1208
|
+
return (s = e.initialize) == null ? void 0 : s.call(e, this);
|
|
1208
1209
|
})
|
|
1209
1210
|
);
|
|
1210
1211
|
});
|
|
1211
1212
|
P(this, "getApiIdentities", async () => (await Promise.all(
|
|
1212
|
-
this.plugins.filter(
|
|
1213
|
+
this.plugins.filter(Rs).map((s) => s.getIdentities(this))
|
|
1213
1214
|
)).flat());
|
|
1214
1215
|
P(this, "getPluginSidebar", async (e) => (await Promise.all(
|
|
1215
1216
|
this.navigationPlugins.map(
|
|
1216
|
-
(
|
|
1217
|
+
(r) => {
|
|
1217
1218
|
var a;
|
|
1218
|
-
return (a =
|
|
1219
|
+
return (a = r.getSidebar) == null ? void 0 : a.call(r, ne(e));
|
|
1219
1220
|
}
|
|
1220
1221
|
)
|
|
1221
|
-
)).flatMap((
|
|
1222
|
+
)).flatMap((r) => r ?? []));
|
|
1222
1223
|
P(this, "signRequest", async (e) => {
|
|
1223
1224
|
if (!this.authentication)
|
|
1224
1225
|
throw new Error("No authentication provider configured");
|
|
1225
|
-
const
|
|
1226
|
-
return e.headers.set("Authorization", `Bearer ${
|
|
1226
|
+
const s = await this.authentication.getAccessToken();
|
|
1227
|
+
return e.headers.set("Authorization", `Bearer ${s}`), e;
|
|
1227
1228
|
});
|
|
1228
|
-
this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
1229
|
+
this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Es), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
|
|
1229
1230
|
}
|
|
1230
1231
|
}
|
|
1231
|
-
function
|
|
1232
|
+
function Gs({ error: t, resetErrorBoundary: e }) {
|
|
1232
1233
|
return /* @__PURE__ */ n.jsx(Ue, { error: t });
|
|
1233
1234
|
}
|
|
1234
1235
|
const W = globalThis;
|
|
1235
1236
|
(!W.requestIdleCallback || !W.cancelIdleCallback) && (W.requestIdleCallback = (t) => setTimeout(t, 1), W.cancelIdleCallback = clearTimeout);
|
|
1236
1237
|
const nt = {
|
|
1237
|
-
Header:
|
|
1238
|
-
},
|
|
1238
|
+
Header: st
|
|
1239
|
+
}, _s = de(nt), Ws = _s.Provider, Js = ({
|
|
1239
1240
|
children: t,
|
|
1240
1241
|
context: e
|
|
1241
1242
|
}) => (Ot({
|
|
@@ -1244,16 +1245,16 @@ const nt = {
|
|
|
1244
1245
|
}), /* @__PURE__ */ n.jsx(At.Provider, { value: e, children: t })), at = He(
|
|
1245
1246
|
({ children: t, ...e }) => {
|
|
1246
1247
|
var f, h;
|
|
1247
|
-
const
|
|
1248
|
+
const s = te(
|
|
1248
1249
|
() => ({ ...nt, ...e.overrides }),
|
|
1249
1250
|
[e.overrides]
|
|
1250
|
-
),
|
|
1251
|
+
), r = te(() => {
|
|
1251
1252
|
var v;
|
|
1252
1253
|
return {
|
|
1253
|
-
...(e.plugins ?? []).filter(
|
|
1254
|
-
(
|
|
1254
|
+
...(e.plugins ?? []).filter(Qs).flatMap(
|
|
1255
|
+
(m) => m.getMdxComponents ? [m.getMdxComponents()] : []
|
|
1255
1256
|
).reduce(
|
|
1256
|
-
(
|
|
1257
|
+
(m, S) => ({ ...m, ...S }),
|
|
1257
1258
|
{}
|
|
1258
1259
|
),
|
|
1259
1260
|
...Wt,
|
|
@@ -1266,40 +1267,40 @@ const nt = {
|
|
|
1266
1267
|
T(() => {
|
|
1267
1268
|
i || o(!0);
|
|
1268
1269
|
}, [i, d.location]);
|
|
1269
|
-
const [c] = B(() => new
|
|
1270
|
-
var
|
|
1271
|
-
return /* @__PURE__ */ n.jsx(bt, { children: (
|
|
1270
|
+
const [c] = B(() => new Xs(e)), g = (h = e.plugins) == null ? void 0 : h.filter(Ts).map((x, v) => {
|
|
1271
|
+
var m;
|
|
1272
|
+
return /* @__PURE__ */ n.jsx(bt, { children: (m = x.getHead) == null ? void 0 : m.call(x) }, v);
|
|
1272
1273
|
});
|
|
1273
1274
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1274
|
-
/* @__PURE__ */ n.jsx(ie, { children:
|
|
1275
|
-
/* @__PURE__ */ n.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ n.jsx(
|
|
1275
|
+
/* @__PURE__ */ n.jsx(ie, { children: g }),
|
|
1276
|
+
/* @__PURE__ */ n.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ n.jsx(Js, { context: c, children: /* @__PURE__ */ n.jsx(Yt, { components: r, children: /* @__PURE__ */ n.jsx(ds, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ n.jsx(Ws, { value: s, children: /* @__PURE__ */ n.jsx(It, { slotlets: e.slotlets, children: /* @__PURE__ */ n.jsx(Jt, { children: t ?? /* @__PURE__ */ n.jsx(le, {}) }) }) }) }) }) }) })
|
|
1276
1277
|
] });
|
|
1277
1278
|
}
|
|
1278
1279
|
);
|
|
1279
1280
|
at.displayName = "ZudokoInner";
|
|
1280
|
-
const it = (t) => /* @__PURE__ */ n.jsx(
|
|
1281
|
+
const it = (t) => /* @__PURE__ */ n.jsx(Ys, { FallbackComponent: Gs, children: /* @__PURE__ */ n.jsx(at, { ...t }) });
|
|
1281
1282
|
it.displayName = "Zudoku";
|
|
1282
|
-
const
|
|
1283
|
+
const Sr = Vt, Cr = Ls, kr = Tt, Nr = js, Dr = Ss, Mr = Cs, Or = bs, Ar = ie, Er = A, qr = z, Ir = Et, Tr = qt, Qr = it, Rr = Us, Fr = Rt, Hr = es, zr = Ge, Br = ge, Lr = Qt, Kr = ue;
|
|
1283
1284
|
export {
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1285
|
+
Dr as Bootstrap,
|
|
1286
|
+
Mr as BootstrapStatic,
|
|
1287
|
+
Lr as Button,
|
|
1288
|
+
Tr as CACHE_KEYS,
|
|
1289
|
+
Fr as Callout,
|
|
1290
|
+
Br as ClientOnly,
|
|
1291
|
+
Ar as Head,
|
|
1292
|
+
Cr as Layout,
|
|
1293
|
+
Kr as Link,
|
|
1294
|
+
Hr as Markdown,
|
|
1295
|
+
Or as RouteGuard,
|
|
1296
|
+
kr as RouterError,
|
|
1297
|
+
Nr as ServerError,
|
|
1298
|
+
zr as Spinner,
|
|
1299
|
+
Rr as StatusPage,
|
|
1300
|
+
Qr as Zudoku,
|
|
1301
|
+
qr as useAuth,
|
|
1302
|
+
Ir as useCache,
|
|
1303
|
+
Sr as useMDXComponents,
|
|
1304
|
+
Er as useZudoku
|
|
1304
1305
|
};
|
|
1305
1306
|
//# sourceMappingURL=zudoku.components.js.map
|