zudoku 0.33.1 → 0.33.2-local.4

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.
Files changed (169) hide show
  1. package/dist/config/validators/common.d.ts +226 -8
  2. package/dist/config/validators/common.js +26 -8
  3. package/dist/config/validators/common.js.map +1 -1
  4. package/dist/config/validators/validate.d.ts +89 -2
  5. package/dist/lib/authentication/hook.d.ts +1 -0
  6. package/dist/lib/authentication/hook.js +11 -1
  7. package/dist/lib/authentication/hook.js.map +1 -1
  8. package/dist/lib/authentication/providers/clerk.js +6 -6
  9. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  10. package/dist/lib/components/Banner.js +1 -1
  11. package/dist/lib/components/Banner.js.map +1 -1
  12. package/dist/lib/components/Heading.d.ts +1 -1
  13. package/dist/lib/components/Layout.js +1 -1
  14. package/dist/lib/components/Layout.js.map +1 -1
  15. package/dist/lib/components/index.d.ts +1 -0
  16. package/dist/lib/core/RouteGuard.js +2 -1
  17. package/dist/lib/core/RouteGuard.js.map +1 -1
  18. package/dist/lib/plugins/api-catalog/Catalog.d.ts +3 -1
  19. package/dist/lib/plugins/api-catalog/Catalog.js +7 -4
  20. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  21. package/dist/lib/plugins/api-catalog/index.js +1 -1
  22. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  23. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  24. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  25. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
  26. package/dist/lib/plugins/openapi/OperationList.js +2 -1
  27. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  28. package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
  29. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  30. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
  31. package/dist/lib/plugins/openapi/ParameterList.js +3 -2
  32. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  33. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
  34. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  35. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  36. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  37. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
  38. package/dist/lib/plugins/openapi/playground/PathParams.js +3 -2
  39. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  40. package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -1
  41. package/dist/lib/plugins/openapi/playground/Playground.js +10 -7
  42. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  43. package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
  44. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +66 -0
  45. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
  46. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
  47. package/dist/lib/plugins/search-pagefind/ResultList.js +31 -0
  48. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
  49. package/dist/lib/plugins/search-pagefind/get-results.d.ts +3 -0
  50. package/dist/lib/plugins/search-pagefind/get-results.js +37 -0
  51. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
  52. package/dist/lib/plugins/search-pagefind/index.d.ts +8 -0
  53. package/dist/lib/plugins/search-pagefind/index.js +9 -0
  54. package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
  55. package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
  56. package/dist/lib/plugins/search-pagefind/types.js +2 -0
  57. package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
  58. package/dist/lib/ui/Command.d.ts +7 -1
  59. package/dist/lib/ui/Command.js +2 -2
  60. package/dist/lib/ui/Command.js.map +1 -1
  61. package/dist/lib/util/useScrollToAnchor.js +6 -8
  62. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  63. package/dist/vite/build.js +4 -0
  64. package/dist/vite/build.js.map +1 -1
  65. package/dist/vite/config.js +7 -2
  66. package/dist/vite/config.js.map +1 -1
  67. package/dist/vite/dev-server.js +8 -0
  68. package/dist/vite/dev-server.js.map +1 -1
  69. package/dist/vite/pagefind.d.ts +4 -0
  70. package/dist/vite/pagefind.js +15 -0
  71. package/dist/vite/pagefind.js.map +1 -0
  72. package/dist/vite/plugin-component.js +4 -0
  73. package/dist/vite/plugin-component.js.map +1 -1
  74. package/dist/vite/plugin-search.js +4 -0
  75. package/dist/vite/plugin-search.js.map +1 -1
  76. package/dist/vite/prerender/prerender.js +1 -1
  77. package/dist/vite/prerender/prerender.js.map +1 -1
  78. package/dist/vite/sitemap.js +2 -1
  79. package/dist/vite/sitemap.js.map +1 -1
  80. package/lib/{AuthenticationPlugin-CiO1FM6Q.js → AuthenticationPlugin-BCYuduZ9.js} +3 -3
  81. package/lib/{AuthenticationPlugin-CiO1FM6Q.js.map → AuthenticationPlugin-BCYuduZ9.js.map} +1 -1
  82. package/lib/Command-CrTA1FX0.js +140 -0
  83. package/lib/Command-CrTA1FX0.js.map +1 -0
  84. package/lib/{Dialog-DIKGQxQc.js → Dialog-mi6BrnrM.js} +3 -3
  85. package/lib/{Dialog-DIKGQxQc.js.map → Dialog-mi6BrnrM.js.map} +1 -1
  86. package/lib/{Markdown-DePfm7oQ.js → Markdown-DofXBcqg.js} +2 -2
  87. package/lib/{Markdown-DePfm7oQ.js.map → Markdown-DofXBcqg.js.map} +1 -1
  88. package/lib/MdxPage-KJcNWIgt.js +200 -0
  89. package/lib/MdxPage-KJcNWIgt.js.map +1 -0
  90. package/lib/{OasProvider-SzD9mHJc.js → OasProvider-HcqBeC4H.js} +4 -4
  91. package/lib/{OasProvider-SzD9mHJc.js.map → OasProvider-HcqBeC4H.js.map} +1 -1
  92. package/lib/{OperationList-DDs9NblY.js → OperationList-C3wnbFxp.js} +1857 -1816
  93. package/lib/OperationList-C3wnbFxp.js.map +1 -0
  94. package/lib/{Select-Dqtcn53H.js → Select-Co6MuS4j.js} +36 -36
  95. package/lib/{Select-Dqtcn53H.js.map → Select-Co6MuS4j.js.map} +1 -1
  96. package/lib/{SlotletProvider-DdtIOUi6.js → SlotletProvider-CYFNHuok.js} +4 -4
  97. package/lib/{SlotletProvider-DdtIOUi6.js.map → SlotletProvider-CYFNHuok.js.map} +1 -1
  98. package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js → chunk-IR6S3I6Y-CRDBmIgK.js} +3 -3
  99. package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js.map → chunk-IR6S3I6Y-CRDBmIgK.js.map} +1 -1
  100. package/lib/hook-LTe5qHSc.js +347 -0
  101. package/lib/hook-LTe5qHSc.js.map +1 -0
  102. package/lib/{index-CibzSNks.js → index-CtkRMvMw.js} +698 -746
  103. package/lib/index-CtkRMvMw.js.map +1 -0
  104. package/lib/index-vn5bsvmU.js +1399 -0
  105. package/lib/index-vn5bsvmU.js.map +1 -0
  106. package/lib/{mutation-EclmI0is.js → mutation-B81DztCT.js} +2 -2
  107. package/lib/{mutation-EclmI0is.js.map → mutation-B81DztCT.js.map} +1 -1
  108. package/lib/ui/Command.js +96 -70
  109. package/lib/ui/Command.js.map +1 -1
  110. package/lib/{useExposedProps-RIvey2Oy.js → useExposedProps-D76yras4.js} +2 -2
  111. package/lib/{useExposedProps-RIvey2Oy.js.map → useExposedProps-D76yras4.js.map} +1 -1
  112. package/lib/useQuery-CQUwWR9i.js +1137 -0
  113. package/lib/useQuery-CQUwWR9i.js.map +1 -0
  114. package/lib/useScrollToAnchor-DKyrbZoy.js +977 -0
  115. package/lib/useScrollToAnchor-DKyrbZoy.js.map +1 -0
  116. package/lib/zudoku.auth-auth0.js +1 -1
  117. package/lib/zudoku.auth-clerk.js +29 -29
  118. package/lib/zudoku.auth-clerk.js.map +1 -1
  119. package/lib/zudoku.auth-openid.js +3 -3
  120. package/lib/zudoku.components.js +32 -1393
  121. package/lib/zudoku.components.js.map +1 -1
  122. package/lib/zudoku.hooks.js +1 -1
  123. package/lib/zudoku.plugin-api-catalog.js +87 -71
  124. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  125. package/lib/zudoku.plugin-api-keys.js +16 -15
  126. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  127. package/lib/zudoku.plugin-custom-pages.js +2 -2
  128. package/lib/zudoku.plugin-markdown.js +1 -1
  129. package/lib/zudoku.plugin-openapi.js +3 -3
  130. package/lib/zudoku.plugin-redirect.js +1 -1
  131. package/lib/zudoku.plugin-search-pagefind.js +274 -0
  132. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  133. package/package.json +8 -3
  134. package/src/lib/authentication/hook.ts +12 -1
  135. package/src/lib/authentication/providers/clerk.tsx +10 -6
  136. package/src/lib/components/Banner.tsx +1 -0
  137. package/src/lib/components/Heading.tsx +1 -1
  138. package/src/lib/components/Layout.tsx +1 -0
  139. package/src/lib/core/RouteGuard.tsx +2 -1
  140. package/src/lib/plugins/api-catalog/Catalog.tsx +23 -7
  141. package/src/lib/plugins/api-catalog/index.tsx +1 -0
  142. package/src/lib/plugins/markdown/MdxPage.tsx +5 -1
  143. package/src/lib/plugins/openapi/OperationList.tsx +15 -3
  144. package/src/lib/plugins/openapi/OperationListItem.tsx +8 -0
  145. package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
  146. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
  147. package/src/lib/plugins/openapi/Sidecar.tsx +1 -0
  148. package/src/lib/plugins/openapi/playground/PathParams.tsx +8 -2
  149. package/src/lib/plugins/openapi/playground/Playground.tsx +61 -5
  150. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +135 -0
  151. package/src/lib/plugins/search-pagefind/ResultList.tsx +104 -0
  152. package/src/lib/plugins/search-pagefind/get-results.tsx +54 -0
  153. package/src/lib/plugins/search-pagefind/index.tsx +21 -0
  154. package/src/lib/plugins/search-pagefind/types.ts +118 -0
  155. package/src/lib/ui/Command.tsx +25 -3
  156. package/src/lib/util/useScrollToAnchor.ts +8 -8
  157. package/README.md +0 -121
  158. package/lib/MdxPage-DZTt9ld7.js +0 -193
  159. package/lib/MdxPage-DZTt9ld7.js.map +0 -1
  160. package/lib/OperationList-DDs9NblY.js.map +0 -1
  161. package/lib/hook-CN__aZIt.js +0 -1464
  162. package/lib/hook-CN__aZIt.js.map +0 -1
  163. package/lib/index-CibzSNks.js.map +0 -1
  164. package/lib/index.esm-CQHE3GEU.js +0 -691
  165. package/lib/index.esm-CQHE3GEU.js.map +0 -1
  166. package/lib/objectEntries-yMIkr2mI.js +0 -5
  167. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  168. package/lib/useScrollToAnchor-C7ilRSts.js +0 -290
  169. package/lib/useScrollToAnchor-C7ilRSts.js.map +0 -1
@@ -1,1396 +1,35 @@
1
- var ut = Object.defineProperty;
2
- var xe = (t) => {
3
- throw TypeError(t);
4
- };
5
- var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
- var j = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), ve = (t, e, r) => e.has(t) || xe("Cannot " + r);
7
- var l = (t, e, r) => (ve(t, e, "read from private field"), r ? r.call(t) : e.get(t)), w = (t, e, r) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), y = (t, e, r, n) => (ve(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r);
8
- var _ = (t, e, r, n) => ({
9
- set _(a) {
10
- y(t, e, a, r);
11
- },
12
- get _() {
13
- return l(t, e, n);
14
- }
15
- });
16
- import { a as Fe, H as le } from "./index.esm-CQHE3GEU.js";
17
- import { z as He, J as ht } from "./index-DwT-v3zK.js";
18
- import { a as ft, u as te, m as gt, O as ce, R as mt, S as pt, h as ue, f as xt, L as de } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
19
- import { S as Be, q as Le, Q as vt, n as P, r as ye, t as be, v as M, w as yt, x as bt, y as jt, z as wt, A as je, B as we, C as Pt, h as Pe, D as Ce, E as Ct, f as kt, k as L, a as E, m as St, F as ze, G as Ke, H as Nt, j as ae, b as Dt, Z as Et, I as Mt, J as Ot } from "./hook-CN__aZIt.js";
20
- import { j as s } from "./jsx-runtime-CYK1ROHF.js";
21
- import { D as At, a as qt, d as Tt, c as It, e as Qt } from "./Dialog-DIKGQxQc.js";
22
- import { Z as $e } from "./invariant-Caa8-XvF.js";
23
- import * as U from "react";
24
- import Rt, { useRef as V, useEffect as I, createContext as he, StrictMode as Ue, useState as z, useCallback as Ft, Suspense as fe, memo as Ze, forwardRef as Ht, Component as Bt, createElement as ke, useMemo as re, useContext as Lt } from "react";
25
- import { E as Ye, S, a as zt, R as Kt } from "./SlotletProvider-DdtIOUi6.js";
26
- import { Button as $t } from "./ui/Button.js";
27
- import { Callout as Ut } from "./ui/Callout.js";
28
- import { M as Zt } from "./mutation-EclmI0is.js";
29
- import * as Yt from "react-dom";
30
- import { C as ge } from "./ClientOnly-E7hGysn1.js";
31
- import { CircleXIcon as Vt, SearchIcon as Xt, SunIcon as Gt, MoonIcon as _t, MenuIcon as Wt, PanelLeftIcon as Jt } from "lucide-react";
32
- import { Drawer as Ve, DrawerTrigger as Xe, DrawerContent as Ge, DrawerTitle as _e } from "./ui/Drawer.js";
33
- import { c as Q } from "./cn-qaFjX9_3.js";
34
- import { s as er, S as Se, a as tr, M as rr, u as sr } from "./useScrollToAnchor-C7ilRSts.js";
35
- import { u as nr, H as ar, P as ir, a as or, V as lr, M as cr } from "./Markdown-DePfm7oQ.js";
36
- import { B as ie, S as We } from "./Spinner-1KrEmx1V.js";
37
- import { isSearchPlugin as ur, isProfileMenuPlugin as dr, isNavigationPlugin as hr, isEventConsumerPlugin as fr, needsInitialization as gr, isApiIdentityPlugin as mr, isMdxProviderPlugin as pr, hasHead as xr } from "./zudoku.plugins.js";
38
- import { DropdownMenu as vr, DropdownMenuTrigger as yr, DropdownMenuContent as br, DropdownMenuLabel as jr, DropdownMenuSeparator as se, DropdownMenuSub as wr, DropdownMenuSubTrigger as Pr, DropdownMenuPortal as Cr, DropdownMenuSubContent as kr, DropdownMenuItem as Sr } from "./ui/DropdownMenu.js";
39
- import { j as Ne } from "./joinUrl-10po2Jdj.js";
40
- import { VisuallyHidden as Je } from "@radix-ui/react-visually-hidden";
41
- import { a as Nr } from "./index-CPNSgwSb.js";
42
- import { C as Dr } from "./CategoryHeading-DpB47wvk.js";
43
- import { o as Er } from "./objectEntries-yMIkr2mI.js";
44
- var D, Ie, Mr = (Ie = class extends Be {
45
- constructor(e = {}) {
46
- super();
47
- w(this, D);
48
- this.config = e, y(this, D, /* @__PURE__ */ new Map());
49
- }
50
- build(e, r, n) {
51
- const a = r.queryKey, i = r.queryHash ?? Le(a, r);
52
- let o = this.get(i);
53
- return o || (o = new vt({
54
- client: e,
55
- queryKey: a,
56
- queryHash: i,
57
- options: e.defaultQueryOptions(r),
58
- state: n,
59
- defaultOptions: e.getQueryDefaults(a)
60
- }), this.add(o)), o;
61
- }
62
- add(e) {
63
- l(this, D).has(e.queryHash) || (l(this, D).set(e.queryHash, e), this.notify({
64
- type: "added",
65
- query: e
66
- }));
67
- }
68
- remove(e) {
69
- const r = l(this, D).get(e.queryHash);
70
- r && (e.destroy(), r === e && l(this, D).delete(e.queryHash), this.notify({ type: "removed", query: e }));
71
- }
72
- clear() {
73
- P.batch(() => {
74
- this.getAll().forEach((e) => {
75
- this.remove(e);
76
- });
77
- });
78
- }
79
- get(e) {
80
- return l(this, D).get(e);
81
- }
82
- getAll() {
83
- return [...l(this, D).values()];
84
- }
85
- find(e) {
86
- const r = { exact: !0, ...e };
87
- return this.getAll().find(
88
- (n) => ye(r, n)
89
- );
90
- }
91
- findAll(e = {}) {
92
- const r = this.getAll();
93
- return Object.keys(e).length > 0 ? r.filter((n) => ye(e, n)) : r;
94
- }
95
- notify(e) {
96
- P.batch(() => {
97
- this.listeners.forEach((r) => {
98
- r(e);
99
- });
100
- });
101
- }
102
- onFocus() {
103
- P.batch(() => {
104
- this.getAll().forEach((e) => {
105
- e.onFocus();
106
- });
107
- });
108
- }
109
- onOnline() {
110
- P.batch(() => {
111
- this.getAll().forEach((e) => {
112
- e.onOnline();
113
- });
114
- });
115
- }
116
- }, D = new WeakMap(), Ie), O, k, Y, Qe, Or = (Qe = class extends Be {
117
- constructor(e = {}) {
118
- super();
119
- w(this, O);
120
- w(this, k);
121
- w(this, Y);
122
- this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, k, /* @__PURE__ */ new Map()), y(this, Y, 0);
123
- }
124
- build(e, r, n) {
125
- const a = new Zt({
126
- mutationCache: this,
127
- mutationId: ++_(this, Y)._,
128
- options: e.defaultMutationOptions(r),
129
- state: n
130
- });
131
- return this.add(a), a;
132
- }
133
- add(e) {
134
- l(this, O).add(e);
135
- const r = W(e);
136
- if (typeof r == "string") {
137
- const n = l(this, k).get(r);
138
- n ? n.push(e) : l(this, k).set(r, [e]);
139
- }
140
- this.notify({ type: "added", mutation: e });
141
- }
142
- remove(e) {
143
- if (l(this, O).delete(e)) {
144
- const r = W(e);
145
- if (typeof r == "string") {
146
- const n = l(this, k).get(r);
147
- if (n)
148
- if (n.length > 1) {
149
- const a = n.indexOf(e);
150
- a !== -1 && n.splice(a, 1);
151
- } else n[0] === e && l(this, k).delete(r);
152
- }
153
- }
154
- this.notify({ type: "removed", mutation: e });
155
- }
156
- canRun(e) {
157
- const r = W(e);
158
- if (typeof r == "string") {
159
- const n = l(this, k).get(r), a = n == null ? void 0 : n.find(
160
- (i) => i.state.status === "pending"
161
- );
162
- return !a || a === e;
163
- } else
164
- return !0;
165
- }
166
- runNext(e) {
167
- var n;
168
- const r = W(e);
169
- if (typeof r == "string") {
170
- const a = (n = l(this, k).get(r)) == null ? void 0 : n.find((i) => i !== e && i.state.isPaused);
171
- return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
172
- } else
173
- return Promise.resolve();
174
- }
175
- clear() {
176
- P.batch(() => {
177
- l(this, O).forEach((e) => {
178
- this.notify({ type: "removed", mutation: e });
179
- }), l(this, O).clear(), l(this, k).clear();
180
- });
181
- }
182
- getAll() {
183
- return Array.from(l(this, O));
184
- }
185
- find(e) {
186
- const r = { exact: !0, ...e };
187
- return this.getAll().find(
188
- (n) => be(r, n)
189
- );
190
- }
191
- findAll(e = {}) {
192
- return this.getAll().filter((r) => be(e, r));
193
- }
194
- notify(e) {
195
- P.batch(() => {
196
- this.listeners.forEach((r) => {
197
- r(e);
198
- });
199
- });
200
- }
201
- resumePausedMutations() {
202
- const e = this.getAll().filter((r) => r.state.isPaused);
203
- return P.batch(
204
- () => Promise.all(
205
- e.map((r) => r.continue().catch(M))
206
- )
207
- );
208
- }
209
- }, O = new WeakMap(), k = new WeakMap(), Y = new WeakMap(), Qe);
210
- function W(t) {
211
- var e;
212
- return (e = t.options.scope) == null ? void 0 : e.id;
213
- }
214
- function De(t) {
215
- return {
216
- onFetch: (e, r) => {
217
- var m, g, h, f, v;
218
- const n = e.options, a = (h = (g = (m = e.fetchOptions) == null ? void 0 : m.meta) == null ? void 0 : g.fetchMore) == null ? void 0 : h.direction, i = ((f = e.state.data) == null ? void 0 : f.pages) || [], o = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
219
- let u = { pages: [], pageParams: [] }, d = 0;
220
- const c = async () => {
221
- let x = !1;
222
- const C = (b) => {
223
- Object.defineProperty(b, "signal", {
224
- enumerable: !0,
225
- get: () => (e.signal.aborted ? x = !0 : e.signal.addEventListener("abort", () => {
226
- x = !0;
227
- }), e.signal)
228
- });
229
- }, X = yt(e.options, e.fetchOptions), K = async (b, N, $) => {
230
- if (x)
231
- return Promise.reject();
232
- if (N == null && b.pages.length)
233
- return Promise.resolve(b);
234
- const G = {
235
- client: e.client,
236
- queryKey: e.queryKey,
237
- pageParam: N,
238
- direction: $ ? "backward" : "forward",
239
- meta: e.options.meta
240
- };
241
- C(G);
242
- const ct = await X(
243
- G
244
- ), { maxPages: me } = e.options, pe = $ ? bt : jt;
245
- return {
246
- pages: pe(b.pages, ct, me),
247
- pageParams: pe(b.pageParams, N, me)
248
- };
249
- };
250
- if (a && i.length) {
251
- const b = a === "backward", N = b ? Ar : Ee, $ = {
252
- pages: i,
253
- pageParams: o
254
- }, G = N(n, $);
255
- u = await K($, G, b);
256
- } else {
257
- const b = t ?? i.length;
258
- do {
259
- const N = d === 0 ? o[0] ?? n.initialPageParam : Ee(n, u);
260
- if (d > 0 && N == null)
261
- break;
262
- u = await K(u, N), d++;
263
- } while (d < b);
264
- }
265
- return u;
266
- };
267
- e.options.persister ? e.fetchFn = () => {
268
- var x, C;
269
- return (C = (x = e.options).persister) == null ? void 0 : C.call(
270
- x,
271
- c,
272
- {
273
- client: e.client,
274
- queryKey: e.queryKey,
275
- meta: e.options.meta,
276
- signal: e.signal
277
- },
278
- r
279
- );
280
- } : e.fetchFn = c;
281
- }
282
- };
283
- }
284
- function Ee(t, { pages: e, pageParams: r }) {
285
- const n = e.length - 1;
286
- return e.length > 0 ? t.getNextPageParam(
287
- e[n],
288
- e,
289
- r[n],
290
- r
291
- ) : void 0;
292
- }
293
- function Ar(t, { pages: e, pageParams: r }) {
294
- var n;
295
- return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
296
- }
297
- var p, A, q, R, F, T, H, B, Re, qr = (Re = class {
298
- constructor(t = {}) {
299
- w(this, p);
300
- w(this, A);
301
- w(this, q);
302
- w(this, R);
303
- w(this, F);
304
- w(this, T);
305
- w(this, H);
306
- w(this, B);
307
- y(this, p, t.queryCache || new Mr()), y(this, A, t.mutationCache || new Or()), y(this, q, t.defaultOptions || {}), y(this, R, /* @__PURE__ */ new Map()), y(this, F, /* @__PURE__ */ new Map()), y(this, T, 0);
308
- }
309
- mount() {
310
- _(this, T)._++, l(this, T) === 1 && (y(this, H, wt.subscribe(async (t) => {
311
- t && (await this.resumePausedMutations(), l(this, p).onFocus());
312
- })), y(this, B, je.subscribe(async (t) => {
313
- t && (await this.resumePausedMutations(), l(this, p).onOnline());
314
- })));
315
- }
316
- unmount() {
317
- var t, e;
318
- _(this, T)._--, l(this, T) === 0 && ((t = l(this, H)) == null || t.call(this), y(this, H, void 0), (e = l(this, B)) == null || e.call(this), y(this, B, void 0));
319
- }
320
- isFetching(t) {
321
- return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
322
- }
323
- isMutating(t) {
324
- return l(this, A).findAll({ ...t, status: "pending" }).length;
325
- }
326
- getQueryData(t) {
327
- var r;
328
- const e = this.defaultQueryOptions({ queryKey: t });
329
- return (r = l(this, p).get(e.queryHash)) == null ? void 0 : r.state.data;
330
- }
331
- ensureQueryData(t) {
332
- const e = this.defaultQueryOptions(t), r = l(this, p).build(this, e), n = r.state.data;
333
- return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(we(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
334
- }
335
- getQueriesData(t) {
336
- return l(this, p).findAll(t).map(({ queryKey: e, state: r }) => {
337
- const n = r.data;
338
- return [e, n];
339
- });
340
- }
341
- setQueryData(t, e, r) {
342
- const n = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
343
- n.queryHash
344
- ), i = a == null ? void 0 : a.state.data, o = Pt(e, i);
345
- if (o !== void 0)
346
- return l(this, p).build(this, n).setData(o, { ...r, manual: !0 });
347
- }
348
- setQueriesData(t, e, r) {
349
- return P.batch(
350
- () => l(this, p).findAll(t).map(({ queryKey: n }) => [
351
- n,
352
- this.setQueryData(n, e, r)
353
- ])
354
- );
355
- }
356
- getQueryState(t) {
357
- var r;
358
- const e = this.defaultQueryOptions({ queryKey: t });
359
- return (r = l(this, p).get(
360
- e.queryHash
361
- )) == null ? void 0 : r.state;
362
- }
363
- removeQueries(t) {
364
- const e = l(this, p);
365
- P.batch(() => {
366
- e.findAll(t).forEach((r) => {
367
- e.remove(r);
368
- });
369
- });
370
- }
371
- resetQueries(t, e) {
372
- const r = l(this, p), n = {
373
- type: "active",
374
- ...t
375
- };
376
- return P.batch(() => (r.findAll(t).forEach((a) => {
377
- a.reset();
378
- }), this.refetchQueries(n, e)));
379
- }
380
- cancelQueries(t, e = {}) {
381
- const r = { revert: !0, ...e }, n = P.batch(
382
- () => l(this, p).findAll(t).map((a) => a.cancel(r))
383
- );
384
- return Promise.all(n).then(M).catch(M);
385
- }
386
- invalidateQueries(t, e = {}) {
387
- return P.batch(() => {
388
- if (l(this, p).findAll(t).forEach((n) => {
389
- n.invalidate();
390
- }), (t == null ? void 0 : t.refetchType) === "none")
391
- return Promise.resolve();
392
- const r = {
393
- ...t,
394
- type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
395
- };
396
- return this.refetchQueries(r, e);
397
- });
398
- }
399
- refetchQueries(t, e = {}) {
400
- const r = {
401
- ...e,
402
- cancelRefetch: e.cancelRefetch ?? !0
403
- }, n = P.batch(
404
- () => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
405
- let i = a.fetch(void 0, r);
406
- return r.throwOnError || (i = i.catch(M)), a.state.fetchStatus === "paused" ? Promise.resolve() : i;
407
- })
408
- );
409
- return Promise.all(n).then(M);
410
- }
411
- fetchQuery(t) {
412
- const e = this.defaultQueryOptions(t);
413
- e.retry === void 0 && (e.retry = !1);
414
- const r = l(this, p).build(this, e);
415
- return r.isStaleByTime(
416
- we(e.staleTime, r)
417
- ) ? r.fetch(e) : Promise.resolve(r.state.data);
418
- }
419
- prefetchQuery(t) {
420
- return this.fetchQuery(t).then(M).catch(M);
421
- }
422
- fetchInfiniteQuery(t) {
423
- return t.behavior = De(t.pages), this.fetchQuery(t);
424
- }
425
- prefetchInfiniteQuery(t) {
426
- return this.fetchInfiniteQuery(t).then(M).catch(M);
427
- }
428
- ensureInfiniteQueryData(t) {
429
- return t.behavior = De(t.pages), this.ensureQueryData(t);
430
- }
431
- resumePausedMutations() {
432
- return je.isOnline() ? l(this, A).resumePausedMutations() : Promise.resolve();
433
- }
434
- getQueryCache() {
435
- return l(this, p);
436
- }
437
- getMutationCache() {
438
- return l(this, A);
439
- }
440
- getDefaultOptions() {
441
- return l(this, q);
442
- }
443
- setDefaultOptions(t) {
444
- y(this, q, t);
445
- }
446
- setQueryDefaults(t, e) {
447
- l(this, R).set(Pe(t), {
448
- queryKey: t,
449
- defaultOptions: e
450
- });
451
- }
452
- getQueryDefaults(t) {
453
- const e = [...l(this, R).values()], r = {};
454
- return e.forEach((n) => {
455
- Ce(t, n.queryKey) && Object.assign(r, n.defaultOptions);
456
- }), r;
457
- }
458
- setMutationDefaults(t, e) {
459
- l(this, F).set(Pe(t), {
460
- mutationKey: t,
461
- defaultOptions: e
462
- });
463
- }
464
- getMutationDefaults(t) {
465
- const e = [...l(this, F).values()];
466
- let r = {};
467
- return e.forEach((n) => {
468
- Ce(t, n.mutationKey) && (r = { ...r, ...n.defaultOptions });
469
- }), r;
470
- }
471
- defaultQueryOptions(t) {
472
- if (t._defaulted)
473
- return t;
474
- const e = {
475
- ...l(this, q).queries,
476
- ...this.getQueryDefaults(t.queryKey),
477
- ...t,
478
- _defaulted: !0
479
- };
480
- return e.queryHash || (e.queryHash = Le(
481
- e.queryKey,
482
- e
483
- )), 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.queryFn === Ct && (e.enabled = !1), e;
484
- }
485
- defaultMutationOptions(t) {
486
- return t != null && t._defaulted ? t : {
487
- ...l(this, q).mutations,
488
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
489
- ...t,
490
- _defaulted: !0
491
- };
492
- }
493
- clear() {
494
- l(this, p).clear(), l(this, A).clear();
495
- }
496
- }, p = new WeakMap(), A = new WeakMap(), q = new WeakMap(), R = new WeakMap(), F = new WeakMap(), T = new WeakMap(), H = new WeakMap(), B = new WeakMap(), Re);
497
- function Tr(t) {
498
- return t;
499
- }
500
- function Me(t, e, r) {
501
- var d, c;
502
- if (typeof e != "object" || e === null)
503
- return;
504
- const n = t.getMutationCache(), a = t.getQueryCache(), i = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? Tr, o = e.mutations || [], u = e.queries || [];
505
- o.forEach(({ state: m, ...g }) => {
506
- var h, f;
507
- n.build(
508
- t,
509
- {
510
- ...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
511
- ...(f = r == null ? void 0 : r.defaultOptions) == null ? void 0 : f.mutations,
512
- ...g
513
- },
514
- m
515
- );
516
- }), u.forEach(({ queryKey: m, state: g, queryHash: h, meta: f, promise: v }) => {
517
- var X, K;
518
- let x = a.get(h);
519
- const C = g.data === void 0 ? g.data : i(g.data);
520
- if (x) {
521
- if (x.state.dataUpdatedAt < g.dataUpdatedAt) {
522
- const { fetchStatus: b, ...N } = g;
523
- x.setState({
524
- ...N,
525
- data: C
526
- });
527
- }
528
- } else
529
- x = a.build(
530
- t,
531
- {
532
- ...(X = t.getDefaultOptions().hydrate) == null ? void 0 : X.queries,
533
- ...(K = r == null ? void 0 : r.defaultOptions) == null ? void 0 : K.queries,
534
- queryKey: m,
535
- queryHash: h,
536
- meta: f
537
- },
538
- // Reset fetch status to idle to avoid
539
- // query being stuck in fetching state upon hydration
540
- {
541
- ...g,
542
- data: C,
543
- fetchStatus: "idle"
544
- }
545
- );
546
- if (v) {
547
- const b = Promise.resolve(v).then(i);
548
- x.fetch(void 0, { initialPromise: b });
549
- }
550
- });
551
- }
552
- var Oe = (t, e) => typeof t == "object" && t !== null && e in t, Ir = ({
553
- children: t,
554
- options: e = {},
555
- state: r,
556
- queryClient: n
557
- }) => {
558
- const a = kt(n), [i, o] = U.useState(), u = U.useRef(e);
559
- return u.current = e, U.useMemo(() => {
560
- if (r) {
561
- if (typeof r != "object")
562
- return;
563
- const d = a.getQueryCache(), c = r.queries || [], m = [], g = [];
564
- for (const h of c) {
565
- const f = d.get(h.queryHash);
566
- if (!f)
567
- m.push(h);
568
- else {
569
- const v = h.state.dataUpdatedAt > f.state.dataUpdatedAt || // RSC special serialized then-able chunks
570
- Oe(h.promise, "status") && Oe(f.promise, "status") && h.promise.status !== f.promise.status, x = i == null ? void 0 : i.find(
571
- (C) => C.queryHash === h.queryHash
572
- );
573
- v && (!x || h.state.dataUpdatedAt > x.state.dataUpdatedAt) && g.push(h);
574
- }
575
- }
576
- m.length > 0 && Me(a, { queries: m }, u.current), g.length > 0 && o(
577
- (h) => h ? [...h, ...g] : g
578
- );
579
- }
580
- }, [a, i, r]), U.useEffect(() => {
581
- i && (Me(a, { queries: i }, u.current), o(void 0));
582
- }, [a, i]), t;
583
- };
584
- const Qr = (t) => {
585
- const e = V(t);
586
- return e.current = t, I(() => {
587
- e.current = t;
588
- }, [t]), e;
589
- }, Rr = () => {
590
- var o;
591
- const t = L(), e = E(), r = ft(), n = te(), a = Qr(n.pathname), i = (o = e.options.protectedRoutes) == null ? void 0 : o.some(
592
- (u) => gt({ path: u, end: !0 }, n.pathname)
593
- );
594
- if (St({
595
- queryKey: ["login-redirect"],
596
- queryFn: async () => {
597
- var u;
598
- return await new Promise((d) => setTimeout(d, 1200)), (u = e.authentication) == null ? void 0 : u.signIn({
599
- redirectTo: a.current
600
- });
601
- },
602
- enabled: typeof window < "u" && i && !t.isPending && !t.isAuthenticated
603
- }), i && !t.isAuthenticated)
604
- return /* @__PURE__ */ s.jsx(
605
- At,
606
- {
607
- open: !0,
608
- onOpenChange: (u) => {
609
- u || r(-1);
610
- },
611
- children: /* @__PURE__ */ s.jsxs(qt, { children: [
612
- /* @__PURE__ */ s.jsx(Tt, { children: /* @__PURE__ */ s.jsx(It, { children: "Logging you in..." }) }),
613
- /* @__PURE__ */ s.jsx(Qt, { children: "Please wait while we log you in." })
614
- ] })
615
- }
616
- );
617
- if (i && !t.isAuthEnabled)
618
- throw new $e("Authentication is not enabled", {
619
- title: "Authentication is not enabled",
620
- developerHint: "To use protectedRoutes you need authentication to be enabled"
621
- });
622
- return /* @__PURE__ */ s.jsx(ce, {});
623
- };
624
- function Fr({ error: t }) {
625
- return /* @__PURE__ */ s.jsx(Ye, { error: t });
626
- }
627
- /**
628
- * react-router v7.1.5
629
- *
630
- * Copyright (c) Remix Software Inc.
631
- *
632
- * This source code is licensed under the MIT license found in the
633
- * LICENSE.md file in the root directory of this source tree.
634
- *
635
- * @license MIT
636
- */
637
- function Hr(t) {
638
- return /* @__PURE__ */ U.createElement(mt, { flushSync: Yt.flushSync, ...t });
639
- }
640
- const oe = he({ stagger: !1 }), Br = new qr({
641
- defaultOptions: {
642
- queries: {
643
- staleTime: 1e3 * 60 * 5
644
- }
645
- }
646
- }), Lr = ({
647
- router: t,
648
- hydrate: e = !1
649
- }) => /* @__PURE__ */ s.jsx(Ue, { children: /* @__PURE__ */ s.jsx(ze, { client: Br, children: /* @__PURE__ */ s.jsx(Ir, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ s.jsx(Fe, { children: /* @__PURE__ */ s.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ s.jsx(Hr, { router: t }) }) }) }) }) }), zr = ({
650
- router: t,
651
- context: e,
652
- queryClient: r,
653
- helmetContext: n
654
- }) => /* @__PURE__ */ s.jsx(Ue, { children: /* @__PURE__ */ s.jsx(ze, { client: r, children: /* @__PURE__ */ s.jsx(Fe, { context: n, children: /* @__PURE__ */ s.jsx(pt, { router: t, context: e }) }) }) });
655
- var Z = { exports: {} }, Kr = Z.exports, Ae;
656
- function $r() {
657
- return Ae || (Ae = 1, function(t, e) {
658
- (function(r, n) {
659
- n(e, Rt);
660
- })(Kr, function(r, n) {
661
- const a = {
662
- delay: 500,
663
- minDuration: 200,
664
- ssr: !0
665
- };
666
- function i() {
667
- const [u, d] = n.useState(!0);
668
- return n.useEffect(() => {
669
- d(!1);
670
- }, []), u;
671
- }
672
- function o(u, d) {
673
- d = Object.assign({}, a, d);
674
- const c = i() && d.ssr, m = c && u ? "DISPLAY" : "IDLE", [g, h] = n.useState(m), f = n.useRef(null);
675
- return n.useEffect(() => {
676
- if (u && (g === "IDLE" || c)) {
677
- clearTimeout(f.current);
678
- const v = c ? 0 : d.delay;
679
- f.current = setTimeout(() => {
680
- if (!u)
681
- return h("IDLE");
682
- f.current = setTimeout(() => {
683
- h("EXPIRE");
684
- }, d.minDuration), h("DISPLAY");
685
- }, v), c || h("DELAY");
686
- }
687
- !u && g !== "DISPLAY" && (clearTimeout(f.current), h("IDLE"));
688
- }, [u, g, d.delay, d.minDuration, c]), n.useEffect(() => () => clearTimeout(f.current), []), g === "DISPLAY" || g === "EXPIRE";
689
- }
690
- r.defaultOptions = a, r.useSpinDelay = o;
691
- });
692
- }(Z, Z.exports)), Z.exports;
693
- }
694
- var Ur = $r();
695
- const Zr = () => {
696
- const t = te(), e = V(t.pathname);
697
- I(() => {
698
- const r = e.current !== t.pathname, n = t.hash !== "";
699
- r && !n && window.scrollTo(0, 0), e.current = t.pathname;
700
- }, [t.pathname, t.hash]);
701
- };
702
- function Yr({
703
- className: t,
704
- ...e
705
- }) {
706
- return /* @__PURE__ */ s.jsx(
707
- "div",
708
- {
709
- className: Q("animate-pulse rounded-md bg-muted", t),
710
- ...e
711
- }
712
- );
713
- }
714
- const qe = {
715
- info: "bg-blue-500",
716
- note: "bg-gray-500",
717
- tip: "bg-green-600",
718
- caution: "bg-orange-500",
719
- danger: "bg-rose-500"
720
- }, Vr = () => {
721
- const { page: t } = E(), [e, r] = z(!0);
722
- if (!(t != null && t.banner) || !e)
723
- return /* @__PURE__ */ s.jsx("style", { children: ":root { --banner-height: 0px; }" });
724
- const n = t.banner.color && t.banner.color in qe ? qe[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = n ? {} : { backgroundColor: t.banner.color };
725
- return /* @__PURE__ */ s.jsxs(
726
- "div",
727
- {
728
- className: Q(
729
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
730
- n
731
- ),
732
- style: a,
733
- children: [
734
- /* @__PURE__ */ s.jsx("div", { className: "w-full", children: t.banner.message }),
735
- t.banner.dismissible && /* @__PURE__ */ s.jsx(
736
- "button",
737
- {
738
- type: "button",
739
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
740
- onClick: () => r(!1),
741
- children: /* @__PURE__ */ s.jsx(Vt, { size: 16 })
742
- }
743
- )
744
- ]
745
- }
746
- );
747
- }, et = ({ className: t }) => {
748
- const e = E(), [r, n] = z(!1), a = Ft(() => n(!1), []);
749
- I(() => {
750
- if (r)
751
- return;
752
- function o(u) {
753
- u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), n(!0));
754
- }
755
- return window.addEventListener("keydown", o), () => {
756
- window.removeEventListener("keydown", o);
757
- };
758
- }, [r, n]);
759
- const i = e.plugins.find(ur);
760
- return i ? /* @__PURE__ */ s.jsxs("div", { className: t, children: [
761
- /* @__PURE__ */ s.jsxs(
762
- "button",
763
- {
764
- type: "button",
765
- onClick: () => n(!0),
766
- 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",
767
- children: [
768
- /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
769
- /* @__PURE__ */ s.jsx(Xt, { size: 14 }),
770
- "Search"
771
- ] }),
772
- /* @__PURE__ */ s.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
773
- ]
774
- }
775
- ),
776
- /* @__PURE__ */ s.jsx(fe, { fallback: null, children: i.renderSearch({
777
- isOpen: r,
778
- onClose: a
779
- }) })
780
- ] }) : null;
781
- }, tt = () => {
782
- const { resolvedTheme: t, setTheme: e } = He();
783
- return /* @__PURE__ */ s.jsx(ge, { fallback: /* @__PURE__ */ s.jsx(ie, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ s.jsxs(
784
- "button",
785
- {
786
- type: "button",
787
- className: "flex rounded-full border p-0.5 gap-0.5 group",
788
- onClick: () => e(t === "dark" ? "light" : "dark"),
789
- "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
790
- children: [
791
- /* @__PURE__ */ s.jsx(
792
- "div",
793
- {
794
- className: Q(
795
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
796
- t === "light" && "border-border bg-muted",
797
- t === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
798
- ),
799
- children: /* @__PURE__ */ s.jsx(Gt, { size: 16 })
800
- }
801
- ),
802
- /* @__PURE__ */ s.jsx(
803
- "div",
804
- {
805
- className: Q(
806
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
807
- t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
808
- t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
809
- ),
810
- children: /* @__PURE__ */ s.jsx(_t, { size: 16 })
811
- }
812
- )
813
- ]
814
- }
815
- ) });
816
- }, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Xr = () => {
817
- const { topNavigation: t } = E(), { isAuthenticated: e } = L();
818
- return t.length <= 1 ? /* @__PURE__ */ s.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ s.jsx(fe, { children: /* @__PURE__ */ s.jsxs("div", { className: " items-center justify-between px-8 h-[--top-nav-height] hidden lg:flex text-sm", children: [
819
- /* @__PURE__ */ s.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ s.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(st, { ...r }) }, r.id)) }) }),
820
- /* @__PURE__ */ s.jsx(S, { name: "top-navigation-side" })
821
- ] }) });
822
- }, st = ({
823
- id: t,
824
- label: e,
825
- default: r
826
- }) => {
827
- var c;
828
- const { sidebars: n } = E(), a = n[t], i = Ke(), o = !!ue().location, u = ((c = i.topNavItem) == null ? void 0 : c.id) === t && !o, d = r ?? (a ? Nt(a, (m) => {
829
- if (m.type === "doc") return ae(m.id);
830
- }) : ae(t));
831
- if (!d)
832
- throw new $e("Page not found.", {
833
- developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
834
- });
835
- return (
836
- // We don't use isActive here because it has to be inside the sidebar,
837
- // the top nav id doesn't necessarily start with the sidebar id
838
- /* @__PURE__ */ s.jsx(
839
- xt,
840
- {
841
- className: ({ isPending: m }) => Nr(
842
- "block lg:py-3.5 font-medium -mb-px",
843
- u || m ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
844
- ),
845
- to: d,
846
- children: e
847
- }
848
- )
849
- );
850
- }, Gr = () => {
851
- const { topNavigation: t } = E(), { isAuthenticated: e } = L(), [r, n] = z(!1);
852
- return /* @__PURE__ */ s.jsxs(
853
- Ve,
854
- {
855
- direction: "right",
856
- open: r,
857
- onOpenChange: (a) => n(a),
858
- children: [
859
- /* @__PURE__ */ s.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ s.jsx(Xe, { className: "lg:hidden", children: /* @__PURE__ */ s.jsx(Wt, { size: 22 }) }) }),
860
- /* @__PURE__ */ s.jsx(
861
- Ge,
862
- {
863
- className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
864
- "aria-describedby": void 0,
865
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
866
- /* @__PURE__ */ s.jsx(Je, { children: /* @__PURE__ */ s.jsx(_e, { children: "Navigation" }) }),
867
- /* @__PURE__ */ s.jsx(et, { className: "flex p-4" }),
868
- /* @__PURE__ */ s.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
869
- /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(tt, {}) }),
870
- t.filter(rt(e)).map((a) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx("button", { onClick: () => n(!1), children: /* @__PURE__ */ s.jsx(st, { ...a }) }) }, a.label))
871
- ] })
872
- ] })
873
- }
874
- )
875
- ]
876
- }
877
- );
878
- }, ee = ({ item: t }) => t.children ? /* @__PURE__ */ s.jsxs(wr, { children: [
879
- /* @__PURE__ */ s.jsx(Pr, { children: t.label }),
880
- /* @__PURE__ */ s.jsx(Cr, { children: /* @__PURE__ */ s.jsx(kr, { children: t.children.map((e, r) => (
881
- // eslint-disable-next-line react/no-array-index-key
882
- /* @__PURE__ */ s.jsx(ee, { item: e }, r)
883
- )) }) })
884
- ] }, t.label) : /* @__PURE__ */ s.jsx(de, { to: t.path ?? "", children: /* @__PURE__ */ s.jsxs(Sr, { className: "flex gap-2", children: [
885
- t.icon && /* @__PURE__ */ s.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
886
- t.label
887
- ] }, t.label) }), nt = Ze(function() {
888
- const e = L(), { isAuthenticated: r, profile: n, isAuthEnabled: a } = L(), i = E(), { page: o, plugins: u } = i, d = u.filter((c) => dr(c)).flatMap((c) => c.getProfileMenuItems(i)).sort((c) => c.weight ?? 0);
889
- return /* @__PURE__ */ s.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
890
- /* @__PURE__ */ s.jsx(Vr, {}),
891
- /* @__PURE__ */ s.jsx("div", { className: "border-b", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl 2xl:border-x 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-8 h-[--top-header-height]", children: [
892
- /* @__PURE__ */ s.jsx("div", { className: "flex", children: /* @__PURE__ */ s.jsx(de, { to: "/", children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-3.5", children: [
893
- (o == null ? void 0 : o.logo) && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
894
- /* @__PURE__ */ s.jsx(
895
- "img",
896
- {
897
- src: /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light : Ne(
898
- "/",
899
- o.logo.src.light
900
- ),
901
- alt: o.logo.alt ?? o.pageTitle,
902
- style: { width: o.logo.width },
903
- className: "h-10 dark:hidden",
904
- loading: "lazy"
905
- }
906
- ),
907
- /* @__PURE__ */ s.jsx(
908
- "img",
909
- {
910
- src: /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark : Ne(
911
- "/",
912
- o.logo.src.dark
913
- ),
914
- alt: o.logo.alt ?? o.pageTitle,
915
- style: { width: o.logo.width },
916
- className: "h-10 hidden dark:block",
917
- loading: "lazy"
918
- }
919
- )
920
- ] }),
921
- /* @__PURE__ */ s.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: o == null ? void 0 : o.pageTitle })
922
- ] }) }) }),
923
- /* @__PURE__ */ s.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
924
- /* @__PURE__ */ s.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ s.jsx(et, {}) }),
925
- /* @__PURE__ */ s.jsx(Gr, {}),
926
- /* @__PURE__ */ s.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
927
- /* @__PURE__ */ s.jsx(S, { name: "head-navigation-start" }),
928
- a && /* @__PURE__ */ s.jsx(
929
- ge,
930
- {
931
- fallback: /* @__PURE__ */ s.jsx(Yr, { className: "rounded h-5 w-24 mr-4" }),
932
- children: r ? Object.values(d).length > 0 && /* @__PURE__ */ s.jsxs(vr, { modal: !1, children: [
933
- /* @__PURE__ */ s.jsx(yr, { asChild: !0, children: /* @__PURE__ */ s.jsx(ie, { variant: "ghost", children: n != null && n.name ? `${n.name}` : "My Account" }) }),
934
- /* @__PURE__ */ s.jsxs(br, { className: "w-56", children: [
935
- /* @__PURE__ */ s.jsxs(jr, { children: [
936
- n != null && n.name ? `${n.name}` : "My Account",
937
- (n == null ? void 0 : n.email) && /* @__PURE__ */ s.jsx("div", { className: "font-normal text-muted-foreground", children: n.email })
938
- ] }),
939
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ s.jsx(se, {}),
940
- d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ s.jsx(ee, { item: c }, c.label)),
941
- d.filter(
942
- (c) => !c.category || c.category === "middle"
943
- ).length > 0 && /* @__PURE__ */ s.jsx(se, {}),
944
- d.filter(
945
- (c) => !c.category || c.category === "middle"
946
- ).map((c) => /* @__PURE__ */ s.jsx(ee, { item: c }, c.label)),
947
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ s.jsx(se, {}),
948
- d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ s.jsx(ee, { item: c }, c.label))
949
- ] })
950
- ] }) : /* @__PURE__ */ s.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" })
951
- }
952
- ),
953
- /* @__PURE__ */ s.jsx(S, { name: "head-navigation-end" }),
954
- /* @__PURE__ */ s.jsx(tt, {})
955
- ] })
956
- ] })
957
- ] }) }),
958
- /* @__PURE__ */ s.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto 2xl:border-x", children: [
959
- /* @__PURE__ */ s.jsx(S, { name: "top-navigation-before" }),
960
- /* @__PURE__ */ s.jsx(Xr, {}),
961
- /* @__PURE__ */ s.jsx(S, { name: "top-navigation-after" })
962
- ] }) })
963
- ] });
964
- }), at = Ht(({ children: t, className: e, pushMainContent: r }, n) => /* @__PURE__ */ s.jsx(
965
- "nav",
966
- {
967
- "data-navigation": String(r),
968
- className: Q(
969
- "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-6",
970
- "-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
971
- "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
972
- !r && "border-r-0",
973
- e
974
- ),
975
- ref: n,
976
- children: t
977
- }
978
- ));
979
- at.displayName = "SidebarWrapper";
980
- const _r = ({
981
- onRequestClose: t
982
- }) => {
983
- const e = V(null), r = Ke();
984
- return I(() => {
985
- var a;
986
- const n = (a = e.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
987
- er(n ?? null);
988
- }, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
989
- /* @__PURE__ */ s.jsxs(
990
- at,
991
- {
992
- ref: e,
993
- pushMainContent: r.sidebar.length > 0,
994
- children: [
995
- /* @__PURE__ */ s.jsx(S, { name: "zudoku-before-navigation" }),
996
- r.sidebar.map((n) => /* @__PURE__ */ s.jsx(Se, { item: n }, n.label)),
997
- /* @__PURE__ */ s.jsx(S, { name: "zudoku-after-navigation" })
998
- ]
999
- }
1000
- ),
1001
- /* @__PURE__ */ s.jsx(
1002
- Ge,
1003
- {
1004
- className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
1005
- "aria-describedby": void 0,
1006
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
1007
- /* @__PURE__ */ s.jsx(Je, { children: /* @__PURE__ */ s.jsx(_e, { children: "Sidebar" }) }),
1008
- r.sidebar.map((n) => /* @__PURE__ */ s.jsx(
1009
- Se,
1010
- {
1011
- item: n,
1012
- onRequestClose: t
1013
- },
1014
- n.label
1015
- ))
1016
- ] })
1017
- }
1018
- )
1019
- ] });
1020
- }, Te = () => /* @__PURE__ */ s.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ s.jsx(We, {}) }), Wr = ({ children: t }) => {
1021
- const e = te(), { setActiveAnchor: r } = nr(), { meta: n, authentication: a } = E();
1022
- tr(), Zr();
1023
- const i = V(e.pathname);
1024
- I(() => {
1025
- var m;
1026
- (m = a == null ? void 0 : a.onPageLoad) == null || m.call(a);
1027
- }, [a]), I(() => {
1028
- e.pathname !== i.current && r(""), i.current = e.pathname;
1029
- }, [e.pathname, r]);
1030
- const o = !!ue().location, u = Ur.useSpinDelay(o, {
1031
- delay: 300,
1032
- minDuration: 500
1033
- }), [d, c] = z(!1);
1034
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1035
- !1,
1036
- /* @__PURE__ */ s.jsxs(le, { titleTemplate: n == null ? void 0 : n.title, children: [
1037
- (n == null ? void 0 : n.description) && /* @__PURE__ */ s.jsx("meta", { name: "description", content: n.description }),
1038
- (n == null ? void 0 : n.favicon) && /* @__PURE__ */ s.jsx("link", { rel: "icon", href: n.favicon })
1039
- ] }),
1040
- /* @__PURE__ */ s.jsx(S, { name: "layout-before-head" }),
1041
- /* @__PURE__ */ s.jsx(nt, {}),
1042
- /* @__PURE__ */ s.jsx(S, { name: "layout-after-head" }),
1043
- /* @__PURE__ */ s.jsx("div", { className: "w-full min-h-[calc(100vh-var(--header-height))] max-w-screen-2xl mx-auto px-4 lg:px-8 2xl:border-x", children: u ? /* @__PURE__ */ s.jsx(Te, {}) : /* @__PURE__ */ s.jsx(fe, { fallback: /* @__PURE__ */ s.jsx(Te, {}), children: /* @__PURE__ */ s.jsxs(
1044
- Ve,
1045
- {
1046
- direction: "left",
1047
- open: d,
1048
- onOpenChange: (m) => c(m),
1049
- children: [
1050
- /* @__PURE__ */ s.jsx(_r, { onRequestClose: () => c(!1) }),
1051
- /* @__PURE__ */ s.jsx(
1052
- "div",
1053
- {
1054
- className: Q(
1055
- "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
1056
- "peer-data-[navigation=false]:hidden"
1057
- ),
1058
- children: /* @__PURE__ */ s.jsxs(Xe, { className: "flex items-center gap-2", children: [
1059
- /* @__PURE__ */ s.jsx(Jt, { size: 16, strokeWidth: 1.5 }),
1060
- /* @__PURE__ */ s.jsx("span", { className: "text-sm", children: "Menu" })
1061
- ] })
1062
- }
1063
- ),
1064
- /* @__PURE__ */ s.jsxs(
1065
- "main",
1066
- {
1067
- className: Q(
1068
- "h-full dark:border-white/10 translate-x-0",
1069
- "lg:overflow-visible",
1070
- // This works in tandem with the `SidebarWrapper` component
1071
- "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
1072
- "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1073
- ),
1074
- children: [
1075
- /* @__PURE__ */ s.jsx(S, { name: "zudoku-before-content" }),
1076
- t ?? /* @__PURE__ */ s.jsx(ce, {}),
1077
- /* @__PURE__ */ s.jsx(S, { name: "zudoku-after-content" })
1078
- ]
1079
- }
1080
- )
1081
- ]
1082
- }
1083
- ) }) })
1084
- ] });
1085
- }, Jr = ({
1086
- title: t = "An error occurred",
1087
- message: e,
1088
- category: r
1089
- }) => /* @__PURE__ */ s.jsxs("div", { className: ir + " h-full pt-[--padding-content-top]", children: [
1090
- r && /* @__PURE__ */ s.jsx(Dr, { children: r }),
1091
- t && /* @__PURE__ */ s.jsx(ar, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1092
- /* @__PURE__ */ s.jsx("p", { children: e })
1093
- ] }), es = (t) => {
1094
- switch (t) {
1095
- case 400:
1096
- return {
1097
- title: "Bad Request",
1098
- message: "The request could not be understood by the server due to malformed syntax."
1099
- };
1100
- case 403:
1101
- return {
1102
- title: "Forbidden",
1103
- message: "You don't have permission to access this resource."
1104
- };
1105
- case 404:
1106
- return {
1107
- title: "Not Found",
1108
- message: "The requested resource could not be found."
1109
- };
1110
- case 405:
1111
- return {
1112
- title: "Method Not Allowed",
1113
- message: "The request method is not supported for the requested resource."
1114
- };
1115
- case 414:
1116
- return {
1117
- title: "Request URI Too Large",
1118
- message: "The request URI is too large."
1119
- };
1120
- case 416:
1121
- return {
1122
- title: "Range Not Satisfiable",
1123
- message: "The server cannot satisfy the request range."
1124
- };
1125
- case 500:
1126
- return {
1127
- title: "Internal Server Error",
1128
- message: "An unexpected error occurred while processing your request."
1129
- };
1130
- case 501:
1131
- return {
1132
- title: "Not Implemented",
1133
- message: "The server does not support the functionality required to fulfill the request."
1134
- };
1135
- case 502:
1136
- return {
1137
- title: "Bad Gateway",
1138
- message: "The server received an invalid response from the upstream server."
1139
- };
1140
- case 503:
1141
- return {
1142
- title: "Service Unavailable",
1143
- message: "The server is temporarily unable to handle the request."
1144
- };
1145
- case 504:
1146
- return {
1147
- title: "Gateway Timeout",
1148
- message: "The server did not receive a timely response from the upstream server."
1149
- };
1150
- default:
1151
- return {
1152
- title: "An error occurred",
1153
- message: "Something went wrong while processing your request."
1154
- };
1155
- }
1156
- }, ts = ({ statusCode: t, message: e }) => {
1157
- const r = es(t);
1158
- return /* @__PURE__ */ s.jsx(
1159
- Jr,
1160
- {
1161
- title: r.title,
1162
- message: e ?? r.message,
1163
- category: t
1164
- }
1165
- );
1166
- }, rs = he(null), ne = {
1167
- didCatch: !1,
1168
- error: null
1169
- };
1170
- class ss extends Bt {
1171
- constructor(e) {
1172
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
1173
- }
1174
- static getDerivedStateFromError(e) {
1175
- return {
1176
- didCatch: !0,
1177
- error: e
1178
- };
1179
- }
1180
- resetErrorBoundary() {
1181
- const {
1182
- error: e
1183
- } = this.state;
1184
- if (e !== null) {
1185
- for (var r, n, a = arguments.length, i = new Array(a), o = 0; o < a; o++)
1186
- i[o] = arguments[o];
1187
- (r = (n = this.props).onReset) === null || r === void 0 || r.call(n, {
1188
- args: i,
1189
- reason: "imperative-api"
1190
- }), this.setState(ne);
1191
- }
1192
- }
1193
- componentDidCatch(e, r) {
1194
- var n, a;
1195
- (n = (a = this.props).onError) === null || n === void 0 || n.call(a, e, r);
1196
- }
1197
- componentDidUpdate(e, r) {
1198
- const {
1199
- didCatch: n
1200
- } = this.state, {
1201
- resetKeys: a
1202
- } = this.props;
1203
- if (n && r.error !== null && ns(e.resetKeys, a)) {
1204
- var i, o;
1205
- (i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
1206
- next: a,
1207
- prev: e.resetKeys,
1208
- reason: "keys"
1209
- }), this.setState(ne);
1210
- }
1211
- }
1212
- render() {
1213
- const {
1214
- children: e,
1215
- fallbackRender: r,
1216
- FallbackComponent: n,
1217
- fallback: a
1218
- } = this.props, {
1219
- didCatch: i,
1220
- error: o
1221
- } = this.state;
1222
- let u = e;
1223
- if (i) {
1224
- const d = {
1225
- error: o,
1226
- resetErrorBoundary: this.resetErrorBoundary
1227
- };
1228
- if (typeof r == "function")
1229
- u = r(d);
1230
- else if (n)
1231
- u = ke(n, d);
1232
- else if (a !== void 0)
1233
- u = a;
1234
- else
1235
- throw o;
1236
- }
1237
- return ke(rs.Provider, {
1238
- value: {
1239
- didCatch: i,
1240
- error: o,
1241
- resetErrorBoundary: this.resetErrorBoundary
1242
- }
1243
- }, u);
1244
- }
1245
- }
1246
- function ns() {
1247
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1248
- return t.length !== e.length || t.some((r, n) => !Object.is(r, e[n]));
1249
- }
1250
- let as = () => ({
1251
- emit(t, ...e) {
1252
- for (let r = this.events[t] || [], n = 0, a = r.length; n < a; n++)
1253
- r[n](...e);
1254
- },
1255
- events: {},
1256
- on(t, e) {
1257
- var r;
1258
- return ((r = this.events)[t] || (r[t] = [])).push(e), () => {
1259
- var n;
1260
- this.events[t] = (n = this.events[t]) == null ? void 0 : n.filter((a) => e !== a);
1261
- };
1262
- }
1263
- });
1264
- class is {
1265
- constructor(e) {
1266
- j(this, "plugins");
1267
- j(this, "sidebars");
1268
- j(this, "topNavigation");
1269
- j(this, "meta");
1270
- j(this, "page");
1271
- j(this, "authentication");
1272
- j(this, "navigationPlugins");
1273
- j(this, "emitter", as());
1274
- j(this, "initialize", async () => {
1275
- await Promise.all(
1276
- this.plugins.filter(gr).map((e) => {
1277
- var r;
1278
- return (r = e.initialize) == null ? void 0 : r.call(e, this);
1279
- })
1280
- );
1281
- });
1282
- j(this, "getApiIdentities", async () => (await Promise.all(
1283
- this.plugins.filter(mr).map((r) => r.getIdentities(this))
1284
- )).flat());
1285
- j(this, "emitEvent", (e, ...r) => this.emitter.emit(e, ...r));
1286
- j(this, "getPluginSidebar", async (e) => (await Promise.all(
1287
- this.navigationPlugins.map(
1288
- (n) => {
1289
- var a;
1290
- return (a = n.getSidebar) == null ? void 0 : a.call(n, ae(e));
1291
- }
1292
- )
1293
- )).flatMap((n) => n ?? []));
1294
- j(this, "signRequest", async (e) => {
1295
- if (!this.authentication)
1296
- throw new Error("No authentication provider configured");
1297
- const r = await this.authentication.getAccessToken();
1298
- return e.headers.set("Authorization", `Bearer ${r}`), e;
1299
- });
1300
- this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(hr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.plugins.forEach((r) => {
1301
- fr(r) && Er(r.events).forEach(([n, a]) => {
1302
- this.emitter.on(n, a);
1303
- });
1304
- });
1305
- }
1306
- addEventListener(e, r) {
1307
- return this.emitter.on(e, r);
1308
- }
1309
- }
1310
- function os({ error: t, resetErrorBoundary: e }) {
1311
- return /* @__PURE__ */ s.jsx(Ye, { error: t });
1312
- }
1313
- const J = globalThis;
1314
- (!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
1315
- const it = {
1316
- Header: nt
1317
- }, ls = he(it), cs = ls.Provider, us = () => {
1318
- const t = te(), e = E(), r = V(void 0);
1319
- return I(() => {
1320
- e.emitEvent("location", {
1321
- from: r.current,
1322
- to: t
1323
- }), r.current = t;
1324
- }, [e, t]), null;
1325
- }, ds = ({
1326
- children: t,
1327
- context: e
1328
- }) => (Dt({
1329
- queryFn: async () => (await e.initialize(), !0),
1330
- queryKey: ["zudoku-initialize"]
1331
- }), /* @__PURE__ */ s.jsx(Et.Provider, { value: e, children: t })), ot = Ze(
1332
- ({ children: t, ...e }) => {
1333
- var g, h;
1334
- const r = re(
1335
- () => ({ ...it, ...e.overrides }),
1336
- [e.overrides]
1337
- ), n = re(() => {
1338
- var v;
1339
- return {
1340
- ...(e.plugins ?? []).filter(pr).flatMap(
1341
- (x) => x.getMdxComponents ? [x.getMdxComponents()] : []
1342
- ).reduce(
1343
- (x, C) => ({ ...x, ...C }),
1344
- {}
1345
- ),
1346
- ...or,
1347
- ...(v = e.mdx) == null ? void 0 : v.components
1348
- };
1349
- }, [(g = e.mdx) == null ? void 0 : g.components, e.plugins]), { stagger: a } = Lt(oe), [i, o] = z(!1), u = re(
1350
- () => i ? { stagger: !0 } : { stagger: a },
1351
- [a, i]
1352
- ), d = ue();
1353
- I(() => {
1354
- i || o(!0);
1355
- }, [i, d.location]);
1356
- const [c] = z(() => new is(e)), m = (h = e.plugins) == null ? void 0 : h.flatMap((f) => {
1357
- var v;
1358
- return xr(f) ? ((v = f.getHead) == null ? void 0 : v.call(f)) ?? [] : [];
1359
- }).map((f, v) => /* @__PURE__ */ s.jsx(le, { children: f }, v));
1360
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1361
- m,
1362
- /* @__PURE__ */ s.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ s.jsxs(ds, { context: c, children: [
1363
- /* @__PURE__ */ s.jsx(us, {}),
1364
- /* @__PURE__ */ s.jsx(rr, { components: n, children: /* @__PURE__ */ s.jsx(ht, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ s.jsx(cs, { value: r, children: /* @__PURE__ */ s.jsx(zt, { slotlets: e.slotlets, children: /* @__PURE__ */ s.jsx(lr, { children: t ?? /* @__PURE__ */ s.jsx(ce, {}) }) }) }) }) })
1365
- ] }) })
1366
- ] });
1367
- }
1368
- );
1369
- ot.displayName = "ZudokoInner";
1370
- const lt = (t) => /* @__PURE__ */ s.jsx(ss, { FallbackComponent: os, children: /* @__PURE__ */ s.jsx(ot, { ...t }) });
1371
- lt.displayName = "Zudoku";
1372
- const Hs = sr, Bs = Wr, Ls = Kt, zs = Fr, Ks = Lr, $s = zr, Us = Rr, Zs = le, Ys = E, Vs = L, Xs = Mt, Gs = Ot, _s = lt, Ws = ts, Js = Ut, en = cr, tn = We, rn = ge, sn = $t, nn = de, an = He;
1
+ import "./useScrollToAnchor-DKyrbZoy.js";
2
+ import "./index-DwT-v3zK.js";
3
+ import "./chunk-IR6S3I6Y-CRDBmIgK.js";
4
+ import "./hook-LTe5qHSc.js";
5
+ import { B as d, c as S, k, C as l, h, j as B, H as E, b as c, L as H, M as L, d as M, R, S as Z, i as f, g, Z as y, u as A, f as b, a as j, l as v, e as w } from "./index-vn5bsvmU.js";
6
+ import "./SlotletProvider-CYFNHuok.js";
7
+ import "./ui/Button.js";
8
+ import "./ui/Callout.js";
9
+ import "./ClientOnly-E7hGysn1.js";
10
+ import "./Markdown-DofXBcqg.js";
11
+ import "./Spinner-1KrEmx1V.js";
1373
12
  export {
1374
- Ks as Bootstrap,
1375
- $s as BootstrapStatic,
1376
- sn as Button,
1377
- Gs as CACHE_KEYS,
1378
- Js as Callout,
1379
- rn as ClientOnly,
1380
- Zs as Head,
1381
- Bs as Layout,
1382
- nn as Link,
1383
- en as Markdown,
1384
- Us as RouteGuard,
1385
- Ls as RouterError,
1386
- zs as ServerError,
1387
- tn as Spinner,
1388
- Ws as StatusPage,
1389
- _s as Zudoku,
1390
- Vs as useAuth,
1391
- Xs as useCache,
1392
- Hs as useMDXComponents,
1393
- an as useTheme,
1394
- Ys as useZudoku
13
+ d as Bootstrap,
14
+ S as BootstrapStatic,
15
+ k as Button,
16
+ l as CACHE_KEYS,
17
+ h as Callout,
18
+ B as ClientOnly,
19
+ E as Head,
20
+ c as Layout,
21
+ H as Link,
22
+ L as Markdown,
23
+ M as RouteGuard,
24
+ R as RouterError,
25
+ Z as ServerError,
26
+ f as Spinner,
27
+ g as StatusPage,
28
+ y as Zudoku,
29
+ A as useAuth,
30
+ b as useCache,
31
+ j as useMDXComponents,
32
+ v as useTheme,
33
+ w as useZudoku
1395
34
  };
1396
35
  //# sourceMappingURL=zudoku.components.js.map