@x-wave/blog 1.0.6 → 1.0.8
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/index.js +657 -641
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as R } from "react-i18next";
|
|
3
|
-
import { useLocation as
|
|
4
|
-
import { X as se, Tag as
|
|
5
|
-
import { useState as L, useEffect as P, createContext as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { useLocation as U, useNavigate as G, useParams as ae, Link as de, Navigate as ve, Routes as Ce, Route as ue } from "react-router-dom";
|
|
4
|
+
import { X as se, Tag as Te, User as Se, CalendarBlank as ye, MagnifyingGlass as he, List as Le, Sun as me, Moon as ge, Monitor as _e, CaretDown as oe, Globe as Pe, CaretRight as Be } from "@phosphor-icons/react";
|
|
5
|
+
import { useState as L, useEffect as P, createContext as De, useContext as Me, useRef as W } from "react";
|
|
6
|
+
import Ee from "react-markdown";
|
|
7
|
+
import Oe from "remark-gfm";
|
|
8
8
|
import ne from "i18next";
|
|
9
9
|
import { createPortal as fe } from "react-dom";
|
|
10
|
-
const
|
|
11
|
-
tabContainer:
|
|
12
|
-
tab:
|
|
13
|
-
active:
|
|
10
|
+
const Re = "_tabContainer_zk6h4_1", je = "_tab_zk6h4_1", Ae = "_active_zk6h4_45", Y = {
|
|
11
|
+
tabContainer: Re,
|
|
12
|
+
tab: je,
|
|
13
|
+
active: Ae
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
const { t: n } = R(),
|
|
15
|
+
function He({ hasAdvanced: t }) {
|
|
16
|
+
const { t: n } = R(), s = U(), a = G();
|
|
17
17
|
if (!t) return null;
|
|
18
|
-
const o = new URLSearchParams(
|
|
18
|
+
const o = new URLSearchParams(s.search).has("advanced"), l = () => {
|
|
19
19
|
if (o) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
20
|
+
const u = new URLSearchParams(s.search);
|
|
21
|
+
u.delete("advanced");
|
|
22
|
+
const p = u.toString(), w = p ? `?${p}` : "";
|
|
23
|
+
a(`${s.pathname}${w}${s.hash}`);
|
|
24
24
|
}
|
|
25
25
|
}, g = () => {
|
|
26
26
|
if (!o) {
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const u = new URLSearchParams(s.search);
|
|
28
|
+
u.set("advanced", ""), a(`${s.pathname}?${u.toString()}${s.hash}`);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */ d("div", { className:
|
|
31
|
+
return /* @__PURE__ */ d("div", { className: Y.tabContainer, children: [
|
|
32
32
|
/* @__PURE__ */ e(
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
35
35
|
type: "button",
|
|
36
|
-
className: `${
|
|
37
|
-
onClick:
|
|
36
|
+
className: `${Y.tab} ${o ? "" : Y.active}`,
|
|
37
|
+
onClick: l,
|
|
38
38
|
children: n("ui.simple")
|
|
39
39
|
}
|
|
40
40
|
),
|
|
@@ -42,69 +42,69 @@ function Ae({ hasAdvanced: t }) {
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
className: `${
|
|
45
|
+
className: `${Y.tab} ${o ? Y.active : ""}`,
|
|
46
46
|
onClick: g,
|
|
47
47
|
children: n("ui.advanced")
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
] });
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function qe({ children: t }) {
|
|
53
53
|
return /* @__PURE__ */ e("div", { className: "xw-blog-root", children: t });
|
|
54
54
|
}
|
|
55
55
|
function be(t) {
|
|
56
|
-
function n(
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
const
|
|
62
|
-
for (const
|
|
56
|
+
function n(s) {
|
|
57
|
+
const a = s.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
58
|
+
if (!a) return { frontmatter: {}, content: s };
|
|
59
|
+
const c = {}, o = a[1];
|
|
60
|
+
let l = "", g = !1;
|
|
61
|
+
const u = [];
|
|
62
|
+
for (const w of o.split(`
|
|
63
63
|
`)) {
|
|
64
|
-
const _ =
|
|
64
|
+
const _ = w.trim();
|
|
65
65
|
if (_.startsWith("-")) {
|
|
66
66
|
if (g) {
|
|
67
|
-
const
|
|
68
|
-
|
|
67
|
+
const f = _.substring(1).trim();
|
|
68
|
+
u.push(f);
|
|
69
69
|
}
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
|
-
if (g && !_.startsWith("-") && (l
|
|
73
|
-
const [
|
|
74
|
-
if (
|
|
72
|
+
if (g && !_.startsWith("-") && (c[l] = u.slice(), u.length = 0, g = !1), _ != null && _.includes(":")) {
|
|
73
|
+
const [f, ...r] = _.split(":"), v = r.join(":").trim();
|
|
74
|
+
if (l = f.trim(), !v) {
|
|
75
75
|
g = !0;
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
v === "true" ? c[l] = !0 : v === "false" ? c[l] = !1 : c[l] = v;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
g &&
|
|
82
|
-
const
|
|
81
|
+
g && u.length > 0 && (c[l] = u);
|
|
82
|
+
const p = s.replace(
|
|
83
83
|
/^---\s*\n[\s\S]*?\n---\s*\n/,
|
|
84
84
|
""
|
|
85
85
|
);
|
|
86
|
-
return { frontmatter:
|
|
86
|
+
return { frontmatter: c, content: p };
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
/**
|
|
90
90
|
* Load MDX content for a given language and slug.
|
|
91
91
|
* Automatically loads the advanced variant if `advanced` is true.
|
|
92
92
|
*/
|
|
93
|
-
async loadMDXContent(
|
|
94
|
-
const o =
|
|
95
|
-
if (!g) throw new Error(`File not found: ${
|
|
96
|
-
const
|
|
97
|
-
return { content:
|
|
93
|
+
async loadMDXContent(s, a, c = !1) {
|
|
94
|
+
const o = c ? `${a}-advanced.mdx` : `${a}.mdx`, l = `./docs/${s}/${o}`, g = t[l];
|
|
95
|
+
if (!g) throw new Error(`File not found: ${l}`);
|
|
96
|
+
const u = await g(), { frontmatter: p, content: w } = n(u);
|
|
97
|
+
return { content: w, frontmatter: p };
|
|
98
98
|
},
|
|
99
99
|
/**
|
|
100
100
|
* Load English content for generating consistent heading IDs.
|
|
101
101
|
* All heading anchors are derived from English content for stability across translations.
|
|
102
102
|
*/
|
|
103
|
-
async loadEnglishContent(
|
|
104
|
-
const o = `./docs/en/${
|
|
105
|
-
if (!
|
|
106
|
-
const g = await
|
|
107
|
-
return
|
|
103
|
+
async loadEnglishContent(s, a = !1) {
|
|
104
|
+
const o = `./docs/en/${a ? `${s}-advanced.mdx` : `${s}.mdx`}`, l = t[o];
|
|
105
|
+
if (!l) throw new Error(`File not found: ${o}`);
|
|
106
|
+
const g = await l(), { content: u } = n(g);
|
|
107
|
+
return u;
|
|
108
108
|
},
|
|
109
109
|
/**
|
|
110
110
|
* Build a tag index from all MDX files.
|
|
@@ -113,26 +113,26 @@ function be(t) {
|
|
|
113
113
|
* @param language - Language code to scan (defaults to 'en')
|
|
114
114
|
* @returns Promise resolving to tag index mapping tag names to document info
|
|
115
115
|
*/
|
|
116
|
-
async buildTagIndex(
|
|
117
|
-
const
|
|
118
|
-
(
|
|
116
|
+
async buildTagIndex(s = "en") {
|
|
117
|
+
const a = {}, c = `./docs/${s}/`, o = Object.keys(t).filter(
|
|
118
|
+
(l) => l.startsWith(c)
|
|
119
119
|
);
|
|
120
|
-
for (const
|
|
120
|
+
for (const l of o)
|
|
121
121
|
try {
|
|
122
|
-
const g = t[
|
|
122
|
+
const g = t[l], u = await g(), { frontmatter: p, content: w } = n(u), _ = l.split("/").pop() || "", f = _.replace(".mdx", "").replace("-advanced", ""), r = w.match(/^#\s+(.+)$/m), v = r ? r[1].trim() : f;
|
|
123
123
|
if (_.includes("-advanced")) continue;
|
|
124
|
-
const i =
|
|
124
|
+
const i = p.tags;
|
|
125
125
|
if (i && Array.isArray(i))
|
|
126
126
|
for (const b of i)
|
|
127
|
-
|
|
127
|
+
a[b] || (a[b] = []), a[b].some((x) => x.slug === f) || a[b].push({ slug: f, title: v });
|
|
128
128
|
} catch (g) {
|
|
129
|
-
console.warn(`Failed to process ${
|
|
129
|
+
console.warn(`Failed to process ${l}:`, g);
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return a;
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Oo(t) {
|
|
136
136
|
const n = be(t);
|
|
137
137
|
return {
|
|
138
138
|
mdxFiles: t,
|
|
@@ -140,218 +140,223 @@ function Eo(t) {
|
|
|
140
140
|
loadEnglishContent: n.loadEnglishContent
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
const we = "app-theme", $e = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", pe = (t) => t === "system" ? $e() : t,
|
|
144
|
-
const [t, n] = L(
|
|
143
|
+
const we = "app-theme", $e = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", pe = (t) => t === "system" ? $e() : t, We = () => typeof window > "u" ? "system" : localStorage.getItem(we) || "system", Ne = () => {
|
|
144
|
+
const [t, n] = L(We);
|
|
145
145
|
return P(() => {
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
const o = window.matchMedia("(prefers-color-scheme: dark)"),
|
|
149
|
-
const g = $e(),
|
|
150
|
-
|
|
146
|
+
const a = pe(t), c = document.querySelector(".xw-blog-root");
|
|
147
|
+
if (c && (c.classList.remove("light", "dark"), c.classList.add(a)), t === "system") {
|
|
148
|
+
const o = window.matchMedia("(prefers-color-scheme: dark)"), l = () => {
|
|
149
|
+
const g = $e(), u = document.querySelector(".xw-blog-root");
|
|
150
|
+
u && (u.classList.remove("light", "dark"), u.classList.add(g));
|
|
151
151
|
};
|
|
152
|
-
return o.addEventListener("change",
|
|
152
|
+
return o.addEventListener("change", l), () => o.removeEventListener("change", l);
|
|
153
153
|
}
|
|
154
154
|
}, [t]), {
|
|
155
155
|
theme: t,
|
|
156
|
-
setTheme: (
|
|
157
|
-
localStorage.setItem(we,
|
|
156
|
+
setTheme: (a) => {
|
|
157
|
+
localStorage.setItem(we, a), n(a);
|
|
158
158
|
},
|
|
159
159
|
effectiveTheme: pe(t)
|
|
160
160
|
};
|
|
161
|
-
},
|
|
162
|
-
title: ne.getFixedT(n)(
|
|
163
|
-
items:
|
|
164
|
-
title: ne.getFixedT(n)(
|
|
165
|
-
slug:
|
|
166
|
-
...
|
|
167
|
-
...
|
|
168
|
-
showTableOfContents:
|
|
161
|
+
}, Fe = (t) => "items" in t, te = (t, n) => t.map((s) => Fe(s) ? {
|
|
162
|
+
title: ne.getFixedT(n)(s.title),
|
|
163
|
+
items: s.items.map((a) => ({
|
|
164
|
+
title: ne.getFixedT(n)(a.title),
|
|
165
|
+
slug: a.slug,
|
|
166
|
+
...a.hasAdvanced && { hasAdvanced: a.hasAdvanced },
|
|
167
|
+
...a.showTableOfContents !== void 0 && {
|
|
168
|
+
showTableOfContents: a.showTableOfContents
|
|
169
169
|
}
|
|
170
170
|
}))
|
|
171
171
|
} : {
|
|
172
|
-
title: ne.getFixedT(n)(
|
|
173
|
-
slug:
|
|
174
|
-
...
|
|
175
|
-
...
|
|
176
|
-
showTableOfContents:
|
|
172
|
+
title: ne.getFixedT(n)(s.title),
|
|
173
|
+
slug: s.slug,
|
|
174
|
+
...s.hasAdvanced && { hasAdvanced: s.hasAdvanced },
|
|
175
|
+
...s.showTableOfContents !== void 0 && {
|
|
176
|
+
showTableOfContents: s.showTableOfContents
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
179
|
-
function
|
|
178
|
+
}), J = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), Ie = De(null);
|
|
179
|
+
function Ro({
|
|
180
|
+
children: t,
|
|
181
|
+
config: n,
|
|
182
|
+
blog: s,
|
|
183
|
+
navigationData: a = []
|
|
184
|
+
}) {
|
|
180
185
|
Ne();
|
|
181
|
-
const [
|
|
186
|
+
const [c, o] = L({});
|
|
182
187
|
P(() => {
|
|
183
|
-
const { buildTagIndex:
|
|
188
|
+
const { buildTagIndex: g } = be(s.mdxFiles), u = n.supportedLanguages.map(async (p) => {
|
|
184
189
|
try {
|
|
185
|
-
const
|
|
186
|
-
return { language:
|
|
187
|
-
} catch (
|
|
188
|
-
return console.error(`Failed to build tag index for ${
|
|
190
|
+
const w = await g(p);
|
|
191
|
+
return { language: p, index: w };
|
|
192
|
+
} catch (w) {
|
|
193
|
+
return console.error(`Failed to build tag index for ${p}:`, w), { language: p, index: {} };
|
|
189
194
|
}
|
|
190
195
|
});
|
|
191
|
-
Promise.all(
|
|
192
|
-
const
|
|
193
|
-
for (const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}).catch((
|
|
197
|
-
console.error("Failed to build tag indices:",
|
|
196
|
+
Promise.all(u).then((p) => {
|
|
197
|
+
const w = {};
|
|
198
|
+
for (const _ of p)
|
|
199
|
+
w[_.language] = _.index;
|
|
200
|
+
o(w);
|
|
201
|
+
}).catch((p) => {
|
|
202
|
+
console.error("Failed to build tag indices:", p);
|
|
198
203
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const
|
|
204
|
+
}, [s.mdxFiles, n.supportedLanguages]);
|
|
205
|
+
const l = { ...n, navigationData: a, tagIndex: c };
|
|
201
206
|
return /* @__PURE__ */ e(
|
|
202
207
|
Ie.Provider,
|
|
203
208
|
{
|
|
204
209
|
value: {
|
|
205
|
-
config:
|
|
206
|
-
loadContent:
|
|
207
|
-
loadEnglishContent:
|
|
210
|
+
config: l,
|
|
211
|
+
loadContent: s.loadContent,
|
|
212
|
+
loadEnglishContent: s.loadEnglishContent
|
|
208
213
|
},
|
|
209
|
-
children: /* @__PURE__ */ e(
|
|
214
|
+
children: /* @__PURE__ */ e(qe, { children: t })
|
|
210
215
|
}
|
|
211
216
|
);
|
|
212
217
|
}
|
|
213
|
-
function
|
|
218
|
+
function j() {
|
|
214
219
|
const t = Me(Ie);
|
|
215
220
|
if (!t)
|
|
216
221
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
217
222
|
return t;
|
|
218
223
|
}
|
|
219
|
-
const
|
|
220
|
-
tableOfContents:
|
|
221
|
-
header:
|
|
222
|
-
title:
|
|
223
|
-
nav:
|
|
224
|
-
list:
|
|
225
|
-
link:
|
|
226
|
-
active:
|
|
227
|
-
level1:
|
|
228
|
-
level2:
|
|
229
|
-
level3:
|
|
230
|
-
level4:
|
|
231
|
-
level5:
|
|
232
|
-
level6:
|
|
224
|
+
const Ke = "_tableOfContents_11q9u_1", ze = "_header_11q9u_20", Ue = "_title_11q9u_24", Ge = "_nav_11q9u_33", Qe = "_list_11q9u_39", Xe = "_link_11q9u_46", Ye = "_active_11q9u_70", Ve = "_level1_11q9u_86", Je = "_level2_11q9u_92", Ze = "_level3_11q9u_97", et = "_level4_11q9u_103", tt = "_level5_11q9u_109", nt = "_level6_11q9u_115", H = {
|
|
225
|
+
tableOfContents: Ke,
|
|
226
|
+
header: ze,
|
|
227
|
+
title: Ue,
|
|
228
|
+
nav: Ge,
|
|
229
|
+
list: Qe,
|
|
230
|
+
link: Xe,
|
|
231
|
+
active: Ye,
|
|
232
|
+
level1: Ve,
|
|
233
|
+
level2: Je,
|
|
234
|
+
level3: Ze,
|
|
235
|
+
level4: et,
|
|
236
|
+
level5: tt,
|
|
237
|
+
level6: nt
|
|
233
238
|
};
|
|
234
|
-
function
|
|
239
|
+
function ot({
|
|
235
240
|
content: t,
|
|
236
241
|
englishContent: n
|
|
237
242
|
}) {
|
|
238
|
-
const { t:
|
|
243
|
+
const { t: s } = R(), a = U(), c = G(), [o, l] = L([]), [g, u] = L(""), p = W(null);
|
|
239
244
|
P(() => {
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
let
|
|
245
|
+
u(""), (() => {
|
|
246
|
+
const f = /^(#{1,6})\s+(.+)$/gm, r = [];
|
|
247
|
+
let v = f.exec(t);
|
|
243
248
|
const i = [];
|
|
244
|
-
for (;
|
|
245
|
-
const
|
|
246
|
-
i.push({ level:
|
|
249
|
+
for (; v !== null; ) {
|
|
250
|
+
const m = v[1].length, N = v[2].trim();
|
|
251
|
+
i.push({ level: m, text: N }), v = f.exec(t);
|
|
247
252
|
}
|
|
248
253
|
const b = /^(#{1,6})\s+(.+)$/gm;
|
|
249
|
-
let
|
|
250
|
-
for (;
|
|
251
|
-
const
|
|
254
|
+
let x = b.exec(n), T = 0;
|
|
255
|
+
for (; x !== null && T < i.length; ) {
|
|
256
|
+
const m = x[2].trim(), N = J(m);
|
|
252
257
|
r.push({
|
|
253
|
-
id:
|
|
254
|
-
text: i[
|
|
258
|
+
id: N,
|
|
259
|
+
text: i[T].text,
|
|
255
260
|
// Use localized text for display
|
|
256
|
-
level: i[
|
|
257
|
-
}),
|
|
261
|
+
level: i[T].level
|
|
262
|
+
}), T++, x = b.exec(n);
|
|
258
263
|
}
|
|
259
|
-
|
|
264
|
+
l(r);
|
|
260
265
|
})();
|
|
261
266
|
}, [t, n]), P(() => {
|
|
262
267
|
if (o.length === 0) return;
|
|
263
268
|
const _ = setTimeout(() => {
|
|
264
|
-
const
|
|
269
|
+
const f = o.filter(
|
|
265
270
|
(r) => !document.getElementById(r.id)
|
|
266
271
|
);
|
|
267
|
-
|
|
272
|
+
f.length > 0 && console.warn("Some heading elements not found:", f);
|
|
268
273
|
}, 100);
|
|
269
274
|
return () => clearTimeout(_);
|
|
270
275
|
}, [o]), P(() => {
|
|
271
276
|
if (o.length === 0) return;
|
|
272
|
-
|
|
277
|
+
p.current && p.current.disconnect();
|
|
273
278
|
const _ = setTimeout(() => {
|
|
274
|
-
const
|
|
275
|
-
|
|
279
|
+
const f = o.map((r) => document.getElementById(r.id)).filter(Boolean);
|
|
280
|
+
f.length !== 0 && (p.current = new IntersectionObserver(
|
|
276
281
|
(r) => {
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
279
|
-
const i =
|
|
280
|
-
|
|
282
|
+
const v = r.filter((i) => i.isIntersecting);
|
|
283
|
+
if (v.length > 0) {
|
|
284
|
+
const i = v.reduce((b, x) => b.boundingClientRect.top < x.boundingClientRect.top ? b : x);
|
|
285
|
+
u(i.target.id);
|
|
281
286
|
}
|
|
282
287
|
},
|
|
283
288
|
{
|
|
284
289
|
rootMargin: "-80px 0% -80% 0%",
|
|
285
290
|
threshold: 0
|
|
286
291
|
}
|
|
287
|
-
),
|
|
288
|
-
|
|
292
|
+
), f.forEach((r) => {
|
|
293
|
+
p.current && p.current.observe(r);
|
|
289
294
|
}));
|
|
290
295
|
}, 150);
|
|
291
296
|
return () => {
|
|
292
|
-
clearTimeout(_),
|
|
297
|
+
clearTimeout(_), p.current && p.current.disconnect();
|
|
293
298
|
};
|
|
294
299
|
}, [o]), P(() => () => {
|
|
295
|
-
|
|
300
|
+
p.current && p.current.disconnect();
|
|
296
301
|
}, []);
|
|
297
|
-
const
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
300
|
-
const r = new URLSearchParams(
|
|
301
|
-
r.set("a", _),
|
|
302
|
-
`${
|
|
302
|
+
const w = (_) => {
|
|
303
|
+
const f = document.getElementById(_);
|
|
304
|
+
if (f) {
|
|
305
|
+
const r = new URLSearchParams(a.search);
|
|
306
|
+
r.set("a", _), c(
|
|
307
|
+
`${a.pathname}?${r.toString()}${a.hash}`,
|
|
303
308
|
{
|
|
304
309
|
replace: !0
|
|
305
310
|
}
|
|
306
311
|
);
|
|
307
|
-
const b =
|
|
312
|
+
const b = f.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
308
313
|
window.scrollTo({
|
|
309
314
|
top: b,
|
|
310
315
|
behavior: "smooth"
|
|
311
316
|
});
|
|
312
317
|
}
|
|
313
318
|
};
|
|
314
|
-
return o.length === 0 ? null : /* @__PURE__ */ d("aside", { className:
|
|
315
|
-
/* @__PURE__ */ e("div", { className:
|
|
316
|
-
/* @__PURE__ */ e("nav", { className:
|
|
319
|
+
return o.length === 0 ? null : /* @__PURE__ */ d("aside", { className: H.tableOfContents, children: [
|
|
320
|
+
/* @__PURE__ */ e("div", { className: H.header, children: /* @__PURE__ */ e("span", { className: H.title, children: s("ui.onThisPage", "On this page") }) }),
|
|
321
|
+
/* @__PURE__ */ e("nav", { className: H.nav, children: /* @__PURE__ */ e("ul", { className: H.list, children: o.map((_) => /* @__PURE__ */ e("li", { className: H.item, children: /* @__PURE__ */ e(
|
|
317
322
|
"button",
|
|
318
323
|
{
|
|
319
|
-
className: `${
|
|
320
|
-
onClick: () =>
|
|
324
|
+
className: `${H.link} ${H[`level${_.level}`]} ${g === _.id ? H.active : ""}`,
|
|
325
|
+
onClick: () => w(_.id),
|
|
321
326
|
type: "button",
|
|
322
327
|
children: _.text
|
|
323
328
|
}
|
|
324
329
|
) }, _.id)) }) })
|
|
325
330
|
] });
|
|
326
331
|
}
|
|
327
|
-
const
|
|
328
|
-
overlay:
|
|
329
|
-
modal:
|
|
330
|
-
header:
|
|
331
|
-
title:
|
|
332
|
-
closeButton:
|
|
333
|
-
results:
|
|
334
|
-
resultsList:
|
|
335
|
-
resultItem:
|
|
336
|
-
resultTitle:
|
|
337
|
-
resultSlug:
|
|
338
|
-
noResults:
|
|
332
|
+
const at = "_overlay_1e1d4_1", st = "_modal_1e1d4_26", ct = "_header_1e1d4_50", rt = "_title_1e1d4_58", lt = "_closeButton_1e1d4_65", it = "_results_1e1d4_86", dt = "_resultsList_1e1d4_94", ut = "_resultItem_1e1d4_100", ht = "_resultTitle_1e1d4_119", mt = "_resultSlug_1e1d4_124", gt = "_noResults_1e1d4_130", O = {
|
|
333
|
+
overlay: at,
|
|
334
|
+
modal: st,
|
|
335
|
+
header: ct,
|
|
336
|
+
title: rt,
|
|
337
|
+
closeButton: lt,
|
|
338
|
+
results: it,
|
|
339
|
+
resultsList: dt,
|
|
340
|
+
resultItem: ut,
|
|
341
|
+
resultTitle: ht,
|
|
342
|
+
resultSlug: mt,
|
|
343
|
+
noResults: gt
|
|
339
344
|
};
|
|
340
345
|
function _t({
|
|
341
346
|
tag: t,
|
|
342
347
|
results: n,
|
|
343
|
-
language:
|
|
344
|
-
onClose:
|
|
348
|
+
language: s,
|
|
349
|
+
onClose: a
|
|
345
350
|
}) {
|
|
346
|
-
const { t:
|
|
347
|
-
const
|
|
348
|
-
|
|
351
|
+
const { t: c } = R(), { config: o } = j(), l = G(), g = (u) => {
|
|
352
|
+
const p = o.basePath || "";
|
|
353
|
+
l(`${p}/${s}/${u}`), a();
|
|
349
354
|
};
|
|
350
355
|
return fe(
|
|
351
|
-
/* @__PURE__ */ e("div", { className:
|
|
352
|
-
/* @__PURE__ */ d("div", { className:
|
|
353
|
-
/* @__PURE__ */ d("h2", { className:
|
|
354
|
-
|
|
356
|
+
/* @__PURE__ */ e("div", { className: O.overlay, onClick: a, children: /* @__PURE__ */ d("div", { className: O.modal, onClick: (u) => u.stopPropagation(), children: [
|
|
357
|
+
/* @__PURE__ */ d("div", { className: O.header, children: [
|
|
358
|
+
/* @__PURE__ */ d("h2", { className: O.title, children: [
|
|
359
|
+
c("ui.tagResults"),
|
|
355
360
|
": ",
|
|
356
361
|
t
|
|
357
362
|
] }),
|
|
@@ -359,45 +364,45 @@ function _t({
|
|
|
359
364
|
"button",
|
|
360
365
|
{
|
|
361
366
|
type: "button",
|
|
362
|
-
className:
|
|
363
|
-
onClick:
|
|
367
|
+
className: O.closeButton,
|
|
368
|
+
onClick: a,
|
|
364
369
|
"aria-label": "Close",
|
|
365
370
|
children: /* @__PURE__ */ e(se, {})
|
|
366
371
|
}
|
|
367
372
|
)
|
|
368
373
|
] }),
|
|
369
|
-
/* @__PURE__ */ e("div", { className:
|
|
374
|
+
/* @__PURE__ */ e("div", { className: O.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: O.noResults, children: c("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: O.resultsList, children: n.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
370
375
|
"button",
|
|
371
376
|
{
|
|
372
377
|
type: "button",
|
|
373
|
-
className:
|
|
374
|
-
onClick: () => g(
|
|
378
|
+
className: O.resultItem,
|
|
379
|
+
onClick: () => g(u.slug),
|
|
375
380
|
children: [
|
|
376
|
-
/* @__PURE__ */ e("div", { className:
|
|
377
|
-
/* @__PURE__ */ d("div", { className:
|
|
381
|
+
/* @__PURE__ */ e("div", { className: O.resultTitle, children: u.title }),
|
|
382
|
+
/* @__PURE__ */ d("div", { className: O.resultSlug, children: [
|
|
378
383
|
"/",
|
|
379
|
-
|
|
384
|
+
u.slug
|
|
380
385
|
] })
|
|
381
386
|
]
|
|
382
387
|
}
|
|
383
|
-
) },
|
|
388
|
+
) }, u.slug)) }) })
|
|
384
389
|
] }) }),
|
|
385
390
|
document.body
|
|
386
391
|
);
|
|
387
392
|
}
|
|
388
|
-
const
|
|
389
|
-
tags:
|
|
390
|
-
compact:
|
|
391
|
-
tagLabel:
|
|
392
|
-
tagIcon:
|
|
393
|
-
tagList:
|
|
394
|
-
tag:
|
|
393
|
+
const pt = "_tags_11t8a_1", vt = "_compact_11t8a_9", ft = "_tagLabel_11t8a_15", bt = "_tagIcon_11t8a_25", wt = "_tagList_11t8a_30", $t = "_tag_11t8a_1", K = {
|
|
394
|
+
tags: pt,
|
|
395
|
+
compact: vt,
|
|
396
|
+
tagLabel: ft,
|
|
397
|
+
tagIcon: bt,
|
|
398
|
+
tagList: wt,
|
|
399
|
+
tag: $t
|
|
395
400
|
};
|
|
396
|
-
function
|
|
397
|
-
const { t:
|
|
401
|
+
function Nt({ tags: t, variant: n = "default", onTagClick: s }) {
|
|
402
|
+
const { t: a } = R();
|
|
398
403
|
if (!t || t.length === 0) return null;
|
|
399
|
-
const
|
|
400
|
-
|
|
404
|
+
const c = (o) => {
|
|
405
|
+
s && s(o);
|
|
401
406
|
};
|
|
402
407
|
return /* @__PURE__ */ d(
|
|
403
408
|
"div",
|
|
@@ -405,9 +410,9 @@ function $t({ tags: t, variant: n = "default", onTagClick: a }) {
|
|
|
405
410
|
className: `${K.tags} ${n === "compact" ? K.compact : ""}`,
|
|
406
411
|
children: [
|
|
407
412
|
n === "default" && /* @__PURE__ */ d("div", { className: K.tagLabel, children: [
|
|
408
|
-
/* @__PURE__ */ e(
|
|
413
|
+
/* @__PURE__ */ e(Te, { className: K.tagIcon, weight: "duotone" }),
|
|
409
414
|
/* @__PURE__ */ d("span", { children: [
|
|
410
|
-
|
|
415
|
+
a("ui.tags"),
|
|
411
416
|
":"
|
|
412
417
|
] })
|
|
413
418
|
] }),
|
|
@@ -416,8 +421,8 @@ function $t({ tags: t, variant: n = "default", onTagClick: a }) {
|
|
|
416
421
|
{
|
|
417
422
|
type: "button",
|
|
418
423
|
className: K.tag,
|
|
419
|
-
onClick: () =>
|
|
420
|
-
"aria-label": `${
|
|
424
|
+
onClick: () => c(o),
|
|
425
|
+
"aria-label": `${a("ui.filterByTag")}: ${o}`,
|
|
421
426
|
children: o
|
|
422
427
|
},
|
|
423
428
|
o
|
|
@@ -426,329 +431,327 @@ function $t({ tags: t, variant: n = "default", onTagClick: a }) {
|
|
|
426
431
|
}
|
|
427
432
|
);
|
|
428
433
|
}
|
|
429
|
-
const
|
|
430
|
-
contentPage:
|
|
431
|
-
metadata:
|
|
432
|
-
author:
|
|
433
|
-
date:
|
|
434
|
-
loadingContainer:
|
|
435
|
-
errorContainer:
|
|
434
|
+
const It = "_contentPage_1nxj5_1", xt = "_metadata_1nxj5_20", kt = "_author_1nxj5_30", Ct = "_date_1nxj5_31", Tt = "_loadingContainer_1nxj5_48", St = "_errorContainer_1nxj5_49", yt = "_skeletonTitle_1nxj5_71", Lt = "_skeletonParagraph_1nxj5_80", Pt = "_skeletonParagraphShort_1nxj5_93", Bt = "_errorText_1nxj5_107", Dt = "_mdxContent_1nxj5_112", Mt = "_withMetadata_1nxj5_125", Et = "_codeBlock_1nxj5_300", Ot = "_codeLanguage_1nxj5_304", D = {
|
|
435
|
+
contentPage: It,
|
|
436
|
+
metadata: xt,
|
|
437
|
+
author: kt,
|
|
438
|
+
date: Ct,
|
|
439
|
+
loadingContainer: Tt,
|
|
440
|
+
errorContainer: St,
|
|
436
441
|
skeletonTitle: yt,
|
|
437
|
-
skeletonParagraph:
|
|
438
|
-
skeletonParagraphShort:
|
|
439
|
-
errorText:
|
|
440
|
-
mdxContent:
|
|
442
|
+
skeletonParagraph: Lt,
|
|
443
|
+
skeletonParagraphShort: Pt,
|
|
444
|
+
errorText: Bt,
|
|
445
|
+
mdxContent: Dt,
|
|
441
446
|
withMetadata: Mt,
|
|
442
|
-
codeBlock:
|
|
443
|
-
codeLanguage:
|
|
447
|
+
codeBlock: Et,
|
|
448
|
+
codeLanguage: Ot
|
|
444
449
|
};
|
|
445
|
-
function
|
|
450
|
+
function Rt({ language: t }) {
|
|
446
451
|
var ie;
|
|
447
|
-
const { slug: n } = ae(),
|
|
448
|
-
const
|
|
452
|
+
const { slug: n } = ae(), s = U(), { t: a } = R(), { config: c, loadContent: o, loadEnglishContent: l } = j(), [g, u] = L(""), [p, w] = L(""), [_, f] = L({}), [r, v] = L(!0), [i, b] = L(null), [x, T] = L(!0), [m, N] = L(null), B = W(0), Q = W([]), Z = ((h) => {
|
|
453
|
+
const k = {
|
|
449
454
|
advanced: !1,
|
|
450
455
|
anchor: ""
|
|
451
456
|
};
|
|
452
|
-
if (!
|
|
453
|
-
const
|
|
454
|
-
for (const
|
|
455
|
-
|
|
456
|
-
return
|
|
457
|
-
})(
|
|
457
|
+
if (!h) return k;
|
|
458
|
+
const $ = (h.startsWith("?") ? h.substring(1) : h).split("&");
|
|
459
|
+
for (const C of $)
|
|
460
|
+
C === "advanced" ? k.advanced = !0 : C.startsWith("a=") && (k.anchor = C.substring(2));
|
|
461
|
+
return k;
|
|
462
|
+
})(s.search), A = Z.advanced;
|
|
458
463
|
if (P(() => {
|
|
459
464
|
(async () => {
|
|
460
465
|
if (!n) return;
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
v(!0), b(null), B.current = 0;
|
|
467
|
+
const k = (c == null ? void 0 : c.navigationData) || [];
|
|
468
|
+
let y = !0;
|
|
469
|
+
for (const $ of k)
|
|
470
|
+
if ("items" in $) {
|
|
471
|
+
const C = $.items.find((E) => E.slug === n);
|
|
472
|
+
if (C) {
|
|
473
|
+
y = C.showTableOfContents !== !1;
|
|
468
474
|
break;
|
|
469
475
|
}
|
|
470
|
-
} else if (
|
|
471
|
-
|
|
476
|
+
} else if ($.slug === n) {
|
|
477
|
+
y = $.showTableOfContents !== !1;
|
|
472
478
|
break;
|
|
473
479
|
}
|
|
474
|
-
y
|
|
480
|
+
T(y);
|
|
475
481
|
try {
|
|
476
|
-
let
|
|
482
|
+
let $;
|
|
477
483
|
try {
|
|
478
|
-
|
|
484
|
+
$ = await o(t, n, A);
|
|
479
485
|
} catch {
|
|
480
|
-
if (
|
|
481
|
-
|
|
486
|
+
if (A)
|
|
487
|
+
$ = await o(t, n, !1);
|
|
482
488
|
else
|
|
483
489
|
throw new Error("Content not found");
|
|
484
490
|
}
|
|
485
|
-
let
|
|
491
|
+
let C = "";
|
|
486
492
|
try {
|
|
487
|
-
|
|
493
|
+
C = await l(n, A);
|
|
488
494
|
} catch {
|
|
489
|
-
|
|
495
|
+
A && (C = await l(n, !1));
|
|
490
496
|
}
|
|
491
|
-
const
|
|
492
|
-
let F =
|
|
497
|
+
const E = /^(#{1,6})\s+(.+)$/gm, X = [];
|
|
498
|
+
let F = E.exec(C);
|
|
493
499
|
for (; F !== null; ) {
|
|
494
|
-
const
|
|
495
|
-
|
|
500
|
+
const ke = F[2].trim();
|
|
501
|
+
X.push(ke), F = E.exec(C);
|
|
496
502
|
}
|
|
497
|
-
|
|
498
|
-
} catch (
|
|
499
|
-
b(
|
|
503
|
+
Q.current = X, w(C), u($.content), f($.frontmatter);
|
|
504
|
+
} catch ($) {
|
|
505
|
+
b($ instanceof Error ? $.message : "Failed to load content");
|
|
500
506
|
} finally {
|
|
501
|
-
|
|
507
|
+
v(!1);
|
|
502
508
|
}
|
|
503
509
|
})();
|
|
504
510
|
}, [
|
|
505
511
|
n,
|
|
506
512
|
t,
|
|
507
|
-
|
|
508
|
-
|
|
513
|
+
A,
|
|
514
|
+
c.navigationData,
|
|
509
515
|
o,
|
|
510
|
-
|
|
516
|
+
l
|
|
511
517
|
]), P(() => {
|
|
512
|
-
if (!r &&
|
|
513
|
-
const
|
|
514
|
-
const
|
|
515
|
-
if (
|
|
516
|
-
const
|
|
518
|
+
if (!r && Z.anchor) {
|
|
519
|
+
const h = setTimeout(() => {
|
|
520
|
+
const k = document.getElementById(Z.anchor);
|
|
521
|
+
if (k) {
|
|
522
|
+
const C = k.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
517
523
|
window.scrollTo({
|
|
518
|
-
top:
|
|
524
|
+
top: C,
|
|
519
525
|
behavior: "smooth"
|
|
520
526
|
});
|
|
521
527
|
}
|
|
522
528
|
}, 150);
|
|
523
|
-
return () => clearTimeout(
|
|
529
|
+
return () => clearTimeout(h);
|
|
524
530
|
}
|
|
525
|
-
}, [r,
|
|
526
|
-
return /* @__PURE__ */ e("div", { className:
|
|
527
|
-
/* @__PURE__ */ e("div", { className:
|
|
528
|
-
/* @__PURE__ */ e("div", { className:
|
|
529
|
-
/* @__PURE__ */ e("div", { className:
|
|
530
|
-
/* @__PURE__ */ e("div", { className:
|
|
531
|
+
}, [r, Z.anchor]), r)
|
|
532
|
+
return /* @__PURE__ */ e("div", { className: D.contentPage, children: /* @__PURE__ */ d("div", { className: D.loadingContainer, children: [
|
|
533
|
+
/* @__PURE__ */ e("div", { className: D.skeletonTitle }),
|
|
534
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraph }),
|
|
535
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraph }),
|
|
536
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraphShort })
|
|
531
537
|
] }) });
|
|
532
538
|
if (i)
|
|
533
|
-
return /* @__PURE__ */ e("div", { className:
|
|
539
|
+
return /* @__PURE__ */ e("div", { className: D.contentPage, children: /* @__PURE__ */ e("div", { className: D.errorContainer, children: /* @__PURE__ */ d("div", { className: D.errorText, children: [
|
|
534
540
|
"Error: ",
|
|
535
541
|
i
|
|
536
542
|
] }) }) });
|
|
537
543
|
B.current = 0;
|
|
538
544
|
let le = !1;
|
|
539
|
-
const xe = () => /* @__PURE__ */ d("div", { className:
|
|
540
|
-
_.author && /* @__PURE__ */ d("span", { className:
|
|
541
|
-
/* @__PURE__ */ e(
|
|
545
|
+
const xe = () => /* @__PURE__ */ d("div", { className: D.metadata, children: [
|
|
546
|
+
_.author && /* @__PURE__ */ d("span", { className: D.author, children: [
|
|
547
|
+
/* @__PURE__ */ e(Se, { size: 16, weight: "regular" }),
|
|
542
548
|
_.author
|
|
543
549
|
] }),
|
|
544
|
-
_.date && /* @__PURE__ */ d("span", { className:
|
|
550
|
+
_.date && /* @__PURE__ */ d("span", { className: D.date, children: [
|
|
545
551
|
/* @__PURE__ */ e(ye, { size: 16, weight: "regular" }),
|
|
546
|
-
|
|
552
|
+
a("ui.lastEdited"),
|
|
547
553
|
": ",
|
|
548
554
|
_.date
|
|
549
555
|
] })
|
|
550
556
|
] });
|
|
551
557
|
return /* @__PURE__ */ d(z, { children: [
|
|
552
|
-
/* @__PURE__ */ d("div", { className:
|
|
553
|
-
/* @__PURE__ */ e(
|
|
554
|
-
/* @__PURE__ */ e("div", { className:
|
|
555
|
-
|
|
558
|
+
/* @__PURE__ */ d("div", { className: D.contentPage, children: [
|
|
559
|
+
/* @__PURE__ */ e(He, { hasAdvanced: _.hasAdvanced || !1 }),
|
|
560
|
+
/* @__PURE__ */ e("div", { className: D.mdxContent, children: /* @__PURE__ */ e(
|
|
561
|
+
Ee,
|
|
556
562
|
{
|
|
557
|
-
remarkPlugins: [
|
|
563
|
+
remarkPlugins: [Oe],
|
|
558
564
|
components: {
|
|
559
|
-
h1: ({ children:
|
|
560
|
-
const
|
|
565
|
+
h1: ({ children: h }) => {
|
|
566
|
+
const k = B.current++, y = Q.current[k] || "", $ = J(y), C = A ? `?advanced&a=${$}` : `?a=${$}`, E = `#/${t}/${n}${C}`, X = !le;
|
|
561
567
|
le = !0;
|
|
562
|
-
const
|
|
568
|
+
const F = _.date || _.author;
|
|
563
569
|
return /* @__PURE__ */ d(z, { children: [
|
|
564
570
|
/* @__PURE__ */ e(
|
|
565
571
|
"h1",
|
|
566
572
|
{
|
|
567
|
-
id:
|
|
568
|
-
className:
|
|
573
|
+
id: $,
|
|
574
|
+
className: X && F ? D.withMetadata : void 0,
|
|
569
575
|
children: /* @__PURE__ */ e(
|
|
570
576
|
"a",
|
|
571
577
|
{
|
|
572
|
-
href:
|
|
578
|
+
href: E,
|
|
573
579
|
style: { color: "inherit", textDecoration: "none" },
|
|
574
|
-
children:
|
|
580
|
+
children: h
|
|
575
581
|
}
|
|
576
582
|
)
|
|
577
583
|
}
|
|
578
584
|
),
|
|
579
|
-
|
|
585
|
+
X && F && /* @__PURE__ */ e(xe, {})
|
|
580
586
|
] });
|
|
581
587
|
},
|
|
582
|
-
h2: ({ children:
|
|
583
|
-
const
|
|
584
|
-
return /* @__PURE__ */ e("h2", { id:
|
|
588
|
+
h2: ({ children: h }) => {
|
|
589
|
+
const k = B.current++, y = Q.current[k] || "", $ = J(y), C = A ? `?advanced&a=${$}` : `?a=${$}`, E = `#/${t}/${n}${C}`;
|
|
590
|
+
return /* @__PURE__ */ e("h2", { id: $, children: /* @__PURE__ */ e(
|
|
585
591
|
"a",
|
|
586
592
|
{
|
|
587
|
-
href:
|
|
593
|
+
href: E,
|
|
588
594
|
style: { color: "inherit", textDecoration: "none" },
|
|
589
|
-
children:
|
|
595
|
+
children: h
|
|
590
596
|
}
|
|
591
597
|
) });
|
|
592
598
|
},
|
|
593
|
-
h3: ({ children:
|
|
594
|
-
const
|
|
595
|
-
return /* @__PURE__ */ e("h3", { id:
|
|
599
|
+
h3: ({ children: h }) => {
|
|
600
|
+
const k = B.current++, y = Q.current[k] || "", $ = J(y), C = A ? `?advanced&a=${$}` : `?a=${$}`, E = `#/${t}/${n}${C}`;
|
|
601
|
+
return /* @__PURE__ */ e("h3", { id: $, children: /* @__PURE__ */ e(
|
|
596
602
|
"a",
|
|
597
603
|
{
|
|
598
|
-
href:
|
|
604
|
+
href: E,
|
|
599
605
|
style: { color: "inherit", textDecoration: "none" },
|
|
600
|
-
children:
|
|
606
|
+
children: h
|
|
601
607
|
}
|
|
602
608
|
) });
|
|
603
609
|
},
|
|
604
|
-
h4: ({ children:
|
|
605
|
-
const
|
|
606
|
-
return /* @__PURE__ */ e("h4", { id:
|
|
610
|
+
h4: ({ children: h }) => {
|
|
611
|
+
const k = B.current++, y = Q.current[k] || "", $ = J(y), C = A ? `?advanced&a=${$}` : `?a=${$}`, E = `#/${t}/${n}${C}`;
|
|
612
|
+
return /* @__PURE__ */ e("h4", { id: $, children: /* @__PURE__ */ e(
|
|
607
613
|
"a",
|
|
608
614
|
{
|
|
609
|
-
href:
|
|
615
|
+
href: E,
|
|
610
616
|
style: { color: "inherit", textDecoration: "none" },
|
|
611
|
-
children:
|
|
617
|
+
children: h
|
|
612
618
|
}
|
|
613
619
|
) });
|
|
614
620
|
},
|
|
615
|
-
h5: ({ children:
|
|
616
|
-
const
|
|
617
|
-
return /* @__PURE__ */ e("h5", { id:
|
|
621
|
+
h5: ({ children: h }) => {
|
|
622
|
+
const k = `h5-${B.current++}`;
|
|
623
|
+
return /* @__PURE__ */ e("h5", { id: k, children: h });
|
|
618
624
|
},
|
|
619
|
-
h6: ({ children:
|
|
620
|
-
const
|
|
621
|
-
return /* @__PURE__ */ e("h6", { id:
|
|
625
|
+
h6: ({ children: h }) => {
|
|
626
|
+
const k = `h6-${B.current++}`;
|
|
627
|
+
return /* @__PURE__ */ e("h6", { id: k, children: h });
|
|
622
628
|
},
|
|
623
|
-
p: ({ children:
|
|
624
|
-
ul: ({ children:
|
|
625
|
-
ol: ({ children:
|
|
626
|
-
li: ({ children:
|
|
627
|
-
code: ({ className:
|
|
628
|
-
if (!
|
|
629
|
-
return /* @__PURE__ */ e("code", { ...
|
|
630
|
-
const
|
|
631
|
-
return /* @__PURE__ */ d("div", { className:
|
|
632
|
-
|
|
633
|
-
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className:
|
|
629
|
+
p: ({ children: h }) => /* @__PURE__ */ e("p", { children: h }),
|
|
630
|
+
ul: ({ children: h }) => /* @__PURE__ */ e("ul", { children: h }),
|
|
631
|
+
ol: ({ children: h }) => /* @__PURE__ */ e("ol", { children: h }),
|
|
632
|
+
li: ({ children: h }) => /* @__PURE__ */ e("li", { children: h }),
|
|
633
|
+
code: ({ className: h, children: k, ...y }) => {
|
|
634
|
+
if (!h)
|
|
635
|
+
return /* @__PURE__ */ e("code", { ...y, children: k });
|
|
636
|
+
const C = (h == null ? void 0 : h.replace("language-", "")) || "";
|
|
637
|
+
return /* @__PURE__ */ d("div", { className: D.codeBlock, children: [
|
|
638
|
+
C && /* @__PURE__ */ e("div", { className: D.codeLanguage, children: C }),
|
|
639
|
+
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: h, ...y, children: k }) })
|
|
634
640
|
] });
|
|
635
641
|
},
|
|
636
|
-
pre: ({ children:
|
|
642
|
+
pre: ({ children: h }) => /* @__PURE__ */ e(z, { children: h }),
|
|
637
643
|
// Let code component handle pre styling
|
|
638
|
-
blockquote: ({ children:
|
|
639
|
-
a: ({ href:
|
|
640
|
-
if (
|
|
641
|
-
const
|
|
642
|
-
return /* @__PURE__ */ e("a", { href:
|
|
644
|
+
blockquote: ({ children: h }) => /* @__PURE__ */ e("blockquote", { children: h }),
|
|
645
|
+
a: ({ href: h, children: k, ...y }) => {
|
|
646
|
+
if (h != null && h.startsWith("./")) {
|
|
647
|
+
const $ = h.slice(2), C = `#/${t}/${$}`;
|
|
648
|
+
return /* @__PURE__ */ e("a", { href: C, ...y, children: k });
|
|
643
649
|
}
|
|
644
|
-
return
|
|
650
|
+
return h != null && h.startsWith("http://") || h != null && h.startsWith("https://") ? /* @__PURE__ */ e(
|
|
645
651
|
"a",
|
|
646
652
|
{
|
|
647
|
-
href:
|
|
653
|
+
href: h,
|
|
648
654
|
target: "_blank",
|
|
649
655
|
rel: "noopener noreferrer",
|
|
650
|
-
...
|
|
651
|
-
children:
|
|
656
|
+
...y,
|
|
657
|
+
children: k
|
|
652
658
|
}
|
|
653
|
-
) : /* @__PURE__ */ e("a", { href:
|
|
659
|
+
) : /* @__PURE__ */ e("a", { href: h, ...y, children: k });
|
|
654
660
|
},
|
|
655
|
-
strong: ({ children:
|
|
656
|
-
em: ({ children:
|
|
661
|
+
strong: ({ children: h }) => /* @__PURE__ */ e("strong", { children: h }),
|
|
662
|
+
em: ({ children: h }) => /* @__PURE__ */ e("em", { children: h })
|
|
657
663
|
},
|
|
658
664
|
children: g
|
|
659
665
|
}
|
|
660
666
|
) }),
|
|
661
667
|
_.tags && _.tags.length > 0 && /* @__PURE__ */ e(
|
|
662
|
-
|
|
668
|
+
Nt,
|
|
663
669
|
{
|
|
664
670
|
tags: _.tags,
|
|
665
671
|
variant: "compact",
|
|
666
|
-
onTagClick: (
|
|
672
|
+
onTagClick: (h) => N(h)
|
|
667
673
|
}
|
|
668
674
|
)
|
|
669
675
|
] }),
|
|
670
|
-
|
|
671
|
-
|
|
676
|
+
x && /* @__PURE__ */ e(ot, { content: g, englishContent: p }),
|
|
677
|
+
m && ((ie = c.tagIndex) == null ? void 0 : ie[t]) && /* @__PURE__ */ e(
|
|
672
678
|
_t,
|
|
673
679
|
{
|
|
674
|
-
tag:
|
|
675
|
-
results:
|
|
680
|
+
tag: m,
|
|
681
|
+
results: c.tagIndex[t][m] || [],
|
|
676
682
|
language: t,
|
|
677
|
-
onClose: () =>
|
|
683
|
+
onClose: () => N(null)
|
|
678
684
|
}
|
|
679
685
|
)
|
|
680
686
|
] });
|
|
681
687
|
}
|
|
682
|
-
const
|
|
683
|
-
searchButton:
|
|
684
|
-
searchIcon:
|
|
685
|
-
searchHint:
|
|
686
|
-
kbd:
|
|
687
|
-
searchOverlay:
|
|
688
|
-
searchModal:
|
|
689
|
-
searchHeader:
|
|
690
|
-
searchInput:
|
|
691
|
-
closeButton:
|
|
692
|
-
searchResults:
|
|
693
|
-
resultsList:
|
|
694
|
-
resultItem:
|
|
695
|
-
selected:
|
|
696
|
-
resultTitle:
|
|
697
|
-
resultSlug:
|
|
698
|
-
noResults:
|
|
699
|
-
searchHints:
|
|
700
|
-
hint:
|
|
688
|
+
const jt = "_searchButton_1k9sl_1", At = "_searchIcon_1k9sl_17", Ht = "_searchHint_1k9sl_23", qt = "_kbd_1k9sl_27", Wt = "_searchOverlay_1k9sl_42", Ft = "_searchModal_1k9sl_67", Kt = "_searchHeader_1k9sl_91", zt = "_searchInput_1k9sl_105", Ut = "_closeButton_1k9sl_123", Gt = "_searchResults_1k9sl_144", Qt = "_resultsList_1k9sl_152", Xt = "_resultItem_1k9sl_158", Yt = "_selected_1k9sl_173", Vt = "_resultTitle_1k9sl_176", Jt = "_resultSlug_1k9sl_180", Zt = "_noResults_1k9sl_186", en = "_searchHints_1k9sl_193", tn = "_hint_1k9sl_210", S = {
|
|
689
|
+
searchButton: jt,
|
|
690
|
+
searchIcon: At,
|
|
691
|
+
searchHint: Ht,
|
|
692
|
+
kbd: qt,
|
|
693
|
+
searchOverlay: Wt,
|
|
694
|
+
searchModal: Ft,
|
|
695
|
+
searchHeader: Kt,
|
|
696
|
+
searchInput: zt,
|
|
697
|
+
closeButton: Ut,
|
|
698
|
+
searchResults: Gt,
|
|
699
|
+
resultsList: Qt,
|
|
700
|
+
resultItem: Xt,
|
|
701
|
+
selected: Yt,
|
|
702
|
+
resultTitle: Vt,
|
|
703
|
+
resultSlug: Jt,
|
|
704
|
+
noResults: Zt,
|
|
705
|
+
searchHints: en,
|
|
706
|
+
hint: tn
|
|
701
707
|
};
|
|
702
|
-
function
|
|
703
|
-
const { t: n } = R(), { config: a } =
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
)
|
|
707
|
-
title: w.title,
|
|
708
|
-
slug: w.slug
|
|
709
|
-
})) : [{ title: h.title, slug: h.slug }]);
|
|
708
|
+
function nn({ language: t }) {
|
|
709
|
+
const { t: n } = R(), s = G(), { config: a } = j(), [c, o] = L(!1), [l, g] = L(""), [u, p] = L([]), [w, _] = L(0), f = W(null), r = W(null), i = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K", b = (a.navigationData ? te(a.navigationData, t) : []).flatMap((m) => "items" in m ? m.items.map((N) => ({
|
|
710
|
+
title: N.title,
|
|
711
|
+
slug: N.slug
|
|
712
|
+
})) : [{ title: m.title, slug: m.slug }]);
|
|
710
713
|
P(() => {
|
|
711
|
-
if (!
|
|
712
|
-
|
|
714
|
+
if (!l.trim()) {
|
|
715
|
+
p([]), _(0);
|
|
713
716
|
return;
|
|
714
717
|
}
|
|
715
|
-
const
|
|
716
|
-
(B) => B.title.toLowerCase().includes(
|
|
718
|
+
const m = l.toLowerCase(), N = b.filter(
|
|
719
|
+
(B) => B.title.toLowerCase().includes(m) || B.slug.toLowerCase().includes(m)
|
|
717
720
|
);
|
|
718
|
-
|
|
719
|
-
}, [
|
|
720
|
-
const
|
|
721
|
-
(
|
|
721
|
+
p(N), _(0);
|
|
722
|
+
}, [l]), P(() => {
|
|
723
|
+
const m = (N) => {
|
|
724
|
+
(N.metaKey || N.ctrlKey) && N.key === "k" && (N.preventDefault(), o(!0), setTimeout(() => {
|
|
722
725
|
var B;
|
|
723
|
-
return (B =
|
|
724
|
-
}, 100)),
|
|
726
|
+
return (B = f.current) == null ? void 0 : B.focus();
|
|
727
|
+
}, 100)), N.key === "Escape" && c && (o(!1), g(""));
|
|
725
728
|
};
|
|
726
|
-
return document.addEventListener("keydown",
|
|
727
|
-
}, [
|
|
728
|
-
const
|
|
729
|
+
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
730
|
+
}, [c]), P(() => {
|
|
731
|
+
const m = () => {
|
|
729
732
|
o(!0), setTimeout(() => {
|
|
730
733
|
var B;
|
|
731
|
-
return (B =
|
|
734
|
+
return (B = f.current) == null ? void 0 : B.focus();
|
|
732
735
|
}, 100);
|
|
733
|
-
},
|
|
736
|
+
}, N = () => {
|
|
734
737
|
o(!1), g("");
|
|
735
738
|
};
|
|
736
|
-
return window.addEventListener("blog:open-search",
|
|
737
|
-
window.removeEventListener("blog:open-search",
|
|
739
|
+
return window.addEventListener("blog:open-search", m), window.addEventListener("blog:close-search", N), () => {
|
|
740
|
+
window.removeEventListener("blog:open-search", m), window.removeEventListener("blog:close-search", N);
|
|
738
741
|
};
|
|
739
742
|
}, []);
|
|
740
|
-
const
|
|
741
|
-
|
|
743
|
+
const x = (m) => {
|
|
744
|
+
m.key === "ArrowDown" ? (m.preventDefault(), _((N) => Math.min(N + 1, u.length - 1))) : m.key === "ArrowUp" ? (m.preventDefault(), _((N) => Math.max(N - 1, 0))) : m.key === "Enter" && u[w] && (m.preventDefault(), T(u[w].slug));
|
|
742
745
|
};
|
|
743
746
|
P(() => {
|
|
744
|
-
const
|
|
745
|
-
r.current && !r.current.contains(
|
|
747
|
+
const m = (N) => {
|
|
748
|
+
r.current && !r.current.contains(N.target) && (o(!1), g(""));
|
|
746
749
|
};
|
|
747
|
-
return
|
|
748
|
-
}, [
|
|
749
|
-
const
|
|
750
|
-
const
|
|
751
|
-
s(`${
|
|
750
|
+
return c && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
751
|
+
}, [c]);
|
|
752
|
+
const T = (m) => {
|
|
753
|
+
const N = a.basePath || "";
|
|
754
|
+
s(`${N}/${t}/${m}`), o(!1), g("");
|
|
752
755
|
};
|
|
753
756
|
return /* @__PURE__ */ d(z, { children: [
|
|
754
757
|
/* @__PURE__ */ d(
|
|
@@ -758,8 +761,8 @@ function tn({ language: t }) {
|
|
|
758
761
|
className: S.searchButton,
|
|
759
762
|
onClick: () => {
|
|
760
763
|
o(!0), setTimeout(() => {
|
|
761
|
-
var
|
|
762
|
-
return (
|
|
764
|
+
var m;
|
|
765
|
+
return (m = f.current) == null ? void 0 : m.focus();
|
|
763
766
|
}, 100);
|
|
764
767
|
},
|
|
765
768
|
"aria-label": n("ui.search"),
|
|
@@ -770,7 +773,7 @@ function tn({ language: t }) {
|
|
|
770
773
|
]
|
|
771
774
|
}
|
|
772
775
|
),
|
|
773
|
-
|
|
776
|
+
c && fe(
|
|
774
777
|
/* @__PURE__ */ e(
|
|
775
778
|
"div",
|
|
776
779
|
{
|
|
@@ -783,20 +786,20 @@ function tn({ language: t }) {
|
|
|
783
786
|
{
|
|
784
787
|
className: S.searchModal,
|
|
785
788
|
ref: r,
|
|
786
|
-
onClick: (
|
|
789
|
+
onClick: (m) => m.stopPropagation(),
|
|
787
790
|
children: [
|
|
788
791
|
/* @__PURE__ */ d("div", { className: S.searchHeader, children: [
|
|
789
792
|
/* @__PURE__ */ e(he, { className: S.searchIcon }),
|
|
790
793
|
/* @__PURE__ */ e(
|
|
791
794
|
"input",
|
|
792
795
|
{
|
|
793
|
-
ref:
|
|
796
|
+
ref: f,
|
|
794
797
|
type: "text",
|
|
795
798
|
className: S.searchInput,
|
|
796
799
|
placeholder: n("ui.searchPlaceholder"),
|
|
797
|
-
value:
|
|
798
|
-
onChange: (
|
|
799
|
-
onKeyDown:
|
|
800
|
+
value: l,
|
|
801
|
+
onChange: (m) => g(m.target.value),
|
|
802
|
+
onKeyDown: x
|
|
800
803
|
}
|
|
801
804
|
),
|
|
802
805
|
/* @__PURE__ */ e(
|
|
@@ -812,23 +815,23 @@ function tn({ language: t }) {
|
|
|
812
815
|
}
|
|
813
816
|
)
|
|
814
817
|
] }),
|
|
815
|
-
|
|
818
|
+
l && /* @__PURE__ */ e("div", { className: S.searchResults, children: u.length === 0 ? /* @__PURE__ */ e("div", { className: S.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: S.resultsList, children: u.map((m, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
816
819
|
"button",
|
|
817
820
|
{
|
|
818
821
|
type: "button",
|
|
819
|
-
className: `${S.resultItem} ${
|
|
820
|
-
onClick: () =>
|
|
821
|
-
onMouseEnter: () => _(
|
|
822
|
+
className: `${S.resultItem} ${N === w ? S.selected : ""}`,
|
|
823
|
+
onClick: () => T(m.slug),
|
|
824
|
+
onMouseEnter: () => _(N),
|
|
822
825
|
children: [
|
|
823
|
-
/* @__PURE__ */ e("div", { className: S.resultTitle, children:
|
|
826
|
+
/* @__PURE__ */ e("div", { className: S.resultTitle, children: m.title }),
|
|
824
827
|
/* @__PURE__ */ d("div", { className: S.resultSlug, children: [
|
|
825
828
|
"/",
|
|
826
|
-
|
|
829
|
+
m.slug
|
|
827
830
|
] })
|
|
828
831
|
]
|
|
829
832
|
}
|
|
830
|
-
) },
|
|
831
|
-
!
|
|
833
|
+
) }, m.slug)) }) }),
|
|
834
|
+
!l && /* @__PURE__ */ d("div", { className: S.searchHints, children: [
|
|
832
835
|
/* @__PURE__ */ d("div", { className: S.hint, children: [
|
|
833
836
|
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
834
837
|
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
@@ -852,79 +855,79 @@ function tn({ language: t }) {
|
|
|
852
855
|
)
|
|
853
856
|
] });
|
|
854
857
|
}
|
|
855
|
-
const
|
|
856
|
-
header:
|
|
857
|
-
container:
|
|
858
|
-
content:
|
|
859
|
-
leftSection:
|
|
860
|
-
mobileMenuButton:
|
|
861
|
-
burgerIcon:
|
|
862
|
-
logo:
|
|
863
|
-
nav:
|
|
864
|
-
navLink:
|
|
865
|
-
externalIcon:
|
|
866
|
-
supportDropdown:
|
|
858
|
+
const on = "_header_jrobc_1", an = "_container_jrobc_24", sn = "_content_jrobc_36", cn = "_leftSection_jrobc_43", rn = "_mobileMenuButton_jrobc_49", ln = "_burgerIcon_jrobc_87", dn = "_logo_jrobc_92", un = "_nav_jrobc_98", hn = "_navLink_jrobc_109", mn = "_externalIcon_jrobc_135", gn = "_supportDropdown_jrobc_141", _n = "_themeDropdown_jrobc_145", pn = "_themeButton_jrobc_149", vn = "_themeIcon_jrobc_171", fn = "_supportButton_jrobc_177", bn = "_caretIcon_jrobc_198", wn = "_dropdownMenu_jrobc_208", $n = "_dropdownItem_jrobc_221", Nn = "_dropdownIcon_jrobc_244", I = {
|
|
859
|
+
header: on,
|
|
860
|
+
container: an,
|
|
861
|
+
content: sn,
|
|
862
|
+
leftSection: cn,
|
|
863
|
+
mobileMenuButton: rn,
|
|
864
|
+
burgerIcon: ln,
|
|
865
|
+
logo: dn,
|
|
866
|
+
nav: un,
|
|
867
|
+
navLink: hn,
|
|
868
|
+
externalIcon: mn,
|
|
869
|
+
supportDropdown: gn,
|
|
867
870
|
themeDropdown: _n,
|
|
868
|
-
themeButton:
|
|
869
|
-
themeIcon:
|
|
870
|
-
supportButton:
|
|
871
|
-
caretIcon:
|
|
872
|
-
dropdownMenu:
|
|
873
|
-
dropdownItem:
|
|
874
|
-
dropdownIcon:
|
|
871
|
+
themeButton: pn,
|
|
872
|
+
themeIcon: vn,
|
|
873
|
+
supportButton: fn,
|
|
874
|
+
caretIcon: bn,
|
|
875
|
+
dropdownMenu: wn,
|
|
876
|
+
dropdownItem: $n,
|
|
877
|
+
dropdownIcon: Nn
|
|
875
878
|
};
|
|
876
|
-
function
|
|
877
|
-
const { t: n, i18n:
|
|
879
|
+
function In({ onMobileMenuToggle: t }) {
|
|
880
|
+
const { t: n, i18n: s } = R(), { config: a } = j(), c = a.header ?? {}, o = c.navLinks ?? [], l = c.dropdownItems ?? [], [g, u] = L(!1), [p, w] = L(!1), { theme: _, setTheme: f } = Ne(), r = W(null), v = W(null);
|
|
878
881
|
return P(() => {
|
|
879
882
|
const i = (b) => {
|
|
880
|
-
r.current && !r.current.contains(b.target) &&
|
|
883
|
+
r.current && !r.current.contains(b.target) && u(!1), v.current && !v.current.contains(b.target) && w(!1);
|
|
881
884
|
};
|
|
882
885
|
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
883
|
-
}, []), /* @__PURE__ */ e("header", { className:
|
|
884
|
-
/* @__PURE__ */ d("div", { className:
|
|
886
|
+
}, []), /* @__PURE__ */ e("header", { className: I.header, children: /* @__PURE__ */ e("div", { className: I.container, children: /* @__PURE__ */ d("div", { className: I.content, children: [
|
|
887
|
+
/* @__PURE__ */ d("div", { className: I.leftSection, children: [
|
|
885
888
|
/* @__PURE__ */ e(
|
|
886
889
|
"button",
|
|
887
890
|
{
|
|
888
891
|
type: "button",
|
|
889
|
-
className:
|
|
892
|
+
className: I.mobileMenuButton,
|
|
890
893
|
onClick: t,
|
|
891
894
|
"aria-label": "Open menu",
|
|
892
|
-
children: /* @__PURE__ */ e(
|
|
895
|
+
children: /* @__PURE__ */ e(Le, { className: I.burgerIcon })
|
|
893
896
|
}
|
|
894
897
|
),
|
|
895
|
-
/* @__PURE__ */ e("div", { className:
|
|
898
|
+
/* @__PURE__ */ e("div", { className: I.logo })
|
|
896
899
|
] }),
|
|
897
|
-
/* @__PURE__ */ d("nav", { className:
|
|
898
|
-
/* @__PURE__ */ e(
|
|
899
|
-
/* @__PURE__ */ d("div", { className:
|
|
900
|
+
/* @__PURE__ */ d("nav", { className: I.nav, children: [
|
|
901
|
+
/* @__PURE__ */ e(nn, { language: s.language }),
|
|
902
|
+
/* @__PURE__ */ d("div", { className: I.themeDropdown, ref: v, children: [
|
|
900
903
|
/* @__PURE__ */ d(
|
|
901
904
|
"button",
|
|
902
905
|
{
|
|
903
906
|
type: "button",
|
|
904
|
-
className:
|
|
905
|
-
onClick: () =>
|
|
906
|
-
"aria-expanded":
|
|
907
|
+
className: I.themeButton,
|
|
908
|
+
onClick: () => w(!p),
|
|
909
|
+
"aria-expanded": p,
|
|
907
910
|
"aria-haspopup": "true",
|
|
908
911
|
"aria-label": n("ui.theme"),
|
|
909
912
|
children: [
|
|
910
|
-
_ === "light" && /* @__PURE__ */ e(me, { className:
|
|
911
|
-
_ === "dark" && /* @__PURE__ */ e(
|
|
912
|
-
_ === "system" && /* @__PURE__ */ e(
|
|
913
|
-
/* @__PURE__ */ e(oe, { className:
|
|
913
|
+
_ === "light" && /* @__PURE__ */ e(me, { className: I.themeIcon }),
|
|
914
|
+
_ === "dark" && /* @__PURE__ */ e(ge, { className: I.themeIcon }),
|
|
915
|
+
_ === "system" && /* @__PURE__ */ e(_e, { className: I.themeIcon }),
|
|
916
|
+
/* @__PURE__ */ e(oe, { className: I.caretIcon })
|
|
914
917
|
]
|
|
915
918
|
}
|
|
916
919
|
),
|
|
917
|
-
|
|
920
|
+
p && /* @__PURE__ */ d("div", { className: I.dropdownMenu, children: [
|
|
918
921
|
/* @__PURE__ */ d(
|
|
919
922
|
"button",
|
|
920
923
|
{
|
|
921
924
|
type: "button",
|
|
922
925
|
onClick: () => {
|
|
923
|
-
|
|
926
|
+
f("light"), w(!1);
|
|
924
927
|
},
|
|
925
|
-
className:
|
|
928
|
+
className: I.dropdownItem,
|
|
926
929
|
children: [
|
|
927
|
-
/* @__PURE__ */ e(me, { className:
|
|
930
|
+
/* @__PURE__ */ e(me, { className: I.dropdownIcon }),
|
|
928
931
|
n("ui.light")
|
|
929
932
|
]
|
|
930
933
|
}
|
|
@@ -934,11 +937,11 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
934
937
|
{
|
|
935
938
|
type: "button",
|
|
936
939
|
onClick: () => {
|
|
937
|
-
|
|
940
|
+
f("dark"), w(!1);
|
|
938
941
|
},
|
|
939
|
-
className:
|
|
942
|
+
className: I.dropdownItem,
|
|
940
943
|
children: [
|
|
941
|
-
/* @__PURE__ */ e(
|
|
944
|
+
/* @__PURE__ */ e(ge, { className: I.dropdownIcon }),
|
|
942
945
|
n("ui.dark")
|
|
943
946
|
]
|
|
944
947
|
}
|
|
@@ -948,43 +951,43 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
948
951
|
{
|
|
949
952
|
type: "button",
|
|
950
953
|
onClick: () => {
|
|
951
|
-
|
|
954
|
+
f("system"), w(!1);
|
|
952
955
|
},
|
|
953
|
-
className:
|
|
956
|
+
className: I.dropdownItem,
|
|
954
957
|
children: [
|
|
955
|
-
/* @__PURE__ */ e(
|
|
958
|
+
/* @__PURE__ */ e(_e, { className: I.dropdownIcon }),
|
|
956
959
|
n("ui.system")
|
|
957
960
|
]
|
|
958
961
|
}
|
|
959
962
|
)
|
|
960
963
|
] })
|
|
961
964
|
] }),
|
|
962
|
-
|
|
965
|
+
l.length > 0 && /* @__PURE__ */ d("div", { className: I.supportDropdown, ref: r, children: [
|
|
963
966
|
/* @__PURE__ */ d(
|
|
964
967
|
"button",
|
|
965
968
|
{
|
|
966
969
|
type: "button",
|
|
967
|
-
className:
|
|
968
|
-
onClick: () =>
|
|
970
|
+
className: I.supportButton,
|
|
971
|
+
onClick: () => u(!g),
|
|
969
972
|
"aria-expanded": g,
|
|
970
973
|
"aria-haspopup": "true",
|
|
971
974
|
children: [
|
|
972
975
|
n("ui.support"),
|
|
973
|
-
/* @__PURE__ */ e(oe, { className:
|
|
976
|
+
/* @__PURE__ */ e(oe, { className: I.caretIcon })
|
|
974
977
|
]
|
|
975
978
|
}
|
|
976
979
|
),
|
|
977
|
-
g && /* @__PURE__ */ e("div", { className:
|
|
978
|
-
const
|
|
980
|
+
g && /* @__PURE__ */ e("div", { className: I.dropdownMenu, children: l.map((i, b) => {
|
|
981
|
+
const x = i.target ?? (i.url.startsWith("http") ? "_blank" : "_self"), T = i.rel ?? (x === "_blank" ? "noopener noreferrer" : void 0), m = i.icon;
|
|
979
982
|
return /* @__PURE__ */ d(
|
|
980
983
|
"a",
|
|
981
984
|
{
|
|
982
985
|
href: i.url,
|
|
983
|
-
target:
|
|
984
|
-
rel:
|
|
985
|
-
className:
|
|
986
|
+
target: x,
|
|
987
|
+
rel: T,
|
|
988
|
+
className: I.dropdownItem,
|
|
986
989
|
children: [
|
|
987
|
-
|
|
990
|
+
m && /* @__PURE__ */ e(m, { className: I.dropdownIcon }),
|
|
988
991
|
i.label
|
|
989
992
|
]
|
|
990
993
|
},
|
|
@@ -993,17 +996,17 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
993
996
|
}) })
|
|
994
997
|
] }),
|
|
995
998
|
o.map((i, b) => {
|
|
996
|
-
const
|
|
999
|
+
const x = i.target ?? (typeof i.url == "string" && i.url.startsWith("http") ? "_blank" : "_self"), T = i.rel ?? (x === "_blank" ? "noopener noreferrer" : void 0), m = i.icon;
|
|
997
1000
|
return /* @__PURE__ */ d(
|
|
998
1001
|
"a",
|
|
999
1002
|
{
|
|
1000
1003
|
href: i.url,
|
|
1001
|
-
target:
|
|
1002
|
-
rel:
|
|
1003
|
-
className: i.className ??
|
|
1004
|
+
target: x,
|
|
1005
|
+
rel: T,
|
|
1006
|
+
className: i.className ?? I.navLink,
|
|
1004
1007
|
children: [
|
|
1005
1008
|
i.label,
|
|
1006
|
-
|
|
1009
|
+
m && /* @__PURE__ */ e(m, { className: I.externalIcon })
|
|
1007
1010
|
]
|
|
1008
1011
|
},
|
|
1009
1012
|
b
|
|
@@ -1012,295 +1015,294 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
1012
1015
|
] })
|
|
1013
1016
|
] }) }) });
|
|
1014
1017
|
}
|
|
1015
|
-
const
|
|
1018
|
+
const V = (t) => "items" in t;
|
|
1016
1019
|
function ce({
|
|
1017
1020
|
styles: t,
|
|
1018
1021
|
onLanguageChange: n
|
|
1019
1022
|
}) {
|
|
1020
|
-
const { i18n:
|
|
1023
|
+
const { i18n: s } = R(), a = U(), c = G(), { config: o } = j(), [l, g] = L(!1), u = W(null), p = s.language, w = (f) => {
|
|
1021
1024
|
const r = o.basePath || "";
|
|
1022
|
-
let
|
|
1023
|
-
r &&
|
|
1024
|
-
const i =
|
|
1025
|
-
let
|
|
1026
|
-
o.supportedLanguages.includes(b) ? (i[0] =
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1025
|
+
let v = a.pathname;
|
|
1026
|
+
r && v.startsWith(r) && (v = v.slice(r.length));
|
|
1027
|
+
const i = v.split("/").filter(Boolean), b = i[0];
|
|
1028
|
+
let x = "";
|
|
1029
|
+
o.supportedLanguages.includes(b) ? (i[0] = f, x = `${r}/${i.join("/")}`) : x = `${r}/${f}${v}`;
|
|
1030
|
+
const T = x + a.search + a.hash;
|
|
1031
|
+
s.changeLanguage(f), c(T), g(!1), n == null || n();
|
|
1029
1032
|
};
|
|
1030
1033
|
P(() => {
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1034
|
+
const f = (r) => {
|
|
1035
|
+
u.current && !u.current.contains(r.target) && g(!1);
|
|
1033
1036
|
};
|
|
1034
|
-
return document.addEventListener("mousedown",
|
|
1037
|
+
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
1035
1038
|
}, []);
|
|
1036
|
-
const _ = (
|
|
1037
|
-
return /* @__PURE__ */ d("div", { className: t.languageSelect, ref:
|
|
1039
|
+
const _ = (f) => s.getFixedT(f)("language") || f;
|
|
1040
|
+
return /* @__PURE__ */ d("div", { className: t.languageSelect, ref: u, children: [
|
|
1038
1041
|
/* @__PURE__ */ d(
|
|
1039
1042
|
"button",
|
|
1040
1043
|
{
|
|
1041
1044
|
type: "button",
|
|
1042
1045
|
className: t.languageButton,
|
|
1043
|
-
onClick: () => g(!
|
|
1044
|
-
"aria-expanded":
|
|
1046
|
+
onClick: () => g(!l),
|
|
1047
|
+
"aria-expanded": l,
|
|
1045
1048
|
"aria-haspopup": "listbox",
|
|
1046
1049
|
children: [
|
|
1047
|
-
/* @__PURE__ */ e(
|
|
1048
|
-
_(
|
|
1050
|
+
/* @__PURE__ */ e(Pe, { className: t.icon }),
|
|
1051
|
+
_(p),
|
|
1049
1052
|
/* @__PURE__ */ e(oe, { className: t.chevron })
|
|
1050
1053
|
]
|
|
1051
1054
|
}
|
|
1052
1055
|
),
|
|
1053
|
-
|
|
1056
|
+
l && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children: o.supportedLanguages.map((f) => /* @__PURE__ */ e(
|
|
1054
1057
|
"button",
|
|
1055
1058
|
{
|
|
1056
1059
|
type: "button",
|
|
1057
|
-
className: `${t.languageOption} ${
|
|
1058
|
-
onClick: () =>
|
|
1060
|
+
className: `${t.languageOption} ${f === p ? t.selected : ""}`,
|
|
1061
|
+
onClick: () => w(f),
|
|
1059
1062
|
role: "option",
|
|
1060
|
-
"aria-selected":
|
|
1061
|
-
children: _(
|
|
1063
|
+
"aria-selected": f === p,
|
|
1064
|
+
children: _(f)
|
|
1062
1065
|
},
|
|
1063
|
-
|
|
1066
|
+
f
|
|
1064
1067
|
)) })
|
|
1065
1068
|
] });
|
|
1066
1069
|
}
|
|
1067
1070
|
function re({ styles: t, onLinkClick: n }) {
|
|
1068
|
-
const { i18n:
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1071
|
+
const { i18n: s } = R(), a = U(), { config: c } = j(), [o, l] = L(() => {
|
|
1072
|
+
if (!c.navigationData) return {};
|
|
1073
|
+
const r = s.language;
|
|
1074
|
+
return te(c.navigationData, r).reduce(
|
|
1075
|
+
(i, b, x) => {
|
|
1076
|
+
if (V(b)) {
|
|
1077
|
+
const T = c.navigationData[x], m = V(T) && T.defaultOpen === !0;
|
|
1078
|
+
i[b.title] = m;
|
|
1075
1079
|
}
|
|
1076
1080
|
return i;
|
|
1077
1081
|
},
|
|
1078
1082
|
{}
|
|
1079
1083
|
);
|
|
1080
|
-
}), g =
|
|
1081
|
-
l.navigationData,
|
|
1082
|
-
g
|
|
1083
|
-
);
|
|
1084
|
+
}), g = s.language, u = c.navigationData ? te(c.navigationData, g) : [];
|
|
1084
1085
|
P(() => {
|
|
1085
|
-
|
|
1086
|
-
|
|
1086
|
+
if (!c.navigationData) return;
|
|
1087
|
+
const v = te(
|
|
1088
|
+
c.navigationData,
|
|
1087
1089
|
g
|
|
1088
1090
|
).reduce(
|
|
1089
|
-
(i, b,
|
|
1090
|
-
if (
|
|
1091
|
-
const
|
|
1092
|
-
i[b.title] =
|
|
1091
|
+
(i, b, x) => {
|
|
1092
|
+
if (V(b)) {
|
|
1093
|
+
const T = c.navigationData[x], m = V(T) && T.defaultOpen === !0;
|
|
1094
|
+
i[b.title] = m;
|
|
1093
1095
|
}
|
|
1094
1096
|
return i;
|
|
1095
1097
|
},
|
|
1096
1098
|
{}
|
|
1097
1099
|
);
|
|
1098
|
-
|
|
1099
|
-
}, [g,
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1102
|
-
...
|
|
1103
|
-
[r]: !
|
|
1100
|
+
l(v);
|
|
1101
|
+
}, [g, c.navigationData]);
|
|
1102
|
+
const p = (r) => {
|
|
1103
|
+
l((v) => ({
|
|
1104
|
+
...v,
|
|
1105
|
+
[r]: !v[r]
|
|
1104
1106
|
}));
|
|
1105
|
-
},
|
|
1106
|
-
const
|
|
1107
|
-
let i =
|
|
1108
|
-
|
|
1107
|
+
}, w = (r) => {
|
|
1108
|
+
const v = c.basePath || "";
|
|
1109
|
+
let i = a.pathname;
|
|
1110
|
+
v && i.startsWith(v) && (i = i.slice(v.length));
|
|
1109
1111
|
const b = i.split("/").filter(Boolean);
|
|
1110
1112
|
return b[b.length - 1] === r;
|
|
1111
1113
|
}, _ = (r) => {
|
|
1112
|
-
const
|
|
1113
|
-
let i =
|
|
1114
|
-
|
|
1114
|
+
const v = c.basePath || "";
|
|
1115
|
+
let i = a.pathname;
|
|
1116
|
+
v && i.startsWith(v) && (i = i.slice(v.length));
|
|
1115
1117
|
const b = i.split("/").filter(Boolean);
|
|
1116
|
-
return b[0] &&
|
|
1117
|
-
},
|
|
1118
|
+
return b[0] && c.supportedLanguages.includes(b[0]) ? `${v}/${b[0]}/${r}` : `${v}/${g}/${r}`;
|
|
1119
|
+
}, f = () => {
|
|
1118
1120
|
n == null || n();
|
|
1119
1121
|
};
|
|
1120
|
-
return /* @__PURE__ */ e("div", { className: t.navigation, children:
|
|
1122
|
+
return /* @__PURE__ */ e("div", { className: t.navigation, children: u.map((r) => V(r) ? /* @__PURE__ */ d("div", { className: t.section, children: [
|
|
1121
1123
|
/* @__PURE__ */ d(
|
|
1122
1124
|
"button",
|
|
1123
1125
|
{
|
|
1124
1126
|
type: "button",
|
|
1125
1127
|
className: `${t.sectionButton} ${o[r.title] ? t.expanded : ""}`,
|
|
1126
|
-
onClick: () =>
|
|
1128
|
+
onClick: () => p(r.title),
|
|
1127
1129
|
children: [
|
|
1128
1130
|
r.title,
|
|
1129
|
-
/* @__PURE__ */ e(
|
|
1131
|
+
/* @__PURE__ */ e(Be, { className: t.icon })
|
|
1130
1132
|
]
|
|
1131
1133
|
}
|
|
1132
1134
|
),
|
|
1133
|
-
o[r.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: r.items.map((
|
|
1135
|
+
o[r.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: r.items.map((v) => /* @__PURE__ */ e(
|
|
1134
1136
|
de,
|
|
1135
1137
|
{
|
|
1136
|
-
to: _(
|
|
1137
|
-
className: `${t.navItem} ${
|
|
1138
|
-
onClick:
|
|
1139
|
-
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children:
|
|
1138
|
+
to: _(v.slug),
|
|
1139
|
+
className: `${t.navItem} ${w(v.slug) ? t.active : ""}`,
|
|
1140
|
+
onClick: f,
|
|
1141
|
+
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: v.title }) })
|
|
1140
1142
|
},
|
|
1141
|
-
|
|
1143
|
+
v.slug
|
|
1142
1144
|
)) })
|
|
1143
1145
|
] }, r.title) : /* @__PURE__ */ e(
|
|
1144
1146
|
de,
|
|
1145
1147
|
{
|
|
1146
1148
|
to: _(r.slug),
|
|
1147
|
-
className: `${t.navItem} ${
|
|
1148
|
-
onClick:
|
|
1149
|
+
className: `${t.navItem} ${w(r.slug) ? t.active : ""}`,
|
|
1150
|
+
onClick: f,
|
|
1149
1151
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: r.title }) })
|
|
1150
1152
|
},
|
|
1151
1153
|
r.slug
|
|
1152
1154
|
)) });
|
|
1153
1155
|
}
|
|
1154
|
-
function
|
|
1156
|
+
function jo({
|
|
1155
1157
|
styles: t,
|
|
1156
1158
|
onLinkClick: n,
|
|
1157
|
-
onLanguageChange:
|
|
1159
|
+
onLanguageChange: s
|
|
1158
1160
|
}) {
|
|
1159
1161
|
return /* @__PURE__ */ d(z, { children: [
|
|
1160
|
-
/* @__PURE__ */ e(ce, { styles: t, onLanguageChange:
|
|
1162
|
+
/* @__PURE__ */ e(ce, { styles: t, onLanguageChange: s }),
|
|
1161
1163
|
/* @__PURE__ */ e(re, { styles: t, onLinkClick: n })
|
|
1162
1164
|
] });
|
|
1163
1165
|
}
|
|
1164
|
-
const
|
|
1165
|
-
backdrop:
|
|
1166
|
-
open:
|
|
1167
|
-
mobileMenu:
|
|
1168
|
-
header:
|
|
1169
|
-
brand:
|
|
1166
|
+
const xn = "_backdrop_1a7pu_1", kn = "_open_1a7pu_13", Cn = "_mobileMenu_1a7pu_18", Tn = "_header_1a7pu_37", Sn = "_brand_1a7pu_46", yn = "_cloudIcon_1a7pu_53", Ln = "_title_1a7pu_62", Pn = "_closeButton_1a7pu_69", Bn = "_closeIcon_1a7pu_101", Dn = "_languageSection_1a7pu_106", Mn = "_languageSelect_1a7pu_112", En = "_languageButton_1a7pu_117", On = "_icon_1a7pu_156", Rn = "_chevron_1a7pu_162", jn = "_languageDropdown_1a7pu_172", An = "_languageOption_1a7pu_185", Hn = "_selected_1a7pu_226", qn = "_scrollArea_1a7pu_231", Wn = "_navigation_1a7pu_237", Fn = "_section_1a7pu_241", Kn = "_sectionButton_1a7pu_245", zn = "_expanded_1a7pu_285", Un = "_sectionItems_1a7pu_289", Gn = "_navItem_1a7pu_297", Qn = "_active_1a7pu_310", Xn = "_navItemContent_1a7pu_316", Yn = "_navItemTitle_1a7pu_322", M = {
|
|
1167
|
+
backdrop: xn,
|
|
1168
|
+
open: kn,
|
|
1169
|
+
mobileMenu: Cn,
|
|
1170
|
+
header: Tn,
|
|
1171
|
+
brand: Sn,
|
|
1170
1172
|
cloudIcon: yn,
|
|
1171
|
-
title:
|
|
1172
|
-
closeButton:
|
|
1173
|
-
closeIcon:
|
|
1174
|
-
languageSection:
|
|
1173
|
+
title: Ln,
|
|
1174
|
+
closeButton: Pn,
|
|
1175
|
+
closeIcon: Bn,
|
|
1176
|
+
languageSection: Dn,
|
|
1175
1177
|
languageSelect: Mn,
|
|
1176
|
-
languageButton:
|
|
1177
|
-
icon:
|
|
1178
|
-
chevron:
|
|
1179
|
-
languageDropdown:
|
|
1180
|
-
languageOption:
|
|
1181
|
-
selected:
|
|
1182
|
-
scrollArea:
|
|
1183
|
-
navigation:
|
|
1184
|
-
section:
|
|
1185
|
-
sectionButton:
|
|
1186
|
-
expanded:
|
|
1187
|
-
sectionItems:
|
|
1188
|
-
navItem:
|
|
1189
|
-
active:
|
|
1190
|
-
navItemContent:
|
|
1191
|
-
navItemTitle:
|
|
1178
|
+
languageButton: En,
|
|
1179
|
+
icon: On,
|
|
1180
|
+
chevron: Rn,
|
|
1181
|
+
languageDropdown: jn,
|
|
1182
|
+
languageOption: An,
|
|
1183
|
+
selected: Hn,
|
|
1184
|
+
scrollArea: qn,
|
|
1185
|
+
navigation: Wn,
|
|
1186
|
+
section: Fn,
|
|
1187
|
+
sectionButton: Kn,
|
|
1188
|
+
expanded: zn,
|
|
1189
|
+
sectionItems: Un,
|
|
1190
|
+
navItem: Gn,
|
|
1191
|
+
active: Qn,
|
|
1192
|
+
navItemContent: Xn,
|
|
1193
|
+
navItemTitle: Yn
|
|
1192
1194
|
};
|
|
1193
|
-
function
|
|
1194
|
-
const { config:
|
|
1195
|
+
function Vn({ isOpen: t, onClose: n }) {
|
|
1196
|
+
const { config: s } = j(), a = s.logo;
|
|
1195
1197
|
return P(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
1196
1198
|
document.body.style.overflow = "unset";
|
|
1197
1199
|
}), [t]), P(() => {
|
|
1198
|
-
const
|
|
1200
|
+
const c = (o) => {
|
|
1199
1201
|
o.key === "Escape" && t && n();
|
|
1200
1202
|
};
|
|
1201
|
-
return document.addEventListener("keydown",
|
|
1203
|
+
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1202
1204
|
}, [t, n]), /* @__PURE__ */ d(z, { children: [
|
|
1203
1205
|
/* @__PURE__ */ e(
|
|
1204
1206
|
"div",
|
|
1205
1207
|
{
|
|
1206
|
-
className: `${
|
|
1208
|
+
className: `${M.backdrop} ${t ? M.open : ""}`,
|
|
1207
1209
|
onClick: n
|
|
1208
1210
|
}
|
|
1209
1211
|
),
|
|
1210
|
-
/* @__PURE__ */ d("div", { className: `${
|
|
1211
|
-
/* @__PURE__ */ d("div", { className:
|
|
1212
|
-
/* @__PURE__ */ d("div", { className:
|
|
1213
|
-
|
|
1214
|
-
/* @__PURE__ */ e("h1", { className:
|
|
1212
|
+
/* @__PURE__ */ d("div", { className: `${M.mobileMenu} ${t ? M.open : ""}`, children: [
|
|
1213
|
+
/* @__PURE__ */ d("div", { className: M.header, children: [
|
|
1214
|
+
/* @__PURE__ */ d("div", { className: M.brand, children: [
|
|
1215
|
+
a && /* @__PURE__ */ e(a, { className: M.cloudIcon }),
|
|
1216
|
+
/* @__PURE__ */ e("h1", { className: M.title, children: s.title })
|
|
1215
1217
|
] }),
|
|
1216
1218
|
/* @__PURE__ */ e(
|
|
1217
1219
|
"button",
|
|
1218
1220
|
{
|
|
1219
1221
|
type: "button",
|
|
1220
|
-
className:
|
|
1222
|
+
className: M.closeButton,
|
|
1221
1223
|
onClick: n,
|
|
1222
1224
|
"aria-label": "Close menu",
|
|
1223
|
-
children: /* @__PURE__ */ e(se, { className:
|
|
1225
|
+
children: /* @__PURE__ */ e(se, { className: M.closeIcon })
|
|
1224
1226
|
}
|
|
1225
1227
|
)
|
|
1226
1228
|
] }),
|
|
1227
|
-
/* @__PURE__ */ e("div", { className:
|
|
1228
|
-
/* @__PURE__ */ e("div", { className:
|
|
1229
|
+
/* @__PURE__ */ e("div", { className: M.languageSection, children: /* @__PURE__ */ e(ce, { styles: M, onLanguageChange: n }) }),
|
|
1230
|
+
/* @__PURE__ */ e("div", { className: M.scrollArea, children: /* @__PURE__ */ e(re, { styles: M, onLinkClick: n }) })
|
|
1229
1231
|
] })
|
|
1230
1232
|
] });
|
|
1231
1233
|
}
|
|
1232
|
-
const
|
|
1233
|
-
sidebar:
|
|
1234
|
-
header:
|
|
1235
|
-
brand:
|
|
1236
|
-
cloudIcon:
|
|
1237
|
-
title:
|
|
1238
|
-
languageSelect:
|
|
1239
|
-
languageButton:
|
|
1240
|
-
icon:
|
|
1241
|
-
chevron:
|
|
1242
|
-
languageDropdown:
|
|
1243
|
-
languageOption:
|
|
1244
|
-
selected:
|
|
1245
|
-
scrollArea:
|
|
1246
|
-
navigation:
|
|
1247
|
-
section:
|
|
1248
|
-
sectionButton:
|
|
1234
|
+
const Jn = "_sidebar_1tdxt_1", Zn = "_header_1tdxt_17", eo = "_brand_1tdxt_29", to = "_cloudIcon_1tdxt_35", no = "_title_1tdxt_44", oo = "_languageSelect_1tdxt_55", ao = "_languageButton_1tdxt_61", so = "_icon_1tdxt_99", co = "_chevron_1tdxt_104", ro = "_languageDropdown_1tdxt_114", lo = "_languageOption_1tdxt_128", io = "_selected_1tdxt_147", uo = "_scrollArea_1tdxt_152", ho = "_navigation_1tdxt_158", mo = "_section_1tdxt_164", go = "_sectionButton_1tdxt_170", _o = "_expanded_1tdxt_213", po = "_sectionItems_1tdxt_217", vo = "_navItem_1tdxt_225", fo = "_active_1tdxt_238", bo = "_navItemContent_1tdxt_243", q = {
|
|
1235
|
+
sidebar: Jn,
|
|
1236
|
+
header: Zn,
|
|
1237
|
+
brand: eo,
|
|
1238
|
+
cloudIcon: to,
|
|
1239
|
+
title: no,
|
|
1240
|
+
languageSelect: oo,
|
|
1241
|
+
languageButton: ao,
|
|
1242
|
+
icon: so,
|
|
1243
|
+
chevron: co,
|
|
1244
|
+
languageDropdown: ro,
|
|
1245
|
+
languageOption: lo,
|
|
1246
|
+
selected: io,
|
|
1247
|
+
scrollArea: uo,
|
|
1248
|
+
navigation: ho,
|
|
1249
|
+
section: mo,
|
|
1250
|
+
sectionButton: go,
|
|
1249
1251
|
expanded: _o,
|
|
1250
|
-
sectionItems:
|
|
1251
|
-
navItem:
|
|
1252
|
-
active:
|
|
1253
|
-
navItemContent:
|
|
1252
|
+
sectionItems: po,
|
|
1253
|
+
navItem: vo,
|
|
1254
|
+
active: fo,
|
|
1255
|
+
navItemContent: bo
|
|
1254
1256
|
};
|
|
1255
|
-
function
|
|
1256
|
-
const { config: t } =
|
|
1257
|
+
function wo() {
|
|
1258
|
+
const { config: t } = j(), n = t.logo, s = t.supportedLanguages.length > 1;
|
|
1257
1259
|
return /* @__PURE__ */ d("div", { className: q.sidebar, children: [
|
|
1258
1260
|
/* @__PURE__ */ d("div", { className: q.header, children: [
|
|
1259
1261
|
/* @__PURE__ */ d("div", { className: q.brand, children: [
|
|
1260
1262
|
n && /* @__PURE__ */ e(n, { className: q.cloudIcon }),
|
|
1261
1263
|
/* @__PURE__ */ e("div", { className: q.title, children: t.title })
|
|
1262
1264
|
] }),
|
|
1263
|
-
/* @__PURE__ */ e(ce, { styles: q })
|
|
1265
|
+
s && /* @__PURE__ */ e(ce, { styles: q })
|
|
1264
1266
|
] }),
|
|
1265
1267
|
/* @__PURE__ */ e("div", { className: q.scrollArea, children: /* @__PURE__ */ e(re, { styles: q }) })
|
|
1266
1268
|
] });
|
|
1267
1269
|
}
|
|
1268
|
-
const
|
|
1269
|
-
app:
|
|
1270
|
-
layout:
|
|
1271
|
-
main:
|
|
1272
|
-
contentWrapper:
|
|
1270
|
+
const $o = "_app_1v4z4_1", No = "_layout_1v4z4_9", Io = "_main_1v4z4_15", xo = "_contentWrapper_1v4z4_27", ee = {
|
|
1271
|
+
app: $o,
|
|
1272
|
+
layout: No,
|
|
1273
|
+
main: Io,
|
|
1274
|
+
contentWrapper: xo
|
|
1273
1275
|
};
|
|
1274
|
-
function
|
|
1275
|
-
const { language: n } = ae(), { i18n:
|
|
1276
|
+
function ko({ children: t }) {
|
|
1277
|
+
const { language: n } = ae(), { i18n: s } = R(), { config: a } = j(), [c, o] = L(!1);
|
|
1276
1278
|
P(() => {
|
|
1277
|
-
n &&
|
|
1278
|
-
}, [n,
|
|
1279
|
-
const
|
|
1280
|
-
o(!
|
|
1279
|
+
n && a.supportedLanguages.includes(n) && s.changeLanguage(n);
|
|
1280
|
+
}, [n, s, a.supportedLanguages]);
|
|
1281
|
+
const l = () => {
|
|
1282
|
+
o(!c);
|
|
1281
1283
|
}, g = () => {
|
|
1282
1284
|
o(!1);
|
|
1283
1285
|
};
|
|
1284
|
-
if (!n || !
|
|
1286
|
+
if (!n || !a.supportedLanguages.includes(n))
|
|
1285
1287
|
return /* @__PURE__ */ e(ve, { to: "/en/welcome", replace: !0 });
|
|
1286
|
-
const
|
|
1288
|
+
const u = !!a.header, p = !!a.navigationData;
|
|
1287
1289
|
return /* @__PURE__ */ d("div", { className: ee.app, children: [
|
|
1288
|
-
|
|
1289
|
-
/* @__PURE__ */ e(
|
|
1290
|
+
u && /* @__PURE__ */ e(In, { onMobileMenuToggle: l }),
|
|
1291
|
+
/* @__PURE__ */ e(Vn, { isOpen: c, onClose: g }),
|
|
1290
1292
|
/* @__PURE__ */ d("div", { className: ee.layout, children: [
|
|
1291
|
-
/* @__PURE__ */ e(
|
|
1293
|
+
p && /* @__PURE__ */ e(wo, {}),
|
|
1292
1294
|
/* @__PURE__ */ e("main", { className: ee.main, children: /* @__PURE__ */ e("div", { className: ee.contentWrapper, children: t }) })
|
|
1293
1295
|
] })
|
|
1294
1296
|
] });
|
|
1295
1297
|
}
|
|
1296
|
-
function
|
|
1298
|
+
function Ao() {
|
|
1297
1299
|
const { language: t } = ae();
|
|
1298
|
-
return /* @__PURE__ */ e(
|
|
1299
|
-
/* @__PURE__ */ e(ue, { path: "/:slug", element: /* @__PURE__ */ e(
|
|
1300
|
+
return /* @__PURE__ */ e(ko, { children: /* @__PURE__ */ d(Ce, { children: [
|
|
1301
|
+
/* @__PURE__ */ e(ue, { path: "/:slug", element: /* @__PURE__ */ e(Rt, { language: t }) }),
|
|
1300
1302
|
/* @__PURE__ */ e(ue, { path: "/", element: /* @__PURE__ */ e(ve, { to: "welcome", replace: !0 }) })
|
|
1301
1303
|
] }) });
|
|
1302
1304
|
}
|
|
1303
|
-
function
|
|
1305
|
+
function Ho() {
|
|
1304
1306
|
return {
|
|
1305
1307
|
openSearchModal: () => {
|
|
1306
1308
|
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
@@ -1310,28 +1312,42 @@ function Ao() {
|
|
|
1310
1312
|
}
|
|
1311
1313
|
};
|
|
1312
1314
|
}
|
|
1315
|
+
function qo() {
|
|
1316
|
+
const { i18n: t } = R(), n = U(), s = G(), { config: a } = j();
|
|
1317
|
+
return (c) => {
|
|
1318
|
+
const o = a.basePath || "";
|
|
1319
|
+
let l = n.pathname;
|
|
1320
|
+
o && l.startsWith(o) && (l = l.slice(o.length));
|
|
1321
|
+
const g = l.split("/").filter(Boolean), u = g[0];
|
|
1322
|
+
let p = "";
|
|
1323
|
+
a.supportedLanguages.includes(u) ? (g[0] = c, p = `${o}/${g.join("/")}`) : p = `${o}/${c}${l}`;
|
|
1324
|
+
const w = p + n.search + n.hash;
|
|
1325
|
+
t.changeLanguage(c), s(w);
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1313
1328
|
export {
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1329
|
+
He as AdvancedModeToggle,
|
|
1330
|
+
Ro as BlogProvider,
|
|
1331
|
+
qe as BlogRoot,
|
|
1332
|
+
Rt as ContentPage,
|
|
1333
|
+
ko as DocumentationLayout,
|
|
1334
|
+
Ao as DocumentationRoutes,
|
|
1335
|
+
In as Header,
|
|
1321
1336
|
ce as LanguageSelector,
|
|
1322
|
-
|
|
1323
|
-
|
|
1337
|
+
Vn as MobileMenu,
|
|
1338
|
+
jo as NavigationContent,
|
|
1324
1339
|
re as NavigationMenu,
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1340
|
+
nn as SearchBar,
|
|
1341
|
+
wo as Sidebar,
|
|
1342
|
+
ot as TableOfContents,
|
|
1328
1343
|
_t as TagResultsModal,
|
|
1329
|
-
|
|
1330
|
-
|
|
1344
|
+
Nt as Tags,
|
|
1345
|
+
Oo as createBlogUtils,
|
|
1331
1346
|
be as createContentLoaders,
|
|
1332
|
-
|
|
1347
|
+
J as generateHeadingId,
|
|
1333
1348
|
te as getNavigationData,
|
|
1334
|
-
|
|
1335
|
-
|
|
1349
|
+
j as useBlogConfig,
|
|
1350
|
+
qo as useLanguageChange,
|
|
1351
|
+
Ho as useSearchModal,
|
|
1336
1352
|
Ne as useTheme
|
|
1337
1353
|
};
|