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