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