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