zudoku 0.3.0-dev.83 → 0.3.0-dev.85
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/cli.js +5 -1
- package/dist/app/demo.js +5 -4
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +3 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +5 -4
- package/dist/app/standalone.js.map +1 -1
- package/dist/config/validators/ResolvedSidebarSchema.d.ts +18 -0
- package/dist/config/validators/ResolvedSidebarSchema.js +76 -0
- package/dist/config/validators/ResolvedSidebarSchema.js.map +1 -0
- package/dist/config/validators/SidebarSchema.d.ts +177 -0
- package/dist/config/validators/SidebarSchema.js +71 -0
- package/dist/config/validators/SidebarSchema.js.map +1 -0
- package/dist/config/validators/validate.d.ts +411 -59
- package/dist/config/validators/validate.js +22 -4
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/components/DevPortal.js +1 -1
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Header.js +5 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Layout.js +2 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +5 -5
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/DevPortalProvider.d.ts +9 -3
- package/dist/lib/components/context/DevPortalProvider.js +11 -23
- package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
- package/dist/lib/components/context/ThemeContext.d.ts +1 -4
- package/dist/lib/components/context/ThemeContext.js +3 -29
- package/dist/lib/components/context/ThemeContext.js.map +1 -1
- package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
- package/dist/lib/components/context/ThemeProvider.js +23 -0
- package/dist/lib/components/context/ThemeProvider.js.map +1 -0
- package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
- package/dist/lib/components/navigation/Sidebar.js +12 -0
- package/dist/lib/components/navigation/Sidebar.js.map +1 -0
- package/dist/lib/components/navigation/SidebarBadge.d.ts +22 -0
- package/dist/lib/components/navigation/SidebarBadge.js +24 -0
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
- package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
- package/dist/lib/components/navigation/SidebarCategory.js +33 -0
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
- package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
- package/dist/lib/components/navigation/SidebarItem.js +42 -0
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
- package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
- package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +16 -0
- package/dist/lib/components/navigation/utils.js +85 -0
- package/dist/lib/components/navigation/utils.js.map +1 -0
- package/dist/lib/core/DevPortalContext.d.ts +9 -32
- package/dist/lib/core/DevPortalContext.js +8 -5
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +6 -8
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +5 -36
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +4 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListView.js +6 -1
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +3 -2
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +6 -3
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +12 -2
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +14 -11
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +31 -17
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +3 -0
- package/dist/vite/plugin-sidebar.js +23 -0
- package/dist/vite/plugin-sidebar.js.map +1 -0
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{AuthenticationPlugin-XS0DoAhE.js → AuthenticationPlugin-DgwV0hVu.js} +7 -7
- package/lib/{AuthenticationPlugin-XS0DoAhE.js.map → AuthenticationPlugin-DgwV0hVu.js.map} +1 -1
- package/lib/{CategoryHeading-DCmchnA1.js → CategoryHeading-BWq12Bfa.js} +3 -3
- package/lib/{CategoryHeading-DCmchnA1.js.map → CategoryHeading-BWq12Bfa.js.map} +1 -1
- package/lib/{Combination-C442XfGG.js → Combination-DkycFHkm.js} +4 -4
- package/lib/{Combination-C442XfGG.js.map → Combination-DkycFHkm.js.map} +1 -1
- package/lib/{DevPortalProvider-BWeAysxF.js → DevPortalProvider-CTxoCHIT.js} +375 -417
- package/lib/DevPortalProvider-CTxoCHIT.js.map +1 -0
- package/lib/DeveloperHint-BQSFXH01.js +10 -0
- package/lib/{DeveloperHint-DQVwIery.js.map → DeveloperHint-BQSFXH01.js.map} +1 -1
- package/lib/{Input-3IEt27jb.js → Input-BclXSY0g.js} +5 -5
- package/lib/{Input-3IEt27jb.js.map → Input-BclXSY0g.js.map} +1 -1
- package/lib/{Markdown-QsZ-PHET.js → Markdown-B_Gax7at.js} +1136 -1152
- package/lib/{Markdown-QsZ-PHET.js.map → Markdown-B_Gax7at.js.map} +1 -1
- package/lib/{MdxPage-CA1WmW14.js → MdxPage-Crlr0GmN.js} +67 -81
- package/lib/MdxPage-Crlr0GmN.js.map +1 -0
- package/lib/{OperationList-CHK_erYP.js → OperationList-CMH3DPpj.js} +145 -129
- package/lib/OperationList-CMH3DPpj.js.map +1 -0
- package/lib/Route-CwXfyIUw.js +14 -0
- package/lib/{Route-D70pGn9n.js.map → Route-CwXfyIUw.js.map} +1 -1
- package/lib/{SlotletProvider-B71hNEUL.js → SlotletProvider-CzMAO73_.js} +12 -12
- package/lib/{SlotletProvider-B71hNEUL.js.map → SlotletProvider-CzMAO73_.js.map} +1 -1
- package/lib/Spinner-fF-Xv-gw.js +274 -0
- package/lib/Spinner-fF-Xv-gw.js.map +1 -0
- package/lib/index-7kcHaXD6.js +1771 -0
- package/lib/index-7kcHaXD6.js.map +1 -0
- package/lib/{index-Bl6YeerK.js → index-DUrF63A6.js} +1028 -1044
- package/lib/index-DUrF63A6.js.map +1 -0
- package/lib/{index-BH-Ub36F.js → index-DkuZvRNP.js} +4 -4
- package/lib/{index-BH-Ub36F.js.map → index-DkuZvRNP.js.map} +1 -1
- package/lib/joinPath-VeNuJa7y.js +8 -0
- package/lib/joinPath-VeNuJa7y.js.map +1 -0
- package/lib/jsx-runtime-B6kdoens.js +635 -0
- package/lib/jsx-runtime-B6kdoens.js.map +1 -0
- package/lib/{AnchorLink-BZcpTwOs.js → utils-CzT_9Tsn.js} +258 -214
- package/lib/utils-CzT_9Tsn.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +1229 -1227
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +19 -19
- package/lib/zudoku.plugin-custom-page.js +2 -2
- package/lib/zudoku.plugin-markdown.js +21 -38
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +4 -1
- package/src/app/demo.tsx +5 -4
- package/src/app/main.css +2 -2
- package/src/app/main.tsx +3 -1
- package/src/app/standalone.tsx +5 -4
- package/src/lib/components/DevPortal.tsx +1 -1
- package/src/lib/components/Header.tsx +21 -19
- package/src/lib/components/Layout.tsx +2 -2
- package/src/lib/components/TopNavigation.tsx +5 -5
- package/src/lib/components/context/DevPortalProvider.ts +11 -28
- package/src/lib/components/context/ThemeContext.tsx +3 -41
- package/src/lib/components/context/ThemeProvider.tsx +27 -0
- package/src/lib/components/navigation/{SideNavigation.tsx → Sidebar.tsx} +7 -7
- package/src/lib/components/navigation/SidebarBadge.tsx +40 -0
- package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
- package/src/lib/components/navigation/SidebarItem.tsx +96 -0
- package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
- package/src/lib/components/navigation/utils.ts +120 -0
- package/src/lib/core/DevPortalContext.ts +12 -44
- package/src/lib/core/plugins.ts +6 -13
- package/src/lib/plugins/markdown/MdxPage.tsx +14 -50
- package/src/lib/plugins/markdown/generateRoutes.tsx +29 -57
- package/src/lib/plugins/openapi/OperationListItem.tsx +5 -6
- package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
- package/src/lib/plugins/openapi/SchemaListView.tsx +18 -2
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +16 -7
- package/src/lib/plugins/openapi/Sidecar.tsx +15 -2
- package/src/lib/plugins/openapi/index.tsx +17 -23
- package/src/lib/plugins/openapi/interfaces.ts +1 -1
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
- package/src/lib/util/useScrollToAnchor.ts +39 -18
- package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
- package/dist/lib/components/navigation/SideNavigation.js +0 -12
- package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
- package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
- package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -9
- package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
- package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
- package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -9
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -28
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
- package/dist/lib/components/navigation/util.d.ts +0 -8
- package/dist/lib/components/navigation/util.js +0 -15
- package/dist/lib/components/navigation/util.js.map +0 -1
- package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
- package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
- package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
- package/dist/lib/util/traverseNavigation.d.ts +0 -6
- package/dist/lib/util/traverseNavigation.js +0 -30
- package/dist/lib/util/traverseNavigation.js.map +0 -1
- package/lib/AnchorLink-BZcpTwOs.js.map +0 -1
- package/lib/DevPortalProvider-BWeAysxF.js.map +0 -1
- package/lib/DeveloperHint-DQVwIery.js +0 -10
- package/lib/MdxPage-CA1WmW14.js.map +0 -1
- package/lib/OperationList-CHK_erYP.js.map +0 -1
- package/lib/Route-D70pGn9n.js +0 -13
- package/lib/Spinner-Coi7ORUV.js +0 -244
- package/lib/Spinner-Coi7ORUV.js.map +0 -1
- package/lib/index-Bl6YeerK.js.map +0 -1
- package/lib/index-Dt-pU7Vu.js +0 -916
- package/lib/index-Dt-pU7Vu.js.map +0 -1
- package/lib/jsx-runtime-CJBdjYYx.js +0 -1526
- package/lib/jsx-runtime-CJBdjYYx.js.map +0 -1
- package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -72
- package/src/lib/components/navigation/SideNavigationItem.tsx +0 -148
- package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -42
- package/src/lib/components/navigation/util.ts +0 -38
- package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
- package/src/lib/util/traverseNavigation.ts +0 -55
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var T = (e, t, r) =>
|
|
4
|
-
import
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import { L as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var le = Object.defineProperty;
|
|
2
|
+
var ce = (e, t, r) => t in e ? le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var T = (e, t, r) => ce(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import h, { Component as U } from "react";
|
|
5
|
+
import { a as q } from "./_commonjsHelpers-BVfed4GL.js";
|
|
6
|
+
import { j as ue } from "./jsx-runtime-B6kdoens.js";
|
|
7
|
+
import { u as $, L as fe } from "./index-7kcHaXD6.js";
|
|
8
|
+
import { j as S } from "./joinPath-VeNuJa7y.js";
|
|
9
|
+
import { k as K, u as Q } from "./DevPortalProvider-CTxoCHIT.js";
|
|
10
|
+
const _ = {}, N = h.createContext(_);
|
|
11
|
+
function de(e) {
|
|
12
|
+
const t = h.useContext(N);
|
|
13
|
+
return h.useMemo(
|
|
12
14
|
function() {
|
|
13
15
|
return typeof e == "function" ? e(t) : { ...t, ...e };
|
|
14
16
|
},
|
|
15
17
|
[t, e]
|
|
16
18
|
);
|
|
17
19
|
}
|
|
18
|
-
function
|
|
20
|
+
function Ze(e) {
|
|
19
21
|
let t;
|
|
20
|
-
return e.disableParentContext ? t = typeof e.components == "function" ? e.components(
|
|
21
|
-
|
|
22
|
+
return e.disableParentContext ? t = typeof e.components == "function" ? e.components(_) : e.components || _ : t = de(e.components), h.createElement(
|
|
23
|
+
N.Provider,
|
|
22
24
|
{ value: t },
|
|
23
25
|
e.children
|
|
24
26
|
);
|
|
25
27
|
}
|
|
26
|
-
var
|
|
27
|
-
function
|
|
28
|
+
var pe = typeof Element < "u", he = typeof Map == "function", me = typeof Set == "function", ye = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
29
|
+
function P(e, t) {
|
|
28
30
|
if (e === t) return !0;
|
|
29
31
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
30
32
|
if (e.constructor !== t.constructor) return !1;
|
|
@@ -32,25 +34,25 @@ function x(e, t) {
|
|
|
32
34
|
if (Array.isArray(e)) {
|
|
33
35
|
if (r = e.length, r != t.length) return !1;
|
|
34
36
|
for (n = r; n-- !== 0; )
|
|
35
|
-
if (!
|
|
37
|
+
if (!P(e[n], t[n])) return !1;
|
|
36
38
|
return !0;
|
|
37
39
|
}
|
|
38
40
|
var o;
|
|
39
|
-
if (
|
|
41
|
+
if (he && e instanceof Map && t instanceof Map) {
|
|
40
42
|
if (e.size !== t.size) return !1;
|
|
41
43
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
42
44
|
if (!t.has(n.value[0])) return !1;
|
|
43
45
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
44
|
-
if (!
|
|
46
|
+
if (!P(n.value[1], t.get(n.value[0]))) return !1;
|
|
45
47
|
return !0;
|
|
46
48
|
}
|
|
47
|
-
if (
|
|
49
|
+
if (me && e instanceof Set && t instanceof Set) {
|
|
48
50
|
if (e.size !== t.size) return !1;
|
|
49
51
|
for (o = e.entries(); !(n = o.next()).done; )
|
|
50
52
|
if (!t.has(n.value[0])) return !1;
|
|
51
53
|
return !0;
|
|
52
54
|
}
|
|
53
|
-
if (
|
|
55
|
+
if (ye && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
54
56
|
if (r = e.length, r != t.length) return !1;
|
|
55
57
|
for (n = r; n-- !== 0; )
|
|
56
58
|
if (e[n] !== t[n]) return !1;
|
|
@@ -62,46 +64,46 @@ function x(e, t) {
|
|
|
62
64
|
if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
|
|
63
65
|
for (n = r; n-- !== 0; )
|
|
64
66
|
if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
|
|
65
|
-
if (
|
|
67
|
+
if (pe && e instanceof Element) return !1;
|
|
66
68
|
for (n = r; n-- !== 0; )
|
|
67
|
-
if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !
|
|
69
|
+
if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !P(e[s[n]], t[s[n]]))
|
|
68
70
|
return !1;
|
|
69
71
|
return !0;
|
|
70
72
|
}
|
|
71
73
|
return e !== e && t !== t;
|
|
72
74
|
}
|
|
73
|
-
var
|
|
75
|
+
var Te = function(t, r) {
|
|
74
76
|
try {
|
|
75
|
-
return
|
|
77
|
+
return P(t, r);
|
|
76
78
|
} catch (n) {
|
|
77
79
|
if ((n.message || "").match(/stack|recursion/i))
|
|
78
80
|
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
79
81
|
throw n;
|
|
80
82
|
}
|
|
81
83
|
};
|
|
82
|
-
const
|
|
83
|
-
var
|
|
84
|
+
const ge = /* @__PURE__ */ q(Te);
|
|
85
|
+
var ve = function(e, t, r, n, s, o, c, i) {
|
|
84
86
|
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
85
87
|
throw new Error("invariant requires an error message argument");
|
|
86
88
|
if (!e) {
|
|
87
|
-
var
|
|
89
|
+
var a;
|
|
88
90
|
if (t === void 0)
|
|
89
|
-
|
|
91
|
+
a = new Error(
|
|
90
92
|
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
91
93
|
);
|
|
92
94
|
else {
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
+
var l = [r, n, s, o, c, i], u = 0;
|
|
96
|
+
a = new Error(
|
|
95
97
|
t.replace(/%s/g, function() {
|
|
96
|
-
return
|
|
98
|
+
return l[u++];
|
|
97
99
|
})
|
|
98
|
-
),
|
|
100
|
+
), a.name = "Invariant Violation";
|
|
99
101
|
}
|
|
100
|
-
throw
|
|
102
|
+
throw a.framesToPop = 1, a;
|
|
101
103
|
}
|
|
102
|
-
},
|
|
103
|
-
const
|
|
104
|
-
var
|
|
104
|
+
}, Ae = ve;
|
|
105
|
+
const X = /* @__PURE__ */ q(Ae);
|
|
106
|
+
var be = function(t, r, n, s) {
|
|
105
107
|
var o = n ? n.call(s, t, r) : void 0;
|
|
106
108
|
if (o !== void 0)
|
|
107
109
|
return !!o;
|
|
@@ -112,18 +114,18 @@ var ye = function(t, r, n, s) {
|
|
|
112
114
|
var c = Object.keys(t), i = Object.keys(r);
|
|
113
115
|
if (c.length !== i.length)
|
|
114
116
|
return !1;
|
|
115
|
-
for (var
|
|
116
|
-
var u = c[
|
|
117
|
-
if (!
|
|
117
|
+
for (var a = Object.prototype.hasOwnProperty.bind(r), l = 0; l < c.length; l++) {
|
|
118
|
+
var u = c[l];
|
|
119
|
+
if (!a(u))
|
|
118
120
|
return !1;
|
|
119
|
-
var f = t[u],
|
|
120
|
-
if (o = n ? n.call(s, f,
|
|
121
|
+
var f = t[u], m = r[u];
|
|
122
|
+
if (o = n ? n.call(s, f, m, u) : void 0, o === !1 || o === void 0 && f !== m)
|
|
121
123
|
return !1;
|
|
122
124
|
}
|
|
123
125
|
return !0;
|
|
124
126
|
};
|
|
125
|
-
const
|
|
126
|
-
var
|
|
127
|
+
const Ce = /* @__PURE__ */ q(be);
|
|
128
|
+
var ee = /* @__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))(ee || {}), D = {
|
|
127
129
|
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
128
130
|
script: { type: ["application/ld+json"] },
|
|
129
131
|
meta: {
|
|
@@ -145,7 +147,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
145
147
|
"twitter:site"
|
|
146
148
|
]
|
|
147
149
|
}
|
|
148
|
-
},
|
|
150
|
+
}, W = Object.values(ee), z = {
|
|
149
151
|
accesskey: "accessKey",
|
|
150
152
|
charset: "charSet",
|
|
151
153
|
class: "className",
|
|
@@ -154,36 +156,36 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
154
156
|
"http-equiv": "httpEquiv",
|
|
155
157
|
itemprop: "itemProp",
|
|
156
158
|
tabindex: "tabIndex"
|
|
157
|
-
},
|
|
159
|
+
}, Ee = Object.entries(z).reduce(
|
|
158
160
|
(e, [t, r]) => (e[r] = t, e),
|
|
159
161
|
{}
|
|
160
|
-
), y = "data-rh",
|
|
162
|
+
), y = "data-rh", b = {
|
|
161
163
|
DEFAULT_TITLE: "defaultTitle",
|
|
162
164
|
DEFER: "defer",
|
|
163
165
|
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
164
166
|
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
|
|
165
167
|
TITLE_TEMPLATE: "titleTemplate",
|
|
166
168
|
PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
|
|
167
|
-
},
|
|
169
|
+
}, C = (e, t) => {
|
|
168
170
|
for (let r = e.length - 1; r >= 0; r -= 1) {
|
|
169
171
|
const n = e[r];
|
|
170
172
|
if (Object.prototype.hasOwnProperty.call(n, t))
|
|
171
173
|
return n[t];
|
|
172
174
|
}
|
|
173
175
|
return null;
|
|
174
|
-
},
|
|
175
|
-
let t =
|
|
176
|
+
}, Oe = (e) => {
|
|
177
|
+
let t = C(
|
|
176
178
|
e,
|
|
177
179
|
"title"
|
|
178
180
|
/* TITLE */
|
|
179
181
|
);
|
|
180
|
-
const r =
|
|
182
|
+
const r = C(e, b.TITLE_TEMPLATE);
|
|
181
183
|
if (Array.isArray(t) && (t = t.join("")), r && t)
|
|
182
184
|
return r.replace(/%s/g, () => t);
|
|
183
|
-
const n =
|
|
185
|
+
const n = C(e, b.DEFAULT_TITLE);
|
|
184
186
|
return t || n || void 0;
|
|
185
|
-
},
|
|
186
|
-
}),
|
|
187
|
+
}, Se = (e) => C(e, b.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
188
|
+
}), M = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), we = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
|
|
187
189
|
if (!r.length) {
|
|
188
190
|
const s = Object.keys(n);
|
|
189
191
|
for (let o = 0; o < s.length; o += 1) {
|
|
@@ -193,51 +195,51 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
193
195
|
}
|
|
194
196
|
}
|
|
195
197
|
return r;
|
|
196
|
-
}, []),
|
|
198
|
+
}, []), xe = (e) => console && typeof console.warn == "function" && console.warn(e), E = (e, t, r) => {
|
|
197
199
|
const n = {};
|
|
198
|
-
return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" &&
|
|
200
|
+
return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && xe(
|
|
199
201
|
`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
|
|
200
202
|
), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
|
|
201
203
|
const c = {};
|
|
202
|
-
o.filter((
|
|
203
|
-
let
|
|
204
|
-
const u = Object.keys(
|
|
205
|
-
for (let
|
|
206
|
-
const
|
|
207
|
-
t.indexOf(g) !== -1 && !(
|
|
204
|
+
o.filter((a) => {
|
|
205
|
+
let l;
|
|
206
|
+
const u = Object.keys(a);
|
|
207
|
+
for (let m = 0; m < u.length; m += 1) {
|
|
208
|
+
const d = u[m], g = d.toLowerCase();
|
|
209
|
+
t.indexOf(g) !== -1 && !(l === "rel" && a[l].toLowerCase() === "canonical") && !(g === "rel" && a[g].toLowerCase() === "stylesheet") && (l = g), t.indexOf(d) !== -1 && (d === "innerHTML" || d === "cssText" || d === "itemprop") && (l = d);
|
|
208
210
|
}
|
|
209
|
-
if (!
|
|
211
|
+
if (!l || !a[l])
|
|
210
212
|
return !1;
|
|
211
|
-
const f = l
|
|
212
|
-
return n[
|
|
213
|
-
}).reverse().forEach((
|
|
213
|
+
const f = a[l].toLowerCase();
|
|
214
|
+
return n[l] || (n[l] = {}), c[l] || (c[l] = {}), n[l][f] ? !1 : (c[l][f] = !0, !0);
|
|
215
|
+
}).reverse().forEach((a) => s.push(a));
|
|
214
216
|
const i = Object.keys(c);
|
|
215
|
-
for (let
|
|
216
|
-
const
|
|
217
|
-
...n[
|
|
218
|
-
...c[
|
|
217
|
+
for (let a = 0; a < i.length; a += 1) {
|
|
218
|
+
const l = i[a], u = {
|
|
219
|
+
...n[l],
|
|
220
|
+
...c[l]
|
|
219
221
|
};
|
|
220
|
-
n[
|
|
222
|
+
n[l] = u;
|
|
221
223
|
}
|
|
222
224
|
return s;
|
|
223
225
|
}, []).reverse();
|
|
224
|
-
},
|
|
226
|
+
}, Pe = (e, t) => {
|
|
225
227
|
if (Array.isArray(e) && e.length) {
|
|
226
228
|
for (let r = 0; r < e.length; r += 1)
|
|
227
229
|
if (e[r][t])
|
|
228
230
|
return !0;
|
|
229
231
|
}
|
|
230
232
|
return !1;
|
|
231
|
-
},
|
|
232
|
-
baseTag:
|
|
233
|
+
}, ke = (e) => ({
|
|
234
|
+
baseTag: we([
|
|
233
235
|
"href"
|
|
234
236
|
/* HREF */
|
|
235
237
|
], e),
|
|
236
|
-
bodyAttributes:
|
|
237
|
-
defer:
|
|
238
|
-
encode:
|
|
239
|
-
htmlAttributes:
|
|
240
|
-
linkTags:
|
|
238
|
+
bodyAttributes: M("bodyAttributes", e),
|
|
239
|
+
defer: C(e, b.DEFER),
|
|
240
|
+
encode: C(e, b.ENCODE_SPECIAL_CHARACTERS),
|
|
241
|
+
htmlAttributes: M("htmlAttributes", e),
|
|
242
|
+
linkTags: E(
|
|
241
243
|
"link",
|
|
242
244
|
[
|
|
243
245
|
"rel",
|
|
@@ -246,7 +248,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
246
248
|
],
|
|
247
249
|
e
|
|
248
250
|
),
|
|
249
|
-
metaTags:
|
|
251
|
+
metaTags: E(
|
|
250
252
|
"meta",
|
|
251
253
|
[
|
|
252
254
|
"name",
|
|
@@ -258,12 +260,12 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
258
260
|
],
|
|
259
261
|
e
|
|
260
262
|
),
|
|
261
|
-
noscriptTags:
|
|
263
|
+
noscriptTags: E("noscript", [
|
|
262
264
|
"innerHTML"
|
|
263
265
|
/* INNER_HTML */
|
|
264
266
|
], e),
|
|
265
|
-
onChangeClientState:
|
|
266
|
-
scriptTags:
|
|
267
|
+
onChangeClientState: Se(e),
|
|
268
|
+
scriptTags: E(
|
|
267
269
|
"script",
|
|
268
270
|
[
|
|
269
271
|
"src",
|
|
@@ -272,114 +274,114 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
272
274
|
],
|
|
273
275
|
e
|
|
274
276
|
),
|
|
275
|
-
styleTags:
|
|
277
|
+
styleTags: E("style", [
|
|
276
278
|
"cssText"
|
|
277
279
|
/* CSS_TEXT */
|
|
278
280
|
], e),
|
|
279
|
-
title:
|
|
280
|
-
titleAttributes:
|
|
281
|
-
prioritizeSeoTags:
|
|
282
|
-
}),
|
|
281
|
+
title: Oe(e),
|
|
282
|
+
titleAttributes: M("titleAttributes", e),
|
|
283
|
+
prioritizeSeoTags: Pe(e, b.PRIORITIZE_SEO_TAGS)
|
|
284
|
+
}), te = (e) => Array.isArray(e) ? e.join("") : e, $e = (e, t) => {
|
|
283
285
|
const r = Object.keys(e);
|
|
284
286
|
for (let n = 0; n < r.length; n += 1)
|
|
285
287
|
if (t[r[n]] && t[r[n]].includes(e[r[n]]))
|
|
286
288
|
return !0;
|
|
287
289
|
return !1;
|
|
288
|
-
},
|
|
289
|
-
(r, n) => (
|
|
290
|
+
}, I = (e, t) => Array.isArray(e) ? e.reduce(
|
|
291
|
+
(r, n) => ($e(n, t) ? r.priority.push(n) : r.default.push(n), r),
|
|
290
292
|
{ priority: [], default: [] }
|
|
291
|
-
) : { default: e, priority: [] },
|
|
293
|
+
) : { default: e, priority: [] }, Z = (e, t) => ({
|
|
292
294
|
...e,
|
|
293
295
|
[t]: void 0
|
|
294
|
-
}),
|
|
296
|
+
}), De = [
|
|
295
297
|
"noscript",
|
|
296
298
|
"script",
|
|
297
299
|
"style"
|
|
298
300
|
/* STYLE */
|
|
299
|
-
],
|
|
301
|
+
], R = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), re = (e) => Object.keys(e).reduce((t, r) => {
|
|
300
302
|
const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
|
|
301
303
|
return t ? `${t} ${n}` : n;
|
|
302
|
-
}, ""),
|
|
303
|
-
const s =
|
|
304
|
-
return s ? `<${e} ${y}="true" ${s}>${
|
|
304
|
+
}, ""), Me = (e, t, r, n) => {
|
|
305
|
+
const s = re(r), o = te(t);
|
|
306
|
+
return s ? `<${e} ${y}="true" ${s}>${R(
|
|
305
307
|
o,
|
|
306
308
|
n
|
|
307
|
-
)}</${e}>` : `<${e} ${y}="true">${
|
|
309
|
+
)}</${e}>` : `<${e} ${y}="true">${R(
|
|
308
310
|
o,
|
|
309
311
|
n
|
|
310
312
|
)}</${e}>`;
|
|
311
|
-
},
|
|
313
|
+
}, Ie = (e, t, r = !0) => t.reduce((n, s) => {
|
|
312
314
|
const o = s, c = Object.keys(o).filter(
|
|
313
|
-
(
|
|
314
|
-
).reduce((
|
|
315
|
-
const f = typeof o[u] > "u" ? u : `${u}="${
|
|
316
|
-
return
|
|
317
|
-
}, ""), i = o.innerHTML || o.cssText || "",
|
|
318
|
-
return `${n}<${e} ${y}="true" ${c}${
|
|
319
|
-
}, ""),
|
|
320
|
-
const s =
|
|
315
|
+
(l) => !(l === "innerHTML" || l === "cssText")
|
|
316
|
+
).reduce((l, u) => {
|
|
317
|
+
const f = typeof o[u] > "u" ? u : `${u}="${R(o[u], r)}"`;
|
|
318
|
+
return l ? `${l} ${f}` : f;
|
|
319
|
+
}, ""), i = o.innerHTML || o.cssText || "", a = De.indexOf(e) === -1;
|
|
320
|
+
return `${n}<${e} ${y}="true" ${c}${a ? "/>" : `>${i}</${e}>`}`;
|
|
321
|
+
}, ""), ne = (e, t = {}) => Object.keys(e).reduce((r, n) => {
|
|
322
|
+
const s = z[n];
|
|
321
323
|
return r[s || n] = e[n], r;
|
|
322
|
-
}, t),
|
|
324
|
+
}, t), He = (e, t, r) => {
|
|
323
325
|
const n = {
|
|
324
326
|
key: t,
|
|
325
327
|
[y]: !0
|
|
326
|
-
}, s =
|
|
327
|
-
return [
|
|
328
|
-
},
|
|
328
|
+
}, s = ne(r, n);
|
|
329
|
+
return [h.createElement("title", s, t)];
|
|
330
|
+
}, k = (e, t) => t.map((r, n) => {
|
|
329
331
|
const s = {
|
|
330
332
|
key: n,
|
|
331
333
|
[y]: !0
|
|
332
334
|
};
|
|
333
335
|
return Object.keys(r).forEach((o) => {
|
|
334
|
-
const i =
|
|
336
|
+
const i = z[o] || o;
|
|
335
337
|
if (i === "innerHTML" || i === "cssText") {
|
|
336
|
-
const
|
|
337
|
-
s.dangerouslySetInnerHTML = { __html:
|
|
338
|
+
const a = r.innerHTML || r.cssText;
|
|
339
|
+
s.dangerouslySetInnerHTML = { __html: a };
|
|
338
340
|
} else
|
|
339
341
|
s[i] = r[o];
|
|
340
|
-
}),
|
|
341
|
-
}),
|
|
342
|
+
}), h.createElement(e, s);
|
|
343
|
+
}), p = (e, t, r = !0) => {
|
|
342
344
|
switch (e) {
|
|
343
345
|
case "title":
|
|
344
346
|
return {
|
|
345
|
-
toComponent: () =>
|
|
346
|
-
toString: () =>
|
|
347
|
+
toComponent: () => He(e, t.title, t.titleAttributes),
|
|
348
|
+
toString: () => Me(e, t.title, t.titleAttributes, r)
|
|
347
349
|
};
|
|
348
350
|
case "bodyAttributes":
|
|
349
351
|
case "htmlAttributes":
|
|
350
352
|
return {
|
|
351
|
-
toComponent: () =>
|
|
352
|
-
toString: () =>
|
|
353
|
+
toComponent: () => ne(t),
|
|
354
|
+
toString: () => re(t)
|
|
353
355
|
};
|
|
354
356
|
default:
|
|
355
357
|
return {
|
|
356
|
-
toComponent: () =>
|
|
357
|
-
toString: () =>
|
|
358
|
+
toComponent: () => k(e, t),
|
|
359
|
+
toString: () => Ie(e, t, r)
|
|
358
360
|
};
|
|
359
361
|
}
|
|
360
|
-
},
|
|
361
|
-
const s =
|
|
362
|
+
}, _e = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
|
|
363
|
+
const s = I(e, D.meta), o = I(t, D.link), c = I(r, D.script);
|
|
362
364
|
return {
|
|
363
365
|
priorityMethods: {
|
|
364
366
|
toComponent: () => [
|
|
365
|
-
...
|
|
366
|
-
...
|
|
367
|
-
...
|
|
367
|
+
...k("meta", s.priority),
|
|
368
|
+
...k("link", o.priority),
|
|
369
|
+
...k("script", c.priority)
|
|
368
370
|
],
|
|
369
371
|
toString: () => (
|
|
370
372
|
// generate all the tags as strings and concatenate them
|
|
371
|
-
`${
|
|
373
|
+
`${p("meta", s.priority, n)} ${p(
|
|
372
374
|
"link",
|
|
373
375
|
o.priority,
|
|
374
376
|
n
|
|
375
|
-
)} ${
|
|
377
|
+
)} ${p("script", c.priority, n)}`
|
|
376
378
|
)
|
|
377
379
|
},
|
|
378
380
|
metaTags: s.default,
|
|
379
381
|
linkTags: o.default,
|
|
380
382
|
scriptTags: c.default
|
|
381
383
|
};
|
|
382
|
-
},
|
|
384
|
+
}, Re = (e) => {
|
|
383
385
|
const {
|
|
384
386
|
baseTag: t,
|
|
385
387
|
bodyAttributes: r,
|
|
@@ -388,47 +390,47 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
388
390
|
noscriptTags: o,
|
|
389
391
|
styleTags: c,
|
|
390
392
|
title: i = "",
|
|
391
|
-
titleAttributes:
|
|
392
|
-
prioritizeSeoTags:
|
|
393
|
+
titleAttributes: a,
|
|
394
|
+
prioritizeSeoTags: l
|
|
393
395
|
} = e;
|
|
394
|
-
let { linkTags: u, metaTags: f, scriptTags:
|
|
396
|
+
let { linkTags: u, metaTags: f, scriptTags: m } = e, d = {
|
|
395
397
|
toComponent: () => {
|
|
396
398
|
},
|
|
397
399
|
toString: () => ""
|
|
398
400
|
};
|
|
399
|
-
return
|
|
400
|
-
priority:
|
|
401
|
-
base:
|
|
402
|
-
bodyAttributes:
|
|
403
|
-
htmlAttributes:
|
|
404
|
-
link:
|
|
405
|
-
meta:
|
|
406
|
-
noscript:
|
|
407
|
-
script:
|
|
408
|
-
style:
|
|
409
|
-
title:
|
|
401
|
+
return l && ({ priorityMethods: d, linkTags: u, metaTags: f, scriptTags: m } = _e(e)), {
|
|
402
|
+
priority: d,
|
|
403
|
+
base: p("base", t, n),
|
|
404
|
+
bodyAttributes: p("bodyAttributes", r, n),
|
|
405
|
+
htmlAttributes: p("htmlAttributes", s, n),
|
|
406
|
+
link: p("link", u, n),
|
|
407
|
+
meta: p("meta", f, n),
|
|
408
|
+
noscript: p("noscript", o, n),
|
|
409
|
+
script: p("script", m, n),
|
|
410
|
+
style: p("style", c, n),
|
|
411
|
+
title: p("title", { title: i, titleAttributes: a }, n)
|
|
410
412
|
};
|
|
411
|
-
},
|
|
413
|
+
}, j = Re, x = [], se = !!(typeof window < "u" && window.document && window.document.createElement), L = class {
|
|
412
414
|
constructor(e, t) {
|
|
413
415
|
T(this, "instances", []);
|
|
414
|
-
T(this, "canUseDOM",
|
|
416
|
+
T(this, "canUseDOM", se);
|
|
415
417
|
T(this, "context");
|
|
416
418
|
T(this, "value", {
|
|
417
419
|
setHelmet: (e) => {
|
|
418
420
|
this.context.helmet = e;
|
|
419
421
|
},
|
|
420
422
|
helmetInstances: {
|
|
421
|
-
get: () => this.canUseDOM ?
|
|
423
|
+
get: () => this.canUseDOM ? x : this.instances,
|
|
422
424
|
add: (e) => {
|
|
423
|
-
(this.canUseDOM ?
|
|
425
|
+
(this.canUseDOM ? x : this.instances).push(e);
|
|
424
426
|
},
|
|
425
427
|
remove: (e) => {
|
|
426
|
-
const t = (this.canUseDOM ?
|
|
427
|
-
(this.canUseDOM ?
|
|
428
|
+
const t = (this.canUseDOM ? x : this.instances).indexOf(e);
|
|
429
|
+
(this.canUseDOM ? x : this.instances).splice(t, 1);
|
|
428
430
|
}
|
|
429
431
|
}
|
|
430
432
|
});
|
|
431
|
-
this.context = e, this.canUseDOM = t || !1, t || (e.helmet =
|
|
433
|
+
this.context = e, this.canUseDOM = t || !1, t || (e.helmet = j({
|
|
432
434
|
baseTag: [],
|
|
433
435
|
bodyAttributes: {},
|
|
434
436
|
encodeSpecialCharacters: !0,
|
|
@@ -442,58 +444,58 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
442
444
|
titleAttributes: {}
|
|
443
445
|
}));
|
|
444
446
|
}
|
|
445
|
-
},
|
|
447
|
+
}, je = {}, oe = h.createContext(je), v, Le = (v = class extends U {
|
|
446
448
|
constructor(r) {
|
|
447
449
|
super(r);
|
|
448
450
|
T(this, "helmetData");
|
|
449
|
-
this.helmetData = new
|
|
451
|
+
this.helmetData = new L(this.props.context || {}, v.canUseDOM);
|
|
450
452
|
}
|
|
451
453
|
render() {
|
|
452
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ h.createElement(oe.Provider, { value: this.helmetData.value }, this.props.children);
|
|
453
455
|
}
|
|
454
|
-
}, T(v, "canUseDOM",
|
|
456
|
+
}, T(v, "canUseDOM", se), v), A = (e, t) => {
|
|
455
457
|
const r = document.head || document.querySelector(
|
|
456
458
|
"head"
|
|
457
459
|
/* HEAD */
|
|
458
460
|
), n = r.querySelectorAll(`${e}[${y}]`), s = [].slice.call(n), o = [];
|
|
459
461
|
let c;
|
|
460
462
|
return t && t.length && t.forEach((i) => {
|
|
461
|
-
const
|
|
462
|
-
for (const
|
|
463
|
-
if (Object.prototype.hasOwnProperty.call(i,
|
|
464
|
-
if (
|
|
465
|
-
|
|
466
|
-
else if (
|
|
467
|
-
|
|
463
|
+
const a = document.createElement(e);
|
|
464
|
+
for (const l in i)
|
|
465
|
+
if (Object.prototype.hasOwnProperty.call(i, l))
|
|
466
|
+
if (l === "innerHTML")
|
|
467
|
+
a.innerHTML = i.innerHTML;
|
|
468
|
+
else if (l === "cssText")
|
|
469
|
+
a.styleSheet ? a.styleSheet.cssText = i.cssText : a.appendChild(document.createTextNode(i.cssText));
|
|
468
470
|
else {
|
|
469
|
-
const u =
|
|
470
|
-
|
|
471
|
+
const u = l, f = typeof i[u] > "u" ? "" : i[u];
|
|
472
|
+
a.setAttribute(l, f);
|
|
471
473
|
}
|
|
472
|
-
|
|
474
|
+
a.setAttribute(y, "true"), s.some((l, u) => (c = u, a.isEqualNode(l))) ? s.splice(c, 1) : o.push(a);
|
|
473
475
|
}), s.forEach((i) => {
|
|
474
|
-
var
|
|
475
|
-
return (
|
|
476
|
+
var a;
|
|
477
|
+
return (a = i.parentNode) == null ? void 0 : a.removeChild(i);
|
|
476
478
|
}), o.forEach((i) => r.appendChild(i)), {
|
|
477
479
|
oldTags: s,
|
|
478
480
|
newTags: o
|
|
479
481
|
};
|
|
480
|
-
},
|
|
482
|
+
}, F = (e, t) => {
|
|
481
483
|
const r = document.getElementsByTagName(e)[0];
|
|
482
484
|
if (!r)
|
|
483
485
|
return;
|
|
484
486
|
const n = r.getAttribute(y), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
|
|
485
487
|
for (const i of c) {
|
|
486
|
-
const
|
|
487
|
-
r.getAttribute(i) !==
|
|
488
|
-
const
|
|
489
|
-
|
|
488
|
+
const a = t[i] || "";
|
|
489
|
+
r.getAttribute(i) !== a && r.setAttribute(i, a), s.indexOf(i) === -1 && s.push(i);
|
|
490
|
+
const l = o.indexOf(i);
|
|
491
|
+
l !== -1 && o.splice(l, 1);
|
|
490
492
|
}
|
|
491
493
|
for (let i = o.length - 1; i >= 0; i -= 1)
|
|
492
494
|
r.removeAttribute(o[i]);
|
|
493
495
|
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 =
|
|
496
|
-
},
|
|
496
|
+
}, Fe = (e, t) => {
|
|
497
|
+
typeof e < "u" && document.title !== e && (document.title = te(e)), F("title", t);
|
|
498
|
+
}, G = (e, t) => {
|
|
497
499
|
const {
|
|
498
500
|
baseTag: r,
|
|
499
501
|
bodyAttributes: n,
|
|
@@ -501,38 +503,38 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
501
503
|
linkTags: o,
|
|
502
504
|
metaTags: c,
|
|
503
505
|
noscriptTags: i,
|
|
504
|
-
onChangeClientState:
|
|
505
|
-
scriptTags:
|
|
506
|
+
onChangeClientState: a,
|
|
507
|
+
scriptTags: l,
|
|
506
508
|
styleTags: u,
|
|
507
509
|
title: f,
|
|
508
|
-
titleAttributes:
|
|
510
|
+
titleAttributes: m
|
|
509
511
|
} = e;
|
|
510
|
-
|
|
511
|
-
const
|
|
512
|
+
F("body", n), F("html", s), Fe(f, m);
|
|
513
|
+
const d = {
|
|
512
514
|
baseTag: A("base", r),
|
|
513
515
|
linkTags: A("link", o),
|
|
514
516
|
metaTags: A("meta", c),
|
|
515
517
|
noscriptTags: A("noscript", i),
|
|
516
|
-
scriptTags: A("script",
|
|
518
|
+
scriptTags: A("script", l),
|
|
517
519
|
styleTags: A("style", u)
|
|
518
|
-
}, g = {},
|
|
519
|
-
Object.keys(
|
|
520
|
-
const { newTags:
|
|
521
|
-
|
|
522
|
-
}), t && t(),
|
|
523
|
-
}, O = null,
|
|
520
|
+
}, g = {}, Y = {};
|
|
521
|
+
Object.keys(d).forEach((w) => {
|
|
522
|
+
const { newTags: B, oldTags: ae } = d[w];
|
|
523
|
+
B.length && (g[w] = B), ae.length && (Y[w] = d[w].oldTags);
|
|
524
|
+
}), t && t(), a(e, g, Y);
|
|
525
|
+
}, O = null, Ue = (e) => {
|
|
524
526
|
O && cancelAnimationFrame(O), e.defer ? O = requestAnimationFrame(() => {
|
|
525
|
-
|
|
527
|
+
G(e, () => {
|
|
526
528
|
O = null;
|
|
527
529
|
});
|
|
528
|
-
}) : (
|
|
529
|
-
},
|
|
530
|
+
}) : (G(e), O = null);
|
|
531
|
+
}, qe = Ue, J = class extends U {
|
|
530
532
|
constructor() {
|
|
531
533
|
super(...arguments);
|
|
532
534
|
T(this, "rendered", !1);
|
|
533
535
|
}
|
|
534
536
|
shouldComponentUpdate(t) {
|
|
535
|
-
return !
|
|
537
|
+
return !Ce(t, this.props);
|
|
536
538
|
}
|
|
537
539
|
componentDidUpdate() {
|
|
538
540
|
this.emitChange();
|
|
@@ -544,13 +546,13 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
544
546
|
emitChange() {
|
|
545
547
|
const { helmetInstances: t, setHelmet: r } = this.props.context;
|
|
546
548
|
let n = null;
|
|
547
|
-
const s =
|
|
549
|
+
const s = ke(
|
|
548
550
|
t.get().map((o) => {
|
|
549
551
|
const c = { ...o.props };
|
|
550
552
|
return delete c.context, c;
|
|
551
553
|
})
|
|
552
554
|
);
|
|
553
|
-
|
|
555
|
+
Le.canUseDOM ? qe(s) : j && (n = j(s)), r(n);
|
|
554
556
|
}
|
|
555
557
|
// componentWillMount will be deprecated
|
|
556
558
|
// for SSR, initialize on first render
|
|
@@ -565,9 +567,9 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
565
567
|
render() {
|
|
566
568
|
return this.init(), null;
|
|
567
569
|
}
|
|
568
|
-
},
|
|
570
|
+
}, H, Ge = (H = class extends U {
|
|
569
571
|
shouldComponentUpdate(e) {
|
|
570
|
-
return !
|
|
572
|
+
return !ge(Z(this.props, "helmetData"), Z(e, "helmetData"));
|
|
571
573
|
}
|
|
572
574
|
mapNestedChildrenToProps(e, t) {
|
|
573
575
|
if (!t)
|
|
@@ -635,22 +637,22 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
635
637
|
}), r;
|
|
636
638
|
}
|
|
637
639
|
warnOnInvalidChildren(e, t) {
|
|
638
|
-
return
|
|
639
|
-
|
|
640
|
-
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 ${
|
|
640
|
+
return X(
|
|
641
|
+
W.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 ${W.join(
|
|
641
643
|
", "
|
|
642
644
|
)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
|
|
643
|
-
),
|
|
645
|
+
), X(
|
|
644
646
|
!t || typeof t == "string" || Array.isArray(t) && !t.some((r) => typeof r != "string"),
|
|
645
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.`
|
|
646
648
|
), !0;
|
|
647
649
|
}
|
|
648
650
|
mapChildrenToProps(e, t) {
|
|
649
651
|
let r = {};
|
|
650
|
-
return
|
|
652
|
+
return h.Children.forEach(e, (n) => {
|
|
651
653
|
if (!n || !n.props)
|
|
652
654
|
return;
|
|
653
|
-
const { children: s, ...o } = n.props, c = Object.keys(o).reduce((
|
|
655
|
+
const { children: s, ...o } = n.props, c = Object.keys(o).reduce((a, l) => (a[Ee[l] || l] = o[l], a), {});
|
|
654
656
|
let { type: i } = n;
|
|
655
657
|
switch (typeof i == "symbol" ? i = i.toString() : this.warnOnInvalidChildren(n, s), i) {
|
|
656
658
|
case "Symbol(react.fragment)":
|
|
@@ -677,29 +679,71 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
677
679
|
render() {
|
|
678
680
|
const { children: e, ...t } = this.props;
|
|
679
681
|
let r = { ...t }, { helmetData: n } = t;
|
|
680
|
-
if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof
|
|
682
|
+
if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof L)) {
|
|
681
683
|
const s = n;
|
|
682
|
-
n = new
|
|
684
|
+
n = new L(s.context, !0), delete r.helmetData;
|
|
683
685
|
}
|
|
684
|
-
return n ? /* @__PURE__ */
|
|
686
|
+
return n ? /* @__PURE__ */ h.createElement(J, { ...r, context: n.value }) : /* @__PURE__ */ h.createElement(oe.Consumer, null, (s) => /* @__PURE__ */ h.createElement(J, { ...r, context: s }));
|
|
685
687
|
}
|
|
686
|
-
}, T(
|
|
688
|
+
}, T(H, "defaultProps", {
|
|
687
689
|
defer: !0,
|
|
688
690
|
encodeSpecialCharacters: !0,
|
|
689
691
|
prioritizeSeoTags: !1
|
|
690
|
-
}),
|
|
691
|
-
const
|
|
692
|
-
const t =
|
|
692
|
+
}), H);
|
|
693
|
+
const Je = (e) => {
|
|
694
|
+
const t = $(), r = typeof e.to == "string" ? e.to : e.to.hash, n = (s) => {
|
|
693
695
|
var o;
|
|
694
696
|
!(r != null && r.startsWith("#")) || r !== t.hash || (s.preventDefault(), (o = document.getElementById(r.slice(1))) == null || o.scrollIntoView());
|
|
695
697
|
};
|
|
696
|
-
return /* @__PURE__ */
|
|
698
|
+
return /* @__PURE__ */ ue.jsx(fe, { onClick: n, ...e });
|
|
699
|
+
}, ie = (e, t) => {
|
|
700
|
+
for (const r of e) {
|
|
701
|
+
const n = V(r, t);
|
|
702
|
+
if (n !== void 0) return n;
|
|
703
|
+
}
|
|
704
|
+
}, V = (e, t, r = []) => {
|
|
705
|
+
const n = t(e, r);
|
|
706
|
+
if (n !== void 0) return n;
|
|
707
|
+
if (e.type === "category")
|
|
708
|
+
for (const s of e.items) {
|
|
709
|
+
const o = V(s, t, [
|
|
710
|
+
...r,
|
|
711
|
+
e
|
|
712
|
+
]);
|
|
713
|
+
if (o !== void 0) return o;
|
|
714
|
+
}
|
|
715
|
+
}, Qe = () => {
|
|
716
|
+
const e = $(), t = K(), { sidebars: r } = Q(), n = t != null && t.id ? r[t.id] : [];
|
|
717
|
+
return ie(n, (s) => {
|
|
718
|
+
if (s.type === "doc" && S(t == null ? void 0 : t.id, s.id) === e.pathname)
|
|
719
|
+
return s;
|
|
720
|
+
});
|
|
721
|
+
}, Ne = (e) => {
|
|
722
|
+
const t = $(), r = K();
|
|
723
|
+
return V(e, (n) => {
|
|
724
|
+
if (n.type === "category" && n.link && S(r == null ? void 0 : r.id, n.link.id) === t.pathname || n.type === "doc" && S(r == null ? void 0 : r.id, n.id) === t.pathname)
|
|
725
|
+
return !0;
|
|
726
|
+
});
|
|
727
|
+
}, et = () => {
|
|
728
|
+
const e = $().pathname, { sidebars: t } = Q(), r = K(), n = r != null && r.id ? t[r.id] : [];
|
|
729
|
+
let s, o, c = !1;
|
|
730
|
+
return ie(n, (i) => {
|
|
731
|
+
const a = i.type === "doc" ? S(r == null ? void 0 : r.id, i.id) : i.type === "category" && i.link ? S(r == null ? void 0 : r.id, i.link.id) : void 0;
|
|
732
|
+
if (a) {
|
|
733
|
+
if (c)
|
|
734
|
+
return o = { label: i.label, id: a }, !0;
|
|
735
|
+
e === a ? c = !0 : s = { label: i.label, id: a };
|
|
736
|
+
}
|
|
737
|
+
}), { prev: s, next: o };
|
|
697
738
|
};
|
|
698
739
|
export {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
740
|
+
Je as A,
|
|
741
|
+
Le as H,
|
|
742
|
+
Ze as M,
|
|
743
|
+
Ge as a,
|
|
744
|
+
de as b,
|
|
745
|
+
Qe as c,
|
|
746
|
+
et as d,
|
|
747
|
+
Ne as u
|
|
704
748
|
};
|
|
705
|
-
//# sourceMappingURL=
|
|
749
|
+
//# sourceMappingURL=utils-CzT_9Tsn.js.map
|