@x-wave/blog 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -84
- package/consts/index.ts +0 -10
- package/index.js +1099 -1810
- package/package.json +2 -4
package/index.js
CHANGED
|
@@ -1,797 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
tabContainer: rn,
|
|
15
|
-
tab: sn,
|
|
16
|
-
active: cn
|
|
1
|
+
import { jsxs as d, jsx as e, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as E } from "react-i18next";
|
|
3
|
+
import { useLocation as Y, useNavigate as Q, Link as ue, useParams as be, Navigate as He, Routes as Ve, Route as De } from "react-router-dom";
|
|
4
|
+
import { CaretLeft as Je, CaretRight as ze, ArrowSquareOut as Ze, User as et, CalendarBlank as tt, X as ke, Tag as nt, MagnifyingGlass as Me, List as at, Sun as Be, Moon as Ee, Monitor as Re, CaretDown as fe, Globe as ot } from "@phosphor-icons/react";
|
|
5
|
+
import { useState as y, useEffect as S, createContext as st, useContext as ct, useRef as G } from "react";
|
|
6
|
+
import rt from "i18next";
|
|
7
|
+
import lt from "react-markdown";
|
|
8
|
+
import it from "remark-gfm";
|
|
9
|
+
import { createPortal as Fe } from "react-dom";
|
|
10
|
+
const dt = "_tabContainer_zk6h4_1", ut = "_tab_zk6h4_1", ht = "_active_zk6h4_45", ne = {
|
|
11
|
+
tabContainer: dt,
|
|
12
|
+
tab: ut,
|
|
13
|
+
active: ht
|
|
17
14
|
};
|
|
18
|
-
function
|
|
19
|
-
const { t } =
|
|
20
|
-
if (!
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
a(`${
|
|
15
|
+
function mt({ hasAdvanced: t }) {
|
|
16
|
+
const { t: n } = E(), o = Y(), a = Q();
|
|
17
|
+
if (!t) return null;
|
|
18
|
+
const c = new URLSearchParams(o.search).has("advanced"), l = () => {
|
|
19
|
+
if (c) {
|
|
20
|
+
const h = new URLSearchParams(o.search);
|
|
21
|
+
h.delete("advanced");
|
|
22
|
+
const u = h.toString(), i = u ? `?${u}` : "";
|
|
23
|
+
a(`${o.pathname}${i}${o.hash}`);
|
|
27
24
|
}
|
|
28
|
-
},
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
31
|
-
|
|
25
|
+
}, m = () => {
|
|
26
|
+
if (!c) {
|
|
27
|
+
const h = new URLSearchParams(o.search);
|
|
28
|
+
h.set("advanced", ""), a(`${o.pathname}?${h.toString()}${o.hash}`);
|
|
32
29
|
}
|
|
33
30
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ d("div", { className: ne.tabContainer, children: [
|
|
32
|
+
/* @__PURE__ */ e(
|
|
36
33
|
"button",
|
|
37
34
|
{
|
|
38
35
|
type: "button",
|
|
39
|
-
className: `${
|
|
40
|
-
onClick:
|
|
41
|
-
children:
|
|
36
|
+
className: `${ne.tab} ${c ? "" : ne.active}`,
|
|
37
|
+
onClick: l,
|
|
38
|
+
children: n("ui.simple")
|
|
42
39
|
}
|
|
43
40
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ e(
|
|
45
42
|
"button",
|
|
46
43
|
{
|
|
47
44
|
type: "button",
|
|
48
|
-
className: `${
|
|
49
|
-
onClick:
|
|
50
|
-
children:
|
|
45
|
+
className: `${ne.tab} ${c ? ne.active : ""}`,
|
|
46
|
+
onClick: m,
|
|
47
|
+
children: n("ui.advanced")
|
|
51
48
|
}
|
|
52
49
|
)
|
|
53
50
|
] });
|
|
54
51
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
52
|
+
function _t({ children: t }) {
|
|
53
|
+
return /* @__PURE__ */ e("div", { className: "xw-blog-root", children: t });
|
|
57
54
|
}
|
|
58
|
-
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (r.constructor !== c.constructor) return !1;
|
|
67
|
-
var d, i, l;
|
|
68
|
-
if (Array.isArray(r)) {
|
|
69
|
-
if (d = r.length, d != c.length) return !1;
|
|
70
|
-
for (i = d; i-- !== 0; )
|
|
71
|
-
if (!s(r[i], c[i])) return !1;
|
|
72
|
-
return !0;
|
|
73
|
-
}
|
|
74
|
-
var u;
|
|
75
|
-
if (t && r instanceof Map && c instanceof Map) {
|
|
76
|
-
if (r.size !== c.size) return !1;
|
|
77
|
-
for (u = r.entries(); !(i = u.next()).done; )
|
|
78
|
-
if (!c.has(i.value[0])) return !1;
|
|
79
|
-
for (u = r.entries(); !(i = u.next()).done; )
|
|
80
|
-
if (!s(i.value[1], c.get(i.value[0]))) return !1;
|
|
81
|
-
return !0;
|
|
82
|
-
}
|
|
83
|
-
if (n && r instanceof Set && c instanceof Set) {
|
|
84
|
-
if (r.size !== c.size) return !1;
|
|
85
|
-
for (u = r.entries(); !(i = u.next()).done; )
|
|
86
|
-
if (!c.has(i.value[0])) return !1;
|
|
87
|
-
return !0;
|
|
88
|
-
}
|
|
89
|
-
if (a && ArrayBuffer.isView(r) && ArrayBuffer.isView(c)) {
|
|
90
|
-
if (d = r.length, d != c.length) return !1;
|
|
91
|
-
for (i = d; i-- !== 0; )
|
|
92
|
-
if (r[i] !== c[i]) return !1;
|
|
93
|
-
return !0;
|
|
94
|
-
}
|
|
95
|
-
if (r.constructor === RegExp) return r.source === c.source && r.flags === c.flags;
|
|
96
|
-
if (r.valueOf !== Object.prototype.valueOf && typeof r.valueOf == "function" && typeof c.valueOf == "function") return r.valueOf() === c.valueOf();
|
|
97
|
-
if (r.toString !== Object.prototype.toString && typeof r.toString == "function" && typeof c.toString == "function") return r.toString() === c.toString();
|
|
98
|
-
if (l = Object.keys(r), d = l.length, d !== Object.keys(c).length) return !1;
|
|
99
|
-
for (i = d; i-- !== 0; )
|
|
100
|
-
if (!Object.prototype.hasOwnProperty.call(c, l[i])) return !1;
|
|
101
|
-
if (e && r instanceof Element) return !1;
|
|
102
|
-
for (i = d; i-- !== 0; )
|
|
103
|
-
if (!((l[i] === "_owner" || l[i] === "__v" || l[i] === "__o") && r.$$typeof) && !s(r[l[i]], c[l[i]]))
|
|
104
|
-
return !1;
|
|
105
|
-
return !0;
|
|
106
|
-
}
|
|
107
|
-
return r !== r && c !== c;
|
|
108
|
-
}
|
|
109
|
-
return Ee = function(c, d) {
|
|
110
|
-
try {
|
|
111
|
-
return s(c, d);
|
|
112
|
-
} catch (i) {
|
|
113
|
-
if ((i.message || "").match(/stack|recursion/i))
|
|
114
|
-
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
115
|
-
throw i;
|
|
116
|
-
}
|
|
117
|
-
}, Ee;
|
|
118
|
-
}
|
|
119
|
-
var un = dn();
|
|
120
|
-
const hn = /* @__PURE__ */ Ge(un);
|
|
121
|
-
var Ae, pt;
|
|
122
|
-
function mn() {
|
|
123
|
-
if (pt) return Ae;
|
|
124
|
-
pt = 1;
|
|
125
|
-
var e = function(t, n, a, s, r, c, d, i) {
|
|
126
|
-
if (process.env.NODE_ENV !== "production" && n === void 0)
|
|
127
|
-
throw new Error("invariant requires an error message argument");
|
|
128
|
-
if (!t) {
|
|
129
|
-
var l;
|
|
130
|
-
if (n === void 0)
|
|
131
|
-
l = new Error(
|
|
132
|
-
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
133
|
-
);
|
|
134
|
-
else {
|
|
135
|
-
var u = [a, s, r, c, d, i], p = 0;
|
|
136
|
-
l = new Error(
|
|
137
|
-
n.replace(/%s/g, function() {
|
|
138
|
-
return u[p++];
|
|
139
|
-
})
|
|
140
|
-
), l.name = "Invariant Violation";
|
|
141
|
-
}
|
|
142
|
-
throw l.framesToPop = 1, l;
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
return Ae = e, Ae;
|
|
146
|
-
}
|
|
147
|
-
var fn = mn();
|
|
148
|
-
const gt = /* @__PURE__ */ Ge(fn);
|
|
149
|
-
var Oe, _t;
|
|
150
|
-
function pn() {
|
|
151
|
-
return _t || (_t = 1, Oe = function(t, n, a, s) {
|
|
152
|
-
var r = a ? a.call(s, t, n) : void 0;
|
|
153
|
-
if (r !== void 0)
|
|
154
|
-
return !!r;
|
|
155
|
-
if (t === n)
|
|
156
|
-
return !0;
|
|
157
|
-
if (typeof t != "object" || !t || typeof n != "object" || !n)
|
|
158
|
-
return !1;
|
|
159
|
-
var c = Object.keys(t), d = Object.keys(n);
|
|
160
|
-
if (c.length !== d.length)
|
|
161
|
-
return !1;
|
|
162
|
-
for (var i = Object.prototype.hasOwnProperty.bind(n), l = 0; l < c.length; l++) {
|
|
163
|
-
var u = c[l];
|
|
164
|
-
if (!i(u))
|
|
165
|
-
return !1;
|
|
166
|
-
var p = t[u], h = n[u];
|
|
167
|
-
if (r = a ? a.call(s, p, h, u) : void 0, r === !1 || r === void 0 && p !== h)
|
|
168
|
-
return !1;
|
|
169
|
-
}
|
|
170
|
-
return !0;
|
|
171
|
-
}), Oe;
|
|
172
|
-
}
|
|
173
|
-
var gn = pn();
|
|
174
|
-
const _n = /* @__PURE__ */ Ge(gn);
|
|
175
|
-
var St = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(St || {}), De = {
|
|
176
|
-
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
177
|
-
script: { type: ["application/ld+json"] },
|
|
178
|
-
meta: {
|
|
179
|
-
charset: "",
|
|
180
|
-
name: ["generator", "robots", "description"],
|
|
181
|
-
property: [
|
|
182
|
-
"og:type",
|
|
183
|
-
"og:title",
|
|
184
|
-
"og:url",
|
|
185
|
-
"og:image",
|
|
186
|
-
"og:image:alt",
|
|
187
|
-
"og:description",
|
|
188
|
-
"twitter:url",
|
|
189
|
-
"twitter:title",
|
|
190
|
-
"twitter:description",
|
|
191
|
-
"twitter:image",
|
|
192
|
-
"twitter:image:alt",
|
|
193
|
-
"twitter:card",
|
|
194
|
-
"twitter:site"
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
}, vt = Object.values(St), Qe = {
|
|
198
|
-
accesskey: "accessKey",
|
|
199
|
-
charset: "charSet",
|
|
200
|
-
class: "className",
|
|
201
|
-
contenteditable: "contentEditable",
|
|
202
|
-
contextmenu: "contextMenu",
|
|
203
|
-
"http-equiv": "httpEquiv",
|
|
204
|
-
itemprop: "itemProp",
|
|
205
|
-
tabindex: "tabIndex"
|
|
206
|
-
}, vn = Object.entries(Qe).reduce(
|
|
207
|
-
(e, [t, n]) => (e[n] = t, e),
|
|
208
|
-
{}
|
|
209
|
-
), U = "data-rh", ie = {
|
|
210
|
-
DEFAULT_TITLE: "defaultTitle",
|
|
211
|
-
DEFER: "defer",
|
|
212
|
-
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
213
|
-
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
|
|
214
|
-
TITLE_TEMPLATE: "titleTemplate",
|
|
215
|
-
PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
|
|
216
|
-
}, le = (e, t) => {
|
|
217
|
-
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
218
|
-
const a = e[n];
|
|
219
|
-
if (Object.prototype.hasOwnProperty.call(a, t))
|
|
220
|
-
return a[t];
|
|
221
|
-
}
|
|
222
|
-
return null;
|
|
223
|
-
}, bn = (e) => {
|
|
224
|
-
let t = le(
|
|
225
|
-
e,
|
|
226
|
-
"title"
|
|
227
|
-
/* TITLE */
|
|
228
|
-
);
|
|
229
|
-
const n = le(e, ie.TITLE_TEMPLATE);
|
|
230
|
-
if (Array.isArray(t) && (t = t.join("")), n && t)
|
|
231
|
-
return n.replace(/%s/g, () => t);
|
|
232
|
-
const a = le(e, ie.DEFAULT_TITLE);
|
|
233
|
-
return t || a || void 0;
|
|
234
|
-
}, yn = (e) => le(e, ie.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
235
|
-
}), Me = (e, t) => t.filter((n) => typeof n[e] < "u").map((n) => n[e]).reduce((n, a) => ({ ...n, ...a }), {}), wn = (e, t) => t.filter((n) => typeof n.base < "u").map((n) => n.base).reverse().reduce((n, a) => {
|
|
236
|
-
if (!n.length) {
|
|
237
|
-
const s = Object.keys(a);
|
|
238
|
-
for (let r = 0; r < s.length; r += 1) {
|
|
239
|
-
const d = s[r].toLowerCase();
|
|
240
|
-
if (e.indexOf(d) !== -1 && a[d])
|
|
241
|
-
return n.concat(a);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
return n;
|
|
245
|
-
}, []), Tn = (e) => console && typeof console.warn == "function" && console.warn(e), he = (e, t, n) => {
|
|
246
|
-
const a = {};
|
|
247
|
-
return n.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && Tn(
|
|
248
|
-
`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
|
|
249
|
-
), !1)).map((s) => s[e]).reverse().reduce((s, r) => {
|
|
250
|
-
const c = {};
|
|
251
|
-
r.filter((i) => {
|
|
252
|
-
let l;
|
|
253
|
-
const u = Object.keys(i);
|
|
254
|
-
for (let h = 0; h < u.length; h += 1) {
|
|
255
|
-
const g = u[h], y = g.toLowerCase();
|
|
256
|
-
t.indexOf(y) !== -1 && !(l === "rel" && i[l].toLowerCase() === "canonical") && !(y === "rel" && i[y].toLowerCase() === "stylesheet") && (l = y), t.indexOf(g) !== -1 && (g === "innerHTML" || g === "cssText" || g === "itemprop") && (l = g);
|
|
257
|
-
}
|
|
258
|
-
if (!l || !i[l])
|
|
259
|
-
return !1;
|
|
260
|
-
const p = i[l].toLowerCase();
|
|
261
|
-
return a[l] || (a[l] = {}), c[l] || (c[l] = {}), a[l][p] ? !1 : (c[l][p] = !0, !0);
|
|
262
|
-
}).reverse().forEach((i) => s.push(i));
|
|
263
|
-
const d = Object.keys(c);
|
|
264
|
-
for (let i = 0; i < d.length; i += 1) {
|
|
265
|
-
const l = d[i], u = {
|
|
266
|
-
...a[l],
|
|
267
|
-
...c[l]
|
|
268
|
-
};
|
|
269
|
-
a[l] = u;
|
|
270
|
-
}
|
|
271
|
-
return s;
|
|
272
|
-
}, []).reverse();
|
|
273
|
-
}, kn = (e, t) => {
|
|
274
|
-
if (Array.isArray(e) && e.length) {
|
|
275
|
-
for (let n = 0; n < e.length; n += 1)
|
|
276
|
-
if (e[n][t])
|
|
277
|
-
return !0;
|
|
278
|
-
}
|
|
279
|
-
return !1;
|
|
280
|
-
}, Cn = (e) => ({
|
|
281
|
-
baseTag: wn([
|
|
282
|
-
"href"
|
|
283
|
-
/* HREF */
|
|
284
|
-
], e),
|
|
285
|
-
bodyAttributes: Me("bodyAttributes", e),
|
|
286
|
-
defer: le(e, ie.DEFER),
|
|
287
|
-
encode: le(e, ie.ENCODE_SPECIAL_CHARACTERS),
|
|
288
|
-
htmlAttributes: Me("htmlAttributes", e),
|
|
289
|
-
linkTags: he(
|
|
290
|
-
"link",
|
|
291
|
-
[
|
|
292
|
-
"rel",
|
|
293
|
-
"href"
|
|
294
|
-
/* HREF */
|
|
295
|
-
],
|
|
296
|
-
e
|
|
297
|
-
),
|
|
298
|
-
metaTags: he(
|
|
299
|
-
"meta",
|
|
300
|
-
[
|
|
301
|
-
"name",
|
|
302
|
-
"charset",
|
|
303
|
-
"http-equiv",
|
|
304
|
-
"property",
|
|
305
|
-
"itemprop"
|
|
306
|
-
/* ITEM_PROP */
|
|
307
|
-
],
|
|
308
|
-
e
|
|
309
|
-
),
|
|
310
|
-
noscriptTags: he("noscript", [
|
|
311
|
-
"innerHTML"
|
|
312
|
-
/* INNER_HTML */
|
|
313
|
-
], e),
|
|
314
|
-
onChangeClientState: yn(e),
|
|
315
|
-
scriptTags: he(
|
|
316
|
-
"script",
|
|
317
|
-
[
|
|
318
|
-
"src",
|
|
319
|
-
"innerHTML"
|
|
320
|
-
/* INNER_HTML */
|
|
321
|
-
],
|
|
322
|
-
e
|
|
323
|
-
),
|
|
324
|
-
styleTags: he("style", [
|
|
325
|
-
"cssText"
|
|
326
|
-
/* CSS_TEXT */
|
|
327
|
-
], e),
|
|
328
|
-
title: bn(e),
|
|
329
|
-
titleAttributes: Me("titleAttributes", e),
|
|
330
|
-
prioritizeSeoTags: kn(e, ie.PRIORITIZE_SEO_TAGS)
|
|
331
|
-
}), Lt = (e) => Array.isArray(e) ? e.join("") : e, $n = (e, t) => {
|
|
332
|
-
const n = Object.keys(e);
|
|
333
|
-
for (let a = 0; a < n.length; a += 1)
|
|
334
|
-
if (t[n[a]] && t[n[a]].includes(e[n[a]]))
|
|
335
|
-
return !0;
|
|
336
|
-
return !1;
|
|
337
|
-
}, Re = (e, t) => Array.isArray(e) ? e.reduce(
|
|
338
|
-
(n, a) => ($n(a, t) ? n.priority.push(a) : n.default.push(a), n),
|
|
339
|
-
{ priority: [], default: [] }
|
|
340
|
-
) : { default: e, priority: [] }, bt = (e, t) => ({
|
|
341
|
-
...e,
|
|
342
|
-
[t]: void 0
|
|
343
|
-
}), Nn = [
|
|
344
|
-
"noscript",
|
|
345
|
-
"script",
|
|
346
|
-
"style"
|
|
347
|
-
/* STYLE */
|
|
348
|
-
], Fe = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Pt = (e) => Object.keys(e).reduce((t, n) => {
|
|
349
|
-
const a = typeof e[n] < "u" ? `${n}="${e[n]}"` : `${n}`;
|
|
350
|
-
return t ? `${t} ${a}` : a;
|
|
351
|
-
}, ""), In = (e, t, n, a) => {
|
|
352
|
-
const s = Pt(n), r = Lt(t);
|
|
353
|
-
return s ? `<${e} ${U}="true" ${s}>${Fe(
|
|
354
|
-
r,
|
|
355
|
-
a
|
|
356
|
-
)}</${e}>` : `<${e} ${U}="true">${Fe(
|
|
357
|
-
r,
|
|
358
|
-
a
|
|
359
|
-
)}</${e}>`;
|
|
360
|
-
}, xn = (e, t, n = !0) => t.reduce((a, s) => {
|
|
361
|
-
const r = s, c = Object.keys(r).filter(
|
|
362
|
-
(l) => !(l === "innerHTML" || l === "cssText")
|
|
363
|
-
).reduce((l, u) => {
|
|
364
|
-
const p = typeof r[u] > "u" ? u : `${u}="${Fe(r[u], n)}"`;
|
|
365
|
-
return l ? `${l} ${p}` : p;
|
|
366
|
-
}, ""), d = r.innerHTML || r.cssText || "", i = Nn.indexOf(e) === -1;
|
|
367
|
-
return `${a}<${e} ${U}="true" ${c}${i ? "/>" : `>${d}</${e}>`}`;
|
|
368
|
-
}, ""), Et = (e, t = {}) => Object.keys(e).reduce((n, a) => {
|
|
369
|
-
const s = Qe[a];
|
|
370
|
-
return n[s || a] = e[a], n;
|
|
371
|
-
}, t), Sn = (e, t, n) => {
|
|
372
|
-
const a = {
|
|
373
|
-
key: t,
|
|
374
|
-
[U]: !0
|
|
375
|
-
}, s = Et(n, a);
|
|
376
|
-
return [Q.createElement("title", s, t)];
|
|
377
|
-
}, $e = (e, t) => t.map((n, a) => {
|
|
378
|
-
const s = {
|
|
379
|
-
key: a,
|
|
380
|
-
[U]: !0
|
|
381
|
-
};
|
|
382
|
-
return Object.keys(n).forEach((r) => {
|
|
383
|
-
const d = Qe[r] || r;
|
|
384
|
-
if (d === "innerHTML" || d === "cssText") {
|
|
385
|
-
const i = n.innerHTML || n.cssText;
|
|
386
|
-
s.dangerouslySetInnerHTML = { __html: i };
|
|
387
|
-
} else
|
|
388
|
-
s[d] = n[r];
|
|
389
|
-
}), Q.createElement(e, s);
|
|
390
|
-
}), F = (e, t, n = !0) => {
|
|
391
|
-
switch (e) {
|
|
392
|
-
case "title":
|
|
393
|
-
return {
|
|
394
|
-
toComponent: () => Sn(e, t.title, t.titleAttributes),
|
|
395
|
-
toString: () => In(e, t.title, t.titleAttributes, n)
|
|
396
|
-
};
|
|
397
|
-
case "bodyAttributes":
|
|
398
|
-
case "htmlAttributes":
|
|
399
|
-
return {
|
|
400
|
-
toComponent: () => Et(t),
|
|
401
|
-
toString: () => Pt(t)
|
|
402
|
-
};
|
|
403
|
-
default:
|
|
404
|
-
return {
|
|
405
|
-
toComponent: () => $e(e, t),
|
|
406
|
-
toString: () => xn(e, t, n)
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
}, Ln = ({ metaTags: e, linkTags: t, scriptTags: n, encode: a }) => {
|
|
410
|
-
const s = Re(e, De.meta), r = Re(t, De.link), c = Re(n, De.script);
|
|
411
|
-
return {
|
|
412
|
-
priorityMethods: {
|
|
413
|
-
toComponent: () => [
|
|
414
|
-
...$e("meta", s.priority),
|
|
415
|
-
...$e("link", r.priority),
|
|
416
|
-
...$e("script", c.priority)
|
|
417
|
-
],
|
|
418
|
-
toString: () => (
|
|
419
|
-
// generate all the tags as strings and concatenate them
|
|
420
|
-
`${F("meta", s.priority, a)} ${F(
|
|
421
|
-
"link",
|
|
422
|
-
r.priority,
|
|
423
|
-
a
|
|
424
|
-
)} ${F("script", c.priority, a)}`
|
|
425
|
-
)
|
|
426
|
-
},
|
|
427
|
-
metaTags: s.default,
|
|
428
|
-
linkTags: r.default,
|
|
429
|
-
scriptTags: c.default
|
|
430
|
-
};
|
|
431
|
-
}, Pn = (e) => {
|
|
432
|
-
const {
|
|
433
|
-
baseTag: t,
|
|
434
|
-
bodyAttributes: n,
|
|
435
|
-
encode: a = !0,
|
|
436
|
-
htmlAttributes: s,
|
|
437
|
-
noscriptTags: r,
|
|
438
|
-
styleTags: c,
|
|
439
|
-
title: d = "",
|
|
440
|
-
titleAttributes: i,
|
|
441
|
-
prioritizeSeoTags: l
|
|
442
|
-
} = e;
|
|
443
|
-
let { linkTags: u, metaTags: p, scriptTags: h } = e, g = {
|
|
444
|
-
toComponent: () => {
|
|
445
|
-
},
|
|
446
|
-
toString: () => ""
|
|
447
|
-
};
|
|
448
|
-
return l && ({ priorityMethods: g, linkTags: u, metaTags: p, scriptTags: h } = Ln(e)), {
|
|
449
|
-
priority: g,
|
|
450
|
-
base: F("base", t, a),
|
|
451
|
-
bodyAttributes: F("bodyAttributes", n, a),
|
|
452
|
-
htmlAttributes: F("htmlAttributes", s, a),
|
|
453
|
-
link: F("link", u, a),
|
|
454
|
-
meta: F("meta", p, a),
|
|
455
|
-
noscript: F("noscript", r, a),
|
|
456
|
-
script: F("script", h, a),
|
|
457
|
-
style: F("style", c, a),
|
|
458
|
-
title: F("title", { title: d, titleAttributes: i }, a)
|
|
459
|
-
};
|
|
460
|
-
}, qe = Pn, Ce = [], At = !!(typeof window < "u" && window.document && window.document.createElement), Ue = class {
|
|
461
|
-
constructor(e, t) {
|
|
462
|
-
z(this, "instances", []);
|
|
463
|
-
z(this, "canUseDOM", At);
|
|
464
|
-
z(this, "context");
|
|
465
|
-
z(this, "value", {
|
|
466
|
-
setHelmet: (e) => {
|
|
467
|
-
this.context.helmet = e;
|
|
468
|
-
},
|
|
469
|
-
helmetInstances: {
|
|
470
|
-
get: () => this.canUseDOM ? Ce : this.instances,
|
|
471
|
-
add: (e) => {
|
|
472
|
-
(this.canUseDOM ? Ce : this.instances).push(e);
|
|
473
|
-
},
|
|
474
|
-
remove: (e) => {
|
|
475
|
-
const t = (this.canUseDOM ? Ce : this.instances).indexOf(e);
|
|
476
|
-
(this.canUseDOM ? Ce : this.instances).splice(t, 1);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
this.context = e, this.canUseDOM = t || !1, t || (e.helmet = qe({
|
|
481
|
-
baseTag: [],
|
|
482
|
-
bodyAttributes: {},
|
|
483
|
-
htmlAttributes: {},
|
|
484
|
-
linkTags: [],
|
|
485
|
-
metaTags: [],
|
|
486
|
-
noscriptTags: [],
|
|
487
|
-
scriptTags: [],
|
|
488
|
-
styleTags: [],
|
|
489
|
-
title: "",
|
|
490
|
-
titleAttributes: {}
|
|
491
|
-
}));
|
|
492
|
-
}
|
|
493
|
-
}, En = {}, Ot = Q.createContext(En), ee, Dt = (ee = class extends Ye {
|
|
494
|
-
constructor(n) {
|
|
495
|
-
super(n);
|
|
496
|
-
z(this, "helmetData");
|
|
497
|
-
this.helmetData = new Ue(this.props.context || {}, ee.canUseDOM);
|
|
498
|
-
}
|
|
499
|
-
render() {
|
|
500
|
-
return /* @__PURE__ */ Q.createElement(Ot.Provider, { value: this.helmetData.value }, this.props.children);
|
|
501
|
-
}
|
|
502
|
-
}, z(ee, "canUseDOM", At), ee), re = (e, t) => {
|
|
503
|
-
const n = document.head || document.querySelector(
|
|
504
|
-
"head"
|
|
505
|
-
/* HEAD */
|
|
506
|
-
), a = n.querySelectorAll(`${e}[${U}]`), s = [].slice.call(a), r = [];
|
|
507
|
-
let c;
|
|
508
|
-
return t && t.length && t.forEach((d) => {
|
|
509
|
-
const i = document.createElement(e);
|
|
510
|
-
for (const l in d)
|
|
511
|
-
if (Object.prototype.hasOwnProperty.call(d, l))
|
|
512
|
-
if (l === "innerHTML")
|
|
513
|
-
i.innerHTML = d.innerHTML;
|
|
514
|
-
else if (l === "cssText")
|
|
515
|
-
i.styleSheet ? i.styleSheet.cssText = d.cssText : i.appendChild(document.createTextNode(d.cssText));
|
|
516
|
-
else {
|
|
517
|
-
const u = l, p = typeof d[u] > "u" ? "" : d[u];
|
|
518
|
-
i.setAttribute(l, p);
|
|
519
|
-
}
|
|
520
|
-
i.setAttribute(U, "true"), s.some((l, u) => (c = u, i.isEqualNode(l))) ? s.splice(c, 1) : r.push(i);
|
|
521
|
-
}), s.forEach((d) => {
|
|
522
|
-
var i;
|
|
523
|
-
return (i = d.parentNode) == null ? void 0 : i.removeChild(d);
|
|
524
|
-
}), r.forEach((d) => n.appendChild(d)), {
|
|
525
|
-
oldTags: s,
|
|
526
|
-
newTags: r
|
|
527
|
-
};
|
|
528
|
-
}, We = (e, t) => {
|
|
529
|
-
const n = document.getElementsByTagName(e)[0];
|
|
530
|
-
if (!n)
|
|
531
|
-
return;
|
|
532
|
-
const a = n.getAttribute(U), s = a ? a.split(",") : [], r = [...s], c = Object.keys(t);
|
|
533
|
-
for (const d of c) {
|
|
534
|
-
const i = t[d] || "";
|
|
535
|
-
n.getAttribute(d) !== i && n.setAttribute(d, i), s.indexOf(d) === -1 && s.push(d);
|
|
536
|
-
const l = r.indexOf(d);
|
|
537
|
-
l !== -1 && r.splice(l, 1);
|
|
538
|
-
}
|
|
539
|
-
for (let d = r.length - 1; d >= 0; d -= 1)
|
|
540
|
-
n.removeAttribute(r[d]);
|
|
541
|
-
s.length === r.length ? n.removeAttribute(U) : n.getAttribute(U) !== c.join(",") && n.setAttribute(U, c.join(","));
|
|
542
|
-
}, An = (e, t) => {
|
|
543
|
-
typeof e < "u" && document.title !== e && (document.title = Lt(e)), We("title", t);
|
|
544
|
-
}, yt = (e, t) => {
|
|
545
|
-
const {
|
|
546
|
-
baseTag: n,
|
|
547
|
-
bodyAttributes: a,
|
|
548
|
-
htmlAttributes: s,
|
|
549
|
-
linkTags: r,
|
|
550
|
-
metaTags: c,
|
|
551
|
-
noscriptTags: d,
|
|
552
|
-
onChangeClientState: i,
|
|
553
|
-
scriptTags: l,
|
|
554
|
-
styleTags: u,
|
|
555
|
-
title: p,
|
|
556
|
-
titleAttributes: h
|
|
557
|
-
} = e;
|
|
558
|
-
We("body", a), We("html", s), An(p, h);
|
|
559
|
-
const g = {
|
|
560
|
-
baseTag: re("base", n),
|
|
561
|
-
linkTags: re("link", r),
|
|
562
|
-
metaTags: re("meta", c),
|
|
563
|
-
noscriptTags: re("noscript", d),
|
|
564
|
-
scriptTags: re("script", l),
|
|
565
|
-
styleTags: re("style", u)
|
|
566
|
-
}, y = {}, f = {};
|
|
567
|
-
Object.keys(g).forEach((_) => {
|
|
568
|
-
const { newTags: b, oldTags: w } = g[_];
|
|
569
|
-
b.length && (y[_] = b), w.length && (f[_] = g[_].oldTags);
|
|
570
|
-
}), t && t(), i(e, y, f);
|
|
571
|
-
}, me = null, On = (e) => {
|
|
572
|
-
me && cancelAnimationFrame(me), e.defer ? me = requestAnimationFrame(() => {
|
|
573
|
-
yt(e, () => {
|
|
574
|
-
me = null;
|
|
575
|
-
});
|
|
576
|
-
}) : (yt(e), me = null);
|
|
577
|
-
}, Dn = On, wt = class extends Ye {
|
|
578
|
-
constructor() {
|
|
579
|
-
super(...arguments);
|
|
580
|
-
z(this, "rendered", !1);
|
|
581
|
-
}
|
|
582
|
-
shouldComponentUpdate(t) {
|
|
583
|
-
return !_n(t, this.props);
|
|
584
|
-
}
|
|
585
|
-
componentDidUpdate() {
|
|
586
|
-
this.emitChange();
|
|
587
|
-
}
|
|
588
|
-
componentWillUnmount() {
|
|
589
|
-
const { helmetInstances: t } = this.props.context;
|
|
590
|
-
t.remove(this), this.emitChange();
|
|
591
|
-
}
|
|
592
|
-
emitChange() {
|
|
593
|
-
const { helmetInstances: t, setHelmet: n } = this.props.context;
|
|
594
|
-
let a = null;
|
|
595
|
-
const s = Cn(
|
|
596
|
-
t.get().map((r) => {
|
|
597
|
-
const c = { ...r.props };
|
|
598
|
-
return delete c.context, c;
|
|
599
|
-
})
|
|
600
|
-
);
|
|
601
|
-
Dt.canUseDOM ? Dn(s) : qe && (a = qe(s)), n(a);
|
|
602
|
-
}
|
|
603
|
-
// componentWillMount will be deprecated
|
|
604
|
-
// for SSR, initialize on first render
|
|
605
|
-
// constructor is also unsafe in StrictMode
|
|
606
|
-
init() {
|
|
607
|
-
if (this.rendered)
|
|
608
|
-
return;
|
|
609
|
-
this.rendered = !0;
|
|
610
|
-
const { helmetInstances: t } = this.props.context;
|
|
611
|
-
t.add(this), this.emitChange();
|
|
612
|
-
}
|
|
613
|
-
render() {
|
|
614
|
-
return this.init(), null;
|
|
615
|
-
}
|
|
616
|
-
}, He, Mt = (He = class extends Ye {
|
|
617
|
-
shouldComponentUpdate(e) {
|
|
618
|
-
return !hn(bt(this.props, "helmetData"), bt(e, "helmetData"));
|
|
619
|
-
}
|
|
620
|
-
mapNestedChildrenToProps(e, t) {
|
|
621
|
-
if (!t)
|
|
622
|
-
return null;
|
|
623
|
-
switch (e.type) {
|
|
624
|
-
case "script":
|
|
625
|
-
case "noscript":
|
|
626
|
-
return {
|
|
627
|
-
innerHTML: t
|
|
628
|
-
};
|
|
629
|
-
case "style":
|
|
630
|
-
return {
|
|
631
|
-
cssText: t
|
|
632
|
-
};
|
|
633
|
-
default:
|
|
634
|
-
throw new Error(
|
|
635
|
-
`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
|
|
636
|
-
);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
flattenArrayTypeChildren(e, t, n, a) {
|
|
640
|
-
return {
|
|
641
|
-
...t,
|
|
642
|
-
[e.type]: [
|
|
643
|
-
...t[e.type] || [],
|
|
644
|
-
{
|
|
645
|
-
...n,
|
|
646
|
-
...this.mapNestedChildrenToProps(e, a)
|
|
647
|
-
}
|
|
648
|
-
]
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
mapObjectTypeChildren(e, t, n, a) {
|
|
652
|
-
switch (e.type) {
|
|
653
|
-
case "title":
|
|
654
|
-
return {
|
|
655
|
-
...t,
|
|
656
|
-
[e.type]: a,
|
|
657
|
-
titleAttributes: { ...n }
|
|
658
|
-
};
|
|
659
|
-
case "body":
|
|
660
|
-
return {
|
|
661
|
-
...t,
|
|
662
|
-
bodyAttributes: { ...n }
|
|
663
|
-
};
|
|
664
|
-
case "html":
|
|
665
|
-
return {
|
|
666
|
-
...t,
|
|
667
|
-
htmlAttributes: { ...n }
|
|
668
|
-
};
|
|
669
|
-
default:
|
|
670
|
-
return {
|
|
671
|
-
...t,
|
|
672
|
-
[e.type]: { ...n }
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
mapArrayTypeChildrenToProps(e, t) {
|
|
677
|
-
let n = { ...t };
|
|
678
|
-
return Object.keys(e).forEach((a) => {
|
|
679
|
-
n = {
|
|
680
|
-
...n,
|
|
681
|
-
[a]: e[a]
|
|
682
|
-
};
|
|
683
|
-
}), n;
|
|
684
|
-
}
|
|
685
|
-
warnOnInvalidChildren(e, t) {
|
|
686
|
-
return gt(
|
|
687
|
-
vt.some((n) => e.type === n),
|
|
688
|
-
typeof e.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : `Only elements types ${vt.join(
|
|
689
|
-
", "
|
|
690
|
-
)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
|
|
691
|
-
), gt(
|
|
692
|
-
!t || typeof t == "string" || Array.isArray(t) && !t.some((n) => typeof n != "string"),
|
|
693
|
-
`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`
|
|
694
|
-
), !0;
|
|
695
|
-
}
|
|
696
|
-
mapChildrenToProps(e, t) {
|
|
697
|
-
let n = {};
|
|
698
|
-
return Q.Children.forEach(e, (a) => {
|
|
699
|
-
if (!a || !a.props)
|
|
700
|
-
return;
|
|
701
|
-
const { children: s, ...r } = a.props, c = Object.keys(r).reduce((i, l) => (i[vn[l] || l] = r[l], i), {});
|
|
702
|
-
let { type: d } = a;
|
|
703
|
-
switch (typeof d == "symbol" ? d = d.toString() : this.warnOnInvalidChildren(a, s), d) {
|
|
704
|
-
case "Symbol(react.fragment)":
|
|
705
|
-
t = this.mapChildrenToProps(s, t);
|
|
706
|
-
break;
|
|
707
|
-
case "link":
|
|
708
|
-
case "meta":
|
|
709
|
-
case "noscript":
|
|
710
|
-
case "script":
|
|
711
|
-
case "style":
|
|
712
|
-
n = this.flattenArrayTypeChildren(
|
|
713
|
-
a,
|
|
714
|
-
n,
|
|
715
|
-
c,
|
|
716
|
-
s
|
|
717
|
-
);
|
|
718
|
-
break;
|
|
719
|
-
default:
|
|
720
|
-
t = this.mapObjectTypeChildren(a, t, c, s);
|
|
721
|
-
break;
|
|
722
|
-
}
|
|
723
|
-
}), this.mapArrayTypeChildrenToProps(n, t);
|
|
724
|
-
}
|
|
725
|
-
render() {
|
|
726
|
-
const { children: e, ...t } = this.props;
|
|
727
|
-
let n = { ...t }, { helmetData: a } = t;
|
|
728
|
-
if (e && (n = this.mapChildrenToProps(e, n)), a && !(a instanceof Ue)) {
|
|
729
|
-
const s = a;
|
|
730
|
-
a = new Ue(s.context, !0), delete n.helmetData;
|
|
731
|
-
}
|
|
732
|
-
return a ? /* @__PURE__ */ Q.createElement(wt, { ...n, context: a.value }) : /* @__PURE__ */ Q.createElement(Ot.Consumer, null, (s) => /* @__PURE__ */ Q.createElement(wt, { ...n, context: s }));
|
|
733
|
-
}
|
|
734
|
-
}, z(He, "defaultProps", {
|
|
735
|
-
defer: !0,
|
|
736
|
-
encodeSpecialCharacters: !0,
|
|
737
|
-
prioritizeSeoTags: !1
|
|
738
|
-
}), He);
|
|
739
|
-
function Mn({ children: e }) {
|
|
740
|
-
return /* @__PURE__ */ o("div", { className: "xw-blog-root", children: e });
|
|
741
|
-
}
|
|
742
|
-
function Rt(e) {
|
|
743
|
-
function t(n) {
|
|
744
|
-
const a = n.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
745
|
-
if (!a) return { frontmatter: {}, content: n };
|
|
746
|
-
const s = {}, r = a[1];
|
|
747
|
-
let c = "", d = !1;
|
|
748
|
-
const i = [];
|
|
749
|
-
for (const u of r.split(`
|
|
55
|
+
function qe(t) {
|
|
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 s = {}, c = a[1];
|
|
60
|
+
let l = "", m = !1;
|
|
61
|
+
const h = [];
|
|
62
|
+
for (const i of c.split(`
|
|
750
63
|
`)) {
|
|
751
|
-
const
|
|
752
|
-
if (
|
|
753
|
-
if (
|
|
754
|
-
const
|
|
755
|
-
|
|
64
|
+
const f = i.trim();
|
|
65
|
+
if (f.startsWith("-")) {
|
|
66
|
+
if (m) {
|
|
67
|
+
const g = f.substring(1).trim();
|
|
68
|
+
h.push(g);
|
|
756
69
|
}
|
|
757
70
|
continue;
|
|
758
71
|
}
|
|
759
|
-
if (
|
|
760
|
-
const [
|
|
761
|
-
if (
|
|
762
|
-
|
|
72
|
+
if (m && !f.startsWith("-") && (s[l] = h.slice(), h.length = 0, m = !1), f != null && f.includes(":")) {
|
|
73
|
+
const [g, ...v] = f.split(":"), b = v.join(":").trim();
|
|
74
|
+
if (l = g.trim(), !b) {
|
|
75
|
+
m = !0;
|
|
763
76
|
continue;
|
|
764
77
|
}
|
|
765
|
-
|
|
78
|
+
b === "true" ? s[l] = !0 : b === "false" ? s[l] = !1 : s[l] = b;
|
|
766
79
|
}
|
|
767
80
|
}
|
|
768
|
-
|
|
769
|
-
const
|
|
81
|
+
m && h.length > 0 && (s[l] = h);
|
|
82
|
+
const u = o.replace(
|
|
770
83
|
/^---\s*\n[\s\S]*?\n---\s*\n/,
|
|
771
84
|
""
|
|
772
85
|
);
|
|
773
|
-
return { frontmatter: s, content:
|
|
86
|
+
return { frontmatter: s, content: u };
|
|
774
87
|
}
|
|
775
88
|
return {
|
|
776
89
|
/**
|
|
777
90
|
* Load MDX content for a given language and slug.
|
|
778
91
|
* Automatically loads the advanced variant if `advanced` is true.
|
|
779
92
|
*/
|
|
780
|
-
async loadMDXContent(
|
|
781
|
-
const
|
|
782
|
-
if (!
|
|
783
|
-
const
|
|
784
|
-
return { content:
|
|
93
|
+
async loadMDXContent(o, a, s = !1) {
|
|
94
|
+
const c = s ? `${a}-advanced.mdx` : `${a}.mdx`, l = `./docs/${o}/${c}`, m = t[l];
|
|
95
|
+
if (!m) throw new Error(`File not found: ${l}`);
|
|
96
|
+
const h = await m(), { frontmatter: u, content: i } = n(h);
|
|
97
|
+
return { content: i, frontmatter: u };
|
|
785
98
|
},
|
|
786
99
|
/**
|
|
787
100
|
* Load English content for generating consistent heading IDs.
|
|
788
101
|
* All heading anchors are derived from English content for stability across translations.
|
|
789
102
|
*/
|
|
790
|
-
async loadEnglishContent(
|
|
791
|
-
const
|
|
792
|
-
if (!
|
|
793
|
-
const
|
|
794
|
-
return
|
|
103
|
+
async loadEnglishContent(o, a = !1) {
|
|
104
|
+
const c = `./docs/en/${a ? `${o}-advanced.mdx` : `${o}.mdx`}`, l = t[c];
|
|
105
|
+
if (!l) throw new Error(`File not found: ${c}`);
|
|
106
|
+
const m = await l(), { content: h } = n(m);
|
|
107
|
+
return h;
|
|
795
108
|
},
|
|
796
109
|
/**
|
|
797
110
|
* Build a tag index from all MDX files.
|
|
@@ -800,83 +113,83 @@ function Rt(e) {
|
|
|
800
113
|
* @param language - Language code to scan (defaults to 'en')
|
|
801
114
|
* @returns Promise resolving to tag index mapping tag names to document info
|
|
802
115
|
*/
|
|
803
|
-
async buildTagIndex(
|
|
804
|
-
const a = {}, s = `./docs/${
|
|
805
|
-
(
|
|
116
|
+
async buildTagIndex(o = "en") {
|
|
117
|
+
const a = {}, s = `./docs/${o}/`, c = Object.keys(t).filter(
|
|
118
|
+
(l) => l.startsWith(s)
|
|
806
119
|
);
|
|
807
|
-
for (const
|
|
120
|
+
for (const l of c)
|
|
808
121
|
try {
|
|
809
|
-
const
|
|
810
|
-
if (
|
|
811
|
-
const _ =
|
|
122
|
+
const m = t[l], h = await m(), { frontmatter: u, content: i } = n(h), f = l.split("/").pop() || "", g = f.replace(".mdx", "").replace("-advanced", ""), v = typeof u.title == "string" ? u.title : void 0, b = i.match(/^#\s+(.+)$/m), r = v || (b ? b[1].trim() : g);
|
|
123
|
+
if (f.includes("-advanced")) continue;
|
|
124
|
+
const _ = u.tags;
|
|
812
125
|
if (_ && Array.isArray(_))
|
|
813
|
-
for (const
|
|
814
|
-
a[
|
|
815
|
-
} catch (
|
|
816
|
-
console.warn(`Failed to process ${
|
|
126
|
+
for (const w of _)
|
|
127
|
+
a[w] || (a[w] = []), a[w].some((I) => I.slug === g) || a[w].push({ slug: g, title: r });
|
|
128
|
+
} catch (m) {
|
|
129
|
+
console.warn(`Failed to process ${l}:`, m);
|
|
817
130
|
}
|
|
818
131
|
return a;
|
|
819
132
|
}
|
|
820
133
|
};
|
|
821
134
|
}
|
|
822
|
-
function
|
|
823
|
-
const
|
|
135
|
+
function Go(t) {
|
|
136
|
+
const n = qe(t);
|
|
824
137
|
return {
|
|
825
|
-
mdxFiles:
|
|
826
|
-
loadContent:
|
|
827
|
-
loadEnglishContent:
|
|
138
|
+
mdxFiles: t,
|
|
139
|
+
loadContent: n.loadMDXContent,
|
|
140
|
+
loadEnglishContent: n.loadEnglishContent
|
|
828
141
|
};
|
|
829
142
|
}
|
|
830
|
-
const
|
|
831
|
-
const
|
|
832
|
-
return
|
|
833
|
-
const
|
|
834
|
-
if (
|
|
835
|
-
const
|
|
836
|
-
const
|
|
837
|
-
|
|
143
|
+
const Ae = "app-theme", Ue = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", Oe = (t) => t === "system" ? Ue() : t, Ke = (t) => {
|
|
144
|
+
const n = () => t || (typeof window > "u" ? "system" : localStorage.getItem(Ae) || "system"), [o, a] = y(n);
|
|
145
|
+
return S(() => {
|
|
146
|
+
const c = Oe(o), l = document.querySelector(".xw-blog-root");
|
|
147
|
+
if (l && (l.classList.remove("light", "dark"), l.classList.add(c)), o === "system") {
|
|
148
|
+
const m = window.matchMedia("(prefers-color-scheme: dark)"), h = () => {
|
|
149
|
+
const u = Ue(), i = document.querySelector(".xw-blog-root");
|
|
150
|
+
i && (i.classList.remove("light", "dark"), i.classList.add(u));
|
|
838
151
|
};
|
|
839
|
-
return
|
|
152
|
+
return m.addEventListener("change", h), () => m.removeEventListener("change", h);
|
|
840
153
|
}
|
|
841
|
-
}, [
|
|
842
|
-
theme:
|
|
843
|
-
setTheme: (
|
|
844
|
-
localStorage.setItem(
|
|
154
|
+
}, [o]), {
|
|
155
|
+
theme: o,
|
|
156
|
+
setTheme: (c) => {
|
|
157
|
+
localStorage.setItem(Ae, c), a(c);
|
|
845
158
|
},
|
|
846
|
-
effectiveTheme:
|
|
159
|
+
effectiveTheme: Oe(o)
|
|
847
160
|
};
|
|
848
|
-
},
|
|
161
|
+
}, gt = (t) => "items" in t, se = (t) => "items" in t, he = async (t, n, o) => {
|
|
849
162
|
const a = [];
|
|
850
|
-
for (const s of
|
|
851
|
-
if (
|
|
852
|
-
const
|
|
853
|
-
for (const
|
|
163
|
+
for (const s of t)
|
|
164
|
+
if (gt(s)) {
|
|
165
|
+
const c = [];
|
|
166
|
+
for (const m of s.items)
|
|
854
167
|
try {
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
...
|
|
858
|
-
title:
|
|
168
|
+
const h = await o(n, m.slug, !1), u = typeof h.frontmatter.title == "string" ? h.frontmatter.title : m.slug;
|
|
169
|
+
c.push({
|
|
170
|
+
...m,
|
|
171
|
+
title: u
|
|
859
172
|
});
|
|
860
173
|
} catch {
|
|
861
|
-
|
|
862
|
-
...
|
|
863
|
-
title:
|
|
174
|
+
c.push({
|
|
175
|
+
...m,
|
|
176
|
+
title: m.slug
|
|
864
177
|
});
|
|
865
178
|
}
|
|
866
|
-
const
|
|
179
|
+
const l = rt.getFixedT(n)(s.title);
|
|
867
180
|
a.push({
|
|
868
|
-
title:
|
|
869
|
-
items:
|
|
181
|
+
title: l,
|
|
182
|
+
items: c,
|
|
870
183
|
...s.defaultOpen !== void 0 && {
|
|
871
184
|
defaultOpen: s.defaultOpen
|
|
872
185
|
}
|
|
873
186
|
});
|
|
874
187
|
} else
|
|
875
188
|
try {
|
|
876
|
-
const
|
|
189
|
+
const c = await o(n, s.slug, !1), l = typeof c.frontmatter.title == "string" ? c.frontmatter.title : s.slug;
|
|
877
190
|
a.push({
|
|
878
191
|
...s,
|
|
879
|
-
title:
|
|
192
|
+
title: l
|
|
880
193
|
});
|
|
881
194
|
} catch {
|
|
882
195
|
a.push({
|
|
@@ -885,193 +198,193 @@ const Tt = "app-theme", Bt = () => typeof window > "u" ? "light" : window.matchM
|
|
|
885
198
|
});
|
|
886
199
|
}
|
|
887
200
|
return a;
|
|
888
|
-
},
|
|
889
|
-
const
|
|
890
|
-
for (const s of
|
|
891
|
-
|
|
892
|
-
const a =
|
|
893
|
-
(s) => s.slug ===
|
|
201
|
+
}, ee = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), pt = (t, n) => {
|
|
202
|
+
const o = [];
|
|
203
|
+
for (const s of n)
|
|
204
|
+
se(s) ? o.push(...s.items) : o.push({ slug: s.slug, title: s.title });
|
|
205
|
+
const a = o.findIndex(
|
|
206
|
+
(s) => s.slug === t
|
|
894
207
|
);
|
|
895
208
|
return a === -1 ? {} : {
|
|
896
|
-
prev: a > 0 ?
|
|
897
|
-
next: a <
|
|
209
|
+
prev: a > 0 ? o[a - 1] : void 0,
|
|
210
|
+
next: a < o.length - 1 ? o[a + 1] : void 0
|
|
898
211
|
};
|
|
899
|
-
},
|
|
900
|
-
function
|
|
901
|
-
children:
|
|
902
|
-
config:
|
|
903
|
-
blog:
|
|
212
|
+
}, Ge = st(null);
|
|
213
|
+
function Qo({
|
|
214
|
+
children: t,
|
|
215
|
+
config: n,
|
|
216
|
+
blog: o,
|
|
904
217
|
navigationData: a = []
|
|
905
218
|
}) {
|
|
906
|
-
|
|
907
|
-
const [s,
|
|
908
|
-
|
|
909
|
-
const { buildTagIndex:
|
|
219
|
+
Ke(n.defaultTheme);
|
|
220
|
+
const [s, c] = y({});
|
|
221
|
+
S(() => {
|
|
222
|
+
const { buildTagIndex: m } = qe(o.mdxFiles), h = n.supportedLanguages.map(async (u) => {
|
|
910
223
|
try {
|
|
911
|
-
const
|
|
912
|
-
return { language:
|
|
913
|
-
} catch (
|
|
914
|
-
return console.error(`Failed to build tag index for ${
|
|
224
|
+
const i = await m(u);
|
|
225
|
+
return { language: u, index: i };
|
|
226
|
+
} catch (i) {
|
|
227
|
+
return console.error(`Failed to build tag index for ${u}:`, i), { language: u, index: {} };
|
|
915
228
|
}
|
|
916
229
|
});
|
|
917
|
-
Promise.all(
|
|
918
|
-
const
|
|
919
|
-
for (const
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
}).catch((
|
|
923
|
-
console.error("Failed to build tag indices:",
|
|
230
|
+
Promise.all(h).then((u) => {
|
|
231
|
+
const i = {};
|
|
232
|
+
for (const f of u)
|
|
233
|
+
i[f.language] = f.index;
|
|
234
|
+
c(i);
|
|
235
|
+
}).catch((u) => {
|
|
236
|
+
console.error("Failed to build tag indices:", u);
|
|
924
237
|
});
|
|
925
|
-
}, [
|
|
926
|
-
const
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
|
|
238
|
+
}, [o.mdxFiles, n.supportedLanguages]);
|
|
239
|
+
const l = { ...n, navigationData: a, tagIndex: s };
|
|
240
|
+
return /* @__PURE__ */ e(
|
|
241
|
+
Ge.Provider,
|
|
929
242
|
{
|
|
930
243
|
value: {
|
|
931
|
-
config:
|
|
932
|
-
loadContent:
|
|
933
|
-
loadEnglishContent:
|
|
244
|
+
config: l,
|
|
245
|
+
loadContent: o.loadContent,
|
|
246
|
+
loadEnglishContent: o.loadEnglishContent
|
|
934
247
|
},
|
|
935
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ e(_t, { children: t })
|
|
936
249
|
}
|
|
937
|
-
)
|
|
250
|
+
);
|
|
938
251
|
}
|
|
939
|
-
function
|
|
940
|
-
const
|
|
941
|
-
if (!
|
|
252
|
+
function R() {
|
|
253
|
+
const t = ct(Ge);
|
|
254
|
+
if (!t)
|
|
942
255
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
943
|
-
return
|
|
256
|
+
return t;
|
|
944
257
|
}
|
|
945
|
-
function
|
|
258
|
+
function Qe() {
|
|
946
259
|
return !!new URL(window.location.href).hash;
|
|
947
260
|
}
|
|
948
|
-
function
|
|
949
|
-
const a =
|
|
950
|
-
return
|
|
261
|
+
function ft(t, n, o) {
|
|
262
|
+
const a = o ? `${o}/` : "";
|
|
263
|
+
return Qe() ? `#${a}${n}/${t}` : `/${a}${n}/${t}`;
|
|
951
264
|
}
|
|
952
|
-
function
|
|
953
|
-
const
|
|
265
|
+
function Xe(t) {
|
|
266
|
+
const n = {
|
|
954
267
|
advanced: !1,
|
|
955
268
|
anchor: ""
|
|
956
269
|
};
|
|
957
|
-
if (!
|
|
958
|
-
const a = (
|
|
270
|
+
if (!t) return n;
|
|
271
|
+
const a = (t.startsWith("?") ? t.substring(1) : t).split("&");
|
|
959
272
|
for (const s of a)
|
|
960
|
-
s === "advanced" ?
|
|
961
|
-
return
|
|
273
|
+
s === "advanced" ? n.advanced = !0 : s.startsWith("a=") && (n.anchor = s.substring(2));
|
|
274
|
+
return n;
|
|
962
275
|
}
|
|
963
|
-
function
|
|
964
|
-
const
|
|
965
|
-
if (
|
|
966
|
-
const s =
|
|
276
|
+
function je(t, n = 80) {
|
|
277
|
+
const o = document.getElementById(t);
|
|
278
|
+
if (o) {
|
|
279
|
+
const s = o.getBoundingClientRect().top + window.pageYOffset - n;
|
|
967
280
|
window.scrollTo({
|
|
968
281
|
top: s,
|
|
969
282
|
behavior: "smooth"
|
|
970
283
|
});
|
|
971
284
|
}
|
|
972
285
|
}
|
|
973
|
-
function
|
|
974
|
-
const
|
|
975
|
-
if (
|
|
976
|
-
const a =
|
|
977
|
-
|
|
978
|
-
const
|
|
979
|
-
|
|
286
|
+
function vt(t, n = !1) {
|
|
287
|
+
const o = new URL(window.location.href);
|
|
288
|
+
if (Qe()) {
|
|
289
|
+
const a = o.hash.split("?"), s = a[0], c = new URLSearchParams(a[1] || "");
|
|
290
|
+
c.set("a", t), n && c.set("advanced", "");
|
|
291
|
+
const l = c.toString();
|
|
292
|
+
o.hash = l ? `${s}?${l}` : s;
|
|
980
293
|
} else {
|
|
981
|
-
const a = new URLSearchParams(
|
|
982
|
-
a.set("a",
|
|
294
|
+
const a = new URLSearchParams(o.search);
|
|
295
|
+
a.set("a", t), n && a.set("advanced", ""), o.search = `?${a.toString()}`;
|
|
983
296
|
}
|
|
984
|
-
window.history.pushState(null, "",
|
|
297
|
+
window.history.pushState(null, "", o.toString());
|
|
985
298
|
}
|
|
986
|
-
function
|
|
299
|
+
function bt(t = "smooth") {
|
|
987
300
|
window.scrollTo({
|
|
988
301
|
top: 0,
|
|
989
302
|
left: 0,
|
|
990
|
-
behavior:
|
|
303
|
+
behavior: t
|
|
991
304
|
});
|
|
992
305
|
}
|
|
993
|
-
const
|
|
994
|
-
articleNavigation:
|
|
995
|
-
navContainer:
|
|
996
|
-
navLink:
|
|
997
|
-
navLinkContent:
|
|
998
|
-
navIcon:
|
|
999
|
-
navText:
|
|
1000
|
-
navLabel:
|
|
1001
|
-
navTitle:
|
|
306
|
+
const kt = "_articleNavigation_kz84g_1", wt = "_navContainer_kz84g_7", Nt = "_navLink_kz84g_24", $t = "_navLinkContent_kz84g_61", Ct = "_navIcon_kz84g_76", It = "_navText_kz84g_83", xt = "_navLabel_kz84g_90", yt = "_navTitle_kz84g_98", O = {
|
|
307
|
+
articleNavigation: kt,
|
|
308
|
+
navContainer: wt,
|
|
309
|
+
navLink: Nt,
|
|
310
|
+
navLinkContent: $t,
|
|
311
|
+
navIcon: Ct,
|
|
312
|
+
navText: It,
|
|
313
|
+
navLabel: xt,
|
|
314
|
+
navTitle: yt
|
|
1002
315
|
};
|
|
1003
|
-
function
|
|
1004
|
-
prevSlug:
|
|
1005
|
-
prevTitle:
|
|
1006
|
-
nextSlug:
|
|
316
|
+
function Tt({
|
|
317
|
+
prevSlug: t,
|
|
318
|
+
prevTitle: n,
|
|
319
|
+
nextSlug: o,
|
|
1007
320
|
nextTitle: a,
|
|
1008
321
|
language: s
|
|
1009
322
|
}) {
|
|
1010
|
-
const { t:
|
|
1011
|
-
const
|
|
1012
|
-
return
|
|
323
|
+
const { t: c } = E(), { config: l } = R(), m = Y(), u = Xe(m.search).advanced, i = l.basePath || "", f = (v) => {
|
|
324
|
+
const b = `${i}/${s}/${v}`;
|
|
325
|
+
return u ? `${b}?advanced=true` : b;
|
|
1013
326
|
};
|
|
1014
|
-
if (!
|
|
327
|
+
if (!t && !o)
|
|
1015
328
|
return null;
|
|
1016
|
-
const
|
|
1017
|
-
|
|
329
|
+
const g = () => {
|
|
330
|
+
bt("auto");
|
|
1018
331
|
};
|
|
1019
|
-
return /* @__PURE__ */
|
|
1020
|
-
|
|
1021
|
-
|
|
332
|
+
return /* @__PURE__ */ e("nav", { className: O.articleNavigation, "aria-label": "Article navigation", children: /* @__PURE__ */ d("div", { className: O.navContainer, children: [
|
|
333
|
+
t ? /* @__PURE__ */ e(
|
|
334
|
+
ue,
|
|
1022
335
|
{
|
|
1023
|
-
to:
|
|
1024
|
-
className:
|
|
1025
|
-
onClick:
|
|
1026
|
-
children: /* @__PURE__ */
|
|
1027
|
-
/* @__PURE__ */
|
|
1028
|
-
/* @__PURE__ */
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
336
|
+
to: f(t),
|
|
337
|
+
className: O.navLink,
|
|
338
|
+
onClick: g,
|
|
339
|
+
children: /* @__PURE__ */ d("div", { className: O.navLinkContent, children: [
|
|
340
|
+
/* @__PURE__ */ e("div", { className: O.navIcon, children: /* @__PURE__ */ e(Je, { size: 20, weight: "bold" }) }),
|
|
341
|
+
/* @__PURE__ */ d("div", { className: O.navText, children: [
|
|
342
|
+
/* @__PURE__ */ e("span", { className: O.navLabel, children: c("nav.previous") }),
|
|
343
|
+
/* @__PURE__ */ e("span", { className: O.navTitle, children: n || t })
|
|
1031
344
|
] })
|
|
1032
345
|
] })
|
|
1033
346
|
}
|
|
1034
|
-
) : /* @__PURE__ */
|
|
1035
|
-
|
|
1036
|
-
|
|
347
|
+
) : /* @__PURE__ */ e("div", {}),
|
|
348
|
+
o ? /* @__PURE__ */ e(
|
|
349
|
+
ue,
|
|
1037
350
|
{
|
|
1038
|
-
to:
|
|
1039
|
-
className:
|
|
1040
|
-
onClick:
|
|
1041
|
-
children: /* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
/* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */
|
|
351
|
+
to: f(o),
|
|
352
|
+
className: O.navLink,
|
|
353
|
+
onClick: g,
|
|
354
|
+
children: /* @__PURE__ */ d("div", { className: O.navLinkContent, children: [
|
|
355
|
+
/* @__PURE__ */ d("div", { className: O.navText, children: [
|
|
356
|
+
/* @__PURE__ */ e("span", { className: O.navLabel, children: c("nav.next") }),
|
|
357
|
+
/* @__PURE__ */ e("span", { className: O.navTitle, children: a || o })
|
|
1045
358
|
] }),
|
|
1046
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ e("div", { className: O.navIcon, children: /* @__PURE__ */ e(ze, { size: 20, weight: "bold" }) })
|
|
1047
360
|
] })
|
|
1048
361
|
}
|
|
1049
|
-
) : /* @__PURE__ */
|
|
362
|
+
) : /* @__PURE__ */ e("div", {})
|
|
1050
363
|
] }) });
|
|
1051
364
|
}
|
|
1052
|
-
const
|
|
1053
|
-
blogSidebar:
|
|
1054
|
-
section:
|
|
1055
|
-
sectionTitle:
|
|
1056
|
-
linksList:
|
|
1057
|
-
link:
|
|
365
|
+
const Lt = "_blogSidebar_1ik3q_1", St = "_section_1ik3q_21", Pt = "_sectionTitle_1ik3q_28", Dt = "_linksList_1ik3q_36", Mt = "_link_1ik3q_36", ae = {
|
|
366
|
+
blogSidebar: Lt,
|
|
367
|
+
section: St,
|
|
368
|
+
sectionTitle: Pt,
|
|
369
|
+
linksList: Dt,
|
|
370
|
+
link: Mt
|
|
1058
371
|
};
|
|
1059
|
-
function
|
|
1060
|
-
const { t
|
|
1061
|
-
return
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
/* @__PURE__ */
|
|
1064
|
-
const
|
|
1065
|
-
return /* @__PURE__ */
|
|
372
|
+
function Bt() {
|
|
373
|
+
const { t } = E(), { config: n } = R(), o = n.socialLinks || [];
|
|
374
|
+
return o.length === 0 ? null : /* @__PURE__ */ e("aside", { className: ae.blogSidebar, children: /* @__PURE__ */ d("div", { className: ae.section, children: [
|
|
375
|
+
/* @__PURE__ */ e("h3", { className: ae.sectionTitle, children: t("ui.connect") }),
|
|
376
|
+
/* @__PURE__ */ e("div", { className: ae.linksList, children: o.map((a, s) => {
|
|
377
|
+
const c = a.icon || Ze, l = a.target === "_blank";
|
|
378
|
+
return /* @__PURE__ */ d(
|
|
1066
379
|
"a",
|
|
1067
380
|
{
|
|
1068
381
|
href: a.url,
|
|
1069
|
-
className:
|
|
382
|
+
className: ae.link,
|
|
1070
383
|
target: a.target || "_blank",
|
|
1071
|
-
rel:
|
|
384
|
+
rel: l ? "noopener noreferrer" : void 0,
|
|
1072
385
|
children: [
|
|
1073
|
-
/* @__PURE__ */
|
|
1074
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ e(c, { size: 18, weight: "duotone" }),
|
|
387
|
+
/* @__PURE__ */ e("span", { children: a.label })
|
|
1075
388
|
]
|
|
1076
389
|
},
|
|
1077
390
|
s
|
|
@@ -1079,761 +392,746 @@ function na() {
|
|
|
1079
392
|
}) })
|
|
1080
393
|
] }) });
|
|
1081
394
|
}
|
|
1082
|
-
const
|
|
1083
|
-
breadcrumb:
|
|
1084
|
-
breadcrumbList:
|
|
1085
|
-
breadcrumbItem:
|
|
1086
|
-
breadcrumbLink:
|
|
1087
|
-
breadcrumbSeparator:
|
|
1088
|
-
breadcrumbCurrent:
|
|
395
|
+
const Et = "_breadcrumb_rarc4_1", Rt = "_breadcrumbList_rarc4_5", At = "_breadcrumbItem_rarc4_15", Ot = "_breadcrumbLink_rarc4_21", jt = "_breadcrumbSeparator_rarc4_41", Wt = "_breadcrumbCurrent_rarc4_46", X = {
|
|
396
|
+
breadcrumb: Et,
|
|
397
|
+
breadcrumbList: Rt,
|
|
398
|
+
breadcrumbItem: At,
|
|
399
|
+
breadcrumbLink: Ot,
|
|
400
|
+
breadcrumbSeparator: jt,
|
|
401
|
+
breadcrumbCurrent: Wt
|
|
1089
402
|
};
|
|
1090
|
-
function
|
|
1091
|
-
const { t:
|
|
1092
|
-
|
|
1093
|
-
},
|
|
1094
|
-
return /* @__PURE__ */
|
|
1095
|
-
/* @__PURE__ */
|
|
403
|
+
function Ht({ articleTitle: t, language: n }) {
|
|
404
|
+
const { t: o } = E(), { config: a } = R(), s = Q(), l = `${a.basePath || ""}/${n}`, m = (u) => {
|
|
405
|
+
u.preventDefault(), window.scrollTo({ top: 0, left: 0, behavior: "auto" }), s(l);
|
|
406
|
+
}, h = (u, i = 60) => u.length <= i ? u : `${u.substring(0, i)}…`;
|
|
407
|
+
return /* @__PURE__ */ e("nav", { className: X.breadcrumb, "aria-label": "Breadcrumb", children: /* @__PURE__ */ d("ol", { className: X.breadcrumbList, children: [
|
|
408
|
+
/* @__PURE__ */ e("li", { className: X.breadcrumbItem, children: /* @__PURE__ */ e(
|
|
1096
409
|
"button",
|
|
1097
410
|
{
|
|
1098
|
-
onClick:
|
|
1099
|
-
className:
|
|
411
|
+
onClick: m,
|
|
412
|
+
className: X.breadcrumbLink,
|
|
1100
413
|
type: "button",
|
|
1101
|
-
children:
|
|
414
|
+
children: o("ui.home")
|
|
1102
415
|
}
|
|
1103
416
|
) }),
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ d("li", { className: X.breadcrumbItem, children: [
|
|
418
|
+
/* @__PURE__ */ e("span", { className: X.breadcrumbSeparator, children: "/" }),
|
|
419
|
+
/* @__PURE__ */ e("span", { className: X.breadcrumbCurrent, children: h(t) })
|
|
1107
420
|
] })
|
|
1108
421
|
] }) });
|
|
1109
422
|
}
|
|
1110
|
-
const
|
|
1111
|
-
metadata:
|
|
1112
|
-
author:
|
|
1113
|
-
date:
|
|
423
|
+
const zt = "_metadata_bsge0_1", Ft = "_author_bsge0_9", qt = "_date_bsge0_10", pe = {
|
|
424
|
+
metadata: zt,
|
|
425
|
+
author: Ft,
|
|
426
|
+
date: qt
|
|
1114
427
|
};
|
|
1115
|
-
function
|
|
1116
|
-
const { t:
|
|
1117
|
-
return !
|
|
1118
|
-
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
|
|
428
|
+
function ve({ date: t, author: n }) {
|
|
429
|
+
const { t: o } = E();
|
|
430
|
+
return !t && !n ? null : /* @__PURE__ */ d("div", { className: pe.metadata, children: [
|
|
431
|
+
n && /* @__PURE__ */ d("span", { className: pe.author, children: [
|
|
432
|
+
/* @__PURE__ */ e(et, { size: 16, weight: "regular" }),
|
|
433
|
+
n
|
|
1121
434
|
] }),
|
|
1122
|
-
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
|
|
435
|
+
t && /* @__PURE__ */ d("span", { className: pe.date, children: [
|
|
436
|
+
/* @__PURE__ */ e(tt, { size: 16, weight: "regular" }),
|
|
437
|
+
o("ui.lastEdited"),
|
|
1125
438
|
": ",
|
|
1126
|
-
|
|
439
|
+
t
|
|
1127
440
|
] })
|
|
1128
441
|
] });
|
|
1129
442
|
}
|
|
1130
|
-
const
|
|
1131
|
-
tableOfContents:
|
|
1132
|
-
header:
|
|
1133
|
-
title:
|
|
1134
|
-
nav:
|
|
1135
|
-
list:
|
|
1136
|
-
link:
|
|
1137
|
-
active:
|
|
1138
|
-
level1:
|
|
1139
|
-
level2:
|
|
1140
|
-
level3:
|
|
1141
|
-
level4:
|
|
1142
|
-
level5:
|
|
1143
|
-
level6:
|
|
443
|
+
const Ut = "_tableOfContents_9ofak_1", Kt = "_header_9ofak_21", Gt = "_title_9ofak_25", Qt = "_nav_9ofak_34", Xt = "_list_9ofak_40", Yt = "_link_9ofak_47", Vt = "_active_9ofak_71", Jt = "_level1_9ofak_87", Zt = "_level2_9ofak_93", en = "_level3_9ofak_98", tn = "_level4_9ofak_104", nn = "_level5_9ofak_110", an = "_level6_9ofak_116", F = {
|
|
444
|
+
tableOfContents: Ut,
|
|
445
|
+
header: Kt,
|
|
446
|
+
title: Gt,
|
|
447
|
+
nav: Qt,
|
|
448
|
+
list: Xt,
|
|
449
|
+
link: Yt,
|
|
450
|
+
active: Vt,
|
|
451
|
+
level1: Jt,
|
|
452
|
+
level2: Zt,
|
|
453
|
+
level3: en,
|
|
454
|
+
level4: tn,
|
|
455
|
+
level5: nn,
|
|
456
|
+
level6: an
|
|
1144
457
|
};
|
|
1145
|
-
function
|
|
1146
|
-
content:
|
|
1147
|
-
englishContent:
|
|
458
|
+
function on({
|
|
459
|
+
content: t,
|
|
460
|
+
englishContent: n
|
|
1148
461
|
}) {
|
|
1149
|
-
const { t:
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
const
|
|
1153
|
-
let
|
|
1154
|
-
const
|
|
1155
|
-
for (;
|
|
1156
|
-
const
|
|
1157
|
-
|
|
462
|
+
const { t: o } = E(), a = Y(), s = Q(), [c, l] = y([]), [m, h] = y(""), u = G(null);
|
|
463
|
+
S(() => {
|
|
464
|
+
h(""), (() => {
|
|
465
|
+
const g = /^(#{1,6})\s+(.+)$/gm, v = [];
|
|
466
|
+
let b = g.exec(t);
|
|
467
|
+
const r = [];
|
|
468
|
+
for (; b !== null; ) {
|
|
469
|
+
const D = b[1].length, z = b[2].trim();
|
|
470
|
+
r.push({ level: D, text: z }), b = g.exec(t);
|
|
1158
471
|
}
|
|
1159
472
|
const _ = /^(#{1,6})\s+(.+)$/gm;
|
|
1160
|
-
let
|
|
1161
|
-
for (;
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
id:
|
|
1165
|
-
text:
|
|
473
|
+
let w = _.exec(n), I = 0;
|
|
474
|
+
for (; w !== null && I < r.length; ) {
|
|
475
|
+
const D = w[2].trim(), z = ee(D);
|
|
476
|
+
v.push({
|
|
477
|
+
id: z,
|
|
478
|
+
text: r[I].text,
|
|
1166
479
|
// Use localized text for display
|
|
1167
|
-
level:
|
|
1168
|
-
}),
|
|
480
|
+
level: r[I].level
|
|
481
|
+
}), I++, w = _.exec(n);
|
|
1169
482
|
}
|
|
1170
|
-
|
|
483
|
+
l(v);
|
|
1171
484
|
})();
|
|
1172
|
-
}, [
|
|
1173
|
-
if (
|
|
1174
|
-
const
|
|
1175
|
-
const
|
|
1176
|
-
(
|
|
485
|
+
}, [t, n]), S(() => {
|
|
486
|
+
if (c.length === 0) return;
|
|
487
|
+
const f = setTimeout(() => {
|
|
488
|
+
const g = c.filter(
|
|
489
|
+
(v) => !document.getElementById(v.id)
|
|
1177
490
|
);
|
|
1178
|
-
|
|
491
|
+
g.length > 0 && console.warn("Some heading elements not found:", g);
|
|
1179
492
|
}, 100);
|
|
1180
|
-
return () => clearTimeout(
|
|
1181
|
-
}, [
|
|
1182
|
-
if (
|
|
1183
|
-
|
|
1184
|
-
const
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1187
|
-
(
|
|
1188
|
-
const
|
|
1189
|
-
if (
|
|
1190
|
-
const
|
|
1191
|
-
|
|
493
|
+
return () => clearTimeout(f);
|
|
494
|
+
}, [c]), S(() => {
|
|
495
|
+
if (c.length === 0) return;
|
|
496
|
+
u.current && u.current.disconnect();
|
|
497
|
+
const f = setTimeout(() => {
|
|
498
|
+
const g = c.map((v) => document.getElementById(v.id)).filter(Boolean);
|
|
499
|
+
g.length !== 0 && (u.current = new IntersectionObserver(
|
|
500
|
+
(v) => {
|
|
501
|
+
const b = v.filter((r) => r.isIntersecting);
|
|
502
|
+
if (b.length > 0) {
|
|
503
|
+
const r = b.reduce((_, w) => _.boundingClientRect.top < w.boundingClientRect.top ? _ : w);
|
|
504
|
+
h(r.target.id);
|
|
1192
505
|
}
|
|
1193
506
|
},
|
|
1194
507
|
{
|
|
1195
508
|
rootMargin: "-80px 0% -80% 0%",
|
|
1196
509
|
threshold: 0
|
|
1197
510
|
}
|
|
1198
|
-
),
|
|
1199
|
-
|
|
511
|
+
), g.forEach((v) => {
|
|
512
|
+
u.current && u.current.observe(v);
|
|
1200
513
|
}));
|
|
1201
514
|
}, 150);
|
|
1202
515
|
return () => {
|
|
1203
|
-
clearTimeout(
|
|
516
|
+
clearTimeout(f), u.current && u.current.disconnect();
|
|
1204
517
|
};
|
|
1205
|
-
}, [
|
|
1206
|
-
|
|
518
|
+
}, [c]), S(() => () => {
|
|
519
|
+
u.current && u.current.disconnect();
|
|
1207
520
|
}, []);
|
|
1208
|
-
const
|
|
1209
|
-
const
|
|
1210
|
-
if (
|
|
1211
|
-
const
|
|
1212
|
-
|
|
1213
|
-
`${a.pathname}?${
|
|
521
|
+
const i = (f) => {
|
|
522
|
+
const g = document.getElementById(f);
|
|
523
|
+
if (g) {
|
|
524
|
+
const v = new URLSearchParams(a.search);
|
|
525
|
+
v.set("a", f), s(
|
|
526
|
+
`${a.pathname}?${v.toString()}${a.hash}`,
|
|
1214
527
|
{
|
|
1215
528
|
replace: !0
|
|
1216
529
|
}
|
|
1217
530
|
);
|
|
1218
|
-
const _ =
|
|
531
|
+
const _ = g.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
1219
532
|
window.scrollTo({
|
|
1220
533
|
top: _,
|
|
1221
534
|
behavior: "smooth"
|
|
1222
535
|
});
|
|
1223
536
|
}
|
|
1224
537
|
};
|
|
1225
|
-
return
|
|
1226
|
-
/* @__PURE__ */
|
|
1227
|
-
/* @__PURE__ */
|
|
538
|
+
return c.length === 0 ? null : /* @__PURE__ */ d("aside", { className: F.tableOfContents, children: [
|
|
539
|
+
/* @__PURE__ */ e("div", { className: F.header, children: /* @__PURE__ */ e("span", { className: F.title, children: o("ui.onThisPage", "On this page") }) }),
|
|
540
|
+
/* @__PURE__ */ e("nav", { className: F.nav, children: /* @__PURE__ */ e("ul", { className: F.list, children: c.map((f) => /* @__PURE__ */ e("li", { className: F.item, children: /* @__PURE__ */ e(
|
|
1228
541
|
"button",
|
|
1229
542
|
{
|
|
1230
|
-
className: `${
|
|
1231
|
-
onClick: () =>
|
|
543
|
+
className: `${F.link} ${F[`level${f.level}`]} ${m === f.id ? F.active : ""}`,
|
|
544
|
+
onClick: () => i(f.id),
|
|
1232
545
|
type: "button",
|
|
1233
|
-
children:
|
|
546
|
+
children: f.text
|
|
1234
547
|
}
|
|
1235
|
-
) },
|
|
548
|
+
) }, f.id)) }) })
|
|
1236
549
|
] });
|
|
1237
550
|
}
|
|
1238
|
-
const
|
|
1239
|
-
overlay:
|
|
1240
|
-
modal:
|
|
1241
|
-
header:
|
|
1242
|
-
title:
|
|
1243
|
-
closeButton:
|
|
1244
|
-
results:
|
|
1245
|
-
resultsList:
|
|
1246
|
-
resultItem:
|
|
1247
|
-
resultTitle:
|
|
1248
|
-
resultSlug:
|
|
1249
|
-
noResults:
|
|
551
|
+
const sn = "_overlay_1e1d4_1", cn = "_modal_1e1d4_26", rn = "_header_1e1d4_50", ln = "_title_1e1d4_58", dn = "_closeButton_1e1d4_65", un = "_results_1e1d4_86", hn = "_resultsList_1e1d4_94", mn = "_resultItem_1e1d4_100", _n = "_resultTitle_1e1d4_119", gn = "_resultSlug_1e1d4_124", pn = "_noResults_1e1d4_130", H = {
|
|
552
|
+
overlay: sn,
|
|
553
|
+
modal: cn,
|
|
554
|
+
header: rn,
|
|
555
|
+
title: ln,
|
|
556
|
+
closeButton: dn,
|
|
557
|
+
results: un,
|
|
558
|
+
resultsList: hn,
|
|
559
|
+
resultItem: mn,
|
|
560
|
+
resultTitle: _n,
|
|
561
|
+
resultSlug: gn,
|
|
562
|
+
noResults: pn
|
|
1250
563
|
};
|
|
1251
|
-
function
|
|
1252
|
-
tag:
|
|
1253
|
-
results:
|
|
1254
|
-
language:
|
|
564
|
+
function fn({
|
|
565
|
+
tag: t,
|
|
566
|
+
results: n,
|
|
567
|
+
language: o,
|
|
1255
568
|
onClose: a
|
|
1256
569
|
}) {
|
|
1257
|
-
const { t: s } =
|
|
1258
|
-
const
|
|
1259
|
-
|
|
570
|
+
const { t: s } = E(), { config: c } = R(), l = Q(), m = (h) => {
|
|
571
|
+
const u = c.basePath || "";
|
|
572
|
+
l(`${u}/${o}/${h}`), a();
|
|
1260
573
|
};
|
|
1261
|
-
return
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
/* @__PURE__ */
|
|
1264
|
-
/* @__PURE__ */
|
|
574
|
+
return Fe(
|
|
575
|
+
/* @__PURE__ */ e("div", { className: H.overlay, onClick: a, children: /* @__PURE__ */ d("div", { className: H.modal, onClick: (h) => h.stopPropagation(), children: [
|
|
576
|
+
/* @__PURE__ */ d("div", { className: H.header, children: [
|
|
577
|
+
/* @__PURE__ */ d("h2", { className: H.title, children: [
|
|
1265
578
|
s("ui.tagResults"),
|
|
1266
579
|
": ",
|
|
1267
|
-
|
|
580
|
+
t
|
|
1268
581
|
] }),
|
|
1269
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ e(
|
|
1270
583
|
"button",
|
|
1271
584
|
{
|
|
1272
585
|
type: "button",
|
|
1273
|
-
className:
|
|
586
|
+
className: H.closeButton,
|
|
1274
587
|
onClick: a,
|
|
1275
588
|
"aria-label": "Close",
|
|
1276
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ e(ke, {})
|
|
1277
590
|
}
|
|
1278
591
|
)
|
|
1279
592
|
] }),
|
|
1280
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ e("div", { className: H.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: H.noResults, children: s("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: H.resultsList, children: n.map((h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
1281
594
|
"button",
|
|
1282
595
|
{
|
|
1283
596
|
type: "button",
|
|
1284
|
-
className:
|
|
1285
|
-
onClick: () =>
|
|
597
|
+
className: H.resultItem,
|
|
598
|
+
onClick: () => m(h.slug),
|
|
1286
599
|
children: [
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ e("div", { className: H.resultTitle, children: h.title }),
|
|
601
|
+
/* @__PURE__ */ d("div", { className: H.resultSlug, children: [
|
|
1289
602
|
"/",
|
|
1290
|
-
|
|
603
|
+
h.slug
|
|
1291
604
|
] })
|
|
1292
605
|
]
|
|
1293
606
|
}
|
|
1294
|
-
) },
|
|
607
|
+
) }, h.slug)) }) })
|
|
1295
608
|
] }) }),
|
|
1296
609
|
document.body
|
|
1297
610
|
);
|
|
1298
611
|
}
|
|
1299
|
-
const
|
|
1300
|
-
tags:
|
|
1301
|
-
compact:
|
|
1302
|
-
tagLabel:
|
|
1303
|
-
tagIcon:
|
|
1304
|
-
tagList:
|
|
1305
|
-
tag:
|
|
612
|
+
const vn = "_tags_11t8a_1", bn = "_compact_11t8a_9", kn = "_tagLabel_11t8a_15", wn = "_tagIcon_11t8a_25", Nn = "_tagList_11t8a_30", $n = "_tag_11t8a_1", Z = {
|
|
613
|
+
tags: vn,
|
|
614
|
+
compact: bn,
|
|
615
|
+
tagLabel: kn,
|
|
616
|
+
tagIcon: wn,
|
|
617
|
+
tagList: Nn,
|
|
618
|
+
tag: $n
|
|
1306
619
|
};
|
|
1307
|
-
function
|
|
1308
|
-
const { t: a } =
|
|
1309
|
-
if (!
|
|
1310
|
-
const s = (
|
|
1311
|
-
|
|
620
|
+
function Cn({ tags: t, variant: n = "default", onTagClick: o }) {
|
|
621
|
+
const { t: a } = E();
|
|
622
|
+
if (!t || t.length === 0) return null;
|
|
623
|
+
const s = (c) => {
|
|
624
|
+
o && o(c);
|
|
1312
625
|
};
|
|
1313
|
-
return /* @__PURE__ */
|
|
626
|
+
return /* @__PURE__ */ d(
|
|
1314
627
|
"div",
|
|
1315
628
|
{
|
|
1316
|
-
className: `${
|
|
629
|
+
className: `${Z.tags} ${n === "compact" ? Z.compact : ""}`,
|
|
1317
630
|
children: [
|
|
1318
|
-
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
/* @__PURE__ */
|
|
631
|
+
n === "default" && /* @__PURE__ */ d("div", { className: Z.tagLabel, children: [
|
|
632
|
+
/* @__PURE__ */ e(nt, { className: Z.tagIcon, weight: "duotone" }),
|
|
633
|
+
/* @__PURE__ */ d("span", { children: [
|
|
1321
634
|
a("ui.tags"),
|
|
1322
635
|
":"
|
|
1323
636
|
] })
|
|
1324
637
|
] }),
|
|
1325
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ e("div", { className: Z.tagList, children: t.map((c) => /* @__PURE__ */ e(
|
|
1326
639
|
"button",
|
|
1327
640
|
{
|
|
1328
641
|
type: "button",
|
|
1329
|
-
className:
|
|
1330
|
-
onClick: () => s(
|
|
1331
|
-
"aria-label": `${a("ui.filterByTag")}: ${
|
|
1332
|
-
children:
|
|
642
|
+
className: Z.tag,
|
|
643
|
+
onClick: () => s(c),
|
|
644
|
+
"aria-label": `${a("ui.filterByTag")}: ${c}`,
|
|
645
|
+
children: c
|
|
1333
646
|
},
|
|
1334
|
-
|
|
647
|
+
c
|
|
1335
648
|
)) })
|
|
1336
649
|
]
|
|
1337
650
|
}
|
|
1338
651
|
);
|
|
1339
652
|
}
|
|
1340
|
-
const
|
|
1341
|
-
contentPage:
|
|
1342
|
-
loadingContainer:
|
|
1343
|
-
errorContainer:
|
|
1344
|
-
skeletonTitle:
|
|
1345
|
-
skeletonParagraph:
|
|
1346
|
-
skeletonParagraphShort:
|
|
1347
|
-
errorText:
|
|
1348
|
-
mdxContent:
|
|
1349
|
-
withMetadata:
|
|
1350
|
-
codeBlock:
|
|
1351
|
-
codeLanguage:
|
|
1352
|
-
},
|
|
1353
|
-
const
|
|
1354
|
-
return
|
|
1355
|
-
title:
|
|
1356
|
-
content:
|
|
1357
|
-
} : { title: void 0, content:
|
|
653
|
+
const In = "_contentPage_818m0_1", xn = "_loadingContainer_818m0_48", yn = "_errorContainer_818m0_49", Tn = "_skeletonTitle_818m0_71", Ln = "_skeletonParagraph_818m0_80", Sn = "_skeletonParagraphShort_818m0_93", Pn = "_errorText_818m0_107", Dn = "_mdxContent_818m0_112", Mn = "_withMetadata_818m0_125", Bn = "_codeBlock_818m0_300", En = "_codeLanguage_818m0_304", B = {
|
|
654
|
+
contentPage: In,
|
|
655
|
+
loadingContainer: xn,
|
|
656
|
+
errorContainer: yn,
|
|
657
|
+
skeletonTitle: Tn,
|
|
658
|
+
skeletonParagraph: Ln,
|
|
659
|
+
skeletonParagraphShort: Sn,
|
|
660
|
+
errorText: Pn,
|
|
661
|
+
mdxContent: Dn,
|
|
662
|
+
withMetadata: Mn,
|
|
663
|
+
codeBlock: Bn,
|
|
664
|
+
codeLanguage: En
|
|
665
|
+
}, We = (t) => {
|
|
666
|
+
const n = t.match(/^\s*#\s+(.+)\s*(?:\n+|$)/);
|
|
667
|
+
return n ? {
|
|
668
|
+
title: n[1].trim(),
|
|
669
|
+
content: t.replace(/^\s*#\s+.+\s*(?:\n+|$)/, "")
|
|
670
|
+
} : { title: void 0, content: t };
|
|
1358
671
|
};
|
|
1359
|
-
function
|
|
1360
|
-
var
|
|
1361
|
-
const { slug:
|
|
1362
|
-
if (
|
|
672
|
+
function Rn({ language: t }) {
|
|
673
|
+
var Ie, xe, ye, Te, Le;
|
|
674
|
+
const { slug: n } = be(), o = Y(), { config: a, loadContent: s, loadEnglishContent: c } = R(), [l, m] = y(""), [h, u] = y(""), [i, f] = y({}), [g, v] = y(!0), [b, r] = y(null), [_, w] = y(!0), [I, D] = y(null), [z, k] = y(""), [$, A] = y({}), W = G(0), q = G([]), ce = Xe(o.search), V = ce.advanced;
|
|
675
|
+
if (S(() => {
|
|
1363
676
|
(async () => {
|
|
1364
|
-
if (!
|
|
1365
|
-
|
|
1366
|
-
const
|
|
677
|
+
if (!n) return;
|
|
678
|
+
v(!0), r(null), W.current = 0;
|
|
679
|
+
const x = (a == null ? void 0 : a.navigationData) || [];
|
|
1367
680
|
let P = !0;
|
|
1368
|
-
for (const
|
|
1369
|
-
if ("items" in
|
|
1370
|
-
const
|
|
1371
|
-
if (
|
|
1372
|
-
P =
|
|
681
|
+
for (const N of x)
|
|
682
|
+
if ("items" in N) {
|
|
683
|
+
const T = N.items.find((J) => J.slug === n);
|
|
684
|
+
if (T) {
|
|
685
|
+
P = T.showTableOfContents !== !1;
|
|
1373
686
|
break;
|
|
1374
687
|
}
|
|
1375
|
-
} else if (
|
|
1376
|
-
P =
|
|
688
|
+
} else if (N.slug === n) {
|
|
689
|
+
P = N.showTableOfContents !== !1;
|
|
1377
690
|
break;
|
|
1378
691
|
}
|
|
1379
|
-
|
|
692
|
+
w(P);
|
|
1380
693
|
try {
|
|
1381
|
-
let
|
|
694
|
+
let N;
|
|
1382
695
|
try {
|
|
1383
|
-
|
|
696
|
+
N = await s(t, n, V);
|
|
1384
697
|
} catch {
|
|
1385
|
-
if (
|
|
1386
|
-
|
|
698
|
+
if (V)
|
|
699
|
+
N = await s(t, n, !1);
|
|
1387
700
|
else
|
|
1388
701
|
throw new Error("Content not found");
|
|
1389
702
|
}
|
|
1390
|
-
let
|
|
703
|
+
let T = "";
|
|
1391
704
|
try {
|
|
1392
|
-
|
|
705
|
+
T = await c(n, V);
|
|
1393
706
|
} catch {
|
|
1394
|
-
|
|
707
|
+
V && (T = await c(n, !1));
|
|
1395
708
|
}
|
|
1396
|
-
const
|
|
1397
|
-
let
|
|
1398
|
-
if (
|
|
1399
|
-
const
|
|
1400
|
-
|
|
709
|
+
const J = typeof N.frontmatter.title == "string" ? N.frontmatter.title : void 0;
|
|
710
|
+
let le = N.content, ie = T, _e = "";
|
|
711
|
+
if (J) {
|
|
712
|
+
const de = We(T), Ye = We(N.content);
|
|
713
|
+
_e = de.title || "", ie = de.content, le = Ye.content;
|
|
1401
714
|
} else
|
|
1402
|
-
|
|
1403
|
-
const
|
|
1404
|
-
let
|
|
1405
|
-
|
|
715
|
+
_e = "";
|
|
716
|
+
const Se = /^(#{1,6})\s+(.+)$/gm, Pe = [];
|
|
717
|
+
let ge = Se.exec(
|
|
718
|
+
ie
|
|
1406
719
|
);
|
|
1407
|
-
for (;
|
|
1408
|
-
const
|
|
1409
|
-
|
|
720
|
+
for (; ge !== null; ) {
|
|
721
|
+
const de = ge[2].trim();
|
|
722
|
+
Pe.push(de), ge = Se.exec(ie);
|
|
1410
723
|
}
|
|
1411
|
-
|
|
1412
|
-
} catch (
|
|
1413
|
-
|
|
724
|
+
q.current = Pe, k(_e), u(ie), m(le), f(N.frontmatter);
|
|
725
|
+
} catch (N) {
|
|
726
|
+
r(N instanceof Error ? N.message : "Failed to load content");
|
|
1414
727
|
} finally {
|
|
1415
|
-
|
|
728
|
+
v(!1);
|
|
1416
729
|
}
|
|
1417
730
|
})();
|
|
1418
731
|
}, [
|
|
732
|
+
n,
|
|
1419
733
|
t,
|
|
1420
|
-
|
|
1421
|
-
ne,
|
|
734
|
+
V,
|
|
1422
735
|
a.navigationData,
|
|
1423
736
|
s,
|
|
1424
|
-
|
|
1425
|
-
]),
|
|
1426
|
-
if (!
|
|
1427
|
-
const
|
|
1428
|
-
|
|
737
|
+
c
|
|
738
|
+
]), S(() => {
|
|
739
|
+
if (!g && ce.anchor) {
|
|
740
|
+
const p = setTimeout(() => {
|
|
741
|
+
je(ce.anchor);
|
|
1429
742
|
}, 150);
|
|
1430
|
-
return () => clearTimeout(
|
|
743
|
+
return () => clearTimeout(p);
|
|
1431
744
|
}
|
|
1432
|
-
}, [
|
|
745
|
+
}, [g, ce.anchor]), S(() => {
|
|
1433
746
|
(async () => {
|
|
1434
|
-
if (!
|
|
1435
|
-
|
|
747
|
+
if (!n || !a.showArticleNavigation || !a.navigationData) {
|
|
748
|
+
A({});
|
|
1436
749
|
return;
|
|
1437
750
|
}
|
|
1438
751
|
try {
|
|
1439
|
-
const
|
|
752
|
+
const x = await he(
|
|
1440
753
|
a.navigationData,
|
|
1441
|
-
|
|
754
|
+
t,
|
|
1442
755
|
s
|
|
1443
|
-
), P =
|
|
1444
|
-
|
|
1445
|
-
} catch (
|
|
1446
|
-
console.error("Failed to calculate adjacent articles:",
|
|
756
|
+
), P = pt(n, x);
|
|
757
|
+
A(P);
|
|
758
|
+
} catch (x) {
|
|
759
|
+
console.error("Failed to calculate adjacent articles:", x), A({});
|
|
1447
760
|
}
|
|
1448
761
|
})();
|
|
1449
762
|
}, [
|
|
763
|
+
n,
|
|
1450
764
|
t,
|
|
1451
|
-
e,
|
|
1452
765
|
a.showArticleNavigation,
|
|
1453
766
|
a.navigationData,
|
|
1454
767
|
s
|
|
1455
|
-
]),
|
|
1456
|
-
return /* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
/* @__PURE__ */
|
|
768
|
+
]), g)
|
|
769
|
+
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ d("div", { className: B.loadingContainer, children: [
|
|
770
|
+
/* @__PURE__ */ e("div", { className: B.skeletonTitle }),
|
|
771
|
+
/* @__PURE__ */ e("div", { className: B.skeletonParagraph }),
|
|
772
|
+
/* @__PURE__ */ e("div", { className: B.skeletonParagraph }),
|
|
773
|
+
/* @__PURE__ */ e("div", { className: B.skeletonParagraphShort })
|
|
1461
774
|
] }) });
|
|
1462
|
-
if (
|
|
1463
|
-
return /* @__PURE__ */
|
|
775
|
+
if (b)
|
|
776
|
+
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ e("div", { className: B.errorContainer, children: /* @__PURE__ */ d("div", { className: B.errorText, children: [
|
|
1464
777
|
"Error: ",
|
|
1465
|
-
|
|
778
|
+
b
|
|
1466
779
|
] }) }) });
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1469
|
-
let
|
|
1470
|
-
const
|
|
1471
|
-
|
|
1472
|
-
}
|
|
1473
|
-
return /* @__PURE__ */
|
|
1474
|
-
/* @__PURE__ */
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
ye && /* @__PURE__ */ o("meta", { property: "og:url", content: ye }),
|
|
1480
|
-
/* @__PURE__ */ o("meta", { property: "og:title", content: Se }),
|
|
1481
|
-
ae && /* @__PURE__ */ o("meta", { property: "og:description", content: ae }),
|
|
1482
|
-
be && /* @__PURE__ */ o("meta", { property: "og:image", content: be }),
|
|
1483
|
-
/* @__PURE__ */ o("meta", { name: "twitter:card", content: "summary_large_image" }),
|
|
1484
|
-
ye && /* @__PURE__ */ o("meta", { name: "twitter:url", content: ye }),
|
|
1485
|
-
/* @__PURE__ */ o("meta", { name: "twitter:title", content: Se }),
|
|
1486
|
-
ae && /* @__PURE__ */ o("meta", { name: "twitter:description", content: ae }),
|
|
1487
|
-
be && /* @__PURE__ */ o("meta", { name: "twitter:image", content: be })
|
|
1488
|
-
] }),
|
|
1489
|
-
/* @__PURE__ */ m("div", { className: O.contentPage, children: [
|
|
1490
|
-
/* @__PURE__ */ o(ln, { hasAdvanced: u.hasAdvanced || !1 }),
|
|
1491
|
-
ve && /* @__PURE__ */ m(G, { children: [
|
|
1492
|
-
/* @__PURE__ */ o(la, { articleTitle: u.title, language: e }),
|
|
1493
|
-
/* @__PURE__ */ o(
|
|
780
|
+
const re = typeof i.title == "string" && i.title.trim().length > 0, me = re ? ee(z || i.title) : "", $e = !!(i.date || i.author);
|
|
781
|
+
W.current = 0;
|
|
782
|
+
let Ce = !1;
|
|
783
|
+
const te = (p, x) => {
|
|
784
|
+
p.preventDefault(), je(x), vt(x, V);
|
|
785
|
+
};
|
|
786
|
+
return /* @__PURE__ */ d(K, { children: [
|
|
787
|
+
/* @__PURE__ */ d("div", { className: B.contentPage, children: [
|
|
788
|
+
/* @__PURE__ */ e(mt, { hasAdvanced: i.hasAdvanced || !1 }),
|
|
789
|
+
re && /* @__PURE__ */ d(K, { children: [
|
|
790
|
+
/* @__PURE__ */ e(Ht, { articleTitle: i.title, language: t }),
|
|
791
|
+
/* @__PURE__ */ e(
|
|
1494
792
|
"h1",
|
|
1495
793
|
{
|
|
1496
|
-
id:
|
|
1497
|
-
className:
|
|
1498
|
-
children: /* @__PURE__ */
|
|
794
|
+
id: me,
|
|
795
|
+
className: $e ? B.withMetadata : void 0,
|
|
796
|
+
children: /* @__PURE__ */ e(
|
|
1499
797
|
"a",
|
|
1500
798
|
{
|
|
1501
|
-
href: `#${
|
|
1502
|
-
onClick: (
|
|
799
|
+
href: `#${me}`,
|
|
800
|
+
onClick: (p) => te(p, me),
|
|
1503
801
|
style: { color: "inherit", textDecoration: "none" },
|
|
1504
|
-
children:
|
|
802
|
+
children: i.title
|
|
1505
803
|
}
|
|
1506
804
|
)
|
|
1507
805
|
}
|
|
1508
806
|
),
|
|
1509
|
-
|
|
807
|
+
$e && /* @__PURE__ */ e(ve, { date: i.date, author: i.author })
|
|
1510
808
|
] }),
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
|
|
809
|
+
/* @__PURE__ */ e("div", { className: B.mdxContent, children: /* @__PURE__ */ e(
|
|
810
|
+
lt,
|
|
1513
811
|
{
|
|
1514
|
-
remarkPlugins: [
|
|
812
|
+
remarkPlugins: [it],
|
|
1515
813
|
components: {
|
|
1516
|
-
h1: ({ children:
|
|
1517
|
-
const
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1520
|
-
return /* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */
|
|
814
|
+
h1: ({ children: p }) => {
|
|
815
|
+
const x = W.current++, P = q.current[x] || "", N = ee(P), T = !Ce;
|
|
816
|
+
Ce = !0;
|
|
817
|
+
const J = i.date || i.author;
|
|
818
|
+
return /* @__PURE__ */ d(K, { children: [
|
|
819
|
+
/* @__PURE__ */ e(
|
|
1522
820
|
"h1",
|
|
1523
821
|
{
|
|
1524
|
-
id:
|
|
1525
|
-
className:
|
|
1526
|
-
children: /* @__PURE__ */
|
|
822
|
+
id: N,
|
|
823
|
+
className: T && J && !re ? B.withMetadata : void 0,
|
|
824
|
+
children: /* @__PURE__ */ e(
|
|
1527
825
|
"a",
|
|
1528
826
|
{
|
|
1529
|
-
href: `#${
|
|
1530
|
-
onClick: (
|
|
827
|
+
href: `#${N}`,
|
|
828
|
+
onClick: (le) => te(le, N),
|
|
1531
829
|
style: { color: "inherit", textDecoration: "none" },
|
|
1532
|
-
children:
|
|
830
|
+
children: p
|
|
1533
831
|
}
|
|
1534
832
|
)
|
|
1535
833
|
}
|
|
1536
834
|
),
|
|
1537
|
-
|
|
1538
|
-
|
|
835
|
+
T && J && !re && /* @__PURE__ */ e(
|
|
836
|
+
ve,
|
|
1539
837
|
{
|
|
1540
|
-
date:
|
|
1541
|
-
author:
|
|
838
|
+
date: i.date,
|
|
839
|
+
author: i.author
|
|
1542
840
|
}
|
|
1543
841
|
)
|
|
1544
842
|
] });
|
|
1545
843
|
},
|
|
1546
|
-
h2: ({ children:
|
|
1547
|
-
const
|
|
1548
|
-
return /* @__PURE__ */
|
|
844
|
+
h2: ({ children: p }) => {
|
|
845
|
+
const x = W.current++, P = q.current[x] || "", N = ee(P);
|
|
846
|
+
return /* @__PURE__ */ e("h2", { id: N, children: /* @__PURE__ */ e(
|
|
1549
847
|
"a",
|
|
1550
848
|
{
|
|
1551
|
-
href: `#${
|
|
1552
|
-
onClick: (
|
|
849
|
+
href: `#${N}`,
|
|
850
|
+
onClick: (T) => te(T, N),
|
|
1553
851
|
style: { color: "inherit", textDecoration: "none" },
|
|
1554
|
-
children:
|
|
852
|
+
children: p
|
|
1555
853
|
}
|
|
1556
854
|
) });
|
|
1557
855
|
},
|
|
1558
|
-
h3: ({ children:
|
|
1559
|
-
const
|
|
1560
|
-
return /* @__PURE__ */
|
|
856
|
+
h3: ({ children: p }) => {
|
|
857
|
+
const x = W.current++, P = q.current[x] || "", N = ee(P);
|
|
858
|
+
return /* @__PURE__ */ e("h3", { id: N, children: /* @__PURE__ */ e(
|
|
1561
859
|
"a",
|
|
1562
860
|
{
|
|
1563
|
-
href: `#${
|
|
1564
|
-
onClick: (
|
|
861
|
+
href: `#${N}`,
|
|
862
|
+
onClick: (T) => te(T, N),
|
|
1565
863
|
style: { color: "inherit", textDecoration: "none" },
|
|
1566
|
-
children:
|
|
864
|
+
children: p
|
|
1567
865
|
}
|
|
1568
866
|
) });
|
|
1569
867
|
},
|
|
1570
|
-
h4: ({ children:
|
|
1571
|
-
const
|
|
1572
|
-
return /* @__PURE__ */
|
|
868
|
+
h4: ({ children: p }) => {
|
|
869
|
+
const x = W.current++, P = q.current[x] || "", N = ee(P);
|
|
870
|
+
return /* @__PURE__ */ e("h4", { id: N, children: /* @__PURE__ */ e(
|
|
1573
871
|
"a",
|
|
1574
872
|
{
|
|
1575
|
-
href: `#${
|
|
1576
|
-
onClick: (
|
|
873
|
+
href: `#${N}`,
|
|
874
|
+
onClick: (T) => te(T, N),
|
|
1577
875
|
style: { color: "inherit", textDecoration: "none" },
|
|
1578
|
-
children:
|
|
876
|
+
children: p
|
|
1579
877
|
}
|
|
1580
878
|
) });
|
|
1581
879
|
},
|
|
1582
|
-
h5: ({ children:
|
|
1583
|
-
const
|
|
1584
|
-
return /* @__PURE__ */
|
|
880
|
+
h5: ({ children: p }) => {
|
|
881
|
+
const x = `h5-${W.current++}`;
|
|
882
|
+
return /* @__PURE__ */ e("h5", { id: x, children: p });
|
|
1585
883
|
},
|
|
1586
|
-
h6: ({ children:
|
|
1587
|
-
const
|
|
1588
|
-
return /* @__PURE__ */
|
|
884
|
+
h6: ({ children: p }) => {
|
|
885
|
+
const x = `h6-${W.current++}`;
|
|
886
|
+
return /* @__PURE__ */ e("h6", { id: x, children: p });
|
|
1589
887
|
},
|
|
1590
|
-
p: ({ children:
|
|
1591
|
-
ul: ({ children:
|
|
1592
|
-
ol: ({ children:
|
|
1593
|
-
li: ({ children:
|
|
1594
|
-
code: ({ className:
|
|
1595
|
-
if (!
|
|
1596
|
-
return /* @__PURE__ */
|
|
1597
|
-
const
|
|
1598
|
-
return /* @__PURE__ */
|
|
1599
|
-
|
|
1600
|
-
/* @__PURE__ */
|
|
888
|
+
p: ({ children: p }) => /* @__PURE__ */ e("p", { children: p }),
|
|
889
|
+
ul: ({ children: p }) => /* @__PURE__ */ e("ul", { children: p }),
|
|
890
|
+
ol: ({ children: p }) => /* @__PURE__ */ e("ol", { children: p }),
|
|
891
|
+
li: ({ children: p }) => /* @__PURE__ */ e("li", { children: p }),
|
|
892
|
+
code: ({ className: p, children: x, ...P }) => {
|
|
893
|
+
if (!p)
|
|
894
|
+
return /* @__PURE__ */ e("code", { ...P, children: x });
|
|
895
|
+
const T = (p == null ? void 0 : p.replace("language-", "")) || "";
|
|
896
|
+
return /* @__PURE__ */ d("div", { className: B.codeBlock, children: [
|
|
897
|
+
T && /* @__PURE__ */ e("div", { className: B.codeLanguage, children: T }),
|
|
898
|
+
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: p, ...P, children: x }) })
|
|
1601
899
|
] });
|
|
1602
900
|
},
|
|
1603
|
-
pre: ({ children:
|
|
901
|
+
pre: ({ children: p }) => /* @__PURE__ */ e(K, { children: p }),
|
|
1604
902
|
// Let code component handle pre styling
|
|
1605
|
-
blockquote: ({ children:
|
|
1606
|
-
a: ({ href:
|
|
1607
|
-
if (
|
|
1608
|
-
const
|
|
1609
|
-
|
|
1610
|
-
|
|
903
|
+
blockquote: ({ children: p }) => /* @__PURE__ */ e("blockquote", { children: p }),
|
|
904
|
+
a: ({ href: p, children: x, ...P }) => {
|
|
905
|
+
if (p != null && p.startsWith("./")) {
|
|
906
|
+
const N = p.slice(2), T = ft(
|
|
907
|
+
N,
|
|
908
|
+
t,
|
|
1611
909
|
a.basePath
|
|
1612
910
|
);
|
|
1613
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ e("a", { href: T, ...P, children: x });
|
|
1614
912
|
}
|
|
1615
|
-
return
|
|
913
|
+
return p != null && p.startsWith("http://") || p != null && p.startsWith("https://") ? /* @__PURE__ */ e(
|
|
1616
914
|
"a",
|
|
1617
915
|
{
|
|
1618
|
-
href:
|
|
916
|
+
href: p,
|
|
1619
917
|
target: "_blank",
|
|
1620
918
|
rel: "noopener noreferrer",
|
|
1621
919
|
...P,
|
|
1622
|
-
children:
|
|
920
|
+
children: x
|
|
1623
921
|
}
|
|
1624
|
-
) : /* @__PURE__ */
|
|
922
|
+
) : /* @__PURE__ */ e("a", { href: p, ...P, children: x });
|
|
1625
923
|
},
|
|
1626
|
-
strong: ({ children:
|
|
1627
|
-
em: ({ children:
|
|
924
|
+
strong: ({ children: p }) => /* @__PURE__ */ e("strong", { children: p }),
|
|
925
|
+
em: ({ children: p }) => /* @__PURE__ */ e("em", { children: p })
|
|
1628
926
|
},
|
|
1629
|
-
children:
|
|
927
|
+
children: l
|
|
1630
928
|
}
|
|
1631
929
|
) }),
|
|
1632
|
-
a.articleCTA && /* @__PURE__ */
|
|
1633
|
-
|
|
1634
|
-
|
|
930
|
+
a.articleCTA && /* @__PURE__ */ e("div", { children: a.articleCTA }),
|
|
931
|
+
i.tags && i.tags.length > 0 && /* @__PURE__ */ e(
|
|
932
|
+
Cn,
|
|
1635
933
|
{
|
|
1636
|
-
tags:
|
|
934
|
+
tags: i.tags,
|
|
1637
935
|
variant: "compact",
|
|
1638
|
-
onTagClick: (
|
|
936
|
+
onTagClick: (p) => D(p)
|
|
1639
937
|
}
|
|
1640
938
|
),
|
|
1641
|
-
a.showArticleNavigation && /* @__PURE__ */
|
|
1642
|
-
|
|
939
|
+
a.showArticleNavigation && /* @__PURE__ */ e(
|
|
940
|
+
Tt,
|
|
1643
941
|
{
|
|
1644
|
-
prevSlug: (
|
|
1645
|
-
prevTitle: (
|
|
1646
|
-
nextSlug: (
|
|
1647
|
-
nextTitle: (
|
|
1648
|
-
language:
|
|
942
|
+
prevSlug: (Ie = $.prev) == null ? void 0 : Ie.slug,
|
|
943
|
+
prevTitle: (xe = $.prev) == null ? void 0 : xe.title,
|
|
944
|
+
nextSlug: (ye = $.next) == null ? void 0 : ye.slug,
|
|
945
|
+
nextTitle: (Te = $.next) == null ? void 0 : Te.title,
|
|
946
|
+
language: t
|
|
1649
947
|
}
|
|
1650
948
|
)
|
|
1651
949
|
] }),
|
|
1652
|
-
_ && /* @__PURE__ */
|
|
1653
|
-
|
|
1654
|
-
|
|
950
|
+
_ && /* @__PURE__ */ e(on, { content: l, englishContent: h }),
|
|
951
|
+
I && ((Le = a.tagIndex) == null ? void 0 : Le[t]) && /* @__PURE__ */ e(
|
|
952
|
+
fn,
|
|
1655
953
|
{
|
|
1656
|
-
tag:
|
|
1657
|
-
results: a.tagIndex[
|
|
1658
|
-
language:
|
|
1659
|
-
onClose: () =>
|
|
954
|
+
tag: I,
|
|
955
|
+
results: a.tagIndex[t][I] || [],
|
|
956
|
+
language: t,
|
|
957
|
+
onClose: () => D(null)
|
|
1660
958
|
}
|
|
1661
959
|
)
|
|
1662
960
|
] });
|
|
1663
961
|
}
|
|
1664
|
-
const
|
|
1665
|
-
searchButton:
|
|
1666
|
-
searchIcon:
|
|
1667
|
-
searchHint:
|
|
1668
|
-
kbd:
|
|
1669
|
-
searchOverlay:
|
|
1670
|
-
searchModal:
|
|
1671
|
-
searchHeader:
|
|
1672
|
-
searchInput:
|
|
1673
|
-
closeButton:
|
|
1674
|
-
searchResults:
|
|
1675
|
-
resultsList:
|
|
1676
|
-
resultItem:
|
|
1677
|
-
selected:
|
|
1678
|
-
resultTitle:
|
|
1679
|
-
resultSlug:
|
|
1680
|
-
noResults:
|
|
1681
|
-
searchHints:
|
|
1682
|
-
hint:
|
|
962
|
+
const An = "_searchButton_1k9sl_1", On = "_searchIcon_1k9sl_17", jn = "_searchHint_1k9sl_23", Wn = "_kbd_1k9sl_27", Hn = "_searchOverlay_1k9sl_42", zn = "_searchModal_1k9sl_67", Fn = "_searchHeader_1k9sl_91", qn = "_searchInput_1k9sl_105", Un = "_closeButton_1k9sl_123", Kn = "_searchResults_1k9sl_144", Gn = "_resultsList_1k9sl_152", Qn = "_resultItem_1k9sl_158", Xn = "_selected_1k9sl_173", Yn = "_resultTitle_1k9sl_176", Vn = "_resultSlug_1k9sl_180", Jn = "_noResults_1k9sl_186", Zn = "_searchHints_1k9sl_193", ea = "_hint_1k9sl_210", L = {
|
|
963
|
+
searchButton: An,
|
|
964
|
+
searchIcon: On,
|
|
965
|
+
searchHint: jn,
|
|
966
|
+
kbd: Wn,
|
|
967
|
+
searchOverlay: Hn,
|
|
968
|
+
searchModal: zn,
|
|
969
|
+
searchHeader: Fn,
|
|
970
|
+
searchInput: qn,
|
|
971
|
+
closeButton: Un,
|
|
972
|
+
searchResults: Kn,
|
|
973
|
+
resultsList: Gn,
|
|
974
|
+
resultItem: Qn,
|
|
975
|
+
selected: Xn,
|
|
976
|
+
resultTitle: Yn,
|
|
977
|
+
resultSlug: Vn,
|
|
978
|
+
noResults: Jn,
|
|
979
|
+
searchHints: Zn,
|
|
980
|
+
hint: ea
|
|
1683
981
|
};
|
|
1684
|
-
function
|
|
1685
|
-
const { t } =
|
|
1686
|
-
|
|
982
|
+
function ta({ language: t }) {
|
|
983
|
+
const { t: n } = E(), o = Q(), { config: a, loadContent: s } = R(), [c, l] = y(!1), [m, h] = y(""), [u, i] = y([]), [f, g] = y(0), [v, b] = y([]), r = G(null), _ = G(null), I = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K";
|
|
984
|
+
S(() => {
|
|
1687
985
|
(async () => {
|
|
1688
986
|
if (a.navigationData)
|
|
1689
987
|
try {
|
|
1690
|
-
const
|
|
988
|
+
const A = (await he(
|
|
1691
989
|
a.navigationData,
|
|
1692
|
-
|
|
990
|
+
t,
|
|
1693
991
|
s
|
|
1694
|
-
)).flatMap((
|
|
1695
|
-
title:
|
|
1696
|
-
slug:
|
|
1697
|
-
})) : [{ title:
|
|
1698
|
-
|
|
1699
|
-
} catch (
|
|
1700
|
-
console.error("Failed to build search index:",
|
|
992
|
+
)).flatMap((W) => se(W) ? W.items.map((q) => ({
|
|
993
|
+
title: q.title,
|
|
994
|
+
slug: q.slug
|
|
995
|
+
})) : [{ title: W.title, slug: W.slug }]);
|
|
996
|
+
b(A);
|
|
997
|
+
} catch ($) {
|
|
998
|
+
console.error("Failed to build search index:", $);
|
|
1701
999
|
}
|
|
1702
1000
|
})();
|
|
1703
|
-
}, [a.navigationData,
|
|
1704
|
-
if (!
|
|
1705
|
-
|
|
1001
|
+
}, [a.navigationData, t, s]), S(() => {
|
|
1002
|
+
if (!m.trim()) {
|
|
1003
|
+
i([]), g(0);
|
|
1706
1004
|
return;
|
|
1707
1005
|
}
|
|
1708
|
-
const
|
|
1709
|
-
(
|
|
1006
|
+
const k = m.toLowerCase(), $ = v.filter(
|
|
1007
|
+
(A) => A.title.toLowerCase().includes(k) || A.slug.toLowerCase().includes(k)
|
|
1710
1008
|
);
|
|
1711
|
-
|
|
1712
|
-
}, [
|
|
1713
|
-
const
|
|
1714
|
-
(
|
|
1715
|
-
var
|
|
1716
|
-
return (
|
|
1717
|
-
}, 100)),
|
|
1009
|
+
i($), g(0);
|
|
1010
|
+
}, [m]), S(() => {
|
|
1011
|
+
const k = ($) => {
|
|
1012
|
+
($.metaKey || $.ctrlKey) && $.key === "k" && ($.preventDefault(), l(!0), setTimeout(() => {
|
|
1013
|
+
var A;
|
|
1014
|
+
return (A = r.current) == null ? void 0 : A.focus();
|
|
1015
|
+
}, 100)), $.key === "Escape" && c && (l(!1), h(""));
|
|
1718
1016
|
};
|
|
1719
|
-
return document.addEventListener("keydown",
|
|
1720
|
-
}, [
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1723
|
-
var
|
|
1724
|
-
return (
|
|
1017
|
+
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
1018
|
+
}, [c]), S(() => {
|
|
1019
|
+
const k = () => {
|
|
1020
|
+
l(!0), setTimeout(() => {
|
|
1021
|
+
var A;
|
|
1022
|
+
return (A = r.current) == null ? void 0 : A.focus();
|
|
1725
1023
|
}, 100);
|
|
1726
|
-
},
|
|
1727
|
-
|
|
1024
|
+
}, $ = () => {
|
|
1025
|
+
l(!1), h("");
|
|
1728
1026
|
};
|
|
1729
|
-
return window.addEventListener("blog:open-search",
|
|
1730
|
-
window.removeEventListener("blog:open-search",
|
|
1027
|
+
return window.addEventListener("blog:open-search", k), window.addEventListener("blog:close-search", $), () => {
|
|
1028
|
+
window.removeEventListener("blog:open-search", k), window.removeEventListener("blog:close-search", $);
|
|
1731
1029
|
};
|
|
1732
1030
|
}, []);
|
|
1733
|
-
const
|
|
1734
|
-
|
|
1031
|
+
const D = (k) => {
|
|
1032
|
+
k.key === "ArrowDown" ? (k.preventDefault(), g(($) => Math.min($ + 1, u.length - 1))) : k.key === "ArrowUp" ? (k.preventDefault(), g(($) => Math.max($ - 1, 0))) : k.key === "Enter" && u[f] && (k.preventDefault(), z(u[f].slug));
|
|
1735
1033
|
};
|
|
1736
|
-
|
|
1737
|
-
const
|
|
1738
|
-
_.current && !_.current.contains(
|
|
1034
|
+
S(() => {
|
|
1035
|
+
const k = ($) => {
|
|
1036
|
+
_.current && !_.current.contains($.target) && (l(!1), h(""));
|
|
1739
1037
|
};
|
|
1740
|
-
return
|
|
1741
|
-
}, [
|
|
1742
|
-
const
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1038
|
+
return c && document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
1039
|
+
}, [c]);
|
|
1040
|
+
const z = (k) => {
|
|
1041
|
+
const $ = a.basePath || "";
|
|
1042
|
+
o(`${$}/${t}/${k}`), l(!1), h("");
|
|
1745
1043
|
};
|
|
1746
|
-
return /* @__PURE__ */
|
|
1747
|
-
/* @__PURE__ */
|
|
1044
|
+
return /* @__PURE__ */ d(K, { children: [
|
|
1045
|
+
/* @__PURE__ */ d(
|
|
1748
1046
|
"button",
|
|
1749
1047
|
{
|
|
1750
1048
|
type: "button",
|
|
1751
|
-
className:
|
|
1049
|
+
className: L.searchButton,
|
|
1752
1050
|
onClick: () => {
|
|
1753
|
-
|
|
1754
|
-
var
|
|
1755
|
-
return (
|
|
1051
|
+
l(!0), setTimeout(() => {
|
|
1052
|
+
var k;
|
|
1053
|
+
return (k = r.current) == null ? void 0 : k.focus();
|
|
1756
1054
|
}, 100);
|
|
1757
1055
|
},
|
|
1758
|
-
"aria-label":
|
|
1056
|
+
"aria-label": n("ui.search"),
|
|
1759
1057
|
children: [
|
|
1760
|
-
/* @__PURE__ */
|
|
1761
|
-
/* @__PURE__ */
|
|
1762
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ e(Me, { className: L.searchIcon }),
|
|
1059
|
+
/* @__PURE__ */ e("span", { className: L.searchHint, children: n("ui.search") }),
|
|
1060
|
+
/* @__PURE__ */ e("kbd", { className: L.kbd, children: I })
|
|
1763
1061
|
]
|
|
1764
1062
|
}
|
|
1765
1063
|
),
|
|
1766
|
-
|
|
1767
|
-
/* @__PURE__ */
|
|
1064
|
+
c && Fe(
|
|
1065
|
+
/* @__PURE__ */ e(
|
|
1768
1066
|
"div",
|
|
1769
1067
|
{
|
|
1770
|
-
className:
|
|
1068
|
+
className: L.searchOverlay,
|
|
1771
1069
|
onClick: () => {
|
|
1772
|
-
|
|
1070
|
+
l(!1), h("");
|
|
1773
1071
|
},
|
|
1774
|
-
children: /* @__PURE__ */
|
|
1072
|
+
children: /* @__PURE__ */ d(
|
|
1775
1073
|
"div",
|
|
1776
1074
|
{
|
|
1777
|
-
className:
|
|
1075
|
+
className: L.searchModal,
|
|
1778
1076
|
ref: _,
|
|
1779
|
-
onClick: (
|
|
1077
|
+
onClick: (k) => k.stopPropagation(),
|
|
1780
1078
|
children: [
|
|
1781
|
-
/* @__PURE__ */
|
|
1782
|
-
/* @__PURE__ */
|
|
1783
|
-
/* @__PURE__ */
|
|
1079
|
+
/* @__PURE__ */ d("div", { className: L.searchHeader, children: [
|
|
1080
|
+
/* @__PURE__ */ e(Me, { className: L.searchIcon }),
|
|
1081
|
+
/* @__PURE__ */ e(
|
|
1784
1082
|
"input",
|
|
1785
1083
|
{
|
|
1786
|
-
ref:
|
|
1084
|
+
ref: r,
|
|
1787
1085
|
type: "text",
|
|
1788
|
-
className:
|
|
1789
|
-
placeholder:
|
|
1790
|
-
value:
|
|
1791
|
-
onChange: (
|
|
1792
|
-
onKeyDown:
|
|
1086
|
+
className: L.searchInput,
|
|
1087
|
+
placeholder: n("ui.searchPlaceholder"),
|
|
1088
|
+
value: m,
|
|
1089
|
+
onChange: (k) => h(k.target.value),
|
|
1090
|
+
onKeyDown: D
|
|
1793
1091
|
}
|
|
1794
1092
|
),
|
|
1795
|
-
/* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ e(
|
|
1796
1094
|
"button",
|
|
1797
1095
|
{
|
|
1798
1096
|
type: "button",
|
|
1799
|
-
className:
|
|
1097
|
+
className: L.closeButton,
|
|
1800
1098
|
onClick: () => {
|
|
1801
|
-
|
|
1099
|
+
l(!1), h("");
|
|
1802
1100
|
},
|
|
1803
1101
|
"aria-label": "Close search",
|
|
1804
|
-
children: /* @__PURE__ */
|
|
1102
|
+
children: /* @__PURE__ */ e(ke, {})
|
|
1805
1103
|
}
|
|
1806
1104
|
)
|
|
1807
1105
|
] }),
|
|
1808
|
-
|
|
1106
|
+
m && /* @__PURE__ */ e("div", { className: L.searchResults, children: u.length === 0 ? /* @__PURE__ */ e("div", { className: L.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: L.resultsList, children: u.map((k, $) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
1809
1107
|
"button",
|
|
1810
1108
|
{
|
|
1811
1109
|
type: "button",
|
|
1812
|
-
className: `${
|
|
1813
|
-
onClick: () =>
|
|
1814
|
-
onMouseEnter: () =>
|
|
1110
|
+
className: `${L.resultItem} ${$ === f ? L.selected : ""}`,
|
|
1111
|
+
onClick: () => z(k.slug),
|
|
1112
|
+
onMouseEnter: () => g($),
|
|
1815
1113
|
children: [
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ e("div", { className: L.resultTitle, children: k.title }),
|
|
1115
|
+
/* @__PURE__ */ d("div", { className: L.resultSlug, children: [
|
|
1818
1116
|
"/",
|
|
1819
|
-
|
|
1117
|
+
k.slug
|
|
1820
1118
|
] })
|
|
1821
1119
|
]
|
|
1822
1120
|
}
|
|
1823
|
-
) },
|
|
1824
|
-
!
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */
|
|
1827
|
-
/* @__PURE__ */
|
|
1828
|
-
/* @__PURE__ */
|
|
1121
|
+
) }, k.slug)) }) }),
|
|
1122
|
+
!m && /* @__PURE__ */ d("div", { className: L.searchHints, children: [
|
|
1123
|
+
/* @__PURE__ */ d("div", { className: L.hint, children: [
|
|
1124
|
+
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
1125
|
+
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
1126
|
+
/* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
|
|
1829
1127
|
] }),
|
|
1830
|
-
/* @__PURE__ */
|
|
1831
|
-
/* @__PURE__ */
|
|
1832
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ d("div", { className: L.hint, children: [
|
|
1129
|
+
/* @__PURE__ */ e("kbd", { children: "↵" }),
|
|
1130
|
+
/* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
|
|
1833
1131
|
] }),
|
|
1834
|
-
/* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ d("div", { className: L.hint, children: [
|
|
1133
|
+
/* @__PURE__ */ e("kbd", { children: "esc" }),
|
|
1134
|
+
/* @__PURE__ */ e("span", { children: n("ui.searchClose") })
|
|
1837
1135
|
] })
|
|
1838
1136
|
] })
|
|
1839
1137
|
]
|
|
@@ -1845,158 +1143,158 @@ function ko({ language: e }) {
|
|
|
1845
1143
|
)
|
|
1846
1144
|
] });
|
|
1847
1145
|
}
|
|
1848
|
-
const
|
|
1849
|
-
header:
|
|
1850
|
-
container:
|
|
1851
|
-
content:
|
|
1852
|
-
leftSection:
|
|
1853
|
-
mobileMenuButton:
|
|
1854
|
-
burgerIcon:
|
|
1855
|
-
logo:
|
|
1856
|
-
nav:
|
|
1857
|
-
navLink:
|
|
1858
|
-
externalIcon:
|
|
1859
|
-
supportDropdown:
|
|
1860
|
-
themeDropdown:
|
|
1861
|
-
themeButton:
|
|
1862
|
-
themeIcon:
|
|
1863
|
-
supportButton:
|
|
1864
|
-
caretIcon:
|
|
1865
|
-
dropdownMenu:
|
|
1866
|
-
dropdownItem:
|
|
1867
|
-
dropdownIcon:
|
|
1146
|
+
const na = "_header_jrobc_1", aa = "_container_jrobc_24", oa = "_content_jrobc_36", sa = "_leftSection_jrobc_43", ca = "_mobileMenuButton_jrobc_49", ra = "_burgerIcon_jrobc_87", la = "_logo_jrobc_92", ia = "_nav_jrobc_98", da = "_navLink_jrobc_109", ua = "_externalIcon_jrobc_135", ha = "_supportDropdown_jrobc_141", ma = "_themeDropdown_jrobc_145", _a = "_themeButton_jrobc_149", ga = "_themeIcon_jrobc_171", pa = "_supportButton_jrobc_177", fa = "_caretIcon_jrobc_198", va = "_dropdownMenu_jrobc_208", ba = "_dropdownItem_jrobc_221", ka = "_dropdownIcon_jrobc_244", C = {
|
|
1147
|
+
header: na,
|
|
1148
|
+
container: aa,
|
|
1149
|
+
content: oa,
|
|
1150
|
+
leftSection: sa,
|
|
1151
|
+
mobileMenuButton: ca,
|
|
1152
|
+
burgerIcon: ra,
|
|
1153
|
+
logo: la,
|
|
1154
|
+
nav: ia,
|
|
1155
|
+
navLink: da,
|
|
1156
|
+
externalIcon: ua,
|
|
1157
|
+
supportDropdown: ha,
|
|
1158
|
+
themeDropdown: ma,
|
|
1159
|
+
themeButton: _a,
|
|
1160
|
+
themeIcon: ga,
|
|
1161
|
+
supportButton: pa,
|
|
1162
|
+
caretIcon: fa,
|
|
1163
|
+
dropdownMenu: va,
|
|
1164
|
+
dropdownItem: ba,
|
|
1165
|
+
dropdownIcon: ka
|
|
1868
1166
|
};
|
|
1869
|
-
function
|
|
1870
|
-
const { t, i18n:
|
|
1871
|
-
return
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1167
|
+
function wa({ onMobileMenuToggle: t }) {
|
|
1168
|
+
const { t: n, i18n: o } = E(), { config: a } = R(), s = a.header ?? {}, c = s.navLinks ?? [], l = s.dropdownItems ?? [], [m, h] = y(!1), [u, i] = y(!1), { theme: f, setTheme: g } = Ke(), v = G(null), b = G(null);
|
|
1169
|
+
return S(() => {
|
|
1170
|
+
const r = (_) => {
|
|
1171
|
+
v.current && !v.current.contains(_.target) && h(!1), b.current && !b.current.contains(_.target) && i(!1);
|
|
1874
1172
|
};
|
|
1875
|
-
return document.addEventListener("mousedown",
|
|
1876
|
-
}, []), /* @__PURE__ */
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
/* @__PURE__ */
|
|
1173
|
+
return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
|
|
1174
|
+
}, []), /* @__PURE__ */ e("header", { className: C.header, children: /* @__PURE__ */ e("div", { className: C.container, children: /* @__PURE__ */ d("div", { className: C.content, children: [
|
|
1175
|
+
/* @__PURE__ */ d("div", { className: C.leftSection, children: [
|
|
1176
|
+
/* @__PURE__ */ e(
|
|
1879
1177
|
"button",
|
|
1880
1178
|
{
|
|
1881
1179
|
type: "button",
|
|
1882
|
-
className:
|
|
1883
|
-
onClick:
|
|
1180
|
+
className: C.mobileMenuButton,
|
|
1181
|
+
onClick: t,
|
|
1884
1182
|
"aria-label": "Open menu",
|
|
1885
|
-
children: /* @__PURE__ */
|
|
1183
|
+
children: /* @__PURE__ */ e(at, { className: C.burgerIcon })
|
|
1886
1184
|
}
|
|
1887
1185
|
),
|
|
1888
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ e("div", { className: C.logo })
|
|
1889
1187
|
] }),
|
|
1890
|
-
/* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */
|
|
1892
|
-
/* @__PURE__ */
|
|
1893
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ d("nav", { className: C.nav, children: [
|
|
1189
|
+
/* @__PURE__ */ e(ta, { language: o.language }),
|
|
1190
|
+
/* @__PURE__ */ d("div", { className: C.themeDropdown, ref: b, children: [
|
|
1191
|
+
/* @__PURE__ */ d(
|
|
1894
1192
|
"button",
|
|
1895
1193
|
{
|
|
1896
1194
|
type: "button",
|
|
1897
|
-
className:
|
|
1898
|
-
onClick: () =>
|
|
1899
|
-
"aria-expanded":
|
|
1195
|
+
className: C.themeButton,
|
|
1196
|
+
onClick: () => i(!u),
|
|
1197
|
+
"aria-expanded": u,
|
|
1900
1198
|
"aria-haspopup": "true",
|
|
1901
|
-
"aria-label":
|
|
1199
|
+
"aria-label": n("ui.theme"),
|
|
1902
1200
|
children: [
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
/* @__PURE__ */
|
|
1201
|
+
f === "light" && /* @__PURE__ */ e(Be, { className: C.themeIcon }),
|
|
1202
|
+
f === "dark" && /* @__PURE__ */ e(Ee, { className: C.themeIcon }),
|
|
1203
|
+
f === "system" && /* @__PURE__ */ e(Re, { className: C.themeIcon }),
|
|
1204
|
+
/* @__PURE__ */ e(fe, { className: C.caretIcon })
|
|
1907
1205
|
]
|
|
1908
1206
|
}
|
|
1909
1207
|
),
|
|
1910
|
-
|
|
1911
|
-
/* @__PURE__ */
|
|
1208
|
+
u && /* @__PURE__ */ d("div", { className: C.dropdownMenu, children: [
|
|
1209
|
+
/* @__PURE__ */ d(
|
|
1912
1210
|
"button",
|
|
1913
1211
|
{
|
|
1914
1212
|
type: "button",
|
|
1915
1213
|
onClick: () => {
|
|
1916
|
-
|
|
1214
|
+
g("light"), i(!1);
|
|
1917
1215
|
},
|
|
1918
|
-
className:
|
|
1216
|
+
className: C.dropdownItem,
|
|
1919
1217
|
children: [
|
|
1920
|
-
/* @__PURE__ */
|
|
1921
|
-
|
|
1218
|
+
/* @__PURE__ */ e(Be, { className: C.dropdownIcon }),
|
|
1219
|
+
n("ui.light")
|
|
1922
1220
|
]
|
|
1923
1221
|
}
|
|
1924
1222
|
),
|
|
1925
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ d(
|
|
1926
1224
|
"button",
|
|
1927
1225
|
{
|
|
1928
1226
|
type: "button",
|
|
1929
1227
|
onClick: () => {
|
|
1930
|
-
|
|
1228
|
+
g("dark"), i(!1);
|
|
1931
1229
|
},
|
|
1932
|
-
className:
|
|
1230
|
+
className: C.dropdownItem,
|
|
1933
1231
|
children: [
|
|
1934
|
-
/* @__PURE__ */
|
|
1935
|
-
|
|
1232
|
+
/* @__PURE__ */ e(Ee, { className: C.dropdownIcon }),
|
|
1233
|
+
n("ui.dark")
|
|
1936
1234
|
]
|
|
1937
1235
|
}
|
|
1938
1236
|
),
|
|
1939
|
-
/* @__PURE__ */
|
|
1237
|
+
/* @__PURE__ */ d(
|
|
1940
1238
|
"button",
|
|
1941
1239
|
{
|
|
1942
1240
|
type: "button",
|
|
1943
1241
|
onClick: () => {
|
|
1944
|
-
|
|
1242
|
+
g("system"), i(!1);
|
|
1945
1243
|
},
|
|
1946
|
-
className:
|
|
1244
|
+
className: C.dropdownItem,
|
|
1947
1245
|
children: [
|
|
1948
|
-
/* @__PURE__ */
|
|
1949
|
-
|
|
1246
|
+
/* @__PURE__ */ e(Re, { className: C.dropdownIcon }),
|
|
1247
|
+
n("ui.system")
|
|
1950
1248
|
]
|
|
1951
1249
|
}
|
|
1952
1250
|
)
|
|
1953
1251
|
] })
|
|
1954
1252
|
] }),
|
|
1955
|
-
|
|
1956
|
-
/* @__PURE__ */
|
|
1253
|
+
l.length > 0 && /* @__PURE__ */ d("div", { className: C.supportDropdown, ref: v, children: [
|
|
1254
|
+
/* @__PURE__ */ d(
|
|
1957
1255
|
"button",
|
|
1958
1256
|
{
|
|
1959
1257
|
type: "button",
|
|
1960
|
-
className:
|
|
1961
|
-
onClick: () =>
|
|
1962
|
-
"aria-expanded":
|
|
1258
|
+
className: C.supportButton,
|
|
1259
|
+
onClick: () => h(!m),
|
|
1260
|
+
"aria-expanded": m,
|
|
1963
1261
|
"aria-haspopup": "true",
|
|
1964
1262
|
children: [
|
|
1965
|
-
|
|
1966
|
-
/* @__PURE__ */
|
|
1263
|
+
n("ui.support"),
|
|
1264
|
+
/* @__PURE__ */ e(fe, { className: C.caretIcon })
|
|
1967
1265
|
]
|
|
1968
1266
|
}
|
|
1969
1267
|
),
|
|
1970
|
-
|
|
1971
|
-
const
|
|
1972
|
-
return /* @__PURE__ */
|
|
1268
|
+
m && /* @__PURE__ */ e("div", { className: C.dropdownMenu, children: l.map((r, _) => {
|
|
1269
|
+
const w = r.target ?? (r.url.startsWith("http") ? "_blank" : "_self"), I = r.rel ?? (w === "_blank" ? "noopener noreferrer" : void 0), D = r.icon;
|
|
1270
|
+
return /* @__PURE__ */ d(
|
|
1973
1271
|
"a",
|
|
1974
1272
|
{
|
|
1975
|
-
href:
|
|
1976
|
-
target:
|
|
1977
|
-
rel:
|
|
1978
|
-
className:
|
|
1273
|
+
href: r.url,
|
|
1274
|
+
target: w,
|
|
1275
|
+
rel: I,
|
|
1276
|
+
className: C.dropdownItem,
|
|
1979
1277
|
children: [
|
|
1980
|
-
|
|
1981
|
-
|
|
1278
|
+
D && /* @__PURE__ */ e(D, { className: C.dropdownIcon }),
|
|
1279
|
+
r.label
|
|
1982
1280
|
]
|
|
1983
1281
|
},
|
|
1984
1282
|
_
|
|
1985
1283
|
);
|
|
1986
1284
|
}) })
|
|
1987
1285
|
] }),
|
|
1988
|
-
|
|
1989
|
-
const
|
|
1990
|
-
return /* @__PURE__ */
|
|
1286
|
+
c.map((r, _) => {
|
|
1287
|
+
const w = r.target ?? (typeof r.url == "string" && r.url.startsWith("http") ? "_blank" : "_self"), I = r.rel ?? (w === "_blank" ? "noopener noreferrer" : void 0), D = r.icon;
|
|
1288
|
+
return /* @__PURE__ */ d(
|
|
1991
1289
|
"a",
|
|
1992
1290
|
{
|
|
1993
|
-
href:
|
|
1994
|
-
target:
|
|
1995
|
-
rel:
|
|
1996
|
-
className:
|
|
1291
|
+
href: r.url,
|
|
1292
|
+
target: w,
|
|
1293
|
+
rel: I,
|
|
1294
|
+
className: r.className ?? C.navLink,
|
|
1997
1295
|
children: [
|
|
1998
|
-
|
|
1999
|
-
|
|
1296
|
+
r.label,
|
|
1297
|
+
D && /* @__PURE__ */ e(D, { className: C.externalIcon })
|
|
2000
1298
|
]
|
|
2001
1299
|
},
|
|
2002
1300
|
_
|
|
@@ -2005,406 +1303,397 @@ function Uo({ onMobileMenuToggle: e }) {
|
|
|
2005
1303
|
] })
|
|
2006
1304
|
] }) }) });
|
|
2007
1305
|
}
|
|
2008
|
-
function
|
|
2009
|
-
styles:
|
|
2010
|
-
onLanguageChange:
|
|
1306
|
+
function we({
|
|
1307
|
+
styles: t,
|
|
1308
|
+
onLanguageChange: n
|
|
2011
1309
|
}) {
|
|
2012
|
-
const { i18n:
|
|
2013
|
-
const
|
|
2014
|
-
let
|
|
2015
|
-
|
|
2016
|
-
const
|
|
2017
|
-
let
|
|
2018
|
-
|
|
2019
|
-
const
|
|
2020
|
-
|
|
1310
|
+
const { i18n: o } = E(), a = Y(), s = Q(), { config: c } = R(), [l, m] = y(!1), h = G(null), u = o.language, i = (g) => {
|
|
1311
|
+
const v = c.basePath || "";
|
|
1312
|
+
let b = a.pathname;
|
|
1313
|
+
v && b.startsWith(v) && (b = b.slice(v.length));
|
|
1314
|
+
const r = b.split("/").filter(Boolean), _ = r[0];
|
|
1315
|
+
let w = "";
|
|
1316
|
+
c.supportedLanguages.includes(_) ? (r[0] = g, w = `${v}/${r.join("/")}`) : w = `${v}/${g}${b}`;
|
|
1317
|
+
const I = w + a.search + a.hash;
|
|
1318
|
+
o.changeLanguage(g), s(I), m(!1), n == null || n();
|
|
2021
1319
|
};
|
|
2022
|
-
|
|
2023
|
-
const
|
|
2024
|
-
|
|
1320
|
+
S(() => {
|
|
1321
|
+
const g = (v) => {
|
|
1322
|
+
h.current && !h.current.contains(v.target) && m(!1);
|
|
2025
1323
|
};
|
|
2026
|
-
return document.addEventListener("mousedown",
|
|
1324
|
+
return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
|
|
2027
1325
|
}, []);
|
|
2028
|
-
const
|
|
2029
|
-
return /* @__PURE__ */
|
|
2030
|
-
/* @__PURE__ */
|
|
1326
|
+
const f = (g) => o.getFixedT(g)("language") || g;
|
|
1327
|
+
return /* @__PURE__ */ d("div", { className: t.languageSelect, ref: h, children: [
|
|
1328
|
+
/* @__PURE__ */ d(
|
|
2031
1329
|
"button",
|
|
2032
1330
|
{
|
|
2033
1331
|
type: "button",
|
|
2034
|
-
className:
|
|
2035
|
-
onClick: () =>
|
|
2036
|
-
"aria-expanded":
|
|
1332
|
+
className: t.languageButton,
|
|
1333
|
+
onClick: () => m(!l),
|
|
1334
|
+
"aria-expanded": l,
|
|
2037
1335
|
"aria-haspopup": "listbox",
|
|
2038
1336
|
children: [
|
|
2039
|
-
/* @__PURE__ */
|
|
2040
|
-
|
|
2041
|
-
/* @__PURE__ */
|
|
1337
|
+
/* @__PURE__ */ e(ot, { className: t.icon }),
|
|
1338
|
+
f(u),
|
|
1339
|
+
/* @__PURE__ */ e(fe, { className: t.chevron })
|
|
2042
1340
|
]
|
|
2043
1341
|
}
|
|
2044
1342
|
),
|
|
2045
|
-
|
|
1343
|
+
l && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children: c.supportedLanguages.map((g) => /* @__PURE__ */ e(
|
|
2046
1344
|
"button",
|
|
2047
1345
|
{
|
|
2048
1346
|
type: "button",
|
|
2049
|
-
className: `${
|
|
2050
|
-
onClick: () =>
|
|
1347
|
+
className: `${t.languageOption} ${g === u ? t.selected : ""}`,
|
|
1348
|
+
onClick: () => i(g),
|
|
2051
1349
|
role: "option",
|
|
2052
|
-
"aria-selected":
|
|
2053
|
-
children:
|
|
1350
|
+
"aria-selected": g === u,
|
|
1351
|
+
children: f(g)
|
|
2054
1352
|
},
|
|
2055
|
-
|
|
1353
|
+
g
|
|
2056
1354
|
)) })
|
|
2057
1355
|
] });
|
|
2058
1356
|
}
|
|
2059
|
-
function
|
|
2060
|
-
const { i18n:
|
|
2061
|
-
|
|
1357
|
+
function Ne({ styles: t, onLinkClick: n }) {
|
|
1358
|
+
const { i18n: o } = E(), a = Y(), { config: s, loadContent: c } = R(), [l, m] = y([]), [h, u] = y({}), i = o.language;
|
|
1359
|
+
S(() => {
|
|
2062
1360
|
(async () => {
|
|
2063
1361
|
if (s.navigationData)
|
|
2064
1362
|
try {
|
|
2065
|
-
const _ = await
|
|
1363
|
+
const _ = await he(
|
|
2066
1364
|
s.navigationData,
|
|
2067
|
-
|
|
2068
|
-
|
|
1365
|
+
i,
|
|
1366
|
+
c
|
|
2069
1367
|
);
|
|
2070
|
-
|
|
2071
|
-
const
|
|
2072
|
-
(
|
|
2073
|
-
if (
|
|
2074
|
-
const
|
|
2075
|
-
|
|
1368
|
+
m(_);
|
|
1369
|
+
const w = _.reduce(
|
|
1370
|
+
(I, D, z) => {
|
|
1371
|
+
if (se(D)) {
|
|
1372
|
+
const k = s.navigationData[z], $ = "items" in k && k.defaultOpen === !0;
|
|
1373
|
+
I[D.title] = $;
|
|
2076
1374
|
}
|
|
2077
|
-
return
|
|
1375
|
+
return I;
|
|
2078
1376
|
},
|
|
2079
1377
|
{}
|
|
2080
1378
|
);
|
|
2081
|
-
|
|
1379
|
+
u(w);
|
|
2082
1380
|
} catch (_) {
|
|
2083
1381
|
console.error("Failed to load navigation data:", _);
|
|
2084
1382
|
}
|
|
2085
1383
|
})();
|
|
2086
|
-
}, [
|
|
2087
|
-
const
|
|
2088
|
-
|
|
1384
|
+
}, [i, s.navigationData, c]);
|
|
1385
|
+
const f = (r) => {
|
|
1386
|
+
u((_) => ({
|
|
2089
1387
|
..._,
|
|
2090
|
-
[
|
|
1388
|
+
[r]: !_[r]
|
|
2091
1389
|
}));
|
|
2092
|
-
},
|
|
1390
|
+
}, g = (r) => {
|
|
2093
1391
|
const _ = s.basePath || "";
|
|
2094
|
-
let
|
|
2095
|
-
_ &&
|
|
2096
|
-
const
|
|
2097
|
-
return
|
|
2098
|
-
},
|
|
1392
|
+
let w = a.pathname;
|
|
1393
|
+
_ && w.startsWith(_) && (w = w.slice(_.length));
|
|
1394
|
+
const I = w.split("/").filter(Boolean);
|
|
1395
|
+
return I[I.length - 1] === r;
|
|
1396
|
+
}, v = (r) => {
|
|
2099
1397
|
const _ = s.basePath || "";
|
|
2100
|
-
let
|
|
2101
|
-
_ &&
|
|
2102
|
-
const
|
|
2103
|
-
return
|
|
2104
|
-
},
|
|
2105
|
-
|
|
1398
|
+
let w = a.pathname;
|
|
1399
|
+
_ && w.startsWith(_) && (w = w.slice(_.length));
|
|
1400
|
+
const I = w.split("/").filter(Boolean);
|
|
1401
|
+
return I[0] && s.supportedLanguages.includes(I[0]) ? `${_}/${I[0]}/${r}` : `${_}/${i}/${r}`;
|
|
1402
|
+
}, b = () => {
|
|
1403
|
+
n == null || n();
|
|
2106
1404
|
};
|
|
2107
|
-
return /* @__PURE__ */
|
|
2108
|
-
/* @__PURE__ */
|
|
1405
|
+
return /* @__PURE__ */ e("div", { className: t.navigation, children: l.map((r) => se(r) ? /* @__PURE__ */ d("div", { className: t.section, children: [
|
|
1406
|
+
/* @__PURE__ */ d(
|
|
2109
1407
|
"button",
|
|
2110
1408
|
{
|
|
2111
1409
|
type: "button",
|
|
2112
|
-
className: `${
|
|
2113
|
-
onClick: () =>
|
|
1410
|
+
className: `${t.sectionButton} ${h[r.title] ? t.expanded : ""}`,
|
|
1411
|
+
onClick: () => f(r.title),
|
|
2114
1412
|
children: [
|
|
2115
|
-
|
|
2116
|
-
/* @__PURE__ */
|
|
1413
|
+
r.title,
|
|
1414
|
+
/* @__PURE__ */ e(ze, { className: t.icon })
|
|
2117
1415
|
]
|
|
2118
1416
|
}
|
|
2119
1417
|
),
|
|
2120
|
-
|
|
2121
|
-
|
|
1418
|
+
h[r.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: r.items.map((_) => /* @__PURE__ */ e(
|
|
1419
|
+
ue,
|
|
2122
1420
|
{
|
|
2123
|
-
to:
|
|
2124
|
-
className: `${
|
|
2125
|
-
onClick:
|
|
2126
|
-
children: /* @__PURE__ */
|
|
1421
|
+
to: v(_.slug),
|
|
1422
|
+
className: `${t.navItem} ${g(_.slug) ? t.active : ""}`,
|
|
1423
|
+
onClick: b,
|
|
1424
|
+
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: _.title }) })
|
|
2127
1425
|
},
|
|
2128
1426
|
_.slug
|
|
2129
1427
|
)) })
|
|
2130
|
-
] },
|
|
2131
|
-
|
|
1428
|
+
] }, r.title) : /* @__PURE__ */ e(
|
|
1429
|
+
ue,
|
|
2132
1430
|
{
|
|
2133
|
-
to:
|
|
2134
|
-
className: `${
|
|
2135
|
-
onClick:
|
|
2136
|
-
children: /* @__PURE__ */
|
|
1431
|
+
to: v(r.slug),
|
|
1432
|
+
className: `${t.navItem} ${g(r.slug) ? t.active : ""}`,
|
|
1433
|
+
onClick: b,
|
|
1434
|
+
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: r.title }) })
|
|
2137
1435
|
},
|
|
2138
|
-
|
|
1436
|
+
r.slug
|
|
2139
1437
|
)) });
|
|
2140
1438
|
}
|
|
2141
|
-
function
|
|
2142
|
-
styles:
|
|
2143
|
-
onLinkClick:
|
|
2144
|
-
onLanguageChange:
|
|
1439
|
+
function Xo({
|
|
1440
|
+
styles: t,
|
|
1441
|
+
onLinkClick: n,
|
|
1442
|
+
onLanguageChange: o
|
|
2145
1443
|
}) {
|
|
2146
|
-
return /* @__PURE__ */
|
|
2147
|
-
/* @__PURE__ */
|
|
2148
|
-
/* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ d(K, { children: [
|
|
1445
|
+
/* @__PURE__ */ e(we, { styles: t, onLanguageChange: o }),
|
|
1446
|
+
/* @__PURE__ */ e(Ne, { styles: t, onLinkClick: n })
|
|
2149
1447
|
] });
|
|
2150
1448
|
}
|
|
2151
|
-
const
|
|
2152
|
-
backdrop:
|
|
2153
|
-
open:
|
|
2154
|
-
mobileMenu:
|
|
2155
|
-
header:
|
|
2156
|
-
brand:
|
|
2157
|
-
cloudIcon:
|
|
2158
|
-
title:
|
|
2159
|
-
closeButton:
|
|
2160
|
-
closeIcon:
|
|
2161
|
-
languageSection:
|
|
2162
|
-
languageSelect:
|
|
2163
|
-
languageButton:
|
|
2164
|
-
icon:
|
|
2165
|
-
chevron:
|
|
2166
|
-
languageDropdown:
|
|
2167
|
-
languageOption:
|
|
2168
|
-
selected:
|
|
2169
|
-
scrollArea:
|
|
2170
|
-
navigation:
|
|
2171
|
-
section:
|
|
2172
|
-
sectionButton:
|
|
2173
|
-
expanded:
|
|
2174
|
-
sectionItems:
|
|
2175
|
-
navItem:
|
|
2176
|
-
active:
|
|
2177
|
-
navItemContent:
|
|
2178
|
-
navItemTitle:
|
|
1449
|
+
const Na = "_backdrop_1a7pu_1", $a = "_open_1a7pu_13", Ca = "_mobileMenu_1a7pu_18", Ia = "_header_1a7pu_37", xa = "_brand_1a7pu_46", ya = "_cloudIcon_1a7pu_53", Ta = "_title_1a7pu_62", La = "_closeButton_1a7pu_69", Sa = "_closeIcon_1a7pu_101", Pa = "_languageSection_1a7pu_106", Da = "_languageSelect_1a7pu_112", Ma = "_languageButton_1a7pu_117", Ba = "_icon_1a7pu_156", Ea = "_chevron_1a7pu_162", Ra = "_languageDropdown_1a7pu_172", Aa = "_languageOption_1a7pu_185", Oa = "_selected_1a7pu_226", ja = "_scrollArea_1a7pu_231", Wa = "_navigation_1a7pu_237", Ha = "_section_1a7pu_241", za = "_sectionButton_1a7pu_245", Fa = "_expanded_1a7pu_285", qa = "_sectionItems_1a7pu_289", Ua = "_navItem_1a7pu_297", Ka = "_active_1a7pu_310", Ga = "_navItemContent_1a7pu_316", Qa = "_navItemTitle_1a7pu_322", j = {
|
|
1450
|
+
backdrop: Na,
|
|
1451
|
+
open: $a,
|
|
1452
|
+
mobileMenu: Ca,
|
|
1453
|
+
header: Ia,
|
|
1454
|
+
brand: xa,
|
|
1455
|
+
cloudIcon: ya,
|
|
1456
|
+
title: Ta,
|
|
1457
|
+
closeButton: La,
|
|
1458
|
+
closeIcon: Sa,
|
|
1459
|
+
languageSection: Pa,
|
|
1460
|
+
languageSelect: Da,
|
|
1461
|
+
languageButton: Ma,
|
|
1462
|
+
icon: Ba,
|
|
1463
|
+
chevron: Ea,
|
|
1464
|
+
languageDropdown: Ra,
|
|
1465
|
+
languageOption: Aa,
|
|
1466
|
+
selected: Oa,
|
|
1467
|
+
scrollArea: ja,
|
|
1468
|
+
navigation: Wa,
|
|
1469
|
+
section: Ha,
|
|
1470
|
+
sectionButton: za,
|
|
1471
|
+
expanded: Fa,
|
|
1472
|
+
sectionItems: qa,
|
|
1473
|
+
navItem: Ua,
|
|
1474
|
+
active: Ka,
|
|
1475
|
+
navItemContent: Ga,
|
|
1476
|
+
navItemTitle: Qa
|
|
2179
1477
|
};
|
|
2180
|
-
function
|
|
2181
|
-
const { config:
|
|
2182
|
-
return
|
|
1478
|
+
function Xa({ isOpen: t, onClose: n }) {
|
|
1479
|
+
const { config: o } = R(), a = o.logo;
|
|
1480
|
+
return S(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
2183
1481
|
document.body.style.overflow = "unset";
|
|
2184
|
-
}), [
|
|
2185
|
-
const s = (
|
|
2186
|
-
|
|
1482
|
+
}), [t]), S(() => {
|
|
1483
|
+
const s = (c) => {
|
|
1484
|
+
c.key === "Escape" && t && n();
|
|
2187
1485
|
};
|
|
2188
1486
|
return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
|
|
2189
|
-
}, [
|
|
2190
|
-
/* @__PURE__ */
|
|
1487
|
+
}, [t, n]), /* @__PURE__ */ d(K, { children: [
|
|
1488
|
+
/* @__PURE__ */ e(
|
|
2191
1489
|
"div",
|
|
2192
1490
|
{
|
|
2193
|
-
className: `${
|
|
2194
|
-
onClick:
|
|
1491
|
+
className: `${j.backdrop} ${t ? j.open : ""}`,
|
|
1492
|
+
onClick: n
|
|
2195
1493
|
}
|
|
2196
1494
|
),
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2199
|
-
/* @__PURE__ */
|
|
2200
|
-
a && /* @__PURE__ */
|
|
2201
|
-
/* @__PURE__ */
|
|
1495
|
+
/* @__PURE__ */ d("div", { className: `${j.mobileMenu} ${t ? j.open : ""}`, children: [
|
|
1496
|
+
/* @__PURE__ */ d("div", { className: j.header, children: [
|
|
1497
|
+
/* @__PURE__ */ d("div", { className: j.brand, children: [
|
|
1498
|
+
a && /* @__PURE__ */ e(a, { className: j.cloudIcon }),
|
|
1499
|
+
/* @__PURE__ */ e("h1", { className: j.title, children: o.title })
|
|
2202
1500
|
] }),
|
|
2203
|
-
/* @__PURE__ */
|
|
1501
|
+
/* @__PURE__ */ e(
|
|
2204
1502
|
"button",
|
|
2205
1503
|
{
|
|
2206
1504
|
type: "button",
|
|
2207
|
-
className:
|
|
2208
|
-
onClick:
|
|
1505
|
+
className: j.closeButton,
|
|
1506
|
+
onClick: n,
|
|
2209
1507
|
"aria-label": "Close menu",
|
|
2210
|
-
children: /* @__PURE__ */
|
|
1508
|
+
children: /* @__PURE__ */ e(ke, { className: j.closeIcon })
|
|
2211
1509
|
}
|
|
2212
1510
|
)
|
|
2213
1511
|
] }),
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
/* @__PURE__ */
|
|
1512
|
+
/* @__PURE__ */ e("div", { className: j.languageSection, children: /* @__PURE__ */ e(we, { styles: j, onLanguageChange: n }) }),
|
|
1513
|
+
/* @__PURE__ */ e("div", { className: j.scrollArea, children: /* @__PURE__ */ e(Ne, { styles: j, onLinkClick: n }) })
|
|
2216
1514
|
] })
|
|
2217
1515
|
] });
|
|
2218
1516
|
}
|
|
2219
|
-
const
|
|
2220
|
-
sidebar:
|
|
2221
|
-
header:
|
|
2222
|
-
brand:
|
|
2223
|
-
cloudIcon:
|
|
2224
|
-
title:
|
|
2225
|
-
languageSelect:
|
|
2226
|
-
languageButton:
|
|
2227
|
-
icon:
|
|
2228
|
-
chevron:
|
|
2229
|
-
languageDropdown:
|
|
2230
|
-
languageOption:
|
|
2231
|
-
selected:
|
|
2232
|
-
scrollArea:
|
|
2233
|
-
navigation:
|
|
2234
|
-
section:
|
|
2235
|
-
sectionButton:
|
|
2236
|
-
expanded:
|
|
2237
|
-
sectionItems:
|
|
2238
|
-
navItem:
|
|
2239
|
-
active:
|
|
2240
|
-
navItemContent:
|
|
1517
|
+
const Ya = "_sidebar_1tdxt_1", Va = "_header_1tdxt_17", Ja = "_brand_1tdxt_29", Za = "_cloudIcon_1tdxt_35", eo = "_title_1tdxt_44", to = "_languageSelect_1tdxt_55", no = "_languageButton_1tdxt_61", ao = "_icon_1tdxt_99", oo = "_chevron_1tdxt_104", so = "_languageDropdown_1tdxt_114", co = "_languageOption_1tdxt_128", ro = "_selected_1tdxt_147", lo = "_scrollArea_1tdxt_152", io = "_navigation_1tdxt_158", uo = "_section_1tdxt_164", ho = "_sectionButton_1tdxt_170", mo = "_expanded_1tdxt_213", _o = "_sectionItems_1tdxt_217", go = "_navItem_1tdxt_225", po = "_active_1tdxt_238", fo = "_navItemContent_1tdxt_243", U = {
|
|
1518
|
+
sidebar: Ya,
|
|
1519
|
+
header: Va,
|
|
1520
|
+
brand: Ja,
|
|
1521
|
+
cloudIcon: Za,
|
|
1522
|
+
title: eo,
|
|
1523
|
+
languageSelect: to,
|
|
1524
|
+
languageButton: no,
|
|
1525
|
+
icon: ao,
|
|
1526
|
+
chevron: oo,
|
|
1527
|
+
languageDropdown: so,
|
|
1528
|
+
languageOption: co,
|
|
1529
|
+
selected: ro,
|
|
1530
|
+
scrollArea: lo,
|
|
1531
|
+
navigation: io,
|
|
1532
|
+
section: uo,
|
|
1533
|
+
sectionButton: ho,
|
|
1534
|
+
expanded: mo,
|
|
1535
|
+
sectionItems: _o,
|
|
1536
|
+
navItem: go,
|
|
1537
|
+
active: po,
|
|
1538
|
+
navItemContent: fo
|
|
2241
1539
|
};
|
|
2242
|
-
function
|
|
2243
|
-
const { config:
|
|
2244
|
-
return /* @__PURE__ */
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
/* @__PURE__ */
|
|
2247
|
-
|
|
2248
|
-
/* @__PURE__ */
|
|
1540
|
+
function vo() {
|
|
1541
|
+
const { config: t } = R(), n = t.logo, o = t.supportedLanguages.length > 1;
|
|
1542
|
+
return /* @__PURE__ */ d("div", { className: U.sidebar, children: [
|
|
1543
|
+
/* @__PURE__ */ d("div", { className: U.header, children: [
|
|
1544
|
+
/* @__PURE__ */ d("div", { className: U.brand, children: [
|
|
1545
|
+
n && /* @__PURE__ */ e(n, { className: U.cloudIcon }),
|
|
1546
|
+
/* @__PURE__ */ e("div", { className: U.title, children: t.title })
|
|
2249
1547
|
] }),
|
|
2250
|
-
|
|
1548
|
+
o && /* @__PURE__ */ e(we, { styles: U })
|
|
2251
1549
|
] }),
|
|
2252
|
-
/* @__PURE__ */
|
|
1550
|
+
/* @__PURE__ */ e("div", { className: U.scrollArea, children: /* @__PURE__ */ e(Ne, { styles: U }) })
|
|
2253
1551
|
] });
|
|
2254
1552
|
}
|
|
2255
|
-
const
|
|
2256
|
-
app:
|
|
2257
|
-
layout:
|
|
2258
|
-
main:
|
|
2259
|
-
fullWidth:
|
|
2260
|
-
contentWrapper:
|
|
1553
|
+
const bo = "_app_wf6ni_1", ko = "_layout_wf6ni_9", wo = "_main_wf6ni_15", No = "_fullWidth_wf6ni_21", $o = "_contentWrapper_wf6ni_30", oe = {
|
|
1554
|
+
app: bo,
|
|
1555
|
+
layout: ko,
|
|
1556
|
+
main: wo,
|
|
1557
|
+
fullWidth: No,
|
|
1558
|
+
contentWrapper: $o
|
|
2261
1559
|
};
|
|
2262
|
-
function
|
|
2263
|
-
const { language:
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
}, [
|
|
2267
|
-
const
|
|
2268
|
-
|
|
2269
|
-
},
|
|
2270
|
-
|
|
1560
|
+
function Co({ children: t }) {
|
|
1561
|
+
const { language: n } = be(), { i18n: o } = E(), { config: a } = R(), [s, c] = y(!1);
|
|
1562
|
+
S(() => {
|
|
1563
|
+
n && a.supportedLanguages.includes(n) && o.changeLanguage(n);
|
|
1564
|
+
}, [n, o, a.supportedLanguages]);
|
|
1565
|
+
const l = () => {
|
|
1566
|
+
c(!s);
|
|
1567
|
+
}, m = () => {
|
|
1568
|
+
c(!1);
|
|
2271
1569
|
};
|
|
2272
|
-
if (!
|
|
2273
|
-
return /* @__PURE__ */
|
|
2274
|
-
const
|
|
2275
|
-
return /* @__PURE__ */
|
|
2276
|
-
|
|
2277
|
-
/* @__PURE__ */
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
|
|
2280
|
-
/* @__PURE__ */
|
|
1570
|
+
if (!n || !a.supportedLanguages.includes(n))
|
|
1571
|
+
return /* @__PURE__ */ e(He, { to: "/en/welcome", replace: !0 });
|
|
1572
|
+
const h = !!a.header, u = a.showSideMenu !== !1, i = a.contentMaxWidth ? { width: "100%", maxWidth: a.contentMaxWidth } : void 0;
|
|
1573
|
+
return /* @__PURE__ */ d("div", { className: oe.app, children: [
|
|
1574
|
+
h && /* @__PURE__ */ e(wa, { onMobileMenuToggle: l }),
|
|
1575
|
+
/* @__PURE__ */ e(Xa, { isOpen: s, onClose: m }),
|
|
1576
|
+
/* @__PURE__ */ d("div", { className: oe.layout, children: [
|
|
1577
|
+
u && /* @__PURE__ */ e(vo, {}),
|
|
1578
|
+
/* @__PURE__ */ e(
|
|
2281
1579
|
"main",
|
|
2282
1580
|
{
|
|
2283
|
-
className: `${
|
|
2284
|
-
children: /* @__PURE__ */
|
|
1581
|
+
className: `${oe.main} ${u ? "" : oe.fullWidth}`,
|
|
1582
|
+
children: /* @__PURE__ */ e("div", { className: oe.contentWrapper, style: i, children: t })
|
|
2285
1583
|
}
|
|
2286
1584
|
)
|
|
2287
1585
|
] })
|
|
2288
1586
|
] });
|
|
2289
1587
|
}
|
|
2290
|
-
const
|
|
2291
|
-
homePage:
|
|
2292
|
-
header:
|
|
2293
|
-
title:
|
|
2294
|
-
articlesList:
|
|
2295
|
-
articleCard:
|
|
2296
|
-
articleTitle:
|
|
2297
|
-
articleDescription:
|
|
2298
|
-
empty:
|
|
2299
|
-
skeletonCard:
|
|
2300
|
-
skeletonTitle:
|
|
2301
|
-
skeletonText:
|
|
2302
|
-
skeletonMetadata:
|
|
1588
|
+
const Io = "_homePage_10e4f_1", xo = "_header_10e4f_20", yo = "_title_10e4f_24", To = "_articlesList_10e4f_31", Lo = "_articleCard_10e4f_37", So = "_articleTitle_10e4f_56", Po = "_articleDescription_10e4f_63", Do = "_empty_10e4f_71", Mo = "_skeletonCard_10e4f_85", Bo = "_skeletonTitle_10e4f_95", Eo = "_skeletonText_10e4f_104", Ro = "_skeletonMetadata_10e4f_113", M = {
|
|
1589
|
+
homePage: Io,
|
|
1590
|
+
header: xo,
|
|
1591
|
+
title: yo,
|
|
1592
|
+
articlesList: To,
|
|
1593
|
+
articleCard: Lo,
|
|
1594
|
+
articleTitle: So,
|
|
1595
|
+
articleDescription: Po,
|
|
1596
|
+
empty: Do,
|
|
1597
|
+
skeletonCard: Mo,
|
|
1598
|
+
skeletonTitle: Bo,
|
|
1599
|
+
skeletonText: Eo,
|
|
1600
|
+
skeletonMetadata: Ro
|
|
2303
1601
|
};
|
|
2304
|
-
function
|
|
2305
|
-
const { i18n:
|
|
2306
|
-
|
|
1602
|
+
function Ao() {
|
|
1603
|
+
const { i18n: t, t: n } = E(), { config: o, loadContent: a } = R(), s = Q(), [c, l] = y([]), [m, h] = y(!0);
|
|
1604
|
+
S(() => {
|
|
2307
1605
|
(async () => {
|
|
2308
1606
|
try {
|
|
2309
|
-
const
|
|
2310
|
-
if (
|
|
2311
|
-
const
|
|
2312
|
-
|
|
2313
|
-
|
|
1607
|
+
const f = o.navigationData || [];
|
|
1608
|
+
if (f.length === 0) return;
|
|
1609
|
+
const g = await he(
|
|
1610
|
+
f,
|
|
1611
|
+
t.language,
|
|
2314
1612
|
a
|
|
2315
|
-
),
|
|
2316
|
-
for (const
|
|
2317
|
-
if (
|
|
2318
|
-
for (const
|
|
2319
|
-
|
|
2320
|
-
slug:
|
|
2321
|
-
title:
|
|
1613
|
+
), v = [];
|
|
1614
|
+
for (const r of g)
|
|
1615
|
+
if (se(r))
|
|
1616
|
+
for (const _ of r.items)
|
|
1617
|
+
v.push({
|
|
1618
|
+
slug: _.slug,
|
|
1619
|
+
title: _.title
|
|
2322
1620
|
});
|
|
2323
1621
|
else
|
|
2324
|
-
|
|
2325
|
-
slug:
|
|
2326
|
-
title:
|
|
1622
|
+
v.push({
|
|
1623
|
+
slug: r.slug,
|
|
1624
|
+
title: r.title
|
|
2327
1625
|
});
|
|
2328
|
-
const
|
|
2329
|
-
|
|
1626
|
+
const b = await Promise.all(
|
|
1627
|
+
v.map(async (r) => {
|
|
2330
1628
|
try {
|
|
2331
|
-
const
|
|
1629
|
+
const _ = await a(t.language, r.slug);
|
|
2332
1630
|
return {
|
|
2333
|
-
...
|
|
2334
|
-
title:
|
|
2335
|
-
date:
|
|
2336
|
-
author:
|
|
2337
|
-
description:
|
|
1631
|
+
...r,
|
|
1632
|
+
title: _.frontmatter.title || r.title,
|
|
1633
|
+
date: _.frontmatter.date,
|
|
1634
|
+
author: _.frontmatter.author,
|
|
1635
|
+
description: _.frontmatter.description
|
|
2338
1636
|
};
|
|
2339
1637
|
} catch {
|
|
2340
|
-
return
|
|
1638
|
+
return r;
|
|
2341
1639
|
}
|
|
2342
1640
|
})
|
|
2343
1641
|
);
|
|
2344
|
-
|
|
2345
|
-
} catch (
|
|
2346
|
-
console.error("Failed to load articles:",
|
|
1642
|
+
b.sort((r, _) => r.date && _.date ? new Date(_.date).getTime() - new Date(r.date).getTime() : r.date ? -1 : _.date ? 1 : r.title.localeCompare(_.title)), l(b.slice(0, 50));
|
|
1643
|
+
} catch (f) {
|
|
1644
|
+
console.error("Failed to load articles:", f);
|
|
2347
1645
|
} finally {
|
|
2348
|
-
|
|
1646
|
+
h(!1);
|
|
2349
1647
|
}
|
|
2350
1648
|
})();
|
|
2351
|
-
}, [
|
|
2352
|
-
const
|
|
2353
|
-
const
|
|
2354
|
-
window.scrollTo({ top: 0, left: 0, behavior: "auto" }), s(`${
|
|
1649
|
+
}, [t.language, o.navigationData, a]);
|
|
1650
|
+
const u = (i) => {
|
|
1651
|
+
const f = o.basePath || "";
|
|
1652
|
+
window.scrollTo({ top: 0, left: 0, behavior: "auto" }), s(`${f}/${t.language}/${i}`);
|
|
2355
1653
|
};
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
/* @__PURE__ */
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
const u = n.title, p = n.description;
|
|
2369
|
-
return /* @__PURE__ */ m(G, { children: [
|
|
2370
|
-
/* @__PURE__ */ m(Mt, { children: [
|
|
2371
|
-
/* @__PURE__ */ o("title", { children: u }),
|
|
2372
|
-
p && /* @__PURE__ */ o("meta", { name: "description", content: p })
|
|
2373
|
-
] }),
|
|
2374
|
-
/* @__PURE__ */ m("div", { className: A.homePage, children: [
|
|
2375
|
-
/* @__PURE__ */ o("div", { className: A.header, children: /* @__PURE__ */ o("h1", { className: A.title, children: t("ui.latestPosts") }) }),
|
|
2376
|
-
/* @__PURE__ */ o("div", { className: A.articlesList, children: r.map((h) => /* @__PURE__ */ m(
|
|
1654
|
+
return m ? /* @__PURE__ */ d("div", { className: M.homePage, children: [
|
|
1655
|
+
/* @__PURE__ */ e("div", { className: M.header, children: /* @__PURE__ */ e("h1", { className: M.title, children: n("ui.latestPosts") }) }),
|
|
1656
|
+
/* @__PURE__ */ e("div", { className: M.articlesList, children: [...Array(5)].map((i, f) => /* @__PURE__ */ d("div", { className: M.skeletonCard, children: [
|
|
1657
|
+
/* @__PURE__ */ e("div", { className: M.skeletonTitle }),
|
|
1658
|
+
/* @__PURE__ */ e("div", { className: M.skeletonText }),
|
|
1659
|
+
/* @__PURE__ */ e("div", { className: M.skeletonText }),
|
|
1660
|
+
/* @__PURE__ */ e("div", { className: M.skeletonMetadata })
|
|
1661
|
+
] }, f)) })
|
|
1662
|
+
] }) : c.length === 0 ? /* @__PURE__ */ e("div", { className: M.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ d(K, { children: [
|
|
1663
|
+
/* @__PURE__ */ d("div", { className: M.homePage, children: [
|
|
1664
|
+
/* @__PURE__ */ e("div", { className: M.header, children: /* @__PURE__ */ e("h1", { className: M.title, children: n("ui.latestPosts") }) }),
|
|
1665
|
+
/* @__PURE__ */ e("div", { className: M.articlesList, children: c.map((i) => /* @__PURE__ */ d(
|
|
2377
1666
|
"button",
|
|
2378
1667
|
{
|
|
2379
|
-
className:
|
|
2380
|
-
onClick: () =>
|
|
1668
|
+
className: M.articleCard,
|
|
1669
|
+
onClick: () => u(i.slug),
|
|
2381
1670
|
type: "button",
|
|
2382
1671
|
children: [
|
|
2383
|
-
/* @__PURE__ */
|
|
2384
|
-
|
|
2385
|
-
/* @__PURE__ */
|
|
1672
|
+
/* @__PURE__ */ e("h2", { className: M.articleTitle, children: i.title }),
|
|
1673
|
+
i.description && /* @__PURE__ */ e("p", { className: M.articleDescription, children: i.description }),
|
|
1674
|
+
/* @__PURE__ */ e(ve, { date: i.date, author: i.author })
|
|
2386
1675
|
]
|
|
2387
1676
|
},
|
|
2388
|
-
|
|
1677
|
+
i.slug
|
|
2389
1678
|
)) })
|
|
2390
1679
|
] }),
|
|
2391
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ e(Bt, {})
|
|
2392
1681
|
] });
|
|
2393
1682
|
}
|
|
2394
|
-
function
|
|
2395
|
-
const { language:
|
|
2396
|
-
return /* @__PURE__ */
|
|
2397
|
-
/* @__PURE__ */
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
|
|
1683
|
+
function Yo() {
|
|
1684
|
+
const { language: t } = be(), { config: n } = R();
|
|
1685
|
+
return /* @__PURE__ */ e(Co, { children: /* @__PURE__ */ d(Ve, { children: [
|
|
1686
|
+
/* @__PURE__ */ e(De, { path: "/:slug", element: /* @__PURE__ */ e(Rn, { language: t }) }),
|
|
1687
|
+
/* @__PURE__ */ e(
|
|
1688
|
+
De,
|
|
2400
1689
|
{
|
|
2401
1690
|
index: !0,
|
|
2402
|
-
element: (
|
|
1691
|
+
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Ao, {}) : /* @__PURE__ */ e(He, { to: `./${n.defaultRoute}`, replace: !0 })
|
|
2403
1692
|
}
|
|
2404
1693
|
)
|
|
2405
1694
|
] }) });
|
|
2406
1695
|
}
|
|
2407
|
-
function
|
|
1696
|
+
function Vo() {
|
|
2408
1697
|
return {
|
|
2409
1698
|
openSearchModal: () => {
|
|
2410
1699
|
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
@@ -2414,48 +1703,48 @@ function bs() {
|
|
|
2414
1703
|
}
|
|
2415
1704
|
};
|
|
2416
1705
|
}
|
|
2417
|
-
function
|
|
2418
|
-
const { i18n:
|
|
1706
|
+
function Jo() {
|
|
1707
|
+
const { i18n: t } = E(), n = Y(), o = Q(), { config: a } = R();
|
|
2419
1708
|
return (s) => {
|
|
2420
|
-
const
|
|
2421
|
-
let
|
|
2422
|
-
|
|
2423
|
-
const
|
|
2424
|
-
let
|
|
2425
|
-
a.supportedLanguages.includes(
|
|
2426
|
-
const
|
|
2427
|
-
|
|
1709
|
+
const c = a.basePath || "";
|
|
1710
|
+
let l = n.pathname;
|
|
1711
|
+
c && l.startsWith(c) && (l = l.slice(c.length));
|
|
1712
|
+
const m = l.split("/").filter(Boolean), h = m[0];
|
|
1713
|
+
let u = "";
|
|
1714
|
+
a.supportedLanguages.includes(h) ? (m[0] = s, u = `${c}/${m.join("/")}`) : u = `${c}/${s}${l}`;
|
|
1715
|
+
const i = u + n.search + n.hash;
|
|
1716
|
+
t.changeLanguage(s), o(i);
|
|
2428
1717
|
};
|
|
2429
1718
|
}
|
|
2430
1719
|
export {
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
1720
|
+
mt as AdvancedModeToggle,
|
|
1721
|
+
Tt as ArticleNavigation,
|
|
1722
|
+
Qo as BlogProvider,
|
|
1723
|
+
_t as BlogRoot,
|
|
1724
|
+
Bt as BlogSidebar,
|
|
1725
|
+
Ht as Breadcrumb,
|
|
1726
|
+
Rn as ContentPage,
|
|
1727
|
+
Co as DocumentationLayout,
|
|
1728
|
+
Yo as DocumentationRoutes,
|
|
1729
|
+
wa as Header,
|
|
1730
|
+
Ao as HomePage,
|
|
1731
|
+
we as LanguageSelector,
|
|
1732
|
+
ve as Metadata,
|
|
1733
|
+
Xa as MobileMenu,
|
|
1734
|
+
Xo as NavigationContent,
|
|
1735
|
+
Ne as NavigationMenu,
|
|
1736
|
+
ta as SearchBar,
|
|
1737
|
+
vo as Sidebar,
|
|
1738
|
+
on as TableOfContents,
|
|
1739
|
+
fn as TagResultsModal,
|
|
1740
|
+
Cn as Tags,
|
|
1741
|
+
Go as createBlogUtils,
|
|
1742
|
+
qe as createContentLoaders,
|
|
1743
|
+
ee as generateHeadingId,
|
|
1744
|
+
pt as getAdjacentArticles,
|
|
1745
|
+
he as getNavigationData,
|
|
1746
|
+
R as useBlogConfig,
|
|
1747
|
+
Jo as useLanguageChange,
|
|
1748
|
+
Vo as useSearchModal,
|
|
1749
|
+
Ke as useTheme
|
|
2461
1750
|
};
|