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