zudoku 0.39.0 → 0.39.2

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 (146) hide show
  1. package/dist/app/entry.server.d.ts +5 -4
  2. package/dist/app/entry.server.js +2 -2
  3. package/dist/app/entry.server.js.map +1 -1
  4. package/dist/cli/cmds/dev.js +1 -7
  5. package/dist/cli/cmds/dev.js.map +1 -1
  6. package/dist/config/validators/common.d.ts +17 -0
  7. package/dist/config/validators/common.js +1 -0
  8. package/dist/config/validators/common.js.map +1 -1
  9. package/dist/config/validators/validate.d.ts +7 -0
  10. package/dist/lib/components/Bootstrap.d.ts +2 -1
  11. package/dist/lib/components/Bootstrap.js +3 -2
  12. package/dist/lib/components/Bootstrap.js.map +1 -1
  13. package/dist/lib/components/Header.js +2 -2
  14. package/dist/lib/components/Header.js.map +1 -1
  15. package/dist/lib/components/Layout.js +1 -1
  16. package/dist/lib/components/Layout.js.map +1 -1
  17. package/dist/lib/components/Main.js +1 -1
  18. package/dist/lib/components/Main.js.map +1 -1
  19. package/dist/lib/components/MobileTopNavigation.js +6 -3
  20. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  21. package/dist/lib/components/TopNavigation.d.ts +1 -0
  22. package/dist/lib/components/TopNavigation.js +2 -2
  23. package/dist/lib/components/TopNavigation.js.map +1 -1
  24. package/dist/lib/components/Zudoku.js +4 -1
  25. package/dist/lib/components/Zudoku.js.map +1 -1
  26. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  27. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  28. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  29. package/dist/lib/components/index.d.ts +2 -1
  30. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  31. package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
  32. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  33. package/dist/lib/components/navigation/SidebarWrapper.js +9 -2
  34. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  35. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  36. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  37. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  38. package/dist/lib/core/RouteGuard.d.ts +1 -0
  39. package/dist/lib/core/RouteGuard.js +9 -3
  40. package/dist/lib/core/RouteGuard.js.map +1 -1
  41. package/dist/lib/core/ZudokuContext.d.ts +1 -0
  42. package/dist/lib/core/ZudokuContext.js.map +1 -1
  43. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  44. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  45. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  46. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  47. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  48. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  49. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  50. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +9 -4
  51. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  52. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  53. package/dist/lib/plugins/search-pagefind/ResultList.js +6 -12
  54. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  55. package/dist/lib/plugins/search-pagefind/index.d.ts +1 -3
  56. package/dist/vite/build.js +1 -9
  57. package/dist/vite/build.js.map +1 -1
  58. package/dist/vite/plugin-search.js +1 -1
  59. package/dist/vite/plugin-search.js.map +1 -1
  60. package/dist/vite/prerender/FileWritingResponse.d.ts +9 -5
  61. package/dist/vite/prerender/FileWritingResponse.js +5 -5
  62. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  63. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  64. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  65. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  66. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  67. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  68. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  69. package/dist/vite/prerender/prerender.d.ts +1 -0
  70. package/dist/vite/prerender/prerender.js +18 -0
  71. package/dist/vite/prerender/prerender.js.map +1 -1
  72. package/dist/vite/prerender/worker.js +36 -8
  73. package/dist/vite/prerender/worker.js.map +1 -1
  74. package/dist/zuplo/with-zuplo.js +4 -0
  75. package/dist/zuplo/with-zuplo.js.map +1 -1
  76. package/lib/{Callout-D5frCCJ0.js → Callout-B2vsR09t.js} +2 -2
  77. package/lib/{Callout-D5frCCJ0.js.map → Callout-B2vsR09t.js.map} +1 -1
  78. package/lib/{Dialog-Dv6WG8RN.js → Dialog-sbgekbjb.js} +5 -5
  79. package/lib/{Dialog-Dv6WG8RN.js.map → Dialog-sbgekbjb.js.map} +1 -1
  80. package/lib/{MdxPage-ZW1StNhp.js → MdxPage-JscVnWM8.js} +22 -21
  81. package/lib/{MdxPage-ZW1StNhp.js.map → MdxPage-JscVnWM8.js.map} +1 -1
  82. package/lib/{OasProvider-Cld9RAMQ.js → OasProvider-C4T5TU8Z.js} +2 -2
  83. package/lib/{OasProvider-Cld9RAMQ.js.map → OasProvider-C4T5TU8Z.js.map} +1 -1
  84. package/lib/{OperationList-D-OfzJm6.js → OperationList-C-gBHUou.js} +49 -48
  85. package/lib/{OperationList-D-OfzJm6.js.map → OperationList-C-gBHUou.js.map} +1 -1
  86. package/lib/{Pagination-CYB3nVYx.js → Pagination-DCCvGq0m.js} +2 -2
  87. package/lib/{Pagination-CYB3nVYx.js.map → Pagination-DCCvGq0m.js.map} +1 -1
  88. package/lib/RouteGuard-CqZPoZYJ.js +744 -0
  89. package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
  90. package/lib/{SchemaList-Ci1WxRh0.js → SchemaList-DuN6ThXR.js} +3 -3
  91. package/lib/{SchemaList-Ci1WxRh0.js.map → SchemaList-DuN6ThXR.js.map} +1 -1
  92. package/lib/{SchemaView-Brn-YxHY.js → SchemaView-B3fOPR4V.js} +112 -100
  93. package/lib/SchemaView-B3fOPR4V.js.map +1 -0
  94. package/lib/{createServer-mMau3eV_.js → createServer-mYvGvmc0.js} +2469 -2443
  95. package/lib/createServer-mYvGvmc0.js.map +1 -0
  96. package/lib/index-D6ktNq4i.js +1863 -0
  97. package/lib/index-D6ktNq4i.js.map +1 -0
  98. package/lib/{index-CjPMxpOV.js → index-DsdAaiwx.js} +13 -12
  99. package/lib/{index-CjPMxpOV.js.map → index-DsdAaiwx.js.map} +1 -1
  100. package/lib/objectEntries-yMIkr2mI.js +5 -0
  101. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  102. package/lib/ui/Command.js +1 -1
  103. package/lib/useLatest-hmRS46UF.js +11 -0
  104. package/lib/useLatest-hmRS46UF.js.map +1 -0
  105. package/lib/zudoku.components.js +15 -14
  106. package/lib/zudoku.components.js.map +1 -1
  107. package/lib/zudoku.plugin-api-catalog.js +6 -5
  108. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  109. package/lib/zudoku.plugin-markdown.js +1 -1
  110. package/lib/zudoku.plugin-openapi.js +1 -1
  111. package/lib/zudoku.plugin-search-pagefind.js +132 -137
  112. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  113. package/package.json +3 -3
  114. package/src/app/entry.server.tsx +6 -3
  115. package/src/lib/components/Bootstrap.tsx +13 -6
  116. package/src/lib/components/Header.tsx +2 -2
  117. package/src/lib/components/Layout.tsx +1 -1
  118. package/src/lib/components/Main.tsx +3 -2
  119. package/src/lib/components/MobileTopNavigation.tsx +27 -18
  120. package/src/lib/components/TopNavigation.tsx +2 -2
  121. package/src/lib/components/Zudoku.tsx +5 -3
  122. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  123. package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
  124. package/src/lib/components/navigation/SidebarWrapper.tsx +27 -13
  125. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  126. package/src/lib/core/RouteGuard.tsx +26 -4
  127. package/src/lib/core/ZudokuContext.ts +1 -0
  128. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  129. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +5 -1
  130. package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -1
  131. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +11 -4
  132. package/src/lib/plugins/search-pagefind/ResultList.tsx +5 -16
  133. package/src/lib/plugins/search-pagefind/index.tsx +1 -1
  134. package/dist/cli/dev/pagefind-command.d.ts +0 -3
  135. package/dist/cli/dev/pagefind-command.js +0 -59
  136. package/dist/cli/dev/pagefind-command.js.map +0 -1
  137. package/dist/lib/components/context/PluginSystem.d.ts +0 -1
  138. package/dist/lib/components/context/PluginSystem.js +0 -2
  139. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  140. package/lib/SchemaView-Brn-YxHY.js.map +0 -1
  141. package/lib/createServer-mMau3eV_.js.map +0 -1
  142. package/lib/index-Bt7MKhZq.js +0 -2514
  143. package/lib/index-Bt7MKhZq.js.map +0 -1
  144. package/lib/objectEntries-BS7aAgOm.js +0 -12
  145. package/lib/objectEntries-BS7aAgOm.js.map +0 -1
  146. package/src/lib/components/context/PluginSystem.ts +0 -0
@@ -0,0 +1,744 @@
1
+ var ie = Object.defineProperty;
2
+ var oe = (e, t, r) => t in e ? ie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var T = (e, t, r) => oe(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { j as y } from "./jsx-runtime-CYK1ROHF.js";
5
+ import { l as le, e as ce, m as ue } from "./hook-CqpVYDqN.js";
6
+ import g, { Component as F, createContext as fe, use as pe } from "react";
7
+ import { g as U } from "./_commonjsHelpers-BkfeUUK-.js";
8
+ import { a as de, u as me, m as he, O as ye } from "./chunk-HA7DTUK3-C4gP41vD.js";
9
+ import { D as Te, a as ge, c as ve, b as Ae, d as Ee } from "./Dialog-sbgekbjb.js";
10
+ import { Z as be } from "./invariant-Caa8-XvF.js";
11
+ import { u as Ce } from "./useLatest-hmRS46UF.js";
12
+ var D, B;
13
+ function Oe() {
14
+ if (B) return D;
15
+ B = 1;
16
+ var e = typeof Element < "u", t = typeof Map == "function", r = typeof Set == "function", n = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
17
+ function o(s, i) {
18
+ if (s === i) return !0;
19
+ if (s && i && typeof s == "object" && typeof i == "object") {
20
+ if (s.constructor !== i.constructor) return !1;
21
+ var l, a, c;
22
+ if (Array.isArray(s)) {
23
+ if (l = s.length, l != i.length) return !1;
24
+ for (a = l; a-- !== 0; )
25
+ if (!o(s[a], i[a])) return !1;
26
+ return !0;
27
+ }
28
+ var u;
29
+ if (t && s instanceof Map && i instanceof Map) {
30
+ if (s.size !== i.size) return !1;
31
+ for (u = s.entries(); !(a = u.next()).done; )
32
+ if (!i.has(a.value[0])) return !1;
33
+ for (u = s.entries(); !(a = u.next()).done; )
34
+ if (!o(a.value[1], i.get(a.value[0]))) return !1;
35
+ return !0;
36
+ }
37
+ if (r && s instanceof Set && i instanceof Set) {
38
+ if (s.size !== i.size) return !1;
39
+ for (u = s.entries(); !(a = u.next()).done; )
40
+ if (!i.has(a.value[0])) return !1;
41
+ return !0;
42
+ }
43
+ if (n && ArrayBuffer.isView(s) && ArrayBuffer.isView(i)) {
44
+ if (l = s.length, l != i.length) return !1;
45
+ for (a = l; a-- !== 0; )
46
+ if (s[a] !== i[a]) return !1;
47
+ return !0;
48
+ }
49
+ if (s.constructor === RegExp) return s.source === i.source && s.flags === i.flags;
50
+ if (s.valueOf !== Object.prototype.valueOf && typeof s.valueOf == "function" && typeof i.valueOf == "function") return s.valueOf() === i.valueOf();
51
+ if (s.toString !== Object.prototype.toString && typeof s.toString == "function" && typeof i.toString == "function") return s.toString() === i.toString();
52
+ if (c = Object.keys(s), l = c.length, l !== Object.keys(i).length) return !1;
53
+ for (a = l; a-- !== 0; )
54
+ if (!Object.prototype.hasOwnProperty.call(i, c[a])) return !1;
55
+ if (e && s instanceof Element) return !1;
56
+ for (a = l; a-- !== 0; )
57
+ if (!((c[a] === "_owner" || c[a] === "__v" || c[a] === "__o") && s.$$typeof) && !o(s[c[a]], i[c[a]]))
58
+ return !1;
59
+ return !0;
60
+ }
61
+ return s !== s && i !== i;
62
+ }
63
+ return D = function(i, l) {
64
+ try {
65
+ return o(i, l);
66
+ } catch (a) {
67
+ if ((a.message || "").match(/stack|recursion/i))
68
+ return console.warn("react-fast-compare cannot handle circular refs"), !1;
69
+ throw a;
70
+ }
71
+ }, D;
72
+ }
73
+ var we = Oe();
74
+ const Se = /* @__PURE__ */ U(we);
75
+ var I, V;
76
+ function xe() {
77
+ if (V) return I;
78
+ V = 1;
79
+ var e = function(t, r, n, o, s, i, l, a) {
80
+ if (process.env.NODE_ENV !== "production" && r === void 0)
81
+ throw new Error("invariant requires an error message argument");
82
+ if (!t) {
83
+ var c;
84
+ if (r === void 0)
85
+ c = new Error(
86
+ "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
87
+ );
88
+ else {
89
+ var u = [n, o, s, i, l, a], f = 0;
90
+ c = new Error(
91
+ r.replace(/%s/g, function() {
92
+ return u[f++];
93
+ })
94
+ ), c.name = "Invariant Violation";
95
+ }
96
+ throw c.framesToPop = 1, c;
97
+ }
98
+ };
99
+ return I = e, I;
100
+ }
101
+ var Pe = xe();
102
+ const Z = /* @__PURE__ */ U(Pe);
103
+ var R, Y;
104
+ function De() {
105
+ return Y || (Y = 1, R = function(t, r, n, o) {
106
+ var s = n ? n.call(o, t, r) : void 0;
107
+ if (s !== void 0)
108
+ return !!s;
109
+ if (t === r)
110
+ return !0;
111
+ if (typeof t != "object" || !t || typeof r != "object" || !r)
112
+ return !1;
113
+ var i = Object.keys(t), l = Object.keys(r);
114
+ if (i.length !== l.length)
115
+ return !1;
116
+ for (var a = Object.prototype.hasOwnProperty.bind(r), c = 0; c < i.length; c++) {
117
+ var u = i[c];
118
+ if (!a(u))
119
+ return !1;
120
+ var f = t[u], m = r[u];
121
+ if (s = n ? n.call(o, f, m, u) : void 0, s === !1 || s === void 0 && f !== m)
122
+ return !1;
123
+ }
124
+ return !0;
125
+ }), R;
126
+ }
127
+ var Ie = De();
128
+ const Re = /* @__PURE__ */ U(Ie);
129
+ var X = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(X || {}), $ = {
130
+ link: { rel: ["amphtml", "canonical", "alternate"] },
131
+ script: { type: ["application/ld+json"] },
132
+ meta: {
133
+ charset: "",
134
+ name: ["generator", "robots", "description"],
135
+ property: [
136
+ "og:type",
137
+ "og:title",
138
+ "og:url",
139
+ "og:image",
140
+ "og:image:alt",
141
+ "og:description",
142
+ "twitter:url",
143
+ "twitter:title",
144
+ "twitter:description",
145
+ "twitter:image",
146
+ "twitter:image:alt",
147
+ "twitter:card",
148
+ "twitter:site"
149
+ ]
150
+ }
151
+ }, G = Object.values(X), K = {
152
+ accesskey: "accessKey",
153
+ charset: "charSet",
154
+ class: "className",
155
+ contenteditable: "contentEditable",
156
+ contextmenu: "contextMenu",
157
+ "http-equiv": "httpEquiv",
158
+ itemprop: "itemProp",
159
+ tabindex: "tabIndex"
160
+ }, $e = Object.entries(K).reduce(
161
+ (e, [t, r]) => (e[r] = t, e),
162
+ {}
163
+ ), h = "data-rh", b = {
164
+ DEFAULT_TITLE: "defaultTitle",
165
+ DEFER: "defer",
166
+ ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
167
+ ON_CHANGE_CLIENT_STATE: "onChangeClientState",
168
+ TITLE_TEMPLATE: "titleTemplate",
169
+ PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
170
+ }, C = (e, t) => {
171
+ for (let r = e.length - 1; r >= 0; r -= 1) {
172
+ const n = e[r];
173
+ if (Object.prototype.hasOwnProperty.call(n, t))
174
+ return n[t];
175
+ }
176
+ return null;
177
+ }, He = (e) => {
178
+ let t = C(
179
+ e,
180
+ "title"
181
+ /* TITLE */
182
+ );
183
+ const r = C(e, b.TITLE_TEMPLATE);
184
+ if (Array.isArray(t) && (t = t.join("")), r && t)
185
+ return r.replace(/%s/g, () => t);
186
+ const n = C(e, b.DEFAULT_TITLE);
187
+ return t || n || void 0;
188
+ }, _e = (e) => C(e, b.ON_CHANGE_CLIENT_STATE) || (() => {
189
+ }), H = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), je = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
190
+ if (!r.length) {
191
+ const o = Object.keys(n);
192
+ for (let s = 0; s < o.length; s += 1) {
193
+ const l = o[s].toLowerCase();
194
+ if (e.indexOf(l) !== -1 && n[l])
195
+ return r.concat(n);
196
+ }
197
+ }
198
+ return r;
199
+ }, []), ke = (e) => console && typeof console.warn == "function" && console.warn(e), O = (e, t, r) => {
200
+ const n = {};
201
+ return r.filter((o) => Array.isArray(o[e]) ? !0 : (typeof o[e] < "u" && ke(
202
+ `Helmet: ${e} should be of type "Array". Instead found type "${typeof o[e]}"`
203
+ ), !1)).map((o) => o[e]).reverse().reduce((o, s) => {
204
+ const i = {};
205
+ s.filter((a) => {
206
+ let c;
207
+ const u = Object.keys(a);
208
+ for (let m = 0; m < u.length; m += 1) {
209
+ const p = u[m], v = p.toLowerCase();
210
+ t.indexOf(v) !== -1 && !(c === "rel" && a[c].toLowerCase() === "canonical") && !(v === "rel" && a[v].toLowerCase() === "stylesheet") && (c = v), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (c = p);
211
+ }
212
+ if (!c || !a[c])
213
+ return !1;
214
+ const f = a[c].toLowerCase();
215
+ return n[c] || (n[c] = {}), i[c] || (i[c] = {}), n[c][f] ? !1 : (i[c][f] = !0, !0);
216
+ }).reverse().forEach((a) => o.push(a));
217
+ const l = Object.keys(i);
218
+ for (let a = 0; a < l.length; a += 1) {
219
+ const c = l[a], u = {
220
+ ...n[c],
221
+ ...i[c]
222
+ };
223
+ n[c] = u;
224
+ }
225
+ return o;
226
+ }, []).reverse();
227
+ }, Me = (e, t) => {
228
+ if (Array.isArray(e) && e.length) {
229
+ for (let r = 0; r < e.length; r += 1)
230
+ if (e[r][t])
231
+ return !0;
232
+ }
233
+ return !1;
234
+ }, Le = (e) => ({
235
+ baseTag: je([
236
+ "href"
237
+ /* HREF */
238
+ ], e),
239
+ bodyAttributes: H("bodyAttributes", e),
240
+ defer: C(e, b.DEFER),
241
+ encode: C(e, b.ENCODE_SPECIAL_CHARACTERS),
242
+ htmlAttributes: H("htmlAttributes", e),
243
+ linkTags: O(
244
+ "link",
245
+ [
246
+ "rel",
247
+ "href"
248
+ /* HREF */
249
+ ],
250
+ e
251
+ ),
252
+ metaTags: O(
253
+ "meta",
254
+ [
255
+ "name",
256
+ "charset",
257
+ "http-equiv",
258
+ "property",
259
+ "itemprop"
260
+ /* ITEM_PROP */
261
+ ],
262
+ e
263
+ ),
264
+ noscriptTags: O("noscript", [
265
+ "innerHTML"
266
+ /* INNER_HTML */
267
+ ], e),
268
+ onChangeClientState: _e(e),
269
+ scriptTags: O(
270
+ "script",
271
+ [
272
+ "src",
273
+ "innerHTML"
274
+ /* INNER_HTML */
275
+ ],
276
+ e
277
+ ),
278
+ styleTags: O("style", [
279
+ "cssText"
280
+ /* CSS_TEXT */
281
+ ], e),
282
+ title: He(e),
283
+ titleAttributes: H("titleAttributes", e),
284
+ prioritizeSeoTags: Me(e, b.PRIORITIZE_SEO_TAGS)
285
+ }), ee = (e) => Array.isArray(e) ? e.join("") : e, qe = (e, t) => {
286
+ const r = Object.keys(e);
287
+ for (let n = 0; n < r.length; n += 1)
288
+ if (t[r[n]] && t[r[n]].includes(e[r[n]]))
289
+ return !0;
290
+ return !1;
291
+ }, _ = (e, t) => Array.isArray(e) ? e.reduce(
292
+ (r, n) => (qe(n, t) ? r.priority.push(n) : r.default.push(n), r),
293
+ { priority: [], default: [] }
294
+ ) : { default: e, priority: [] }, Q = (e, t) => ({
295
+ ...e,
296
+ [t]: void 0
297
+ }), Fe = [
298
+ "noscript",
299
+ "script",
300
+ "style"
301
+ /* STYLE */
302
+ ], k = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), te = (e) => Object.keys(e).reduce((t, r) => {
303
+ const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
304
+ return t ? `${t} ${n}` : n;
305
+ }, ""), Ue = (e, t, r, n) => {
306
+ const o = te(r), s = ee(t);
307
+ return o ? `<${e} ${h}="true" ${o}>${k(
308
+ s,
309
+ n
310
+ )}</${e}>` : `<${e} ${h}="true">${k(
311
+ s,
312
+ n
313
+ )}</${e}>`;
314
+ }, Ke = (e, t, r = !0) => t.reduce((n, o) => {
315
+ const s = o, i = Object.keys(s).filter(
316
+ (c) => !(c === "innerHTML" || c === "cssText")
317
+ ).reduce((c, u) => {
318
+ const f = typeof s[u] > "u" ? u : `${u}="${k(s[u], r)}"`;
319
+ return c ? `${c} ${f}` : f;
320
+ }, ""), l = s.innerHTML || s.cssText || "", a = Fe.indexOf(e) === -1;
321
+ return `${n}<${e} ${h}="true" ${i}${a ? "/>" : `>${l}</${e}>`}`;
322
+ }, ""), re = (e, t = {}) => Object.keys(e).reduce((r, n) => {
323
+ const o = K[n];
324
+ return r[o || n] = e[n], r;
325
+ }, t), ze = (e, t, r) => {
326
+ const n = {
327
+ key: t,
328
+ [h]: !0
329
+ }, o = re(r, n);
330
+ return [g.createElement("title", o, t)];
331
+ }, P = (e, t) => t.map((r, n) => {
332
+ const o = {
333
+ key: n,
334
+ [h]: !0
335
+ };
336
+ return Object.keys(r).forEach((s) => {
337
+ const l = K[s] || s;
338
+ if (l === "innerHTML" || l === "cssText") {
339
+ const a = r.innerHTML || r.cssText;
340
+ o.dangerouslySetInnerHTML = { __html: a };
341
+ } else
342
+ o[l] = r[s];
343
+ }), g.createElement(e, o);
344
+ }), d = (e, t, r = !0) => {
345
+ switch (e) {
346
+ case "title":
347
+ return {
348
+ toComponent: () => ze(e, t.title, t.titleAttributes),
349
+ toString: () => Ue(e, t.title, t.titleAttributes, r)
350
+ };
351
+ case "bodyAttributes":
352
+ case "htmlAttributes":
353
+ return {
354
+ toComponent: () => re(t),
355
+ toString: () => te(t)
356
+ };
357
+ default:
358
+ return {
359
+ toComponent: () => P(e, t),
360
+ toString: () => Ke(e, t, r)
361
+ };
362
+ }
363
+ }, Ne = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
364
+ const o = _(e, $.meta), s = _(t, $.link), i = _(r, $.script);
365
+ return {
366
+ priorityMethods: {
367
+ toComponent: () => [
368
+ ...P("meta", o.priority),
369
+ ...P("link", s.priority),
370
+ ...P("script", i.priority)
371
+ ],
372
+ toString: () => (
373
+ // generate all the tags as strings and concatenate them
374
+ `${d("meta", o.priority, n)} ${d(
375
+ "link",
376
+ s.priority,
377
+ n
378
+ )} ${d("script", i.priority, n)}`
379
+ )
380
+ },
381
+ metaTags: o.default,
382
+ linkTags: s.default,
383
+ scriptTags: i.default
384
+ };
385
+ }, Be = (e) => {
386
+ const {
387
+ baseTag: t,
388
+ bodyAttributes: r,
389
+ encode: n = !0,
390
+ htmlAttributes: o,
391
+ noscriptTags: s,
392
+ styleTags: i,
393
+ title: l = "",
394
+ titleAttributes: a,
395
+ prioritizeSeoTags: c
396
+ } = e;
397
+ let { linkTags: u, metaTags: f, scriptTags: m } = e, p = {
398
+ toComponent: () => {
399
+ },
400
+ toString: () => ""
401
+ };
402
+ return c && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } = Ne(e)), {
403
+ priority: p,
404
+ base: d("base", t, n),
405
+ bodyAttributes: d("bodyAttributes", r, n),
406
+ htmlAttributes: d("htmlAttributes", o, n),
407
+ link: d("link", u, n),
408
+ meta: d("meta", f, n),
409
+ noscript: d("noscript", s, n),
410
+ script: d("script", m, n),
411
+ style: d("style", i, n),
412
+ title: d("title", { title: l, titleAttributes: a }, n)
413
+ };
414
+ }, M = Be, x = [], ne = !!(typeof window < "u" && window.document && window.document.createElement), L = class {
415
+ constructor(e, t) {
416
+ T(this, "instances", []);
417
+ T(this, "canUseDOM", ne);
418
+ T(this, "context");
419
+ T(this, "value", {
420
+ setHelmet: (e) => {
421
+ this.context.helmet = e;
422
+ },
423
+ helmetInstances: {
424
+ get: () => this.canUseDOM ? x : this.instances,
425
+ add: (e) => {
426
+ (this.canUseDOM ? x : this.instances).push(e);
427
+ },
428
+ remove: (e) => {
429
+ const t = (this.canUseDOM ? x : this.instances).indexOf(e);
430
+ (this.canUseDOM ? x : this.instances).splice(t, 1);
431
+ }
432
+ }
433
+ });
434
+ this.context = e, this.canUseDOM = t || !1, t || (e.helmet = M({
435
+ baseTag: [],
436
+ bodyAttributes: {},
437
+ htmlAttributes: {},
438
+ linkTags: [],
439
+ metaTags: [],
440
+ noscriptTags: [],
441
+ scriptTags: [],
442
+ styleTags: [],
443
+ title: "",
444
+ titleAttributes: {}
445
+ }));
446
+ }
447
+ }, Ve = {}, se = g.createContext(Ve), A, Ze = (A = class extends F {
448
+ constructor(r) {
449
+ super(r);
450
+ T(this, "helmetData");
451
+ this.helmetData = new L(this.props.context || {}, A.canUseDOM);
452
+ }
453
+ render() {
454
+ return /* @__PURE__ */ g.createElement(se.Provider, { value: this.helmetData.value }, this.props.children);
455
+ }
456
+ }, T(A, "canUseDOM", ne), A), E = (e, t) => {
457
+ const r = document.head || document.querySelector(
458
+ "head"
459
+ /* HEAD */
460
+ ), n = r.querySelectorAll(`${e}[${h}]`), o = [].slice.call(n), s = [];
461
+ let i;
462
+ return t && t.length && t.forEach((l) => {
463
+ const a = document.createElement(e);
464
+ for (const c in l)
465
+ if (Object.prototype.hasOwnProperty.call(l, c))
466
+ if (c === "innerHTML")
467
+ a.innerHTML = l.innerHTML;
468
+ else if (c === "cssText")
469
+ a.styleSheet ? a.styleSheet.cssText = l.cssText : a.appendChild(document.createTextNode(l.cssText));
470
+ else {
471
+ const u = c, f = typeof l[u] > "u" ? "" : l[u];
472
+ a.setAttribute(c, f);
473
+ }
474
+ a.setAttribute(h, "true"), o.some((c, u) => (i = u, a.isEqualNode(c))) ? o.splice(i, 1) : s.push(a);
475
+ }), o.forEach((l) => {
476
+ var a;
477
+ return (a = l.parentNode) == null ? void 0 : a.removeChild(l);
478
+ }), s.forEach((l) => r.appendChild(l)), {
479
+ oldTags: o,
480
+ newTags: s
481
+ };
482
+ }, q = (e, t) => {
483
+ const r = document.getElementsByTagName(e)[0];
484
+ if (!r)
485
+ return;
486
+ const n = r.getAttribute(h), o = n ? n.split(",") : [], s = [...o], i = Object.keys(t);
487
+ for (const l of i) {
488
+ const a = t[l] || "";
489
+ r.getAttribute(l) !== a && r.setAttribute(l, a), o.indexOf(l) === -1 && o.push(l);
490
+ const c = s.indexOf(l);
491
+ c !== -1 && s.splice(c, 1);
492
+ }
493
+ for (let l = s.length - 1; l >= 0; l -= 1)
494
+ r.removeAttribute(s[l]);
495
+ o.length === s.length ? r.removeAttribute(h) : r.getAttribute(h) !== i.join(",") && r.setAttribute(h, i.join(","));
496
+ }, Ye = (e, t) => {
497
+ typeof e < "u" && document.title !== e && (document.title = ee(e)), q("title", t);
498
+ }, W = (e, t) => {
499
+ const {
500
+ baseTag: r,
501
+ bodyAttributes: n,
502
+ htmlAttributes: o,
503
+ linkTags: s,
504
+ metaTags: i,
505
+ noscriptTags: l,
506
+ onChangeClientState: a,
507
+ scriptTags: c,
508
+ styleTags: u,
509
+ title: f,
510
+ titleAttributes: m
511
+ } = e;
512
+ q("body", n), q("html", o), Ye(f, m);
513
+ const p = {
514
+ baseTag: E("base", r),
515
+ linkTags: E("link", s),
516
+ metaTags: E("meta", i),
517
+ noscriptTags: E("noscript", l),
518
+ scriptTags: E("script", c),
519
+ styleTags: E("style", u)
520
+ }, v = {}, z = {};
521
+ Object.keys(p).forEach((S) => {
522
+ const { newTags: N, oldTags: ae } = p[S];
523
+ N.length && (v[S] = N), ae.length && (z[S] = p[S].oldTags);
524
+ }), t && t(), a(e, v, z);
525
+ }, w = null, Ge = (e) => {
526
+ w && cancelAnimationFrame(w), e.defer ? w = requestAnimationFrame(() => {
527
+ W(e, () => {
528
+ w = null;
529
+ });
530
+ }) : (W(e), w = null);
531
+ }, Qe = Ge, J = class extends F {
532
+ constructor() {
533
+ super(...arguments);
534
+ T(this, "rendered", !1);
535
+ }
536
+ shouldComponentUpdate(t) {
537
+ return !Re(t, this.props);
538
+ }
539
+ componentDidUpdate() {
540
+ this.emitChange();
541
+ }
542
+ componentWillUnmount() {
543
+ const { helmetInstances: t } = this.props.context;
544
+ t.remove(this), this.emitChange();
545
+ }
546
+ emitChange() {
547
+ const { helmetInstances: t, setHelmet: r } = this.props.context;
548
+ let n = null;
549
+ const o = Le(
550
+ t.get().map((s) => {
551
+ const i = { ...s.props };
552
+ return delete i.context, i;
553
+ })
554
+ );
555
+ Ze.canUseDOM ? Qe(o) : M && (n = M(o)), r(n);
556
+ }
557
+ // componentWillMount will be deprecated
558
+ // for SSR, initialize on first render
559
+ // constructor is also unsafe in StrictMode
560
+ init() {
561
+ if (this.rendered)
562
+ return;
563
+ this.rendered = !0;
564
+ const { helmetInstances: t } = this.props.context;
565
+ t.add(this), this.emitChange();
566
+ }
567
+ render() {
568
+ return this.init(), null;
569
+ }
570
+ }, j, We = (j = class extends F {
571
+ shouldComponentUpdate(e) {
572
+ return !Se(Q(this.props, "helmetData"), Q(e, "helmetData"));
573
+ }
574
+ mapNestedChildrenToProps(e, t) {
575
+ if (!t)
576
+ return null;
577
+ switch (e.type) {
578
+ case "script":
579
+ case "noscript":
580
+ return {
581
+ innerHTML: t
582
+ };
583
+ case "style":
584
+ return {
585
+ cssText: t
586
+ };
587
+ default:
588
+ throw new Error(
589
+ `<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
590
+ );
591
+ }
592
+ }
593
+ flattenArrayTypeChildren(e, t, r, n) {
594
+ return {
595
+ ...t,
596
+ [e.type]: [
597
+ ...t[e.type] || [],
598
+ {
599
+ ...r,
600
+ ...this.mapNestedChildrenToProps(e, n)
601
+ }
602
+ ]
603
+ };
604
+ }
605
+ mapObjectTypeChildren(e, t, r, n) {
606
+ switch (e.type) {
607
+ case "title":
608
+ return {
609
+ ...t,
610
+ [e.type]: n,
611
+ titleAttributes: { ...r }
612
+ };
613
+ case "body":
614
+ return {
615
+ ...t,
616
+ bodyAttributes: { ...r }
617
+ };
618
+ case "html":
619
+ return {
620
+ ...t,
621
+ htmlAttributes: { ...r }
622
+ };
623
+ default:
624
+ return {
625
+ ...t,
626
+ [e.type]: { ...r }
627
+ };
628
+ }
629
+ }
630
+ mapArrayTypeChildrenToProps(e, t) {
631
+ let r = { ...t };
632
+ return Object.keys(e).forEach((n) => {
633
+ r = {
634
+ ...r,
635
+ [n]: e[n]
636
+ };
637
+ }), r;
638
+ }
639
+ warnOnInvalidChildren(e, t) {
640
+ return Z(
641
+ G.some((r) => e.type === r),
642
+ typeof e.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : `Only elements types ${G.join(
643
+ ", "
644
+ )} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
645
+ ), Z(
646
+ !t || typeof t == "string" || Array.isArray(t) && !t.some((r) => typeof r != "string"),
647
+ `Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`
648
+ ), !0;
649
+ }
650
+ mapChildrenToProps(e, t) {
651
+ let r = {};
652
+ return g.Children.forEach(e, (n) => {
653
+ if (!n || !n.props)
654
+ return;
655
+ const { children: o, ...s } = n.props, i = Object.keys(s).reduce((a, c) => (a[$e[c] || c] = s[c], a), {});
656
+ let { type: l } = n;
657
+ switch (typeof l == "symbol" ? l = l.toString() : this.warnOnInvalidChildren(n, o), l) {
658
+ case "Symbol(react.fragment)":
659
+ t = this.mapChildrenToProps(o, t);
660
+ break;
661
+ case "link":
662
+ case "meta":
663
+ case "noscript":
664
+ case "script":
665
+ case "style":
666
+ r = this.flattenArrayTypeChildren(
667
+ n,
668
+ r,
669
+ i,
670
+ o
671
+ );
672
+ break;
673
+ default:
674
+ t = this.mapObjectTypeChildren(n, t, i, o);
675
+ break;
676
+ }
677
+ }), this.mapArrayTypeChildrenToProps(r, t);
678
+ }
679
+ render() {
680
+ const { children: e, ...t } = this.props;
681
+ let r = { ...t }, { helmetData: n } = t;
682
+ if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof L)) {
683
+ const o = n;
684
+ n = new L(o.context, !0), delete r.helmetData;
685
+ }
686
+ return n ? /* @__PURE__ */ g.createElement(J, { ...r, context: n.value }) : /* @__PURE__ */ g.createElement(se.Consumer, null, (o) => /* @__PURE__ */ g.createElement(J, { ...r, context: o }));
687
+ }
688
+ }, T(j, "defaultProps", {
689
+ defer: !0,
690
+ encodeSpecialCharacters: !0,
691
+ prioritizeSeoTags: !1
692
+ }), j);
693
+ const Je = fe(!1), Xe = "protected", ct = () => {
694
+ const e = le(), t = ce(), r = de(), n = me(), o = Ce(n.pathname), s = pe(Je), { protectedRoutes: i = [] } = t.options, l = !s && i.some(
695
+ (a) => he({ path: a, end: !0 }, n.pathname)
696
+ );
697
+ if (ue({
698
+ queryKey: ["login-redirect"],
699
+ queryFn: async () => {
700
+ var a;
701
+ return await new Promise((c) => setTimeout(c, 1200)), await ((a = t.authentication) == null ? void 0 : a.signIn({
702
+ redirectTo: o.current
703
+ })), !0;
704
+ },
705
+ enabled: typeof window < "u" && l && !e.isPending && !e.isAuthenticated
706
+ }), l && !e.isAuthenticated)
707
+ return /* @__PURE__ */ y.jsx(
708
+ Te,
709
+ {
710
+ open: !0,
711
+ onOpenChange: (a) => {
712
+ a || r(-1);
713
+ },
714
+ children: /* @__PURE__ */ y.jsxs(ge, { children: [
715
+ /* @__PURE__ */ y.jsx(ve, { children: /* @__PURE__ */ y.jsx(Ae, { children: "Logging you in..." }) }),
716
+ /* @__PURE__ */ y.jsx(Ee, { children: "Please wait while we log you in." })
717
+ ] })
718
+ }
719
+ );
720
+ if (l && !e.isAuthEnabled)
721
+ throw new be("Authentication is not enabled", {
722
+ title: "Authentication is not enabled",
723
+ developerHint: "To use protectedRoutes you need authentication to be enabled"
724
+ });
725
+ return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
726
+ s && /* @__PURE__ */ y.jsx(We, { children: /* @__PURE__ */ y.jsx(
727
+ "meta",
728
+ {
729
+ name: "pagefind",
730
+ "data-pagefind-filter": `section:${Xe}`,
731
+ content: "true"
732
+ }
733
+ ) }),
734
+ /* @__PURE__ */ y.jsx(ye, {})
735
+ ] });
736
+ };
737
+ export {
738
+ Je as B,
739
+ We as H,
740
+ ct as R,
741
+ Xe as S,
742
+ Ze as a
743
+ };
744
+ //# sourceMappingURL=RouteGuard-CqZPoZYJ.js.map