zudoku 0.3.0-dev.21 → 0.3.0-dev.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.d.ts +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/plugins/api-keys/index.js +1 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +6 -0
- package/dist/lib/plugins/openapi/Route.js +8 -0
- package/dist/lib/plugins/openapi/Route.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +5 -0
- package/dist/lib/plugins/openapi/context.js +11 -0
- package/dist/lib/plugins/openapi/context.js.map +1 -0
- package/dist/lib/plugins/openapi/index.d.ts +1 -19
- package/dist/lib/plugins/openapi/index.js +17 -18
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
- package/dist/lib/plugins/openapi/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
- package/lib/{util-voKLTRDG.js → AnchorLink-DIUlXlf0.js} +149 -184
- package/lib/DevPortalProvider-gzyAGqHT.js +1080 -0
- package/lib/{Markdown-5LmPZyLV.js → Markdown-BjA7peYW.js} +3 -3
- package/lib/{MdxComponents-DYD_QPVF.js → MdxComponents-W-fE1ISO.js} +130 -129
- package/lib/MdxPage-DQ7lZBzE.js +216 -0
- package/lib/OperationList-DuIBqFNA.js +5545 -0
- package/lib/Route-B98Y2MdH.js +13 -0
- package/lib/{Select-DR3PiqjV.js → Select-DczD5e29.js} +24 -22
- package/lib/{Spinner-DjQ2eBxC.js → Spinner-CSoij67T.js} +3 -3
- package/lib/cn-DpqTslo9.js +2341 -0
- package/lib/context-_fYfJFgk.js +13 -0
- package/lib/{hook-FCY9-FHO.js → hook-CBXxHulF.js} +1 -1
- package/lib/{index-By9bEW57.js → index-C7O9D7f6.js} +15 -15
- package/lib/index-CKvOcM7w.js +712 -0
- package/lib/index-Cg6lXS1z.js +709 -0
- package/lib/index-ClDDiRmC.js +463 -0
- package/lib/router-DibNxKUP.js +3008 -0
- package/lib/util-CaVongBq.js +40 -0
- package/lib/zudoku.auth-openid.js +7 -6
- package/lib/zudoku.components.js +73 -69
- package/lib/zudoku.plugin-api-keys.js +26 -23
- package/lib/zudoku.plugin-markdown.js +33 -237
- package/lib/zudoku.plugin-openapi.js +5 -6238
- package/lib/zudoku.plugin-redirect.js +7 -6
- package/package.json +1 -1
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/plugins/api-keys/index.tsx +1 -0
- package/src/lib/plugins/markdown/generateRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +21 -0
- package/src/lib/plugins/openapi/context.tsx +16 -0
- package/src/lib/plugins/openapi/index.tsx +19 -46
- package/src/lib/plugins/openapi/interfaces.ts +9 -0
- package/lib/DevPortalProvider-CRKuwoXc.js +0 -4123
- package/lib/index-PyGcnQFX.js +0 -3462
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var T = (e, t, r) =>
|
|
1
|
+
var ne = Object.defineProperty;
|
|
2
|
+
var se = (e, t, r) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var T = (e, t, r) => se(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import d, { Component as L } from "react";
|
|
5
5
|
import { g as F } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
|
-
import {
|
|
7
|
-
import { L as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { j as oe } from "./router-DibNxKUP.js";
|
|
7
|
+
import { L as ie } from "./index-CKvOcM7w.js";
|
|
8
|
+
import { u as ae } from "./index-ClDDiRmC.js";
|
|
9
|
+
const M = {}, X = d.createContext(M);
|
|
10
|
+
function le(e) {
|
|
11
|
+
const t = d.useContext(X);
|
|
11
12
|
return d.useMemo(
|
|
12
13
|
function() {
|
|
13
14
|
return typeof e == "function" ? e(t) : { ...t, ...e };
|
|
@@ -15,15 +16,15 @@ function fe(e) {
|
|
|
15
16
|
[t, e]
|
|
16
17
|
);
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function Ne(e) {
|
|
19
20
|
let t;
|
|
20
|
-
return e.disableParentContext ? t = typeof e.components == "function" ? e.components(M) : e.components || M : t =
|
|
21
|
-
|
|
21
|
+
return e.disableParentContext ? t = typeof e.components == "function" ? e.components(M) : e.components || M : t = le(e.components), d.createElement(
|
|
22
|
+
X.Provider,
|
|
22
23
|
{ value: t },
|
|
23
24
|
e.children
|
|
24
25
|
);
|
|
25
26
|
}
|
|
26
|
-
var
|
|
27
|
+
var ce = typeof Element < "u", ue = typeof Map == "function", fe = typeof Set == "function", pe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
27
28
|
function x(e, t) {
|
|
28
29
|
if (e === t) return !0;
|
|
29
30
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -36,7 +37,7 @@ function x(e, t) {
|
|
|
36
37
|
return !0;
|
|
37
38
|
}
|
|
38
39
|
var o;
|
|
39
|
-
if (
|
|
40
|
+
if (ue && e instanceof Map && t instanceof Map) {
|
|
40
41
|
if (e.size !== t.size) return !1;
|
|
41
42
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
42
43
|
if (!t.has(n.value[0])) return !1;
|
|
@@ -44,13 +45,13 @@ function x(e, t) {
|
|
|
44
45
|
if (!x(n.value[1], t.get(n.value[0]))) return !1;
|
|
45
46
|
return !0;
|
|
46
47
|
}
|
|
47
|
-
if (
|
|
48
|
+
if (fe && e instanceof Set && t instanceof Set) {
|
|
48
49
|
if (e.size !== t.size) return !1;
|
|
49
50
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
50
51
|
if (!t.has(n.value[0])) return !1;
|
|
51
52
|
return !0;
|
|
52
53
|
}
|
|
53
|
-
if (
|
|
54
|
+
if (pe && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
54
55
|
if (r = e.length, r != t.length) return !1;
|
|
55
56
|
for (n = r; n-- !== 0; )
|
|
56
57
|
if (e[n] !== t[n]) return !1;
|
|
@@ -62,7 +63,7 @@ function x(e, t) {
|
|
|
62
63
|
if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
|
|
63
64
|
for (n = r; n-- !== 0; )
|
|
64
65
|
if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
|
|
65
|
-
if (
|
|
66
|
+
if (ce && e instanceof Element) return !1;
|
|
66
67
|
for (n = r; n-- !== 0; )
|
|
67
68
|
if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !x(e[s[n]], t[s[n]]))
|
|
68
69
|
return !1;
|
|
@@ -70,7 +71,7 @@ function x(e, t) {
|
|
|
70
71
|
}
|
|
71
72
|
return e !== e && t !== t;
|
|
72
73
|
}
|
|
73
|
-
var
|
|
74
|
+
var me = function(t, r) {
|
|
74
75
|
try {
|
|
75
76
|
return x(t, r);
|
|
76
77
|
} catch (n) {
|
|
@@ -79,29 +80,29 @@ var ye = function(t, r) {
|
|
|
79
80
|
throw n;
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
|
-
const
|
|
83
|
-
var
|
|
83
|
+
const de = /* @__PURE__ */ F(me);
|
|
84
|
+
var he = function(e, t, r, n, s, o, c, i) {
|
|
84
85
|
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
85
86
|
throw new Error("invariant requires an error message argument");
|
|
86
87
|
if (!e) {
|
|
87
|
-
var
|
|
88
|
+
var a;
|
|
88
89
|
if (t === void 0)
|
|
89
|
-
|
|
90
|
+
a = new Error(
|
|
90
91
|
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
91
92
|
);
|
|
92
93
|
else {
|
|
93
|
-
var l = [r, n, s, o, c,
|
|
94
|
-
|
|
94
|
+
var l = [r, n, s, o, c, i], u = 0;
|
|
95
|
+
a = new Error(
|
|
95
96
|
t.replace(/%s/g, function() {
|
|
96
97
|
return l[u++];
|
|
97
98
|
})
|
|
98
|
-
),
|
|
99
|
+
), a.name = "Invariant Violation";
|
|
99
100
|
}
|
|
100
|
-
throw
|
|
101
|
+
throw a.framesToPop = 1, a;
|
|
101
102
|
}
|
|
102
|
-
},
|
|
103
|
-
const z = /* @__PURE__ */ F(
|
|
104
|
-
var
|
|
103
|
+
}, ye = he;
|
|
104
|
+
const z = /* @__PURE__ */ F(ye);
|
|
105
|
+
var Te = function(t, r, n, s) {
|
|
105
106
|
var o = n ? n.call(s, t, r) : void 0;
|
|
106
107
|
if (o !== void 0)
|
|
107
108
|
return !!o;
|
|
@@ -109,12 +110,12 @@ var Ae = function(t, r, n, s) {
|
|
|
109
110
|
return !0;
|
|
110
111
|
if (typeof t != "object" || !t || typeof r != "object" || !r)
|
|
111
112
|
return !1;
|
|
112
|
-
var c = Object.keys(t),
|
|
113
|
-
if (c.length !==
|
|
113
|
+
var c = Object.keys(t), i = Object.keys(r);
|
|
114
|
+
if (c.length !== i.length)
|
|
114
115
|
return !1;
|
|
115
|
-
for (var
|
|
116
|
+
for (var a = Object.prototype.hasOwnProperty.bind(r), l = 0; l < c.length; l++) {
|
|
116
117
|
var u = c[l];
|
|
117
|
-
if (!
|
|
118
|
+
if (!a(u))
|
|
118
119
|
return !1;
|
|
119
120
|
var f = t[u], h = r[u];
|
|
120
121
|
if (o = n ? n.call(s, f, h, u) : void 0, o === !1 || o === void 0 && f !== h)
|
|
@@ -122,8 +123,8 @@ var Ae = function(t, r, n, s) {
|
|
|
122
123
|
}
|
|
123
124
|
return !0;
|
|
124
125
|
};
|
|
125
|
-
const
|
|
126
|
-
var
|
|
126
|
+
const ge = /* @__PURE__ */ F(Te);
|
|
127
|
+
var W = /* @__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))(W || {}), $ = {
|
|
127
128
|
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
128
129
|
script: { type: ["application/ld+json"] },
|
|
129
130
|
meta: {
|
|
@@ -145,7 +146,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
145
146
|
"twitter:site"
|
|
146
147
|
]
|
|
147
148
|
}
|
|
148
|
-
},
|
|
149
|
+
}, N = Object.values(W), U = {
|
|
149
150
|
accesskey: "accessKey",
|
|
150
151
|
charset: "charSet",
|
|
151
152
|
class: "className",
|
|
@@ -154,7 +155,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
154
155
|
"http-equiv": "httpEquiv",
|
|
155
156
|
itemprop: "itemProp",
|
|
156
157
|
tabindex: "tabIndex"
|
|
157
|
-
},
|
|
158
|
+
}, ve = Object.entries(U).reduce(
|
|
158
159
|
(e, [t, r]) => (e[r] = t, e),
|
|
159
160
|
{}
|
|
160
161
|
), y = "data-rh", C = {
|
|
@@ -171,7 +172,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
171
172
|
return n[t];
|
|
172
173
|
}
|
|
173
174
|
return null;
|
|
174
|
-
},
|
|
175
|
+
}, Ae = (e) => {
|
|
175
176
|
let t = E(
|
|
176
177
|
e,
|
|
177
178
|
"title"
|
|
@@ -182,38 +183,38 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
182
183
|
return r.replace(/%s/g, () => t);
|
|
183
184
|
const n = E(e, C.DEFAULT_TITLE);
|
|
184
185
|
return t || n || void 0;
|
|
185
|
-
},
|
|
186
|
-
}), I = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}),
|
|
186
|
+
}, Ce = (e) => E(e, C.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
187
|
+
}), I = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), Ee = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
|
|
187
188
|
if (!r.length) {
|
|
188
189
|
const s = Object.keys(n);
|
|
189
190
|
for (let o = 0; o < s.length; o += 1) {
|
|
190
|
-
const
|
|
191
|
-
if (e.indexOf(
|
|
191
|
+
const i = s[o].toLowerCase();
|
|
192
|
+
if (e.indexOf(i) !== -1 && n[i])
|
|
192
193
|
return r.concat(n);
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
return r;
|
|
196
|
-
}, []),
|
|
197
|
+
}, []), be = (e) => console && typeof console.warn == "function" && console.warn(e), b = (e, t, r) => {
|
|
197
198
|
const n = {};
|
|
198
|
-
return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" &&
|
|
199
|
+
return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && be(
|
|
199
200
|
`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
|
|
200
201
|
), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
|
|
201
202
|
const c = {};
|
|
202
|
-
o.filter((
|
|
203
|
+
o.filter((a) => {
|
|
203
204
|
let l;
|
|
204
|
-
const u = Object.keys(
|
|
205
|
+
const u = Object.keys(a);
|
|
205
206
|
for (let h = 0; h < u.length; h += 1) {
|
|
206
207
|
const p = u[h], g = p.toLowerCase();
|
|
207
|
-
t.indexOf(g) !== -1 && !(l === "rel" &&
|
|
208
|
+
t.indexOf(g) !== -1 && !(l === "rel" && a[l].toLowerCase() === "canonical") && !(g === "rel" && a[g].toLowerCase() === "stylesheet") && (l = g), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (l = p);
|
|
208
209
|
}
|
|
209
|
-
if (!l || !
|
|
210
|
+
if (!l || !a[l])
|
|
210
211
|
return !1;
|
|
211
|
-
const f =
|
|
212
|
+
const f = a[l].toLowerCase();
|
|
212
213
|
return n[l] || (n[l] = {}), c[l] || (c[l] = {}), n[l][f] ? !1 : (c[l][f] = !0, !0);
|
|
213
|
-
}).reverse().forEach((
|
|
214
|
-
const
|
|
215
|
-
for (let
|
|
216
|
-
const l = a
|
|
214
|
+
}).reverse().forEach((a) => s.push(a));
|
|
215
|
+
const i = Object.keys(c);
|
|
216
|
+
for (let a = 0; a < i.length; a += 1) {
|
|
217
|
+
const l = i[a], u = {
|
|
217
218
|
...n[l],
|
|
218
219
|
...c[l]
|
|
219
220
|
};
|
|
@@ -221,15 +222,15 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
221
222
|
}
|
|
222
223
|
return s;
|
|
223
224
|
}, []).reverse();
|
|
224
|
-
},
|
|
225
|
+
}, Oe = (e, t) => {
|
|
225
226
|
if (Array.isArray(e) && e.length) {
|
|
226
227
|
for (let r = 0; r < e.length; r += 1)
|
|
227
228
|
if (e[r][t])
|
|
228
229
|
return !0;
|
|
229
230
|
}
|
|
230
231
|
return !1;
|
|
231
|
-
},
|
|
232
|
-
baseTag:
|
|
232
|
+
}, Se = (e) => ({
|
|
233
|
+
baseTag: Ee([
|
|
233
234
|
"href"
|
|
234
235
|
/* HREF */
|
|
235
236
|
], e),
|
|
@@ -262,7 +263,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
262
263
|
"innerHTML"
|
|
263
264
|
/* INNER_HTML */
|
|
264
265
|
], e),
|
|
265
|
-
onChangeClientState:
|
|
266
|
+
onChangeClientState: Ce(e),
|
|
266
267
|
scriptTags: b(
|
|
267
268
|
"script",
|
|
268
269
|
[
|
|
@@ -276,31 +277,31 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
276
277
|
"cssText"
|
|
277
278
|
/* CSS_TEXT */
|
|
278
279
|
], e),
|
|
279
|
-
title:
|
|
280
|
+
title: Ae(e),
|
|
280
281
|
titleAttributes: I("titleAttributes", e),
|
|
281
|
-
prioritizeSeoTags:
|
|
282
|
-
}),
|
|
282
|
+
prioritizeSeoTags: Oe(e, C.PRIORITIZE_SEO_TAGS)
|
|
283
|
+
}), Z = (e) => Array.isArray(e) ? e.join("") : e, we = (e, t) => {
|
|
283
284
|
const r = Object.keys(e);
|
|
284
285
|
for (let n = 0; n < r.length; n += 1)
|
|
285
286
|
if (t[r[n]] && t[r[n]].includes(e[r[n]]))
|
|
286
287
|
return !0;
|
|
287
288
|
return !1;
|
|
288
289
|
}, H = (e, t) => Array.isArray(e) ? e.reduce(
|
|
289
|
-
(r, n) => (
|
|
290
|
+
(r, n) => (we(n, t) ? r.priority.push(n) : r.default.push(n), r),
|
|
290
291
|
{ priority: [], default: [] }
|
|
291
|
-
) : { default: e, priority: [] },
|
|
292
|
+
) : { default: e, priority: [] }, V = (e, t) => ({
|
|
292
293
|
...e,
|
|
293
294
|
[t]: void 0
|
|
294
|
-
}),
|
|
295
|
+
}), xe = [
|
|
295
296
|
"noscript",
|
|
296
297
|
"script",
|
|
297
298
|
"style"
|
|
298
299
|
/* STYLE */
|
|
299
|
-
], k = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"),
|
|
300
|
+
], k = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), G = (e) => Object.keys(e).reduce((t, r) => {
|
|
300
301
|
const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
|
|
301
302
|
return t ? `${t} ${n}` : n;
|
|
302
|
-
}, ""),
|
|
303
|
-
const s =
|
|
303
|
+
}, ""), Pe = (e, t, r, n) => {
|
|
304
|
+
const s = G(r), o = Z(t);
|
|
304
305
|
return s ? `<${e} ${y}="true" ${s}>${k(
|
|
305
306
|
o,
|
|
306
307
|
n
|
|
@@ -308,22 +309,22 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
308
309
|
o,
|
|
309
310
|
n
|
|
310
311
|
)}</${e}>`;
|
|
311
|
-
},
|
|
312
|
+
}, $e = (e, t, r = !0) => t.reduce((n, s) => {
|
|
312
313
|
const o = s, c = Object.keys(o).filter(
|
|
313
314
|
(l) => !(l === "innerHTML" || l === "cssText")
|
|
314
315
|
).reduce((l, u) => {
|
|
315
316
|
const f = typeof o[u] > "u" ? u : `${u}="${k(o[u], r)}"`;
|
|
316
317
|
return l ? `${l} ${f}` : f;
|
|
317
|
-
}, ""),
|
|
318
|
-
return `${n}<${e} ${y}="true" ${c}${
|
|
319
|
-
}, ""),
|
|
318
|
+
}, ""), i = o.innerHTML || o.cssText || "", a = xe.indexOf(e) === -1;
|
|
319
|
+
return `${n}<${e} ${y}="true" ${c}${a ? "/>" : `>${i}</${e}>`}`;
|
|
320
|
+
}, ""), J = (e, t = {}) => Object.keys(e).reduce((r, n) => {
|
|
320
321
|
const s = U[n];
|
|
321
322
|
return r[s || n] = e[n], r;
|
|
322
|
-
}, t),
|
|
323
|
+
}, t), Ie = (e, t, r) => {
|
|
323
324
|
const n = {
|
|
324
325
|
key: t,
|
|
325
326
|
[y]: !0
|
|
326
|
-
}, s =
|
|
327
|
+
}, s = J(r, n);
|
|
327
328
|
return [d.createElement("title", s, t)];
|
|
328
329
|
}, P = (e, t) => t.map((r, n) => {
|
|
329
330
|
const s = {
|
|
@@ -331,33 +332,33 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
331
332
|
[y]: !0
|
|
332
333
|
};
|
|
333
334
|
return Object.keys(r).forEach((o) => {
|
|
334
|
-
const
|
|
335
|
-
if (
|
|
336
|
-
const
|
|
337
|
-
s.dangerouslySetInnerHTML = { __html:
|
|
335
|
+
const i = U[o] || o;
|
|
336
|
+
if (i === "innerHTML" || i === "cssText") {
|
|
337
|
+
const a = r.innerHTML || r.cssText;
|
|
338
|
+
s.dangerouslySetInnerHTML = { __html: a };
|
|
338
339
|
} else
|
|
339
|
-
s[
|
|
340
|
+
s[i] = r[o];
|
|
340
341
|
}), d.createElement(e, s);
|
|
341
342
|
}), m = (e, t, r = !0) => {
|
|
342
343
|
switch (e) {
|
|
343
344
|
case "title":
|
|
344
345
|
return {
|
|
345
|
-
toComponent: () =>
|
|
346
|
-
toString: () =>
|
|
346
|
+
toComponent: () => Ie(e, t.title, t.titleAttributes),
|
|
347
|
+
toString: () => Pe(e, t.title, t.titleAttributes, r)
|
|
347
348
|
};
|
|
348
349
|
case "bodyAttributes":
|
|
349
350
|
case "htmlAttributes":
|
|
350
351
|
return {
|
|
351
|
-
toComponent: () =>
|
|
352
|
-
toString: () =>
|
|
352
|
+
toComponent: () => J(t),
|
|
353
|
+
toString: () => G(t)
|
|
353
354
|
};
|
|
354
355
|
default:
|
|
355
356
|
return {
|
|
356
357
|
toComponent: () => P(e, t),
|
|
357
|
-
toString: () =>
|
|
358
|
+
toString: () => $e(e, t, r)
|
|
358
359
|
};
|
|
359
360
|
}
|
|
360
|
-
},
|
|
361
|
+
}, He = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
|
|
361
362
|
const s = H(e, $.meta), o = H(t, $.link), c = H(r, $.script);
|
|
362
363
|
return {
|
|
363
364
|
priorityMethods: {
|
|
@@ -379,7 +380,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
379
380
|
linkTags: o.default,
|
|
380
381
|
scriptTags: c.default
|
|
381
382
|
};
|
|
382
|
-
},
|
|
383
|
+
}, De = (e) => {
|
|
383
384
|
const {
|
|
384
385
|
baseTag: t,
|
|
385
386
|
bodyAttributes: r,
|
|
@@ -387,8 +388,8 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
387
388
|
htmlAttributes: s,
|
|
388
389
|
noscriptTags: o,
|
|
389
390
|
styleTags: c,
|
|
390
|
-
title:
|
|
391
|
-
titleAttributes:
|
|
391
|
+
title: i = "",
|
|
392
|
+
titleAttributes: a,
|
|
392
393
|
prioritizeSeoTags: l
|
|
393
394
|
} = e;
|
|
394
395
|
let { linkTags: u, metaTags: f, scriptTags: h } = e, p = {
|
|
@@ -396,7 +397,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
396
397
|
},
|
|
397
398
|
toString: () => ""
|
|
398
399
|
};
|
|
399
|
-
return l && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } =
|
|
400
|
+
return l && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } = He(e)), {
|
|
400
401
|
priority: p,
|
|
401
402
|
base: m("base", t, n),
|
|
402
403
|
bodyAttributes: m("bodyAttributes", r, n),
|
|
@@ -406,12 +407,12 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
406
407
|
noscript: m("noscript", o, n),
|
|
407
408
|
script: m("script", h, n),
|
|
408
409
|
style: m("style", c, n),
|
|
409
|
-
title: m("title", { title:
|
|
410
|
+
title: m("title", { title: i, titleAttributes: a }, n)
|
|
410
411
|
};
|
|
411
|
-
}, _ =
|
|
412
|
+
}, _ = De, w = [], Q = !!(typeof window < "u" && window.document && window.document.createElement), R = class {
|
|
412
413
|
constructor(e, t) {
|
|
413
414
|
T(this, "instances", []);
|
|
414
|
-
T(this, "canUseDOM",
|
|
415
|
+
T(this, "canUseDOM", Q);
|
|
415
416
|
T(this, "context");
|
|
416
417
|
T(this, "value", {
|
|
417
418
|
setHelmet: (e) => {
|
|
@@ -442,57 +443,57 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
442
443
|
titleAttributes: {}
|
|
443
444
|
}));
|
|
444
445
|
}
|
|
445
|
-
},
|
|
446
|
+
}, Me = {}, ee = d.createContext(Me), v, te = (v = class extends L {
|
|
446
447
|
constructor(r) {
|
|
447
448
|
super(r);
|
|
448
449
|
T(this, "helmetData");
|
|
449
|
-
this.helmetData = new
|
|
450
|
+
this.helmetData = new R(this.props.context || {}, v.canUseDOM);
|
|
450
451
|
}
|
|
451
452
|
render() {
|
|
452
|
-
return /* @__PURE__ */ d.createElement(
|
|
453
|
+
return /* @__PURE__ */ d.createElement(ee.Provider, { value: this.helmetData.value }, this.props.children);
|
|
453
454
|
}
|
|
454
|
-
}, T(v, "canUseDOM",
|
|
455
|
+
}, T(v, "canUseDOM", Q), v), A = (e, t) => {
|
|
455
456
|
const r = document.head || document.querySelector(
|
|
456
457
|
"head"
|
|
457
458
|
/* HEAD */
|
|
458
459
|
), n = r.querySelectorAll(`${e}[${y}]`), s = [].slice.call(n), o = [];
|
|
459
460
|
let c;
|
|
460
|
-
return t && t.length && t.forEach((
|
|
461
|
-
const
|
|
462
|
-
for (const l in
|
|
463
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
461
|
+
return t && t.length && t.forEach((i) => {
|
|
462
|
+
const a = document.createElement(e);
|
|
463
|
+
for (const l in i)
|
|
464
|
+
if (Object.prototype.hasOwnProperty.call(i, l))
|
|
464
465
|
if (l === "innerHTML")
|
|
465
|
-
|
|
466
|
+
a.innerHTML = i.innerHTML;
|
|
466
467
|
else if (l === "cssText")
|
|
467
|
-
|
|
468
|
+
a.styleSheet ? a.styleSheet.cssText = i.cssText : a.appendChild(document.createTextNode(i.cssText));
|
|
468
469
|
else {
|
|
469
|
-
const u = l, f = typeof
|
|
470
|
-
|
|
470
|
+
const u = l, f = typeof i[u] > "u" ? "" : i[u];
|
|
471
|
+
a.setAttribute(l, f);
|
|
471
472
|
}
|
|
472
|
-
|
|
473
|
-
}), s.forEach((
|
|
474
|
-
var
|
|
475
|
-
return (
|
|
476
|
-
}), o.forEach((
|
|
473
|
+
a.setAttribute(y, "true"), s.some((l, u) => (c = u, a.isEqualNode(l))) ? s.splice(c, 1) : o.push(a);
|
|
474
|
+
}), s.forEach((i) => {
|
|
475
|
+
var a;
|
|
476
|
+
return (a = i.parentNode) == null ? void 0 : a.removeChild(i);
|
|
477
|
+
}), o.forEach((i) => r.appendChild(i)), {
|
|
477
478
|
oldTags: s,
|
|
478
479
|
newTags: o
|
|
479
480
|
};
|
|
480
|
-
},
|
|
481
|
+
}, j = (e, t) => {
|
|
481
482
|
const r = document.getElementsByTagName(e)[0];
|
|
482
483
|
if (!r)
|
|
483
484
|
return;
|
|
484
485
|
const n = r.getAttribute(y), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
|
|
485
|
-
for (const
|
|
486
|
-
const
|
|
487
|
-
r.getAttribute(
|
|
488
|
-
const l = o.indexOf(
|
|
486
|
+
for (const i of c) {
|
|
487
|
+
const a = t[i] || "";
|
|
488
|
+
r.getAttribute(i) !== a && r.setAttribute(i, a), s.indexOf(i) === -1 && s.push(i);
|
|
489
|
+
const l = o.indexOf(i);
|
|
489
490
|
l !== -1 && o.splice(l, 1);
|
|
490
491
|
}
|
|
491
|
-
for (let
|
|
492
|
-
r.removeAttribute(o[
|
|
492
|
+
for (let i = o.length - 1; i >= 0; i -= 1)
|
|
493
|
+
r.removeAttribute(o[i]);
|
|
493
494
|
s.length === o.length ? r.removeAttribute(y) : r.getAttribute(y) !== c.join(",") && r.setAttribute(y, c.join(","));
|
|
494
|
-
},
|
|
495
|
-
typeof e < "u" && document.title !== e && (document.title =
|
|
495
|
+
}, ke = (e, t) => {
|
|
496
|
+
typeof e < "u" && document.title !== e && (document.title = Z(e)), j("title", t);
|
|
496
497
|
}, Y = (e, t) => {
|
|
497
498
|
const {
|
|
498
499
|
baseTag: r,
|
|
@@ -500,39 +501,39 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
500
501
|
htmlAttributes: s,
|
|
501
502
|
linkTags: o,
|
|
502
503
|
metaTags: c,
|
|
503
|
-
noscriptTags:
|
|
504
|
-
onChangeClientState:
|
|
504
|
+
noscriptTags: i,
|
|
505
|
+
onChangeClientState: a,
|
|
505
506
|
scriptTags: l,
|
|
506
507
|
styleTags: u,
|
|
507
508
|
title: f,
|
|
508
509
|
titleAttributes: h
|
|
509
510
|
} = e;
|
|
510
|
-
|
|
511
|
+
j("body", n), j("html", s), ke(f, h);
|
|
511
512
|
const p = {
|
|
512
513
|
baseTag: A("base", r),
|
|
513
514
|
linkTags: A("link", o),
|
|
514
515
|
metaTags: A("meta", c),
|
|
515
|
-
noscriptTags: A("noscript",
|
|
516
|
+
noscriptTags: A("noscript", i),
|
|
516
517
|
scriptTags: A("script", l),
|
|
517
518
|
styleTags: A("style", u)
|
|
518
|
-
}, g = {},
|
|
519
|
+
}, g = {}, q = {};
|
|
519
520
|
Object.keys(p).forEach((S) => {
|
|
520
|
-
const { newTags: K, oldTags:
|
|
521
|
-
K.length && (g[S] = K),
|
|
522
|
-
}), t && t(),
|
|
523
|
-
}, O = null,
|
|
521
|
+
const { newTags: K, oldTags: re } = p[S];
|
|
522
|
+
K.length && (g[S] = K), re.length && (q[S] = p[S].oldTags);
|
|
523
|
+
}), t && t(), a(e, g, q);
|
|
524
|
+
}, O = null, _e = (e) => {
|
|
524
525
|
O && cancelAnimationFrame(O), e.defer ? O = requestAnimationFrame(() => {
|
|
525
526
|
Y(e, () => {
|
|
526
527
|
O = null;
|
|
527
528
|
});
|
|
528
529
|
}) : (Y(e), O = null);
|
|
529
|
-
},
|
|
530
|
+
}, Re = _e, B = class extends L {
|
|
530
531
|
constructor() {
|
|
531
532
|
super(...arguments);
|
|
532
533
|
T(this, "rendered", !1);
|
|
533
534
|
}
|
|
534
535
|
shouldComponentUpdate(t) {
|
|
535
|
-
return !
|
|
536
|
+
return !ge(t, this.props);
|
|
536
537
|
}
|
|
537
538
|
componentDidUpdate() {
|
|
538
539
|
this.emitChange();
|
|
@@ -544,13 +545,13 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
544
545
|
emitChange() {
|
|
545
546
|
const { helmetInstances: t, setHelmet: r } = this.props.context;
|
|
546
547
|
let n = null;
|
|
547
|
-
const s =
|
|
548
|
+
const s = Se(
|
|
548
549
|
t.get().map((o) => {
|
|
549
550
|
const c = { ...o.props };
|
|
550
551
|
return delete c.context, c;
|
|
551
552
|
})
|
|
552
553
|
);
|
|
553
|
-
|
|
554
|
+
te.canUseDOM ? Re(s) : _ && (n = _(s)), r(n);
|
|
554
555
|
}
|
|
555
556
|
// componentWillMount will be deprecated
|
|
556
557
|
// for SSR, initialize on first render
|
|
@@ -565,9 +566,9 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
565
566
|
render() {
|
|
566
567
|
return this.init(), null;
|
|
567
568
|
}
|
|
568
|
-
}, D,
|
|
569
|
+
}, D, je = (D = class extends L {
|
|
569
570
|
shouldComponentUpdate(t) {
|
|
570
|
-
return !
|
|
571
|
+
return !de(V(this.props, "helmetData"), V(t, "helmetData"));
|
|
571
572
|
}
|
|
572
573
|
mapNestedChildrenToProps(t, r) {
|
|
573
574
|
if (!r)
|
|
@@ -636,8 +637,8 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
636
637
|
}
|
|
637
638
|
warnOnInvalidChildren(t, r) {
|
|
638
639
|
return z(
|
|
639
|
-
|
|
640
|
-
typeof t.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 ${
|
|
640
|
+
N.some((n) => t.type === n),
|
|
641
|
+
typeof t.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 ${N.join(
|
|
641
642
|
", "
|
|
642
643
|
)} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`
|
|
643
644
|
), z(
|
|
@@ -650,9 +651,9 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
650
651
|
return d.Children.forEach(t, (s) => {
|
|
651
652
|
if (!s || !s.props)
|
|
652
653
|
return;
|
|
653
|
-
const { children: o, ...c } = s.props,
|
|
654
|
-
let { type:
|
|
655
|
-
switch (typeof
|
|
654
|
+
const { children: o, ...c } = s.props, i = Object.keys(c).reduce((l, u) => (l[ve[u] || u] = c[u], l), {});
|
|
655
|
+
let { type: a } = s;
|
|
656
|
+
switch (typeof a == "symbol" ? a = a.toString() : this.warnOnInvalidChildren(s, o), a) {
|
|
656
657
|
case "Symbol(react.fragment)":
|
|
657
658
|
r = this.mapChildrenToProps(o, r);
|
|
658
659
|
break;
|
|
@@ -664,12 +665,12 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
664
665
|
n = this.flattenArrayTypeChildren(
|
|
665
666
|
s,
|
|
666
667
|
n,
|
|
667
|
-
|
|
668
|
+
i,
|
|
668
669
|
o
|
|
669
670
|
);
|
|
670
671
|
break;
|
|
671
672
|
default:
|
|
672
|
-
r = this.mapObjectTypeChildren(s, r,
|
|
673
|
+
r = this.mapObjectTypeChildren(s, r, i, o);
|
|
673
674
|
break;
|
|
674
675
|
}
|
|
675
676
|
}), this.mapArrayTypeChildrenToProps(n, r);
|
|
@@ -677,64 +678,28 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
677
678
|
render() {
|
|
678
679
|
const { children: t, ...r } = this.props;
|
|
679
680
|
let n = { ...r }, { helmetData: s } = r;
|
|
680
|
-
if (t && (n = this.mapChildrenToProps(t, n)), s && !(s instanceof
|
|
681
|
+
if (t && (n = this.mapChildrenToProps(t, n)), s && !(s instanceof R)) {
|
|
681
682
|
const o = s;
|
|
682
|
-
s = new
|
|
683
|
+
s = new R(o.context, !0), delete n.helmetData;
|
|
683
684
|
}
|
|
684
|
-
return s ? /* @__PURE__ */ d.createElement(
|
|
685
|
+
return s ? /* @__PURE__ */ d.createElement(B, { ...n, context: s.value }) : /* @__PURE__ */ d.createElement(ee.Consumer, null, (o) => /* @__PURE__ */ d.createElement(B, { ...n, context: o }));
|
|
685
686
|
}
|
|
686
687
|
}, T(D, "defaultProps", {
|
|
687
688
|
defer: !0,
|
|
688
689
|
encodeSpecialCharacters: !0,
|
|
689
690
|
prioritizeSeoTags: !1
|
|
690
691
|
}), D);
|
|
691
|
-
const
|
|
692
|
-
const t = e.filter((r) => !!r).map((r) => r.replace(/(^\/+|\/+$)/g, "")).join("/");
|
|
693
|
-
return t ? `/${t}` : "";
|
|
694
|
-
}, Ge = (e) => {
|
|
692
|
+
const Ye = je, Be = te, Xe = (e) => {
|
|
695
693
|
const t = ae(), r = typeof e.to == "string" ? e.to : e.to.hash, n = (s) => {
|
|
696
694
|
var o;
|
|
697
695
|
!(r != null && r.startsWith("#")) || r !== t.hash || (s.preventDefault(), (o = document.getElementById(r.slice(1))) == null || o.scrollIntoView());
|
|
698
696
|
};
|
|
699
|
-
return /* @__PURE__ */
|
|
700
|
-
}
|
|
701
|
-
const s = ne(e) ? qe(r, e.path) : r, o = t(e, s, n);
|
|
702
|
-
if (o !== void 0) return o;
|
|
703
|
-
if ("children" in e && e.children) {
|
|
704
|
-
const c = [...n, e];
|
|
705
|
-
for (const a of e.children) {
|
|
706
|
-
const i = q(
|
|
707
|
-
a,
|
|
708
|
-
t,
|
|
709
|
-
s,
|
|
710
|
-
c
|
|
711
|
-
);
|
|
712
|
-
if (i !== void 0) return i;
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
}, Je = (e, t) => {
|
|
716
|
-
if (e.categories)
|
|
717
|
-
for (const r of e.categories) {
|
|
718
|
-
const n = q(r, t, e.path);
|
|
719
|
-
if (n !== void 0) return n;
|
|
720
|
-
}
|
|
721
|
-
}, ne = (e) => "path" in e, Qe = (e) => "href" in e, et = (e, t, r) => !!q(
|
|
722
|
-
e,
|
|
723
|
-
(n, s) => {
|
|
724
|
-
if (ne(n) && ce(s, t))
|
|
725
|
-
return !0;
|
|
726
|
-
},
|
|
727
|
-
r
|
|
728
|
-
);
|
|
697
|
+
return /* @__PURE__ */ oe.jsx(ie, { onClick: n, ...e });
|
|
698
|
+
};
|
|
729
699
|
export {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
et as c,
|
|
736
|
-
ne as i,
|
|
737
|
-
qe as j,
|
|
738
|
-
Je as t,
|
|
739
|
-
fe as u
|
|
700
|
+
Xe as A,
|
|
701
|
+
Ye as H,
|
|
702
|
+
Ne as M,
|
|
703
|
+
Be as a,
|
|
704
|
+
le as u
|
|
740
705
|
};
|