@x-wave/blog 1.0.7 → 1.0.9
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 +579 -582
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useLocation as U, useNavigate as G, useParams as
|
|
4
|
-
import { X as se, Tag as
|
|
5
|
-
import { useState as L, useEffect as P, createContext as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { useTranslation as R } from "react-i18next";
|
|
3
|
+
import { useLocation as U, useNavigate as G, useParams as oe, 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 ae, 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
|
-
import { createPortal as
|
|
10
|
-
const
|
|
11
|
-
tabContainer:
|
|
12
|
-
tab:
|
|
13
|
-
active:
|
|
9
|
+
import { createPortal as fe } from "react-dom";
|
|
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 } =
|
|
15
|
+
function He({ hasAdvanced: t }) {
|
|
16
|
+
const { t: n } = R(), s = U(), o = G();
|
|
17
17
|
if (!t) return null;
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const u = new URLSearchParams(
|
|
18
|
+
const a = new URLSearchParams(s.search).has("advanced"), l = () => {
|
|
19
|
+
if (a) {
|
|
20
|
+
const u = new URLSearchParams(s.search);
|
|
21
21
|
u.delete("advanced");
|
|
22
22
|
const p = u.toString(), w = p ? `?${p}` : "";
|
|
23
|
-
|
|
23
|
+
o(`${s.pathname}${w}${s.hash}`);
|
|
24
24
|
}
|
|
25
25
|
}, g = () => {
|
|
26
|
-
if (!
|
|
27
|
-
const u = new URLSearchParams(
|
|
28
|
-
u.set("advanced", ""),
|
|
26
|
+
if (!a) {
|
|
27
|
+
const u = new URLSearchParams(s.search);
|
|
28
|
+
u.set("advanced", ""), o(`${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: `${
|
|
36
|
+
className: `${Y.tab} ${a ? "" : Y.active}`,
|
|
37
37
|
onClick: l,
|
|
38
38
|
children: n("ui.simple")
|
|
39
39
|
}
|
|
@@ -42,44 +42,44 @@ function Ae({ hasAdvanced: t }) {
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
className: `${
|
|
45
|
+
className: `${Y.tab} ${a ? 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 c = {},
|
|
56
|
+
function n(s) {
|
|
57
|
+
const o = s.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
58
|
+
if (!o) return { frontmatter: {}, content: s };
|
|
59
|
+
const c = {}, a = o[1];
|
|
60
60
|
let l = "", g = !1;
|
|
61
61
|
const u = [];
|
|
62
|
-
for (const w of
|
|
62
|
+
for (const w of a.split(`
|
|
63
63
|
`)) {
|
|
64
64
|
const _ = w.trim();
|
|
65
65
|
if (_.startsWith("-")) {
|
|
66
66
|
if (g) {
|
|
67
|
-
const
|
|
68
|
-
u.push(
|
|
67
|
+
const f = _.substring(1).trim();
|
|
68
|
+
u.push(f);
|
|
69
69
|
}
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
72
|
if (g && !_.startsWith("-") && (c[l] = u.slice(), u.length = 0, g = !1), _ != null && _.includes(":")) {
|
|
73
|
-
const [
|
|
74
|
-
if (l =
|
|
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
81
|
g && u.length > 0 && (c[l] = u);
|
|
82
|
-
const p =
|
|
82
|
+
const p = s.replace(
|
|
83
83
|
/^---\s*\n[\s\S]*?\n---\s*\n/,
|
|
84
84
|
""
|
|
85
85
|
);
|
|
@@ -90,8 +90,8 @@ function be(t) {
|
|
|
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
|
|
93
|
+
async loadMDXContent(s, o, c = !1) {
|
|
94
|
+
const a = c ? `${o}-advanced.mdx` : `${o}.mdx`, l = `./docs/${s}/${a}`, g = t[l];
|
|
95
95
|
if (!g) throw new Error(`File not found: ${l}`);
|
|
96
96
|
const u = await g(), { frontmatter: p, content: w } = n(u);
|
|
97
97
|
return { content: w, frontmatter: p };
|
|
@@ -100,9 +100,9 @@ function be(t) {
|
|
|
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
|
|
105
|
-
if (!l) throw new Error(`File not found: ${
|
|
103
|
+
async loadEnglishContent(s, o = !1) {
|
|
104
|
+
const a = `./docs/en/${o ? `${s}-advanced.mdx` : `${s}.mdx`}`, l = t[a];
|
|
105
|
+
if (!l) throw new Error(`File not found: ${a}`);
|
|
106
106
|
const g = await l(), { content: u } = n(g);
|
|
107
107
|
return u;
|
|
108
108
|
},
|
|
@@ -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
|
|
116
|
+
async buildTagIndex(s = "en") {
|
|
117
|
+
const o = {}, c = `./docs/${s}/`, a = Object.keys(t).filter(
|
|
118
118
|
(l) => l.startsWith(c)
|
|
119
119
|
);
|
|
120
|
-
for (const l of
|
|
120
|
+
for (const l of a)
|
|
121
121
|
try {
|
|
122
|
-
const g = t[l], u = await g(), { frontmatter: p, content: w } = n(u), _ = l.split("/").pop() || "",
|
|
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
124
|
const i = p.tags;
|
|
125
125
|
if (i && Array.isArray(i))
|
|
126
126
|
for (const b of i)
|
|
127
|
-
|
|
127
|
+
o[b] || (o[b] = []), o[b].some((x) => x.slug === f) || o[b].push({ slug: f, title: v });
|
|
128
128
|
} catch (g) {
|
|
129
129
|
console.warn(`Failed to process ${l}:`, g);
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return o;
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Ea(t) {
|
|
136
136
|
const n = be(t);
|
|
137
137
|
return {
|
|
138
138
|
mdxFiles: t,
|
|
@@ -140,52 +140,52 @@ 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 (c && (c.classList.remove("light", "dark"), c.classList.add(
|
|
148
|
-
const
|
|
146
|
+
const o = pe(t), c = document.querySelector(".xw-blog-root");
|
|
147
|
+
if (c && (c.classList.remove("light", "dark"), c.classList.add(o)), t === "system") {
|
|
148
|
+
const a = window.matchMedia("(prefers-color-scheme: dark)"), l = () => {
|
|
149
149
|
const g = $e(), u = document.querySelector(".xw-blog-root");
|
|
150
150
|
u && (u.classList.remove("light", "dark"), u.classList.add(g));
|
|
151
151
|
};
|
|
152
|
-
return
|
|
152
|
+
return a.addEventListener("change", l), () => a.removeEventListener("change", l);
|
|
153
153
|
}
|
|
154
154
|
}, [t]), {
|
|
155
155
|
theme: t,
|
|
156
|
-
setTheme: (
|
|
157
|
-
localStorage.setItem(we,
|
|
156
|
+
setTheme: (o) => {
|
|
157
|
+
localStorage.setItem(we, o), n(o);
|
|
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((o) => ({
|
|
164
|
+
title: ne.getFixedT(n)(o.title),
|
|
165
|
+
slug: o.slug,
|
|
166
|
+
...o.hasAdvanced && { hasAdvanced: o.hasAdvanced },
|
|
167
|
+
...o.showTableOfContents !== void 0 && {
|
|
168
|
+
showTableOfContents: o.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 Oa({
|
|
180
180
|
children: t,
|
|
181
181
|
config: n,
|
|
182
|
-
blog:
|
|
183
|
-
navigationData:
|
|
182
|
+
blog: s,
|
|
183
|
+
navigationData: o = []
|
|
184
184
|
}) {
|
|
185
185
|
Ne();
|
|
186
|
-
const [c,
|
|
186
|
+
const [c, a] = L({});
|
|
187
187
|
P(() => {
|
|
188
|
-
const { buildTagIndex: g } = be(
|
|
188
|
+
const { buildTagIndex: g } = be(s.mdxFiles), u = n.supportedLanguages.map(async (p) => {
|
|
189
189
|
try {
|
|
190
190
|
const w = await g(p);
|
|
191
191
|
return { language: p, index: w };
|
|
@@ -197,21 +197,21 @@ function Oo({
|
|
|
197
197
|
const w = {};
|
|
198
198
|
for (const _ of p)
|
|
199
199
|
w[_.language] = _.index;
|
|
200
|
-
|
|
200
|
+
a(w);
|
|
201
201
|
}).catch((p) => {
|
|
202
202
|
console.error("Failed to build tag indices:", p);
|
|
203
203
|
});
|
|
204
|
-
}, [
|
|
205
|
-
const l = { ...n, navigationData:
|
|
204
|
+
}, [s.mdxFiles, n.supportedLanguages]);
|
|
205
|
+
const l = { ...n, navigationData: o, tagIndex: c };
|
|
206
206
|
return /* @__PURE__ */ e(
|
|
207
207
|
Ie.Provider,
|
|
208
208
|
{
|
|
209
209
|
value: {
|
|
210
210
|
config: l,
|
|
211
|
-
loadContent:
|
|
212
|
-
loadEnglishContent:
|
|
211
|
+
loadContent: s.loadContent,
|
|
212
|
+
loadEnglishContent: s.loadEnglishContent
|
|
213
213
|
},
|
|
214
|
-
children: /* @__PURE__ */ e(
|
|
214
|
+
children: /* @__PURE__ */ e(qe, { children: t })
|
|
215
215
|
}
|
|
216
216
|
);
|
|
217
217
|
}
|
|
@@ -221,67 +221,67 @@ function j() {
|
|
|
221
221
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
222
222
|
return t;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
225
|
-
tableOfContents:
|
|
226
|
-
header:
|
|
227
|
-
title:
|
|
228
|
-
nav:
|
|
229
|
-
list:
|
|
230
|
-
link:
|
|
231
|
-
active:
|
|
232
|
-
level1:
|
|
233
|
-
level2:
|
|
234
|
-
level3:
|
|
235
|
-
level4:
|
|
236
|
-
level5:
|
|
237
|
-
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
|
|
238
238
|
};
|
|
239
|
-
function
|
|
239
|
+
function at({
|
|
240
240
|
content: t,
|
|
241
241
|
englishContent: n
|
|
242
242
|
}) {
|
|
243
|
-
const { t:
|
|
243
|
+
const { t: s } = R(), o = U(), c = G(), [a, l] = L([]), [g, u] = L(""), p = W(null);
|
|
244
244
|
P(() => {
|
|
245
245
|
u(""), (() => {
|
|
246
|
-
const
|
|
247
|
-
let
|
|
246
|
+
const f = /^(#{1,6})\s+(.+)$/gm, r = [];
|
|
247
|
+
let v = f.exec(t);
|
|
248
248
|
const i = [];
|
|
249
|
-
for (;
|
|
250
|
-
const m =
|
|
251
|
-
i.push({ level: m, text:
|
|
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);
|
|
252
252
|
}
|
|
253
253
|
const b = /^(#{1,6})\s+(.+)$/gm;
|
|
254
|
-
let
|
|
255
|
-
for (;
|
|
256
|
-
const m =
|
|
254
|
+
let x = b.exec(n), T = 0;
|
|
255
|
+
for (; x !== null && T < i.length; ) {
|
|
256
|
+
const m = x[2].trim(), N = J(m);
|
|
257
257
|
r.push({
|
|
258
|
-
id:
|
|
259
|
-
text: i[
|
|
258
|
+
id: N,
|
|
259
|
+
text: i[T].text,
|
|
260
260
|
// Use localized text for display
|
|
261
|
-
level: i[
|
|
262
|
-
}),
|
|
261
|
+
level: i[T].level
|
|
262
|
+
}), T++, x = b.exec(n);
|
|
263
263
|
}
|
|
264
264
|
l(r);
|
|
265
265
|
})();
|
|
266
266
|
}, [t, n]), P(() => {
|
|
267
|
-
if (
|
|
267
|
+
if (a.length === 0) return;
|
|
268
268
|
const _ = setTimeout(() => {
|
|
269
|
-
const
|
|
269
|
+
const f = a.filter(
|
|
270
270
|
(r) => !document.getElementById(r.id)
|
|
271
271
|
);
|
|
272
|
-
|
|
272
|
+
f.length > 0 && console.warn("Some heading elements not found:", f);
|
|
273
273
|
}, 100);
|
|
274
274
|
return () => clearTimeout(_);
|
|
275
|
-
}, [
|
|
276
|
-
if (
|
|
275
|
+
}, [a]), P(() => {
|
|
276
|
+
if (a.length === 0) return;
|
|
277
277
|
p.current && p.current.disconnect();
|
|
278
278
|
const _ = setTimeout(() => {
|
|
279
|
-
const
|
|
280
|
-
|
|
279
|
+
const f = a.map((r) => document.getElementById(r.id)).filter(Boolean);
|
|
280
|
+
f.length !== 0 && (p.current = new IntersectionObserver(
|
|
281
281
|
(r) => {
|
|
282
|
-
const
|
|
283
|
-
if (
|
|
284
|
-
const i =
|
|
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
285
|
u(i.target.id);
|
|
286
286
|
}
|
|
287
287
|
},
|
|
@@ -289,36 +289,36 @@ function nt({
|
|
|
289
289
|
rootMargin: "-80px 0% -80% 0%",
|
|
290
290
|
threshold: 0
|
|
291
291
|
}
|
|
292
|
-
),
|
|
292
|
+
), f.forEach((r) => {
|
|
293
293
|
p.current && p.current.observe(r);
|
|
294
294
|
}));
|
|
295
295
|
}, 150);
|
|
296
296
|
return () => {
|
|
297
297
|
clearTimeout(_), p.current && p.current.disconnect();
|
|
298
298
|
};
|
|
299
|
-
}, [
|
|
299
|
+
}, [a]), P(() => () => {
|
|
300
300
|
p.current && p.current.disconnect();
|
|
301
301
|
}, []);
|
|
302
302
|
const w = (_) => {
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
305
|
-
const r = new URLSearchParams(
|
|
303
|
+
const f = document.getElementById(_);
|
|
304
|
+
if (f) {
|
|
305
|
+
const r = new URLSearchParams(o.search);
|
|
306
306
|
r.set("a", _), c(
|
|
307
|
-
`${
|
|
307
|
+
`${o.pathname}?${r.toString()}${o.hash}`,
|
|
308
308
|
{
|
|
309
309
|
replace: !0
|
|
310
310
|
}
|
|
311
311
|
);
|
|
312
|
-
const b =
|
|
312
|
+
const b = f.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
313
313
|
window.scrollTo({
|
|
314
314
|
top: b,
|
|
315
315
|
behavior: "smooth"
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
|
-
return
|
|
320
|
-
/* @__PURE__ */ e("div", { className: H.header, children: /* @__PURE__ */ e("span", { className: H.title, children:
|
|
321
|
-
/* @__PURE__ */ e("nav", { className: H.nav, children: /* @__PURE__ */ e("ul", { className: H.list, children:
|
|
319
|
+
return a.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: a.map((_) => /* @__PURE__ */ e("li", { className: H.item, children: /* @__PURE__ */ e(
|
|
322
322
|
"button",
|
|
323
323
|
{
|
|
324
324
|
className: `${H.link} ${H[`level${_.level}`]} ${g === _.id ? H.active : ""}`,
|
|
@@ -329,33 +329,33 @@ function nt({
|
|
|
329
329
|
) }, _.id)) }) })
|
|
330
330
|
] });
|
|
331
331
|
}
|
|
332
|
-
const ot = "_overlay_1e1d4_1",
|
|
332
|
+
const ot = "_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
333
|
overlay: ot,
|
|
334
|
-
modal:
|
|
335
|
-
header:
|
|
336
|
-
title:
|
|
337
|
-
closeButton:
|
|
338
|
-
results:
|
|
339
|
-
resultsList:
|
|
340
|
-
resultItem:
|
|
341
|
-
resultTitle:
|
|
342
|
-
resultSlug:
|
|
343
|
-
noResults:
|
|
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
|
|
344
344
|
};
|
|
345
|
-
function
|
|
345
|
+
function _t({
|
|
346
346
|
tag: t,
|
|
347
347
|
results: n,
|
|
348
|
-
language:
|
|
349
|
-
onClose:
|
|
348
|
+
language: s,
|
|
349
|
+
onClose: o
|
|
350
350
|
}) {
|
|
351
|
-
const { t: c } =
|
|
352
|
-
const p =
|
|
353
|
-
l(`${p}/${
|
|
351
|
+
const { t: c } = R(), { config: a } = j(), l = G(), g = (u) => {
|
|
352
|
+
const p = a.basePath || "";
|
|
353
|
+
l(`${p}/${s}/${u}`), o();
|
|
354
354
|
};
|
|
355
|
-
return
|
|
356
|
-
/* @__PURE__ */ e("div", { className:
|
|
357
|
-
/* @__PURE__ */ d("div", { className:
|
|
358
|
-
/* @__PURE__ */ d("h2", { className:
|
|
355
|
+
return fe(
|
|
356
|
+
/* @__PURE__ */ e("div", { className: O.overlay, onClick: o, 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
359
|
c("ui.tagResults"),
|
|
360
360
|
": ",
|
|
361
361
|
t
|
|
@@ -364,22 +364,22 @@ function gt({
|
|
|
364
364
|
"button",
|
|
365
365
|
{
|
|
366
366
|
type: "button",
|
|
367
|
-
className:
|
|
368
|
-
onClick:
|
|
367
|
+
className: O.closeButton,
|
|
368
|
+
onClick: o,
|
|
369
369
|
"aria-label": "Close",
|
|
370
370
|
children: /* @__PURE__ */ e(se, {})
|
|
371
371
|
}
|
|
372
372
|
)
|
|
373
373
|
] }),
|
|
374
|
-
/* @__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(
|
|
375
375
|
"button",
|
|
376
376
|
{
|
|
377
377
|
type: "button",
|
|
378
|
-
className:
|
|
378
|
+
className: O.resultItem,
|
|
379
379
|
onClick: () => g(u.slug),
|
|
380
380
|
children: [
|
|
381
|
-
/* @__PURE__ */ e("div", { className:
|
|
382
|
-
/* @__PURE__ */ d("div", { className:
|
|
381
|
+
/* @__PURE__ */ e("div", { className: O.resultTitle, children: u.title }),
|
|
382
|
+
/* @__PURE__ */ d("div", { className: O.resultSlug, children: [
|
|
383
383
|
"/",
|
|
384
384
|
u.slug
|
|
385
385
|
] })
|
|
@@ -390,19 +390,19 @@ function gt({
|
|
|
390
390
|
document.body
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
tags:
|
|
395
|
-
compact:
|
|
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
396
|
tagLabel: ft,
|
|
397
|
-
tagIcon:
|
|
398
|
-
tagList:
|
|
399
|
-
tag:
|
|
397
|
+
tagIcon: bt,
|
|
398
|
+
tagList: wt,
|
|
399
|
+
tag: $t
|
|
400
400
|
};
|
|
401
|
-
function
|
|
402
|
-
const { t:
|
|
401
|
+
function Nt({ tags: t, variant: n = "default", onTagClick: s }) {
|
|
402
|
+
const { t: o } = R();
|
|
403
403
|
if (!t || t.length === 0) return null;
|
|
404
|
-
const c = (
|
|
405
|
-
|
|
404
|
+
const c = (a) => {
|
|
405
|
+
s && s(a);
|
|
406
406
|
};
|
|
407
407
|
return /* @__PURE__ */ d(
|
|
408
408
|
"div",
|
|
@@ -410,100 +410,101 @@ function $t({ tags: t, variant: n = "default", onTagClick: a }) {
|
|
|
410
410
|
className: `${K.tags} ${n === "compact" ? K.compact : ""}`,
|
|
411
411
|
children: [
|
|
412
412
|
n === "default" && /* @__PURE__ */ d("div", { className: K.tagLabel, children: [
|
|
413
|
-
/* @__PURE__ */ e(
|
|
413
|
+
/* @__PURE__ */ e(Te, { className: K.tagIcon, weight: "duotone" }),
|
|
414
414
|
/* @__PURE__ */ d("span", { children: [
|
|
415
|
-
|
|
415
|
+
o("ui.tags"),
|
|
416
416
|
":"
|
|
417
417
|
] })
|
|
418
418
|
] }),
|
|
419
|
-
/* @__PURE__ */ e("div", { className: K.tagList, children: t.map((
|
|
419
|
+
/* @__PURE__ */ e("div", { className: K.tagList, children: t.map((a) => /* @__PURE__ */ e(
|
|
420
420
|
"button",
|
|
421
421
|
{
|
|
422
422
|
type: "button",
|
|
423
423
|
className: K.tag,
|
|
424
|
-
onClick: () => c(
|
|
425
|
-
"aria-label": `${
|
|
426
|
-
children:
|
|
424
|
+
onClick: () => c(a),
|
|
425
|
+
"aria-label": `${o("ui.filterByTag")}: ${a}`,
|
|
426
|
+
children: a
|
|
427
427
|
},
|
|
428
|
-
|
|
428
|
+
a
|
|
429
429
|
)) })
|
|
430
430
|
]
|
|
431
431
|
}
|
|
432
432
|
);
|
|
433
433
|
}
|
|
434
|
-
const
|
|
435
|
-
contentPage:
|
|
436
|
-
metadata:
|
|
437
|
-
author:
|
|
438
|
-
date:
|
|
439
|
-
loadingContainer:
|
|
440
|
-
errorContainer:
|
|
441
|
-
skeletonTitle:
|
|
442
|
-
skeletonParagraph:
|
|
443
|
-
skeletonParagraphShort:
|
|
444
|
-
errorText:
|
|
445
|
-
mdxContent:
|
|
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,
|
|
441
|
+
skeletonTitle: yt,
|
|
442
|
+
skeletonParagraph: Lt,
|
|
443
|
+
skeletonParagraphShort: Pt,
|
|
444
|
+
errorText: Bt,
|
|
445
|
+
mdxContent: Dt,
|
|
446
446
|
withMetadata: Mt,
|
|
447
|
-
codeBlock:
|
|
448
|
-
codeLanguage:
|
|
447
|
+
codeBlock: Et,
|
|
448
|
+
codeLanguage: Ot
|
|
449
449
|
};
|
|
450
|
-
function
|
|
450
|
+
function Rt({ language: t }) {
|
|
451
451
|
var ie;
|
|
452
|
-
const { slug: n } =
|
|
453
|
-
const
|
|
452
|
+
const { slug: n } = oe(), s = U(), { t: o } = R(), { config: c, loadContent: a, 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 = {
|
|
454
454
|
advanced: !1,
|
|
455
455
|
anchor: ""
|
|
456
456
|
};
|
|
457
|
-
if (!h) return
|
|
458
|
-
const
|
|
459
|
-
for (const
|
|
460
|
-
|
|
461
|
-
return
|
|
462
|
-
})(
|
|
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;
|
|
463
463
|
if (P(() => {
|
|
464
464
|
(async () => {
|
|
465
465
|
if (!n) return;
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
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;
|
|
473
474
|
break;
|
|
474
475
|
}
|
|
475
|
-
} else if (
|
|
476
|
-
|
|
476
|
+
} else if ($.slug === n) {
|
|
477
|
+
y = $.showTableOfContents !== !1;
|
|
477
478
|
break;
|
|
478
479
|
}
|
|
479
|
-
|
|
480
|
+
T(y);
|
|
480
481
|
try {
|
|
481
|
-
let
|
|
482
|
+
let $;
|
|
482
483
|
try {
|
|
483
|
-
|
|
484
|
+
$ = await a(t, n, A);
|
|
484
485
|
} catch {
|
|
485
486
|
if (A)
|
|
486
|
-
|
|
487
|
+
$ = await a(t, n, !1);
|
|
487
488
|
else
|
|
488
489
|
throw new Error("Content not found");
|
|
489
490
|
}
|
|
490
|
-
let
|
|
491
|
+
let C = "";
|
|
491
492
|
try {
|
|
492
|
-
|
|
493
|
+
C = await l(n, A);
|
|
493
494
|
} catch {
|
|
494
|
-
A && (
|
|
495
|
+
A && (C = await l(n, !1));
|
|
495
496
|
}
|
|
496
|
-
const
|
|
497
|
-
let F =
|
|
497
|
+
const E = /^(#{1,6})\s+(.+)$/gm, X = [];
|
|
498
|
+
let F = E.exec(C);
|
|
498
499
|
for (; F !== null; ) {
|
|
499
|
-
const
|
|
500
|
-
|
|
500
|
+
const ke = F[2].trim();
|
|
501
|
+
X.push(ke), F = E.exec(C);
|
|
501
502
|
}
|
|
502
|
-
Q.current =
|
|
503
|
-
} catch (
|
|
504
|
-
b(
|
|
503
|
+
Q.current = X, w(C), u($.content), f($.frontmatter);
|
|
504
|
+
} catch ($) {
|
|
505
|
+
b($ instanceof Error ? $.message : "Failed to load content");
|
|
505
506
|
} finally {
|
|
506
|
-
|
|
507
|
+
v(!1);
|
|
507
508
|
}
|
|
508
509
|
})();
|
|
509
510
|
}, [
|
|
@@ -511,140 +512,140 @@ function Ot({ language: t }) {
|
|
|
511
512
|
t,
|
|
512
513
|
A,
|
|
513
514
|
c.navigationData,
|
|
514
|
-
|
|
515
|
+
a,
|
|
515
516
|
l
|
|
516
517
|
]), P(() => {
|
|
517
|
-
if (!r &&
|
|
518
|
+
if (!r && Z.anchor) {
|
|
518
519
|
const h = setTimeout(() => {
|
|
519
|
-
const
|
|
520
|
-
if (
|
|
521
|
-
const
|
|
520
|
+
const k = document.getElementById(Z.anchor);
|
|
521
|
+
if (k) {
|
|
522
|
+
const C = k.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
522
523
|
window.scrollTo({
|
|
523
|
-
top:
|
|
524
|
+
top: C,
|
|
524
525
|
behavior: "smooth"
|
|
525
526
|
});
|
|
526
527
|
}
|
|
527
528
|
}, 150);
|
|
528
529
|
return () => clearTimeout(h);
|
|
529
530
|
}
|
|
530
|
-
}, [r,
|
|
531
|
-
return /* @__PURE__ */ e("div", { className:
|
|
532
|
-
/* @__PURE__ */ e("div", { className:
|
|
533
|
-
/* @__PURE__ */ e("div", { className:
|
|
534
|
-
/* @__PURE__ */ e("div", { className:
|
|
535
|
-
/* @__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 })
|
|
536
537
|
] }) });
|
|
537
538
|
if (i)
|
|
538
|
-
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: [
|
|
539
540
|
"Error: ",
|
|
540
541
|
i
|
|
541
542
|
] }) }) });
|
|
542
543
|
B.current = 0;
|
|
543
544
|
let le = !1;
|
|
544
|
-
const xe = () => /* @__PURE__ */ d("div", { className:
|
|
545
|
-
_.author && /* @__PURE__ */ d("span", { className:
|
|
546
|
-
/* @__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" }),
|
|
547
548
|
_.author
|
|
548
549
|
] }),
|
|
549
|
-
_.date && /* @__PURE__ */ d("span", { className:
|
|
550
|
-
/* @__PURE__ */ e(
|
|
551
|
-
|
|
550
|
+
_.date && /* @__PURE__ */ d("span", { className: D.date, children: [
|
|
551
|
+
/* @__PURE__ */ e(ye, { size: 16, weight: "regular" }),
|
|
552
|
+
o("ui.lastEdited"),
|
|
552
553
|
": ",
|
|
553
554
|
_.date
|
|
554
555
|
] })
|
|
555
556
|
] });
|
|
556
557
|
return /* @__PURE__ */ d(z, { children: [
|
|
557
|
-
/* @__PURE__ */ d("div", { className:
|
|
558
|
-
/* @__PURE__ */ e(
|
|
559
|
-
/* @__PURE__ */ e("div", { className:
|
|
560
|
-
|
|
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,
|
|
561
562
|
{
|
|
562
|
-
remarkPlugins: [
|
|
563
|
+
remarkPlugins: [Oe],
|
|
563
564
|
components: {
|
|
564
565
|
h1: ({ children: h }) => {
|
|
565
|
-
const
|
|
566
|
+
const k = B.current++, y = Q.current[k] || "", $ = J(y), C = A ? `?advanced&a=${$}` : `?a=${$}`, E = `#/${t}/${n}${C}`, X = !le;
|
|
566
567
|
le = !0;
|
|
567
|
-
const
|
|
568
|
+
const F = _.date || _.author;
|
|
568
569
|
return /* @__PURE__ */ d(z, { children: [
|
|
569
570
|
/* @__PURE__ */ e(
|
|
570
571
|
"h1",
|
|
571
572
|
{
|
|
572
|
-
id:
|
|
573
|
-
className:
|
|
573
|
+
id: $,
|
|
574
|
+
className: X && F ? D.withMetadata : void 0,
|
|
574
575
|
children: /* @__PURE__ */ e(
|
|
575
576
|
"a",
|
|
576
577
|
{
|
|
577
|
-
href:
|
|
578
|
+
href: E,
|
|
578
579
|
style: { color: "inherit", textDecoration: "none" },
|
|
579
580
|
children: h
|
|
580
581
|
}
|
|
581
582
|
)
|
|
582
583
|
}
|
|
583
584
|
),
|
|
584
|
-
|
|
585
|
+
X && F && /* @__PURE__ */ e(xe, {})
|
|
585
586
|
] });
|
|
586
587
|
},
|
|
587
588
|
h2: ({ children: h }) => {
|
|
588
|
-
const
|
|
589
|
-
return /* @__PURE__ */ e("h2", { id:
|
|
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(
|
|
590
591
|
"a",
|
|
591
592
|
{
|
|
592
|
-
href:
|
|
593
|
+
href: E,
|
|
593
594
|
style: { color: "inherit", textDecoration: "none" },
|
|
594
595
|
children: h
|
|
595
596
|
}
|
|
596
597
|
) });
|
|
597
598
|
},
|
|
598
599
|
h3: ({ children: h }) => {
|
|
599
|
-
const
|
|
600
|
-
return /* @__PURE__ */ e("h3", { id:
|
|
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(
|
|
601
602
|
"a",
|
|
602
603
|
{
|
|
603
|
-
href:
|
|
604
|
+
href: E,
|
|
604
605
|
style: { color: "inherit", textDecoration: "none" },
|
|
605
606
|
children: h
|
|
606
607
|
}
|
|
607
608
|
) });
|
|
608
609
|
},
|
|
609
610
|
h4: ({ children: h }) => {
|
|
610
|
-
const
|
|
611
|
-
return /* @__PURE__ */ e("h4", { id:
|
|
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(
|
|
612
613
|
"a",
|
|
613
614
|
{
|
|
614
|
-
href:
|
|
615
|
+
href: E,
|
|
615
616
|
style: { color: "inherit", textDecoration: "none" },
|
|
616
617
|
children: h
|
|
617
618
|
}
|
|
618
619
|
) });
|
|
619
620
|
},
|
|
620
621
|
h5: ({ children: h }) => {
|
|
621
|
-
const
|
|
622
|
-
return /* @__PURE__ */ e("h5", { id:
|
|
622
|
+
const k = `h5-${B.current++}`;
|
|
623
|
+
return /* @__PURE__ */ e("h5", { id: k, children: h });
|
|
623
624
|
},
|
|
624
625
|
h6: ({ children: h }) => {
|
|
625
|
-
const
|
|
626
|
-
return /* @__PURE__ */ e("h6", { id:
|
|
626
|
+
const k = `h6-${B.current++}`;
|
|
627
|
+
return /* @__PURE__ */ e("h6", { id: k, children: h });
|
|
627
628
|
},
|
|
628
629
|
p: ({ children: h }) => /* @__PURE__ */ e("p", { children: h }),
|
|
629
630
|
ul: ({ children: h }) => /* @__PURE__ */ e("ul", { children: h }),
|
|
630
631
|
ol: ({ children: h }) => /* @__PURE__ */ e("ol", { children: h }),
|
|
631
632
|
li: ({ children: h }) => /* @__PURE__ */ e("li", { children: h }),
|
|
632
|
-
code: ({ className: h, children:
|
|
633
|
+
code: ({ className: h, children: k, ...y }) => {
|
|
633
634
|
if (!h)
|
|
634
|
-
return /* @__PURE__ */ e("code", { ...
|
|
635
|
-
const
|
|
636
|
-
return /* @__PURE__ */ d("div", { className:
|
|
637
|
-
|
|
638
|
-
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: 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 }) })
|
|
639
640
|
] });
|
|
640
641
|
},
|
|
641
642
|
pre: ({ children: h }) => /* @__PURE__ */ e(z, { children: h }),
|
|
642
643
|
// Let code component handle pre styling
|
|
643
644
|
blockquote: ({ children: h }) => /* @__PURE__ */ e("blockquote", { children: h }),
|
|
644
|
-
a: ({ href: h, children:
|
|
645
|
+
a: ({ href: h, children: k, ...y }) => {
|
|
645
646
|
if (h != null && h.startsWith("./")) {
|
|
646
|
-
const
|
|
647
|
-
return /* @__PURE__ */ e("a", { href:
|
|
647
|
+
const $ = h.slice(2), C = `#/${t}/${$}`;
|
|
648
|
+
return /* @__PURE__ */ e("a", { href: C, ...y, children: k });
|
|
648
649
|
}
|
|
649
650
|
return h != null && h.startsWith("http://") || h != null && h.startsWith("https://") ? /* @__PURE__ */ e(
|
|
650
651
|
"a",
|
|
@@ -652,10 +653,10 @@ function Ot({ language: t }) {
|
|
|
652
653
|
href: h,
|
|
653
654
|
target: "_blank",
|
|
654
655
|
rel: "noopener noreferrer",
|
|
655
|
-
...
|
|
656
|
-
children:
|
|
656
|
+
...y,
|
|
657
|
+
children: k
|
|
657
658
|
}
|
|
658
|
-
) : /* @__PURE__ */ e("a", { href: h, ...
|
|
659
|
+
) : /* @__PURE__ */ e("a", { href: h, ...y, children: k });
|
|
659
660
|
},
|
|
660
661
|
strong: ({ children: h }) => /* @__PURE__ */ e("strong", { children: h }),
|
|
661
662
|
em: ({ children: h }) => /* @__PURE__ */ e("em", { children: h })
|
|
@@ -664,186 +665,183 @@ function Ot({ language: t }) {
|
|
|
664
665
|
}
|
|
665
666
|
) }),
|
|
666
667
|
_.tags && _.tags.length > 0 && /* @__PURE__ */ e(
|
|
667
|
-
|
|
668
|
+
Nt,
|
|
668
669
|
{
|
|
669
670
|
tags: _.tags,
|
|
670
671
|
variant: "compact",
|
|
671
|
-
onTagClick: (h) =>
|
|
672
|
+
onTagClick: (h) => N(h)
|
|
672
673
|
}
|
|
673
674
|
)
|
|
674
675
|
] }),
|
|
675
|
-
|
|
676
|
+
x && /* @__PURE__ */ e(at, { content: g, englishContent: p }),
|
|
676
677
|
m && ((ie = c.tagIndex) == null ? void 0 : ie[t]) && /* @__PURE__ */ e(
|
|
677
|
-
|
|
678
|
+
_t,
|
|
678
679
|
{
|
|
679
680
|
tag: m,
|
|
680
681
|
results: c.tagIndex[t][m] || [],
|
|
681
682
|
language: t,
|
|
682
|
-
onClose: () =>
|
|
683
|
+
onClose: () => N(null)
|
|
683
684
|
}
|
|
684
685
|
)
|
|
685
686
|
] });
|
|
686
687
|
}
|
|
687
|
-
const
|
|
688
|
-
searchButton:
|
|
689
|
-
searchIcon:
|
|
690
|
-
searchHint:
|
|
691
|
-
kbd:
|
|
692
|
-
searchOverlay:
|
|
693
|
-
searchModal:
|
|
694
|
-
searchHeader:
|
|
695
|
-
searchInput:
|
|
696
|
-
closeButton:
|
|
697
|
-
searchResults:
|
|
698
|
-
resultsList:
|
|
699
|
-
resultItem:
|
|
700
|
-
selected:
|
|
701
|
-
resultTitle:
|
|
702
|
-
resultSlug:
|
|
703
|
-
noResults:
|
|
704
|
-
searchHints:
|
|
705
|
-
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
|
|
706
707
|
};
|
|
707
|
-
function
|
|
708
|
-
const { t: n } =
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
).flatMap((m) => "items" in m ? m.items.map(($) => ({
|
|
712
|
-
title: $.title,
|
|
713
|
-
slug: $.slug
|
|
708
|
+
function nn({ language: t }) {
|
|
709
|
+
const { t: n } = R(), s = G(), { config: o } = j(), [c, a] = 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 = (o.navigationData ? te(o.navigationData, t) : []).flatMap((m) => "items" in m ? m.items.map((N) => ({
|
|
710
|
+
title: N.title,
|
|
711
|
+
slug: N.slug
|
|
714
712
|
})) : [{ title: m.title, slug: m.slug }]);
|
|
715
713
|
P(() => {
|
|
716
714
|
if (!l.trim()) {
|
|
717
715
|
p([]), _(0);
|
|
718
716
|
return;
|
|
719
717
|
}
|
|
720
|
-
const m = l.toLowerCase(),
|
|
718
|
+
const m = l.toLowerCase(), N = b.filter(
|
|
721
719
|
(B) => B.title.toLowerCase().includes(m) || B.slug.toLowerCase().includes(m)
|
|
722
720
|
);
|
|
723
|
-
p(
|
|
721
|
+
p(N), _(0);
|
|
724
722
|
}, [l]), P(() => {
|
|
725
|
-
const m = (
|
|
726
|
-
(
|
|
723
|
+
const m = (N) => {
|
|
724
|
+
(N.metaKey || N.ctrlKey) && N.key === "k" && (N.preventDefault(), a(!0), setTimeout(() => {
|
|
727
725
|
var B;
|
|
728
|
-
return (B =
|
|
729
|
-
}, 100)),
|
|
726
|
+
return (B = f.current) == null ? void 0 : B.focus();
|
|
727
|
+
}, 100)), N.key === "Escape" && c && (a(!1), g(""));
|
|
730
728
|
};
|
|
731
729
|
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
732
730
|
}, [c]), P(() => {
|
|
733
731
|
const m = () => {
|
|
734
|
-
|
|
732
|
+
a(!0), setTimeout(() => {
|
|
735
733
|
var B;
|
|
736
|
-
return (B =
|
|
734
|
+
return (B = f.current) == null ? void 0 : B.focus();
|
|
737
735
|
}, 100);
|
|
738
|
-
},
|
|
739
|
-
|
|
736
|
+
}, N = () => {
|
|
737
|
+
a(!1), g("");
|
|
740
738
|
};
|
|
741
|
-
return window.addEventListener("blog:open-search", m), window.addEventListener("blog:close-search",
|
|
742
|
-
window.removeEventListener("blog:open-search", m), window.removeEventListener("blog:close-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);
|
|
743
741
|
};
|
|
744
742
|
}, []);
|
|
745
|
-
const
|
|
746
|
-
m.key === "ArrowDown" ? (m.preventDefault(), _((
|
|
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));
|
|
747
745
|
};
|
|
748
746
|
P(() => {
|
|
749
|
-
const m = (
|
|
750
|
-
r.current && !r.current.contains(
|
|
747
|
+
const m = (N) => {
|
|
748
|
+
r.current && !r.current.contains(N.target) && (a(!1), g(""));
|
|
751
749
|
};
|
|
752
750
|
return c && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
753
751
|
}, [c]);
|
|
754
|
-
const
|
|
755
|
-
const
|
|
756
|
-
s(`${
|
|
752
|
+
const T = (m) => {
|
|
753
|
+
const N = o.basePath || "";
|
|
754
|
+
s(`${N}/${t}/${m}`), a(!1), g("");
|
|
757
755
|
};
|
|
758
756
|
return /* @__PURE__ */ d(z, { children: [
|
|
759
757
|
/* @__PURE__ */ d(
|
|
760
758
|
"button",
|
|
761
759
|
{
|
|
762
760
|
type: "button",
|
|
763
|
-
className:
|
|
761
|
+
className: S.searchButton,
|
|
764
762
|
onClick: () => {
|
|
765
|
-
|
|
763
|
+
a(!0), setTimeout(() => {
|
|
766
764
|
var m;
|
|
767
|
-
return (m =
|
|
765
|
+
return (m = f.current) == null ? void 0 : m.focus();
|
|
768
766
|
}, 100);
|
|
769
767
|
},
|
|
770
768
|
"aria-label": n("ui.search"),
|
|
771
769
|
children: [
|
|
772
|
-
/* @__PURE__ */ e(he, { className:
|
|
773
|
-
/* @__PURE__ */ e("span", { className:
|
|
774
|
-
/* @__PURE__ */ e("kbd", { className:
|
|
770
|
+
/* @__PURE__ */ e(he, { className: S.searchIcon }),
|
|
771
|
+
/* @__PURE__ */ e("span", { className: S.searchHint, children: n("ui.search") }),
|
|
772
|
+
/* @__PURE__ */ e("kbd", { className: S.kbd, children: i })
|
|
775
773
|
]
|
|
776
774
|
}
|
|
777
775
|
),
|
|
778
|
-
c &&
|
|
776
|
+
c && fe(
|
|
779
777
|
/* @__PURE__ */ e(
|
|
780
778
|
"div",
|
|
781
779
|
{
|
|
782
|
-
className:
|
|
780
|
+
className: S.searchOverlay,
|
|
783
781
|
onClick: () => {
|
|
784
|
-
|
|
782
|
+
a(!1), g("");
|
|
785
783
|
},
|
|
786
784
|
children: /* @__PURE__ */ d(
|
|
787
785
|
"div",
|
|
788
786
|
{
|
|
789
|
-
className:
|
|
787
|
+
className: S.searchModal,
|
|
790
788
|
ref: r,
|
|
791
789
|
onClick: (m) => m.stopPropagation(),
|
|
792
790
|
children: [
|
|
793
|
-
/* @__PURE__ */ d("div", { className:
|
|
794
|
-
/* @__PURE__ */ e(he, { className:
|
|
791
|
+
/* @__PURE__ */ d("div", { className: S.searchHeader, children: [
|
|
792
|
+
/* @__PURE__ */ e(he, { className: S.searchIcon }),
|
|
795
793
|
/* @__PURE__ */ e(
|
|
796
794
|
"input",
|
|
797
795
|
{
|
|
798
|
-
ref:
|
|
796
|
+
ref: f,
|
|
799
797
|
type: "text",
|
|
800
|
-
className:
|
|
798
|
+
className: S.searchInput,
|
|
801
799
|
placeholder: n("ui.searchPlaceholder"),
|
|
802
800
|
value: l,
|
|
803
801
|
onChange: (m) => g(m.target.value),
|
|
804
|
-
onKeyDown:
|
|
802
|
+
onKeyDown: x
|
|
805
803
|
}
|
|
806
804
|
),
|
|
807
805
|
/* @__PURE__ */ e(
|
|
808
806
|
"button",
|
|
809
807
|
{
|
|
810
808
|
type: "button",
|
|
811
|
-
className:
|
|
809
|
+
className: S.closeButton,
|
|
812
810
|
onClick: () => {
|
|
813
|
-
|
|
811
|
+
a(!1), g("");
|
|
814
812
|
},
|
|
815
813
|
"aria-label": "Close search",
|
|
816
814
|
children: /* @__PURE__ */ e(se, {})
|
|
817
815
|
}
|
|
818
816
|
)
|
|
819
817
|
] }),
|
|
820
|
-
l && /* @__PURE__ */ e("div", { className:
|
|
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(
|
|
821
819
|
"button",
|
|
822
820
|
{
|
|
823
821
|
type: "button",
|
|
824
|
-
className: `${
|
|
825
|
-
onClick: () =>
|
|
826
|
-
onMouseEnter: () => _(
|
|
822
|
+
className: `${S.resultItem} ${N === w ? S.selected : ""}`,
|
|
823
|
+
onClick: () => T(m.slug),
|
|
824
|
+
onMouseEnter: () => _(N),
|
|
827
825
|
children: [
|
|
828
|
-
/* @__PURE__ */ e("div", { className:
|
|
829
|
-
/* @__PURE__ */ d("div", { className:
|
|
826
|
+
/* @__PURE__ */ e("div", { className: S.resultTitle, children: m.title }),
|
|
827
|
+
/* @__PURE__ */ d("div", { className: S.resultSlug, children: [
|
|
830
828
|
"/",
|
|
831
829
|
m.slug
|
|
832
830
|
] })
|
|
833
831
|
]
|
|
834
832
|
}
|
|
835
833
|
) }, m.slug)) }) }),
|
|
836
|
-
!l && /* @__PURE__ */ d("div", { className:
|
|
837
|
-
/* @__PURE__ */ d("div", { className:
|
|
834
|
+
!l && /* @__PURE__ */ d("div", { className: S.searchHints, children: [
|
|
835
|
+
/* @__PURE__ */ d("div", { className: S.hint, children: [
|
|
838
836
|
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
839
837
|
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
840
838
|
/* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
|
|
841
839
|
] }),
|
|
842
|
-
/* @__PURE__ */ d("div", { className:
|
|
840
|
+
/* @__PURE__ */ d("div", { className: S.hint, children: [
|
|
843
841
|
/* @__PURE__ */ e("kbd", { children: "↵" }),
|
|
844
842
|
/* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
|
|
845
843
|
] }),
|
|
846
|
-
/* @__PURE__ */ d("div", { className:
|
|
844
|
+
/* @__PURE__ */ d("div", { className: S.hint, children: [
|
|
847
845
|
/* @__PURE__ */ e("kbd", { children: "esc" }),
|
|
848
846
|
/* @__PURE__ */ e("span", { children: n("ui.searchClose") })
|
|
849
847
|
] })
|
|
@@ -857,79 +855,79 @@ function tn({ language: t }) {
|
|
|
857
855
|
)
|
|
858
856
|
] });
|
|
859
857
|
}
|
|
860
|
-
const
|
|
861
|
-
header:
|
|
858
|
+
const an = "_header_jrobc_1", on = "_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: an,
|
|
862
860
|
container: on,
|
|
863
|
-
content:
|
|
864
|
-
leftSection:
|
|
865
|
-
mobileMenuButton:
|
|
866
|
-
burgerIcon:
|
|
867
|
-
logo:
|
|
868
|
-
nav:
|
|
869
|
-
navLink:
|
|
870
|
-
externalIcon:
|
|
871
|
-
supportDropdown:
|
|
872
|
-
themeDropdown:
|
|
873
|
-
themeButton:
|
|
874
|
-
themeIcon:
|
|
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,
|
|
870
|
+
themeDropdown: _n,
|
|
871
|
+
themeButton: pn,
|
|
872
|
+
themeIcon: vn,
|
|
875
873
|
supportButton: fn,
|
|
876
|
-
caretIcon:
|
|
877
|
-
dropdownMenu:
|
|
878
|
-
dropdownItem:
|
|
879
|
-
dropdownIcon:
|
|
874
|
+
caretIcon: bn,
|
|
875
|
+
dropdownMenu: wn,
|
|
876
|
+
dropdownItem: $n,
|
|
877
|
+
dropdownIcon: Nn
|
|
880
878
|
};
|
|
881
|
-
function
|
|
882
|
-
const { t: n, i18n:
|
|
879
|
+
function In({ onMobileMenuToggle: t }) {
|
|
880
|
+
const { t: n, i18n: s } = R(), { config: o } = j(), c = o.header ?? {}, a = c.navLinks ?? [], l = c.dropdownItems ?? [], [g, u] = L(!1), [p, w] = L(!1), { theme: _, setTheme: f } = Ne(), r = W(null), v = W(null);
|
|
883
881
|
return P(() => {
|
|
884
882
|
const i = (b) => {
|
|
885
|
-
r.current && !r.current.contains(b.target) && u(!1),
|
|
883
|
+
r.current && !r.current.contains(b.target) && u(!1), v.current && !v.current.contains(b.target) && w(!1);
|
|
886
884
|
};
|
|
887
885
|
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
888
|
-
}, []), /* @__PURE__ */ e("header", { className:
|
|
889
|
-
/* @__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: [
|
|
890
888
|
/* @__PURE__ */ e(
|
|
891
889
|
"button",
|
|
892
890
|
{
|
|
893
891
|
type: "button",
|
|
894
|
-
className:
|
|
892
|
+
className: I.mobileMenuButton,
|
|
895
893
|
onClick: t,
|
|
896
894
|
"aria-label": "Open menu",
|
|
897
|
-
children: /* @__PURE__ */ e(
|
|
895
|
+
children: /* @__PURE__ */ e(Le, { className: I.burgerIcon })
|
|
898
896
|
}
|
|
899
897
|
),
|
|
900
|
-
/* @__PURE__ */ e("div", { className:
|
|
898
|
+
/* @__PURE__ */ e("div", { className: I.logo })
|
|
901
899
|
] }),
|
|
902
|
-
/* @__PURE__ */ d("nav", { className:
|
|
903
|
-
/* @__PURE__ */ e(
|
|
904
|
-
/* @__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: [
|
|
905
903
|
/* @__PURE__ */ d(
|
|
906
904
|
"button",
|
|
907
905
|
{
|
|
908
906
|
type: "button",
|
|
909
|
-
className:
|
|
907
|
+
className: I.themeButton,
|
|
910
908
|
onClick: () => w(!p),
|
|
911
909
|
"aria-expanded": p,
|
|
912
910
|
"aria-haspopup": "true",
|
|
913
911
|
"aria-label": n("ui.theme"),
|
|
914
912
|
children: [
|
|
915
|
-
_ === "light" && /* @__PURE__ */ e(me, { className:
|
|
916
|
-
_ === "dark" && /* @__PURE__ */ e(ge, { className:
|
|
917
|
-
_ === "system" && /* @__PURE__ */ e(_e, { className:
|
|
918
|
-
/* @__PURE__ */ e(
|
|
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(ae, { className: I.caretIcon })
|
|
919
917
|
]
|
|
920
918
|
}
|
|
921
919
|
),
|
|
922
|
-
p && /* @__PURE__ */ d("div", { className:
|
|
920
|
+
p && /* @__PURE__ */ d("div", { className: I.dropdownMenu, children: [
|
|
923
921
|
/* @__PURE__ */ d(
|
|
924
922
|
"button",
|
|
925
923
|
{
|
|
926
924
|
type: "button",
|
|
927
925
|
onClick: () => {
|
|
928
|
-
|
|
926
|
+
f("light"), w(!1);
|
|
929
927
|
},
|
|
930
|
-
className:
|
|
928
|
+
className: I.dropdownItem,
|
|
931
929
|
children: [
|
|
932
|
-
/* @__PURE__ */ e(me, { className:
|
|
930
|
+
/* @__PURE__ */ e(me, { className: I.dropdownIcon }),
|
|
933
931
|
n("ui.light")
|
|
934
932
|
]
|
|
935
933
|
}
|
|
@@ -939,11 +937,11 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
939
937
|
{
|
|
940
938
|
type: "button",
|
|
941
939
|
onClick: () => {
|
|
942
|
-
|
|
940
|
+
f("dark"), w(!1);
|
|
943
941
|
},
|
|
944
|
-
className:
|
|
942
|
+
className: I.dropdownItem,
|
|
945
943
|
children: [
|
|
946
|
-
/* @__PURE__ */ e(ge, { className:
|
|
944
|
+
/* @__PURE__ */ e(ge, { className: I.dropdownIcon }),
|
|
947
945
|
n("ui.dark")
|
|
948
946
|
]
|
|
949
947
|
}
|
|
@@ -953,43 +951,43 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
953
951
|
{
|
|
954
952
|
type: "button",
|
|
955
953
|
onClick: () => {
|
|
956
|
-
|
|
954
|
+
f("system"), w(!1);
|
|
957
955
|
},
|
|
958
|
-
className:
|
|
956
|
+
className: I.dropdownItem,
|
|
959
957
|
children: [
|
|
960
|
-
/* @__PURE__ */ e(_e, { className:
|
|
958
|
+
/* @__PURE__ */ e(_e, { className: I.dropdownIcon }),
|
|
961
959
|
n("ui.system")
|
|
962
960
|
]
|
|
963
961
|
}
|
|
964
962
|
)
|
|
965
963
|
] })
|
|
966
964
|
] }),
|
|
967
|
-
l.length > 0 && /* @__PURE__ */ d("div", { className:
|
|
965
|
+
l.length > 0 && /* @__PURE__ */ d("div", { className: I.supportDropdown, ref: r, children: [
|
|
968
966
|
/* @__PURE__ */ d(
|
|
969
967
|
"button",
|
|
970
968
|
{
|
|
971
969
|
type: "button",
|
|
972
|
-
className:
|
|
970
|
+
className: I.supportButton,
|
|
973
971
|
onClick: () => u(!g),
|
|
974
972
|
"aria-expanded": g,
|
|
975
973
|
"aria-haspopup": "true",
|
|
976
974
|
children: [
|
|
977
975
|
n("ui.support"),
|
|
978
|
-
/* @__PURE__ */ e(
|
|
976
|
+
/* @__PURE__ */ e(ae, { className: I.caretIcon })
|
|
979
977
|
]
|
|
980
978
|
}
|
|
981
979
|
),
|
|
982
|
-
g && /* @__PURE__ */ e("div", { className:
|
|
983
|
-
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;
|
|
984
982
|
return /* @__PURE__ */ d(
|
|
985
983
|
"a",
|
|
986
984
|
{
|
|
987
985
|
href: i.url,
|
|
988
|
-
target:
|
|
989
|
-
rel:
|
|
990
|
-
className:
|
|
986
|
+
target: x,
|
|
987
|
+
rel: T,
|
|
988
|
+
className: I.dropdownItem,
|
|
991
989
|
children: [
|
|
992
|
-
m && /* @__PURE__ */ e(m, { className:
|
|
990
|
+
m && /* @__PURE__ */ e(m, { className: I.dropdownIcon }),
|
|
993
991
|
i.label
|
|
994
992
|
]
|
|
995
993
|
},
|
|
@@ -997,18 +995,18 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
997
995
|
);
|
|
998
996
|
}) })
|
|
999
997
|
] }),
|
|
1000
|
-
|
|
1001
|
-
const
|
|
998
|
+
a.map((i, b) => {
|
|
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;
|
|
1002
1000
|
return /* @__PURE__ */ d(
|
|
1003
1001
|
"a",
|
|
1004
1002
|
{
|
|
1005
1003
|
href: i.url,
|
|
1006
|
-
target:
|
|
1007
|
-
rel:
|
|
1008
|
-
className: i.className ??
|
|
1004
|
+
target: x,
|
|
1005
|
+
rel: T,
|
|
1006
|
+
className: i.className ?? I.navLink,
|
|
1009
1007
|
children: [
|
|
1010
1008
|
i.label,
|
|
1011
|
-
m && /* @__PURE__ */ e(m, { className:
|
|
1009
|
+
m && /* @__PURE__ */ e(m, { className: I.externalIcon })
|
|
1012
1010
|
]
|
|
1013
1011
|
},
|
|
1014
1012
|
b
|
|
@@ -1017,28 +1015,28 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
1017
1015
|
] })
|
|
1018
1016
|
] }) }) });
|
|
1019
1017
|
}
|
|
1020
|
-
const
|
|
1018
|
+
const V = (t) => "items" in t;
|
|
1021
1019
|
function ce({
|
|
1022
1020
|
styles: t,
|
|
1023
1021
|
onLanguageChange: n
|
|
1024
1022
|
}) {
|
|
1025
|
-
const { i18n:
|
|
1026
|
-
const r =
|
|
1027
|
-
let
|
|
1028
|
-
r &&
|
|
1029
|
-
const i =
|
|
1030
|
-
let
|
|
1031
|
-
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1023
|
+
const { i18n: s } = R(), o = U(), c = G(), { config: a } = j(), [l, g] = L(!1), u = W(null), p = s.language, w = (f) => {
|
|
1024
|
+
const r = a.basePath || "";
|
|
1025
|
+
let v = o.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
|
+
a.supportedLanguages.includes(b) ? (i[0] = f, x = `${r}/${i.join("/")}`) : x = `${r}/${f}${v}`;
|
|
1030
|
+
const T = x + o.search + o.hash;
|
|
1031
|
+
s.changeLanguage(f), c(T), g(!1), n == null || n();
|
|
1034
1032
|
};
|
|
1035
1033
|
P(() => {
|
|
1036
|
-
const
|
|
1034
|
+
const f = (r) => {
|
|
1037
1035
|
u.current && !u.current.contains(r.target) && g(!1);
|
|
1038
1036
|
};
|
|
1039
|
-
return document.addEventListener("mousedown",
|
|
1037
|
+
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
1040
1038
|
}, []);
|
|
1041
|
-
const _ = (
|
|
1039
|
+
const _ = (f) => s.getFixedT(f)("language") || f;
|
|
1042
1040
|
return /* @__PURE__ */ d("div", { className: t.languageSelect, ref: u, children: [
|
|
1043
1041
|
/* @__PURE__ */ d(
|
|
1044
1042
|
"button",
|
|
@@ -1049,263 +1047,262 @@ function ce({
|
|
|
1049
1047
|
"aria-expanded": l,
|
|
1050
1048
|
"aria-haspopup": "listbox",
|
|
1051
1049
|
children: [
|
|
1052
|
-
/* @__PURE__ */ e(
|
|
1050
|
+
/* @__PURE__ */ e(Pe, { className: t.icon }),
|
|
1053
1051
|
_(p),
|
|
1054
|
-
/* @__PURE__ */ e(
|
|
1052
|
+
/* @__PURE__ */ e(ae, { className: t.chevron })
|
|
1055
1053
|
]
|
|
1056
1054
|
}
|
|
1057
1055
|
),
|
|
1058
|
-
l && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children:
|
|
1056
|
+
l && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children: a.supportedLanguages.map((f) => /* @__PURE__ */ e(
|
|
1059
1057
|
"button",
|
|
1060
1058
|
{
|
|
1061
1059
|
type: "button",
|
|
1062
|
-
className: `${t.languageOption} ${
|
|
1063
|
-
onClick: () => w(
|
|
1060
|
+
className: `${t.languageOption} ${f === p ? t.selected : ""}`,
|
|
1061
|
+
onClick: () => w(f),
|
|
1064
1062
|
role: "option",
|
|
1065
|
-
"aria-selected":
|
|
1066
|
-
children: _(
|
|
1063
|
+
"aria-selected": f === p,
|
|
1064
|
+
children: _(f)
|
|
1067
1065
|
},
|
|
1068
|
-
|
|
1066
|
+
f
|
|
1069
1067
|
)) })
|
|
1070
1068
|
] });
|
|
1071
1069
|
}
|
|
1072
1070
|
function re({ styles: t, onLinkClick: n }) {
|
|
1073
|
-
const { i18n:
|
|
1074
|
-
|
|
1071
|
+
const { i18n: s } = R(), o = U(), { config: c } = j(), [a, l] = L(() => {
|
|
1072
|
+
if (!c.navigationData) return {};
|
|
1073
|
+
const r = s.language;
|
|
1075
1074
|
return te(c.navigationData, r).reduce(
|
|
1076
|
-
(i, b,
|
|
1077
|
-
if (
|
|
1078
|
-
const
|
|
1075
|
+
(i, b, x) => {
|
|
1076
|
+
if (V(b)) {
|
|
1077
|
+
const T = c.navigationData[x], m = V(T) && T.defaultOpen === !0;
|
|
1079
1078
|
i[b.title] = m;
|
|
1080
1079
|
}
|
|
1081
1080
|
return i;
|
|
1082
1081
|
},
|
|
1083
1082
|
{}
|
|
1084
1083
|
);
|
|
1085
|
-
}), g =
|
|
1086
|
-
c.navigationData,
|
|
1087
|
-
g
|
|
1088
|
-
);
|
|
1084
|
+
}), g = s.language, u = c.navigationData ? te(c.navigationData, g) : [];
|
|
1089
1085
|
P(() => {
|
|
1090
|
-
|
|
1086
|
+
if (!c.navigationData) return;
|
|
1087
|
+
const v = te(
|
|
1091
1088
|
c.navigationData,
|
|
1092
1089
|
g
|
|
1093
1090
|
).reduce(
|
|
1094
|
-
(i, b,
|
|
1095
|
-
if (
|
|
1096
|
-
const
|
|
1091
|
+
(i, b, x) => {
|
|
1092
|
+
if (V(b)) {
|
|
1093
|
+
const T = c.navigationData[x], m = V(T) && T.defaultOpen === !0;
|
|
1097
1094
|
i[b.title] = m;
|
|
1098
1095
|
}
|
|
1099
1096
|
return i;
|
|
1100
1097
|
},
|
|
1101
1098
|
{}
|
|
1102
1099
|
);
|
|
1103
|
-
l(
|
|
1100
|
+
l(v);
|
|
1104
1101
|
}, [g, c.navigationData]);
|
|
1105
1102
|
const p = (r) => {
|
|
1106
|
-
l((
|
|
1107
|
-
...
|
|
1108
|
-
[r]: !
|
|
1103
|
+
l((v) => ({
|
|
1104
|
+
...v,
|
|
1105
|
+
[r]: !v[r]
|
|
1109
1106
|
}));
|
|
1110
1107
|
}, w = (r) => {
|
|
1111
|
-
const
|
|
1112
|
-
let i =
|
|
1113
|
-
|
|
1108
|
+
const v = c.basePath || "";
|
|
1109
|
+
let i = o.pathname;
|
|
1110
|
+
v && i.startsWith(v) && (i = i.slice(v.length));
|
|
1114
1111
|
const b = i.split("/").filter(Boolean);
|
|
1115
1112
|
return b[b.length - 1] === r;
|
|
1116
1113
|
}, _ = (r) => {
|
|
1117
|
-
const
|
|
1118
|
-
let i =
|
|
1119
|
-
|
|
1114
|
+
const v = c.basePath || "";
|
|
1115
|
+
let i = o.pathname;
|
|
1116
|
+
v && i.startsWith(v) && (i = i.slice(v.length));
|
|
1120
1117
|
const b = i.split("/").filter(Boolean);
|
|
1121
|
-
return b[0] && c.supportedLanguages.includes(b[0]) ? `${
|
|
1122
|
-
},
|
|
1118
|
+
return b[0] && c.supportedLanguages.includes(b[0]) ? `${v}/${b[0]}/${r}` : `${v}/${g}/${r}`;
|
|
1119
|
+
}, f = () => {
|
|
1123
1120
|
n == null || n();
|
|
1124
1121
|
};
|
|
1125
|
-
return /* @__PURE__ */ e("div", { className: t.navigation, children: u.map((r) =>
|
|
1122
|
+
return /* @__PURE__ */ e("div", { className: t.navigation, children: u.map((r) => V(r) ? /* @__PURE__ */ d("div", { className: t.section, children: [
|
|
1126
1123
|
/* @__PURE__ */ d(
|
|
1127
1124
|
"button",
|
|
1128
1125
|
{
|
|
1129
1126
|
type: "button",
|
|
1130
|
-
className: `${t.sectionButton} ${
|
|
1127
|
+
className: `${t.sectionButton} ${a[r.title] ? t.expanded : ""}`,
|
|
1131
1128
|
onClick: () => p(r.title),
|
|
1132
1129
|
children: [
|
|
1133
1130
|
r.title,
|
|
1134
|
-
/* @__PURE__ */ e(
|
|
1131
|
+
/* @__PURE__ */ e(Be, { className: t.icon })
|
|
1135
1132
|
]
|
|
1136
1133
|
}
|
|
1137
1134
|
),
|
|
1138
|
-
|
|
1135
|
+
a[r.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: r.items.map((v) => /* @__PURE__ */ e(
|
|
1139
1136
|
de,
|
|
1140
1137
|
{
|
|
1141
|
-
to: _(
|
|
1142
|
-
className: `${t.navItem} ${w(
|
|
1143
|
-
onClick:
|
|
1144
|
-
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 }) })
|
|
1145
1142
|
},
|
|
1146
|
-
|
|
1143
|
+
v.slug
|
|
1147
1144
|
)) })
|
|
1148
1145
|
] }, r.title) : /* @__PURE__ */ e(
|
|
1149
1146
|
de,
|
|
1150
1147
|
{
|
|
1151
1148
|
to: _(r.slug),
|
|
1152
1149
|
className: `${t.navItem} ${w(r.slug) ? t.active : ""}`,
|
|
1153
|
-
onClick:
|
|
1150
|
+
onClick: f,
|
|
1154
1151
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: r.title }) })
|
|
1155
1152
|
},
|
|
1156
1153
|
r.slug
|
|
1157
1154
|
)) });
|
|
1158
1155
|
}
|
|
1159
|
-
function
|
|
1156
|
+
function Ra({
|
|
1160
1157
|
styles: t,
|
|
1161
1158
|
onLinkClick: n,
|
|
1162
|
-
onLanguageChange:
|
|
1159
|
+
onLanguageChange: s
|
|
1163
1160
|
}) {
|
|
1164
1161
|
return /* @__PURE__ */ d(z, { children: [
|
|
1165
|
-
/* @__PURE__ */ e(ce, { styles: t, onLanguageChange:
|
|
1162
|
+
/* @__PURE__ */ e(ce, { styles: t, onLanguageChange: s }),
|
|
1166
1163
|
/* @__PURE__ */ e(re, { styles: t, onLinkClick: n })
|
|
1167
1164
|
] });
|
|
1168
1165
|
}
|
|
1169
|
-
const
|
|
1170
|
-
backdrop:
|
|
1171
|
-
open:
|
|
1172
|
-
mobileMenu:
|
|
1173
|
-
header:
|
|
1174
|
-
brand:
|
|
1175
|
-
cloudIcon:
|
|
1176
|
-
title:
|
|
1177
|
-
closeButton:
|
|
1178
|
-
closeIcon:
|
|
1179
|
-
languageSection:
|
|
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,
|
|
1172
|
+
cloudIcon: yn,
|
|
1173
|
+
title: Ln,
|
|
1174
|
+
closeButton: Pn,
|
|
1175
|
+
closeIcon: Bn,
|
|
1176
|
+
languageSection: Dn,
|
|
1180
1177
|
languageSelect: Mn,
|
|
1181
|
-
languageButton:
|
|
1182
|
-
icon:
|
|
1183
|
-
chevron:
|
|
1184
|
-
languageDropdown:
|
|
1185
|
-
languageOption:
|
|
1186
|
-
selected:
|
|
1187
|
-
scrollArea:
|
|
1188
|
-
navigation:
|
|
1189
|
-
section:
|
|
1190
|
-
sectionButton:
|
|
1191
|
-
expanded:
|
|
1192
|
-
sectionItems:
|
|
1193
|
-
navItem:
|
|
1194
|
-
active:
|
|
1195
|
-
navItemContent:
|
|
1196
|
-
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
|
|
1197
1194
|
};
|
|
1198
|
-
function
|
|
1199
|
-
const { config:
|
|
1195
|
+
function Vn({ isOpen: t, onClose: n }) {
|
|
1196
|
+
const { config: s } = j(), o = s.logo;
|
|
1200
1197
|
return P(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
1201
1198
|
document.body.style.overflow = "unset";
|
|
1202
1199
|
}), [t]), P(() => {
|
|
1203
|
-
const c = (
|
|
1204
|
-
|
|
1200
|
+
const c = (a) => {
|
|
1201
|
+
a.key === "Escape" && t && n();
|
|
1205
1202
|
};
|
|
1206
1203
|
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1207
1204
|
}, [t, n]), /* @__PURE__ */ d(z, { children: [
|
|
1208
1205
|
/* @__PURE__ */ e(
|
|
1209
1206
|
"div",
|
|
1210
1207
|
{
|
|
1211
|
-
className: `${
|
|
1208
|
+
className: `${M.backdrop} ${t ? M.open : ""}`,
|
|
1212
1209
|
onClick: n
|
|
1213
1210
|
}
|
|
1214
1211
|
),
|
|
1215
|
-
/* @__PURE__ */ d("div", { className: `${
|
|
1216
|
-
/* @__PURE__ */ d("div", { className:
|
|
1217
|
-
/* @__PURE__ */ d("div", { className:
|
|
1218
|
-
|
|
1219
|
-
/* @__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
|
+
o && /* @__PURE__ */ e(o, { className: M.cloudIcon }),
|
|
1216
|
+
/* @__PURE__ */ e("h1", { className: M.title, children: s.title })
|
|
1220
1217
|
] }),
|
|
1221
1218
|
/* @__PURE__ */ e(
|
|
1222
1219
|
"button",
|
|
1223
1220
|
{
|
|
1224
1221
|
type: "button",
|
|
1225
|
-
className:
|
|
1222
|
+
className: M.closeButton,
|
|
1226
1223
|
onClick: n,
|
|
1227
1224
|
"aria-label": "Close menu",
|
|
1228
|
-
children: /* @__PURE__ */ e(se, { className:
|
|
1225
|
+
children: /* @__PURE__ */ e(se, { className: M.closeIcon })
|
|
1229
1226
|
}
|
|
1230
1227
|
)
|
|
1231
1228
|
] }),
|
|
1232
|
-
/* @__PURE__ */ e("div", { className:
|
|
1233
|
-
/* @__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 }) })
|
|
1234
1231
|
] })
|
|
1235
1232
|
] });
|
|
1236
1233
|
}
|
|
1237
|
-
const
|
|
1238
|
-
sidebar:
|
|
1239
|
-
header:
|
|
1240
|
-
brand:
|
|
1241
|
-
cloudIcon:
|
|
1242
|
-
title:
|
|
1243
|
-
languageSelect:
|
|
1244
|
-
languageButton:
|
|
1245
|
-
icon:
|
|
1246
|
-
chevron:
|
|
1247
|
-
languageDropdown:
|
|
1248
|
-
languageOption:
|
|
1249
|
-
selected:
|
|
1250
|
-
scrollArea:
|
|
1251
|
-
navigation:
|
|
1252
|
-
section:
|
|
1253
|
-
sectionButton:
|
|
1254
|
-
expanded:
|
|
1255
|
-
sectionItems:
|
|
1256
|
-
navItem:
|
|
1257
|
-
active:
|
|
1258
|
-
navItemContent:
|
|
1234
|
+
const Jn = "_sidebar_1tdxt_1", Zn = "_header_1tdxt_17", ea = "_brand_1tdxt_29", ta = "_cloudIcon_1tdxt_35", na = "_title_1tdxt_44", aa = "_languageSelect_1tdxt_55", oa = "_languageButton_1tdxt_61", sa = "_icon_1tdxt_99", ca = "_chevron_1tdxt_104", ra = "_languageDropdown_1tdxt_114", la = "_languageOption_1tdxt_128", ia = "_selected_1tdxt_147", da = "_scrollArea_1tdxt_152", ua = "_navigation_1tdxt_158", ha = "_section_1tdxt_164", ma = "_sectionButton_1tdxt_170", ga = "_expanded_1tdxt_213", _a = "_sectionItems_1tdxt_217", pa = "_navItem_1tdxt_225", va = "_active_1tdxt_238", fa = "_navItemContent_1tdxt_243", q = {
|
|
1235
|
+
sidebar: Jn,
|
|
1236
|
+
header: Zn,
|
|
1237
|
+
brand: ea,
|
|
1238
|
+
cloudIcon: ta,
|
|
1239
|
+
title: na,
|
|
1240
|
+
languageSelect: aa,
|
|
1241
|
+
languageButton: oa,
|
|
1242
|
+
icon: sa,
|
|
1243
|
+
chevron: ca,
|
|
1244
|
+
languageDropdown: ra,
|
|
1245
|
+
languageOption: la,
|
|
1246
|
+
selected: ia,
|
|
1247
|
+
scrollArea: da,
|
|
1248
|
+
navigation: ua,
|
|
1249
|
+
section: ha,
|
|
1250
|
+
sectionButton: ma,
|
|
1251
|
+
expanded: ga,
|
|
1252
|
+
sectionItems: _a,
|
|
1253
|
+
navItem: pa,
|
|
1254
|
+
active: va,
|
|
1255
|
+
navItemContent: fa
|
|
1259
1256
|
};
|
|
1260
|
-
function
|
|
1261
|
-
const { config: t } = j(), n = t.logo,
|
|
1257
|
+
function ba() {
|
|
1258
|
+
const { config: t } = j(), n = t.logo, s = t.supportedLanguages.length > 1;
|
|
1262
1259
|
return /* @__PURE__ */ d("div", { className: q.sidebar, children: [
|
|
1263
1260
|
/* @__PURE__ */ d("div", { className: q.header, children: [
|
|
1264
1261
|
/* @__PURE__ */ d("div", { className: q.brand, children: [
|
|
1265
1262
|
n && /* @__PURE__ */ e(n, { className: q.cloudIcon }),
|
|
1266
1263
|
/* @__PURE__ */ e("div", { className: q.title, children: t.title })
|
|
1267
1264
|
] }),
|
|
1268
|
-
|
|
1265
|
+
s && /* @__PURE__ */ e(ce, { styles: q })
|
|
1269
1266
|
] }),
|
|
1270
1267
|
/* @__PURE__ */ e("div", { className: q.scrollArea, children: /* @__PURE__ */ e(re, { styles: q }) })
|
|
1271
1268
|
] });
|
|
1272
1269
|
}
|
|
1273
|
-
const
|
|
1274
|
-
app:
|
|
1275
|
-
layout: $
|
|
1276
|
-
main:
|
|
1277
|
-
contentWrapper:
|
|
1270
|
+
const wa = "_app_1v4z4_1", $a = "_layout_1v4z4_9", Na = "_main_1v4z4_15", Ia = "_contentWrapper_1v4z4_27", ee = {
|
|
1271
|
+
app: wa,
|
|
1272
|
+
layout: $a,
|
|
1273
|
+
main: Na,
|
|
1274
|
+
contentWrapper: Ia
|
|
1278
1275
|
};
|
|
1279
|
-
function
|
|
1280
|
-
const { language: n } =
|
|
1276
|
+
function xa({ children: t }) {
|
|
1277
|
+
const { language: n } = oe(), { i18n: s } = R(), { config: o } = j(), [c, a] = L(!1);
|
|
1281
1278
|
P(() => {
|
|
1282
|
-
n &&
|
|
1283
|
-
}, [n,
|
|
1279
|
+
n && o.supportedLanguages.includes(n) && s.changeLanguage(n);
|
|
1280
|
+
}, [n, s, o.supportedLanguages]);
|
|
1284
1281
|
const l = () => {
|
|
1285
|
-
|
|
1282
|
+
a(!c);
|
|
1286
1283
|
}, g = () => {
|
|
1287
|
-
|
|
1284
|
+
a(!1);
|
|
1288
1285
|
};
|
|
1289
|
-
if (!n || !
|
|
1290
|
-
return /* @__PURE__ */ e(
|
|
1291
|
-
const u = !!
|
|
1286
|
+
if (!n || !o.supportedLanguages.includes(n))
|
|
1287
|
+
return /* @__PURE__ */ e(ve, { to: "/en/welcome", replace: !0 });
|
|
1288
|
+
const u = !!o.header, p = !!o.navigationData && o.navigationData.length > 0;
|
|
1292
1289
|
return /* @__PURE__ */ d("div", { className: ee.app, children: [
|
|
1293
|
-
u && /* @__PURE__ */ e(
|
|
1294
|
-
/* @__PURE__ */ e(
|
|
1290
|
+
u && /* @__PURE__ */ e(In, { onMobileMenuToggle: l }),
|
|
1291
|
+
/* @__PURE__ */ e(Vn, { isOpen: c, onClose: g }),
|
|
1295
1292
|
/* @__PURE__ */ d("div", { className: ee.layout, children: [
|
|
1296
|
-
p && /* @__PURE__ */ e(
|
|
1293
|
+
p && /* @__PURE__ */ e(ba, {}),
|
|
1297
1294
|
/* @__PURE__ */ e("main", { className: ee.main, children: /* @__PURE__ */ e("div", { className: ee.contentWrapper, children: t }) })
|
|
1298
1295
|
] })
|
|
1299
1296
|
] });
|
|
1300
1297
|
}
|
|
1301
|
-
function
|
|
1302
|
-
const { language: t } =
|
|
1303
|
-
return /* @__PURE__ */ e(
|
|
1304
|
-
/* @__PURE__ */ e(ue, { path: "/:slug", element: /* @__PURE__ */ e(
|
|
1305
|
-
/* @__PURE__ */ e(ue, { path: "/", element: /* @__PURE__ */ e(
|
|
1298
|
+
function ja() {
|
|
1299
|
+
const { language: t } = oe();
|
|
1300
|
+
return /* @__PURE__ */ e(xa, { children: /* @__PURE__ */ d(Ce, { children: [
|
|
1301
|
+
/* @__PURE__ */ e(ue, { path: "/:slug", element: /* @__PURE__ */ e(Rt, { language: t }) }),
|
|
1302
|
+
/* @__PURE__ */ e(ue, { path: "/", element: /* @__PURE__ */ e(ve, { to: "welcome", replace: !0 }) })
|
|
1306
1303
|
] }) });
|
|
1307
1304
|
}
|
|
1308
|
-
function
|
|
1305
|
+
function Aa() {
|
|
1309
1306
|
return {
|
|
1310
1307
|
openSearchModal: () => {
|
|
1311
1308
|
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
@@ -1315,42 +1312,42 @@ function Ao() {
|
|
|
1315
1312
|
}
|
|
1316
1313
|
};
|
|
1317
1314
|
}
|
|
1318
|
-
function
|
|
1319
|
-
const { i18n: t } =
|
|
1315
|
+
function Ha() {
|
|
1316
|
+
const { i18n: t } = R(), n = U(), s = G(), { config: o } = j();
|
|
1320
1317
|
return (c) => {
|
|
1321
|
-
const
|
|
1318
|
+
const a = o.basePath || "";
|
|
1322
1319
|
let l = n.pathname;
|
|
1323
|
-
|
|
1320
|
+
a && l.startsWith(a) && (l = l.slice(a.length));
|
|
1324
1321
|
const g = l.split("/").filter(Boolean), u = g[0];
|
|
1325
1322
|
let p = "";
|
|
1326
|
-
|
|
1323
|
+
o.supportedLanguages.includes(u) ? (g[0] = c, p = `${a}/${g.join("/")}`) : p = `${a}/${c}${l}`;
|
|
1327
1324
|
const w = p + n.search + n.hash;
|
|
1328
|
-
t.changeLanguage(c),
|
|
1325
|
+
t.changeLanguage(c), s(w);
|
|
1329
1326
|
};
|
|
1330
1327
|
}
|
|
1331
1328
|
export {
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1329
|
+
He as AdvancedModeToggle,
|
|
1330
|
+
Oa as BlogProvider,
|
|
1331
|
+
qe as BlogRoot,
|
|
1332
|
+
Rt as ContentPage,
|
|
1333
|
+
xa as DocumentationLayout,
|
|
1334
|
+
ja as DocumentationRoutes,
|
|
1335
|
+
In as Header,
|
|
1339
1336
|
ce as LanguageSelector,
|
|
1340
|
-
|
|
1341
|
-
|
|
1337
|
+
Vn as MobileMenu,
|
|
1338
|
+
Ra as NavigationContent,
|
|
1342
1339
|
re as NavigationMenu,
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1340
|
+
nn as SearchBar,
|
|
1341
|
+
ba as Sidebar,
|
|
1342
|
+
at as TableOfContents,
|
|
1343
|
+
_t as TagResultsModal,
|
|
1344
|
+
Nt as Tags,
|
|
1345
|
+
Ea as createBlogUtils,
|
|
1349
1346
|
be as createContentLoaders,
|
|
1350
|
-
|
|
1347
|
+
J as generateHeadingId,
|
|
1351
1348
|
te as getNavigationData,
|
|
1352
1349
|
j as useBlogConfig,
|
|
1353
|
-
|
|
1354
|
-
|
|
1350
|
+
Ha as useLanguageChange,
|
|
1351
|
+
Aa as useSearchModal,
|
|
1355
1352
|
Ne as useTheme
|
|
1356
1353
|
};
|