@x-wave/blog 1.0.20 → 1.0.21

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.
Files changed (2) hide show
  1. package/index.js +215 -215
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { jsxs as d, jsx as e, Fragment as G } from "react/jsx-runtime";
2
2
  import { useTranslation as O } from "react-i18next";
3
- import { useLocation as Q, useNavigate as K, useParams as ce, Link as he, Navigate as be, Routes as ye, Route as me } from "react-router-dom";
4
- import { useState as T, useEffect as S, createContext as Te, useContext as Pe, useRef as F } from "react";
3
+ import { useLocation as Q, useNavigate as K, useParams as ce, Link as he, Navigate as be, Routes as ye, Route as ge } from "react-router-dom";
4
+ import { useState as P, useEffect as S, createContext as Pe, useContext as Te, useRef as F } from "react";
5
5
  import Le from "react-markdown";
6
6
  import Se from "remark-gfm";
7
7
  import ne from "i18next";
8
- import { User as De, CalendarBlank as Be, X as re, Tag as Me, MagnifyingGlass as ge, List as Ee, Sun as _e, Moon as pe, Monitor as fe, CaretDown as oe, Globe as Oe, CaretRight as Re } from "@phosphor-icons/react";
8
+ import { User as De, CalendarBlank as Be, X as re, Tag as Me, MagnifyingGlass as me, List as Ee, Sun as _e, Moon as pe, Monitor as fe, CaretDown as oe, Globe as Oe, CaretRight as Re } from "@phosphor-icons/react";
9
9
  import { createPortal as we } from "react-dom";
10
10
  const je = "_tabContainer_zk6h4_1", Ae = "_tab_zk6h4_1", We = "_active_zk6h4_45", Y = {
11
11
  tabContainer: je,
@@ -22,7 +22,7 @@ function He({ hasAdvanced: t }) {
22
22
  const v = h.toString(), _ = v ? `?${v}` : "";
23
23
  a(`${s.pathname}${_}${s.hash}`);
24
24
  }
25
- }, g = () => {
25
+ }, m = () => {
26
26
  if (!o) {
27
27
  const h = new URLSearchParams(s.search);
28
28
  h.set("advanced", ""), a(`${s.pathname}?${h.toString()}${s.hash}`);
@@ -43,7 +43,7 @@ function He({ hasAdvanced: t }) {
43
43
  {
44
44
  type: "button",
45
45
  className: `${Y.tab} ${o ? Y.active : ""}`,
46
- onClick: g,
46
+ onClick: m,
47
47
  children: n("ui.advanced")
48
48
  }
49
49
  )
@@ -52,33 +52,33 @@ function He({ hasAdvanced: t }) {
52
52
  function qe({ children: t }) {
53
53
  return /* @__PURE__ */ e("div", { className: "xw-blog-root", children: t });
54
54
  }
55
- function $e(t) {
55
+ function Ne(t) {
56
56
  function n(s) {
57
57
  const a = s.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
58
58
  if (!a) return { frontmatter: {}, content: s };
59
59
  const r = {}, o = a[1];
60
- let u = "", g = !1;
60
+ let u = "", m = !1;
61
61
  const h = [];
62
62
  for (const _ of o.split(`
63
63
  `)) {
64
64
  const b = _.trim();
65
65
  if (b.startsWith("-")) {
66
- if (g) {
66
+ if (m) {
67
67
  const p = b.substring(1).trim();
68
68
  h.push(p);
69
69
  }
70
70
  continue;
71
71
  }
72
- if (g && !b.startsWith("-") && (r[u] = h.slice(), h.length = 0, g = !1), b != null && b.includes(":")) {
72
+ if (m && !b.startsWith("-") && (r[u] = h.slice(), h.length = 0, m = !1), b != null && b.includes(":")) {
73
73
  const [p, ...i] = b.split(":"), l = i.join(":").trim();
74
74
  if (u = p.trim(), !l) {
75
- g = !0;
75
+ m = !0;
76
76
  continue;
77
77
  }
78
78
  l === "true" ? r[u] = !0 : l === "false" ? r[u] = !1 : r[u] = l;
79
79
  }
80
80
  }
81
- g && h.length > 0 && (r[u] = h);
81
+ m && h.length > 0 && (r[u] = h);
82
82
  const v = s.replace(
83
83
  /^---\s*\n[\s\S]*?\n---\s*\n/,
84
84
  ""
@@ -91,9 +91,9 @@ function $e(t) {
91
91
  * Automatically loads the advanced variant if `advanced` is true.
92
92
  */
93
93
  async loadMDXContent(s, a, r = !1) {
94
- const o = r ? `${a}-advanced.mdx` : `${a}.mdx`, u = `./docs/${s}/${o}`, g = t[u];
95
- if (!g) throw new Error(`File not found: ${u}`);
96
- const h = await g(), { frontmatter: v, content: _ } = n(h);
94
+ const o = r ? `${a}-advanced.mdx` : `${a}.mdx`, u = `./docs/${s}/${o}`, m = t[u];
95
+ if (!m) throw new Error(`File not found: ${u}`);
96
+ const h = await m(), { frontmatter: v, content: _ } = n(h);
97
97
  return { content: _, frontmatter: v };
98
98
  },
99
99
  /**
@@ -103,7 +103,7 @@ function $e(t) {
103
103
  async loadEnglishContent(s, a = !1) {
104
104
  const o = `./docs/en/${a ? `${s}-advanced.mdx` : `${s}.mdx`}`, u = t[o];
105
105
  if (!u) throw new Error(`File not found: ${o}`);
106
- const g = await u(), { content: h } = n(g);
106
+ const m = await u(), { content: h } = n(m);
107
107
  return h;
108
108
  },
109
109
  /**
@@ -119,42 +119,42 @@ function $e(t) {
119
119
  );
120
120
  for (const u of o)
121
121
  try {
122
- const g = t[u], h = await g(), { frontmatter: v, content: _ } = n(h), b = u.split("/").pop() || "", p = b.replace(".mdx", "").replace("-advanced", ""), i = _.match(/^#\s+(.+)$/m), l = i ? i[1].trim() : p;
122
+ const m = t[u], h = await m(), { frontmatter: v, content: _ } = n(h), b = u.split("/").pop() || "", p = b.replace(".mdx", "").replace("-advanced", ""), i = _.match(/^#\s+(.+)$/m), l = i ? i[1].trim() : p;
123
123
  if (b.includes("-advanced")) continue;
124
124
  const c = v.tags;
125
125
  if (c && Array.isArray(c))
126
126
  for (const w of c)
127
127
  a[w] || (a[w] = []), a[w].some((I) => I.slug === p) || a[w].push({ slug: p, title: l });
128
- } catch (g) {
129
- console.warn(`Failed to process ${u}:`, g);
128
+ } catch (m) {
129
+ console.warn(`Failed to process ${u}:`, m);
130
130
  }
131
131
  return a;
132
132
  }
133
133
  };
134
134
  }
135
135
  function Ga(t) {
136
- const n = $e(t);
136
+ const n = Ne(t);
137
137
  return {
138
138
  mdxFiles: t,
139
139
  loadContent: n.loadMDXContent,
140
140
  loadEnglishContent: n.loadEnglishContent
141
141
  };
142
142
  }
143
- const Ne = "app-theme", xe = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ve = (t) => t === "system" ? xe() : t, Fe = () => typeof window > "u" ? "system" : localStorage.getItem(Ne) || "system", Ie = () => {
144
- const [t, n] = T(Fe);
143
+ const $e = "app-theme", xe = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ve = (t) => t === "system" ? xe() : t, Fe = () => typeof window > "u" ? "system" : localStorage.getItem($e) || "system", Ie = () => {
144
+ const [t, n] = P(Fe);
145
145
  return S(() => {
146
146
  const a = ve(t), r = document.querySelector(".xw-blog-root");
147
147
  if (r && (r.classList.remove("light", "dark"), r.classList.add(a)), t === "system") {
148
148
  const o = window.matchMedia("(prefers-color-scheme: dark)"), u = () => {
149
- const g = xe(), h = document.querySelector(".xw-blog-root");
150
- h && (h.classList.remove("light", "dark"), h.classList.add(g));
149
+ const m = xe(), h = document.querySelector(".xw-blog-root");
150
+ h && (h.classList.remove("light", "dark"), h.classList.add(m));
151
151
  };
152
152
  return o.addEventListener("change", u), () => o.removeEventListener("change", u);
153
153
  }
154
154
  }, [t]), {
155
155
  theme: t,
156
156
  setTheme: (a) => {
157
- localStorage.setItem(Ne, a), n(a);
157
+ localStorage.setItem($e, a), n(a);
158
158
  },
159
159
  effectiveTheme: ve(t)
160
160
  };
@@ -175,7 +175,7 @@ const Ne = "app-theme", xe = () => typeof window > "u" ? "light" : window.matchM
175
175
  ...s.showTableOfContents !== void 0 && {
176
176
  showTableOfContents: s.showTableOfContents
177
177
  }
178
- }), Z = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), Ce = Te(null);
178
+ }), Z = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), Ce = Pe(null);
179
179
  function Qa({
180
180
  children: t,
181
181
  config: n,
@@ -183,11 +183,11 @@ function Qa({
183
183
  navigationData: a = []
184
184
  }) {
185
185
  Ie();
186
- const [r, o] = T({});
186
+ const [r, o] = P({});
187
187
  S(() => {
188
- const { buildTagIndex: g } = $e(s.mdxFiles), h = n.supportedLanguages.map(async (v) => {
188
+ const { buildTagIndex: m } = Ne(s.mdxFiles), h = n.supportedLanguages.map(async (v) => {
189
189
  try {
190
- const _ = await g(v);
190
+ const _ = await m(v);
191
191
  return { language: v, index: _ };
192
192
  } catch (_) {
193
193
  return console.error(`Failed to build tag index for ${v}:`, _), { language: v, index: {} };
@@ -216,7 +216,7 @@ function Qa({
216
216
  );
217
217
  }
218
218
  function R() {
219
- const t = Pe(Ce);
219
+ const t = Te(Ce);
220
220
  if (!t)
221
221
  throw new Error("useBlogConfig must be used within a BlogProvider");
222
222
  return t;
@@ -260,26 +260,26 @@ function rt({
260
260
  content: t,
261
261
  englishContent: n
262
262
  }) {
263
- const { t: s } = O(), a = Q(), r = K(), [o, u] = T([]), [g, h] = T(""), v = F(null);
263
+ const { t: s } = O(), a = Q(), r = K(), [o, u] = P([]), [m, h] = P(""), v = F(null);
264
264
  S(() => {
265
265
  h(""), (() => {
266
266
  const p = /^(#{1,6})\s+(.+)$/gm, i = [];
267
267
  let l = p.exec(t);
268
268
  const c = [];
269
269
  for (; l !== null; ) {
270
- const f = l[1].length, $ = l[2].trim();
271
- c.push({ level: f, text: $ }), l = p.exec(t);
270
+ const f = l[1].length, N = l[2].trim();
271
+ c.push({ level: f, text: N }), l = p.exec(t);
272
272
  }
273
273
  const w = /^(#{1,6})\s+(.+)$/gm;
274
- let I = w.exec(n), y = 0;
275
- for (; I !== null && y < c.length; ) {
276
- const f = I[2].trim(), $ = Z(f);
274
+ let I = w.exec(n), k = 0;
275
+ for (; I !== null && k < c.length; ) {
276
+ const f = I[2].trim(), N = Z(f);
277
277
  i.push({
278
- id: $,
279
- text: c[y].text,
278
+ id: N,
279
+ text: c[k].text,
280
280
  // Use localized text for display
281
- level: c[y].level
282
- }), y++, I = w.exec(n);
281
+ level: c[k].level
282
+ }), k++, I = w.exec(n);
283
283
  }
284
284
  u(i);
285
285
  })();
@@ -341,7 +341,7 @@ function rt({
341
341
  /* @__PURE__ */ e("nav", { className: W.nav, children: /* @__PURE__ */ e("ul", { className: W.list, children: o.map((b) => /* @__PURE__ */ e("li", { className: W.item, children: /* @__PURE__ */ e(
342
342
  "button",
343
343
  {
344
- className: `${W.link} ${W[`level${b.level}`]} ${g === b.id ? W.active : ""}`,
344
+ className: `${W.link} ${W[`level${b.level}`]} ${m === b.id ? W.active : ""}`,
345
345
  onClick: () => _(b.id),
346
346
  type: "button",
347
347
  children: b.text
@@ -349,14 +349,14 @@ function rt({
349
349
  ) }, b.id)) }) })
350
350
  ] });
351
351
  }
352
- const lt = "_overlay_1e1d4_1", it = "_modal_1e1d4_26", dt = "_header_1e1d4_50", ut = "_title_1e1d4_58", ht = "_closeButton_1e1d4_65", mt = "_results_1e1d4_86", gt = "_resultsList_1e1d4_94", _t = "_resultItem_1e1d4_100", pt = "_resultTitle_1e1d4_119", ft = "_resultSlug_1e1d4_124", vt = "_noResults_1e1d4_130", j = {
352
+ const lt = "_overlay_1e1d4_1", it = "_modal_1e1d4_26", dt = "_header_1e1d4_50", ut = "_title_1e1d4_58", ht = "_closeButton_1e1d4_65", gt = "_results_1e1d4_86", mt = "_resultsList_1e1d4_94", _t = "_resultItem_1e1d4_100", pt = "_resultTitle_1e1d4_119", ft = "_resultSlug_1e1d4_124", vt = "_noResults_1e1d4_130", j = {
353
353
  overlay: lt,
354
354
  modal: it,
355
355
  header: dt,
356
356
  title: ut,
357
357
  closeButton: ht,
358
- results: mt,
359
- resultsList: gt,
358
+ results: gt,
359
+ resultsList: mt,
360
360
  resultItem: _t,
361
361
  resultTitle: pt,
362
362
  resultSlug: ft,
@@ -368,7 +368,7 @@ function bt({
368
368
  language: s,
369
369
  onClose: a
370
370
  }) {
371
- const { t: r } = O(), { config: o } = R(), u = K(), g = (h) => {
371
+ const { t: r } = O(), { config: o } = R(), u = K(), m = (h) => {
372
372
  const v = o.basePath || "";
373
373
  u(`${v}/${s}/${h}`), a();
374
374
  };
@@ -396,7 +396,7 @@ function bt({
396
396
  {
397
397
  type: "button",
398
398
  className: j.resultItem,
399
- onClick: () => g(h.slug),
399
+ onClick: () => m(h.slug),
400
400
  children: [
401
401
  /* @__PURE__ */ e("div", { className: j.resultTitle, children: h.title }),
402
402
  /* @__PURE__ */ d("div", { className: j.resultSlug, children: [
@@ -410,10 +410,10 @@ function bt({
410
410
  document.body
411
411
  );
412
412
  }
413
- const wt = "_tags_11t8a_1", $t = "_compact_11t8a_9", Nt = "_tagLabel_11t8a_15", xt = "_tagIcon_11t8a_25", It = "_tagList_11t8a_30", Ct = "_tag_11t8a_1", z = {
413
+ const wt = "_tags_11t8a_1", Nt = "_compact_11t8a_9", $t = "_tagLabel_11t8a_15", xt = "_tagIcon_11t8a_25", It = "_tagList_11t8a_30", Ct = "_tag_11t8a_1", z = {
414
414
  tags: wt,
415
- compact: $t,
416
- tagLabel: Nt,
415
+ compact: Nt,
416
+ tagLabel: $t,
417
417
  tagIcon: xt,
418
418
  tagList: It,
419
419
  tag: Ct
@@ -451,10 +451,10 @@ function kt({ tags: t, variant: n = "default", onTagClick: s }) {
451
451
  }
452
452
  );
453
453
  }
454
- const yt = "_contentPage_1nxj5_1", Tt = "_loadingContainer_1nxj5_48", Pt = "_errorContainer_1nxj5_49", Lt = "_skeletonTitle_1nxj5_71", St = "_skeletonParagraph_1nxj5_80", Dt = "_skeletonParagraphShort_1nxj5_93", Bt = "_errorText_1nxj5_107", Mt = "_mdxContent_1nxj5_112", Et = "_withMetadata_1nxj5_125", Ot = "_codeBlock_1nxj5_300", Rt = "_codeLanguage_1nxj5_304", B = {
454
+ const yt = "_contentPage_1nxj5_1", Pt = "_loadingContainer_1nxj5_48", Tt = "_errorContainer_1nxj5_49", Lt = "_skeletonTitle_1nxj5_71", St = "_skeletonParagraph_1nxj5_80", Dt = "_skeletonParagraphShort_1nxj5_93", Bt = "_errorText_1nxj5_107", Mt = "_mdxContent_1nxj5_112", Et = "_withMetadata_1nxj5_125", Ot = "_codeBlock_1nxj5_300", Rt = "_codeLanguage_1nxj5_304", B = {
455
455
  contentPage: yt,
456
- loadingContainer: Tt,
457
- errorContainer: Pt,
456
+ loadingContainer: Pt,
457
+ errorContainer: Tt,
458
458
  skeletonTitle: Lt,
459
459
  skeletonParagraph: St,
460
460
  skeletonParagraphShort: Dt,
@@ -466,60 +466,60 @@ const yt = "_contentPage_1nxj5_1", Tt = "_loadingContainer_1nxj5_48", Pt = "_err
466
466
  };
467
467
  function jt({ language: t }) {
468
468
  var ue;
469
- const { slug: n } = ce(), s = Q(), { config: a, loadContent: r, loadEnglishContent: o } = R(), [u, g] = T(""), [h, v] = T(""), [_, b] = T({}), [p, i] = T(!0), [l, c] = T(null), [w, I] = T(!0), [y, f] = T(null), $ = F(0), D = F([]), ee = ((m) => {
469
+ const { slug: n } = ce(), s = Q(), { config: a, loadContent: r, loadEnglishContent: o } = R(), [u, m] = P(""), [h, v] = P(""), [_, b] = P({}), [p, i] = P(!0), [l, c] = P(null), [w, I] = P(!0), [k, f] = P(null), N = F(0), D = F([]), ee = ((g) => {
470
470
  const C = {
471
471
  advanced: !1,
472
472
  anchor: ""
473
473
  };
474
- if (!m) return C;
475
- const N = (m.startsWith("?") ? m.substring(1) : m).split("&");
476
- for (const k of N)
477
- k === "advanced" ? C.advanced = !0 : k.startsWith("a=") && (C.anchor = k.substring(2));
474
+ if (!g) return C;
475
+ const $ = (g.startsWith("?") ? g.substring(1) : g).split("&");
476
+ for (const y of $)
477
+ y === "advanced" ? C.advanced = !0 : y.startsWith("a=") && (C.anchor = y.substring(2));
478
478
  return C;
479
479
  })(s.search), A = ee.advanced;
480
480
  if (S(() => {
481
481
  (async () => {
482
482
  if (!n) return;
483
- i(!0), c(null), $.current = 0;
483
+ i(!0), c(null), N.current = 0;
484
484
  const C = (a == null ? void 0 : a.navigationData) || [];
485
485
  let L = !0;
486
- for (const N of C)
487
- if ("items" in N) {
488
- const k = N.items.find((E) => E.slug === n);
489
- if (k) {
490
- L = k.showTableOfContents !== !1;
486
+ for (const $ of C)
487
+ if ("items" in $) {
488
+ const y = $.items.find((E) => E.slug === n);
489
+ if (y) {
490
+ L = y.showTableOfContents !== !1;
491
491
  break;
492
492
  }
493
- } else if (N.slug === n) {
494
- L = N.showTableOfContents !== !1;
493
+ } else if ($.slug === n) {
494
+ L = $.showTableOfContents !== !1;
495
495
  break;
496
496
  }
497
497
  I(L);
498
498
  try {
499
- let N;
499
+ let $;
500
500
  try {
501
- N = await r(t, n, A);
501
+ $ = await r(t, n, A);
502
502
  } catch {
503
503
  if (A)
504
- N = await r(t, n, !1);
504
+ $ = await r(t, n, !1);
505
505
  else
506
506
  throw new Error("Content not found");
507
507
  }
508
- let k = "";
508
+ let y = "";
509
509
  try {
510
- k = await o(n, A);
510
+ y = await o(n, A);
511
511
  } catch {
512
- A && (k = await o(n, !1));
512
+ A && (y = await o(n, !1));
513
513
  }
514
514
  const E = /^(#{1,6})\s+(.+)$/gm, X = [];
515
- let U = E.exec(k);
515
+ let U = E.exec(y);
516
516
  for (; U !== null; ) {
517
517
  const ke = U[2].trim();
518
- X.push(ke), U = E.exec(k);
518
+ X.push(ke), U = E.exec(y);
519
519
  }
520
- D.current = X, v(k), g(N.content), b(N.frontmatter);
521
- } catch (N) {
522
- c(N instanceof Error ? N.message : "Failed to load content");
520
+ D.current = X, v(y), m($.content), b($.frontmatter);
521
+ } catch ($) {
522
+ c($ instanceof Error ? $.message : "Failed to load content");
523
523
  } finally {
524
524
  i(!1);
525
525
  }
@@ -533,17 +533,17 @@ function jt({ language: t }) {
533
533
  o
534
534
  ]), S(() => {
535
535
  if (!p && ee.anchor) {
536
- const m = setTimeout(() => {
536
+ const g = setTimeout(() => {
537
537
  const C = document.getElementById(ee.anchor);
538
538
  if (C) {
539
- const k = C.getBoundingClientRect().top + window.pageYOffset - 80;
539
+ const y = C.getBoundingClientRect().top + window.pageYOffset - 80;
540
540
  window.scrollTo({
541
- top: k,
541
+ top: y,
542
542
  behavior: "smooth"
543
543
  });
544
544
  }
545
545
  }, 150);
546
- return () => clearTimeout(m);
546
+ return () => clearTimeout(g);
547
547
  }
548
548
  }, [p, ee.anchor]), p)
549
549
  return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ d("div", { className: B.loadingContainer, children: [
@@ -557,7 +557,7 @@ function jt({ language: t }) {
557
557
  "Error: ",
558
558
  l
559
559
  ] }) }) });
560
- $.current = 0;
560
+ N.current = 0;
561
561
  let de = !1;
562
562
  return /* @__PURE__ */ d(G, { children: [
563
563
  /* @__PURE__ */ d("div", { className: B.contentPage, children: [
@@ -567,22 +567,22 @@ function jt({ language: t }) {
567
567
  {
568
568
  remarkPlugins: [Se],
569
569
  components: {
570
- h1: ({ children: m }) => {
571
- const C = $.current++, L = D.current[C] || "", N = Z(L), k = A ? `?advanced&a=${N}` : `?a=${N}`, E = `#/${t}/${n}${k}`, X = !de;
570
+ h1: ({ children: g }) => {
571
+ const C = N.current++, L = D.current[C] || "", $ = Z(L), E = A ? `?advanced&a=${$}` : `?a=${$}`, X = !de;
572
572
  de = !0;
573
573
  const U = _.date || _.author;
574
574
  return /* @__PURE__ */ d(G, { children: [
575
575
  /* @__PURE__ */ e(
576
576
  "h1",
577
577
  {
578
- id: N,
578
+ id: $,
579
579
  className: X && U ? B.withMetadata : void 0,
580
580
  children: /* @__PURE__ */ e(
581
581
  "a",
582
582
  {
583
583
  href: E,
584
584
  style: { color: "inherit", textDecoration: "none" },
585
- children: m
585
+ children: g
586
586
  }
587
587
  )
588
588
  }
@@ -596,81 +596,81 @@ function jt({ language: t }) {
596
596
  )
597
597
  ] });
598
598
  },
599
- h2: ({ children: m }) => {
600
- const C = $.current++, L = D.current[C] || "", N = Z(L), k = A ? `?advanced&a=${N}` : `?a=${N}`, E = `#/${t}/${n}${k}`;
601
- return /* @__PURE__ */ e("h2", { id: N, children: /* @__PURE__ */ e(
599
+ h2: ({ children: g }) => {
600
+ const C = N.current++, L = D.current[C] || "", $ = Z(L), E = A ? `?advanced&a=${$}` : `?a=${$}`;
601
+ return /* @__PURE__ */ e("h2", { id: $, children: /* @__PURE__ */ e(
602
602
  "a",
603
603
  {
604
604
  href: E,
605
605
  style: { color: "inherit", textDecoration: "none" },
606
- children: m
606
+ children: g
607
607
  }
608
608
  ) });
609
609
  },
610
- h3: ({ children: m }) => {
611
- const C = $.current++, L = D.current[C] || "", N = Z(L), k = A ? `?advanced&a=${N}` : `?a=${N}`, E = `#/${t}/${n}${k}`;
612
- return /* @__PURE__ */ e("h3", { id: N, children: /* @__PURE__ */ e(
610
+ h3: ({ children: g }) => {
611
+ const C = N.current++, L = D.current[C] || "", $ = Z(L), E = A ? `?advanced&a=${$}` : `?a=${$}`;
612
+ return /* @__PURE__ */ e("h3", { id: $, children: /* @__PURE__ */ e(
613
613
  "a",
614
614
  {
615
615
  href: E,
616
616
  style: { color: "inherit", textDecoration: "none" },
617
- children: m
617
+ children: g
618
618
  }
619
619
  ) });
620
620
  },
621
- h4: ({ children: m }) => {
622
- const C = $.current++, L = D.current[C] || "", N = Z(L), k = A ? `?advanced&a=${N}` : `?a=${N}`, E = `#/${t}/${n}${k}`;
623
- return /* @__PURE__ */ e("h4", { id: N, children: /* @__PURE__ */ e(
621
+ h4: ({ children: g }) => {
622
+ const C = N.current++, L = D.current[C] || "", $ = Z(L), E = A ? `?advanced&a=${$}` : `?a=${$}`;
623
+ return /* @__PURE__ */ e("h4", { id: $, children: /* @__PURE__ */ e(
624
624
  "a",
625
625
  {
626
626
  href: E,
627
627
  style: { color: "inherit", textDecoration: "none" },
628
- children: m
628
+ children: g
629
629
  }
630
630
  ) });
631
631
  },
632
- h5: ({ children: m }) => {
633
- const C = `h5-${$.current++}`;
634
- return /* @__PURE__ */ e("h5", { id: C, children: m });
632
+ h5: ({ children: g }) => {
633
+ const C = `h5-${N.current++}`;
634
+ return /* @__PURE__ */ e("h5", { id: C, children: g });
635
635
  },
636
- h6: ({ children: m }) => {
637
- const C = `h6-${$.current++}`;
638
- return /* @__PURE__ */ e("h6", { id: C, children: m });
636
+ h6: ({ children: g }) => {
637
+ const C = `h6-${N.current++}`;
638
+ return /* @__PURE__ */ e("h6", { id: C, children: g });
639
639
  },
640
- p: ({ children: m }) => /* @__PURE__ */ e("p", { children: m }),
641
- ul: ({ children: m }) => /* @__PURE__ */ e("ul", { children: m }),
642
- ol: ({ children: m }) => /* @__PURE__ */ e("ol", { children: m }),
643
- li: ({ children: m }) => /* @__PURE__ */ e("li", { children: m }),
644
- code: ({ className: m, children: C, ...L }) => {
645
- if (!m)
640
+ p: ({ children: g }) => /* @__PURE__ */ e("p", { children: g }),
641
+ ul: ({ children: g }) => /* @__PURE__ */ e("ul", { children: g }),
642
+ ol: ({ children: g }) => /* @__PURE__ */ e("ol", { children: g }),
643
+ li: ({ children: g }) => /* @__PURE__ */ e("li", { children: g }),
644
+ code: ({ className: g, children: C, ...L }) => {
645
+ if (!g)
646
646
  return /* @__PURE__ */ e("code", { ...L, children: C });
647
- const k = (m == null ? void 0 : m.replace("language-", "")) || "";
647
+ const y = (g == null ? void 0 : g.replace("language-", "")) || "";
648
648
  return /* @__PURE__ */ d("div", { className: B.codeBlock, children: [
649
- k && /* @__PURE__ */ e("div", { className: B.codeLanguage, children: k }),
650
- /* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: m, ...L, children: C }) })
649
+ y && /* @__PURE__ */ e("div", { className: B.codeLanguage, children: y }),
650
+ /* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: g, ...L, children: C }) })
651
651
  ] });
652
652
  },
653
- pre: ({ children: m }) => /* @__PURE__ */ e(G, { children: m }),
653
+ pre: ({ children: g }) => /* @__PURE__ */ e(G, { children: g }),
654
654
  // Let code component handle pre styling
655
- blockquote: ({ children: m }) => /* @__PURE__ */ e("blockquote", { children: m }),
656
- a: ({ href: m, children: C, ...L }) => {
657
- if (m != null && m.startsWith("./")) {
658
- const N = m.slice(2), k = `#/${t}/${N}`;
659
- return /* @__PURE__ */ e("a", { href: k, ...L, children: C });
655
+ blockquote: ({ children: g }) => /* @__PURE__ */ e("blockquote", { children: g }),
656
+ a: ({ href: g, children: C, ...L }) => {
657
+ if (g != null && g.startsWith("./")) {
658
+ const $ = g.slice(2), y = `#/${t}/${$}`;
659
+ return /* @__PURE__ */ e("a", { href: y, ...L, children: C });
660
660
  }
661
- return m != null && m.startsWith("http://") || m != null && m.startsWith("https://") ? /* @__PURE__ */ e(
661
+ return g != null && g.startsWith("http://") || g != null && g.startsWith("https://") ? /* @__PURE__ */ e(
662
662
  "a",
663
663
  {
664
- href: m,
664
+ href: g,
665
665
  target: "_blank",
666
666
  rel: "noopener noreferrer",
667
667
  ...L,
668
668
  children: C
669
669
  }
670
- ) : /* @__PURE__ */ e("a", { href: m, ...L, children: C });
670
+ ) : /* @__PURE__ */ e("a", { href: g, ...L, children: C });
671
671
  },
672
- strong: ({ children: m }) => /* @__PURE__ */ e("strong", { children: m }),
673
- em: ({ children: m }) => /* @__PURE__ */ e("em", { children: m })
672
+ strong: ({ children: g }) => /* @__PURE__ */ e("strong", { children: g }),
673
+ em: ({ children: g }) => /* @__PURE__ */ e("em", { children: g })
674
674
  },
675
675
  children: u
676
676
  }
@@ -680,23 +680,23 @@ function jt({ language: t }) {
680
680
  {
681
681
  tags: _.tags,
682
682
  variant: "compact",
683
- onTagClick: (m) => f(m)
683
+ onTagClick: (g) => f(g)
684
684
  }
685
685
  )
686
686
  ] }),
687
687
  w && /* @__PURE__ */ e(rt, { content: u, englishContent: h }),
688
- y && ((ue = a.tagIndex) == null ? void 0 : ue[t]) && /* @__PURE__ */ e(
688
+ k && ((ue = a.tagIndex) == null ? void 0 : ue[t]) && /* @__PURE__ */ e(
689
689
  bt,
690
690
  {
691
- tag: y,
692
- results: a.tagIndex[t][y] || [],
691
+ tag: k,
692
+ results: a.tagIndex[t][k] || [],
693
693
  language: t,
694
694
  onClose: () => f(null)
695
695
  }
696
696
  )
697
697
  ] });
698
698
  }
699
- const At = "_searchButton_1k9sl_1", Wt = "_searchIcon_1k9sl_17", Ht = "_searchHint_1k9sl_23", qt = "_kbd_1k9sl_27", Ft = "_searchOverlay_1k9sl_42", Kt = "_searchModal_1k9sl_67", Ut = "_searchHeader_1k9sl_91", zt = "_searchInput_1k9sl_105", Gt = "_closeButton_1k9sl_123", Qt = "_searchResults_1k9sl_144", Xt = "_resultsList_1k9sl_152", Yt = "_resultItem_1k9sl_158", Vt = "_selected_1k9sl_173", Jt = "_resultTitle_1k9sl_176", Zt = "_resultSlug_1k9sl_180", en = "_noResults_1k9sl_186", tn = "_searchHints_1k9sl_193", nn = "_hint_1k9sl_210", P = {
699
+ const At = "_searchButton_1k9sl_1", Wt = "_searchIcon_1k9sl_17", Ht = "_searchHint_1k9sl_23", qt = "_kbd_1k9sl_27", Ft = "_searchOverlay_1k9sl_42", Kt = "_searchModal_1k9sl_67", Ut = "_searchHeader_1k9sl_91", zt = "_searchInput_1k9sl_105", Gt = "_closeButton_1k9sl_123", Qt = "_searchResults_1k9sl_144", Xt = "_resultsList_1k9sl_152", Yt = "_resultItem_1k9sl_158", Vt = "_selected_1k9sl_173", Jt = "_resultTitle_1k9sl_176", Zt = "_resultSlug_1k9sl_180", en = "_noResults_1k9sl_186", tn = "_searchHints_1k9sl_193", nn = "_hint_1k9sl_210", T = {
700
700
  searchButton: At,
701
701
  searchIcon: Wt,
702
702
  searchHint: Ht,
@@ -717,25 +717,25 @@ const At = "_searchButton_1k9sl_1", Wt = "_searchIcon_1k9sl_17", Ht = "_searchHi
717
717
  hint: nn
718
718
  };
719
719
  function an({ language: t }) {
720
- const { t: n } = O(), s = K(), { config: a } = R(), [r, o] = T(!1), [u, g] = T(""), [h, v] = T([]), [_, b] = T(0), p = F(null), i = F(null), c = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K", w = (a.navigationData ? te(a.navigationData, t) : []).flatMap((f) => "items" in f ? f.items.map(($) => ({
721
- title: $.title,
722
- slug: $.slug
720
+ const { t: n } = O(), s = K(), { config: a } = R(), [r, o] = P(!1), [u, m] = P(""), [h, v] = P([]), [_, b] = P(0), p = F(null), i = F(null), c = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K", w = (a.navigationData ? te(a.navigationData, t) : []).flatMap((f) => "items" in f ? f.items.map((N) => ({
721
+ title: N.title,
722
+ slug: N.slug
723
723
  })) : [{ title: f.title, slug: f.slug }]);
724
724
  S(() => {
725
725
  if (!u.trim()) {
726
726
  v([]), b(0);
727
727
  return;
728
728
  }
729
- const f = u.toLowerCase(), $ = w.filter(
729
+ const f = u.toLowerCase(), N = w.filter(
730
730
  (D) => D.title.toLowerCase().includes(f) || D.slug.toLowerCase().includes(f)
731
731
  );
732
- v($), b(0);
732
+ v(N), b(0);
733
733
  }, [u]), S(() => {
734
- const f = ($) => {
735
- ($.metaKey || $.ctrlKey) && $.key === "k" && ($.preventDefault(), o(!0), setTimeout(() => {
734
+ const f = (N) => {
735
+ (N.metaKey || N.ctrlKey) && N.key === "k" && (N.preventDefault(), o(!0), setTimeout(() => {
736
736
  var D;
737
737
  return (D = p.current) == null ? void 0 : D.focus();
738
- }, 100)), $.key === "Escape" && r && (o(!1), g(""));
738
+ }, 100)), N.key === "Escape" && r && (o(!1), m(""));
739
739
  };
740
740
  return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
741
741
  }, [r]), S(() => {
@@ -744,32 +744,32 @@ function an({ language: t }) {
744
744
  var D;
745
745
  return (D = p.current) == null ? void 0 : D.focus();
746
746
  }, 100);
747
- }, $ = () => {
748
- o(!1), g("");
747
+ }, N = () => {
748
+ o(!1), m("");
749
749
  };
750
- return window.addEventListener("blog:open-search", f), window.addEventListener("blog:close-search", $), () => {
751
- window.removeEventListener("blog:open-search", f), window.removeEventListener("blog:close-search", $);
750
+ return window.addEventListener("blog:open-search", f), window.addEventListener("blog:close-search", N), () => {
751
+ window.removeEventListener("blog:open-search", f), window.removeEventListener("blog:close-search", N);
752
752
  };
753
753
  }, []);
754
754
  const I = (f) => {
755
- f.key === "ArrowDown" ? (f.preventDefault(), b(($) => Math.min($ + 1, h.length - 1))) : f.key === "ArrowUp" ? (f.preventDefault(), b(($) => Math.max($ - 1, 0))) : f.key === "Enter" && h[_] && (f.preventDefault(), y(h[_].slug));
755
+ f.key === "ArrowDown" ? (f.preventDefault(), b((N) => Math.min(N + 1, h.length - 1))) : f.key === "ArrowUp" ? (f.preventDefault(), b((N) => Math.max(N - 1, 0))) : f.key === "Enter" && h[_] && (f.preventDefault(), k(h[_].slug));
756
756
  };
757
757
  S(() => {
758
- const f = ($) => {
759
- i.current && !i.current.contains($.target) && (o(!1), g(""));
758
+ const f = (N) => {
759
+ i.current && !i.current.contains(N.target) && (o(!1), m(""));
760
760
  };
761
761
  return r && document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
762
762
  }, [r]);
763
- const y = (f) => {
764
- const $ = a.basePath || "";
765
- s(`${$}/${t}/${f}`), o(!1), g("");
763
+ const k = (f) => {
764
+ const N = a.basePath || "";
765
+ s(`${N}/${t}/${f}`), o(!1), m("");
766
766
  };
767
767
  return /* @__PURE__ */ d(G, { children: [
768
768
  /* @__PURE__ */ d(
769
769
  "button",
770
770
  {
771
771
  type: "button",
772
- className: P.searchButton,
772
+ className: T.searchButton,
773
773
  onClick: () => {
774
774
  o(!0), setTimeout(() => {
775
775
  var f;
@@ -778,9 +778,9 @@ function an({ language: t }) {
778
778
  },
779
779
  "aria-label": n("ui.search"),
780
780
  children: [
781
- /* @__PURE__ */ e(ge, { className: P.searchIcon }),
782
- /* @__PURE__ */ e("span", { className: P.searchHint, children: n("ui.search") }),
783
- /* @__PURE__ */ e("kbd", { className: P.kbd, children: c })
781
+ /* @__PURE__ */ e(me, { className: T.searchIcon }),
782
+ /* @__PURE__ */ e("span", { className: T.searchHint, children: n("ui.search") }),
783
+ /* @__PURE__ */ e("kbd", { className: T.kbd, children: c })
784
784
  ]
785
785
  }
786
786
  ),
@@ -788,28 +788,28 @@ function an({ language: t }) {
788
788
  /* @__PURE__ */ e(
789
789
  "div",
790
790
  {
791
- className: P.searchOverlay,
791
+ className: T.searchOverlay,
792
792
  onClick: () => {
793
- o(!1), g("");
793
+ o(!1), m("");
794
794
  },
795
795
  children: /* @__PURE__ */ d(
796
796
  "div",
797
797
  {
798
- className: P.searchModal,
798
+ className: T.searchModal,
799
799
  ref: i,
800
800
  onClick: (f) => f.stopPropagation(),
801
801
  children: [
802
- /* @__PURE__ */ d("div", { className: P.searchHeader, children: [
803
- /* @__PURE__ */ e(ge, { className: P.searchIcon }),
802
+ /* @__PURE__ */ d("div", { className: T.searchHeader, children: [
803
+ /* @__PURE__ */ e(me, { className: T.searchIcon }),
804
804
  /* @__PURE__ */ e(
805
805
  "input",
806
806
  {
807
807
  ref: p,
808
808
  type: "text",
809
- className: P.searchInput,
809
+ className: T.searchInput,
810
810
  placeholder: n("ui.searchPlaceholder"),
811
811
  value: u,
812
- onChange: (f) => g(f.target.value),
812
+ onChange: (f) => m(f.target.value),
813
813
  onKeyDown: I
814
814
  }
815
815
  ),
@@ -817,42 +817,42 @@ function an({ language: t }) {
817
817
  "button",
818
818
  {
819
819
  type: "button",
820
- className: P.closeButton,
820
+ className: T.closeButton,
821
821
  onClick: () => {
822
- o(!1), g("");
822
+ o(!1), m("");
823
823
  },
824
824
  "aria-label": "Close search",
825
825
  children: /* @__PURE__ */ e(re, {})
826
826
  }
827
827
  )
828
828
  ] }),
829
- u && /* @__PURE__ */ e("div", { className: P.searchResults, children: h.length === 0 ? /* @__PURE__ */ e("div", { className: P.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: P.resultsList, children: h.map((f, $) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
829
+ u && /* @__PURE__ */ e("div", { className: T.searchResults, children: h.length === 0 ? /* @__PURE__ */ e("div", { className: T.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: T.resultsList, children: h.map((f, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
830
830
  "button",
831
831
  {
832
832
  type: "button",
833
- className: `${P.resultItem} ${$ === _ ? P.selected : ""}`,
834
- onClick: () => y(f.slug),
835
- onMouseEnter: () => b($),
833
+ className: `${T.resultItem} ${N === _ ? T.selected : ""}`,
834
+ onClick: () => k(f.slug),
835
+ onMouseEnter: () => b(N),
836
836
  children: [
837
- /* @__PURE__ */ e("div", { className: P.resultTitle, children: f.title }),
838
- /* @__PURE__ */ d("div", { className: P.resultSlug, children: [
837
+ /* @__PURE__ */ e("div", { className: T.resultTitle, children: f.title }),
838
+ /* @__PURE__ */ d("div", { className: T.resultSlug, children: [
839
839
  "/",
840
840
  f.slug
841
841
  ] })
842
842
  ]
843
843
  }
844
844
  ) }, f.slug)) }) }),
845
- !u && /* @__PURE__ */ d("div", { className: P.searchHints, children: [
846
- /* @__PURE__ */ d("div", { className: P.hint, children: [
845
+ !u && /* @__PURE__ */ d("div", { className: T.searchHints, children: [
846
+ /* @__PURE__ */ d("div", { className: T.hint, children: [
847
847
  /* @__PURE__ */ e("kbd", { children: "↑" }),
848
848
  /* @__PURE__ */ e("kbd", { children: "↓" }),
849
849
  /* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
850
850
  ] }),
851
- /* @__PURE__ */ d("div", { className: P.hint, children: [
851
+ /* @__PURE__ */ d("div", { className: T.hint, children: [
852
852
  /* @__PURE__ */ e("kbd", { children: "↵" }),
853
853
  /* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
854
854
  ] }),
855
- /* @__PURE__ */ d("div", { className: P.hint, children: [
855
+ /* @__PURE__ */ d("div", { className: T.hint, children: [
856
856
  /* @__PURE__ */ e("kbd", { children: "esc" }),
857
857
  /* @__PURE__ */ e("span", { children: n("ui.searchClose") })
858
858
  ] })
@@ -866,7 +866,7 @@ function an({ language: t }) {
866
866
  )
867
867
  ] });
868
868
  }
869
- const on = "_header_jrobc_1", sn = "_container_jrobc_24", cn = "_content_jrobc_36", rn = "_leftSection_jrobc_43", ln = "_mobileMenuButton_jrobc_49", dn = "_burgerIcon_jrobc_87", un = "_logo_jrobc_92", hn = "_nav_jrobc_98", mn = "_navLink_jrobc_109", gn = "_externalIcon_jrobc_135", _n = "_supportDropdown_jrobc_141", pn = "_themeDropdown_jrobc_145", fn = "_themeButton_jrobc_149", vn = "_themeIcon_jrobc_171", bn = "_supportButton_jrobc_177", wn = "_caretIcon_jrobc_198", $n = "_dropdownMenu_jrobc_208", Nn = "_dropdownItem_jrobc_221", xn = "_dropdownIcon_jrobc_244", x = {
869
+ const on = "_header_jrobc_1", sn = "_container_jrobc_24", cn = "_content_jrobc_36", rn = "_leftSection_jrobc_43", ln = "_mobileMenuButton_jrobc_49", dn = "_burgerIcon_jrobc_87", un = "_logo_jrobc_92", hn = "_nav_jrobc_98", gn = "_navLink_jrobc_109", mn = "_externalIcon_jrobc_135", _n = "_supportDropdown_jrobc_141", pn = "_themeDropdown_jrobc_145", fn = "_themeButton_jrobc_149", vn = "_themeIcon_jrobc_171", bn = "_supportButton_jrobc_177", wn = "_caretIcon_jrobc_198", Nn = "_dropdownMenu_jrobc_208", $n = "_dropdownItem_jrobc_221", xn = "_dropdownIcon_jrobc_244", x = {
870
870
  header: on,
871
871
  container: sn,
872
872
  content: cn,
@@ -875,20 +875,20 @@ const on = "_header_jrobc_1", sn = "_container_jrobc_24", cn = "_content_jrobc_3
875
875
  burgerIcon: dn,
876
876
  logo: un,
877
877
  nav: hn,
878
- navLink: mn,
879
- externalIcon: gn,
878
+ navLink: gn,
879
+ externalIcon: mn,
880
880
  supportDropdown: _n,
881
881
  themeDropdown: pn,
882
882
  themeButton: fn,
883
883
  themeIcon: vn,
884
884
  supportButton: bn,
885
885
  caretIcon: wn,
886
- dropdownMenu: $n,
887
- dropdownItem: Nn,
886
+ dropdownMenu: Nn,
887
+ dropdownItem: $n,
888
888
  dropdownIcon: xn
889
889
  };
890
890
  function In({ onMobileMenuToggle: t }) {
891
- const { t: n, i18n: s } = O(), { config: a } = R(), r = a.header ?? {}, o = r.navLinks ?? [], u = r.dropdownItems ?? [], [g, h] = T(!1), [v, _] = T(!1), { theme: b, setTheme: p } = Ie(), i = F(null), l = F(null);
891
+ const { t: n, i18n: s } = O(), { config: a } = R(), r = a.header ?? {}, o = r.navLinks ?? [], u = r.dropdownItems ?? [], [m, h] = P(!1), [v, _] = P(!1), { theme: b, setTheme: p } = Ie(), i = F(null), l = F(null);
892
892
  return S(() => {
893
893
  const c = (w) => {
894
894
  i.current && !i.current.contains(w.target) && h(!1), l.current && !l.current.contains(w.target) && _(!1);
@@ -979,8 +979,8 @@ function In({ onMobileMenuToggle: t }) {
979
979
  {
980
980
  type: "button",
981
981
  className: x.supportButton,
982
- onClick: () => h(!g),
983
- "aria-expanded": g,
982
+ onClick: () => h(!m),
983
+ "aria-expanded": m,
984
984
  "aria-haspopup": "true",
985
985
  children: [
986
986
  n("ui.support"),
@@ -988,14 +988,14 @@ function In({ onMobileMenuToggle: t }) {
988
988
  ]
989
989
  }
990
990
  ),
991
- g && /* @__PURE__ */ e("div", { className: x.dropdownMenu, children: u.map((c, w) => {
992
- const I = c.target ?? (c.url.startsWith("http") ? "_blank" : "_self"), y = c.rel ?? (I === "_blank" ? "noopener noreferrer" : void 0), f = c.icon;
991
+ m && /* @__PURE__ */ e("div", { className: x.dropdownMenu, children: u.map((c, w) => {
992
+ const I = c.target ?? (c.url.startsWith("http") ? "_blank" : "_self"), k = c.rel ?? (I === "_blank" ? "noopener noreferrer" : void 0), f = c.icon;
993
993
  return /* @__PURE__ */ d(
994
994
  "a",
995
995
  {
996
996
  href: c.url,
997
997
  target: I,
998
- rel: y,
998
+ rel: k,
999
999
  className: x.dropdownItem,
1000
1000
  children: [
1001
1001
  f && /* @__PURE__ */ e(f, { className: x.dropdownIcon }),
@@ -1007,13 +1007,13 @@ function In({ onMobileMenuToggle: t }) {
1007
1007
  }) })
1008
1008
  ] }),
1009
1009
  o.map((c, w) => {
1010
- const I = c.target ?? (typeof c.url == "string" && c.url.startsWith("http") ? "_blank" : "_self"), y = c.rel ?? (I === "_blank" ? "noopener noreferrer" : void 0), f = c.icon;
1010
+ const I = c.target ?? (typeof c.url == "string" && c.url.startsWith("http") ? "_blank" : "_self"), k = c.rel ?? (I === "_blank" ? "noopener noreferrer" : void 0), f = c.icon;
1011
1011
  return /* @__PURE__ */ d(
1012
1012
  "a",
1013
1013
  {
1014
1014
  href: c.url,
1015
1015
  target: I,
1016
- rel: y,
1016
+ rel: k,
1017
1017
  className: c.className ?? x.navLink,
1018
1018
  children: [
1019
1019
  c.label,
@@ -1031,19 +1031,19 @@ function le({
1031
1031
  styles: t,
1032
1032
  onLanguageChange: n
1033
1033
  }) {
1034
- const { i18n: s } = O(), a = Q(), r = K(), { config: o } = R(), [u, g] = T(!1), h = F(null), v = s.language, _ = (p) => {
1034
+ const { i18n: s } = O(), a = Q(), r = K(), { config: o } = R(), [u, m] = P(!1), h = F(null), v = s.language, _ = (p) => {
1035
1035
  const i = o.basePath || "";
1036
1036
  let l = a.pathname;
1037
1037
  i && l.startsWith(i) && (l = l.slice(i.length));
1038
1038
  const c = l.split("/").filter(Boolean), w = c[0];
1039
1039
  let I = "";
1040
1040
  o.supportedLanguages.includes(w) ? (c[0] = p, I = `${i}/${c.join("/")}`) : I = `${i}/${p}${l}`;
1041
- const y = I + a.search + a.hash;
1042
- s.changeLanguage(p), r(y), g(!1), n == null || n();
1041
+ const k = I + a.search + a.hash;
1042
+ s.changeLanguage(p), r(k), m(!1), n == null || n();
1043
1043
  };
1044
1044
  S(() => {
1045
1045
  const p = (i) => {
1046
- h.current && !h.current.contains(i.target) && g(!1);
1046
+ h.current && !h.current.contains(i.target) && m(!1);
1047
1047
  };
1048
1048
  return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
1049
1049
  }, []);
@@ -1054,7 +1054,7 @@ function le({
1054
1054
  {
1055
1055
  type: "button",
1056
1056
  className: t.languageButton,
1057
- onClick: () => g(!u),
1057
+ onClick: () => m(!u),
1058
1058
  "aria-expanded": u,
1059
1059
  "aria-haspopup": "listbox",
1060
1060
  children: [
@@ -1079,29 +1079,29 @@ function le({
1079
1079
  ] });
1080
1080
  }
1081
1081
  function ie({ styles: t, onLinkClick: n }) {
1082
- const { i18n: s } = O(), a = Q(), { config: r } = R(), [o, u] = T(() => {
1082
+ const { i18n: s } = O(), a = Q(), { config: r } = R(), [o, u] = P(() => {
1083
1083
  if (!r.navigationData) return {};
1084
1084
  const i = s.language;
1085
1085
  return te(r.navigationData, i).reduce(
1086
1086
  (c, w, I) => {
1087
1087
  if (V(w)) {
1088
- const y = r.navigationData[I], f = V(y) && y.defaultOpen === !0;
1088
+ const k = r.navigationData[I], f = V(k) && k.defaultOpen === !0;
1089
1089
  c[w.title] = f;
1090
1090
  }
1091
1091
  return c;
1092
1092
  },
1093
1093
  {}
1094
1094
  );
1095
- }), g = s.language, h = r.navigationData ? te(r.navigationData, g) : [];
1095
+ }), m = s.language, h = r.navigationData ? te(r.navigationData, m) : [];
1096
1096
  S(() => {
1097
1097
  if (!r.navigationData) return;
1098
1098
  const l = te(
1099
1099
  r.navigationData,
1100
- g
1100
+ m
1101
1101
  ).reduce(
1102
1102
  (c, w, I) => {
1103
1103
  if (V(w)) {
1104
- const y = r.navigationData[I], f = V(y) && y.defaultOpen === !0;
1104
+ const k = r.navigationData[I], f = V(k) && k.defaultOpen === !0;
1105
1105
  c[w.title] = f;
1106
1106
  }
1107
1107
  return c;
@@ -1109,7 +1109,7 @@ function ie({ styles: t, onLinkClick: n }) {
1109
1109
  {}
1110
1110
  );
1111
1111
  u(l);
1112
- }, [g, r.navigationData]);
1112
+ }, [m, r.navigationData]);
1113
1113
  const v = (i) => {
1114
1114
  u((l) => ({
1115
1115
  ...l,
@@ -1126,7 +1126,7 @@ function ie({ styles: t, onLinkClick: n }) {
1126
1126
  let c = a.pathname;
1127
1127
  l && c.startsWith(l) && (c = c.slice(l.length));
1128
1128
  const w = c.split("/").filter(Boolean);
1129
- return w[0] && r.supportedLanguages.includes(w[0]) ? `${l}/${w[0]}/${i}` : `${l}/${g}/${i}`;
1129
+ return w[0] && r.supportedLanguages.includes(w[0]) ? `${l}/${w[0]}/${i}` : `${l}/${m}/${i}`;
1130
1130
  }, p = () => {
1131
1131
  n == null || n();
1132
1132
  };
@@ -1174,12 +1174,12 @@ function Xa({
1174
1174
  /* @__PURE__ */ e(ie, { styles: t, onLinkClick: n })
1175
1175
  ] });
1176
1176
  }
1177
- const Cn = "_backdrop_1a7pu_1", kn = "_open_1a7pu_13", yn = "_mobileMenu_1a7pu_18", Tn = "_header_1a7pu_37", Pn = "_brand_1a7pu_46", Ln = "_cloudIcon_1a7pu_53", Sn = "_title_1a7pu_62", Dn = "_closeButton_1a7pu_69", Bn = "_closeIcon_1a7pu_101", Mn = "_languageSection_1a7pu_106", En = "_languageSelect_1a7pu_112", On = "_languageButton_1a7pu_117", Rn = "_icon_1a7pu_156", jn = "_chevron_1a7pu_162", An = "_languageDropdown_1a7pu_172", Wn = "_languageOption_1a7pu_185", Hn = "_selected_1a7pu_226", qn = "_scrollArea_1a7pu_231", Fn = "_navigation_1a7pu_237", Kn = "_section_1a7pu_241", Un = "_sectionButton_1a7pu_245", zn = "_expanded_1a7pu_285", Gn = "_sectionItems_1a7pu_289", Qn = "_navItem_1a7pu_297", Xn = "_active_1a7pu_310", Yn = "_navItemContent_1a7pu_316", Vn = "_navItemTitle_1a7pu_322", M = {
1177
+ const Cn = "_backdrop_1a7pu_1", kn = "_open_1a7pu_13", yn = "_mobileMenu_1a7pu_18", Pn = "_header_1a7pu_37", Tn = "_brand_1a7pu_46", Ln = "_cloudIcon_1a7pu_53", Sn = "_title_1a7pu_62", Dn = "_closeButton_1a7pu_69", Bn = "_closeIcon_1a7pu_101", Mn = "_languageSection_1a7pu_106", En = "_languageSelect_1a7pu_112", On = "_languageButton_1a7pu_117", Rn = "_icon_1a7pu_156", jn = "_chevron_1a7pu_162", An = "_languageDropdown_1a7pu_172", Wn = "_languageOption_1a7pu_185", Hn = "_selected_1a7pu_226", qn = "_scrollArea_1a7pu_231", Fn = "_navigation_1a7pu_237", Kn = "_section_1a7pu_241", Un = "_sectionButton_1a7pu_245", zn = "_expanded_1a7pu_285", Gn = "_sectionItems_1a7pu_289", Qn = "_navItem_1a7pu_297", Xn = "_active_1a7pu_310", Yn = "_navItemContent_1a7pu_316", Vn = "_navItemTitle_1a7pu_322", M = {
1178
1178
  backdrop: Cn,
1179
1179
  open: kn,
1180
1180
  mobileMenu: yn,
1181
- header: Tn,
1182
- brand: Pn,
1181
+ header: Pn,
1182
+ brand: Tn,
1183
1183
  cloudIcon: Ln,
1184
1184
  title: Sn,
1185
1185
  closeButton: Dn,
@@ -1242,7 +1242,7 @@ function Jn({ isOpen: t, onClose: n }) {
1242
1242
  ] })
1243
1243
  ] });
1244
1244
  }
1245
- const Zn = "_sidebar_1tdxt_1", ea = "_header_1tdxt_17", ta = "_brand_1tdxt_29", na = "_cloudIcon_1tdxt_35", aa = "_title_1tdxt_44", oa = "_languageSelect_1tdxt_55", sa = "_languageButton_1tdxt_61", ca = "_icon_1tdxt_99", ra = "_chevron_1tdxt_104", la = "_languageDropdown_1tdxt_114", ia = "_languageOption_1tdxt_128", da = "_selected_1tdxt_147", ua = "_scrollArea_1tdxt_152", ha = "_navigation_1tdxt_158", ma = "_section_1tdxt_164", ga = "_sectionButton_1tdxt_170", _a = "_expanded_1tdxt_213", pa = "_sectionItems_1tdxt_217", fa = "_navItem_1tdxt_225", va = "_active_1tdxt_238", ba = "_navItemContent_1tdxt_243", q = {
1245
+ const Zn = "_sidebar_1tdxt_1", ea = "_header_1tdxt_17", ta = "_brand_1tdxt_29", na = "_cloudIcon_1tdxt_35", aa = "_title_1tdxt_44", oa = "_languageSelect_1tdxt_55", sa = "_languageButton_1tdxt_61", ca = "_icon_1tdxt_99", ra = "_chevron_1tdxt_104", la = "_languageDropdown_1tdxt_114", ia = "_languageOption_1tdxt_128", da = "_selected_1tdxt_147", ua = "_scrollArea_1tdxt_152", ha = "_navigation_1tdxt_158", ga = "_section_1tdxt_164", ma = "_sectionButton_1tdxt_170", _a = "_expanded_1tdxt_213", pa = "_sectionItems_1tdxt_217", fa = "_navItem_1tdxt_225", va = "_active_1tdxt_238", ba = "_navItemContent_1tdxt_243", q = {
1246
1246
  sidebar: Zn,
1247
1247
  header: ea,
1248
1248
  brand: ta,
@@ -1257,8 +1257,8 @@ const Zn = "_sidebar_1tdxt_1", ea = "_header_1tdxt_17", ta = "_brand_1tdxt_29",
1257
1257
  selected: da,
1258
1258
  scrollArea: ua,
1259
1259
  navigation: ha,
1260
- section: ma,
1261
- sectionButton: ga,
1260
+ section: ga,
1261
+ sectionButton: ma,
1262
1262
  expanded: _a,
1263
1263
  sectionItems: pa,
1264
1264
  navItem: fa,
@@ -1278,21 +1278,21 @@ function wa() {
1278
1278
  /* @__PURE__ */ e("div", { className: q.scrollArea, children: /* @__PURE__ */ e(ie, { styles: q }) })
1279
1279
  ] });
1280
1280
  }
1281
- const $a = "_app_wf6ni_1", Na = "_layout_wf6ni_9", xa = "_main_wf6ni_15", Ia = "_fullWidth_wf6ni_21", Ca = "_contentWrapper_wf6ni_30", J = {
1282
- app: $a,
1283
- layout: Na,
1281
+ const Na = "_app_wf6ni_1", $a = "_layout_wf6ni_9", xa = "_main_wf6ni_15", Ia = "_fullWidth_wf6ni_21", Ca = "_contentWrapper_wf6ni_30", J = {
1282
+ app: Na,
1283
+ layout: $a,
1284
1284
  main: xa,
1285
1285
  fullWidth: Ia,
1286
1286
  contentWrapper: Ca
1287
1287
  };
1288
1288
  function ka({ children: t }) {
1289
- const { language: n } = ce(), { i18n: s } = O(), { config: a } = R(), [r, o] = T(!1);
1289
+ const { language: n } = ce(), { i18n: s } = O(), { config: a } = R(), [r, o] = P(!1);
1290
1290
  S(() => {
1291
1291
  n && a.supportedLanguages.includes(n) && s.changeLanguage(n);
1292
1292
  }, [n, s, a.supportedLanguages]);
1293
1293
  const u = () => {
1294
1294
  o(!r);
1295
- }, g = () => {
1295
+ }, m = () => {
1296
1296
  o(!1);
1297
1297
  };
1298
1298
  if (!n || !a.supportedLanguages.includes(n))
@@ -1300,7 +1300,7 @@ function ka({ children: t }) {
1300
1300
  const h = !!a.header, v = a.showSideMenu !== !1, _ = a.contentMaxWidth ? { width: "100%", maxWidth: a.contentMaxWidth } : void 0;
1301
1301
  return /* @__PURE__ */ d("div", { className: J.app, children: [
1302
1302
  h && /* @__PURE__ */ e(In, { onMobileMenuToggle: u }),
1303
- /* @__PURE__ */ e(Jn, { isOpen: r, onClose: g }),
1303
+ /* @__PURE__ */ e(Jn, { isOpen: r, onClose: m }),
1304
1304
  /* @__PURE__ */ d("div", { className: J.layout, children: [
1305
1305
  v && /* @__PURE__ */ e(wa, {}),
1306
1306
  /* @__PURE__ */ e(
@@ -1313,10 +1313,10 @@ function ka({ children: t }) {
1313
1313
  ] })
1314
1314
  ] });
1315
1315
  }
1316
- const ya = "_homePage_1lc5u_1", Ta = "_header_1lc5u_20", Pa = "_title_1lc5u_24", La = "_articlesList_1lc5u_31", Sa = "_articleCard_1lc5u_37", Da = "_articleTitle_1lc5u_56", Ba = "_articleDescription_1lc5u_63", Ma = "_loading_1lc5u_70", Ea = "_empty_1lc5u_71", H = {
1316
+ const ya = "_homePage_1lc5u_1", Pa = "_header_1lc5u_20", Ta = "_title_1lc5u_24", La = "_articlesList_1lc5u_31", Sa = "_articleCard_1lc5u_37", Da = "_articleTitle_1lc5u_56", Ba = "_articleDescription_1lc5u_63", Ma = "_loading_1lc5u_70", Ea = "_empty_1lc5u_71", H = {
1317
1317
  homePage: ya,
1318
- header: Ta,
1319
- title: Pa,
1318
+ header: Pa,
1319
+ title: Ta,
1320
1320
  articlesList: La,
1321
1321
  articleCard: Sa,
1322
1322
  articleTitle: Da,
@@ -1325,7 +1325,7 @@ const ya = "_homePage_1lc5u_1", Ta = "_header_1lc5u_20", Pa = "_title_1lc5u_24",
1325
1325
  empty: Ea
1326
1326
  };
1327
1327
  function Oa() {
1328
- const { i18n: t, t: n } = O(), { config: s, loadContent: a } = R(), r = K(), [o, u] = T([]), [g, h] = T(!0);
1328
+ const { i18n: t, t: n } = O(), { config: s, loadContent: a } = R(), r = K(), [o, u] = P([]), [m, h] = P(!0);
1329
1329
  S(() => {
1330
1330
  (async () => {
1331
1331
  try {
@@ -1370,7 +1370,7 @@ function Oa() {
1370
1370
  const b = s.basePath || "";
1371
1371
  r(`${b}/${t.language}/${_}`);
1372
1372
  };
1373
- return g ? /* @__PURE__ */ e("div", { className: H.loading, children: n("ui.loadingArticles") }) : o.length === 0 ? /* @__PURE__ */ e("div", { className: H.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ d("div", { className: H.homePage, children: [
1373
+ return m ? /* @__PURE__ */ e("div", { className: H.loading, children: n("ui.loadingArticles") }) : o.length === 0 ? /* @__PURE__ */ e("div", { className: H.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ d("div", { className: H.homePage, children: [
1374
1374
  /* @__PURE__ */ d("div", { className: H.header, children: [
1375
1375
  /* @__PURE__ */ e("h1", { className: H.title, children: n("ui.latestPosts") }),
1376
1376
  o.length > 0 && /* @__PURE__ */ e(se, { date: o[0].date, author: o[0].author })
@@ -1394,9 +1394,9 @@ function Oa() {
1394
1394
  function Ya() {
1395
1395
  const { language: t } = ce(), { config: n } = R();
1396
1396
  return /* @__PURE__ */ e(ka, { children: /* @__PURE__ */ d(ye, { children: [
1397
- /* @__PURE__ */ e(me, { path: "/:slug", element: /* @__PURE__ */ e(jt, { language: t }) }),
1397
+ /* @__PURE__ */ e(ge, { path: "/:slug", element: /* @__PURE__ */ e(jt, { language: t }) }),
1398
1398
  /* @__PURE__ */ e(
1399
- me,
1399
+ ge,
1400
1400
  {
1401
1401
  index: !0,
1402
1402
  element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Oa, {}) : /* @__PURE__ */ e(be, { to: `./${n.defaultRoute}`, replace: !0 })
@@ -1420,9 +1420,9 @@ function Ja() {
1420
1420
  const o = a.basePath || "";
1421
1421
  let u = n.pathname;
1422
1422
  o && u.startsWith(o) && (u = u.slice(o.length));
1423
- const g = u.split("/").filter(Boolean), h = g[0];
1423
+ const m = u.split("/").filter(Boolean), h = m[0];
1424
1424
  let v = "";
1425
- a.supportedLanguages.includes(h) ? (g[0] = r, v = `${o}/${g.join("/")}`) : v = `${o}/${r}${u}`;
1425
+ a.supportedLanguages.includes(h) ? (m[0] = r, v = `${o}/${m.join("/")}`) : v = `${o}/${r}${u}`;
1426
1426
  const _ = v + n.search + n.hash;
1427
1427
  t.changeLanguage(r), s(_);
1428
1428
  };
@@ -1447,7 +1447,7 @@ export {
1447
1447
  bt as TagResultsModal,
1448
1448
  kt as Tags,
1449
1449
  Ga as createBlogUtils,
1450
- $e as createContentLoaders,
1450
+ Ne as createContentLoaders,
1451
1451
  Z as generateHeadingId,
1452
1452
  te as getNavigationData,
1453
1453
  R as useBlogConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-wave/blog",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {