@x-wave/blog 1.1.4 → 2.0.0
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/README.md +63 -496
- package/index.js +1268 -1205
- package/package.json +4 -3
- package/styles/index.css +2 -2
package/index.js
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { CaretLeft as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsxs as h, jsx as t, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { usePathname as J, useRouter as U, useParams as Xe } from "next/navigation";
|
|
3
|
+
import { useTranslation as z } from "react-i18next";
|
|
4
|
+
import { CaretLeft as ct, CaretRight as Qe, ArrowSquareOut as rt, User as lt, CalendarBlank as it, X as Le, Tag as dt, MagnifyingGlass as We, List as ut, Monitor as Ne, Moon as Fe, Sun as je, CaretDown as Ce, Globe as ht } from "@phosphor-icons/react";
|
|
5
|
+
import re from "next/link";
|
|
6
|
+
import * as le from "react";
|
|
7
|
+
import { createContext as mt, useState as T, useEffect as D, useContext as _t, useRef as Y, useMemo as Ke } from "react";
|
|
8
|
+
import gt from "react-markdown";
|
|
9
|
+
import pt from "remark-gfm";
|
|
10
|
+
import ft from "i18next";
|
|
11
|
+
import { createPortal as Ye } from "react-dom";
|
|
12
|
+
const vt = "_tabContainer_wncka_1", bt = "_tab_wncka_1", wt = "_active_wncka_46", te = {
|
|
13
|
+
tabContainer: vt,
|
|
14
|
+
tab: bt,
|
|
15
|
+
active: wt
|
|
14
16
|
};
|
|
15
|
-
function
|
|
16
|
-
const { t: n } =
|
|
17
|
-
if (!
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const u = h.toString(), i = u ? `?${u}` : "";
|
|
23
|
-
a(`${o.pathname}${i}${o.hash}`);
|
|
17
|
+
function kt({ hasAdvanced: e }) {
|
|
18
|
+
const { t: n } = z(), o = J(), s = U();
|
|
19
|
+
if (!e) return null;
|
|
20
|
+
const a = (o || "").replace(/\/$/, ""), r = a.endsWith("/advanced"), c = r ? a.replace(/\/advanced$/, "") : a, d = () => {
|
|
21
|
+
if (r) {
|
|
22
|
+
const u = new URLSearchParams(window.location.search).toString();
|
|
23
|
+
s.push(`${c}${u ? `?${u}` : ""}`);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
if (!
|
|
27
|
-
const
|
|
28
|
-
|
|
25
|
+
}, i = () => {
|
|
26
|
+
if (!r) {
|
|
27
|
+
const u = new URLSearchParams(window.location.search).toString();
|
|
28
|
+
s.push(`${c}/advanced${u ? `?${u}` : ""}`);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ h("div", { className: te.tabContainer, children: [
|
|
32
|
+
/* @__PURE__ */ t(
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
35
35
|
type: "button",
|
|
36
|
-
className: `${
|
|
37
|
-
onClick:
|
|
36
|
+
className: `${te.tab} ${r ? "" : te.active}`,
|
|
37
|
+
onClick: d,
|
|
38
38
|
children: n("ui.simple")
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ t(
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
className: `${
|
|
46
|
-
onClick:
|
|
45
|
+
className: `${te.tab} ${r ? te.active : ""}`,
|
|
46
|
+
onClick: i,
|
|
47
47
|
children: n("ui.advanced")
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
] });
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */
|
|
52
|
+
function Nt({ children: e }) {
|
|
53
|
+
return /* @__PURE__ */ t("div", { className: "xw-blog-root", children: e });
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Je(e) {
|
|
56
56
|
function n(o) {
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
const
|
|
62
|
-
for (const
|
|
57
|
+
const s = o.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
58
|
+
if (!s) return { frontmatter: {}, content: o };
|
|
59
|
+
const a = {}, r = s[1];
|
|
60
|
+
let c = "", d = !1;
|
|
61
|
+
const i = [];
|
|
62
|
+
for (const u of r.split(`
|
|
63
63
|
`)) {
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
|
|
64
|
+
const g = u.trim();
|
|
65
|
+
if (g.startsWith("-")) {
|
|
66
|
+
if (d) {
|
|
67
|
+
const p = g.substring(1).trim();
|
|
68
|
+
i.push(p);
|
|
69
69
|
}
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
const [
|
|
74
|
-
if (
|
|
75
|
-
|
|
72
|
+
if (d && !g.startsWith("-") && (a[c] = i.slice(), i.length = 0, d = !1), g != null && g.includes(":")) {
|
|
73
|
+
const [p, ...b] = g.split(":"), v = b.join(":").trim();
|
|
74
|
+
if (c = p.trim(), !v) {
|
|
75
|
+
d = !0;
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
v === "true" ? a[c] = !0 : v === "false" ? a[c] = !1 : a[c] = v;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
const
|
|
81
|
+
d && i.length > 0 && (a[c] = i);
|
|
82
|
+
const l = o.replace(
|
|
83
83
|
/^---\s*\n[\s\S]*?\n---\s*\n/,
|
|
84
84
|
""
|
|
85
85
|
);
|
|
86
|
-
return { frontmatter:
|
|
86
|
+
return { frontmatter: a, content: l };
|
|
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(o,
|
|
94
|
-
const
|
|
95
|
-
if (!
|
|
96
|
-
const
|
|
97
|
-
return { content:
|
|
93
|
+
async loadMDXContent(o, s, a = !1) {
|
|
94
|
+
const r = a ? `${s}-advanced.mdx` : `${s}.mdx`, c = `./docs/${o}/${r}`, d = e[c];
|
|
95
|
+
if (!d) throw new Error(`File not found: ${c}`);
|
|
96
|
+
const i = await d(), { frontmatter: l, content: u } = n(i);
|
|
97
|
+
return { content: u, frontmatter: l };
|
|
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(o,
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
106
|
-
const
|
|
107
|
-
return
|
|
103
|
+
async loadEnglishContent(o, s = !1) {
|
|
104
|
+
const r = `./docs/en/${s ? `${o}-advanced.mdx` : `${o}.mdx`}`, c = e[r];
|
|
105
|
+
if (!c) throw new Error(`File not found: ${r}`);
|
|
106
|
+
const d = await c(), { content: i } = n(d);
|
|
107
|
+
return i;
|
|
108
108
|
},
|
|
109
109
|
/**
|
|
110
110
|
* Build a tag index from all MDX files.
|
|
@@ -114,1024 +114,1069 @@ function qe(t) {
|
|
|
114
114
|
* @returns Promise resolving to tag index mapping tag names to document info
|
|
115
115
|
*/
|
|
116
116
|
async buildTagIndex(o = "en") {
|
|
117
|
-
const
|
|
118
|
-
(
|
|
117
|
+
const s = {}, a = `./docs/${o}/`, r = Object.keys(e).filter(
|
|
118
|
+
(c) => c.startsWith(a)
|
|
119
119
|
);
|
|
120
|
-
for (const
|
|
120
|
+
for (const c of r)
|
|
121
121
|
try {
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
for (const
|
|
127
|
-
|
|
128
|
-
} catch (
|
|
129
|
-
console.warn(`Failed to process ${
|
|
122
|
+
const d = e[c], i = await d(), { frontmatter: l, content: u } = n(i), g = c.split("/").pop() || "", p = g.replace(".mdx", "").replace("-advanced", ""), b = typeof l.title == "string" ? l.title : void 0, v = u.match(/^#\s+(.+)$/m), k = b || (v ? v[1].trim() : p);
|
|
123
|
+
if (g.includes("-advanced")) continue;
|
|
124
|
+
const $ = l.tags;
|
|
125
|
+
if ($ && Array.isArray($))
|
|
126
|
+
for (const N of $)
|
|
127
|
+
s[N] || (s[N] = []), s[N].some((I) => I.slug === p) || s[N].push({ slug: p, title: k });
|
|
128
|
+
} catch (d) {
|
|
129
|
+
console.warn(`Failed to process ${c}:`, d);
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return s;
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const n =
|
|
135
|
+
function us(e) {
|
|
136
|
+
const n = Je(e);
|
|
137
137
|
return {
|
|
138
|
-
mdxFiles:
|
|
138
|
+
mdxFiles: e,
|
|
139
139
|
loadContent: n.loadMDXContent,
|
|
140
140
|
loadEnglishContent: n.loadEnglishContent
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const c = Oe(o), l = document.querySelector(".xw-blog-root");
|
|
147
|
-
if (l && (l.classList.remove("light", "dark"), l.classList.add(c)), o === "system") {
|
|
148
|
-
const m = window.matchMedia("(prefers-color-scheme: dark)"), h = () => {
|
|
149
|
-
const u = Ue(), i = document.querySelector(".xw-blog-root");
|
|
150
|
-
i && (i.classList.remove("light", "dark"), i.classList.add(u));
|
|
151
|
-
};
|
|
152
|
-
return m.addEventListener("change", h), () => m.removeEventListener("change", h);
|
|
153
|
-
}
|
|
154
|
-
}, [o]), {
|
|
155
|
-
theme: o,
|
|
156
|
-
setTheme: (c) => {
|
|
157
|
-
localStorage.setItem(Ae, c), a(c);
|
|
158
|
-
},
|
|
159
|
-
effectiveTheme: Oe(o)
|
|
160
|
-
};
|
|
161
|
-
}, gt = (t) => "items" in t, se = (t) => "items" in t, he = async (t, n, o) => {
|
|
162
|
-
const a = [];
|
|
163
|
-
for (const s of t)
|
|
164
|
-
if (gt(s)) {
|
|
165
|
-
const c = [];
|
|
166
|
-
for (const m of s.items)
|
|
167
|
-
try {
|
|
168
|
-
const h = await o(n, m.slug, !1), u = typeof h.frontmatter.title == "string" ? h.frontmatter.title : m.slug;
|
|
169
|
-
c.push({
|
|
170
|
-
...m,
|
|
171
|
-
title: u
|
|
172
|
-
});
|
|
173
|
-
} catch {
|
|
174
|
-
c.push({
|
|
175
|
-
...m,
|
|
176
|
-
title: m.slug
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
const l = rt.getFixedT(n)(s.title);
|
|
180
|
-
a.push({
|
|
181
|
-
title: l,
|
|
182
|
-
items: c,
|
|
183
|
-
...s.defaultOpen !== void 0 && {
|
|
184
|
-
defaultOpen: s.defaultOpen
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
} else
|
|
188
|
-
try {
|
|
189
|
-
const c = await o(n, s.slug, !1), l = typeof c.frontmatter.title == "string" ? c.frontmatter.title : s.slug;
|
|
190
|
-
a.push({
|
|
191
|
-
...s,
|
|
192
|
-
title: l
|
|
193
|
-
});
|
|
194
|
-
} catch {
|
|
195
|
-
a.push({
|
|
196
|
-
...s,
|
|
197
|
-
title: s.slug
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
return a;
|
|
201
|
-
}, ee = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), pt = (t, n) => {
|
|
202
|
-
const o = [];
|
|
203
|
-
for (const s of n)
|
|
204
|
-
se(s) ? o.push(...s.items) : o.push({ slug: s.slug, title: s.title });
|
|
205
|
-
const a = o.findIndex(
|
|
206
|
-
(s) => s.slug === t
|
|
207
|
-
);
|
|
208
|
-
return a === -1 ? {} : {
|
|
209
|
-
prev: a > 0 ? o[a - 1] : void 0,
|
|
210
|
-
next: a < o.length - 1 ? o[a + 1] : void 0
|
|
211
|
-
};
|
|
212
|
-
}, Ge = st(null);
|
|
213
|
-
function Qo({
|
|
214
|
-
children: t,
|
|
143
|
+
const Ve = mt(null);
|
|
144
|
+
function hs({
|
|
145
|
+
children: e,
|
|
215
146
|
config: n,
|
|
216
147
|
blog: o,
|
|
217
|
-
navigationData:
|
|
148
|
+
navigationData: s = [],
|
|
149
|
+
initialTagIndex: a
|
|
218
150
|
}) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const { buildTagIndex:
|
|
151
|
+
const [r, c] = T(a ?? {});
|
|
152
|
+
D(() => {
|
|
153
|
+
if (a || Object.keys(o.mdxFiles).length === 0) return;
|
|
154
|
+
const { buildTagIndex: i } = Je(o.mdxFiles), l = n.supportedLanguages.map(async (u) => {
|
|
223
155
|
try {
|
|
224
|
-
const
|
|
225
|
-
return { language: u, index:
|
|
226
|
-
} catch (
|
|
227
|
-
return console.error(`Failed to build tag index for ${u}:`,
|
|
156
|
+
const g = await i(u);
|
|
157
|
+
return { language: u, index: g };
|
|
158
|
+
} catch (g) {
|
|
159
|
+
return console.error(`Failed to build tag index for ${u}:`, g), { language: u, index: {} };
|
|
228
160
|
}
|
|
229
161
|
});
|
|
230
|
-
Promise.all(
|
|
231
|
-
const
|
|
232
|
-
for (const
|
|
233
|
-
|
|
234
|
-
c(
|
|
162
|
+
Promise.all(l).then((u) => {
|
|
163
|
+
const g = {};
|
|
164
|
+
for (const p of u)
|
|
165
|
+
g[p.language] = p.index;
|
|
166
|
+
c(g);
|
|
235
167
|
}).catch((u) => {
|
|
236
168
|
console.error("Failed to build tag indices:", u);
|
|
237
169
|
});
|
|
238
|
-
}, [o.mdxFiles, n.supportedLanguages]);
|
|
239
|
-
const
|
|
240
|
-
return /* @__PURE__ */
|
|
241
|
-
|
|
170
|
+
}, [o.mdxFiles, n.supportedLanguages, a]);
|
|
171
|
+
const d = { ...n, navigationData: s, tagIndex: r };
|
|
172
|
+
return /* @__PURE__ */ t(
|
|
173
|
+
Ve.Provider,
|
|
242
174
|
{
|
|
243
175
|
value: {
|
|
244
|
-
config:
|
|
176
|
+
config: d,
|
|
245
177
|
loadContent: o.loadContent,
|
|
246
178
|
loadEnglishContent: o.loadEnglishContent
|
|
247
179
|
},
|
|
248
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ t(Nt, { children: e })
|
|
249
181
|
}
|
|
250
182
|
);
|
|
251
183
|
}
|
|
252
184
|
function R() {
|
|
253
|
-
const
|
|
254
|
-
if (!
|
|
185
|
+
const e = _t(Ve);
|
|
186
|
+
if (!e)
|
|
255
187
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
256
|
-
return
|
|
257
|
-
}
|
|
258
|
-
function Qe() {
|
|
259
|
-
return !!new URL(window.location.href).hash;
|
|
188
|
+
return e;
|
|
260
189
|
}
|
|
261
|
-
function
|
|
262
|
-
|
|
263
|
-
return Qe() ? `#${a}${n}/${t}` : `/${a}${n}/${t}`;
|
|
190
|
+
function $t(e, n, o) {
|
|
191
|
+
return `/${o ? `${o}/` : ""}${n}/${e}`;
|
|
264
192
|
}
|
|
265
|
-
function
|
|
193
|
+
function It(e) {
|
|
266
194
|
const n = {
|
|
267
|
-
advanced: !1,
|
|
268
195
|
anchor: ""
|
|
269
196
|
};
|
|
270
|
-
if (!
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
s === "advanced" ? n.advanced = !0 : s.startsWith("a=") && (n.anchor = s.substring(2));
|
|
274
|
-
return n;
|
|
197
|
+
if (!e) return n;
|
|
198
|
+
const o = e.startsWith("?") ? e.substring(1) : e, a = new URLSearchParams(o).get("a");
|
|
199
|
+
return n.anchor = a || "", n;
|
|
275
200
|
}
|
|
276
|
-
function
|
|
277
|
-
const o = document.getElementById(
|
|
201
|
+
function Ue(e, n = 80) {
|
|
202
|
+
const o = document.getElementById(e);
|
|
278
203
|
if (o) {
|
|
279
|
-
const
|
|
204
|
+
const a = o.getBoundingClientRect().top + window.pageYOffset - n;
|
|
280
205
|
window.scrollTo({
|
|
281
|
-
top:
|
|
206
|
+
top: a,
|
|
282
207
|
behavior: "smooth"
|
|
283
208
|
});
|
|
284
209
|
}
|
|
285
210
|
}
|
|
286
|
-
function
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
const a = o.hash.split("?"), s = a[0], c = new URLSearchParams(a[1] || "");
|
|
290
|
-
c.set("a", t), n && c.set("advanced", "");
|
|
291
|
-
const l = c.toString();
|
|
292
|
-
o.hash = l ? `${s}?${l}` : s;
|
|
293
|
-
} else {
|
|
294
|
-
const a = new URLSearchParams(o.search);
|
|
295
|
-
a.set("a", t), n && a.set("advanced", ""), o.search = `?${a.toString()}`;
|
|
296
|
-
}
|
|
297
|
-
window.history.pushState(null, "", o.toString());
|
|
211
|
+
function Ct(e) {
|
|
212
|
+
const n = new URL(window.location.href), o = new URLSearchParams(n.search);
|
|
213
|
+
o.set("a", e), n.search = `?${o.toString()}`, window.history.pushState(null, "", n.toString());
|
|
298
214
|
}
|
|
299
|
-
function
|
|
215
|
+
function Tt(e = "smooth") {
|
|
300
216
|
window.scrollTo({
|
|
301
217
|
top: 0,
|
|
302
218
|
left: 0,
|
|
303
|
-
behavior:
|
|
219
|
+
behavior: e
|
|
304
220
|
});
|
|
305
221
|
}
|
|
306
|
-
const
|
|
307
|
-
articleNavigation:
|
|
308
|
-
navContainer:
|
|
309
|
-
navLink:
|
|
310
|
-
navLinkContent:
|
|
311
|
-
navIcon:
|
|
312
|
-
navText:
|
|
313
|
-
navLabel:
|
|
314
|
-
navTitle:
|
|
222
|
+
const yt = "_articleNavigation_kz84g_1", xt = "_navContainer_kz84g_7", Lt = "_navLink_kz84g_24", St = "_navLinkContent_kz84g_61", Pt = "_navIcon_kz84g_76", Mt = "_navText_kz84g_83", Dt = "_navLabel_kz84g_90", Bt = "_navTitle_kz84g_98", A = {
|
|
223
|
+
articleNavigation: yt,
|
|
224
|
+
navContainer: xt,
|
|
225
|
+
navLink: Lt,
|
|
226
|
+
navLinkContent: St,
|
|
227
|
+
navIcon: Pt,
|
|
228
|
+
navText: Mt,
|
|
229
|
+
navLabel: Dt,
|
|
230
|
+
navTitle: Bt
|
|
315
231
|
};
|
|
316
|
-
function
|
|
317
|
-
prevSlug:
|
|
232
|
+
function Et({
|
|
233
|
+
prevSlug: e,
|
|
318
234
|
prevTitle: n,
|
|
319
235
|
nextSlug: o,
|
|
320
|
-
nextTitle:
|
|
321
|
-
language:
|
|
236
|
+
nextTitle: s,
|
|
237
|
+
language: a
|
|
322
238
|
}) {
|
|
323
|
-
const { t:
|
|
324
|
-
const
|
|
325
|
-
return
|
|
239
|
+
const { t: r } = z(), { config: c } = R(), d = J(), i = !!(d != null && d.endsWith("/advanced")), l = c.basePath || "", u = l ? `${l}/` : "", g = (b) => {
|
|
240
|
+
const v = `/${u}${a}/${b}`;
|
|
241
|
+
return i ? `${v}/advanced` : v;
|
|
326
242
|
};
|
|
327
|
-
if (!
|
|
243
|
+
if (!e && !o)
|
|
328
244
|
return null;
|
|
329
|
-
const
|
|
330
|
-
|
|
245
|
+
const p = () => {
|
|
246
|
+
Tt("auto");
|
|
331
247
|
};
|
|
332
|
-
return /* @__PURE__ */
|
|
333
|
-
|
|
334
|
-
|
|
248
|
+
return /* @__PURE__ */ t("nav", { className: A.articleNavigation, "aria-label": "Article navigation", children: /* @__PURE__ */ h("div", { className: A.navContainer, children: [
|
|
249
|
+
e ? /* @__PURE__ */ t(
|
|
250
|
+
re,
|
|
335
251
|
{
|
|
336
|
-
|
|
337
|
-
className:
|
|
338
|
-
onClick:
|
|
339
|
-
children: /* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */
|
|
252
|
+
href: g(e),
|
|
253
|
+
className: A.navLink,
|
|
254
|
+
onClick: p,
|
|
255
|
+
children: /* @__PURE__ */ h("div", { className: A.navLinkContent, children: [
|
|
256
|
+
/* @__PURE__ */ t("div", { className: A.navIcon, children: /* @__PURE__ */ t(ct, { size: 20, weight: "bold" }) }),
|
|
257
|
+
/* @__PURE__ */ h("div", { className: A.navText, children: [
|
|
258
|
+
/* @__PURE__ */ t("span", { className: A.navLabel, children: r("nav.previous") }),
|
|
259
|
+
/* @__PURE__ */ t("span", { className: A.navTitle, children: n || e })
|
|
344
260
|
] })
|
|
345
261
|
] })
|
|
346
262
|
}
|
|
347
|
-
) : /* @__PURE__ */
|
|
348
|
-
o ? /* @__PURE__ */
|
|
349
|
-
|
|
263
|
+
) : /* @__PURE__ */ t("div", {}),
|
|
264
|
+
o ? /* @__PURE__ */ t(
|
|
265
|
+
re,
|
|
350
266
|
{
|
|
351
|
-
|
|
352
|
-
className:
|
|
353
|
-
onClick:
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
267
|
+
href: g(o),
|
|
268
|
+
className: A.navLink,
|
|
269
|
+
onClick: p,
|
|
270
|
+
children: /* @__PURE__ */ h("div", { className: A.navLinkContent, children: [
|
|
271
|
+
/* @__PURE__ */ h("div", { className: A.navText, children: [
|
|
272
|
+
/* @__PURE__ */ t("span", { className: A.navLabel, children: r("nav.next") }),
|
|
273
|
+
/* @__PURE__ */ t("span", { className: A.navTitle, children: s || o })
|
|
358
274
|
] }),
|
|
359
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ t("div", { className: A.navIcon, children: /* @__PURE__ */ t(Qe, { size: 20, weight: "bold" }) })
|
|
360
276
|
] })
|
|
361
277
|
}
|
|
362
|
-
) : /* @__PURE__ */
|
|
278
|
+
) : /* @__PURE__ */ t("div", {})
|
|
363
279
|
] }) });
|
|
364
280
|
}
|
|
365
|
-
const
|
|
366
|
-
blogSidebar:
|
|
367
|
-
section:
|
|
368
|
-
sectionTitle:
|
|
369
|
-
linksList:
|
|
370
|
-
link:
|
|
281
|
+
const zt = "_blogSidebar_1ik3q_1", At = "_section_1ik3q_21", Ot = "_sectionTitle_1ik3q_28", Rt = "_linksList_1ik3q_36", Ht = "_link_1ik3q_36", ne = {
|
|
282
|
+
blogSidebar: zt,
|
|
283
|
+
section: At,
|
|
284
|
+
sectionTitle: Ot,
|
|
285
|
+
linksList: Rt,
|
|
286
|
+
link: Ht
|
|
371
287
|
};
|
|
372
|
-
function
|
|
373
|
-
const { t } =
|
|
374
|
-
return o.length === 0 ? null : /* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
const
|
|
378
|
-
return /* @__PURE__ */
|
|
288
|
+
function Wt() {
|
|
289
|
+
const { t: e } = z(), { config: n } = R(), o = n.socialLinks || [];
|
|
290
|
+
return o.length === 0 ? null : /* @__PURE__ */ t("aside", { className: ne.blogSidebar, children: /* @__PURE__ */ h("div", { className: ne.section, children: [
|
|
291
|
+
/* @__PURE__ */ t("h3", { className: ne.sectionTitle, children: e("ui.connect") }),
|
|
292
|
+
/* @__PURE__ */ t("div", { className: ne.linksList, children: o.map((s, a) => {
|
|
293
|
+
const r = s.icon || rt, c = s.target === "_blank";
|
|
294
|
+
return /* @__PURE__ */ h(
|
|
379
295
|
"a",
|
|
380
296
|
{
|
|
381
|
-
href:
|
|
382
|
-
className:
|
|
383
|
-
target:
|
|
384
|
-
rel:
|
|
297
|
+
href: s.url,
|
|
298
|
+
className: ne.link,
|
|
299
|
+
target: s.target || "_blank",
|
|
300
|
+
rel: c ? "noopener noreferrer" : void 0,
|
|
385
301
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ t(r, { size: 18, weight: "duotone" }),
|
|
303
|
+
/* @__PURE__ */ t("span", { children: s.label })
|
|
388
304
|
]
|
|
389
305
|
},
|
|
390
|
-
|
|
306
|
+
a
|
|
391
307
|
);
|
|
392
308
|
}) })
|
|
393
309
|
] }) });
|
|
394
310
|
}
|
|
395
|
-
const
|
|
396
|
-
breadcrumb:
|
|
397
|
-
breadcrumbList:
|
|
398
|
-
breadcrumbItem:
|
|
399
|
-
breadcrumbLink:
|
|
400
|
-
breadcrumbSeparator:
|
|
401
|
-
breadcrumbCurrent:
|
|
311
|
+
const Ft = "_breadcrumb_rarc4_1", jt = "_breadcrumbList_rarc4_5", Kt = "_breadcrumbItem_rarc4_15", Ut = "_breadcrumbLink_rarc4_21", qt = "_breadcrumbSeparator_rarc4_41", Gt = "_breadcrumbCurrent_rarc4_46", Q = {
|
|
312
|
+
breadcrumb: Ft,
|
|
313
|
+
breadcrumbList: jt,
|
|
314
|
+
breadcrumbItem: Kt,
|
|
315
|
+
breadcrumbLink: Ut,
|
|
316
|
+
breadcrumbSeparator: qt,
|
|
317
|
+
breadcrumbCurrent: Gt
|
|
402
318
|
};
|
|
403
|
-
function
|
|
404
|
-
const { t: o } =
|
|
405
|
-
|
|
406
|
-
},
|
|
407
|
-
return /* @__PURE__ */
|
|
408
|
-
/* @__PURE__ */
|
|
319
|
+
function Xt({ articleTitle: e, language: n }) {
|
|
320
|
+
const { t: o } = z(), { config: s } = R(), a = U(), c = `${s.basePath || ""}/${n}`, d = (l) => {
|
|
321
|
+
l.preventDefault(), window.scrollTo({ top: 0, left: 0, behavior: "auto" }), a.push(c);
|
|
322
|
+
}, i = (l, u = 60) => l.length <= u ? l : `${l.substring(0, u)}…`;
|
|
323
|
+
return /* @__PURE__ */ t("nav", { className: Q.breadcrumb, "aria-label": "Breadcrumb", children: /* @__PURE__ */ h("ol", { className: Q.breadcrumbList, children: [
|
|
324
|
+
/* @__PURE__ */ t("li", { className: Q.breadcrumbItem, children: /* @__PURE__ */ t(
|
|
409
325
|
"button",
|
|
410
326
|
{
|
|
411
|
-
onClick:
|
|
412
|
-
className:
|
|
327
|
+
onClick: d,
|
|
328
|
+
className: Q.breadcrumbLink,
|
|
413
329
|
type: "button",
|
|
414
330
|
children: o("ui.home")
|
|
415
331
|
}
|
|
416
332
|
) }),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ h("li", { className: Q.breadcrumbItem, children: [
|
|
334
|
+
/* @__PURE__ */ t("span", { className: Q.breadcrumbSeparator, children: "/" }),
|
|
335
|
+
/* @__PURE__ */ t("span", { className: Q.breadcrumbCurrent, children: i(e) })
|
|
420
336
|
] })
|
|
421
337
|
] }) });
|
|
422
338
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
339
|
+
var Qt = (e, n, o, s, a, r, c, d) => {
|
|
340
|
+
let i = document.documentElement, l = ["light", "dark"];
|
|
341
|
+
function u(b) {
|
|
342
|
+
(Array.isArray(e) ? e : [e]).forEach((v) => {
|
|
343
|
+
let k = v === "class", $ = k && r ? a.map((N) => r[N] || N) : a;
|
|
344
|
+
k ? (i.classList.remove(...$), i.classList.add(r && r[b] ? r[b] : b)) : i.setAttribute(v, b);
|
|
345
|
+
}), g(b);
|
|
346
|
+
}
|
|
347
|
+
function g(b) {
|
|
348
|
+
d && l.includes(b) && (i.style.colorScheme = b);
|
|
349
|
+
}
|
|
350
|
+
function p() {
|
|
351
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
352
|
+
}
|
|
353
|
+
if (s) u(s);
|
|
354
|
+
else try {
|
|
355
|
+
let b = localStorage.getItem(n) || o, v = c && b === "system" ? p() : b;
|
|
356
|
+
u(v);
|
|
357
|
+
} catch {
|
|
358
|
+
}
|
|
359
|
+
}, Yt = le.createContext(void 0), Jt = { setTheme: (e) => {
|
|
360
|
+
}, themes: [] }, Vt = () => {
|
|
361
|
+
var e;
|
|
362
|
+
return (e = le.useContext(Yt)) != null ? e : Jt;
|
|
363
|
+
};
|
|
364
|
+
le.memo(({ forcedTheme: e, storageKey: n, attribute: o, enableSystem: s, enableColorScheme: a, defaultTheme: r, value: c, themes: d, nonce: i, scriptProps: l }) => {
|
|
365
|
+
let u = JSON.stringify([o, n, r, e, d, c, s, a]).slice(1, -1);
|
|
366
|
+
return le.createElement("script", { ...l, suppressHydrationWarning: !0, nonce: typeof window > "u" ? i : "", dangerouslySetInnerHTML: { __html: `(${Qt.toString()})(${u})` } });
|
|
367
|
+
});
|
|
368
|
+
const Zt = () => {
|
|
369
|
+
const {
|
|
370
|
+
theme: e,
|
|
371
|
+
setTheme: n,
|
|
372
|
+
resolvedTheme: o
|
|
373
|
+
} = Vt(), [s, a] = T(!1);
|
|
374
|
+
return D(() => {
|
|
375
|
+
a(!0);
|
|
376
|
+
}, []), {
|
|
377
|
+
theme: e || "system",
|
|
378
|
+
setTheme: (i) => {
|
|
379
|
+
n(i);
|
|
380
|
+
},
|
|
381
|
+
effectiveTheme: o || "light",
|
|
382
|
+
isMounted: s
|
|
383
|
+
};
|
|
384
|
+
}, en = (e) => "items" in e, oe = (e) => "items" in e, ie = async (e, n, o) => {
|
|
385
|
+
const s = [];
|
|
386
|
+
for (const a of e)
|
|
387
|
+
if (en(a)) {
|
|
388
|
+
const r = [];
|
|
389
|
+
for (const d of a.items)
|
|
390
|
+
try {
|
|
391
|
+
const i = await o(n, d.slug, !1), l = typeof i.frontmatter.title == "string" ? i.frontmatter.title : d.slug;
|
|
392
|
+
r.push({
|
|
393
|
+
...d,
|
|
394
|
+
title: l
|
|
395
|
+
});
|
|
396
|
+
} catch {
|
|
397
|
+
r.push({
|
|
398
|
+
...d,
|
|
399
|
+
title: d.slug
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
const c = ft.getFixedT(n)(a.title);
|
|
403
|
+
s.push({
|
|
404
|
+
title: c,
|
|
405
|
+
items: r,
|
|
406
|
+
...a.defaultOpen !== void 0 && {
|
|
407
|
+
defaultOpen: a.defaultOpen
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
} else
|
|
411
|
+
try {
|
|
412
|
+
const r = await o(n, a.slug, !1), c = typeof r.frontmatter.title == "string" ? r.frontmatter.title : a.slug;
|
|
413
|
+
s.push({
|
|
414
|
+
...a,
|
|
415
|
+
title: c
|
|
416
|
+
});
|
|
417
|
+
} catch {
|
|
418
|
+
s.push({
|
|
419
|
+
...a,
|
|
420
|
+
title: a.slug
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
return s;
|
|
424
|
+
}, Te = (e) => e.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), tn = (e, n) => {
|
|
425
|
+
const o = [];
|
|
426
|
+
for (const a of n)
|
|
427
|
+
oe(a) ? o.push(...a.items) : o.push({ slug: a.slug, title: a.title });
|
|
428
|
+
const s = o.findIndex(
|
|
429
|
+
(a) => a.slug === e
|
|
430
|
+
);
|
|
431
|
+
return s === -1 ? {} : {
|
|
432
|
+
prev: s > 0 ? o[s - 1] : void 0,
|
|
433
|
+
next: s < o.length - 1 ? o[s + 1] : void 0
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
function nn() {
|
|
437
|
+
const [e, n] = T(""), o = () => {
|
|
438
|
+
if (typeof window > "u" || window.__blogHistoryPatched)
|
|
439
|
+
return;
|
|
440
|
+
const s = (a) => function(...c) {
|
|
441
|
+
const d = a.apply(this, c);
|
|
442
|
+
return setTimeout(() => {
|
|
443
|
+
window.dispatchEvent(new Event("urlchange"));
|
|
444
|
+
}, 0), d;
|
|
445
|
+
};
|
|
446
|
+
history.pushState = s(history.pushState), history.replaceState = s(history.replaceState), window.__blogHistoryPatched = !0;
|
|
447
|
+
};
|
|
448
|
+
return D(() => {
|
|
449
|
+
o(), n(window.location.search);
|
|
450
|
+
const s = () => n(window.location.search);
|
|
451
|
+
return window.addEventListener("popstate", s), window.addEventListener("urlchange", s), () => {
|
|
452
|
+
window.removeEventListener("popstate", s), window.removeEventListener("urlchange", s);
|
|
453
|
+
};
|
|
454
|
+
}, []), e;
|
|
455
|
+
}
|
|
456
|
+
function ms() {
|
|
457
|
+
return {
|
|
458
|
+
openSearchModal: () => {
|
|
459
|
+
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
460
|
+
},
|
|
461
|
+
closeSearchModal: () => {
|
|
462
|
+
window.dispatchEvent(new CustomEvent("blog:close-search"));
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
function _s() {
|
|
467
|
+
const { i18n: e } = z(), n = J(), o = U(), { config: s } = R();
|
|
468
|
+
return (a) => {
|
|
469
|
+
const r = s.basePath || "";
|
|
470
|
+
let c = n || "";
|
|
471
|
+
r && c.startsWith(r) && (c = c.slice(r.length));
|
|
472
|
+
const d = c.split("/").filter(Boolean), i = d[0];
|
|
473
|
+
let l = "";
|
|
474
|
+
s.supportedLanguages.includes(i) ? (d[0] = a, l = `${r}/${d.join("/")}`) : l = `${r}/${a}${c}`;
|
|
475
|
+
const u = typeof window < "u" ? window.location.search.slice(1) : "", g = u ? `${l}?${u}` : l;
|
|
476
|
+
e.changeLanguage(a), o.push(g);
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
const an = "_metadata_bsge0_1", on = "_author_bsge0_9", sn = "_date_bsge0_10", $e = {
|
|
480
|
+
metadata: an,
|
|
481
|
+
author: on,
|
|
482
|
+
date: sn
|
|
427
483
|
};
|
|
428
|
-
function
|
|
429
|
-
const { t: o } =
|
|
430
|
-
return !
|
|
431
|
-
n && /* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
484
|
+
function ye({ date: e, author: n }) {
|
|
485
|
+
const { t: o } = z();
|
|
486
|
+
return !e && !n ? null : /* @__PURE__ */ h("div", { className: $e.metadata, children: [
|
|
487
|
+
n && /* @__PURE__ */ h("span", { className: $e.author, children: [
|
|
488
|
+
/* @__PURE__ */ t(lt, { size: 16, weight: "regular" }),
|
|
433
489
|
n
|
|
434
490
|
] }),
|
|
435
|
-
|
|
436
|
-
/* @__PURE__ */
|
|
491
|
+
e && /* @__PURE__ */ h("span", { className: $e.date, children: [
|
|
492
|
+
/* @__PURE__ */ t(it, { size: 16, weight: "regular" }),
|
|
437
493
|
o("ui.lastEdited"),
|
|
438
494
|
": ",
|
|
439
|
-
|
|
495
|
+
e
|
|
440
496
|
] })
|
|
441
497
|
] });
|
|
442
498
|
}
|
|
443
|
-
const
|
|
444
|
-
tableOfContents:
|
|
445
|
-
header:
|
|
446
|
-
title:
|
|
447
|
-
nav:
|
|
448
|
-
list:
|
|
449
|
-
link:
|
|
450
|
-
active:
|
|
451
|
-
level1:
|
|
452
|
-
level2:
|
|
453
|
-
level3:
|
|
454
|
-
level4:
|
|
455
|
-
level5:
|
|
456
|
-
level6:
|
|
499
|
+
const cn = "_tableOfContents_9ofak_1", rn = "_header_9ofak_21", ln = "_title_9ofak_25", dn = "_nav_9ofak_34", un = "_list_9ofak_40", hn = "_link_9ofak_47", mn = "_active_9ofak_71", _n = "_level1_9ofak_87", gn = "_level2_9ofak_93", pn = "_level3_9ofak_98", fn = "_level4_9ofak_104", vn = "_level5_9ofak_110", bn = "_level6_9ofak_116", K = {
|
|
500
|
+
tableOfContents: cn,
|
|
501
|
+
header: rn,
|
|
502
|
+
title: ln,
|
|
503
|
+
nav: dn,
|
|
504
|
+
list: un,
|
|
505
|
+
link: hn,
|
|
506
|
+
active: mn,
|
|
507
|
+
level1: _n,
|
|
508
|
+
level2: gn,
|
|
509
|
+
level3: pn,
|
|
510
|
+
level4: fn,
|
|
511
|
+
level5: vn,
|
|
512
|
+
level6: bn
|
|
457
513
|
};
|
|
458
|
-
function
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
r.push({ level: D, text: z }), b = g.exec(t);
|
|
471
|
-
}
|
|
472
|
-
const _ = /^(#{1,6})\s+(.+)$/gm;
|
|
473
|
-
let w = _.exec(n), I = 0;
|
|
474
|
-
for (; w !== null && I < r.length; ) {
|
|
475
|
-
const D = w[2].trim(), z = ee(D);
|
|
476
|
-
v.push({
|
|
477
|
-
id: z,
|
|
478
|
-
text: r[I].text,
|
|
479
|
-
// Use localized text for display
|
|
480
|
-
level: r[I].level
|
|
481
|
-
}), I++, w = _.exec(n);
|
|
482
|
-
}
|
|
483
|
-
l(v);
|
|
484
|
-
})();
|
|
485
|
-
}, [t, n]), S(() => {
|
|
486
|
-
if (c.length === 0) return;
|
|
487
|
-
const f = setTimeout(() => {
|
|
488
|
-
const g = c.filter(
|
|
489
|
-
(v) => !document.getElementById(v.id)
|
|
490
|
-
);
|
|
491
|
-
g.length > 0 && console.warn("Some heading elements not found:", g);
|
|
492
|
-
}, 100);
|
|
493
|
-
return () => clearTimeout(f);
|
|
494
|
-
}, [c]), S(() => {
|
|
495
|
-
if (c.length === 0) return;
|
|
496
|
-
u.current && u.current.disconnect();
|
|
497
|
-
const f = setTimeout(() => {
|
|
498
|
-
const g = c.map((v) => document.getElementById(v.id)).filter(Boolean);
|
|
499
|
-
g.length !== 0 && (u.current = new IntersectionObserver(
|
|
500
|
-
(v) => {
|
|
501
|
-
const b = v.filter((r) => r.isIntersecting);
|
|
502
|
-
if (b.length > 0) {
|
|
503
|
-
const r = b.reduce((_, w) => _.boundingClientRect.top < w.boundingClientRect.top ? _ : w);
|
|
504
|
-
h(r.target.id);
|
|
514
|
+
function wn({ headings: e }) {
|
|
515
|
+
const { t: n } = z(), o = J(), s = U(), [a, r] = T(""), c = Y(null);
|
|
516
|
+
D(() => {
|
|
517
|
+
if (e.length === 0) return;
|
|
518
|
+
const i = e.map((l) => document.getElementById(l.id)).filter(Boolean);
|
|
519
|
+
if (i.length !== 0)
|
|
520
|
+
return c.current && c.current.disconnect(), c.current = new IntersectionObserver(
|
|
521
|
+
(l) => {
|
|
522
|
+
const u = l.filter((g) => g.isIntersecting);
|
|
523
|
+
if (u.length > 0) {
|
|
524
|
+
const g = u.reduce((p, b) => p.boundingClientRect.top < b.boundingClientRect.top ? p : b);
|
|
525
|
+
r(g.target.id);
|
|
505
526
|
}
|
|
506
527
|
},
|
|
507
528
|
{
|
|
508
529
|
rootMargin: "-80px 0% -80% 0%",
|
|
509
530
|
threshold: 0
|
|
510
531
|
}
|
|
511
|
-
),
|
|
512
|
-
|
|
513
|
-
}))
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
if (g) {
|
|
524
|
-
const v = new URLSearchParams(a.search);
|
|
525
|
-
v.set("a", f), s(
|
|
526
|
-
`${a.pathname}?${v.toString()}${a.hash}`,
|
|
527
|
-
{
|
|
528
|
-
replace: !0
|
|
529
|
-
}
|
|
530
|
-
);
|
|
531
|
-
const _ = g.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
532
|
+
), i.forEach((l) => {
|
|
533
|
+
c.current && c.current.observe(l);
|
|
534
|
+
}), () => {
|
|
535
|
+
c.current && c.current.disconnect();
|
|
536
|
+
};
|
|
537
|
+
}, [e]);
|
|
538
|
+
const d = (i) => {
|
|
539
|
+
const l = document.getElementById(i);
|
|
540
|
+
if (l) {
|
|
541
|
+
const u = new URLSearchParams(window.location.search);
|
|
542
|
+
u.set("a", i), s.replace(`${o}?${u.toString()}`, { scroll: !1 });
|
|
543
|
+
const b = l.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
532
544
|
window.scrollTo({
|
|
533
|
-
top:
|
|
545
|
+
top: b,
|
|
534
546
|
behavior: "smooth"
|
|
535
547
|
});
|
|
536
548
|
}
|
|
537
549
|
};
|
|
538
|
-
return
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
/* @__PURE__ */
|
|
550
|
+
return e.length === 0 ? null : /* @__PURE__ */ h("aside", { className: K.tableOfContents, children: [
|
|
551
|
+
/* @__PURE__ */ t("div", { className: K.header, children: /* @__PURE__ */ t("span", { className: K.title, children: n("ui.onThisPage", "On this page") }) }),
|
|
552
|
+
/* @__PURE__ */ t("nav", { className: K.nav, children: /* @__PURE__ */ t("ul", { className: K.list, children: e.map((i) => /* @__PURE__ */ t("li", { className: K.item, children: /* @__PURE__ */ t(
|
|
541
553
|
"button",
|
|
542
554
|
{
|
|
543
|
-
className: `${
|
|
544
|
-
onClick: () => i
|
|
555
|
+
className: `${K.link} ${K[`level${i.level}`]} ${a === i.id ? K.active : ""}`,
|
|
556
|
+
onClick: () => d(i.id),
|
|
545
557
|
type: "button",
|
|
546
|
-
children:
|
|
558
|
+
children: i.text
|
|
547
559
|
}
|
|
548
|
-
) },
|
|
560
|
+
) }, i.id)) }) })
|
|
549
561
|
] });
|
|
550
562
|
}
|
|
551
|
-
const
|
|
552
|
-
overlay:
|
|
553
|
-
modal:
|
|
554
|
-
header:
|
|
555
|
-
title:
|
|
556
|
-
closeButton:
|
|
557
|
-
results:
|
|
558
|
-
resultsList:
|
|
559
|
-
resultItem:
|
|
560
|
-
resultTitle:
|
|
561
|
-
resultSlug:
|
|
562
|
-
noResults:
|
|
563
|
+
const kn = "_overlay_1e1d4_1", Nn = "_modal_1e1d4_26", $n = "_header_1e1d4_50", In = "_title_1e1d4_58", Cn = "_closeButton_1e1d4_65", Tn = "_results_1e1d4_86", yn = "_resultsList_1e1d4_94", xn = "_resultItem_1e1d4_100", Ln = "_resultTitle_1e1d4_119", Sn = "_resultSlug_1e1d4_124", Pn = "_noResults_1e1d4_130", j = {
|
|
564
|
+
overlay: kn,
|
|
565
|
+
modal: Nn,
|
|
566
|
+
header: $n,
|
|
567
|
+
title: In,
|
|
568
|
+
closeButton: Cn,
|
|
569
|
+
results: Tn,
|
|
570
|
+
resultsList: yn,
|
|
571
|
+
resultItem: xn,
|
|
572
|
+
resultTitle: Ln,
|
|
573
|
+
resultSlug: Sn,
|
|
574
|
+
noResults: Pn
|
|
563
575
|
};
|
|
564
|
-
function
|
|
565
|
-
tag:
|
|
576
|
+
function Mn({
|
|
577
|
+
tag: e,
|
|
566
578
|
results: n,
|
|
567
579
|
language: o,
|
|
568
|
-
onClose:
|
|
580
|
+
onClose: s
|
|
569
581
|
}) {
|
|
570
|
-
const { t:
|
|
571
|
-
const
|
|
572
|
-
|
|
582
|
+
const { t: a } = z(), { config: r } = R(), c = U(), d = (i) => {
|
|
583
|
+
const l = r.basePath || "";
|
|
584
|
+
c.push(`${l}/${o}/${i}`), s();
|
|
573
585
|
};
|
|
574
|
-
return
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
|
|
586
|
+
return Ye(
|
|
587
|
+
/* @__PURE__ */ t("div", { className: j.overlay, onClick: s, children: /* @__PURE__ */ h("div", { className: j.modal, onClick: (i) => i.stopPropagation(), children: [
|
|
588
|
+
/* @__PURE__ */ h("div", { className: j.header, children: [
|
|
589
|
+
/* @__PURE__ */ h("h2", { className: j.title, children: [
|
|
590
|
+
a("ui.tagResults"),
|
|
579
591
|
": ",
|
|
580
|
-
|
|
592
|
+
e
|
|
581
593
|
] }),
|
|
582
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ t(
|
|
583
595
|
"button",
|
|
584
596
|
{
|
|
585
597
|
type: "button",
|
|
586
|
-
className:
|
|
587
|
-
onClick:
|
|
598
|
+
className: j.closeButton,
|
|
599
|
+
onClick: s,
|
|
588
600
|
"aria-label": "Close",
|
|
589
|
-
children: /* @__PURE__ */
|
|
601
|
+
children: /* @__PURE__ */ t(Le, {})
|
|
590
602
|
}
|
|
591
603
|
)
|
|
592
604
|
] }),
|
|
593
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ t("div", { className: j.results, children: n.length === 0 ? /* @__PURE__ */ t("div", { className: j.noResults, children: a("ui.noTagResults") }) : /* @__PURE__ */ t("ul", { className: j.resultsList, children: n.map((i) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ h(
|
|
594
606
|
"button",
|
|
595
607
|
{
|
|
596
608
|
type: "button",
|
|
597
|
-
className:
|
|
598
|
-
onClick: () =>
|
|
609
|
+
className: j.resultItem,
|
|
610
|
+
onClick: () => d(i.slug),
|
|
599
611
|
children: [
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ t("div", { className: j.resultTitle, children: i.title }),
|
|
613
|
+
/* @__PURE__ */ h("div", { className: j.resultSlug, children: [
|
|
602
614
|
"/",
|
|
603
|
-
|
|
615
|
+
i.slug
|
|
604
616
|
] })
|
|
605
617
|
]
|
|
606
618
|
}
|
|
607
|
-
) },
|
|
619
|
+
) }, i.slug)) }) })
|
|
608
620
|
] }) }),
|
|
609
621
|
document.body
|
|
610
622
|
);
|
|
611
623
|
}
|
|
612
|
-
const
|
|
613
|
-
tags:
|
|
614
|
-
compact:
|
|
615
|
-
tagLabel:
|
|
616
|
-
tagIcon:
|
|
617
|
-
tagList:
|
|
618
|
-
tag:
|
|
624
|
+
const Dn = "_tags_11t8a_1", Bn = "_compact_11t8a_9", En = "_tagLabel_11t8a_15", zn = "_tagIcon_11t8a_25", An = "_tagList_11t8a_30", On = "_tag_11t8a_1", Z = {
|
|
625
|
+
tags: Dn,
|
|
626
|
+
compact: Bn,
|
|
627
|
+
tagLabel: En,
|
|
628
|
+
tagIcon: zn,
|
|
629
|
+
tagList: An,
|
|
630
|
+
tag: On
|
|
619
631
|
};
|
|
620
|
-
function
|
|
621
|
-
const { t:
|
|
622
|
-
if (!
|
|
623
|
-
const
|
|
624
|
-
o && o(
|
|
632
|
+
function Rn({ tags: e, variant: n = "default", onTagClick: o }) {
|
|
633
|
+
const { t: s } = z();
|
|
634
|
+
if (!e || e.length === 0) return null;
|
|
635
|
+
const a = (r) => {
|
|
636
|
+
o && o(r);
|
|
625
637
|
};
|
|
626
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ h(
|
|
627
639
|
"div",
|
|
628
640
|
{
|
|
629
641
|
className: `${Z.tags} ${n === "compact" ? Z.compact : ""}`,
|
|
630
642
|
children: [
|
|
631
|
-
n === "default" && /* @__PURE__ */
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
|
|
643
|
+
n === "default" && /* @__PURE__ */ h("div", { className: Z.tagLabel, children: [
|
|
644
|
+
/* @__PURE__ */ t(dt, { className: Z.tagIcon, weight: "duotone" }),
|
|
645
|
+
/* @__PURE__ */ h("span", { children: [
|
|
646
|
+
s("ui.tags"),
|
|
635
647
|
":"
|
|
636
648
|
] })
|
|
637
649
|
] }),
|
|
638
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ t("div", { className: Z.tagList, children: e.map((r) => /* @__PURE__ */ t(
|
|
639
651
|
"button",
|
|
640
652
|
{
|
|
641
653
|
type: "button",
|
|
642
654
|
className: Z.tag,
|
|
643
|
-
onClick: () =>
|
|
644
|
-
"aria-label": `${
|
|
645
|
-
children:
|
|
655
|
+
onClick: () => a(r),
|
|
656
|
+
"aria-label": `${s("ui.filterByTag")}: ${r}`,
|
|
657
|
+
children: r
|
|
646
658
|
},
|
|
647
|
-
|
|
659
|
+
r
|
|
648
660
|
)) })
|
|
649
661
|
]
|
|
650
662
|
}
|
|
651
663
|
);
|
|
652
664
|
}
|
|
653
|
-
const
|
|
654
|
-
contentPage:
|
|
655
|
-
loadingContainer:
|
|
656
|
-
errorContainer:
|
|
657
|
-
skeletonTitle:
|
|
658
|
-
skeletonParagraph:
|
|
659
|
-
skeletonParagraphShort:
|
|
660
|
-
errorText:
|
|
661
|
-
mdxContent:
|
|
662
|
-
withMetadata:
|
|
663
|
-
codeBlock:
|
|
664
|
-
codeLanguage:
|
|
665
|
-
},
|
|
666
|
-
|
|
665
|
+
const Hn = "_contentPage_818m0_1", Wn = "_loadingContainer_818m0_48", Fn = "_errorContainer_818m0_49", jn = "_skeletonTitle_818m0_71", Kn = "_skeletonParagraph_818m0_80", Un = "_skeletonParagraphShort_818m0_93", qn = "_errorText_818m0_107", Gn = "_mdxContent_818m0_112", Xn = "_withMetadata_818m0_125", Qn = "_codeBlock_818m0_300", Yn = "_codeLanguage_818m0_304", E = {
|
|
666
|
+
contentPage: Hn,
|
|
667
|
+
loadingContainer: Wn,
|
|
668
|
+
errorContainer: Fn,
|
|
669
|
+
skeletonTitle: jn,
|
|
670
|
+
skeletonParagraph: Kn,
|
|
671
|
+
skeletonParagraphShort: Un,
|
|
672
|
+
errorText: qn,
|
|
673
|
+
mdxContent: Gn,
|
|
674
|
+
withMetadata: Xn,
|
|
675
|
+
codeBlock: Qn,
|
|
676
|
+
codeLanguage: Yn
|
|
677
|
+
}, xe = /^(#{1,6})\s+(.+)$/gm, Ze = (e) => {
|
|
678
|
+
if (!e) return [];
|
|
679
|
+
const n = e.matchAll(new RegExp(xe));
|
|
680
|
+
return Array.from(n, (o) => o[2].trim());
|
|
681
|
+
}, qe = (e) => {
|
|
682
|
+
const n = e.match(/^\s*#\s+(.+)\s*(?:\n+|$)/);
|
|
667
683
|
return n ? {
|
|
668
684
|
title: n[1].trim(),
|
|
669
|
-
content:
|
|
670
|
-
} : { title: void 0, content:
|
|
685
|
+
content: e.replace(/^\s*#\s+.+\s*(?:\n+|$)/, "")
|
|
686
|
+
} : { title: void 0, content: e };
|
|
671
687
|
};
|
|
672
|
-
function
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
688
|
+
function Jn(e, n) {
|
|
689
|
+
const o = Array.from(
|
|
690
|
+
e.matchAll(new RegExp(xe))
|
|
691
|
+
), s = Array.from(
|
|
692
|
+
n.matchAll(new RegExp(xe))
|
|
693
|
+
);
|
|
694
|
+
return o.map((a, r) => {
|
|
695
|
+
var c, d;
|
|
696
|
+
return {
|
|
697
|
+
id: Te(
|
|
698
|
+
((d = (c = s[r]) == null ? void 0 : c[2]) == null ? void 0 : d.trim()) || a[2].trim()
|
|
699
|
+
),
|
|
700
|
+
text: a[2].trim(),
|
|
701
|
+
level: a[1].length
|
|
702
|
+
};
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
function Ie(e, n) {
|
|
706
|
+
const o = typeof e.frontmatter.title == "string" ? e.frontmatter.title : void 0;
|
|
707
|
+
let s = e.content, a = n, r = "";
|
|
708
|
+
if (o) {
|
|
709
|
+
const i = qe(n), l = qe(e.content);
|
|
710
|
+
r = i.title || "", a = i.content, s = l.content;
|
|
711
|
+
}
|
|
712
|
+
const c = Ze(a), d = Jn(
|
|
713
|
+
s,
|
|
714
|
+
a
|
|
715
|
+
);
|
|
716
|
+
return {
|
|
717
|
+
content: s,
|
|
718
|
+
frontmatter: e.frontmatter,
|
|
719
|
+
englishTitle: r,
|
|
720
|
+
extractedHeadings: c,
|
|
721
|
+
tableOfContentsHeadings: d
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
const Ge = (e, n) => e ? n && n.length > 0 ? n : e.content : "";
|
|
725
|
+
function gs({
|
|
726
|
+
language: e,
|
|
727
|
+
initialContent: n,
|
|
728
|
+
initialEnglishContent: o,
|
|
729
|
+
initialAdvancedContent: s,
|
|
730
|
+
initialAdvancedEnglishContent: a
|
|
731
|
+
}) {
|
|
732
|
+
var Ee, ze, Ae, Oe, Re;
|
|
733
|
+
const r = Xe(), c = r == null ? void 0 : r.slug, d = J(), i = nn(), { config: l, loadContent: u, loadEnglishContent: g } = R(), p = Ge(
|
|
734
|
+
n,
|
|
735
|
+
o
|
|
736
|
+
), b = Ge(
|
|
737
|
+
s,
|
|
738
|
+
a
|
|
739
|
+
), v = n ? Ie(n, p) : null, k = s ? Ie(
|
|
740
|
+
s,
|
|
741
|
+
b
|
|
742
|
+
) : null, [$, N] = T(
|
|
743
|
+
(v == null ? void 0 : v.content) ?? ""
|
|
744
|
+
), [I, W] = T(
|
|
745
|
+
(v == null ? void 0 : v.frontmatter) ?? {}
|
|
746
|
+
), [F, m] = T(
|
|
747
|
+
(v == null ? void 0 : v.extractedHeadings) ?? []
|
|
748
|
+
), [_, w] = T(!n), [S, H] = T(null), [se, de] = T(!0), [ue, Me] = T(null), [et, tt] = T(
|
|
749
|
+
(v == null ? void 0 : v.englishTitle) ?? ""
|
|
750
|
+
), [De, nt] = T((v == null ? void 0 : v.tableOfContentsHeadings) ?? []), [ce, he] = T({}), me = Ke(
|
|
751
|
+
() => Ze($),
|
|
752
|
+
[$]
|
|
753
|
+
), at = Ke(() => {
|
|
754
|
+
const f = /* @__PURE__ */ new Map();
|
|
755
|
+
for (let C = 0; C < me.length; C++) {
|
|
756
|
+
const P = me[C], x = F[C] || P;
|
|
757
|
+
f.set(P, x);
|
|
758
|
+
}
|
|
759
|
+
return f;
|
|
760
|
+
}, [me, F]), _e = It(i), q = !!(d != null && d.endsWith("/advanced"));
|
|
761
|
+
function ge(f, C) {
|
|
762
|
+
const P = C && C.length > 0 ? C : f.content, x = Ie(f, P);
|
|
763
|
+
m(x.extractedHeadings), tt(x.englishTitle), N(x.content), W(x.frontmatter), nt(x.tableOfContentsHeadings), w(!1);
|
|
764
|
+
}
|
|
765
|
+
if (D(() => {
|
|
676
766
|
(async () => {
|
|
677
|
-
if (!
|
|
678
|
-
|
|
679
|
-
|
|
767
|
+
if (!c) return;
|
|
768
|
+
if (q && s && k) {
|
|
769
|
+
ge(
|
|
770
|
+
s,
|
|
771
|
+
b
|
|
772
|
+
), w(!1), H(null);
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
if (!q && n && v) {
|
|
776
|
+
ge(n, p), w(!1), H(null);
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
w(!0), H(null);
|
|
780
|
+
const C = (l == null ? void 0 : l.navigationData) || [];
|
|
680
781
|
let P = !0;
|
|
681
|
-
for (const
|
|
682
|
-
if ("items" in
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
P =
|
|
782
|
+
for (const x of C)
|
|
783
|
+
if ("items" in x) {
|
|
784
|
+
const M = x.items.find((ee) => ee.slug === c);
|
|
785
|
+
if (M) {
|
|
786
|
+
P = M.showTableOfContents !== !1;
|
|
686
787
|
break;
|
|
687
788
|
}
|
|
688
|
-
} else if (
|
|
689
|
-
P =
|
|
789
|
+
} else if (x.slug === c) {
|
|
790
|
+
P = x.showTableOfContents !== !1;
|
|
690
791
|
break;
|
|
691
792
|
}
|
|
692
|
-
|
|
793
|
+
de(P);
|
|
693
794
|
try {
|
|
694
|
-
let
|
|
795
|
+
let x;
|
|
695
796
|
try {
|
|
696
|
-
|
|
797
|
+
x = await u(e, c, q);
|
|
697
798
|
} catch {
|
|
698
|
-
if (
|
|
699
|
-
|
|
799
|
+
if (q)
|
|
800
|
+
x = await u(e, c, !1);
|
|
700
801
|
else
|
|
701
802
|
throw new Error("Content not found");
|
|
702
803
|
}
|
|
703
|
-
let
|
|
804
|
+
let M = "";
|
|
704
805
|
try {
|
|
705
|
-
|
|
806
|
+
M = await g(c, q);
|
|
706
807
|
} catch {
|
|
707
|
-
|
|
708
|
-
}
|
|
709
|
-
const J = typeof N.frontmatter.title == "string" ? N.frontmatter.title : void 0;
|
|
710
|
-
let le = N.content, ie = T, _e = "";
|
|
711
|
-
if (J) {
|
|
712
|
-
const de = We(T), Ye = We(N.content);
|
|
713
|
-
_e = de.title || "", ie = de.content, le = Ye.content;
|
|
714
|
-
} else
|
|
715
|
-
_e = "";
|
|
716
|
-
const Se = /^(#{1,6})\s+(.+)$/gm, Pe = [];
|
|
717
|
-
let ge = Se.exec(
|
|
718
|
-
ie
|
|
719
|
-
);
|
|
720
|
-
for (; ge !== null; ) {
|
|
721
|
-
const de = ge[2].trim();
|
|
722
|
-
Pe.push(de), ge = Se.exec(ie);
|
|
808
|
+
q && (M = await g(c, !1));
|
|
723
809
|
}
|
|
724
|
-
|
|
725
|
-
} catch (
|
|
726
|
-
|
|
727
|
-
} finally {
|
|
728
|
-
v(!1);
|
|
810
|
+
ge(x, M);
|
|
811
|
+
} catch (x) {
|
|
812
|
+
H(x instanceof Error ? x.message : "Failed to load content"), w(!1);
|
|
729
813
|
}
|
|
730
814
|
})();
|
|
731
815
|
}, [
|
|
816
|
+
c,
|
|
817
|
+
e,
|
|
818
|
+
q,
|
|
732
819
|
n,
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
const p = setTimeout(() => {
|
|
741
|
-
je(ce.anchor);
|
|
820
|
+
l.navigationData,
|
|
821
|
+
u,
|
|
822
|
+
g
|
|
823
|
+
]), D(() => {
|
|
824
|
+
if (!_ && _e.anchor) {
|
|
825
|
+
const f = setTimeout(() => {
|
|
826
|
+
Ue(_e.anchor);
|
|
742
827
|
}, 150);
|
|
743
|
-
return () => clearTimeout(
|
|
828
|
+
return () => clearTimeout(f);
|
|
744
829
|
}
|
|
745
|
-
}, [
|
|
830
|
+
}, [_, _e.anchor]), D(() => {
|
|
746
831
|
(async () => {
|
|
747
|
-
if (!
|
|
748
|
-
|
|
832
|
+
if (!c || !l.showArticleNavigation || !l.navigationData) {
|
|
833
|
+
he({});
|
|
749
834
|
return;
|
|
750
835
|
}
|
|
751
836
|
try {
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
), P =
|
|
757
|
-
|
|
758
|
-
} catch (
|
|
759
|
-
console.error("Failed to calculate adjacent articles:",
|
|
837
|
+
const C = await ie(
|
|
838
|
+
l.navigationData,
|
|
839
|
+
e,
|
|
840
|
+
u
|
|
841
|
+
), P = tn(c, C);
|
|
842
|
+
he(P);
|
|
843
|
+
} catch (C) {
|
|
844
|
+
console.error("Failed to calculate adjacent articles:", C), he({});
|
|
760
845
|
}
|
|
761
846
|
})();
|
|
762
847
|
}, [
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
]),
|
|
769
|
-
return /* @__PURE__ */
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
773
|
-
/* @__PURE__ */
|
|
848
|
+
c,
|
|
849
|
+
e,
|
|
850
|
+
l.showArticleNavigation,
|
|
851
|
+
l.navigationData,
|
|
852
|
+
u
|
|
853
|
+
]), _)
|
|
854
|
+
return /* @__PURE__ */ t("div", { className: E.contentPage, children: /* @__PURE__ */ h("div", { className: E.loadingContainer, children: [
|
|
855
|
+
/* @__PURE__ */ t("div", { className: E.skeletonTitle }),
|
|
856
|
+
/* @__PURE__ */ t("div", { className: E.skeletonParagraph }),
|
|
857
|
+
/* @__PURE__ */ t("div", { className: E.skeletonParagraph }),
|
|
858
|
+
/* @__PURE__ */ t("div", { className: E.skeletonParagraphShort })
|
|
774
859
|
] }) });
|
|
775
|
-
if (
|
|
776
|
-
return /* @__PURE__ */
|
|
860
|
+
if (S)
|
|
861
|
+
return /* @__PURE__ */ t("div", { className: E.contentPage, children: /* @__PURE__ */ t("div", { className: E.errorContainer, children: /* @__PURE__ */ h("div", { className: E.errorText, children: [
|
|
777
862
|
"Error: ",
|
|
778
|
-
|
|
863
|
+
S
|
|
779
864
|
] }) }) });
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
865
|
+
const pe = typeof I.title == "string" && I.title.trim().length > 0, fe = pe ? Te(et || I.title) : "", ve = !!(I.date || I.author), ot = !!(I.hasAdvanced || s || q);
|
|
866
|
+
let Be = !1;
|
|
867
|
+
const be = (f) => typeof f == "string" ? f : typeof f == "number" ? String(f) : Array.isArray(f) ? f.map(be).join("") : f && typeof f == "object" && "props" in f && f.props && typeof f.props == "object" && "children" in f.props ? be(
|
|
868
|
+
f.props.children
|
|
869
|
+
) : "", we = (f, C) => {
|
|
870
|
+
f.preventDefault(), Ue(C), Ct(C);
|
|
871
|
+
}, V = (f) => ({ children: C }) => {
|
|
872
|
+
const P = be(C), x = at.get(P) || P, M = Te(x), ee = `h${f}`;
|
|
873
|
+
if (f === 1) {
|
|
874
|
+
const ke = !Be;
|
|
875
|
+
Be = !0;
|
|
876
|
+
const He = ke && ve && !pe;
|
|
877
|
+
return /* @__PURE__ */ h(X, { children: [
|
|
878
|
+
/* @__PURE__ */ t(
|
|
879
|
+
ee,
|
|
880
|
+
{
|
|
881
|
+
id: M,
|
|
882
|
+
className: He ? E.withMetadata : void 0,
|
|
883
|
+
children: /* @__PURE__ */ t(
|
|
884
|
+
"a",
|
|
885
|
+
{
|
|
886
|
+
href: `#${M}`,
|
|
887
|
+
onClick: (st) => we(st, M),
|
|
888
|
+
style: { color: "inherit", textDecoration: "none" },
|
|
889
|
+
children: C
|
|
890
|
+
}
|
|
891
|
+
)
|
|
892
|
+
}
|
|
893
|
+
),
|
|
894
|
+
He && /* @__PURE__ */ t(ye, { date: I.date, author: I.author })
|
|
895
|
+
] });
|
|
896
|
+
}
|
|
897
|
+
return f <= 4 ? /* @__PURE__ */ t(ee, { id: M, children: /* @__PURE__ */ t(
|
|
898
|
+
"a",
|
|
899
|
+
{
|
|
900
|
+
href: `#${M}`,
|
|
901
|
+
onClick: (ke) => we(ke, M),
|
|
902
|
+
style: { color: "inherit", textDecoration: "none" },
|
|
903
|
+
children: C
|
|
904
|
+
}
|
|
905
|
+
) }) : /* @__PURE__ */ t(ee, { id: M, children: C });
|
|
785
906
|
};
|
|
786
|
-
return /* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
|
|
790
|
-
/* @__PURE__ */
|
|
791
|
-
/* @__PURE__ */ e(
|
|
907
|
+
return /* @__PURE__ */ h(X, { children: [
|
|
908
|
+
/* @__PURE__ */ h("div", { className: E.contentPage, children: [
|
|
909
|
+
pe && /* @__PURE__ */ h(X, { children: [
|
|
910
|
+
/* @__PURE__ */ t(Xt, { articleTitle: I.title, language: e }),
|
|
911
|
+
/* @__PURE__ */ t(
|
|
792
912
|
"h1",
|
|
793
913
|
{
|
|
794
|
-
id:
|
|
795
|
-
className:
|
|
796
|
-
children: /* @__PURE__ */
|
|
914
|
+
id: fe,
|
|
915
|
+
className: ve ? E.withMetadata : void 0,
|
|
916
|
+
children: /* @__PURE__ */ t(
|
|
797
917
|
"a",
|
|
798
918
|
{
|
|
799
|
-
href: `#${
|
|
800
|
-
onClick: (
|
|
919
|
+
href: `#${fe}`,
|
|
920
|
+
onClick: (f) => we(f, fe),
|
|
801
921
|
style: { color: "inherit", textDecoration: "none" },
|
|
802
|
-
children:
|
|
922
|
+
children: I.title
|
|
803
923
|
}
|
|
804
924
|
)
|
|
805
925
|
}
|
|
806
926
|
),
|
|
807
|
-
|
|
927
|
+
ve && /* @__PURE__ */ t(ye, { date: I.date, author: I.author })
|
|
808
928
|
] }),
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
|
|
929
|
+
/* @__PURE__ */ t(kt, { hasAdvanced: ot }),
|
|
930
|
+
/* @__PURE__ */ t("div", { className: E.mdxContent, children: /* @__PURE__ */ t(
|
|
931
|
+
gt,
|
|
811
932
|
{
|
|
812
|
-
remarkPlugins: [
|
|
933
|
+
remarkPlugins: [pt],
|
|
813
934
|
components: {
|
|
814
|
-
h1: (
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
href: `#${N}`,
|
|
828
|
-
onClick: (le) => te(le, N),
|
|
829
|
-
style: { color: "inherit", textDecoration: "none" },
|
|
830
|
-
children: p
|
|
831
|
-
}
|
|
832
|
-
)
|
|
833
|
-
}
|
|
834
|
-
),
|
|
835
|
-
T && J && !re && /* @__PURE__ */ e(
|
|
836
|
-
ve,
|
|
837
|
-
{
|
|
838
|
-
date: i.date,
|
|
839
|
-
author: i.author
|
|
840
|
-
}
|
|
841
|
-
)
|
|
935
|
+
h1: V(1),
|
|
936
|
+
h2: V(2),
|
|
937
|
+
h3: V(3),
|
|
938
|
+
h4: V(4),
|
|
939
|
+
h5: V(5),
|
|
940
|
+
h6: V(6),
|
|
941
|
+
code: ({ className: f, children: C, ...P }) => {
|
|
942
|
+
if (!f)
|
|
943
|
+
return /* @__PURE__ */ t("code", { ...P, children: C });
|
|
944
|
+
const M = (f == null ? void 0 : f.replace("language-", "")) || "";
|
|
945
|
+
return /* @__PURE__ */ h("div", { className: E.codeBlock, children: [
|
|
946
|
+
M && /* @__PURE__ */ t("div", { className: E.codeLanguage, children: M }),
|
|
947
|
+
/* @__PURE__ */ t("pre", { children: /* @__PURE__ */ t("code", { className: f, ...P, children: C }) })
|
|
842
948
|
] });
|
|
843
949
|
},
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
style: { color: "inherit", textDecoration: "none" },
|
|
852
|
-
children: p
|
|
853
|
-
}
|
|
854
|
-
) });
|
|
855
|
-
},
|
|
856
|
-
h3: ({ children: p }) => {
|
|
857
|
-
const x = W.current++, P = q.current[x] || "", N = ee(P);
|
|
858
|
-
return /* @__PURE__ */ e("h3", { id: N, children: /* @__PURE__ */ e(
|
|
859
|
-
"a",
|
|
860
|
-
{
|
|
861
|
-
href: `#${N}`,
|
|
862
|
-
onClick: (T) => te(T, N),
|
|
863
|
-
style: { color: "inherit", textDecoration: "none" },
|
|
864
|
-
children: p
|
|
865
|
-
}
|
|
866
|
-
) });
|
|
867
|
-
},
|
|
868
|
-
h4: ({ children: p }) => {
|
|
869
|
-
const x = W.current++, P = q.current[x] || "", N = ee(P);
|
|
870
|
-
return /* @__PURE__ */ e("h4", { id: N, children: /* @__PURE__ */ e(
|
|
871
|
-
"a",
|
|
872
|
-
{
|
|
873
|
-
href: `#${N}`,
|
|
874
|
-
onClick: (T) => te(T, N),
|
|
875
|
-
style: { color: "inherit", textDecoration: "none" },
|
|
876
|
-
children: p
|
|
877
|
-
}
|
|
878
|
-
) });
|
|
879
|
-
},
|
|
880
|
-
h5: ({ children: p }) => {
|
|
881
|
-
const x = `h5-${W.current++}`;
|
|
882
|
-
return /* @__PURE__ */ e("h5", { id: x, children: p });
|
|
883
|
-
},
|
|
884
|
-
h6: ({ children: p }) => {
|
|
885
|
-
const x = `h6-${W.current++}`;
|
|
886
|
-
return /* @__PURE__ */ e("h6", { id: x, children: p });
|
|
887
|
-
},
|
|
888
|
-
p: ({ children: p }) => /* @__PURE__ */ e("p", { children: p }),
|
|
889
|
-
ul: ({ children: p }) => /* @__PURE__ */ e("ul", { children: p }),
|
|
890
|
-
ol: ({ children: p }) => /* @__PURE__ */ e("ol", { children: p }),
|
|
891
|
-
li: ({ children: p }) => /* @__PURE__ */ e("li", { children: p }),
|
|
892
|
-
code: ({ className: p, children: x, ...P }) => {
|
|
893
|
-
if (!p)
|
|
894
|
-
return /* @__PURE__ */ e("code", { ...P, children: x });
|
|
895
|
-
const T = (p == null ? void 0 : p.replace("language-", "")) || "";
|
|
896
|
-
return /* @__PURE__ */ d("div", { className: B.codeBlock, children: [
|
|
897
|
-
T && /* @__PURE__ */ e("div", { className: B.codeLanguage, children: T }),
|
|
898
|
-
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: p, ...P, children: x }) })
|
|
899
|
-
] });
|
|
900
|
-
},
|
|
901
|
-
pre: ({ children: p }) => /* @__PURE__ */ e(K, { children: p }),
|
|
902
|
-
// Let code component handle pre styling
|
|
903
|
-
blockquote: ({ children: p }) => /* @__PURE__ */ e("blockquote", { children: p }),
|
|
904
|
-
a: ({ href: p, children: x, ...P }) => {
|
|
905
|
-
if (p != null && p.startsWith("./")) {
|
|
906
|
-
const N = p.slice(2), T = ft(
|
|
907
|
-
N,
|
|
908
|
-
t,
|
|
909
|
-
a.basePath
|
|
950
|
+
pre: ({ children: f }) => /* @__PURE__ */ t(X, { children: f }),
|
|
951
|
+
a: ({ href: f, children: C, ...P }) => {
|
|
952
|
+
if (f != null && f.startsWith("./")) {
|
|
953
|
+
const x = f.slice(2), M = $t(
|
|
954
|
+
x,
|
|
955
|
+
e,
|
|
956
|
+
l.basePath
|
|
910
957
|
);
|
|
911
|
-
return /* @__PURE__ */
|
|
958
|
+
return /* @__PURE__ */ t("a", { href: M, ...P, children: C });
|
|
912
959
|
}
|
|
913
|
-
return
|
|
960
|
+
return f != null && f.startsWith("http://") || f != null && f.startsWith("https://") ? /* @__PURE__ */ t(
|
|
914
961
|
"a",
|
|
915
962
|
{
|
|
916
|
-
href:
|
|
963
|
+
href: f,
|
|
917
964
|
target: "_blank",
|
|
918
965
|
rel: "noopener noreferrer",
|
|
919
966
|
...P,
|
|
920
|
-
children:
|
|
967
|
+
children: C
|
|
921
968
|
}
|
|
922
|
-
) : /* @__PURE__ */
|
|
923
|
-
}
|
|
924
|
-
strong: ({ children: p }) => /* @__PURE__ */ e("strong", { children: p }),
|
|
925
|
-
em: ({ children: p }) => /* @__PURE__ */ e("em", { children: p })
|
|
969
|
+
) : /* @__PURE__ */ t("a", { href: f, ...P, children: C });
|
|
970
|
+
}
|
|
926
971
|
},
|
|
927
|
-
children:
|
|
972
|
+
children: $
|
|
928
973
|
}
|
|
929
974
|
) }),
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
975
|
+
l.articleCTA && /* @__PURE__ */ t("div", { children: l.articleCTA }),
|
|
976
|
+
I.tags && I.tags.length > 0 && /* @__PURE__ */ t(
|
|
977
|
+
Rn,
|
|
933
978
|
{
|
|
934
|
-
tags:
|
|
979
|
+
tags: I.tags,
|
|
935
980
|
variant: "compact",
|
|
936
|
-
onTagClick: (
|
|
981
|
+
onTagClick: (f) => Me(f)
|
|
937
982
|
}
|
|
938
983
|
),
|
|
939
|
-
|
|
940
|
-
|
|
984
|
+
l.showArticleNavigation && /* @__PURE__ */ t(
|
|
985
|
+
Et,
|
|
941
986
|
{
|
|
942
|
-
prevSlug: (
|
|
943
|
-
prevTitle: (
|
|
944
|
-
nextSlug: (
|
|
945
|
-
nextTitle: (
|
|
946
|
-
language:
|
|
987
|
+
prevSlug: (Ee = ce.prev) == null ? void 0 : Ee.slug,
|
|
988
|
+
prevTitle: (ze = ce.prev) == null ? void 0 : ze.title,
|
|
989
|
+
nextSlug: (Ae = ce.next) == null ? void 0 : Ae.slug,
|
|
990
|
+
nextTitle: (Oe = ce.next) == null ? void 0 : Oe.title,
|
|
991
|
+
language: e
|
|
947
992
|
}
|
|
948
993
|
)
|
|
949
994
|
] }),
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
995
|
+
se && De.length > 0 && /* @__PURE__ */ t(wn, { headings: De }),
|
|
996
|
+
ue && ((Re = l.tagIndex) == null ? void 0 : Re[e]) && /* @__PURE__ */ t(
|
|
997
|
+
Mn,
|
|
953
998
|
{
|
|
954
|
-
tag:
|
|
955
|
-
results:
|
|
956
|
-
language:
|
|
957
|
-
onClose: () =>
|
|
999
|
+
tag: ue,
|
|
1000
|
+
results: l.tagIndex[e][ue] || [],
|
|
1001
|
+
language: e,
|
|
1002
|
+
onClose: () => Me(null)
|
|
958
1003
|
}
|
|
959
1004
|
)
|
|
960
1005
|
] });
|
|
961
1006
|
}
|
|
962
|
-
const
|
|
963
|
-
searchButton:
|
|
964
|
-
searchIcon:
|
|
965
|
-
searchHint:
|
|
966
|
-
kbd:
|
|
967
|
-
searchOverlay:
|
|
968
|
-
searchModal:
|
|
969
|
-
searchHeader:
|
|
970
|
-
searchInput:
|
|
971
|
-
closeButton:
|
|
972
|
-
searchResults:
|
|
973
|
-
resultsList:
|
|
974
|
-
resultItem:
|
|
975
|
-
selected:
|
|
976
|
-
resultTitle:
|
|
977
|
-
resultSlug:
|
|
978
|
-
noResults:
|
|
979
|
-
searchHints:
|
|
980
|
-
hint:
|
|
1007
|
+
const Vn = "_searchButton_1k9sl_1", Zn = "_searchIcon_1k9sl_17", ea = "_searchHint_1k9sl_23", ta = "_kbd_1k9sl_27", na = "_searchOverlay_1k9sl_42", aa = "_searchModal_1k9sl_67", oa = "_searchHeader_1k9sl_91", sa = "_searchInput_1k9sl_105", ca = "_closeButton_1k9sl_123", ra = "_searchResults_1k9sl_144", la = "_resultsList_1k9sl_152", ia = "_resultItem_1k9sl_158", da = "_selected_1k9sl_173", ua = "_resultTitle_1k9sl_176", ha = "_resultSlug_1k9sl_180", ma = "_noResults_1k9sl_186", _a = "_searchHints_1k9sl_193", ga = "_hint_1k9sl_210", L = {
|
|
1008
|
+
searchButton: Vn,
|
|
1009
|
+
searchIcon: Zn,
|
|
1010
|
+
searchHint: ea,
|
|
1011
|
+
kbd: ta,
|
|
1012
|
+
searchOverlay: na,
|
|
1013
|
+
searchModal: aa,
|
|
1014
|
+
searchHeader: oa,
|
|
1015
|
+
searchInput: sa,
|
|
1016
|
+
closeButton: ca,
|
|
1017
|
+
searchResults: ra,
|
|
1018
|
+
resultsList: la,
|
|
1019
|
+
resultItem: ia,
|
|
1020
|
+
selected: da,
|
|
1021
|
+
resultTitle: ua,
|
|
1022
|
+
resultSlug: ha,
|
|
1023
|
+
noResults: ma,
|
|
1024
|
+
searchHints: _a,
|
|
1025
|
+
hint: ga
|
|
981
1026
|
};
|
|
982
|
-
function
|
|
983
|
-
const { t: n } =
|
|
984
|
-
|
|
1027
|
+
function pa({ language: e }) {
|
|
1028
|
+
const { t: n } = z(), o = U(), { config: s, loadContent: a } = R(), [r, c] = T(!1), [d, i] = T(""), [l, u] = T([]), [g, p] = T(0), [b, v] = T([]), k = Y(null), $ = Y(null), I = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K";
|
|
1029
|
+
D(() => {
|
|
985
1030
|
(async () => {
|
|
986
|
-
if (
|
|
1031
|
+
if (s.navigationData)
|
|
987
1032
|
try {
|
|
988
|
-
const
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
)).flatMap((
|
|
993
|
-
title:
|
|
994
|
-
slug:
|
|
995
|
-
})) : [{ title:
|
|
996
|
-
|
|
997
|
-
} catch (
|
|
998
|
-
console.error("Failed to build search index:",
|
|
1033
|
+
const w = (await ie(
|
|
1034
|
+
s.navigationData,
|
|
1035
|
+
e,
|
|
1036
|
+
a
|
|
1037
|
+
)).flatMap((S) => oe(S) ? S.items.map((H) => ({
|
|
1038
|
+
title: H.title,
|
|
1039
|
+
slug: H.slug
|
|
1040
|
+
})) : [{ title: S.title, slug: S.slug }]);
|
|
1041
|
+
v(w);
|
|
1042
|
+
} catch (_) {
|
|
1043
|
+
console.error("Failed to build search index:", _);
|
|
999
1044
|
}
|
|
1000
1045
|
})();
|
|
1001
|
-
}, [
|
|
1002
|
-
if (!
|
|
1003
|
-
|
|
1046
|
+
}, [s.navigationData, e, a]), D(() => {
|
|
1047
|
+
if (!d.trim()) {
|
|
1048
|
+
u([]), p(0);
|
|
1004
1049
|
return;
|
|
1005
1050
|
}
|
|
1006
|
-
const
|
|
1007
|
-
(
|
|
1051
|
+
const m = d.toLowerCase(), _ = b.filter(
|
|
1052
|
+
(w) => w.title.toLowerCase().includes(m) || w.slug.toLowerCase().includes(m)
|
|
1008
1053
|
);
|
|
1009
|
-
|
|
1010
|
-
}, [
|
|
1011
|
-
const
|
|
1012
|
-
(
|
|
1013
|
-
var
|
|
1014
|
-
return (
|
|
1015
|
-
}, 100)),
|
|
1054
|
+
u(_), p(0);
|
|
1055
|
+
}, [d]), D(() => {
|
|
1056
|
+
const m = (_) => {
|
|
1057
|
+
(_.metaKey || _.ctrlKey) && _.key === "k" && (_.preventDefault(), c(!0), setTimeout(() => {
|
|
1058
|
+
var w;
|
|
1059
|
+
return (w = k.current) == null ? void 0 : w.focus();
|
|
1060
|
+
}, 100)), _.key === "Escape" && r && (c(!1), i(""));
|
|
1016
1061
|
};
|
|
1017
|
-
return document.addEventListener("keydown",
|
|
1018
|
-
}, [
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1021
|
-
var
|
|
1022
|
-
return (
|
|
1062
|
+
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
1063
|
+
}, [r]), D(() => {
|
|
1064
|
+
const m = () => {
|
|
1065
|
+
c(!0), setTimeout(() => {
|
|
1066
|
+
var w;
|
|
1067
|
+
return (w = k.current) == null ? void 0 : w.focus();
|
|
1023
1068
|
}, 100);
|
|
1024
|
-
},
|
|
1025
|
-
|
|
1069
|
+
}, _ = () => {
|
|
1070
|
+
c(!1), i("");
|
|
1026
1071
|
};
|
|
1027
|
-
return window.addEventListener("blog:open-search",
|
|
1028
|
-
window.removeEventListener("blog:open-search",
|
|
1072
|
+
return window.addEventListener("blog:open-search", m), window.addEventListener("blog:close-search", _), () => {
|
|
1073
|
+
window.removeEventListener("blog:open-search", m), window.removeEventListener("blog:close-search", _);
|
|
1029
1074
|
};
|
|
1030
1075
|
}, []);
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1076
|
+
const W = (m) => {
|
|
1077
|
+
m.key === "ArrowDown" ? (m.preventDefault(), p((_) => Math.min(_ + 1, l.length - 1))) : m.key === "ArrowUp" ? (m.preventDefault(), p((_) => Math.max(_ - 1, 0))) : m.key === "Enter" && l[g] && (m.preventDefault(), F(l[g].slug));
|
|
1033
1078
|
};
|
|
1034
|
-
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1079
|
+
D(() => {
|
|
1080
|
+
const m = (_) => {
|
|
1081
|
+
$.current && !$.current.contains(_.target) && (c(!1), i(""));
|
|
1037
1082
|
};
|
|
1038
|
-
return
|
|
1039
|
-
}, [
|
|
1040
|
-
const
|
|
1041
|
-
const
|
|
1042
|
-
o(`${
|
|
1083
|
+
return r && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
1084
|
+
}, [r]);
|
|
1085
|
+
const F = (m) => {
|
|
1086
|
+
const _ = s.basePath || "";
|
|
1087
|
+
o.push(`${_}/${e}/${m}`), c(!1), i("");
|
|
1043
1088
|
};
|
|
1044
|
-
return /* @__PURE__ */
|
|
1045
|
-
/* @__PURE__ */
|
|
1089
|
+
return /* @__PURE__ */ h(X, { children: [
|
|
1090
|
+
/* @__PURE__ */ h(
|
|
1046
1091
|
"button",
|
|
1047
1092
|
{
|
|
1048
1093
|
type: "button",
|
|
1049
1094
|
className: L.searchButton,
|
|
1050
1095
|
onClick: () => {
|
|
1051
|
-
|
|
1052
|
-
var
|
|
1053
|
-
return (
|
|
1096
|
+
c(!0), setTimeout(() => {
|
|
1097
|
+
var m;
|
|
1098
|
+
return (m = k.current) == null ? void 0 : m.focus();
|
|
1054
1099
|
}, 100);
|
|
1055
1100
|
},
|
|
1056
1101
|
"aria-label": n("ui.search"),
|
|
1057
1102
|
children: [
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */
|
|
1103
|
+
/* @__PURE__ */ t(We, { className: L.searchIcon }),
|
|
1104
|
+
/* @__PURE__ */ t("span", { className: L.searchHint, children: n("ui.search") }),
|
|
1105
|
+
/* @__PURE__ */ t("kbd", { className: L.kbd, children: I })
|
|
1061
1106
|
]
|
|
1062
1107
|
}
|
|
1063
1108
|
),
|
|
1064
|
-
|
|
1065
|
-
/* @__PURE__ */
|
|
1109
|
+
r && Ye(
|
|
1110
|
+
/* @__PURE__ */ t(
|
|
1066
1111
|
"div",
|
|
1067
1112
|
{
|
|
1068
1113
|
className: L.searchOverlay,
|
|
1069
1114
|
onClick: () => {
|
|
1070
|
-
|
|
1115
|
+
c(!1), i("");
|
|
1071
1116
|
},
|
|
1072
|
-
children: /* @__PURE__ */
|
|
1117
|
+
children: /* @__PURE__ */ h(
|
|
1073
1118
|
"div",
|
|
1074
1119
|
{
|
|
1075
1120
|
className: L.searchModal,
|
|
1076
|
-
ref:
|
|
1077
|
-
onClick: (
|
|
1121
|
+
ref: $,
|
|
1122
|
+
onClick: (m) => m.stopPropagation(),
|
|
1078
1123
|
children: [
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ h("div", { className: L.searchHeader, children: [
|
|
1125
|
+
/* @__PURE__ */ t(We, { className: L.searchIcon }),
|
|
1126
|
+
/* @__PURE__ */ t(
|
|
1082
1127
|
"input",
|
|
1083
1128
|
{
|
|
1084
|
-
ref:
|
|
1129
|
+
ref: k,
|
|
1085
1130
|
type: "text",
|
|
1086
1131
|
className: L.searchInput,
|
|
1087
1132
|
placeholder: n("ui.searchPlaceholder"),
|
|
1088
|
-
value:
|
|
1089
|
-
onChange: (
|
|
1090
|
-
onKeyDown:
|
|
1133
|
+
value: d,
|
|
1134
|
+
onChange: (m) => i(m.target.value),
|
|
1135
|
+
onKeyDown: W
|
|
1091
1136
|
}
|
|
1092
1137
|
),
|
|
1093
|
-
/* @__PURE__ */
|
|
1138
|
+
/* @__PURE__ */ t(
|
|
1094
1139
|
"button",
|
|
1095
1140
|
{
|
|
1096
1141
|
type: "button",
|
|
1097
1142
|
className: L.closeButton,
|
|
1098
1143
|
onClick: () => {
|
|
1099
|
-
|
|
1144
|
+
c(!1), i("");
|
|
1100
1145
|
},
|
|
1101
1146
|
"aria-label": "Close search",
|
|
1102
|
-
children: /* @__PURE__ */
|
|
1147
|
+
children: /* @__PURE__ */ t(Le, {})
|
|
1103
1148
|
}
|
|
1104
1149
|
)
|
|
1105
1150
|
] }),
|
|
1106
|
-
|
|
1151
|
+
d && /* @__PURE__ */ t("div", { className: L.searchResults, children: l.length === 0 ? /* @__PURE__ */ t("div", { className: L.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ t("ul", { className: L.resultsList, children: l.map((m, _) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ h(
|
|
1107
1152
|
"button",
|
|
1108
1153
|
{
|
|
1109
1154
|
type: "button",
|
|
1110
|
-
className: `${L.resultItem} ${
|
|
1111
|
-
onClick: () =>
|
|
1112
|
-
onMouseEnter: () =>
|
|
1155
|
+
className: `${L.resultItem} ${_ === g ? L.selected : ""}`,
|
|
1156
|
+
onClick: () => F(m.slug),
|
|
1157
|
+
onMouseEnter: () => p(_),
|
|
1113
1158
|
children: [
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */
|
|
1159
|
+
/* @__PURE__ */ t("div", { className: L.resultTitle, children: m.title }),
|
|
1160
|
+
/* @__PURE__ */ h("div", { className: L.resultSlug, children: [
|
|
1116
1161
|
"/",
|
|
1117
|
-
|
|
1162
|
+
m.slug
|
|
1118
1163
|
] })
|
|
1119
1164
|
]
|
|
1120
1165
|
}
|
|
1121
|
-
) },
|
|
1122
|
-
!
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1125
|
-
/* @__PURE__ */
|
|
1126
|
-
/* @__PURE__ */
|
|
1166
|
+
) }, m.slug)) }) }),
|
|
1167
|
+
!d && /* @__PURE__ */ h("div", { className: L.searchHints, children: [
|
|
1168
|
+
/* @__PURE__ */ h("div", { className: L.hint, children: [
|
|
1169
|
+
/* @__PURE__ */ t("kbd", { children: "↑" }),
|
|
1170
|
+
/* @__PURE__ */ t("kbd", { children: "↓" }),
|
|
1171
|
+
/* @__PURE__ */ t("span", { children: n("ui.searchNavigate") })
|
|
1127
1172
|
] }),
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
/* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ h("div", { className: L.hint, children: [
|
|
1174
|
+
/* @__PURE__ */ t("kbd", { children: "↵" }),
|
|
1175
|
+
/* @__PURE__ */ t("span", { children: n("ui.searchSelect") })
|
|
1131
1176
|
] }),
|
|
1132
|
-
/* @__PURE__ */
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ h("div", { className: L.hint, children: [
|
|
1178
|
+
/* @__PURE__ */ t("kbd", { children: "esc" }),
|
|
1179
|
+
/* @__PURE__ */ t("span", { children: n("ui.searchClose") })
|
|
1135
1180
|
] })
|
|
1136
1181
|
] })
|
|
1137
1182
|
]
|
|
@@ -1143,608 +1188,626 @@ function ta({ language: t }) {
|
|
|
1143
1188
|
)
|
|
1144
1189
|
] });
|
|
1145
1190
|
}
|
|
1146
|
-
const
|
|
1147
|
-
header:
|
|
1148
|
-
container:
|
|
1149
|
-
content:
|
|
1150
|
-
leftSection:
|
|
1151
|
-
mobileMenuButton:
|
|
1152
|
-
burgerIcon:
|
|
1153
|
-
logo:
|
|
1154
|
-
nav:
|
|
1155
|
-
navLink:
|
|
1156
|
-
externalIcon:
|
|
1157
|
-
supportDropdown:
|
|
1158
|
-
themeDropdown:
|
|
1159
|
-
themeButton:
|
|
1160
|
-
themeIcon:
|
|
1161
|
-
supportButton:
|
|
1162
|
-
caretIcon:
|
|
1163
|
-
dropdownMenu:
|
|
1164
|
-
dropdownItem:
|
|
1165
|
-
dropdownIcon:
|
|
1191
|
+
const fa = "_header_ztexv_1", va = "_container_ztexv_24", ba = "_content_ztexv_36", wa = "_leftSection_ztexv_43", ka = "_mobileMenuButton_ztexv_49", Na = "_burgerIcon_ztexv_87", $a = "_logo_ztexv_92", Ia = "_nav_ztexv_98", Ca = "_navLink_ztexv_109", Ta = "_externalIcon_ztexv_135", ya = "_supportDropdown_ztexv_141", xa = "_themeDropdown_ztexv_145", La = "_themeButton_ztexv_149", Sa = "_themeIcon_ztexv_171", Pa = "_supportButton_ztexv_177", Ma = "_caretIcon_ztexv_198", Da = "_dropdownMenu_ztexv_208", Ba = "_dropdownItem_ztexv_221", Ea = "_dropdownIcon_ztexv_244", y = {
|
|
1192
|
+
header: fa,
|
|
1193
|
+
container: va,
|
|
1194
|
+
content: ba,
|
|
1195
|
+
leftSection: wa,
|
|
1196
|
+
mobileMenuButton: ka,
|
|
1197
|
+
burgerIcon: Na,
|
|
1198
|
+
logo: $a,
|
|
1199
|
+
nav: Ia,
|
|
1200
|
+
navLink: Ca,
|
|
1201
|
+
externalIcon: Ta,
|
|
1202
|
+
supportDropdown: ya,
|
|
1203
|
+
themeDropdown: xa,
|
|
1204
|
+
themeButton: La,
|
|
1205
|
+
themeIcon: Sa,
|
|
1206
|
+
supportButton: Pa,
|
|
1207
|
+
caretIcon: Ma,
|
|
1208
|
+
dropdownMenu: Da,
|
|
1209
|
+
dropdownItem: Ba,
|
|
1210
|
+
dropdownIcon: Ea
|
|
1166
1211
|
};
|
|
1167
|
-
function
|
|
1168
|
-
const { t: n, i18n: o } =
|
|
1169
|
-
return
|
|
1170
|
-
const
|
|
1171
|
-
v.current && !v.current.contains(
|
|
1212
|
+
function za({ onMobileMenuToggle: e }) {
|
|
1213
|
+
const { t: n, i18n: o } = z(), { config: s } = R(), a = s.header ?? {}, r = a.navLinks ?? [], c = a.dropdownItems ?? [], [d, i] = T(!1), [l, u] = T(!1), { theme: g, setTheme: p, isMounted: b } = Zt(), v = Y(null), k = Y(null), $ = b ? { light: je, dark: Fe, system: Ne }[g] : Ne;
|
|
1214
|
+
return D(() => {
|
|
1215
|
+
const N = (I) => {
|
|
1216
|
+
v.current && !v.current.contains(I.target) && i(!1), k.current && !k.current.contains(I.target) && u(!1);
|
|
1172
1217
|
};
|
|
1173
|
-
return document.addEventListener("mousedown",
|
|
1174
|
-
}, []), /* @__PURE__ */
|
|
1175
|
-
/* @__PURE__ */
|
|
1176
|
-
/* @__PURE__ */
|
|
1218
|
+
return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
1219
|
+
}, []), /* @__PURE__ */ t("header", { className: y.header, children: /* @__PURE__ */ t("div", { className: y.container, children: /* @__PURE__ */ h("div", { className: y.content, children: [
|
|
1220
|
+
/* @__PURE__ */ h("div", { className: y.leftSection, children: [
|
|
1221
|
+
/* @__PURE__ */ t(
|
|
1177
1222
|
"button",
|
|
1178
1223
|
{
|
|
1179
1224
|
type: "button",
|
|
1180
|
-
className:
|
|
1181
|
-
onClick:
|
|
1225
|
+
className: y.mobileMenuButton,
|
|
1226
|
+
onClick: e,
|
|
1182
1227
|
"aria-label": "Open menu",
|
|
1183
|
-
children: /* @__PURE__ */
|
|
1228
|
+
children: /* @__PURE__ */ t(ut, { className: y.burgerIcon })
|
|
1184
1229
|
}
|
|
1185
1230
|
),
|
|
1186
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ t("div", { className: y.logo })
|
|
1187
1232
|
] }),
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ h("nav", { className: y.nav, children: [
|
|
1234
|
+
/* @__PURE__ */ t(pa, { language: o.language }),
|
|
1235
|
+
/* @__PURE__ */ h("div", { className: y.themeDropdown, ref: k, children: [
|
|
1236
|
+
/* @__PURE__ */ h(
|
|
1192
1237
|
"button",
|
|
1193
1238
|
{
|
|
1194
1239
|
type: "button",
|
|
1195
|
-
className:
|
|
1196
|
-
onClick: () =>
|
|
1197
|
-
"aria-expanded":
|
|
1240
|
+
className: y.themeButton,
|
|
1241
|
+
onClick: () => u(!l),
|
|
1242
|
+
"aria-expanded": l,
|
|
1198
1243
|
"aria-haspopup": "true",
|
|
1199
1244
|
"aria-label": n("ui.theme"),
|
|
1200
1245
|
children: [
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
f === "system" && /* @__PURE__ */ e(Re, { className: C.themeIcon }),
|
|
1204
|
-
/* @__PURE__ */ e(fe, { className: C.caretIcon })
|
|
1246
|
+
/* @__PURE__ */ t($, { className: y.themeIcon }),
|
|
1247
|
+
/* @__PURE__ */ t(Ce, { className: y.caretIcon })
|
|
1205
1248
|
]
|
|
1206
1249
|
}
|
|
1207
1250
|
),
|
|
1208
|
-
|
|
1209
|
-
/* @__PURE__ */
|
|
1251
|
+
l && /* @__PURE__ */ h("div", { className: y.dropdownMenu, children: [
|
|
1252
|
+
/* @__PURE__ */ h(
|
|
1210
1253
|
"button",
|
|
1211
1254
|
{
|
|
1212
1255
|
type: "button",
|
|
1213
1256
|
onClick: () => {
|
|
1214
|
-
|
|
1257
|
+
p("light"), u(!1);
|
|
1215
1258
|
},
|
|
1216
|
-
className:
|
|
1259
|
+
className: y.dropdownItem,
|
|
1217
1260
|
children: [
|
|
1218
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ t(je, { className: y.dropdownIcon }),
|
|
1219
1262
|
n("ui.light")
|
|
1220
1263
|
]
|
|
1221
1264
|
}
|
|
1222
1265
|
),
|
|
1223
|
-
/* @__PURE__ */
|
|
1266
|
+
/* @__PURE__ */ h(
|
|
1224
1267
|
"button",
|
|
1225
1268
|
{
|
|
1226
1269
|
type: "button",
|
|
1227
1270
|
onClick: () => {
|
|
1228
|
-
|
|
1271
|
+
p("dark"), u(!1);
|
|
1229
1272
|
},
|
|
1230
|
-
className:
|
|
1273
|
+
className: y.dropdownItem,
|
|
1231
1274
|
children: [
|
|
1232
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ t(Fe, { className: y.dropdownIcon }),
|
|
1233
1276
|
n("ui.dark")
|
|
1234
1277
|
]
|
|
1235
1278
|
}
|
|
1236
1279
|
),
|
|
1237
|
-
/* @__PURE__ */
|
|
1280
|
+
/* @__PURE__ */ h(
|
|
1238
1281
|
"button",
|
|
1239
1282
|
{
|
|
1240
1283
|
type: "button",
|
|
1241
1284
|
onClick: () => {
|
|
1242
|
-
|
|
1285
|
+
p("system"), u(!1);
|
|
1243
1286
|
},
|
|
1244
|
-
className:
|
|
1287
|
+
className: y.dropdownItem,
|
|
1245
1288
|
children: [
|
|
1246
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ t(Ne, { className: y.dropdownIcon }),
|
|
1247
1290
|
n("ui.system")
|
|
1248
1291
|
]
|
|
1249
1292
|
}
|
|
1250
1293
|
)
|
|
1251
1294
|
] })
|
|
1252
1295
|
] }),
|
|
1253
|
-
|
|
1254
|
-
/* @__PURE__ */
|
|
1296
|
+
c.length > 0 && /* @__PURE__ */ h("div", { className: y.supportDropdown, ref: v, children: [
|
|
1297
|
+
/* @__PURE__ */ h(
|
|
1255
1298
|
"button",
|
|
1256
1299
|
{
|
|
1257
1300
|
type: "button",
|
|
1258
|
-
className:
|
|
1259
|
-
onClick: () =>
|
|
1260
|
-
"aria-expanded":
|
|
1301
|
+
className: y.supportButton,
|
|
1302
|
+
onClick: () => i(!d),
|
|
1303
|
+
"aria-expanded": d,
|
|
1261
1304
|
"aria-haspopup": "true",
|
|
1262
1305
|
children: [
|
|
1263
1306
|
n("ui.support"),
|
|
1264
|
-
/* @__PURE__ */
|
|
1307
|
+
/* @__PURE__ */ t(Ce, { className: y.caretIcon })
|
|
1265
1308
|
]
|
|
1266
1309
|
}
|
|
1267
1310
|
),
|
|
1268
|
-
|
|
1269
|
-
const
|
|
1270
|
-
return /* @__PURE__ */
|
|
1311
|
+
d && /* @__PURE__ */ t("div", { className: y.dropdownMenu, children: c.map((N, I) => {
|
|
1312
|
+
const W = N.target ?? (N.url.startsWith("http") ? "_blank" : "_self"), F = N.rel ?? (W === "_blank" ? "noopener noreferrer" : void 0), m = N.icon;
|
|
1313
|
+
return /* @__PURE__ */ h(
|
|
1271
1314
|
"a",
|
|
1272
1315
|
{
|
|
1273
|
-
href:
|
|
1274
|
-
target:
|
|
1275
|
-
rel:
|
|
1276
|
-
className:
|
|
1316
|
+
href: N.url,
|
|
1317
|
+
target: W,
|
|
1318
|
+
rel: F,
|
|
1319
|
+
className: y.dropdownItem,
|
|
1277
1320
|
children: [
|
|
1278
|
-
|
|
1279
|
-
|
|
1321
|
+
m && /* @__PURE__ */ t(m, { className: y.dropdownIcon }),
|
|
1322
|
+
N.label
|
|
1280
1323
|
]
|
|
1281
1324
|
},
|
|
1282
|
-
|
|
1325
|
+
I
|
|
1283
1326
|
);
|
|
1284
1327
|
}) })
|
|
1285
1328
|
] }),
|
|
1286
|
-
|
|
1287
|
-
const
|
|
1288
|
-
return /* @__PURE__ */
|
|
1329
|
+
r.map((N, I) => {
|
|
1330
|
+
const W = N.target ?? (typeof N.url == "string" && N.url.startsWith("http") ? "_blank" : "_self"), F = N.rel ?? (W === "_blank" ? "noopener noreferrer" : void 0), m = N.icon;
|
|
1331
|
+
return /* @__PURE__ */ h(
|
|
1289
1332
|
"a",
|
|
1290
1333
|
{
|
|
1291
|
-
href:
|
|
1292
|
-
target:
|
|
1293
|
-
rel:
|
|
1294
|
-
className:
|
|
1334
|
+
href: N.url,
|
|
1335
|
+
target: W,
|
|
1336
|
+
rel: F,
|
|
1337
|
+
className: N.className ?? y.navLink,
|
|
1295
1338
|
children: [
|
|
1296
|
-
|
|
1297
|
-
|
|
1339
|
+
N.label,
|
|
1340
|
+
m && /* @__PURE__ */ t(m, { className: y.externalIcon })
|
|
1298
1341
|
]
|
|
1299
1342
|
},
|
|
1300
|
-
|
|
1343
|
+
I
|
|
1301
1344
|
);
|
|
1302
1345
|
})
|
|
1303
1346
|
] })
|
|
1304
1347
|
] }) }) });
|
|
1305
1348
|
}
|
|
1306
|
-
function
|
|
1307
|
-
styles:
|
|
1349
|
+
function Se({
|
|
1350
|
+
styles: e,
|
|
1308
1351
|
onLanguageChange: n
|
|
1309
1352
|
}) {
|
|
1310
|
-
const { i18n: o } =
|
|
1311
|
-
const
|
|
1312
|
-
let
|
|
1313
|
-
|
|
1314
|
-
const
|
|
1315
|
-
let
|
|
1316
|
-
|
|
1317
|
-
const I = w + a.search + a.hash;
|
|
1318
|
-
o.changeLanguage(g), s(I), m(!1), n == null || n();
|
|
1353
|
+
const { i18n: o } = z(), s = J(), a = U(), { config: r } = R(), [c, d] = T(!1), i = Y(null), l = o.language, u = (p) => {
|
|
1354
|
+
const b = r.basePath || "";
|
|
1355
|
+
let v = s || "";
|
|
1356
|
+
b && v.startsWith(b) && (v = v.slice(b.length));
|
|
1357
|
+
const k = v.split("/").filter(Boolean), $ = k[0];
|
|
1358
|
+
let N = "";
|
|
1359
|
+
r.supportedLanguages.includes($) ? (k[0] = p, N = `${b}/${k.join("/")}`) : N = `${b}/${p}${v}`, o.changeLanguage(p), a.push(N), d(!1), n == null || n();
|
|
1319
1360
|
};
|
|
1320
|
-
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1361
|
+
D(() => {
|
|
1362
|
+
const p = (b) => {
|
|
1363
|
+
i.current && !i.current.contains(b.target) && d(!1);
|
|
1323
1364
|
};
|
|
1324
|
-
return document.addEventListener("mousedown",
|
|
1365
|
+
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
1325
1366
|
}, []);
|
|
1326
|
-
const
|
|
1327
|
-
return /* @__PURE__ */
|
|
1328
|
-
/* @__PURE__ */
|
|
1367
|
+
const g = (p) => o.getFixedT(p)("language") || p;
|
|
1368
|
+
return /* @__PURE__ */ h("div", { className: e.languageSelect, ref: i, children: [
|
|
1369
|
+
/* @__PURE__ */ h(
|
|
1329
1370
|
"button",
|
|
1330
1371
|
{
|
|
1331
1372
|
type: "button",
|
|
1332
|
-
className:
|
|
1333
|
-
onClick: () =>
|
|
1334
|
-
"aria-expanded":
|
|
1373
|
+
className: e.languageButton,
|
|
1374
|
+
onClick: () => d(!c),
|
|
1375
|
+
"aria-expanded": c,
|
|
1335
1376
|
"aria-haspopup": "listbox",
|
|
1336
1377
|
children: [
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
|
|
1339
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ t(ht, { className: e.icon }),
|
|
1379
|
+
g(l),
|
|
1380
|
+
/* @__PURE__ */ t(Ce, { className: e.chevron })
|
|
1340
1381
|
]
|
|
1341
1382
|
}
|
|
1342
1383
|
),
|
|
1343
|
-
|
|
1384
|
+
c && /* @__PURE__ */ t("div", { className: e.languageDropdown, role: "listbox", children: r.supportedLanguages.map((p) => /* @__PURE__ */ t(
|
|
1344
1385
|
"button",
|
|
1345
1386
|
{
|
|
1346
1387
|
type: "button",
|
|
1347
|
-
className: `${
|
|
1348
|
-
onClick: () =>
|
|
1388
|
+
className: `${e.languageOption} ${p === l ? e.selected : ""}`,
|
|
1389
|
+
onClick: () => u(p),
|
|
1349
1390
|
role: "option",
|
|
1350
|
-
"aria-selected":
|
|
1351
|
-
children:
|
|
1391
|
+
"aria-selected": p === l,
|
|
1392
|
+
children: g(p)
|
|
1352
1393
|
},
|
|
1353
|
-
|
|
1394
|
+
p
|
|
1354
1395
|
)) })
|
|
1355
1396
|
] });
|
|
1356
1397
|
}
|
|
1357
|
-
function
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
(
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
);
|
|
1368
|
-
m(_);
|
|
1369
|
-
const w = _.reduce(
|
|
1370
|
-
(I, D, z) => {
|
|
1371
|
-
if (se(D)) {
|
|
1372
|
-
const k = s.navigationData[z], $ = "items" in k && k.defaultOpen === !0;
|
|
1373
|
-
I[D.title] = $;
|
|
1374
|
-
}
|
|
1375
|
-
return I;
|
|
1376
|
-
},
|
|
1377
|
-
{}
|
|
1378
|
-
);
|
|
1379
|
-
u(w);
|
|
1380
|
-
} catch (_) {
|
|
1381
|
-
console.error("Failed to load navigation data:", _);
|
|
1398
|
+
function Pe({ styles: e, onLinkClick: n }) {
|
|
1399
|
+
var W, F;
|
|
1400
|
+
const { i18n: o } = z(), s = J(), { config: a, loadContent: r } = R(), [c, d] = T([]), [i, l] = T(
|
|
1401
|
+
!!((W = a.navigationData) != null && W.length)
|
|
1402
|
+
), [u, g] = T(
|
|
1403
|
+
a.navigationData ? a.navigationData.reduce(
|
|
1404
|
+
(m, _) => {
|
|
1405
|
+
if ("items" in _) {
|
|
1406
|
+
const w = _.defaultOpen === !0, S = o.getFixedT(o.language)(_.title) || _.title;
|
|
1407
|
+
m[S] = w;
|
|
1382
1408
|
}
|
|
1409
|
+
return m;
|
|
1410
|
+
},
|
|
1411
|
+
{}
|
|
1412
|
+
) : {}
|
|
1413
|
+
), p = Y(
|
|
1414
|
+
/* @__PURE__ */ new Map()
|
|
1415
|
+
), b = o.language;
|
|
1416
|
+
D(() => {
|
|
1417
|
+
(async () => {
|
|
1418
|
+
if (!a.navigationData) return;
|
|
1419
|
+
l(!0);
|
|
1420
|
+
const _ = b;
|
|
1421
|
+
if (p.current.has(_)) {
|
|
1422
|
+
const w = p.current.get(_);
|
|
1423
|
+
d(w), v(w), l(!1);
|
|
1424
|
+
return;
|
|
1425
|
+
}
|
|
1426
|
+
try {
|
|
1427
|
+
const w = await ie(
|
|
1428
|
+
a.navigationData,
|
|
1429
|
+
b,
|
|
1430
|
+
r
|
|
1431
|
+
);
|
|
1432
|
+
p.current.set(_, w), d(w), v(w), l(!1);
|
|
1433
|
+
} catch (w) {
|
|
1434
|
+
console.error("Failed to load navigation data:", w), l(!1);
|
|
1435
|
+
}
|
|
1383
1436
|
})();
|
|
1384
|
-
}, [
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1437
|
+
}, [b, a.navigationData, r]);
|
|
1438
|
+
const v = (m) => {
|
|
1439
|
+
const _ = m.reduce(
|
|
1440
|
+
(w, S, H) => {
|
|
1441
|
+
if (oe(S)) {
|
|
1442
|
+
const se = a.navigationData[H], de = "items" in se && se.defaultOpen === !0;
|
|
1443
|
+
w[S.title] = de;
|
|
1444
|
+
}
|
|
1445
|
+
return w;
|
|
1446
|
+
},
|
|
1447
|
+
{}
|
|
1448
|
+
);
|
|
1449
|
+
g(_);
|
|
1450
|
+
}, k = (m) => {
|
|
1451
|
+
g((_) => ({
|
|
1387
1452
|
..._,
|
|
1388
|
-
[
|
|
1453
|
+
[m]: !_[m]
|
|
1389
1454
|
}));
|
|
1390
|
-
},
|
|
1391
|
-
const _ =
|
|
1392
|
-
let w =
|
|
1455
|
+
}, $ = (m) => {
|
|
1456
|
+
const _ = a.basePath || "";
|
|
1457
|
+
let w = s || "";
|
|
1393
1458
|
_ && w.startsWith(_) && (w = w.slice(_.length));
|
|
1394
|
-
const
|
|
1395
|
-
return
|
|
1396
|
-
},
|
|
1397
|
-
const _ =
|
|
1398
|
-
let w =
|
|
1459
|
+
const S = w.split("/").filter(Boolean);
|
|
1460
|
+
return S[S.length - 1] === m;
|
|
1461
|
+
}, N = (m) => {
|
|
1462
|
+
const _ = a.basePath || "";
|
|
1463
|
+
let w = s || "";
|
|
1399
1464
|
_ && w.startsWith(_) && (w = w.slice(_.length));
|
|
1400
|
-
const
|
|
1401
|
-
return
|
|
1402
|
-
},
|
|
1465
|
+
const S = w.split("/").filter(Boolean);
|
|
1466
|
+
return S[0] && a.supportedLanguages.includes(S[0]) ? `${_}/${S[0]}/${m}` : `${_}/${b}/${m}`;
|
|
1467
|
+
}, I = () => {
|
|
1403
1468
|
n == null || n();
|
|
1404
1469
|
};
|
|
1405
|
-
return
|
|
1406
|
-
|
|
1470
|
+
return i && ((F = a.navigationData) != null && F.length) ? /* @__PURE__ */ t("div", { className: e.navigation, "aria-hidden": "true", children: a.navigationData.map((m, _) => {
|
|
1471
|
+
if ("items" in m) {
|
|
1472
|
+
const w = m.items.slice(0, Math.min(m.items.length, 4));
|
|
1473
|
+
return /* @__PURE__ */ h("div", { className: e.section, children: [
|
|
1474
|
+
/* @__PURE__ */ t(
|
|
1475
|
+
"div",
|
|
1476
|
+
{
|
|
1477
|
+
className: `${e.skeletonSectionTitle} ${e.skeletonPulse}`
|
|
1478
|
+
}
|
|
1479
|
+
),
|
|
1480
|
+
/* @__PURE__ */ t("div", { className: e.sectionItems, children: w.map((S, H) => /* @__PURE__ */ t(
|
|
1481
|
+
"div",
|
|
1482
|
+
{
|
|
1483
|
+
className: `${e.skeletonItem} ${e.skeletonPulse}`
|
|
1484
|
+
},
|
|
1485
|
+
`s-${_}-${H}`
|
|
1486
|
+
)) })
|
|
1487
|
+
] }, `s-${_}`);
|
|
1488
|
+
}
|
|
1489
|
+
return /* @__PURE__ */ t(
|
|
1490
|
+
"div",
|
|
1491
|
+
{
|
|
1492
|
+
className: `${e.skeletonItem} ${e.skeletonPulse}`
|
|
1493
|
+
},
|
|
1494
|
+
`s-${_}`
|
|
1495
|
+
);
|
|
1496
|
+
}) }) : /* @__PURE__ */ t("div", { className: e.navigation, children: c.map((m) => oe(m) ? /* @__PURE__ */ h("div", { className: e.section, children: [
|
|
1497
|
+
/* @__PURE__ */ h(
|
|
1407
1498
|
"button",
|
|
1408
1499
|
{
|
|
1409
1500
|
type: "button",
|
|
1410
|
-
className: `${
|
|
1411
|
-
onClick: () =>
|
|
1501
|
+
className: `${e.sectionButton} ${u[m.title] ? e.expanded : ""}`,
|
|
1502
|
+
onClick: () => k(m.title),
|
|
1412
1503
|
children: [
|
|
1413
|
-
|
|
1414
|
-
/* @__PURE__ */
|
|
1504
|
+
m.title,
|
|
1505
|
+
/* @__PURE__ */ t(Qe, { className: e.icon })
|
|
1415
1506
|
]
|
|
1416
1507
|
}
|
|
1417
1508
|
),
|
|
1418
|
-
|
|
1419
|
-
|
|
1509
|
+
u[m.title] && /* @__PURE__ */ t("div", { className: e.sectionItems, children: m.items.map((_) => /* @__PURE__ */ t(
|
|
1510
|
+
re,
|
|
1420
1511
|
{
|
|
1421
|
-
|
|
1422
|
-
className: `${
|
|
1423
|
-
onClick:
|
|
1424
|
-
children: /* @__PURE__ */
|
|
1512
|
+
href: N(_.slug),
|
|
1513
|
+
className: `${e.navItem} ${$(_.slug) ? e.active : ""}`,
|
|
1514
|
+
onClick: I,
|
|
1515
|
+
children: /* @__PURE__ */ t("div", { className: e.navItemContent, children: /* @__PURE__ */ t("span", { className: e.navItemTitle, children: _.title }) })
|
|
1425
1516
|
},
|
|
1426
1517
|
_.slug
|
|
1427
1518
|
)) })
|
|
1428
|
-
] },
|
|
1429
|
-
|
|
1519
|
+
] }, m.title) : /* @__PURE__ */ t(
|
|
1520
|
+
re,
|
|
1430
1521
|
{
|
|
1431
|
-
|
|
1432
|
-
className: `${
|
|
1433
|
-
onClick:
|
|
1434
|
-
children: /* @__PURE__ */
|
|
1522
|
+
href: N(m.slug),
|
|
1523
|
+
className: `${e.navItem} ${$(m.slug) ? e.active : ""}`,
|
|
1524
|
+
onClick: I,
|
|
1525
|
+
children: /* @__PURE__ */ t("div", { className: e.navItemContent, children: /* @__PURE__ */ t("span", { className: e.navItemTitle, children: m.title }) })
|
|
1435
1526
|
},
|
|
1436
|
-
|
|
1527
|
+
m.slug
|
|
1437
1528
|
)) });
|
|
1438
1529
|
}
|
|
1439
|
-
function
|
|
1440
|
-
styles:
|
|
1530
|
+
function ps({
|
|
1531
|
+
styles: e,
|
|
1441
1532
|
onLinkClick: n,
|
|
1442
1533
|
onLanguageChange: o
|
|
1443
1534
|
}) {
|
|
1444
|
-
return /* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1535
|
+
return /* @__PURE__ */ h(X, { children: [
|
|
1536
|
+
/* @__PURE__ */ t(Se, { styles: e, onLanguageChange: o }),
|
|
1537
|
+
/* @__PURE__ */ t(Pe, { styles: e, onLinkClick: n })
|
|
1447
1538
|
] });
|
|
1448
1539
|
}
|
|
1449
|
-
const
|
|
1450
|
-
backdrop:
|
|
1451
|
-
open:
|
|
1452
|
-
mobileMenu:
|
|
1453
|
-
header:
|
|
1454
|
-
brand:
|
|
1455
|
-
cloudIcon:
|
|
1456
|
-
title:
|
|
1457
|
-
closeButton:
|
|
1458
|
-
closeIcon:
|
|
1459
|
-
languageSection:
|
|
1460
|
-
languageSelect:
|
|
1461
|
-
languageButton:
|
|
1462
|
-
icon:
|
|
1463
|
-
chevron:
|
|
1464
|
-
languageDropdown:
|
|
1465
|
-
languageOption:
|
|
1466
|
-
selected:
|
|
1467
|
-
scrollArea:
|
|
1468
|
-
navigation:
|
|
1469
|
-
section:
|
|
1470
|
-
sectionButton:
|
|
1471
|
-
expanded:
|
|
1472
|
-
sectionItems:
|
|
1473
|
-
navItem:
|
|
1474
|
-
active:
|
|
1475
|
-
navItemContent:
|
|
1476
|
-
navItemTitle:
|
|
1540
|
+
const Aa = "_backdrop_1a7pu_1", Oa = "_open_1a7pu_13", Ra = "_mobileMenu_1a7pu_18", Ha = "_header_1a7pu_37", Wa = "_brand_1a7pu_46", Fa = "_cloudIcon_1a7pu_53", ja = "_title_1a7pu_62", Ka = "_closeButton_1a7pu_69", Ua = "_closeIcon_1a7pu_101", qa = "_languageSection_1a7pu_106", Ga = "_languageSelect_1a7pu_112", Xa = "_languageButton_1a7pu_117", Qa = "_icon_1a7pu_156", Ya = "_chevron_1a7pu_162", Ja = "_languageDropdown_1a7pu_172", Va = "_languageOption_1a7pu_185", Za = "_selected_1a7pu_226", eo = "_scrollArea_1a7pu_231", to = "_navigation_1a7pu_237", no = "_section_1a7pu_241", ao = "_sectionButton_1a7pu_245", oo = "_expanded_1a7pu_285", so = "_sectionItems_1a7pu_289", co = "_navItem_1a7pu_297", ro = "_active_1a7pu_310", lo = "_navItemContent_1a7pu_316", io = "_navItemTitle_1a7pu_322", O = {
|
|
1541
|
+
backdrop: Aa,
|
|
1542
|
+
open: Oa,
|
|
1543
|
+
mobileMenu: Ra,
|
|
1544
|
+
header: Ha,
|
|
1545
|
+
brand: Wa,
|
|
1546
|
+
cloudIcon: Fa,
|
|
1547
|
+
title: ja,
|
|
1548
|
+
closeButton: Ka,
|
|
1549
|
+
closeIcon: Ua,
|
|
1550
|
+
languageSection: qa,
|
|
1551
|
+
languageSelect: Ga,
|
|
1552
|
+
languageButton: Xa,
|
|
1553
|
+
icon: Qa,
|
|
1554
|
+
chevron: Ya,
|
|
1555
|
+
languageDropdown: Ja,
|
|
1556
|
+
languageOption: Va,
|
|
1557
|
+
selected: Za,
|
|
1558
|
+
scrollArea: eo,
|
|
1559
|
+
navigation: to,
|
|
1560
|
+
section: no,
|
|
1561
|
+
sectionButton: ao,
|
|
1562
|
+
expanded: oo,
|
|
1563
|
+
sectionItems: so,
|
|
1564
|
+
navItem: co,
|
|
1565
|
+
active: ro,
|
|
1566
|
+
navItemContent: lo,
|
|
1567
|
+
navItemTitle: io
|
|
1477
1568
|
};
|
|
1478
|
-
function
|
|
1479
|
-
const { config: o } = R(),
|
|
1480
|
-
return
|
|
1569
|
+
function uo({ isOpen: e, onClose: n }) {
|
|
1570
|
+
const { config: o } = R(), s = o.logo;
|
|
1571
|
+
return D(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
1481
1572
|
document.body.style.overflow = "unset";
|
|
1482
|
-
}), [
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1573
|
+
}), [e]), D(() => {
|
|
1574
|
+
const a = (r) => {
|
|
1575
|
+
r.key === "Escape" && e && n();
|
|
1485
1576
|
};
|
|
1486
|
-
return document.addEventListener("keydown",
|
|
1487
|
-
}, [
|
|
1488
|
-
/* @__PURE__ */
|
|
1577
|
+
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
1578
|
+
}, [e, n]), /* @__PURE__ */ h(X, { children: [
|
|
1579
|
+
/* @__PURE__ */ t(
|
|
1489
1580
|
"div",
|
|
1490
1581
|
{
|
|
1491
|
-
className: `${
|
|
1582
|
+
className: `${O.backdrop} ${e ? O.open : ""}`,
|
|
1492
1583
|
onClick: n
|
|
1493
1584
|
}
|
|
1494
1585
|
),
|
|
1495
|
-
/* @__PURE__ */
|
|
1496
|
-
/* @__PURE__ */
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
|
|
1499
|
-
/* @__PURE__ */
|
|
1586
|
+
/* @__PURE__ */ h("div", { className: `${O.mobileMenu} ${e ? O.open : ""}`, children: [
|
|
1587
|
+
/* @__PURE__ */ h("div", { className: O.header, children: [
|
|
1588
|
+
/* @__PURE__ */ h("div", { className: O.brand, children: [
|
|
1589
|
+
s && /* @__PURE__ */ t(s, { className: O.cloudIcon }),
|
|
1590
|
+
/* @__PURE__ */ t("h1", { className: O.title, children: o.title })
|
|
1500
1591
|
] }),
|
|
1501
|
-
/* @__PURE__ */
|
|
1592
|
+
/* @__PURE__ */ t(
|
|
1502
1593
|
"button",
|
|
1503
1594
|
{
|
|
1504
1595
|
type: "button",
|
|
1505
|
-
className:
|
|
1596
|
+
className: O.closeButton,
|
|
1506
1597
|
onClick: n,
|
|
1507
1598
|
"aria-label": "Close menu",
|
|
1508
|
-
children: /* @__PURE__ */
|
|
1599
|
+
children: /* @__PURE__ */ t(Le, { className: O.closeIcon })
|
|
1509
1600
|
}
|
|
1510
1601
|
)
|
|
1511
1602
|
] }),
|
|
1512
|
-
/* @__PURE__ */
|
|
1513
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ t("div", { className: O.languageSection, children: /* @__PURE__ */ t(Se, { styles: O, onLanguageChange: n }) }),
|
|
1604
|
+
/* @__PURE__ */ t("div", { className: O.scrollArea, children: /* @__PURE__ */ t(Pe, { styles: O, onLinkClick: n }) })
|
|
1514
1605
|
] })
|
|
1515
1606
|
] });
|
|
1516
1607
|
}
|
|
1517
|
-
const
|
|
1518
|
-
sidebar:
|
|
1519
|
-
header:
|
|
1520
|
-
brand:
|
|
1521
|
-
cloudIcon:
|
|
1522
|
-
title:
|
|
1523
|
-
languageSelect:
|
|
1524
|
-
languageButton:
|
|
1525
|
-
icon:
|
|
1526
|
-
chevron:
|
|
1527
|
-
languageDropdown:
|
|
1528
|
-
languageOption:
|
|
1529
|
-
selected:
|
|
1530
|
-
scrollArea:
|
|
1531
|
-
navigation:
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1608
|
+
const ho = "_sidebar_10z71_1", mo = "_header_10z71_17", _o = "_brand_10z71_29", go = "_cloudIcon_10z71_35", po = "_title_10z71_44", fo = "_languageSelect_10z71_55", vo = "_languageButton_10z71_61", bo = "_icon_10z71_99", wo = "_chevron_10z71_104", ko = "_languageDropdown_10z71_114", No = "_languageOption_10z71_128", $o = "_selected_10z71_147", Io = "_scrollArea_10z71_152", Co = "_navigation_10z71_158", To = "_skeleton-pulse_10z71_1", yo = "_skeletonSectionTitle_10z71_170", xo = "_skeletonItem_10z71_176", Lo = "_section_10z71_182", So = "_sectionButton_10z71_188", Po = "_expanded_10z71_231", Mo = "_sectionItems_10z71_235", Do = "_navItem_10z71_243", Bo = "_active_10z71_256", Eo = "_navItemContent_10z71_261", G = {
|
|
1609
|
+
sidebar: ho,
|
|
1610
|
+
header: mo,
|
|
1611
|
+
brand: _o,
|
|
1612
|
+
cloudIcon: go,
|
|
1613
|
+
title: po,
|
|
1614
|
+
languageSelect: fo,
|
|
1615
|
+
languageButton: vo,
|
|
1616
|
+
icon: bo,
|
|
1617
|
+
chevron: wo,
|
|
1618
|
+
languageDropdown: ko,
|
|
1619
|
+
languageOption: No,
|
|
1620
|
+
selected: $o,
|
|
1621
|
+
scrollArea: Io,
|
|
1622
|
+
navigation: Co,
|
|
1623
|
+
skeletonPulse: To,
|
|
1624
|
+
"skeleton-pulse": "_skeleton-pulse_10z71_1",
|
|
1625
|
+
skeletonSectionTitle: yo,
|
|
1626
|
+
skeletonItem: xo,
|
|
1627
|
+
section: Lo,
|
|
1628
|
+
sectionButton: So,
|
|
1629
|
+
expanded: Po,
|
|
1630
|
+
sectionItems: Mo,
|
|
1631
|
+
navItem: Do,
|
|
1632
|
+
active: Bo,
|
|
1633
|
+
navItemContent: Eo
|
|
1539
1634
|
};
|
|
1540
|
-
function
|
|
1541
|
-
const { config:
|
|
1542
|
-
return /* @__PURE__ */
|
|
1543
|
-
/* @__PURE__ */
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
n && /* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1635
|
+
function zo() {
|
|
1636
|
+
const { config: e } = R(), n = e.logo, o = e.supportedLanguages.length > 1;
|
|
1637
|
+
return /* @__PURE__ */ h("div", { className: G.sidebar, children: [
|
|
1638
|
+
/* @__PURE__ */ h("div", { className: G.header, children: [
|
|
1639
|
+
/* @__PURE__ */ h("div", { className: G.brand, children: [
|
|
1640
|
+
n && /* @__PURE__ */ t(n, { className: G.cloudIcon }),
|
|
1641
|
+
/* @__PURE__ */ t("div", { className: G.title, children: e.title })
|
|
1547
1642
|
] }),
|
|
1548
|
-
o && /* @__PURE__ */
|
|
1643
|
+
o && /* @__PURE__ */ t(Se, { styles: G })
|
|
1549
1644
|
] }),
|
|
1550
|
-
/* @__PURE__ */
|
|
1645
|
+
/* @__PURE__ */ t("div", { className: G.scrollArea, children: /* @__PURE__ */ t(Pe, { styles: G }) })
|
|
1551
1646
|
] });
|
|
1552
1647
|
}
|
|
1553
|
-
const
|
|
1554
|
-
app:
|
|
1555
|
-
layout:
|
|
1556
|
-
main:
|
|
1557
|
-
fullWidth:
|
|
1558
|
-
contentWrapper:
|
|
1648
|
+
const Ao = "_app_wf6ni_1", Oo = "_layout_wf6ni_9", Ro = "_main_wf6ni_15", Ho = "_fullWidth_wf6ni_21", Wo = "_contentWrapper_wf6ni_30", ae = {
|
|
1649
|
+
app: Ao,
|
|
1650
|
+
layout: Oo,
|
|
1651
|
+
main: Ro,
|
|
1652
|
+
fullWidth: Ho,
|
|
1653
|
+
contentWrapper: Wo
|
|
1559
1654
|
};
|
|
1560
|
-
function
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
}, [
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1567
|
-
},
|
|
1568
|
-
|
|
1655
|
+
function Fo({ children: e }) {
|
|
1656
|
+
const n = Xe(), o = n == null ? void 0 : n.language, { i18n: s } = z(), { config: a } = R(), r = U(), [c, d] = T(!1);
|
|
1657
|
+
D(() => {
|
|
1658
|
+
o && a.supportedLanguages.includes(o) && s.changeLanguage(o);
|
|
1659
|
+
}, [o, s, a.supportedLanguages]);
|
|
1660
|
+
const i = () => {
|
|
1661
|
+
d(!c);
|
|
1662
|
+
}, l = () => {
|
|
1663
|
+
d(!1);
|
|
1569
1664
|
};
|
|
1570
|
-
if (!
|
|
1571
|
-
return
|
|
1572
|
-
const
|
|
1573
|
-
return /* @__PURE__ */
|
|
1574
|
-
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
/* @__PURE__ */
|
|
1577
|
-
|
|
1578
|
-
/* @__PURE__ */
|
|
1665
|
+
if (!o || !a.supportedLanguages.includes(o))
|
|
1666
|
+
return r.replace("/en"), null;
|
|
1667
|
+
const u = !!a.header, g = a.showSideMenu !== !1, p = a.contentMaxWidth ? { width: "100%", maxWidth: a.contentMaxWidth } : void 0;
|
|
1668
|
+
return /* @__PURE__ */ h("div", { className: ae.app, children: [
|
|
1669
|
+
u && /* @__PURE__ */ t(za, { onMobileMenuToggle: i }),
|
|
1670
|
+
/* @__PURE__ */ t(uo, { isOpen: c, onClose: l }),
|
|
1671
|
+
/* @__PURE__ */ h("div", { className: ae.layout, children: [
|
|
1672
|
+
g && /* @__PURE__ */ t(zo, {}),
|
|
1673
|
+
/* @__PURE__ */ t(
|
|
1579
1674
|
"main",
|
|
1580
1675
|
{
|
|
1581
|
-
className: `${
|
|
1582
|
-
children: /* @__PURE__ */
|
|
1676
|
+
className: `${ae.main} ${g ? "" : ae.fullWidth}`,
|
|
1677
|
+
children: /* @__PURE__ */ t("div", { className: ae.contentWrapper, style: p, children: e })
|
|
1583
1678
|
}
|
|
1584
1679
|
)
|
|
1585
1680
|
] })
|
|
1586
1681
|
] });
|
|
1587
1682
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1683
|
+
function fs({ children: e }) {
|
|
1684
|
+
return /* @__PURE__ */ t(Fo, { children: e });
|
|
1685
|
+
}
|
|
1686
|
+
const jo = "_homePage_10e4f_1", Ko = "_header_10e4f_20", Uo = "_title_10e4f_24", qo = "_articlesList_10e4f_31", Go = "_articleCard_10e4f_37", Xo = "_articleTitle_10e4f_56", Qo = "_articleDescription_10e4f_63", Yo = "_empty_10e4f_71", Jo = "_skeletonCard_10e4f_85", Vo = "_skeletonTitle_10e4f_95", Zo = "_skeletonText_10e4f_104", es = "_skeletonMetadata_10e4f_113", B = {
|
|
1687
|
+
homePage: jo,
|
|
1688
|
+
header: Ko,
|
|
1689
|
+
title: Uo,
|
|
1690
|
+
articlesList: qo,
|
|
1691
|
+
articleCard: Go,
|
|
1692
|
+
articleTitle: Xo,
|
|
1693
|
+
articleDescription: Qo,
|
|
1694
|
+
empty: Yo,
|
|
1695
|
+
skeletonCard: Jo,
|
|
1696
|
+
skeletonTitle: Vo,
|
|
1697
|
+
skeletonText: Zo,
|
|
1698
|
+
skeletonMetadata: es
|
|
1601
1699
|
};
|
|
1602
|
-
function
|
|
1603
|
-
const { i18n:
|
|
1604
|
-
|
|
1700
|
+
function vs() {
|
|
1701
|
+
const { i18n: e, t: n } = z(), { config: o, loadContent: s } = R(), a = U(), [r, c] = T([]), [d, i] = T(!0);
|
|
1702
|
+
D(() => {
|
|
1605
1703
|
(async () => {
|
|
1606
1704
|
try {
|
|
1607
|
-
const
|
|
1608
|
-
if (
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
),
|
|
1614
|
-
for (const
|
|
1615
|
-
if (
|
|
1616
|
-
for (const
|
|
1617
|
-
|
|
1618
|
-
slug:
|
|
1619
|
-
title:
|
|
1705
|
+
const g = o.navigationData || [];
|
|
1706
|
+
if (g.length === 0) return;
|
|
1707
|
+
const p = await ie(
|
|
1708
|
+
g,
|
|
1709
|
+
e.language,
|
|
1710
|
+
s
|
|
1711
|
+
), b = [];
|
|
1712
|
+
for (const k of p)
|
|
1713
|
+
if (oe(k))
|
|
1714
|
+
for (const $ of k.items)
|
|
1715
|
+
b.push({
|
|
1716
|
+
slug: $.slug,
|
|
1717
|
+
title: $.title
|
|
1620
1718
|
});
|
|
1621
1719
|
else
|
|
1622
|
-
|
|
1623
|
-
slug:
|
|
1624
|
-
title:
|
|
1720
|
+
b.push({
|
|
1721
|
+
slug: k.slug,
|
|
1722
|
+
title: k.title
|
|
1625
1723
|
});
|
|
1626
|
-
const
|
|
1627
|
-
|
|
1724
|
+
const v = await Promise.all(
|
|
1725
|
+
b.map(async (k) => {
|
|
1628
1726
|
try {
|
|
1629
|
-
const
|
|
1727
|
+
const $ = await s(e.language, k.slug);
|
|
1630
1728
|
return {
|
|
1631
|
-
...
|
|
1632
|
-
title:
|
|
1633
|
-
date:
|
|
1634
|
-
author:
|
|
1635
|
-
description:
|
|
1729
|
+
...k,
|
|
1730
|
+
title: $.frontmatter.title || k.title,
|
|
1731
|
+
date: $.frontmatter.date,
|
|
1732
|
+
author: $.frontmatter.author,
|
|
1733
|
+
description: $.frontmatter.description
|
|
1636
1734
|
};
|
|
1637
1735
|
} catch {
|
|
1638
|
-
return
|
|
1736
|
+
return k;
|
|
1639
1737
|
}
|
|
1640
1738
|
})
|
|
1641
1739
|
);
|
|
1642
|
-
|
|
1643
|
-
} catch (
|
|
1644
|
-
console.error("Failed to load articles:",
|
|
1740
|
+
v.sort((k, $) => k.date && $.date ? new Date($.date).getTime() - new Date(k.date).getTime() : k.date ? -1 : $.date ? 1 : k.title.localeCompare($.title)), c(v.slice(0, 50));
|
|
1741
|
+
} catch (g) {
|
|
1742
|
+
console.error("Failed to load articles:", g);
|
|
1645
1743
|
} finally {
|
|
1646
|
-
|
|
1744
|
+
i(!1);
|
|
1647
1745
|
}
|
|
1648
1746
|
})();
|
|
1649
|
-
}, [
|
|
1650
|
-
const
|
|
1651
|
-
const
|
|
1652
|
-
window.scrollTo({ top: 0, left: 0, behavior: "auto" }),
|
|
1747
|
+
}, [e.language, o.navigationData, s]);
|
|
1748
|
+
const l = (u) => {
|
|
1749
|
+
const g = o.basePath || "";
|
|
1750
|
+
window.scrollTo({ top: 0, left: 0, behavior: "auto" }), a.push(`${g}/${e.language}/${u}`);
|
|
1653
1751
|
};
|
|
1654
|
-
return
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
/* @__PURE__ */
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
] },
|
|
1662
|
-
] }) :
|
|
1663
|
-
/* @__PURE__ */
|
|
1664
|
-
/* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1752
|
+
return d ? /* @__PURE__ */ h("div", { className: B.homePage, children: [
|
|
1753
|
+
/* @__PURE__ */ t("div", { className: B.header, children: /* @__PURE__ */ t("h1", { className: B.title, children: n("ui.latestPosts") }) }),
|
|
1754
|
+
/* @__PURE__ */ t("div", { className: B.articlesList, children: [...Array(5)].map((u, g) => /* @__PURE__ */ h("div", { className: B.skeletonCard, children: [
|
|
1755
|
+
/* @__PURE__ */ t("div", { className: B.skeletonTitle }),
|
|
1756
|
+
/* @__PURE__ */ t("div", { className: B.skeletonText }),
|
|
1757
|
+
/* @__PURE__ */ t("div", { className: B.skeletonText }),
|
|
1758
|
+
/* @__PURE__ */ t("div", { className: B.skeletonMetadata })
|
|
1759
|
+
] }, g)) })
|
|
1760
|
+
] }) : r.length === 0 ? /* @__PURE__ */ t("div", { className: B.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ h(X, { children: [
|
|
1761
|
+
/* @__PURE__ */ h("div", { className: B.homePage, children: [
|
|
1762
|
+
/* @__PURE__ */ t("div", { className: B.header, children: /* @__PURE__ */ t("h1", { className: B.title, children: n("ui.latestPosts") }) }),
|
|
1763
|
+
/* @__PURE__ */ t("div", { className: B.articlesList, children: r.map((u) => /* @__PURE__ */ h(
|
|
1666
1764
|
"button",
|
|
1667
1765
|
{
|
|
1668
|
-
className:
|
|
1669
|
-
onClick: () => u
|
|
1766
|
+
className: B.articleCard,
|
|
1767
|
+
onClick: () => l(u.slug),
|
|
1670
1768
|
type: "button",
|
|
1671
1769
|
children: [
|
|
1672
|
-
/* @__PURE__ */
|
|
1673
|
-
|
|
1674
|
-
/* @__PURE__ */
|
|
1770
|
+
/* @__PURE__ */ t("h2", { className: B.articleTitle, children: u.title }),
|
|
1771
|
+
u.description && /* @__PURE__ */ t("p", { className: B.articleDescription, children: u.description }),
|
|
1772
|
+
/* @__PURE__ */ t(ye, { date: u.date, author: u.author })
|
|
1675
1773
|
]
|
|
1676
1774
|
},
|
|
1677
|
-
|
|
1775
|
+
u.slug
|
|
1678
1776
|
)) })
|
|
1679
1777
|
] }),
|
|
1680
|
-
/* @__PURE__ */
|
|
1778
|
+
/* @__PURE__ */ t(Wt, {})
|
|
1681
1779
|
] });
|
|
1682
1780
|
}
|
|
1683
|
-
function Yo() {
|
|
1684
|
-
const { language: t } = be(), { config: n } = R();
|
|
1685
|
-
return /* @__PURE__ */ e(Co, { children: /* @__PURE__ */ d(Ve, { children: [
|
|
1686
|
-
/* @__PURE__ */ e(De, { path: "/:slug", element: /* @__PURE__ */ e(Rn, { language: t }) }),
|
|
1687
|
-
/* @__PURE__ */ e(
|
|
1688
|
-
De,
|
|
1689
|
-
{
|
|
1690
|
-
index: !0,
|
|
1691
|
-
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Ao, {}) : /* @__PURE__ */ e(He, { to: `./${n.defaultRoute}`, replace: !0 })
|
|
1692
|
-
}
|
|
1693
|
-
)
|
|
1694
|
-
] }) });
|
|
1695
|
-
}
|
|
1696
|
-
function Vo() {
|
|
1697
|
-
return {
|
|
1698
|
-
openSearchModal: () => {
|
|
1699
|
-
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
1700
|
-
},
|
|
1701
|
-
closeSearchModal: () => {
|
|
1702
|
-
window.dispatchEvent(new CustomEvent("blog:close-search"));
|
|
1703
|
-
}
|
|
1704
|
-
};
|
|
1705
|
-
}
|
|
1706
|
-
function Jo() {
|
|
1707
|
-
const { i18n: t } = E(), n = Y(), o = Q(), { config: a } = R();
|
|
1708
|
-
return (s) => {
|
|
1709
|
-
const c = a.basePath || "";
|
|
1710
|
-
let l = n.pathname;
|
|
1711
|
-
c && l.startsWith(c) && (l = l.slice(c.length));
|
|
1712
|
-
const m = l.split("/").filter(Boolean), h = m[0];
|
|
1713
|
-
let u = "";
|
|
1714
|
-
a.supportedLanguages.includes(h) ? (m[0] = s, u = `${c}/${m.join("/")}`) : u = `${c}/${s}${l}`;
|
|
1715
|
-
const i = u + n.search + n.hash;
|
|
1716
|
-
t.changeLanguage(s), o(i);
|
|
1717
|
-
};
|
|
1718
|
-
}
|
|
1719
1781
|
export {
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1782
|
+
kt as AdvancedModeToggle,
|
|
1783
|
+
Et as ArticleNavigation,
|
|
1784
|
+
hs as BlogProvider,
|
|
1785
|
+
Nt as BlogRoot,
|
|
1786
|
+
Wt as BlogSidebar,
|
|
1787
|
+
Xt as Breadcrumb,
|
|
1788
|
+
gs as ContentPage,
|
|
1789
|
+
Fo as DocumentationLayout,
|
|
1790
|
+
fs as DocumentationRoutes,
|
|
1791
|
+
za as Header,
|
|
1792
|
+
vs as HomePage,
|
|
1793
|
+
Se as LanguageSelector,
|
|
1794
|
+
ye as Metadata,
|
|
1795
|
+
uo as MobileMenu,
|
|
1796
|
+
ps as NavigationContent,
|
|
1797
|
+
Pe as NavigationMenu,
|
|
1798
|
+
pa as SearchBar,
|
|
1799
|
+
zo as Sidebar,
|
|
1800
|
+
wn as TableOfContents,
|
|
1801
|
+
Mn as TagResultsModal,
|
|
1802
|
+
Rn as Tags,
|
|
1803
|
+
us as createBlogUtils,
|
|
1804
|
+
Je as createContentLoaders,
|
|
1805
|
+
Te as generateHeadingId,
|
|
1806
|
+
tn as getAdjacentArticles,
|
|
1807
|
+
ie as getNavigationData,
|
|
1746
1808
|
R as useBlogConfig,
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1809
|
+
_s as useLanguageChange,
|
|
1810
|
+
ms as useSearchModal,
|
|
1811
|
+
Zt as useTheme,
|
|
1812
|
+
nn as useWindowSearchParams
|
|
1750
1813
|
};
|