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