zudoku 0.3.0-dev.34 → 0.3.0-dev.35
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.client.js +2 -1
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +10 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +1 -2
- package/dist/app/main.js.map +1 -1
- package/dist/lib/components/DevPortal.js +9 -3
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/index.d.ts +3 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/vite/config.js +1 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -1
- package/dist/vite/plugin-component.js.map +1 -1
- package/lib/AnchorLink-DCzimaMt.js +704 -0
- package/lib/AnchorLink-DCzimaMt.js.map +1 -0
- package/lib/{DevPortalProvider-BlxLX6GG.js → DevPortalProvider-Demv4Ngx.js} +250 -230
- package/lib/DevPortalProvider-Demv4Ngx.js.map +1 -0
- package/lib/{Markdown-CL8KPvJN.js → Markdown-kde-UTpz.js} +3 -3
- package/lib/{Markdown-CL8KPvJN.js.map → Markdown-kde-UTpz.js.map} +1 -1
- package/lib/{MdxComponents-Ev_hBHb2.js → MdxComponents-BZ-Y_6jI.js} +8 -8
- package/lib/{MdxComponents-Ev_hBHb2.js.map → MdxComponents-BZ-Y_6jI.js.map} +1 -1
- package/lib/{MdxPage-BRKQDcVW.js → MdxPage-CGTgSCJL.js} +108 -113
- package/lib/MdxPage-CGTgSCJL.js.map +1 -0
- package/lib/{OperationList-DfkWNe8Y.js → OperationList-BDAtLdf9.js} +1693 -1862
- package/lib/OperationList-BDAtLdf9.js.map +1 -0
- package/lib/{Route-Bf1_D_vC.js → Route-BqfQoDR2.js} +2 -2
- package/lib/{Route-Bf1_D_vC.js.map → Route-BqfQoDR2.js.map} +1 -1
- package/lib/Select-DIOQWPp3.js +4571 -0
- package/lib/Select-DIOQWPp3.js.map +1 -0
- package/lib/Spinner-B9MAj2Pw.js +182 -0
- package/lib/Spinner-B9MAj2Pw.js.map +1 -0
- package/lib/{hook-CTmJ6CWq.js → hook-D1DiFbcT.js} +3 -3
- package/lib/{hook-CTmJ6CWq.js.map → hook-D1DiFbcT.js.map} +1 -1
- package/lib/index-BB2EBBgh.js +412 -0
- package/lib/index-BB2EBBgh.js.map +1 -0
- package/lib/{index-BjSy8IQO.js → index-CdZQPXUQ.js} +6 -6
- package/lib/{index-BjSy8IQO.js.map → index-CdZQPXUQ.js.map} +1 -1
- package/lib/{jsx-runtime-CM0TzjGp.js → jsx-runtime-Bt86M5tA.js} +5 -5
- package/lib/{jsx-runtime-CM0TzjGp.js.map → jsx-runtime-Bt86M5tA.js.map} +1 -1
- package/lib/util-CYBrkBUo.js +41 -0
- package/lib/util-CYBrkBUo.js.map +1 -0
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.components.js +563 -286
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +99 -111
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +46 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/package.json +2 -1
- package/src/app/entry.client.tsx +4 -1
- package/src/app/entry.server.tsx +17 -2
- package/src/app/main.tsx +1 -2
- package/src/lib/components/DevPortal.tsx +15 -1
- package/src/lib/components/Layout.tsx +9 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +6 -0
- package/lib/DevPortalProvider-BlxLX6GG.js.map +0 -1
- package/lib/MdxPage-BRKQDcVW.js.map +0 -1
- package/lib/OperationList-DfkWNe8Y.js.map +0 -1
- package/lib/Select-DSa3bN4t.js +0 -4770
- package/lib/Select-DSa3bN4t.js.map +0 -1
- package/lib/index-Brq2ztwd.js +0 -74
- package/lib/index-Brq2ztwd.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/mutation-91kw0lHb.js +0 -208
- package/lib/mutation-91kw0lHb.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -1,33 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Se = Object.defineProperty;
|
|
2
|
+
var ae = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
set _(
|
|
10
|
-
|
|
5
|
+
var qe = (t, e, s) => e in t ? Se(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
+
var v = (t, e, s) => qe(t, typeof e != "symbol" ? e + "" : e, s), ne = (t, e, s) => e.has(t) || ae("Cannot " + s);
|
|
7
|
+
var i = (t, e, s) => (ne(t, e, "read from private field"), s ? s.call(t) : e.get(t)), y = (t, e, s) => e.has(t) ? ae("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), d = (t, e, s, a) => (ne(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
|
|
8
|
+
var F = (t, e, s, a) => ({
|
|
9
|
+
set _(n) {
|
|
10
|
+
d(t, e, n, s);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return i(t, e, a);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { c as
|
|
17
|
-
import { j as
|
|
18
|
-
import { S as
|
|
19
|
-
import { createContext as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
16
|
+
import { c as R, N as U, a as Ie, u as Fe, M as He, T as Le, V as Re, b as X, d as T, e as Be, C as Ke, L as ze } from "./MdxComponents-BZ-Y_6jI.js";
|
|
17
|
+
import { j as r, u as D, O as Ve } from "./jsx-runtime-Bt86M5tA.js";
|
|
18
|
+
import { S as ge, h as ve, Q as Ue, n as m, m as re, a as ie, b as j, e as We, c as Xe, d as _e, f as Ge, o as oe, r as le, g as Je, i as ce, p as ue, s as Ye, u as _, j as Ze, D as $e, k as et, l as tt } from "./DevPortalProvider-Demv4Ngx.js";
|
|
19
|
+
import { createContext as ye, Component as st, createElement as he, isValidElement as at, memo as xe, useMemo as z, useEffect as q, Fragment as nt, useRef as B, useState as rt, forwardRef as it, Suspense as ot } from "react";
|
|
20
|
+
import { H as be, M as lt, A as ct, u as ut } from "./AnchorLink-DCzimaMt.js";
|
|
21
|
+
import { c as ht } from "./state-Ds_OxRHP.js";
|
|
22
|
+
import { M as dt } from "./index-BB2EBBgh.js";
|
|
23
|
+
import { E as ft, u as pt } from "./hook-D1DiFbcT.js";
|
|
24
|
+
import { R as je, T as Pe, C as we, S as mt } from "./Spinner-B9MAj2Pw.js";
|
|
25
|
+
import { c as G, i as W, j as Ce, a as gt } from "./util-CYBrkBUo.js";
|
|
24
26
|
/**
|
|
25
27
|
* @license lucide-react v0.378.0 - ISC
|
|
26
28
|
*
|
|
27
29
|
* This source code is licensed under the ISC license.
|
|
28
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
31
|
*/
|
|
30
|
-
const
|
|
32
|
+
const Ne = R("ChevronRight", [
|
|
33
|
+
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
34
|
+
]);
|
|
35
|
+
/**
|
|
36
|
+
* @license lucide-react v0.378.0 - ISC
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the ISC license.
|
|
39
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/
|
|
41
|
+
const vt = R("ExternalLink", [
|
|
42
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
43
|
+
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
44
|
+
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
45
|
+
]);
|
|
46
|
+
/**
|
|
47
|
+
* @license lucide-react v0.378.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/
|
|
52
|
+
const yt = R("MoonStar", [
|
|
31
53
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
32
54
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
33
55
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -38,7 +60,7 @@ const Ue = ae("MoonStar", [
|
|
|
38
60
|
* This source code is licensed under the ISC license.
|
|
39
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
62
|
*/
|
|
41
|
-
const
|
|
63
|
+
const xt = R("Sun", [
|
|
42
64
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
43
65
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
44
66
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -49,138 +71,138 @@ const Ve = ae("Sun", [
|
|
|
49
71
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
50
72
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
51
73
|
]);
|
|
52
|
-
var
|
|
74
|
+
var b, fe, bt = (fe = class extends ge {
|
|
53
75
|
constructor(e = {}) {
|
|
54
76
|
super();
|
|
55
|
-
|
|
56
|
-
this.config = e,
|
|
77
|
+
y(this, b);
|
|
78
|
+
this.config = e, d(this, b, /* @__PURE__ */ new Map());
|
|
57
79
|
}
|
|
58
|
-
build(e, s,
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
return
|
|
80
|
+
build(e, s, a) {
|
|
81
|
+
const n = s.queryKey, o = s.queryHash ?? ve(n, s);
|
|
82
|
+
let l = this.get(o);
|
|
83
|
+
return l || (l = new Ue({
|
|
62
84
|
cache: this,
|
|
63
|
-
queryKey:
|
|
85
|
+
queryKey: n,
|
|
64
86
|
queryHash: o,
|
|
65
87
|
options: e.defaultQueryOptions(s),
|
|
66
|
-
state:
|
|
67
|
-
defaultOptions: e.getQueryDefaults(
|
|
68
|
-
}), this.add(
|
|
88
|
+
state: a,
|
|
89
|
+
defaultOptions: e.getQueryDefaults(n)
|
|
90
|
+
}), this.add(l)), l;
|
|
69
91
|
}
|
|
70
92
|
add(e) {
|
|
71
|
-
|
|
93
|
+
i(this, b).has(e.queryHash) || (i(this, b).set(e.queryHash, e), this.notify({
|
|
72
94
|
type: "added",
|
|
73
95
|
query: e
|
|
74
96
|
}));
|
|
75
97
|
}
|
|
76
98
|
remove(e) {
|
|
77
|
-
const s =
|
|
78
|
-
s && (e.destroy(), s === e &&
|
|
99
|
+
const s = i(this, b).get(e.queryHash);
|
|
100
|
+
s && (e.destroy(), s === e && i(this, b).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
79
101
|
}
|
|
80
102
|
clear() {
|
|
81
|
-
|
|
103
|
+
m.batch(() => {
|
|
82
104
|
this.getAll().forEach((e) => {
|
|
83
105
|
this.remove(e);
|
|
84
106
|
});
|
|
85
107
|
});
|
|
86
108
|
}
|
|
87
109
|
get(e) {
|
|
88
|
-
return
|
|
110
|
+
return i(this, b).get(e);
|
|
89
111
|
}
|
|
90
112
|
getAll() {
|
|
91
|
-
return [...
|
|
113
|
+
return [...i(this, b).values()];
|
|
92
114
|
}
|
|
93
115
|
find(e) {
|
|
94
116
|
const s = { exact: !0, ...e };
|
|
95
117
|
return this.getAll().find(
|
|
96
|
-
(
|
|
118
|
+
(a) => re(s, a)
|
|
97
119
|
);
|
|
98
120
|
}
|
|
99
121
|
findAll(e = {}) {
|
|
100
122
|
const s = this.getAll();
|
|
101
|
-
return Object.keys(e).length > 0 ? s.filter((
|
|
123
|
+
return Object.keys(e).length > 0 ? s.filter((a) => re(e, a)) : s;
|
|
102
124
|
}
|
|
103
125
|
notify(e) {
|
|
104
|
-
|
|
126
|
+
m.batch(() => {
|
|
105
127
|
this.listeners.forEach((s) => {
|
|
106
128
|
s(e);
|
|
107
129
|
});
|
|
108
130
|
});
|
|
109
131
|
}
|
|
110
132
|
onFocus() {
|
|
111
|
-
|
|
133
|
+
m.batch(() => {
|
|
112
134
|
this.getAll().forEach((e) => {
|
|
113
135
|
e.onFocus();
|
|
114
136
|
});
|
|
115
137
|
});
|
|
116
138
|
}
|
|
117
139
|
onOnline() {
|
|
118
|
-
|
|
140
|
+
m.batch(() => {
|
|
119
141
|
this.getAll().forEach((e) => {
|
|
120
142
|
e.onOnline();
|
|
121
143
|
});
|
|
122
144
|
});
|
|
123
145
|
}
|
|
124
|
-
},
|
|
146
|
+
}, b = new WeakMap(), fe), p, S, pe, jt = (pe = class extends ge {
|
|
125
147
|
constructor(e = {}) {
|
|
126
148
|
super();
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
this.config = e,
|
|
149
|
+
y(this, p);
|
|
150
|
+
y(this, S);
|
|
151
|
+
this.config = e, d(this, p, /* @__PURE__ */ new Map()), d(this, S, Date.now());
|
|
130
152
|
}
|
|
131
|
-
build(e, s,
|
|
132
|
-
const
|
|
153
|
+
build(e, s, a) {
|
|
154
|
+
const n = new dt({
|
|
133
155
|
mutationCache: this,
|
|
134
|
-
mutationId: ++
|
|
156
|
+
mutationId: ++F(this, S)._,
|
|
135
157
|
options: e.defaultMutationOptions(s),
|
|
136
|
-
state:
|
|
158
|
+
state: a
|
|
137
159
|
});
|
|
138
|
-
return this.add(
|
|
160
|
+
return this.add(n), n;
|
|
139
161
|
}
|
|
140
162
|
add(e) {
|
|
141
|
-
const s =
|
|
142
|
-
|
|
163
|
+
const s = H(e), a = i(this, p).get(s) ?? [];
|
|
164
|
+
a.push(e), i(this, p).set(s, a), this.notify({ type: "added", mutation: e });
|
|
143
165
|
}
|
|
144
166
|
remove(e) {
|
|
145
|
-
var
|
|
146
|
-
const s =
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
|
|
167
|
+
var a;
|
|
168
|
+
const s = H(e);
|
|
169
|
+
if (i(this, p).has(s)) {
|
|
170
|
+
const n = (a = i(this, p).get(s)) == null ? void 0 : a.filter((o) => o !== e);
|
|
171
|
+
n && (n.length === 0 ? i(this, p).delete(s) : i(this, p).set(s, n));
|
|
150
172
|
}
|
|
151
173
|
this.notify({ type: "removed", mutation: e });
|
|
152
174
|
}
|
|
153
175
|
canRun(e) {
|
|
154
|
-
var
|
|
155
|
-
const s = (
|
|
176
|
+
var a;
|
|
177
|
+
const s = (a = i(this, p).get(H(e))) == null ? void 0 : a.find((n) => n.state.status === "pending");
|
|
156
178
|
return !s || s === e;
|
|
157
179
|
}
|
|
158
180
|
runNext(e) {
|
|
159
|
-
var
|
|
160
|
-
const s = (
|
|
181
|
+
var a;
|
|
182
|
+
const s = (a = i(this, p).get(H(e))) == null ? void 0 : a.find((n) => n !== e && n.state.isPaused);
|
|
161
183
|
return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
|
|
162
184
|
}
|
|
163
185
|
clear() {
|
|
164
|
-
|
|
186
|
+
m.batch(() => {
|
|
165
187
|
this.getAll().forEach((e) => {
|
|
166
188
|
this.remove(e);
|
|
167
189
|
});
|
|
168
190
|
});
|
|
169
191
|
}
|
|
170
192
|
getAll() {
|
|
171
|
-
return [...
|
|
193
|
+
return [...i(this, p).values()].flat();
|
|
172
194
|
}
|
|
173
195
|
find(e) {
|
|
174
196
|
const s = { exact: !0, ...e };
|
|
175
197
|
return this.getAll().find(
|
|
176
|
-
(
|
|
198
|
+
(a) => ie(s, a)
|
|
177
199
|
);
|
|
178
200
|
}
|
|
179
201
|
findAll(e = {}) {
|
|
180
|
-
return this.getAll().filter((s) =>
|
|
202
|
+
return this.getAll().filter((s) => ie(e, s));
|
|
181
203
|
}
|
|
182
204
|
notify(e) {
|
|
183
|
-
|
|
205
|
+
m.batch(() => {
|
|
184
206
|
this.listeners.forEach((s) => {
|
|
185
207
|
s(e);
|
|
186
208
|
});
|
|
@@ -188,76 +210,76 @@ var p, te, Xe = (te = class extends ne {
|
|
|
188
210
|
}
|
|
189
211
|
resumePausedMutations() {
|
|
190
212
|
const e = this.getAll().filter((s) => s.state.isPaused);
|
|
191
|
-
return
|
|
213
|
+
return m.batch(
|
|
192
214
|
() => Promise.all(
|
|
193
|
-
e.map((s) => s.continue().catch(
|
|
215
|
+
e.map((s) => s.continue().catch(j))
|
|
194
216
|
)
|
|
195
217
|
);
|
|
196
218
|
}
|
|
197
|
-
},
|
|
198
|
-
function
|
|
219
|
+
}, p = new WeakMap(), S = new WeakMap(), pe);
|
|
220
|
+
function H(t) {
|
|
199
221
|
var e;
|
|
200
222
|
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
201
223
|
}
|
|
202
|
-
function
|
|
224
|
+
function Pt(t) {
|
|
203
225
|
return {
|
|
204
226
|
onFetch: (e, s) => {
|
|
205
|
-
const
|
|
206
|
-
var
|
|
207
|
-
const
|
|
208
|
-
let
|
|
209
|
-
const
|
|
210
|
-
Object.defineProperty(
|
|
227
|
+
const a = async () => {
|
|
228
|
+
var J, Y, Z, $, ee;
|
|
229
|
+
const n = e.options, o = (Z = (Y = (J = e.fetchOptions) == null ? void 0 : J.meta) == null ? void 0 : Y.fetchMore) == null ? void 0 : Z.direction, l = (($ = e.state.data) == null ? void 0 : $.pages) || [], c = ((ee = e.state.data) == null ? void 0 : ee.pageParams) || [], h = { pages: [], pageParams: [] };
|
|
230
|
+
let g = !1;
|
|
231
|
+
const f = (x) => {
|
|
232
|
+
Object.defineProperty(x, "signal", {
|
|
211
233
|
enumerable: !0,
|
|
212
|
-
get: () => (e.signal.aborted ?
|
|
213
|
-
|
|
234
|
+
get: () => (e.signal.aborted ? g = !0 : e.signal.addEventListener("abort", () => {
|
|
235
|
+
g = !0;
|
|
214
236
|
}), e.signal)
|
|
215
237
|
});
|
|
216
|
-
},
|
|
217
|
-
if (
|
|
238
|
+
}, De = We(e.options, e.fetchOptions), K = async (x, P, k) => {
|
|
239
|
+
if (g)
|
|
218
240
|
return Promise.reject();
|
|
219
|
-
if (P == null &&
|
|
220
|
-
return Promise.resolve(
|
|
221
|
-
const
|
|
241
|
+
if (P == null && x.pages.length)
|
|
242
|
+
return Promise.resolve(x);
|
|
243
|
+
const I = {
|
|
222
244
|
queryKey: e.queryKey,
|
|
223
245
|
pageParam: P,
|
|
224
|
-
direction:
|
|
246
|
+
direction: k ? "backward" : "forward",
|
|
225
247
|
meta: e.options.meta
|
|
226
248
|
};
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
), { maxPages:
|
|
249
|
+
f(I);
|
|
250
|
+
const Te = await De(
|
|
251
|
+
I
|
|
252
|
+
), { maxPages: te } = e.options, se = k ? Xe : _e;
|
|
231
253
|
return {
|
|
232
|
-
pages:
|
|
233
|
-
pageParams:
|
|
254
|
+
pages: se(x.pages, Te, te),
|
|
255
|
+
pageParams: se(x.pageParams, P, te)
|
|
234
256
|
};
|
|
235
257
|
};
|
|
236
|
-
let
|
|
237
|
-
if (o &&
|
|
238
|
-
const
|
|
239
|
-
pages:
|
|
240
|
-
pageParams:
|
|
241
|
-
},
|
|
242
|
-
|
|
258
|
+
let O;
|
|
259
|
+
if (o && l.length) {
|
|
260
|
+
const x = o === "backward", P = x ? wt : de, k = {
|
|
261
|
+
pages: l,
|
|
262
|
+
pageParams: c
|
|
263
|
+
}, I = P(n, k);
|
|
264
|
+
O = await K(k, I, x);
|
|
243
265
|
} else {
|
|
244
|
-
|
|
266
|
+
O = await K(
|
|
245
267
|
h,
|
|
246
|
-
|
|
268
|
+
c[0] ?? n.initialPageParam
|
|
247
269
|
);
|
|
248
|
-
const
|
|
249
|
-
for (let P = 1; P <
|
|
250
|
-
const
|
|
251
|
-
|
|
270
|
+
const x = t ?? l.length;
|
|
271
|
+
for (let P = 1; P < x; P++) {
|
|
272
|
+
const k = de(n, O);
|
|
273
|
+
O = await K(O, k);
|
|
252
274
|
}
|
|
253
275
|
}
|
|
254
|
-
return
|
|
276
|
+
return O;
|
|
255
277
|
};
|
|
256
278
|
e.options.persister ? e.fetchFn = () => {
|
|
257
|
-
var
|
|
258
|
-
return (o = (
|
|
279
|
+
var n, o;
|
|
280
|
+
return (o = (n = e.options).persister) == null ? void 0 : o.call(
|
|
281
|
+
n,
|
|
259
282
|
a,
|
|
260
|
-
r,
|
|
261
283
|
{
|
|
262
284
|
queryKey: e.queryKey,
|
|
263
285
|
meta: e.options.meta,
|
|
@@ -265,22 +287,22 @@ function Je(t) {
|
|
|
265
287
|
},
|
|
266
288
|
s
|
|
267
289
|
);
|
|
268
|
-
} : e.fetchFn =
|
|
290
|
+
} : e.fetchFn = a;
|
|
269
291
|
}
|
|
270
292
|
};
|
|
271
293
|
}
|
|
272
|
-
function
|
|
273
|
-
const
|
|
294
|
+
function de(t, { pages: e, pageParams: s }) {
|
|
295
|
+
const a = e.length - 1;
|
|
274
296
|
return t.getNextPageParam(
|
|
275
|
-
e[
|
|
297
|
+
e[a],
|
|
276
298
|
e,
|
|
277
|
-
s[
|
|
299
|
+
s[a],
|
|
278
300
|
s
|
|
279
301
|
);
|
|
280
302
|
}
|
|
281
|
-
function
|
|
282
|
-
var
|
|
283
|
-
return (
|
|
303
|
+
function wt(t, { pages: e, pageParams: s }) {
|
|
304
|
+
var a;
|
|
305
|
+
return (a = t.getPreviousPageParam) == null ? void 0 : a.call(
|
|
284
306
|
t,
|
|
285
307
|
e[0],
|
|
286
308
|
e,
|
|
@@ -288,102 +310,102 @@ function We(t, { pages: e, pageParams: s }) {
|
|
|
288
310
|
s
|
|
289
311
|
);
|
|
290
312
|
}
|
|
291
|
-
var
|
|
313
|
+
var u, w, C, M, A, N, Q, E, me, Ct = (me = class {
|
|
292
314
|
constructor(t = {}) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
315
|
+
y(this, u);
|
|
316
|
+
y(this, w);
|
|
317
|
+
y(this, C);
|
|
318
|
+
y(this, M);
|
|
319
|
+
y(this, A);
|
|
320
|
+
y(this, N);
|
|
321
|
+
y(this, Q);
|
|
322
|
+
y(this, E);
|
|
323
|
+
d(this, u, t.queryCache || new bt()), d(this, w, t.mutationCache || new jt()), d(this, C, t.defaultOptions || {}), d(this, M, /* @__PURE__ */ new Map()), d(this, A, /* @__PURE__ */ new Map()), d(this, N, 0);
|
|
302
324
|
}
|
|
303
325
|
mount() {
|
|
304
|
-
|
|
305
|
-
t && (await this.resumePausedMutations(),
|
|
306
|
-
})),
|
|
307
|
-
t && (await this.resumePausedMutations(),
|
|
326
|
+
F(this, N)._++, i(this, N) === 1 && (d(this, Q, Ge.subscribe(async (t) => {
|
|
327
|
+
t && (await this.resumePausedMutations(), i(this, u).onFocus());
|
|
328
|
+
})), d(this, E, oe.subscribe(async (t) => {
|
|
329
|
+
t && (await this.resumePausedMutations(), i(this, u).onOnline());
|
|
308
330
|
})));
|
|
309
331
|
}
|
|
310
332
|
unmount() {
|
|
311
333
|
var t, e;
|
|
312
|
-
|
|
334
|
+
F(this, N)._--, i(this, N) === 0 && ((t = i(this, Q)) == null || t.call(this), d(this, Q, void 0), (e = i(this, E)) == null || e.call(this), d(this, E, void 0));
|
|
313
335
|
}
|
|
314
336
|
isFetching(t) {
|
|
315
|
-
return
|
|
337
|
+
return i(this, u).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
316
338
|
}
|
|
317
339
|
isMutating(t) {
|
|
318
|
-
return
|
|
340
|
+
return i(this, w).findAll({ ...t, status: "pending" }).length;
|
|
319
341
|
}
|
|
320
342
|
getQueryData(t) {
|
|
321
343
|
var s;
|
|
322
344
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
323
|
-
return (s =
|
|
345
|
+
return (s = i(this, u).get(e.queryHash)) == null ? void 0 : s.state.data;
|
|
324
346
|
}
|
|
325
347
|
ensureQueryData(t) {
|
|
326
348
|
const e = this.getQueryData(t.queryKey);
|
|
327
349
|
if (e === void 0)
|
|
328
350
|
return this.fetchQuery(t);
|
|
329
351
|
{
|
|
330
|
-
const s = this.defaultQueryOptions(t),
|
|
331
|
-
return t.revalidateIfStale &&
|
|
352
|
+
const s = this.defaultQueryOptions(t), a = i(this, u).build(this, s);
|
|
353
|
+
return t.revalidateIfStale && a.isStaleByTime(le(s.staleTime, a)) && this.prefetchQuery(s), Promise.resolve(e);
|
|
332
354
|
}
|
|
333
355
|
}
|
|
334
356
|
getQueriesData(t) {
|
|
335
|
-
return
|
|
336
|
-
const
|
|
337
|
-
return [e,
|
|
357
|
+
return i(this, u).findAll(t).map(({ queryKey: e, state: s }) => {
|
|
358
|
+
const a = s.data;
|
|
359
|
+
return [e, a];
|
|
338
360
|
});
|
|
339
361
|
}
|
|
340
362
|
setQueryData(t, e, s) {
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
), o =
|
|
344
|
-
if (
|
|
345
|
-
return
|
|
363
|
+
const a = this.defaultQueryOptions({ queryKey: t }), n = i(this, u).get(
|
|
364
|
+
a.queryHash
|
|
365
|
+
), o = n == null ? void 0 : n.state.data, l = Je(e, o);
|
|
366
|
+
if (l !== void 0)
|
|
367
|
+
return i(this, u).build(this, a).setData(l, { ...s, manual: !0 });
|
|
346
368
|
}
|
|
347
369
|
setQueriesData(t, e, s) {
|
|
348
|
-
return
|
|
349
|
-
() =>
|
|
350
|
-
|
|
351
|
-
this.setQueryData(
|
|
370
|
+
return m.batch(
|
|
371
|
+
() => i(this, u).findAll(t).map(({ queryKey: a }) => [
|
|
372
|
+
a,
|
|
373
|
+
this.setQueryData(a, e, s)
|
|
352
374
|
])
|
|
353
375
|
);
|
|
354
376
|
}
|
|
355
377
|
getQueryState(t) {
|
|
356
378
|
var s;
|
|
357
379
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
358
|
-
return (s =
|
|
380
|
+
return (s = i(this, u).get(e.queryHash)) == null ? void 0 : s.state;
|
|
359
381
|
}
|
|
360
382
|
removeQueries(t) {
|
|
361
|
-
const e =
|
|
362
|
-
|
|
383
|
+
const e = i(this, u);
|
|
384
|
+
m.batch(() => {
|
|
363
385
|
e.findAll(t).forEach((s) => {
|
|
364
386
|
e.remove(s);
|
|
365
387
|
});
|
|
366
388
|
});
|
|
367
389
|
}
|
|
368
390
|
resetQueries(t, e) {
|
|
369
|
-
const s =
|
|
391
|
+
const s = i(this, u), a = {
|
|
370
392
|
type: "active",
|
|
371
393
|
...t
|
|
372
394
|
};
|
|
373
|
-
return
|
|
374
|
-
|
|
375
|
-
}), this.refetchQueries(
|
|
395
|
+
return m.batch(() => (s.findAll(t).forEach((n) => {
|
|
396
|
+
n.reset();
|
|
397
|
+
}), this.refetchQueries(a, e)));
|
|
376
398
|
}
|
|
377
399
|
cancelQueries(t = {}, e = {}) {
|
|
378
|
-
const s = { revert: !0, ...e },
|
|
379
|
-
() =>
|
|
400
|
+
const s = { revert: !0, ...e }, a = m.batch(
|
|
401
|
+
() => i(this, u).findAll(t).map((n) => n.cancel(s))
|
|
380
402
|
);
|
|
381
|
-
return Promise.all(
|
|
403
|
+
return Promise.all(a).then(j).catch(j);
|
|
382
404
|
}
|
|
383
405
|
invalidateQueries(t = {}, e = {}) {
|
|
384
|
-
return
|
|
385
|
-
if (
|
|
386
|
-
|
|
406
|
+
return m.batch(() => {
|
|
407
|
+
if (i(this, u).findAll(t).forEach((a) => {
|
|
408
|
+
a.invalidate();
|
|
387
409
|
}), t.refetchType === "none")
|
|
388
410
|
return Promise.resolve();
|
|
389
411
|
const s = {
|
|
@@ -397,105 +419,105 @@ var l, x, M, O, E, C, k, D, re, Ye = (re = class {
|
|
|
397
419
|
const s = {
|
|
398
420
|
...e,
|
|
399
421
|
cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
|
|
400
|
-
},
|
|
401
|
-
() =>
|
|
402
|
-
let o =
|
|
403
|
-
return s.throwOnError || (o = o.catch(
|
|
422
|
+
}, a = m.batch(
|
|
423
|
+
() => i(this, u).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
|
|
424
|
+
let o = n.fetch(void 0, s);
|
|
425
|
+
return s.throwOnError || (o = o.catch(j)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
|
|
404
426
|
})
|
|
405
427
|
);
|
|
406
|
-
return Promise.all(
|
|
428
|
+
return Promise.all(a).then(j);
|
|
407
429
|
}
|
|
408
430
|
fetchQuery(t) {
|
|
409
431
|
const e = this.defaultQueryOptions(t);
|
|
410
432
|
e.retry === void 0 && (e.retry = !1);
|
|
411
|
-
const s =
|
|
433
|
+
const s = i(this, u).build(this, e);
|
|
412
434
|
return s.isStaleByTime(
|
|
413
|
-
|
|
435
|
+
le(e.staleTime, s)
|
|
414
436
|
) ? s.fetch(e) : Promise.resolve(s.state.data);
|
|
415
437
|
}
|
|
416
438
|
prefetchQuery(t) {
|
|
417
|
-
return this.fetchQuery(t).then(
|
|
439
|
+
return this.fetchQuery(t).then(j).catch(j);
|
|
418
440
|
}
|
|
419
441
|
fetchInfiniteQuery(t) {
|
|
420
|
-
return t.behavior =
|
|
442
|
+
return t.behavior = Pt(t.pages), this.fetchQuery(t);
|
|
421
443
|
}
|
|
422
444
|
prefetchInfiniteQuery(t) {
|
|
423
|
-
return this.fetchInfiniteQuery(t).then(
|
|
445
|
+
return this.fetchInfiniteQuery(t).then(j).catch(j);
|
|
424
446
|
}
|
|
425
447
|
resumePausedMutations() {
|
|
426
|
-
return
|
|
448
|
+
return oe.isOnline() ? i(this, w).resumePausedMutations() : Promise.resolve();
|
|
427
449
|
}
|
|
428
450
|
getQueryCache() {
|
|
429
|
-
return
|
|
451
|
+
return i(this, u);
|
|
430
452
|
}
|
|
431
453
|
getMutationCache() {
|
|
432
|
-
return
|
|
454
|
+
return i(this, w);
|
|
433
455
|
}
|
|
434
456
|
getDefaultOptions() {
|
|
435
|
-
return
|
|
457
|
+
return i(this, C);
|
|
436
458
|
}
|
|
437
459
|
setDefaultOptions(t) {
|
|
438
|
-
|
|
460
|
+
d(this, C, t);
|
|
439
461
|
}
|
|
440
462
|
setQueryDefaults(t, e) {
|
|
441
|
-
|
|
463
|
+
i(this, M).set(ce(t), {
|
|
442
464
|
queryKey: t,
|
|
443
465
|
defaultOptions: e
|
|
444
466
|
});
|
|
445
467
|
}
|
|
446
468
|
getQueryDefaults(t) {
|
|
447
|
-
const e = [...
|
|
469
|
+
const e = [...i(this, M).values()];
|
|
448
470
|
let s = {};
|
|
449
|
-
return e.forEach((
|
|
450
|
-
|
|
471
|
+
return e.forEach((a) => {
|
|
472
|
+
ue(t, a.queryKey) && (s = { ...s, ...a.defaultOptions });
|
|
451
473
|
}), s;
|
|
452
474
|
}
|
|
453
475
|
setMutationDefaults(t, e) {
|
|
454
|
-
|
|
476
|
+
i(this, A).set(ce(t), {
|
|
455
477
|
mutationKey: t,
|
|
456
478
|
defaultOptions: e
|
|
457
479
|
});
|
|
458
480
|
}
|
|
459
481
|
getMutationDefaults(t) {
|
|
460
|
-
const e = [...
|
|
482
|
+
const e = [...i(this, A).values()];
|
|
461
483
|
let s = {};
|
|
462
|
-
return e.forEach((
|
|
463
|
-
|
|
484
|
+
return e.forEach((a) => {
|
|
485
|
+
ue(t, a.mutationKey) && (s = { ...s, ...a.defaultOptions });
|
|
464
486
|
}), s;
|
|
465
487
|
}
|
|
466
488
|
defaultQueryOptions(t) {
|
|
467
489
|
if (t._defaulted)
|
|
468
490
|
return t;
|
|
469
491
|
const e = {
|
|
470
|
-
...
|
|
492
|
+
...i(this, C).queries,
|
|
471
493
|
...this.getQueryDefaults(t.queryKey),
|
|
472
494
|
...t,
|
|
473
495
|
_defaulted: !0
|
|
474
496
|
};
|
|
475
|
-
return e.queryHash || (e.queryHash =
|
|
497
|
+
return e.queryHash || (e.queryHash = ve(
|
|
476
498
|
e.queryKey,
|
|
477
499
|
e
|
|
478
|
-
)), 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 ===
|
|
500
|
+
)), 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 === Ye && (e.enabled = !1), e;
|
|
479
501
|
}
|
|
480
502
|
defaultMutationOptions(t) {
|
|
481
503
|
return t != null && t._defaulted ? t : {
|
|
482
|
-
...
|
|
504
|
+
...i(this, C).mutations,
|
|
483
505
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
484
506
|
...t,
|
|
485
507
|
_defaulted: !0
|
|
486
508
|
};
|
|
487
509
|
}
|
|
488
510
|
clear() {
|
|
489
|
-
|
|
511
|
+
i(this, u).clear(), i(this, w).clear();
|
|
490
512
|
}
|
|
491
|
-
},
|
|
492
|
-
const
|
|
513
|
+
}, u = new WeakMap(), w = new WeakMap(), C = new WeakMap(), M = new WeakMap(), A = new WeakMap(), N = new WeakMap(), Q = new WeakMap(), E = new WeakMap(), me);
|
|
514
|
+
const Nt = ye(null), V = {
|
|
493
515
|
didCatch: !1,
|
|
494
516
|
error: null
|
|
495
517
|
};
|
|
496
|
-
class
|
|
518
|
+
class kt extends st {
|
|
497
519
|
constructor(e) {
|
|
498
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
520
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = V;
|
|
499
521
|
}
|
|
500
522
|
static getDerivedStateFromError(e) {
|
|
501
523
|
return {
|
|
@@ -508,104 +530,104 @@ class $e extends Te {
|
|
|
508
530
|
error: e
|
|
509
531
|
} = this.state;
|
|
510
532
|
if (e !== null) {
|
|
511
|
-
for (var s,
|
|
512
|
-
o[
|
|
513
|
-
(s = (
|
|
533
|
+
for (var s, a, n = arguments.length, o = new Array(n), l = 0; l < n; l++)
|
|
534
|
+
o[l] = arguments[l];
|
|
535
|
+
(s = (a = this.props).onReset) === null || s === void 0 || s.call(a, {
|
|
514
536
|
args: o,
|
|
515
537
|
reason: "imperative-api"
|
|
516
|
-
}), this.setState(
|
|
538
|
+
}), this.setState(V);
|
|
517
539
|
}
|
|
518
540
|
}
|
|
519
541
|
componentDidCatch(e, s) {
|
|
520
|
-
var
|
|
521
|
-
(
|
|
542
|
+
var a, n;
|
|
543
|
+
(a = (n = this.props).onError) === null || a === void 0 || a.call(n, e, s);
|
|
522
544
|
}
|
|
523
545
|
componentDidUpdate(e, s) {
|
|
524
546
|
const {
|
|
525
|
-
didCatch:
|
|
547
|
+
didCatch: a
|
|
526
548
|
} = this.state, {
|
|
527
|
-
resetKeys:
|
|
549
|
+
resetKeys: n
|
|
528
550
|
} = this.props;
|
|
529
|
-
if (
|
|
530
|
-
var o,
|
|
531
|
-
(o = (
|
|
532
|
-
next:
|
|
551
|
+
if (a && s.error !== null && Ot(e.resetKeys, n)) {
|
|
552
|
+
var o, l;
|
|
553
|
+
(o = (l = this.props).onReset) === null || o === void 0 || o.call(l, {
|
|
554
|
+
next: n,
|
|
533
555
|
prev: e.resetKeys,
|
|
534
556
|
reason: "keys"
|
|
535
|
-
}), this.setState(
|
|
557
|
+
}), this.setState(V);
|
|
536
558
|
}
|
|
537
559
|
}
|
|
538
560
|
render() {
|
|
539
561
|
const {
|
|
540
562
|
children: e,
|
|
541
563
|
fallbackRender: s,
|
|
542
|
-
FallbackComponent:
|
|
543
|
-
fallback:
|
|
564
|
+
FallbackComponent: a,
|
|
565
|
+
fallback: n
|
|
544
566
|
} = this.props, {
|
|
545
567
|
didCatch: o,
|
|
546
|
-
error:
|
|
568
|
+
error: l
|
|
547
569
|
} = this.state;
|
|
548
|
-
let
|
|
570
|
+
let c = e;
|
|
549
571
|
if (o) {
|
|
550
572
|
const h = {
|
|
551
|
-
error:
|
|
573
|
+
error: l,
|
|
552
574
|
resetErrorBoundary: this.resetErrorBoundary
|
|
553
575
|
};
|
|
554
576
|
if (typeof s == "function")
|
|
555
|
-
|
|
556
|
-
else if (
|
|
557
|
-
|
|
558
|
-
else if (
|
|
559
|
-
|
|
577
|
+
c = s(h);
|
|
578
|
+
else if (a)
|
|
579
|
+
c = he(a, h);
|
|
580
|
+
else if (n === null || at(n))
|
|
581
|
+
c = n;
|
|
560
582
|
else
|
|
561
|
-
throw
|
|
583
|
+
throw l;
|
|
562
584
|
}
|
|
563
|
-
return
|
|
585
|
+
return he(Nt.Provider, {
|
|
564
586
|
value: {
|
|
565
587
|
didCatch: o,
|
|
566
|
-
error:
|
|
588
|
+
error: l,
|
|
567
589
|
resetErrorBoundary: this.resetErrorBoundary
|
|
568
590
|
}
|
|
569
|
-
},
|
|
591
|
+
}, c);
|
|
570
592
|
}
|
|
571
593
|
}
|
|
572
|
-
function
|
|
594
|
+
function Ot() {
|
|
573
595
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
574
|
-
return t.length !== e.length || t.some((s,
|
|
596
|
+
return t.length !== e.length || t.some((s, a) => !Object.is(s, e[a]));
|
|
575
597
|
}
|
|
576
|
-
const
|
|
577
|
-
class
|
|
598
|
+
const Mt = (t) => "getRoutes" in t && typeof t.getRoutes == "function", At = (t) => "initialize" in t && typeof t.initialize == "function", Qt = (t) => "getHead" in t && typeof t.getHead == "function", Et = (t) => "getIdentities" in t && typeof t.getIdentities == "function", ke = new Ct(), Dt = ht(() => ({}));
|
|
599
|
+
class Tt {
|
|
578
600
|
constructor(e) {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
601
|
+
v(this, "plugins", []);
|
|
602
|
+
v(this, "navigationPlugins");
|
|
603
|
+
v(this, "navigation");
|
|
604
|
+
v(this, "meta");
|
|
605
|
+
v(this, "page");
|
|
606
|
+
v(this, "authentication");
|
|
607
|
+
v(this, "state");
|
|
608
|
+
v(this, "initialize", async () => {
|
|
587
609
|
await Promise.all([
|
|
588
|
-
this.plugins.filter(
|
|
610
|
+
this.plugins.filter(At).map((e) => {
|
|
589
611
|
var s;
|
|
590
612
|
return (s = e.initialize) == null ? void 0 : s.call(e, this);
|
|
591
613
|
})
|
|
592
614
|
]);
|
|
593
615
|
});
|
|
594
|
-
|
|
595
|
-
await
|
|
616
|
+
v(this, "invalidateCache", async (e) => {
|
|
617
|
+
await ke.invalidateQueries({ queryKey: e });
|
|
596
618
|
});
|
|
597
|
-
|
|
598
|
-
this.plugins.filter(
|
|
619
|
+
v(this, "getApiIdentities", async () => (await Promise.all(
|
|
620
|
+
this.plugins.filter(Et).map((s) => s.getIdentities(this))
|
|
599
621
|
)).flat());
|
|
600
|
-
|
|
622
|
+
v(this, "getNavigation", async (e) => (await Promise.all(
|
|
601
623
|
this.navigationPlugins.map(
|
|
602
|
-
async (
|
|
603
|
-
var
|
|
604
|
-
return (
|
|
624
|
+
async (a) => {
|
|
625
|
+
var n;
|
|
626
|
+
return (n = a.getNavigation) == null ? void 0 : n.call(a, e);
|
|
605
627
|
}
|
|
606
628
|
)
|
|
607
|
-
)).flatMap((
|
|
608
|
-
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(
|
|
629
|
+
)).flatMap((a) => a ?? []));
|
|
630
|
+
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(Mt), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.state = Dt;
|
|
609
631
|
}
|
|
610
632
|
async signRequest(e) {
|
|
611
633
|
if (!this.authentication)
|
|
@@ -614,15 +636,15 @@ class at {
|
|
|
614
636
|
return e.headers.set("Authorization", `Bearer ${s}`), e;
|
|
615
637
|
}
|
|
616
638
|
}
|
|
617
|
-
function
|
|
618
|
-
return /* @__PURE__ */
|
|
639
|
+
function St({ error: t, resetErrorBoundary: e }) {
|
|
640
|
+
return /* @__PURE__ */ r.jsx(ft, { error: t });
|
|
619
641
|
}
|
|
620
|
-
const
|
|
621
|
-
const { navigation: t } =
|
|
622
|
-
return t.length <= 1 ? null : /* @__PURE__ */
|
|
623
|
-
|
|
642
|
+
const qt = () => {
|
|
643
|
+
const { navigation: t } = _();
|
|
644
|
+
return t.length <= 1 ? null : /* @__PURE__ */ r.jsx("nav", { className: "border-b border-border text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((e) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
645
|
+
U,
|
|
624
646
|
{
|
|
625
|
-
className: ({ isActive: s }) =>
|
|
647
|
+
className: ({ isActive: s }) => Ie(
|
|
626
648
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
627
649
|
s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
628
650
|
),
|
|
@@ -630,71 +652,326 @@ const it = () => {
|
|
|
630
652
|
children: e.label
|
|
631
653
|
}
|
|
632
654
|
) }, e.label)) }) });
|
|
633
|
-
},
|
|
634
|
-
const [e, s] =
|
|
635
|
-
return /* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
(h == null ? void 0 : h.logo) && /* @__PURE__ */
|
|
639
|
-
/* @__PURE__ */
|
|
655
|
+
}, Oe = xe(function() {
|
|
656
|
+
const [e, s] = Fe(), { isAuthenticated: a, profile: n, isAuthEnabled: o, login: l, logout: c } = pt(), { page: h } = _(), g = e ? yt : xt;
|
|
657
|
+
return /* @__PURE__ */ r.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
658
|
+
/* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]", children: [
|
|
659
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
660
|
+
(h == null ? void 0 : h.logo) && /* @__PURE__ */ r.jsx("img", { src: h.logo, alt: h.pageTitle, className: "h-10" }),
|
|
661
|
+
/* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: h == null ? void 0 : h.pageTitle })
|
|
640
662
|
] }),
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
/* @__PURE__ */
|
|
643
|
-
/* @__PURE__ */
|
|
644
|
-
o && /* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
664
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-full max-w-prose" }),
|
|
665
|
+
/* @__PURE__ */ r.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex", children: [
|
|
666
|
+
o && /* @__PURE__ */ r.jsx(r.Fragment, { children: a ? /* @__PURE__ */ r.jsxs(
|
|
645
667
|
"button",
|
|
646
668
|
{
|
|
647
669
|
className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded text-nowrap",
|
|
648
|
-
onClick:
|
|
670
|
+
onClick: c,
|
|
649
671
|
children: [
|
|
650
672
|
"Logout ",
|
|
651
|
-
|
|
673
|
+
n != null && n.email ? `(${n.email})` : null
|
|
652
674
|
]
|
|
653
675
|
}
|
|
654
|
-
) : /* @__PURE__ */
|
|
676
|
+
) : /* @__PURE__ */ r.jsx(
|
|
655
677
|
"button",
|
|
656
678
|
{
|
|
657
679
|
className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded",
|
|
658
|
-
onClick:
|
|
680
|
+
onClick: l,
|
|
659
681
|
children: "Login"
|
|
660
682
|
}
|
|
661
683
|
) }),
|
|
662
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ r.jsx(
|
|
663
685
|
"button",
|
|
664
686
|
{
|
|
665
687
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
666
688
|
onClick: s,
|
|
667
|
-
children: /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ r.jsx(g, { size: 18 })
|
|
668
690
|
}
|
|
669
691
|
)
|
|
670
692
|
] })
|
|
671
693
|
] })
|
|
672
694
|
] }),
|
|
673
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ r.jsx(qt, {})
|
|
674
696
|
] }) });
|
|
675
|
-
}),
|
|
676
|
-
Header:
|
|
677
|
-
},
|
|
697
|
+
}), Me = {
|
|
698
|
+
Header: Oe
|
|
699
|
+
}, It = ye(Me), Ft = It.Provider, Ht = ({
|
|
678
700
|
children: t,
|
|
679
701
|
...e
|
|
680
702
|
}) => {
|
|
681
|
-
|
|
682
|
-
|
|
703
|
+
var l;
|
|
704
|
+
const s = z(
|
|
705
|
+
() => ({ ...Me, ...e.overrides }),
|
|
683
706
|
[e.overrides]
|
|
684
|
-
),
|
|
685
|
-
() => ({ ...
|
|
707
|
+
), a = z(
|
|
708
|
+
() => ({ ...He, ...e.mdxComponents }),
|
|
686
709
|
[e.mdxComponents]
|
|
687
|
-
),
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
}, [
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
710
|
+
), n = z(() => new Tt(e), [e]);
|
|
711
|
+
q(() => {
|
|
712
|
+
n.initialize();
|
|
713
|
+
}, [n]);
|
|
714
|
+
const o = (l = e.plugins) == null ? void 0 : l.filter(Qt).map((c, h) => {
|
|
715
|
+
var g;
|
|
716
|
+
return /* @__PURE__ */ r.jsx(nt, { children: (g = c.getHead) == null ? void 0 : g.call(c) }, h);
|
|
717
|
+
});
|
|
718
|
+
return /* @__PURE__ */ r.jsxs(Ze, { client: ke, children: [
|
|
719
|
+
/* @__PURE__ */ r.jsx(be, { children: o }),
|
|
720
|
+
/* @__PURE__ */ r.jsx($e, { value: n, children: /* @__PURE__ */ r.jsx(lt, { components: a, children: /* @__PURE__ */ r.jsx(Le, { children: /* @__PURE__ */ r.jsx(Ft, { value: s, children: /* @__PURE__ */ r.jsx(Re, { children: t }) }) }) }) })
|
|
721
|
+
] });
|
|
722
|
+
}, Lt = xe(Ht), Ae = (t) => /* @__PURE__ */ r.jsx(kt, { FallbackComponent: St, children: /* @__PURE__ */ r.jsx(Lt, { ...t }) });
|
|
723
|
+
Ae.displayName = "DevPortal";
|
|
724
|
+
const Rt = () => {
|
|
725
|
+
const t = D(), { setActiveAnchor: e } = X();
|
|
726
|
+
q(() => {
|
|
727
|
+
if (!t.hash) return;
|
|
728
|
+
const s = t.hash.split("/")[0].slice(1), a = document.getElementById(decodeURIComponent(s));
|
|
729
|
+
if (a) {
|
|
730
|
+
requestAnimationFrame(() => {
|
|
731
|
+
a.scrollIntoView(), requestIdleCallback(() => e(s));
|
|
732
|
+
});
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
const n = new MutationObserver((o, l) => {
|
|
736
|
+
const c = document.getElementById(decodeURIComponent(s));
|
|
737
|
+
c && (c.scrollIntoView(), requestIdleCallback(() => e(s)), l.disconnect());
|
|
738
|
+
});
|
|
739
|
+
return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
|
|
740
|
+
}, [t.hash, e]);
|
|
741
|
+
}, Bt = () => {
|
|
742
|
+
const t = D(), e = B(t.pathname);
|
|
743
|
+
q(() => {
|
|
744
|
+
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
745
|
+
}, [t.pathname]);
|
|
746
|
+
}, Qe = ({
|
|
747
|
+
item: t,
|
|
748
|
+
defaultOpen: e,
|
|
749
|
+
path: s
|
|
750
|
+
}) => {
|
|
751
|
+
const [a, n] = rt(e), o = D(), l = B(o.pathname);
|
|
752
|
+
return q(() => {
|
|
753
|
+
!a && l.current !== o.pathname && n(G(t, o.pathname, s)), l.current = o.pathname;
|
|
754
|
+
}, [a, t, s, o.pathname]), [a, n];
|
|
755
|
+
}, L = Be(
|
|
756
|
+
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
757
|
+
{
|
|
758
|
+
variants: {
|
|
759
|
+
isActive: {
|
|
760
|
+
true: "text-primary font-medium",
|
|
761
|
+
false: "text-foreground/80"
|
|
762
|
+
},
|
|
763
|
+
isMuted: {
|
|
764
|
+
true: "text-foreground/30",
|
|
765
|
+
false: ""
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
), Kt = "data-anchor", Ee = ({
|
|
770
|
+
category: t,
|
|
771
|
+
item: e,
|
|
772
|
+
activeAnchor: s,
|
|
773
|
+
currentTopNavItem: a,
|
|
774
|
+
basePath: n = ""
|
|
775
|
+
}) => {
|
|
776
|
+
const o = W(e) ? Ce(n, e.path) : "", l = D(), [c, h] = Qe({
|
|
777
|
+
item: e,
|
|
778
|
+
path: o,
|
|
779
|
+
defaultOpen: () => G(e, l.pathname, o)
|
|
780
|
+
});
|
|
781
|
+
if (gt(e)) {
|
|
782
|
+
const f = T(
|
|
783
|
+
"flex items-center gap-2",
|
|
784
|
+
L({
|
|
785
|
+
isActive: e.href === l.pathname
|
|
786
|
+
})
|
|
787
|
+
);
|
|
788
|
+
return e.href.startsWith("http") ? /* @__PURE__ */ r.jsxs(
|
|
789
|
+
"a",
|
|
790
|
+
{
|
|
791
|
+
className: f,
|
|
792
|
+
href: e.href,
|
|
793
|
+
target: "_blank",
|
|
794
|
+
rel: "noopener noreferrer",
|
|
795
|
+
children: [
|
|
796
|
+
e.label,
|
|
797
|
+
/* @__PURE__ */ r.jsx(vt, { size: 14 })
|
|
798
|
+
]
|
|
799
|
+
}
|
|
800
|
+
) : /* @__PURE__ */ r.jsx(U, { className: f, to: e.href, children: e.label });
|
|
801
|
+
}
|
|
802
|
+
const g = /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between w-full", children: [
|
|
803
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
|
|
804
|
+
e.icon,
|
|
805
|
+
typeof e.label != "string" ? e.label : /* @__PURE__ */ r.jsx("span", { className: "truncate", children: e.label })
|
|
806
|
+
] }),
|
|
807
|
+
e.children && /* @__PURE__ */ r.jsx(
|
|
808
|
+
Ne,
|
|
809
|
+
{
|
|
810
|
+
size: 16,
|
|
811
|
+
className: "transition shrink-0 group-data-[state=open]:rotate-90"
|
|
812
|
+
}
|
|
813
|
+
)
|
|
814
|
+
] });
|
|
815
|
+
return /* @__PURE__ */ r.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ r.jsxs(
|
|
816
|
+
je,
|
|
817
|
+
{
|
|
818
|
+
open: c,
|
|
819
|
+
onOpenChange: () => h((f) => !f),
|
|
820
|
+
className: "flex flex-col",
|
|
821
|
+
children: [
|
|
822
|
+
/* @__PURE__ */ r.jsx(
|
|
823
|
+
Pe,
|
|
824
|
+
{
|
|
825
|
+
className: T(
|
|
826
|
+
"group text-start",
|
|
827
|
+
L({ isActive: !1 })
|
|
828
|
+
),
|
|
829
|
+
children: g
|
|
830
|
+
}
|
|
831
|
+
),
|
|
832
|
+
/* @__PURE__ */ r.jsx(we, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ r.jsx("ul", { className: "mt-1 border-border border-l ps-1.5", children: e.children.map((f) => /* @__PURE__ */ r.jsx(
|
|
833
|
+
Ee,
|
|
834
|
+
{
|
|
835
|
+
category: t,
|
|
836
|
+
item: f,
|
|
837
|
+
activeAnchor: s,
|
|
838
|
+
currentTopNavItem: a,
|
|
839
|
+
basePath: o
|
|
840
|
+
},
|
|
841
|
+
W(f) ? f.path : f.href
|
|
842
|
+
)) }) })
|
|
843
|
+
]
|
|
844
|
+
}
|
|
845
|
+
) : e.path.startsWith("#") ? /* @__PURE__ */ r.jsx(
|
|
846
|
+
ct,
|
|
847
|
+
{
|
|
848
|
+
to: e.path,
|
|
849
|
+
[Kt]: e.path,
|
|
850
|
+
className: L({
|
|
851
|
+
isActive: e.path.slice(1) === s,
|
|
852
|
+
isMuted: e.muted
|
|
853
|
+
}),
|
|
854
|
+
children: g
|
|
855
|
+
}
|
|
856
|
+
) : /* @__PURE__ */ r.jsx(
|
|
857
|
+
U,
|
|
858
|
+
{
|
|
859
|
+
className: ({ isActive: f }) => L({ isActive: f }),
|
|
860
|
+
to: o,
|
|
861
|
+
children: g
|
|
862
|
+
}
|
|
863
|
+
) });
|
|
864
|
+
}, zt = ({
|
|
865
|
+
category: t
|
|
866
|
+
}) => {
|
|
867
|
+
const { activeAnchor: e } = X(), s = et(), a = D(), n = t.collapsible ?? !0, [o, l] = Qe({
|
|
868
|
+
item: t,
|
|
869
|
+
path: (s == null ? void 0 : s.path) ?? "",
|
|
870
|
+
defaultOpen: () => !n || t.expanded || G(t, a.pathname, (s == null ? void 0 : s.path) ?? "")
|
|
871
|
+
});
|
|
872
|
+
return /* @__PURE__ */ r.jsxs(
|
|
873
|
+
je,
|
|
874
|
+
{
|
|
875
|
+
open: o,
|
|
876
|
+
onOpenChange: () => l((c) => !c),
|
|
877
|
+
children: [
|
|
878
|
+
t.label.length > 0 ? /* @__PURE__ */ r.jsx(Pe, { asChild: n, disabled: !n, children: /* @__PURE__ */ r.jsxs(
|
|
879
|
+
"h5",
|
|
880
|
+
{
|
|
881
|
+
className: T(
|
|
882
|
+
"flex group items-center justify-between cursor-pointer font-semibold text-foreground/90 px-[--padding-nav-item] py-1.5 rounded-lg transition-colors duration-300 -mx-[--padding-nav-item]",
|
|
883
|
+
n ? "hover:bg-accent" : "cursor-auto"
|
|
884
|
+
),
|
|
885
|
+
children: [
|
|
886
|
+
t.label,
|
|
887
|
+
n && /* @__PURE__ */ r.jsx(
|
|
888
|
+
Ne,
|
|
889
|
+
{
|
|
890
|
+
className: "group-data-[state=open]:rotate-90 transition",
|
|
891
|
+
size: 16
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
]
|
|
895
|
+
}
|
|
896
|
+
) }) : "Endpoints",
|
|
897
|
+
/* @__PURE__ */ r.jsx(we, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ r.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: t.children.map((c) => /* @__PURE__ */ r.jsx(
|
|
898
|
+
Ee,
|
|
899
|
+
{
|
|
900
|
+
category: t,
|
|
901
|
+
item: c,
|
|
902
|
+
activeAnchor: e,
|
|
903
|
+
currentTopNavItem: s,
|
|
904
|
+
basePath: Ce(s == null ? void 0 : s.path, t.path)
|
|
905
|
+
},
|
|
906
|
+
W(c) ? c.path + c.label : c.href
|
|
907
|
+
)) }) })
|
|
908
|
+
]
|
|
909
|
+
},
|
|
910
|
+
t.label
|
|
911
|
+
);
|
|
912
|
+
}, Vt = it(function({ children: e, className: s, pushMainContent: a }, n) {
|
|
913
|
+
return /* @__PURE__ */ r.jsx(
|
|
914
|
+
"nav",
|
|
915
|
+
{
|
|
916
|
+
"data-navigation": String(a),
|
|
917
|
+
className: T(
|
|
918
|
+
"peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
919
|
+
s
|
|
920
|
+
),
|
|
921
|
+
ref: n,
|
|
922
|
+
children: e
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
}), Ut = () => {
|
|
926
|
+
const t = B(null), e = tt();
|
|
927
|
+
return /* @__PURE__ */ r.jsx(
|
|
928
|
+
Vt,
|
|
929
|
+
{
|
|
930
|
+
ref: t,
|
|
931
|
+
pushMainContent: e.data.items.length > 0,
|
|
932
|
+
children: e.data.items.map((s) => /* @__PURE__ */ r.jsx(zt, { category: s }, s.label))
|
|
933
|
+
}
|
|
934
|
+
);
|
|
935
|
+
}, Wt = ({ children: t }) => {
|
|
936
|
+
const e = D(), { setActiveAnchor: s } = X(), { meta: a } = _();
|
|
937
|
+
Rt(), Bt();
|
|
938
|
+
const n = B(e.pathname);
|
|
939
|
+
return q(() => {
|
|
940
|
+
e.pathname !== n.current && s(""), n.current = e.pathname;
|
|
941
|
+
}, [e.pathname, s]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
942
|
+
/* @__PURE__ */ r.jsxs(be, { titleTemplate: a == null ? void 0 : a.title, children: [
|
|
943
|
+
(a == null ? void 0 : a.description) && /* @__PURE__ */ r.jsx("meta", { name: "description", content: a.description }),
|
|
944
|
+
(a == null ? void 0 : a.favicon) && /* @__PURE__ */ r.jsx("link", { rel: "icon", href: a.favicon })
|
|
945
|
+
] }),
|
|
946
|
+
/* @__PURE__ */ r.jsx(Oe, {}),
|
|
947
|
+
/* @__PURE__ */ r.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ r.jsxs(
|
|
948
|
+
ot,
|
|
949
|
+
{
|
|
950
|
+
fallback: /* @__PURE__ */ r.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ r.jsx(mt, {}) }),
|
|
951
|
+
children: [
|
|
952
|
+
/* @__PURE__ */ r.jsx(Ut, {}),
|
|
953
|
+
/* @__PURE__ */ r.jsx(
|
|
954
|
+
"main",
|
|
955
|
+
{
|
|
956
|
+
className: T(
|
|
957
|
+
"dark:border-white/10 translate-x-0 h-full",
|
|
958
|
+
"lg:overflow-visible",
|
|
959
|
+
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
960
|
+
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] peer-data-[navigation=true]:pl-12"
|
|
961
|
+
),
|
|
962
|
+
children: t ?? /* @__PURE__ */ r.jsx(Ve, {})
|
|
963
|
+
}
|
|
964
|
+
)
|
|
965
|
+
]
|
|
966
|
+
}
|
|
967
|
+
) })
|
|
968
|
+
] });
|
|
969
|
+
}, ns = ut, rs = Ke, is = Ae, os = Wt, ls = ze;
|
|
694
970
|
export {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
971
|
+
rs as Callout,
|
|
972
|
+
is as DevPortal,
|
|
973
|
+
os as Layout,
|
|
974
|
+
ls as Link,
|
|
975
|
+
ns as useMDXComponents
|
|
699
976
|
};
|
|
700
977
|
//# sourceMappingURL=zudoku.components.js.map
|