juneau 0.4.0 → 0.4.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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useState as De, useRef as xr, useCallback as he, useContext as br, createContext as wr, useEffect as qi } from "react";
2
- import { jsx as S, jsxs as X, Fragment as Cr } from "react/jsx-runtime";
1
+ import { useState as De, useRef as bt, useCallback as he, useContext as br, createContext as wr, useEffect as Cr } from "react";
2
+ import { jsx as S, jsxs as X, Fragment as Sr } from "react/jsx-runtime";
3
3
  function Vi(e) {
4
4
  return e.map((n) => n.role !== "assistant" || n.parts.some((t) => t.type === "text") ? n : { ...n, parts: [{ type: "text", text: "" }] });
5
5
  }
@@ -7,7 +7,7 @@ const J = (e) => new Promise((n) => setTimeout(n, e));
7
7
  function Ui(e) {
8
8
  return e.parts.filter((n) => n.type === "text").map((n) => n.text).join("");
9
9
  }
10
- async function An(e, n, t) {
10
+ async function _n(e, n, t) {
11
11
  for await (const r of e)
12
12
  if (t?.aborted || (n(r), r.type === "done" || r.type === "error")) break;
13
13
  }
@@ -121,7 +121,7 @@ async function* Z(e, n) {
121
121
  for (let r = 0; r < e.length; r += 3)
122
122
  yield { type: "text", text: e.slice(r, r + 3) }, await J(n);
123
123
  }
124
- function Sr(e) {
124
+ function vr(e) {
125
125
  if (!e || e === "[DONE]") return [];
126
126
  let n;
127
127
  try {
@@ -221,7 +221,7 @@ async function* Ki(e, n) {
221
221
  }
222
222
  const Zi = (e) => {
223
223
  if (!e || e === "[DONE]") return [];
224
- const n = Sr(e);
224
+ const n = vr(e);
225
225
  if (n.length > 0) return n;
226
226
  try {
227
227
  const t = JSON.parse(e);
@@ -297,18 +297,18 @@ async function* el(e, n) {
297
297
  yield { type: "done" };
298
298
  }
299
299
  const tl = (e) => {
300
- const n = Sr(e);
300
+ const n = vr(e);
301
301
  return n.length > 0 ? n : e ? [{ type: "text", text: e }] : [];
302
302
  };
303
303
  let nl = 0;
304
- const ft = () => `msg-${++nl}-${Date.now()}`, _n = Vi;
304
+ const ft = () => `msg-${++nl}-${Date.now()}`, Tn = Vi;
305
305
  function rl({
306
306
  adapter: e,
307
307
  context: n,
308
308
  onProposalConfirm: t,
309
309
  onProposalCancel: r
310
310
  }) {
311
- const [i, o] = De([]), [l, a] = De(""), [s, u] = De(!1), [f, c] = De(!1), [h, p] = De(null), g = xr(null), x = he((L) => {
311
+ const [i, o] = De([]), [l, a] = De(""), [s, u] = De(!1), [f, c] = De(!1), [h, p] = De(null), g = bt(null), x = he((L) => {
312
312
  o((y) => {
313
313
  const _ = y[y.length - 1];
314
314
  if (!_ || _.role !== "assistant") return y;
@@ -355,8 +355,8 @@ function rl({
355
355
  const T = new AbortController();
356
356
  g.current = T;
357
357
  try {
358
- const j = e.sendMessage({ messages: _n([...y, _]), context: n });
359
- await An(
358
+ const j = e.sendMessage({ messages: Tn([...y, _]), context: n });
359
+ await _n(
360
360
  j,
361
361
  (U) => {
362
362
  switch (c(!1), U.type) {
@@ -405,8 +405,8 @@ function rl({
405
405
  createdAt: /* @__PURE__ */ new Date()
406
406
  };
407
407
  try {
408
- const R = e.sendMessage({ messages: _n([P]), context: n });
409
- await An(
408
+ const R = e.sendMessage({ messages: Tn([P]), context: n });
409
+ await _n(
410
410
  R,
411
411
  (z) => {
412
412
  switch (c(!1), z.type) {
@@ -456,7 +456,7 @@ function rl({
456
456
  cancelProposal: V
457
457
  };
458
458
  }
459
- const vr = {
459
+ const Er = {
460
460
  sidebarTitle: "AI Assistant",
461
461
  clearConversation: "Clear conversation",
462
462
  resetConversation: "Reset conversation",
@@ -478,20 +478,20 @@ const vr = {
478
478
  actionNew: "New",
479
479
  actionHistory: "History",
480
480
  actionRules: "Rules"
481
- }, Er = wr(vr);
481
+ }, Ir = wr(Er);
482
482
  function Re() {
483
- return br(Er);
483
+ return br(Ir);
484
484
  }
485
485
  const il = "_root_1etc2_1", ll = {
486
486
  root: il
487
487
  };
488
488
  function uh({ children: e, theme: n, labels: t, defaultTitle: r, className: i, style: o }) {
489
489
  const l = {
490
- ...vr,
490
+ ...Er,
491
491
  ...r ? { sidebarTitle: r } : {},
492
492
  ...t
493
493
  }, a = n ? ol(n) : void 0;
494
- return /* @__PURE__ */ S(Er.Provider, { value: l, children: /* @__PURE__ */ S(
494
+ return /* @__PURE__ */ S(Ir.Provider, { value: l, children: /* @__PURE__ */ S(
495
495
  "div",
496
496
  {
497
497
  className: [ll.root, i].filter(Boolean).join(" "),
@@ -530,9 +530,9 @@ function ol(e) {
530
530
  Object.entries(n).filter(([, t]) => t !== void 0)
531
531
  );
532
532
  }
533
- const Ir = wr(null);
533
+ const Ar = wr(null);
534
534
  function al() {
535
- const e = br(Ir);
535
+ const e = br(Ar);
536
536
  if (!e)
537
537
  throw new Error(
538
538
  "useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>."
@@ -554,7 +554,7 @@ function ch({
554
554
  onProposalConfirm: t,
555
555
  onProposalCancel: r
556
556
  });
557
- return /* @__PURE__ */ S(Ir.Provider, { value: { ...s, setContext: a }, children: i });
557
+ return /* @__PURE__ */ S(Ar.Provider, { value: { ...s, setContext: a }, children: i });
558
558
  }
559
559
  const fh = {
560
560
  sidebarTitle: "AI Asistent",
@@ -579,7 +579,7 @@ const fh = {
579
579
  actionHistory: "Historie",
580
580
  actionRules: "Pravidla"
581
581
  };
582
- function Ar({ className: e, style: n, "aria-hidden": t = !0 }) {
582
+ function _r({ className: e, style: n, "aria-hidden": t = !0 }) {
583
583
  return /* @__PURE__ */ S(
584
584
  "svg",
585
585
  {
@@ -746,14 +746,14 @@ function yl(e, n) {
746
746
  ).trim();
747
747
  }
748
748
  const kl = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, xl = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, bl = {};
749
- function Tn(e, n) {
749
+ function Pn(e, n) {
750
750
  return (bl.jsx ? xl : kl).test(e);
751
751
  }
752
752
  const wl = /[ \t\n\f\r]/g;
753
753
  function Cl(e) {
754
- return typeof e == "object" ? e.type === "text" ? Pn(e.value) : !1 : Pn(e);
754
+ return typeof e == "object" ? e.type === "text" ? zn(e.value) : !1 : zn(e);
755
755
  }
756
- function Pn(e) {
756
+ function zn(e) {
757
757
  return e.replace(wl, "") === "";
758
758
  }
759
759
  class at {
@@ -774,13 +774,13 @@ class at {
774
774
  at.prototype.normal = {};
775
775
  at.prototype.property = {};
776
776
  at.prototype.space = void 0;
777
- function _r(e, n) {
777
+ function Tr(e, n) {
778
778
  const t = {}, r = {};
779
779
  for (const i of e)
780
780
  Object.assign(t, i.property), Object.assign(r, i.normal);
781
781
  return new at(t, r, n);
782
782
  }
783
- function Wt(e) {
783
+ function Qt(e) {
784
784
  return e.toLowerCase();
785
785
  }
786
786
  class ie {
@@ -809,24 +809,24 @@ ie.prototype.property = "";
809
809
  ie.prototype.spaceSeparated = !1;
810
810
  ie.prototype.space = void 0;
811
811
  let Sl = 0;
812
- const N = Ne(), G = Ne(), Qt = Ne(), E = Ne(), Q = Ne(), Me = Ne(), oe = Ne();
812
+ const N = Ne(), G = Ne(), Yt = Ne(), E = Ne(), Q = Ne(), Me = Ne(), oe = Ne();
813
813
  function Ne() {
814
814
  return 2 ** ++Sl;
815
815
  }
816
- const Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
816
+ const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
817
817
  __proto__: null,
818
818
  boolean: N,
819
819
  booleanish: G,
820
820
  commaOrSpaceSeparated: oe,
821
821
  commaSeparated: Me,
822
822
  number: E,
823
- overloadedBoolean: Qt,
823
+ overloadedBoolean: Yt,
824
824
  spaceSeparated: Q
825
- }, Symbol.toStringTag, { value: "Module" })), Tt = (
825
+ }, Symbol.toStringTag, { value: "Module" })), Pt = (
826
826
  /** @type {ReadonlyArray<keyof typeof types>} */
827
- Object.keys(Yt)
827
+ Object.keys(Xt)
828
828
  );
829
- class rn extends ie {
829
+ class ln extends ie {
830
830
  /**
831
831
  * @constructor
832
832
  * @param {string} property
@@ -842,31 +842,31 @@ class rn extends ie {
842
842
  */
843
843
  constructor(n, t, r, i) {
844
844
  let o = -1;
845
- if (super(n, t), zn(this, "space", i), typeof r == "number")
846
- for (; ++o < Tt.length; ) {
847
- const l = Tt[o];
848
- zn(this, Tt[o], (r & Yt[l]) === Yt[l]);
845
+ if (super(n, t), Ln(this, "space", i), typeof r == "number")
846
+ for (; ++o < Pt.length; ) {
847
+ const l = Pt[o];
848
+ Ln(this, Pt[o], (r & Xt[l]) === Xt[l]);
849
849
  }
850
850
  }
851
851
  }
852
- rn.prototype.defined = !0;
853
- function zn(e, n, t) {
852
+ ln.prototype.defined = !0;
853
+ function Ln(e, n, t) {
854
854
  t && (e[n] = t);
855
855
  }
856
856
  function Ve(e) {
857
857
  const n = {}, t = {};
858
858
  for (const [r, i] of Object.entries(e.properties)) {
859
- const o = new rn(
859
+ const o = new ln(
860
860
  r,
861
861
  e.transform(e.attributes || {}, r),
862
862
  i,
863
863
  e.space
864
864
  );
865
- e.mustUseProperty && e.mustUseProperty.includes(r) && (o.mustUseProperty = !0), n[r] = o, t[Wt(r)] = r, t[Wt(o.attribute)] = r;
865
+ e.mustUseProperty && e.mustUseProperty.includes(r) && (o.mustUseProperty = !0), n[r] = o, t[Qt(r)] = r, t[Qt(o.attribute)] = r;
866
866
  }
867
867
  return new at(n, t, e.space);
868
868
  }
869
- const Tr = Ve({
869
+ const Pr = Ve({
870
870
  properties: {
871
871
  ariaActiveDescendant: null,
872
872
  ariaAtomic: G,
@@ -922,11 +922,11 @@ const Tr = Ve({
922
922
  return n === "role" ? n : "aria-" + n.slice(4).toLowerCase();
923
923
  }
924
924
  });
925
- function Pr(e, n) {
925
+ function zr(e, n) {
926
926
  return n in e ? e[n] : n;
927
927
  }
928
- function zr(e, n) {
929
- return Pr(e, n.toLowerCase());
928
+ function Lr(e, n) {
929
+ return zr(e, n.toLowerCase());
930
930
  }
931
931
  const vl = Ve({
932
932
  attributes: {
@@ -981,7 +981,7 @@ const vl = Ve({
981
981
  dir: null,
982
982
  dirName: null,
983
983
  disabled: N,
984
- download: Qt,
984
+ download: Yt,
985
985
  draggable: G,
986
986
  encType: null,
987
987
  enterKeyHint: null,
@@ -994,7 +994,7 @@ const vl = Ve({
994
994
  formTarget: null,
995
995
  headers: Q,
996
996
  height: E,
997
- hidden: Qt,
997
+ hidden: Yt,
998
998
  high: E,
999
999
  href: null,
1000
1000
  hrefLang: null,
@@ -1298,7 +1298,7 @@ const vl = Ve({
1298
1298
  unselectable: null
1299
1299
  },
1300
1300
  space: "html",
1301
- transform: zr
1301
+ transform: Lr
1302
1302
  }), El = Ve({
1303
1303
  attributes: {
1304
1304
  accentHeight: "accent-height",
@@ -1859,8 +1859,8 @@ const vl = Ve({
1859
1859
  zoomAndPan: null
1860
1860
  },
1861
1861
  space: "svg",
1862
- transform: Pr
1863
- }), Lr = Ve({
1862
+ transform: zr
1863
+ }), Dr = Ve({
1864
1864
  properties: {
1865
1865
  xLinkActuate: null,
1866
1866
  xLinkArcRole: null,
@@ -1874,12 +1874,12 @@ const vl = Ve({
1874
1874
  transform(e, n) {
1875
1875
  return "xlink:" + n.slice(5).toLowerCase();
1876
1876
  }
1877
- }), Dr = Ve({
1877
+ }), Mr = Ve({
1878
1878
  attributes: { xmlnsxlink: "xmlns:xlink" },
1879
1879
  properties: { xmlnsXLink: null, xmlns: null },
1880
1880
  space: "xmlns",
1881
- transform: zr
1882
- }), Mr = Ve({
1881
+ transform: Lr
1882
+ }), Fr = Ve({
1883
1883
  properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
1884
1884
  space: "xml",
1885
1885
  transform(e, n) {
@@ -1903,24 +1903,24 @@ const vl = Ve({
1903
1903
  xLinkTitle: "xlinkTitle",
1904
1904
  xLinkType: "xlinkType",
1905
1905
  xmlnsXLink: "xmlnsXlink"
1906
- }, Al = /[A-Z]/g, Ln = /-[a-z]/g, _l = /^data[-\w.:]+$/i;
1906
+ }, Al = /[A-Z]/g, Dn = /-[a-z]/g, _l = /^data[-\w.:]+$/i;
1907
1907
  function Tl(e, n) {
1908
- const t = Wt(n);
1908
+ const t = Qt(n);
1909
1909
  let r = n, i = ie;
1910
1910
  if (t in e.normal)
1911
1911
  return e.property[e.normal[t]];
1912
1912
  if (t.length > 4 && t.slice(0, 4) === "data" && _l.test(n)) {
1913
1913
  if (n.charAt(4) === "-") {
1914
- const o = n.slice(5).replace(Ln, zl);
1914
+ const o = n.slice(5).replace(Dn, zl);
1915
1915
  r = "data" + o.charAt(0).toUpperCase() + o.slice(1);
1916
1916
  } else {
1917
1917
  const o = n.slice(4);
1918
- if (!Ln.test(o)) {
1918
+ if (!Dn.test(o)) {
1919
1919
  let l = o.replace(Al, Pl);
1920
1920
  l.charAt(0) !== "-" && (l = "-" + l), n = "data" + l;
1921
1921
  }
1922
1922
  }
1923
- i = rn;
1923
+ i = ln;
1924
1924
  }
1925
1925
  return new i(r, n);
1926
1926
  }
@@ -1930,17 +1930,17 @@ function Pl(e) {
1930
1930
  function zl(e) {
1931
1931
  return e.charAt(1).toUpperCase();
1932
1932
  }
1933
- const Ll = _r([Tr, vl, Lr, Dr, Mr], "html"), ln = _r([Tr, El, Lr, Dr, Mr], "svg");
1933
+ const Ll = Tr([Pr, vl, Dr, Mr, Fr], "html"), on = Tr([Pr, El, Dr, Mr, Fr], "svg");
1934
1934
  function Dl(e) {
1935
1935
  return e.join(" ").trim();
1936
1936
  }
1937
- function Fr(e) {
1937
+ function Rr(e) {
1938
1938
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1939
1939
  }
1940
- var He = {}, Pt, Dn;
1940
+ var He = {}, zt, Mn;
1941
1941
  function Ml() {
1942
- if (Dn) return Pt;
1943
- Dn = 1;
1942
+ if (Mn) return zt;
1943
+ Mn = 1;
1944
1944
  var e = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, n = /\n/g, t = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, i = /^:\s*/, o = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, l = /^[;\s]*/, a = /^\s+|\s+$/g, s = `
1945
1945
  `, u = "/", f = "*", c = "", h = "comment", p = "declaration";
1946
1946
  function g(C, k) {
@@ -2025,12 +2025,12 @@ function Ml() {
2025
2025
  function x(C) {
2026
2026
  return C ? C.replace(a, c) : c;
2027
2027
  }
2028
- return Pt = g, Pt;
2028
+ return zt = g, zt;
2029
2029
  }
2030
- var Mn;
2030
+ var Fn;
2031
2031
  function Fl() {
2032
- if (Mn) return He;
2033
- Mn = 1;
2032
+ if (Fn) return He;
2033
+ Fn = 1;
2034
2034
  var e = He && He.__importDefault || function(r) {
2035
2035
  return r && r.__esModule ? r : { default: r };
2036
2036
  };
@@ -2050,10 +2050,10 @@ function Fl() {
2050
2050
  }
2051
2051
  return He;
2052
2052
  }
2053
- var Xe = {}, Fn;
2053
+ var Xe = {}, Rn;
2054
2054
  function Rl() {
2055
- if (Fn) return Xe;
2056
- Fn = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.camelCase = void 0;
2055
+ if (Rn) return Xe;
2056
+ Rn = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.camelCase = void 0;
2057
2057
  var e = /^--[a-zA-Z0-9_-]+$/, n = /-([a-z])/g, t = /^[^-]+$/, r = /^-(webkit|moz|ms|o|khtml)-/, i = /^-(ms)-/, o = function(u) {
2058
2058
  return !u || t.test(u) || e.test(u);
2059
2059
  }, l = function(u, f) {
@@ -2065,10 +2065,10 @@ function Rl() {
2065
2065
  };
2066
2066
  return Xe.camelCase = s, Xe;
2067
2067
  }
2068
- var Ge, Rn;
2068
+ var Ge, Nn;
2069
2069
  function Nl() {
2070
- if (Rn) return Ge;
2071
- Rn = 1;
2070
+ if (Nn) return Ge;
2071
+ Nn = 1;
2072
2072
  var e = Ge && Ge.__importDefault || function(i) {
2073
2073
  return i && i.__esModule ? i : { default: i };
2074
2074
  }, n = e(Fl()), t = Rl();
@@ -2081,8 +2081,8 @@ function Nl() {
2081
2081
  return r.default = r, Ge = r, Ge;
2082
2082
  }
2083
2083
  var Ol = Nl();
2084
- const Bl = /* @__PURE__ */ Fr(Ol), Rr = Nr("end"), on = Nr("start");
2085
- function Nr(e) {
2084
+ const Bl = /* @__PURE__ */ Rr(Ol), Nr = Or("end"), an = Or("start");
2085
+ function Or(e) {
2086
2086
  return n;
2087
2087
  function n(t) {
2088
2088
  const r = t && t.position && t.position[e] || {};
@@ -2095,20 +2095,20 @@ function Nr(e) {
2095
2095
  }
2096
2096
  }
2097
2097
  function jl(e) {
2098
- const n = on(e), t = Rr(e);
2098
+ const n = an(e), t = Nr(e);
2099
2099
  if (n && t)
2100
2100
  return { start: n, end: t };
2101
2101
  }
2102
2102
  function nt(e) {
2103
- return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? Nn(e.position) : "start" in e || "end" in e ? Nn(e) : "line" in e || "column" in e ? Xt(e) : "";
2104
- }
2105
- function Xt(e) {
2106
- return On(e && e.line) + ":" + On(e && e.column);
2103
+ return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? On(e.position) : "start" in e || "end" in e ? On(e) : "line" in e || "column" in e ? Gt(e) : "";
2107
2104
  }
2108
- function Nn(e) {
2109
- return Xt(e && e.start) + "-" + Xt(e && e.end);
2105
+ function Gt(e) {
2106
+ return Bn(e && e.line) + ":" + Bn(e && e.column);
2110
2107
  }
2111
2108
  function On(e) {
2109
+ return Gt(e && e.start) + "-" + Gt(e && e.end);
2110
+ }
2111
+ function Bn(e) {
2112
2112
  return e && typeof e == "number" ? e : 1;
2113
2113
  }
2114
2114
  class te extends Error {
@@ -2198,7 +2198,7 @@ te.prototype.fatal = void 0;
2198
2198
  te.prototype.place = void 0;
2199
2199
  te.prototype.ruleId = void 0;
2200
2200
  te.prototype.source = void 0;
2201
- const an = {}.hasOwnProperty, Hl = /* @__PURE__ */ new Map(), $l = /[A-Z]/g, ql = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Vl = /* @__PURE__ */ new Set(["td", "th"]), Or = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
2201
+ const sn = {}.hasOwnProperty, Hl = /* @__PURE__ */ new Map(), $l = /[A-Z]/g, ql = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Vl = /* @__PURE__ */ new Set(["td", "th"]), Br = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
2202
2202
  function Ul(e, n) {
2203
2203
  if (!n || n.Fragment === void 0)
2204
2204
  throw new TypeError("Expected `Fragment` in options");
@@ -2228,10 +2228,10 @@ function Ul(e, n) {
2228
2228
  ignoreInvalidStyle: n.ignoreInvalidStyle || !1,
2229
2229
  passKeys: n.passKeys !== !1,
2230
2230
  passNode: n.passNode || !1,
2231
- schema: n.space === "svg" ? ln : Ll,
2231
+ schema: n.space === "svg" ? on : Ll,
2232
2232
  stylePropertyNameCase: n.stylePropertyNameCase || "dom",
2233
2233
  tableCellAlignToStyle: n.tableCellAlignToStyle !== !1
2234
- }, o = Br(i, e, void 0);
2234
+ }, o = jr(i, e, void 0);
2235
2235
  return o && typeof o != "string" ? o : i.create(
2236
2236
  e,
2237
2237
  i.Fragment,
@@ -2239,7 +2239,7 @@ function Ul(e, n) {
2239
2239
  void 0
2240
2240
  );
2241
2241
  }
2242
- function Br(e, n, t) {
2242
+ function jr(e, n, t) {
2243
2243
  if (n.type === "element")
2244
2244
  return Wl(e, n, t);
2245
2245
  if (n.type === "mdxFlowExpression" || n.type === "mdxTextExpression")
@@ -2256,12 +2256,12 @@ function Br(e, n, t) {
2256
2256
  function Wl(e, n, t) {
2257
2257
  const r = e.schema;
2258
2258
  let i = r;
2259
- n.tagName.toLowerCase() === "svg" && r.space === "html" && (i = ln, e.schema = i), e.ancestors.push(n);
2260
- const o = Hr(e, n.tagName, !1), l = eo(e, n);
2261
- let a = un(e, n);
2259
+ n.tagName.toLowerCase() === "svg" && r.space === "html" && (i = on, e.schema = i), e.ancestors.push(n);
2260
+ const o = $r(e, n.tagName, !1), l = eo(e, n);
2261
+ let a = cn(e, n);
2262
2262
  return ql.has(n.tagName) && (a = a.filter(function(s) {
2263
2263
  return typeof s == "string" ? !Cl(s) : !0;
2264
- })), jr(e, l, o, n), sn(l, a), e.ancestors.pop(), e.schema = r, e.create(n, o, l, t);
2264
+ })), Hr(e, l, o, n), un(l, a), e.ancestors.pop(), e.schema = r, e.create(n, o, l, t);
2265
2265
  }
2266
2266
  function Ql(e, n) {
2267
2267
  if (n.data && n.data.estree && e.evaluater) {
@@ -2282,21 +2282,21 @@ function Yl(e, n) {
2282
2282
  function Xl(e, n, t) {
2283
2283
  const r = e.schema;
2284
2284
  let i = r;
2285
- n.name === "svg" && r.space === "html" && (i = ln, e.schema = i), e.ancestors.push(n);
2286
- const o = n.name === null ? e.Fragment : Hr(e, n.name, !0), l = to(e, n), a = un(e, n);
2287
- return jr(e, l, o, n), sn(l, a), e.ancestors.pop(), e.schema = r, e.create(n, o, l, t);
2285
+ n.name === "svg" && r.space === "html" && (i = on, e.schema = i), e.ancestors.push(n);
2286
+ const o = n.name === null ? e.Fragment : $r(e, n.name, !0), l = to(e, n), a = cn(e, n);
2287
+ return Hr(e, l, o, n), un(l, a), e.ancestors.pop(), e.schema = r, e.create(n, o, l, t);
2288
2288
  }
2289
2289
  function Gl(e, n, t) {
2290
2290
  const r = {};
2291
- return sn(r, un(e, n)), e.create(n, e.Fragment, r, t);
2291
+ return un(r, cn(e, n)), e.create(n, e.Fragment, r, t);
2292
2292
  }
2293
2293
  function Jl(e, n) {
2294
2294
  return n.value;
2295
2295
  }
2296
- function jr(e, n, t, r) {
2296
+ function Hr(e, n, t, r) {
2297
2297
  typeof t != "string" && t !== e.Fragment && e.passNode && (n.node = r);
2298
2298
  }
2299
- function sn(e, n) {
2299
+ function un(e, n) {
2300
2300
  if (n.length > 0) {
2301
2301
  const t = n.length > 1 ? n : n[0];
2302
2302
  t && (e.children = t);
@@ -2312,7 +2312,7 @@ function Kl(e, n, t) {
2312
2312
  function Zl(e, n) {
2313
2313
  return t;
2314
2314
  function t(r, i, o, l) {
2315
- const a = Array.isArray(o.children), s = on(r);
2315
+ const a = Array.isArray(o.children), s = an(r);
2316
2316
  return n(
2317
2317
  i,
2318
2318
  o,
@@ -2331,7 +2331,7 @@ function eo(e, n) {
2331
2331
  const t = {};
2332
2332
  let r, i;
2333
2333
  for (i in n.properties)
2334
- if (i !== "children" && an.call(n.properties, i)) {
2334
+ if (i !== "children" && sn.call(n.properties, i)) {
2335
2335
  const o = no(e, i, n.properties[i]);
2336
2336
  if (o) {
2337
2337
  const [l, a] = o;
@@ -2379,7 +2379,7 @@ function to(e, n) {
2379
2379
  }
2380
2380
  return t;
2381
2381
  }
2382
- function un(e, n) {
2382
+ function cn(e, n) {
2383
2383
  const t = [];
2384
2384
  let r = -1;
2385
2385
  const i = e.passKeys ? /* @__PURE__ */ new Map() : Hl;
@@ -2393,7 +2393,7 @@ function un(e, n) {
2393
2393
  l = s + "-" + u, i.set(s, u + 1);
2394
2394
  }
2395
2395
  }
2396
- const a = Br(e, o, l);
2396
+ const a = jr(e, o, l);
2397
2397
  a !== void 0 && t.push(a);
2398
2398
  }
2399
2399
  return t;
@@ -2426,10 +2426,10 @@ function ro(e, n) {
2426
2426
  ruleId: "style",
2427
2427
  source: "hast-util-to-jsx-runtime"
2428
2428
  });
2429
- throw i.file = e.filePath || void 0, i.url = Or + "#cannot-parse-style-attribute", i;
2429
+ throw i.file = e.filePath || void 0, i.url = Br + "#cannot-parse-style-attribute", i;
2430
2430
  }
2431
2431
  }
2432
- function Hr(e, n, t) {
2432
+ function $r(e, n, t) {
2433
2433
  let r;
2434
2434
  if (!t)
2435
2435
  r = { type: "Literal", value: n };
@@ -2437,7 +2437,7 @@ function Hr(e, n, t) {
2437
2437
  const i = n.split(".");
2438
2438
  let o = -1, l;
2439
2439
  for (; ++o < i.length; ) {
2440
- const a = Tn(i[o]) ? { type: "Identifier", name: i[o] } : { type: "Literal", value: i[o] };
2440
+ const a = Pn(i[o]) ? { type: "Identifier", name: i[o] } : { type: "Literal", value: i[o] };
2441
2441
  l = l ? {
2442
2442
  type: "MemberExpression",
2443
2443
  object: l,
@@ -2448,13 +2448,13 @@ function Hr(e, n, t) {
2448
2448
  }
2449
2449
  r = l;
2450
2450
  } else
2451
- r = Tn(n) && !/^[a-z]/.test(n) ? { type: "Identifier", name: n } : { type: "Literal", value: n };
2451
+ r = Pn(n) && !/^[a-z]/.test(n) ? { type: "Identifier", name: n } : { type: "Literal", value: n };
2452
2452
  if (r.type === "Literal") {
2453
2453
  const i = (
2454
2454
  /** @type {string | number} */
2455
2455
  r.value
2456
2456
  );
2457
- return an.call(e.components, i) ? e.components[i] : i;
2457
+ return sn.call(e.components, i) ? e.components[i] : i;
2458
2458
  }
2459
2459
  if (e.evaluater)
2460
2460
  return e.evaluater.evaluateExpression(r);
@@ -2470,13 +2470,13 @@ function lt(e, n) {
2470
2470
  source: "hast-util-to-jsx-runtime"
2471
2471
  }
2472
2472
  );
2473
- throw t.file = e.filePath || void 0, t.url = Or + "#cannot-handle-mdx-estrees-without-createevaluater", t;
2473
+ throw t.file = e.filePath || void 0, t.url = Br + "#cannot-handle-mdx-estrees-without-createevaluater", t;
2474
2474
  }
2475
2475
  function io(e) {
2476
2476
  const n = {};
2477
2477
  let t;
2478
2478
  for (t in e)
2479
- an.call(e, t) && (n[lo(t)] = e[t]);
2479
+ sn.call(e, t) && (n[lo(t)] = e[t]);
2480
2480
  return n;
2481
2481
  }
2482
2482
  function lo(e) {
@@ -2486,7 +2486,7 @@ function lo(e) {
2486
2486
  function oo(e) {
2487
2487
  return "-" + e.toLowerCase();
2488
2488
  }
2489
- const zt = {
2489
+ const Lt = {
2490
2490
  action: ["form"],
2491
2491
  cite: ["blockquote", "del", "ins", "q"],
2492
2492
  data: ["object"],
@@ -2509,36 +2509,36 @@ const zt = {
2509
2509
  "video"
2510
2510
  ]
2511
2511
  }, ao = {};
2512
- function cn(e, n) {
2512
+ function fn(e, n) {
2513
2513
  const t = ao, r = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, i = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
2514
- return $r(e, r, i);
2514
+ return qr(e, r, i);
2515
2515
  }
2516
- function $r(e, n, t) {
2516
+ function qr(e, n, t) {
2517
2517
  if (so(e)) {
2518
2518
  if ("value" in e)
2519
2519
  return e.type === "html" && !t ? "" : e.value;
2520
2520
  if (n && "alt" in e && e.alt)
2521
2521
  return e.alt;
2522
2522
  if ("children" in e)
2523
- return Bn(e.children, n, t);
2523
+ return jn(e.children, n, t);
2524
2524
  }
2525
- return Array.isArray(e) ? Bn(e, n, t) : "";
2525
+ return Array.isArray(e) ? jn(e, n, t) : "";
2526
2526
  }
2527
- function Bn(e, n, t) {
2527
+ function jn(e, n, t) {
2528
2528
  const r = [];
2529
2529
  let i = -1;
2530
2530
  for (; ++i < e.length; )
2531
- r[i] = $r(e[i], n, t);
2531
+ r[i] = qr(e[i], n, t);
2532
2532
  return r.join("");
2533
2533
  }
2534
2534
  function so(e) {
2535
2535
  return !!(e && typeof e == "object");
2536
2536
  }
2537
- const jn = document.createElement("i");
2538
- function fn(e) {
2537
+ const Hn = document.createElement("i");
2538
+ function pn(e) {
2539
2539
  const n = "&" + e + ";";
2540
- jn.innerHTML = n;
2541
- const t = jn.textContent;
2540
+ Hn.innerHTML = n;
2541
+ const t = Hn.textContent;
2542
2542
  return t.charCodeAt(t.length - 1) === 59 && e !== "semi" || t === n ? !1 : t;
2543
2543
  }
2544
2544
  function ae(e, n, t, r) {
@@ -2553,8 +2553,8 @@ function ae(e, n, t, r) {
2553
2553
  function se(e, n) {
2554
2554
  return e.length > 0 ? (ae(e, e.length, 0, n), e) : n;
2555
2555
  }
2556
- const Hn = {}.hasOwnProperty;
2557
- function qr(e) {
2556
+ const $n = {}.hasOwnProperty;
2557
+ function Vr(e) {
2558
2558
  const n = {};
2559
2559
  let t = -1;
2560
2560
  for (; ++t < e.length; )
@@ -2564,11 +2564,11 @@ function qr(e) {
2564
2564
  function uo(e, n) {
2565
2565
  let t;
2566
2566
  for (t in n) {
2567
- const i = (Hn.call(e, t) ? e[t] : void 0) || (e[t] = {}), o = n[t];
2567
+ const i = ($n.call(e, t) ? e[t] : void 0) || (e[t] = {}), o = n[t];
2568
2568
  let l;
2569
2569
  if (o)
2570
2570
  for (l in o) {
2571
- Hn.call(i, l) || (i[l] = []);
2571
+ $n.call(i, l) || (i[l] = []);
2572
2572
  const a = o[l];
2573
2573
  co(
2574
2574
  // @ts-expect-error Looks like a list.
@@ -2585,7 +2585,7 @@ function co(e, n) {
2585
2585
  (n[t].add === "after" ? e : r).push(n[t]);
2586
2586
  ae(e, 0, 0, r);
2587
2587
  }
2588
- function Vr(e, n) {
2588
+ function Ur(e, n) {
2589
2589
  const t = Number.parseInt(e, n);
2590
2590
  return (
2591
2591
  // C0 except for HT, LF, FF, CR, space.
@@ -2602,14 +2602,14 @@ function de(e) {
2602
2602
  return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
2603
2603
  }
2604
2604
  const ne = Ie(/[A-Za-z]/), ee = Ie(/[\dA-Za-z]/), fo = Ie(/[#-'*+\--9=?A-Z^-~]/);
2605
- function bt(e) {
2605
+ function wt(e) {
2606
2606
  return (
2607
2607
  // Special whitespace codes (which have negative values), C0 and Control
2608
2608
  // character DEL
2609
2609
  e !== null && (e < 32 || e === 127)
2610
2610
  );
2611
2611
  }
2612
- const Gt = Ie(/\d/), po = Ie(/[\dA-Fa-f]/), ho = Ie(/[!-/:-@[-`{-~]/);
2612
+ const Jt = Ie(/\d/), po = Ie(/[\dA-Fa-f]/), ho = Ie(/[!-/:-@[-`{-~]/);
2613
2613
  function D(e) {
2614
2614
  return e !== null && e < -2;
2615
2615
  }
@@ -2619,7 +2619,7 @@ function Y(e) {
2619
2619
  function H(e) {
2620
2620
  return e === -2 || e === -1 || e === 32;
2621
2621
  }
2622
- const vt = Ie(/\p{P}|\p{S}/u), Fe = Ie(/\s/);
2622
+ const Et = Ie(/\p{P}|\p{S}/u), Fe = Ie(/\s/);
2623
2623
  function Ie(e) {
2624
2624
  return n;
2625
2625
  function n(t) {
@@ -2690,7 +2690,7 @@ function go(e) {
2690
2690
  }
2691
2691
  const yo = {
2692
2692
  tokenize: ko
2693
- }, $n = {
2693
+ }, qn = {
2694
2694
  tokenize: xo
2695
2695
  };
2696
2696
  function ko(e) {
@@ -2732,7 +2732,7 @@ function ko(e) {
2732
2732
  return g(v);
2733
2733
  n.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack);
2734
2734
  }
2735
- return n.containerState = {}, e.check($n, f, c)(v);
2735
+ return n.containerState = {}, e.check(qn, f, c)(v);
2736
2736
  }
2737
2737
  function f(v) {
2738
2738
  return i && I(), k(r), h(v);
@@ -2741,7 +2741,7 @@ function ko(e) {
2741
2741
  return n.parser.lazy[n.now().line] = r !== t.length, l = n.now().offset, g(v);
2742
2742
  }
2743
2743
  function h(v) {
2744
- return n.containerState = {}, e.attempt($n, p, g)(v);
2744
+ return n.containerState = {}, e.attempt(qn, p, g)(v);
2745
2745
  }
2746
2746
  function p(v) {
2747
2747
  return r++, t.push([n.currentConstruct, n.containerState]), h(v);
@@ -2811,10 +2811,10 @@ function xo(e, n, t) {
2811
2811
  function qe(e) {
2812
2812
  if (e === null || Y(e) || Fe(e))
2813
2813
  return 1;
2814
- if (vt(e))
2814
+ if (Et(e))
2815
2815
  return 2;
2816
2816
  }
2817
- function Et(e, n, t) {
2817
+ function It(e, n, t) {
2818
2818
  const r = [];
2819
2819
  let i = -1;
2820
2820
  for (; ++i < e.length; ) {
@@ -2823,7 +2823,7 @@ function Et(e, n, t) {
2823
2823
  }
2824
2824
  return n;
2825
2825
  }
2826
- const Jt = {
2826
+ const Kt = {
2827
2827
  name: "attention",
2828
2828
  resolveAll: bo,
2829
2829
  tokenize: wo
@@ -2843,7 +2843,7 @@ function bo(e, n) {
2843
2843
  }, h = {
2844
2844
  ...e[t][1].start
2845
2845
  };
2846
- qn(c, -s), qn(h, s), l = {
2846
+ Vn(c, -s), Vn(h, s), l = {
2847
2847
  type: s > 1 ? "strongSequence" : "emphasisSequence",
2848
2848
  start: c,
2849
2849
  end: {
@@ -2875,7 +2875,7 @@ function bo(e, n) {
2875
2875
  ...l.start
2876
2876
  }, e[t][1].start = {
2877
2877
  ...a.end
2878
- }, u = [], e[r][1].end.offset - e[r][1].start.offset && (u = se(u, [["enter", e[r][1], n], ["exit", e[r][1], n]])), u = se(u, [["enter", i, n], ["enter", l, n], ["exit", l, n], ["enter", o, n]]), u = se(u, Et(n.parser.constructs.insideSpan.null, e.slice(r + 1, t), n)), u = se(u, [["exit", o, n], ["enter", a, n], ["exit", a, n], ["exit", i, n]]), e[t][1].end.offset - e[t][1].start.offset ? (f = 2, u = se(u, [["enter", e[t][1], n], ["exit", e[t][1], n]])) : f = 0, ae(e, r - 1, t - r + 3, u), t = r + u.length - f - 2;
2878
+ }, u = [], e[r][1].end.offset - e[r][1].start.offset && (u = se(u, [["enter", e[r][1], n], ["exit", e[r][1], n]])), u = se(u, [["enter", i, n], ["enter", l, n], ["exit", l, n], ["enter", o, n]]), u = se(u, It(n.parser.constructs.insideSpan.null, e.slice(r + 1, t), n)), u = se(u, [["exit", o, n], ["enter", a, n], ["exit", a, n], ["exit", i, n]]), e[t][1].end.offset - e[t][1].start.offset ? (f = 2, u = se(u, [["enter", e[t][1], n], ["exit", e[t][1], n]])) : f = 0, ae(e, r - 1, t - r + 3, u), t = r + u.length - f - 2;
2879
2879
  break;
2880
2880
  }
2881
2881
  }
@@ -2897,7 +2897,7 @@ function wo(e, n) {
2897
2897
  return u._open = !!(o === 42 ? c : c && (i || !h)), u._close = !!(o === 42 ? h : h && (f || !c)), n(s);
2898
2898
  }
2899
2899
  }
2900
- function qn(e, n) {
2900
+ function Vn(e, n) {
2901
2901
  e.column += n, e.offset += n, e._bufferIndex += n;
2902
2902
  }
2903
2903
  const Co = {
@@ -2920,7 +2920,7 @@ function So(e, n, t) {
2920
2920
  return p === 58 ? (e.consume(p), r = 0, s) : (p === 43 || p === 45 || p === 46 || ee(p)) && r++ < 32 ? (e.consume(p), a) : (r = 0, u(p));
2921
2921
  }
2922
2922
  function s(p) {
2923
- return p === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), n) : p === null || p === 32 || p === 60 || bt(p) ? t(p) : (e.consume(p), s);
2923
+ return p === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), n) : p === null || p === 32 || p === 60 || wt(p) ? t(p) : (e.consume(p), s);
2924
2924
  }
2925
2925
  function u(p) {
2926
2926
  return p === 64 ? (e.consume(p), f) : fo(p) ? (e.consume(p), u) : t(p);
@@ -2952,7 +2952,7 @@ function vo(e, n, t) {
2952
2952
  return o === null || D(o) ? n(o) : t(o);
2953
2953
  }
2954
2954
  }
2955
- const Ur = {
2955
+ const Wr = {
2956
2956
  continuation: {
2957
2957
  tokenize: Io
2958
2958
  },
@@ -2983,13 +2983,13 @@ function Io(e, n, t) {
2983
2983
  return H(l) ? q(e, o, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(l) : o(l);
2984
2984
  }
2985
2985
  function o(l) {
2986
- return e.attempt(Ur, n, t)(l);
2986
+ return e.attempt(Wr, n, t)(l);
2987
2987
  }
2988
2988
  }
2989
2989
  function Ao(e) {
2990
2990
  e.exit("blockQuote");
2991
2991
  }
2992
- const Wr = {
2992
+ const Qr = {
2993
2993
  name: "characterEscape",
2994
2994
  tokenize: _o
2995
2995
  };
@@ -3002,7 +3002,7 @@ function _o(e, n, t) {
3002
3002
  return ho(o) ? (e.enter("characterEscapeValue"), e.consume(o), e.exit("characterEscapeValue"), e.exit("characterEscape"), n) : t(o);
3003
3003
  }
3004
3004
  }
3005
- const Qr = {
3005
+ const Yr = {
3006
3006
  name: "characterReference",
3007
3007
  tokenize: To
3008
3008
  };
@@ -3017,20 +3017,20 @@ function To(e, n, t) {
3017
3017
  return c === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(c), e.exit("characterReferenceMarkerNumeric"), u) : (e.enter("characterReferenceValue"), o = 31, l = ee, f(c));
3018
3018
  }
3019
3019
  function u(c) {
3020
- return c === 88 || c === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(c), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), o = 6, l = po, f) : (e.enter("characterReferenceValue"), o = 7, l = Gt, f(c));
3020
+ return c === 88 || c === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(c), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), o = 6, l = po, f) : (e.enter("characterReferenceValue"), o = 7, l = Jt, f(c));
3021
3021
  }
3022
3022
  function f(c) {
3023
3023
  if (c === 59 && i) {
3024
3024
  const h = e.exit("characterReferenceValue");
3025
- return l === ee && !fn(r.sliceSerialize(h)) ? t(c) : (e.enter("characterReferenceMarker"), e.consume(c), e.exit("characterReferenceMarker"), e.exit("characterReference"), n);
3025
+ return l === ee && !pn(r.sliceSerialize(h)) ? t(c) : (e.enter("characterReferenceMarker"), e.consume(c), e.exit("characterReferenceMarker"), e.exit("characterReference"), n);
3026
3026
  }
3027
3027
  return l(c) && i++ < o ? (e.consume(c), f) : t(c);
3028
3028
  }
3029
3029
  }
3030
- const Vn = {
3030
+ const Un = {
3031
3031
  partial: !0,
3032
3032
  tokenize: zo
3033
- }, Un = {
3033
+ }, Wn = {
3034
3034
  concrete: !0,
3035
3035
  name: "codeFenced",
3036
3036
  tokenize: Po
@@ -3053,7 +3053,7 @@ function Po(e, n, t) {
3053
3053
  return b === a ? (l++, e.consume(b), f) : l < 3 ? t(b) : (e.exit("codeFencedFenceSequence"), H(b) ? q(e, c, "whitespace")(b) : c(b));
3054
3054
  }
3055
3055
  function c(b) {
3056
- return b === null || D(b) ? (e.exit("codeFencedFence"), r.interrupt ? n(b) : e.check(Vn, x, M)(b)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
3056
+ return b === null || D(b) ? (e.exit("codeFencedFence"), r.interrupt ? n(b) : e.check(Un, x, M)(b)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
3057
3057
  contentType: "string"
3058
3058
  }), h(b));
3059
3059
  }
@@ -3078,7 +3078,7 @@ function Po(e, n, t) {
3078
3078
  return o > 0 && H(b) ? q(e, I, "linePrefix", o + 1)(b) : I(b);
3079
3079
  }
3080
3080
  function I(b) {
3081
- return b === null || D(b) ? e.check(Vn, x, M)(b) : (e.enter("codeFlowValue"), v(b));
3081
+ return b === null || D(b) ? e.check(Un, x, M)(b) : (e.enter("codeFlowValue"), v(b));
3082
3082
  }
3083
3083
  function v(b) {
3084
3084
  return b === null || D(b) ? (e.exit("codeFlowValue"), I(b)) : (e.consume(b), v);
@@ -3116,7 +3116,7 @@ function zo(e, n, t) {
3116
3116
  return r.parser.lazy[r.now().line] ? t(l) : n(l);
3117
3117
  }
3118
3118
  }
3119
- const Lt = {
3119
+ const Dt = {
3120
3120
  name: "codeIndented",
3121
3121
  tokenize: Do
3122
3122
  }, Lo = {
@@ -3367,7 +3367,7 @@ function Je(e, n) {
3367
3367
  for (; t < n.length; )
3368
3368
  e.push(...n.slice(t, t + 1e4)), t += 1e4;
3369
3369
  }
3370
- function Yr(e) {
3370
+ function Xr(e) {
3371
3371
  const n = {};
3372
3372
  let t = -1, r, i, o, l, a, s, u;
3373
3373
  const f = new Bo(e);
@@ -3424,7 +3424,7 @@ const Ho = {
3424
3424
  tokenize: Uo
3425
3425
  };
3426
3426
  function qo(e) {
3427
- return Yr(e), e;
3427
+ return Xr(e), e;
3428
3428
  }
3429
3429
  function Vo(e, n) {
3430
3430
  let t;
@@ -3460,12 +3460,12 @@ function Uo(e, n, t) {
3460
3460
  return !r.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? n(l) : e.interrupt(r.parser.constructs.flow, t, n)(l);
3461
3461
  }
3462
3462
  }
3463
- function Xr(e, n, t, r, i, o, l, a, s) {
3463
+ function Gr(e, n, t, r, i, o, l, a, s) {
3464
3464
  const u = s || Number.POSITIVE_INFINITY;
3465
3465
  let f = 0;
3466
3466
  return c;
3467
3467
  function c(k) {
3468
- return k === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(k), e.exit(o), h) : k === null || k === 32 || k === 41 || bt(k) ? t(k) : (e.enter(r), e.enter(l), e.enter(a), e.enter("chunkString", {
3468
+ return k === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(k), e.exit(o), h) : k === null || k === 32 || k === 41 || wt(k) ? t(k) : (e.enter(r), e.enter(l), e.enter(a), e.enter("chunkString", {
3469
3469
  contentType: "string"
3470
3470
  }), x(k));
3471
3471
  }
@@ -3481,13 +3481,13 @@ function Xr(e, n, t, r, i, o, l, a, s) {
3481
3481
  return k === 60 || k === 62 || k === 92 ? (e.consume(k), p) : p(k);
3482
3482
  }
3483
3483
  function x(k) {
3484
- return !f && (k === null || k === 41 || Y(k)) ? (e.exit("chunkString"), e.exit(a), e.exit(l), e.exit(r), n(k)) : f < u && k === 40 ? (e.consume(k), f++, x) : k === 41 ? (e.consume(k), f--, x) : k === null || k === 32 || k === 40 || bt(k) ? t(k) : (e.consume(k), k === 92 ? C : x);
3484
+ return !f && (k === null || k === 41 || Y(k)) ? (e.exit("chunkString"), e.exit(a), e.exit(l), e.exit(r), n(k)) : f < u && k === 40 ? (e.consume(k), f++, x) : k === 41 ? (e.consume(k), f--, x) : k === null || k === 32 || k === 40 || wt(k) ? t(k) : (e.consume(k), k === 92 ? C : x);
3485
3485
  }
3486
3486
  function C(k) {
3487
3487
  return k === 40 || k === 41 || k === 92 ? (e.consume(k), x) : x(k);
3488
3488
  }
3489
3489
  }
3490
- function Gr(e, n, t, r, i, o) {
3490
+ function Jr(e, n, t, r, i, o) {
3491
3491
  const l = this;
3492
3492
  let a = 0, s;
3493
3493
  return u;
@@ -3511,7 +3511,7 @@ function Gr(e, n, t, r, i, o) {
3511
3511
  return p === 91 || p === 92 || p === 93 ? (e.consume(p), a++, c) : c(p);
3512
3512
  }
3513
3513
  }
3514
- function Jr(e, n, t, r, i, o) {
3514
+ function Kr(e, n, t, r, i, o) {
3515
3515
  let l;
3516
3516
  return a;
3517
3517
  function a(h) {
@@ -3554,7 +3554,7 @@ function Yo(e, n, t) {
3554
3554
  return e.enter("definition"), l(p);
3555
3555
  }
3556
3556
  function l(p) {
3557
- return Gr.call(
3557
+ return Jr.call(
3558
3558
  r,
3559
3559
  e,
3560
3560
  a,
@@ -3572,7 +3572,7 @@ function Yo(e, n, t) {
3572
3572
  return Y(p) ? rt(e, u)(p) : u(p);
3573
3573
  }
3574
3574
  function u(p) {
3575
- return Xr(
3575
+ return Gr(
3576
3576
  e,
3577
3577
  f,
3578
3578
  // Note: we don’t need to reset the way `markdown-rs` does.
@@ -3600,7 +3600,7 @@ function Xo(e, n, t) {
3600
3600
  return Y(a) ? rt(e, i)(a) : t(a);
3601
3601
  }
3602
3602
  function i(a) {
3603
- return Jr(e, o, t, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(a);
3603
+ return Kr(e, o, t, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(a);
3604
3604
  }
3605
3605
  function o(a) {
3606
3606
  return H(a) ? q(e, l, "whitespace")(a) : l(a);
@@ -3725,7 +3725,7 @@ const ta = [
3725
3725
  "tr",
3726
3726
  "track",
3727
3727
  "ul"
3728
- ], Wn = ["pre", "script", "style", "textarea"], na = {
3728
+ ], Qn = ["pre", "script", "style", "textarea"], na = {
3729
3729
  concrete: !0,
3730
3730
  name: "htmlFlow",
3731
3731
  resolveTo: la,
@@ -3772,7 +3772,7 @@ function oa(e, n, t) {
3772
3772
  function C(m) {
3773
3773
  if (m === null || m === 47 || m === 62 || Y(m)) {
3774
3774
  const fe = m === 47, Ae = l.toLowerCase();
3775
- return !fe && !o && Wn.includes(Ae) ? (i = 1, r.interrupt ? n(m) : P(m)) : ta.includes(l.toLowerCase()) ? (i = 6, fe ? (e.consume(m), k) : r.interrupt ? n(m) : P(m)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? t(m) : o ? I(m) : v(m));
3775
+ return !fe && !o && Qn.includes(Ae) ? (i = 1, r.interrupt ? n(m) : P(m)) : ta.includes(l.toLowerCase()) ? (i = 6, fe ? (e.consume(m), k) : r.interrupt ? n(m) : P(m)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? t(m) : o ? I(m) : v(m));
3776
3776
  }
3777
3777
  return m === 45 || ee(m) ? (e.consume(m), l += String.fromCharCode(m), C) : t(m);
3778
3778
  }
@@ -3830,7 +3830,7 @@ function oa(e, n, t) {
3830
3830
  function ue(m) {
3831
3831
  if (m === 62) {
3832
3832
  const fe = l.toLowerCase();
3833
- return Wn.includes(fe) ? (e.consume(m), ce) : P(m);
3833
+ return Qn.includes(fe) ? (e.consume(m), ce) : P(m);
3834
3834
  }
3835
3835
  return ne(m) && l.length < 8 ? (e.consume(m), l += String.fromCharCode(m), ue) : P(m);
3836
3836
  }
@@ -3960,7 +3960,7 @@ function ca(e, n, t) {
3960
3960
  return e.enter("htmlTextData"), l(d);
3961
3961
  }
3962
3962
  }
3963
- const pn = {
3963
+ const hn = {
3964
3964
  name: "labelEnd",
3965
3965
  resolveAll: da,
3966
3966
  resolveTo: ma,
@@ -4022,7 +4022,7 @@ function ma(e, n) {
4022
4022
  ...e[l - 2][1].start
4023
4023
  }
4024
4024
  };
4025
- return a = [["enter", s, n], ["enter", u, n]], a = se(a, e.slice(o + 1, o + r + 3)), a = se(a, [["enter", f, n]]), a = se(a, Et(n.parser.constructs.insideSpan.null, e.slice(o + r + 4, l - 3), n)), a = se(a, [["exit", f, n], e[l - 2], e[l - 1], ["exit", u, n]]), a = se(a, e.slice(l + 1)), a = se(a, [["exit", s, n]]), ae(e, o, e.length, a), e;
4025
+ return a = [["enter", s, n], ["enter", u, n]], a = se(a, e.slice(o + 1, o + r + 3)), a = se(a, [["enter", f, n]]), a = se(a, It(n.parser.constructs.insideSpan.null, e.slice(o + r + 4, l - 3), n)), a = se(a, [["exit", f, n], e[l - 2], e[l - 1], ["exit", u, n]]), a = se(a, e.slice(l + 1)), a = se(a, [["exit", s, n]]), ae(e, o, e.length, a), e;
4026
4026
  }
4027
4027
  function ga(e, n, t) {
4028
4028
  const r = this;
@@ -4061,7 +4061,7 @@ function ya(e, n, t) {
4061
4061
  return Y(c) ? rt(e, o)(c) : o(c);
4062
4062
  }
4063
4063
  function o(c) {
4064
- return c === 41 ? f(c) : Xr(e, l, a, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(c);
4064
+ return c === 41 ? f(c) : Gr(e, l, a, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(c);
4065
4065
  }
4066
4066
  function l(c) {
4067
4067
  return Y(c) ? rt(e, s)(c) : f(c);
@@ -4070,7 +4070,7 @@ function ya(e, n, t) {
4070
4070
  return t(c);
4071
4071
  }
4072
4072
  function s(c) {
4073
- return c === 34 || c === 39 || c === 40 ? Jr(e, u, t, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(c) : f(c);
4073
+ return c === 34 || c === 39 || c === 40 ? Kr(e, u, t, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(c) : f(c);
4074
4074
  }
4075
4075
  function u(c) {
4076
4076
  return Y(c) ? rt(e, f)(c) : f(c);
@@ -4083,7 +4083,7 @@ function ka(e, n, t) {
4083
4083
  const r = this;
4084
4084
  return i;
4085
4085
  function i(a) {
4086
- return Gr.call(r, e, o, l, "reference", "referenceMarker", "referenceString")(a);
4086
+ return Jr.call(r, e, o, l, "reference", "referenceMarker", "referenceString")(a);
4087
4087
  }
4088
4088
  function o(a) {
4089
4089
  return r.parser.defined.includes(de(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1))) ? n(a) : t(a);
@@ -4103,7 +4103,7 @@ function xa(e, n, t) {
4103
4103
  }
4104
4104
  const ba = {
4105
4105
  name: "labelStartImage",
4106
- resolveAll: pn.resolveAll,
4106
+ resolveAll: hn.resolveAll,
4107
4107
  tokenize: wa
4108
4108
  };
4109
4109
  function wa(e, n, t) {
@@ -4121,7 +4121,7 @@ function wa(e, n, t) {
4121
4121
  }
4122
4122
  const Ca = {
4123
4123
  name: "labelStartLink",
4124
- resolveAll: pn.resolveAll,
4124
+ resolveAll: hn.resolveAll,
4125
4125
  tokenize: Sa
4126
4126
  };
4127
4127
  function Sa(e, n, t) {
@@ -4134,7 +4134,7 @@ function Sa(e, n, t) {
4134
4134
  return l === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? t(l) : n(l);
4135
4135
  }
4136
4136
  }
4137
- const Dt = {
4137
+ const Mt = {
4138
4138
  name: "lineEnding",
4139
4139
  tokenize: va
4140
4140
  };
@@ -4184,7 +4184,7 @@ function _a(e, n, t) {
4184
4184
  return a;
4185
4185
  function a(p) {
4186
4186
  const g = r.containerState.type || (p === 42 || p === 43 || p === 45 ? "listUnordered" : "listOrdered");
4187
- if (g === "listUnordered" ? !r.containerState.marker || p === r.containerState.marker : Gt(p)) {
4187
+ if (g === "listUnordered" ? !r.containerState.marker || p === r.containerState.marker : Jt(p)) {
4188
4188
  if (r.containerState.type || (r.containerState.type = g, e.enter(g, {
4189
4189
  _container: !0
4190
4190
  })), g === "listUnordered")
@@ -4195,7 +4195,7 @@ function _a(e, n, t) {
4195
4195
  return t(p);
4196
4196
  }
4197
4197
  function s(p) {
4198
- return Gt(p) && ++l < 10 ? (e.consume(p), s) : (!r.interrupt || l < 2) && (r.containerState.marker ? p === r.containerState.marker : p === 41 || p === 46) ? (e.exit("listItemValue"), u(p)) : t(p);
4198
+ return Jt(p) && ++l < 10 ? (e.consume(p), s) : (!r.interrupt || l < 2) && (r.containerState.marker ? p === r.containerState.marker : p === 41 || p === 46) ? (e.exit("listItemValue"), u(p)) : t(p);
4199
4199
  }
4200
4200
  function u(p) {
4201
4201
  return e.enter("listItemMarker"), e.consume(p), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || p, e.check(
@@ -4247,7 +4247,7 @@ function La(e, n, t) {
4247
4247
  return !H(o) && l && l[1].type === "listItemPrefixWhitespace" ? n(o) : t(o);
4248
4248
  }
4249
4249
  }
4250
- const Qn = {
4250
+ const Yn = {
4251
4251
  name: "setextUnderline",
4252
4252
  resolveTo: Da,
4253
4253
  tokenize: Ma
@@ -4327,11 +4327,11 @@ function Ra(e) {
4327
4327
  }
4328
4328
  }
4329
4329
  const Na = {
4330
- resolveAll: Zr()
4331
- }, Oa = Kr("string"), Ba = Kr("text");
4332
- function Kr(e) {
4330
+ resolveAll: ei()
4331
+ }, Oa = Zr("string"), Ba = Zr("text");
4332
+ function Zr(e) {
4333
4333
  return {
4334
- resolveAll: Zr(e === "text" ? ja : void 0),
4334
+ resolveAll: ei(e === "text" ? ja : void 0),
4335
4335
  tokenize: n
4336
4336
  };
4337
4337
  function n(t) {
@@ -4365,7 +4365,7 @@ function Kr(e) {
4365
4365
  }
4366
4366
  }
4367
4367
  }
4368
- function Zr(e) {
4368
+ function ei(e) {
4369
4369
  return n;
4370
4370
  function n(t, r) {
4371
4371
  let i = -1, o;
@@ -4430,40 +4430,40 @@ const Ha = {
4430
4430
  55: re,
4431
4431
  56: re,
4432
4432
  57: re,
4433
- 62: Ur
4433
+ 62: Wr
4434
4434
  }, $a = {
4435
4435
  91: Wo
4436
4436
  }, qa = {
4437
- [-2]: Lt,
4438
- [-1]: Lt,
4439
- 32: Lt
4437
+ [-2]: Dt,
4438
+ [-1]: Dt,
4439
+ 32: Dt
4440
4440
  }, Va = {
4441
4441
  35: Ko,
4442
4442
  42: xt,
4443
- 45: [Qn, xt],
4443
+ 45: [Yn, xt],
4444
4444
  60: na,
4445
- 61: Qn,
4445
+ 61: Yn,
4446
4446
  95: xt,
4447
- 96: Un,
4448
- 126: Un
4447
+ 96: Wn,
4448
+ 126: Wn
4449
4449
  }, Ua = {
4450
- 38: Qr,
4451
- 92: Wr
4450
+ 38: Yr,
4451
+ 92: Qr
4452
4452
  }, Wa = {
4453
- [-5]: Dt,
4454
- [-4]: Dt,
4455
- [-3]: Dt,
4453
+ [-5]: Mt,
4454
+ [-4]: Mt,
4455
+ [-3]: Mt,
4456
4456
  33: ba,
4457
- 38: Qr,
4458
- 42: Jt,
4457
+ 38: Yr,
4458
+ 42: Kt,
4459
4459
  60: [Co, ua],
4460
4460
  91: Ca,
4461
- 92: [Go, Wr],
4462
- 93: pn,
4463
- 95: Jt,
4461
+ 92: [Go, Qr],
4462
+ 93: hn,
4463
+ 95: Kt,
4464
4464
  96: Fo
4465
4465
  }, Qa = {
4466
- null: [Jt, Na]
4466
+ null: [Kt, Na]
4467
4467
  }, Ya = {
4468
4468
  null: [42, 95]
4469
4469
  }, Xa = {
@@ -4514,7 +4514,7 @@ function Ja(e, n, t) {
4514
4514
  let f = n.tokenize.call(u, s);
4515
4515
  return n.resolveAll && o.push(n), u;
4516
4516
  function c(_) {
4517
- return l = se(l, _), C(), l[l.length - 1] !== null ? [] : (V(n, 0), u.events = Et(o, u.events, u), u.events);
4517
+ return l = se(l, _), C(), l[l.length - 1] !== null ? [] : (V(n, 0), u.events = It(o, u.events, u), u.events);
4518
4518
  }
4519
4519
  function h(_, P) {
4520
4520
  return Za(p(_), P);
@@ -4701,7 +4701,7 @@ function es(e) {
4701
4701
  const r = {
4702
4702
  constructs: (
4703
4703
  /** @type {FullNormalizedExtension} */
4704
- qr([Ga, ...(e || {}).extensions || []])
4704
+ Vr([Ga, ...(e || {}).extensions || []])
4705
4705
  ),
4706
4706
  content: i(mo),
4707
4707
  defined: [],
@@ -4720,11 +4720,11 @@ function es(e) {
4720
4720
  }
4721
4721
  }
4722
4722
  function ts(e) {
4723
- for (; !Yr(e); )
4723
+ for (; !Xr(e); )
4724
4724
  ;
4725
4725
  return e;
4726
4726
  }
4727
- const Yn = /[\0\t\n\r]/g;
4727
+ const Xn = /[\0\t\n\r]/g;
4728
4728
  function ns() {
4729
4729
  let e = 1, n = "", t = !0, r;
4730
4730
  return i;
@@ -4732,7 +4732,7 @@ function ns() {
4732
4732
  const s = [];
4733
4733
  let u, f, c, h, p;
4734
4734
  for (o = n + (typeof o == "string" ? o.toString() : new TextDecoder(l || void 0).decode(o)), c = 0, n = "", t && (o.charCodeAt(0) === 65279 && c++, t = void 0); c < o.length; ) {
4735
- if (Yn.lastIndex = c, u = Yn.exec(o), h = u && u.index !== void 0 ? u.index : o.length, p = o.charCodeAt(h), !u) {
4735
+ if (Xn.lastIndex = c, u = Xn.exec(o), h = u && u.index !== void 0 ? u.index : o.length, p = o.charCodeAt(h), !u) {
4736
4736
  n = o.slice(c);
4737
4737
  break;
4738
4738
  }
@@ -4769,11 +4769,11 @@ function ls(e, n, t) {
4769
4769
  return n;
4770
4770
  if (t.charCodeAt(0) === 35) {
4771
4771
  const i = t.charCodeAt(1), o = i === 120 || i === 88;
4772
- return Vr(t.slice(o ? 2 : 1), o ? 16 : 10);
4772
+ return Ur(t.slice(o ? 2 : 1), o ? 16 : 10);
4773
4773
  }
4774
- return fn(t) || e;
4774
+ return pn(t) || e;
4775
4775
  }
4776
- const ei = {}.hasOwnProperty;
4776
+ const ti = {}.hasOwnProperty;
4777
4777
  function os(e, n, t) {
4778
4778
  return n && typeof n == "object" && (t = n, n = void 0), as(t)(ts(es(t).document().write(ns()(e, n, !0))));
4779
4779
  }
@@ -4782,10 +4782,10 @@ function as(e) {
4782
4782
  transforms: [],
4783
4783
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
4784
4784
  enter: {
4785
- autolink: o(En),
4785
+ autolink: o(In),
4786
4786
  autolinkProtocol: L,
4787
4787
  autolinkEmail: L,
4788
- atxHeading: o(Cn),
4788
+ atxHeading: o(Sn),
4789
4789
  blockQuote: o(Be),
4790
4790
  characterEscape: L,
4791
4791
  characterReference: L,
@@ -4793,36 +4793,36 @@ function as(e) {
4793
4793
  codeFencedFenceInfo: l,
4794
4794
  codeFencedFenceMeta: l,
4795
4795
  codeIndented: o(ct, l),
4796
- codeText: o(Mi, l),
4796
+ codeText: o(Fi, l),
4797
4797
  codeTextData: L,
4798
4798
  data: L,
4799
4799
  codeFlowValue: L,
4800
- definition: o(Fi),
4800
+ definition: o(Ri),
4801
4801
  definitionDestinationString: l,
4802
4802
  definitionLabelString: l,
4803
4803
  definitionTitleString: l,
4804
- emphasis: o(Ri),
4805
- hardBreakEscape: o(Sn),
4806
- hardBreakTrailing: o(Sn),
4807
- htmlFlow: o(vn, l),
4804
+ emphasis: o(Ni),
4805
+ hardBreakEscape: o(vn),
4806
+ hardBreakTrailing: o(vn),
4807
+ htmlFlow: o(En, l),
4808
4808
  htmlFlowData: L,
4809
- htmlText: o(vn, l),
4809
+ htmlText: o(En, l),
4810
4810
  htmlTextData: L,
4811
- image: o(Ni),
4811
+ image: o(Oi),
4812
4812
  label: l,
4813
- link: o(En),
4814
- listItem: o(Oi),
4813
+ link: o(In),
4814
+ listItem: o(Bi),
4815
4815
  listItemValue: h,
4816
- listOrdered: o(In, c),
4817
- listUnordered: o(In),
4818
- paragraph: o(Bi),
4816
+ listOrdered: o(An, c),
4817
+ listUnordered: o(An),
4818
+ paragraph: o(ji),
4819
4819
  reference: m,
4820
4820
  referenceString: l,
4821
4821
  resourceDestinationString: l,
4822
4822
  resourceTitleString: l,
4823
- setextHeading: o(Cn),
4824
- strong: o(ji),
4825
- thematicBreak: o($i)
4823
+ setextHeading: o(Sn),
4824
+ strong: o(Hi),
4825
+ thematicBreak: o(qi)
4826
4826
  },
4827
4827
  exit: {
4828
4828
  atxHeading: s(),
@@ -4876,7 +4876,7 @@ function as(e) {
4876
4876
  thematicBreak: s()
4877
4877
  }
4878
4878
  };
4879
- ti(n, (e || {}).mdastExtensions || []);
4879
+ ni(n, (e || {}).mdastExtensions || []);
4880
4880
  const t = {};
4881
4881
  return r;
4882
4882
  function r(w) {
@@ -4905,13 +4905,13 @@ function as(e) {
4905
4905
  }
4906
4906
  for (W = -1; ++W < w.length; ) {
4907
4907
  const pe = n[w[W][0]];
4908
- ei.call(pe, w[W][1].type) && pe[w[W][1].type].call(Object.assign({
4908
+ ti.call(pe, w[W][1].type) && pe[w[W][1].type].call(Object.assign({
4909
4909
  sliceSerialize: w[W][2].sliceSerialize
4910
4910
  }, O), w[W][1]);
4911
4911
  }
4912
4912
  if (O.tokenStack.length > 0) {
4913
4913
  const pe = O.tokenStack[O.tokenStack.length - 1];
4914
- (pe[1] || Xn).call(O, void 0, pe[0]);
4914
+ (pe[1] || Gn).call(O, void 0, pe[0]);
4915
4915
  }
4916
4916
  for (A.position = {
4917
4917
  start: ve(w.length > 0 ? w[0][1].start : {
@@ -5006,7 +5006,7 @@ function as(e) {
5006
5006
  function u(w, A) {
5007
5007
  const O = this.stack.pop(), $ = this.tokenStack.pop();
5008
5008
  if ($)
5009
- $[0].type !== w.type && (A ? A.call(this, w, $[0]) : ($[1] || Xn).call(this, w, $[0]));
5009
+ $[0].type !== w.type && (A ? A.call(this, w, $[0]) : ($[1] || Gn).call(this, w, $[0]));
5010
5010
  else throw new Error("Cannot close `" + w.type + "` (" + nt({
5011
5011
  start: w.start,
5012
5012
  end: w.end
@@ -5014,7 +5014,7 @@ function as(e) {
5014
5014
  O.position.end = ve(w.end);
5015
5015
  }
5016
5016
  function f() {
5017
- return cn(this.stack.pop());
5017
+ return fn(this.stack.pop());
5018
5018
  }
5019
5019
  function c() {
5020
5020
  this.data.expectingFirstListItemValue = !0;
@@ -5076,7 +5076,7 @@ function as(e) {
5076
5076
  function L(w) {
5077
5077
  const O = this.stack[this.stack.length - 1].children;
5078
5078
  let $ = O[O.length - 1];
5079
- (!$ || $.type !== "text") && ($ = Hi(), $.position = {
5079
+ (!$ || $.type !== "text") && ($ = $i(), $.position = {
5080
5080
  start: ve(w.start),
5081
5081
  // @ts-expect-error: we’ll add `end` later.
5082
5082
  end: void 0
@@ -5164,7 +5164,7 @@ function as(e) {
5164
5164
  function K(w) {
5165
5165
  const A = this.sliceSerialize(w), O = this.data.characterReferenceType;
5166
5166
  let $;
5167
- O ? ($ = Vr(A, O === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : $ = fn(A);
5167
+ O ? ($ = Ur(A, O === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : $ = pn(A);
5168
5168
  const W = this.stack[this.stack.length - 1];
5169
5169
  W.value += $;
5170
5170
  }
@@ -5196,13 +5196,13 @@ function as(e) {
5196
5196
  value: ""
5197
5197
  };
5198
5198
  }
5199
- function Mi() {
5199
+ function Fi() {
5200
5200
  return {
5201
5201
  type: "inlineCode",
5202
5202
  value: ""
5203
5203
  };
5204
5204
  }
5205
- function Fi() {
5205
+ function Ri() {
5206
5206
  return {
5207
5207
  type: "definition",
5208
5208
  identifier: "",
@@ -5211,13 +5211,13 @@ function as(e) {
5211
5211
  url: ""
5212
5212
  };
5213
5213
  }
5214
- function Ri() {
5214
+ function Ni() {
5215
5215
  return {
5216
5216
  type: "emphasis",
5217
5217
  children: []
5218
5218
  };
5219
5219
  }
5220
- function Cn() {
5220
+ function Sn() {
5221
5221
  return {
5222
5222
  type: "heading",
5223
5223
  // @ts-expect-error `depth` will be set later.
@@ -5225,18 +5225,18 @@ function as(e) {
5225
5225
  children: []
5226
5226
  };
5227
5227
  }
5228
- function Sn() {
5228
+ function vn() {
5229
5229
  return {
5230
5230
  type: "break"
5231
5231
  };
5232
5232
  }
5233
- function vn() {
5233
+ function En() {
5234
5234
  return {
5235
5235
  type: "html",
5236
5236
  value: ""
5237
5237
  };
5238
5238
  }
5239
- function Ni() {
5239
+ function Oi() {
5240
5240
  return {
5241
5241
  type: "image",
5242
5242
  title: null,
@@ -5244,7 +5244,7 @@ function as(e) {
5244
5244
  alt: null
5245
5245
  };
5246
5246
  }
5247
- function En() {
5247
+ function In() {
5248
5248
  return {
5249
5249
  type: "link",
5250
5250
  title: null,
@@ -5252,7 +5252,7 @@ function as(e) {
5252
5252
  children: []
5253
5253
  };
5254
5254
  }
5255
- function In(w) {
5255
+ function An(w) {
5256
5256
  return {
5257
5257
  type: "list",
5258
5258
  ordered: w.type === "listOrdered",
@@ -5261,7 +5261,7 @@ function as(e) {
5261
5261
  children: []
5262
5262
  };
5263
5263
  }
5264
- function Oi(w) {
5264
+ function Bi(w) {
5265
5265
  return {
5266
5266
  type: "listItem",
5267
5267
  spread: w._spread,
@@ -5269,25 +5269,25 @@ function as(e) {
5269
5269
  children: []
5270
5270
  };
5271
5271
  }
5272
- function Bi() {
5272
+ function ji() {
5273
5273
  return {
5274
5274
  type: "paragraph",
5275
5275
  children: []
5276
5276
  };
5277
5277
  }
5278
- function ji() {
5278
+ function Hi() {
5279
5279
  return {
5280
5280
  type: "strong",
5281
5281
  children: []
5282
5282
  };
5283
5283
  }
5284
- function Hi() {
5284
+ function $i() {
5285
5285
  return {
5286
5286
  type: "text",
5287
5287
  value: ""
5288
5288
  };
5289
5289
  }
5290
- function $i() {
5290
+ function qi() {
5291
5291
  return {
5292
5292
  type: "thematicBreak"
5293
5293
  };
@@ -5300,17 +5300,17 @@ function ve(e) {
5300
5300
  offset: e.offset
5301
5301
  };
5302
5302
  }
5303
- function ti(e, n) {
5303
+ function ni(e, n) {
5304
5304
  let t = -1;
5305
5305
  for (; ++t < n.length; ) {
5306
5306
  const r = n[t];
5307
- Array.isArray(r) ? ti(e, r) : ss(e, r);
5307
+ Array.isArray(r) ? ni(e, r) : ss(e, r);
5308
5308
  }
5309
5309
  }
5310
5310
  function ss(e, n) {
5311
5311
  let t;
5312
5312
  for (t in n)
5313
- if (ei.call(n, t))
5313
+ if (ti.call(n, t))
5314
5314
  switch (t) {
5315
5315
  case "canContainEols": {
5316
5316
  const r = n[t];
@@ -5330,7 +5330,7 @@ function ss(e, n) {
5330
5330
  }
5331
5331
  }
5332
5332
  }
5333
- function Xn(e, n) {
5333
+ function Gn(e, n) {
5334
5334
  throw e ? new Error("Cannot close `" + e.type + "` (" + nt({
5335
5335
  start: e.start,
5336
5336
  end: e.end
@@ -5440,7 +5440,7 @@ function ys(e, n) {
5440
5440
  return e.patch(n, t), e.applyData(n, t);
5441
5441
  }
5442
5442
  }
5443
- function ni(e, n) {
5443
+ function ri(e, n) {
5444
5444
  const t = n.referenceType;
5445
5445
  let r = "]";
5446
5446
  if (t === "collapsed" ? r += "[]" : t === "full" && (r += "[" + (n.label || n.identifier) + "]"), n.type === "imageReference")
@@ -5453,7 +5453,7 @@ function ni(e, n) {
5453
5453
  function ks(e, n) {
5454
5454
  const t = String(n.identifier).toUpperCase(), r = e.definitionById.get(t);
5455
5455
  if (!r)
5456
- return ni(e, n);
5456
+ return ri(e, n);
5457
5457
  const i = { src: Ue(r.url || ""), alt: n.alt };
5458
5458
  r.title !== null && r.title !== void 0 && (i.title = r.title);
5459
5459
  const o = { type: "element", tagName: "img", properties: i, children: [] };
@@ -5479,7 +5479,7 @@ function bs(e, n) {
5479
5479
  function ws(e, n) {
5480
5480
  const t = String(n.identifier).toUpperCase(), r = e.definitionById.get(t);
5481
5481
  if (!r)
5482
- return ni(e, n);
5482
+ return ri(e, n);
5483
5483
  const i = { href: Ue(r.url || "") };
5484
5484
  r.title !== null && r.title !== void 0 && (i.title = r.title);
5485
5485
  const o = {
@@ -5502,7 +5502,7 @@ function Cs(e, n) {
5502
5502
  return e.patch(n, r), e.applyData(n, r);
5503
5503
  }
5504
5504
  function Ss(e, n, t) {
5505
- const r = e.all(n), i = t ? vs(t) : ri(n), o = {}, l = [];
5505
+ const r = e.all(n), i = t ? vs(t) : ii(n), o = {}, l = [];
5506
5506
  if (typeof n.checked == "boolean") {
5507
5507
  const f = r[0];
5508
5508
  let c;
@@ -5532,11 +5532,11 @@ function vs(e) {
5532
5532
  const t = e.children;
5533
5533
  let r = -1;
5534
5534
  for (; !n && ++r < t.length; )
5535
- n = ri(t[r]);
5535
+ n = ii(t[r]);
5536
5536
  }
5537
5537
  return n;
5538
5538
  }
5539
- function ri(e) {
5539
+ function ii(e) {
5540
5540
  const n = e.spread;
5541
5541
  return n ?? e.children.length > 1;
5542
5542
  }
@@ -5597,7 +5597,7 @@ function Ts(e, n) {
5597
5597
  tagName: "tbody",
5598
5598
  properties: {},
5599
5599
  children: e.wrap(t, !0)
5600
- }, a = on(n.children[1]), s = Rr(n.children[n.children.length - 1]);
5600
+ }, a = an(n.children[1]), s = Nr(n.children[n.children.length - 1]);
5601
5601
  a && s && (l.position = { start: a, end: s }), i.push(l);
5602
5602
  }
5603
5603
  const o = {
@@ -5636,28 +5636,28 @@ function zs(e, n) {
5636
5636
  };
5637
5637
  return e.patch(n, t), e.applyData(n, t);
5638
5638
  }
5639
- const Gn = 9, Jn = 32;
5639
+ const Jn = 9, Kn = 32;
5640
5640
  function Ls(e) {
5641
5641
  const n = String(e), t = /\r?\n|\r/g;
5642
5642
  let r = t.exec(n), i = 0;
5643
5643
  const o = [];
5644
5644
  for (; r; )
5645
5645
  o.push(
5646
- Kn(n.slice(i, r.index), i > 0, !0),
5646
+ Zn(n.slice(i, r.index), i > 0, !0),
5647
5647
  r[0]
5648
5648
  ), i = r.index + r[0].length, r = t.exec(n);
5649
- return o.push(Kn(n.slice(i), i > 0, !1)), o.join("");
5649
+ return o.push(Zn(n.slice(i), i > 0, !1)), o.join("");
5650
5650
  }
5651
- function Kn(e, n, t) {
5651
+ function Zn(e, n, t) {
5652
5652
  let r = 0, i = e.length;
5653
5653
  if (n) {
5654
5654
  let o = e.codePointAt(r);
5655
- for (; o === Gn || o === Jn; )
5655
+ for (; o === Jn || o === Kn; )
5656
5656
  r++, o = e.codePointAt(r);
5657
5657
  }
5658
5658
  if (t) {
5659
5659
  let o = e.codePointAt(i - 1);
5660
- for (; o === Gn || o === Jn; )
5660
+ for (; o === Jn || o === Kn; )
5661
5661
  i--, o = e.codePointAt(i - 1);
5662
5662
  }
5663
5663
  return i > r ? e.slice(r, i) : "";
@@ -5707,7 +5707,7 @@ const Fs = {
5707
5707
  };
5708
5708
  function pt() {
5709
5709
  }
5710
- const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, oi = 8, ai = typeof self == "object" ? self : globalThis, Zn = (e, n) => {
5710
+ const li = -1, At = 0, it = 1, Ct = 2, dn = 3, mn = 4, gn = 5, yn = 6, oi = 7, ai = 8, si = typeof self == "object" ? self : globalThis, er = (e, n) => {
5711
5711
  switch (e) {
5712
5712
  case "Function":
5713
5713
  case "SharedWorker":
@@ -5717,15 +5717,15 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5717
5717
  case "setTimeout":
5718
5718
  throw new TypeError("unable to deserialize " + e);
5719
5719
  }
5720
- return new ai[e](n);
5720
+ return new si[e](n);
5721
5721
  }, Rs = (e, n) => {
5722
5722
  const t = (i, o) => (e.set(o, i), i), r = (i) => {
5723
5723
  if (e.has(i))
5724
5724
  return e.get(i);
5725
5725
  const [o, l] = n[i];
5726
5726
  switch (o) {
5727
- case It:
5728
- case ii:
5727
+ case At:
5728
+ case li:
5729
5729
  return t(l, i);
5730
5730
  case it: {
5731
5731
  const a = t([], i);
@@ -5733,38 +5733,38 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5733
5733
  a.push(r(s));
5734
5734
  return a;
5735
5735
  }
5736
- case wt: {
5736
+ case Ct: {
5737
5737
  const a = t({}, i);
5738
5738
  for (const [s, u] of l)
5739
5739
  a[r(s)] = r(u);
5740
5740
  return a;
5741
5741
  }
5742
- case hn:
5742
+ case dn:
5743
5743
  return t(new Date(l), i);
5744
- case dn: {
5744
+ case mn: {
5745
5745
  const { source: a, flags: s } = l;
5746
5746
  return t(new RegExp(a, s), i);
5747
5747
  }
5748
- case mn: {
5748
+ case gn: {
5749
5749
  const a = t(/* @__PURE__ */ new Map(), i);
5750
5750
  for (const [s, u] of l)
5751
5751
  a.set(r(s), r(u));
5752
5752
  return a;
5753
5753
  }
5754
- case gn: {
5754
+ case yn: {
5755
5755
  const a = t(/* @__PURE__ */ new Set(), i);
5756
5756
  for (const s of l)
5757
5757
  a.add(r(s));
5758
5758
  return a;
5759
5759
  }
5760
- case li: {
5760
+ case oi: {
5761
5761
  const { name: a, message: s } = l;
5762
5762
  return t(
5763
- typeof ai[a] == "function" ? Zn(a, s) : new Error(s),
5763
+ typeof si[a] == "function" ? er(a, s) : new Error(s),
5764
5764
  i
5765
5765
  );
5766
5766
  }
5767
- case oi:
5767
+ case ai:
5768
5768
  return t(BigInt(l), i);
5769
5769
  case "BigInt":
5770
5770
  return t(Object(BigInt(l)), i);
@@ -5775,32 +5775,32 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5775
5775
  return t(new DataView(a), l);
5776
5776
  }
5777
5777
  }
5778
- return t(Zn(o, l), i);
5778
+ return t(er(o, l), i);
5779
5779
  };
5780
5780
  return r;
5781
- }, er = (e) => Rs(/* @__PURE__ */ new Map(), e)(0), Le = "", { toString: Ns } = {}, { keys: Os } = Object, Ke = (e) => {
5781
+ }, tr = (e) => Rs(/* @__PURE__ */ new Map(), e)(0), Le = "", { toString: Ns } = {}, { keys: Os } = Object, Ke = (e) => {
5782
5782
  const n = typeof e;
5783
5783
  if (n !== "object" || !e)
5784
- return [It, n];
5784
+ return [At, n];
5785
5785
  const t = Ns.call(e).slice(8, -1);
5786
5786
  switch (t) {
5787
5787
  case "Array":
5788
5788
  return [it, Le];
5789
5789
  case "Object":
5790
- return [wt, Le];
5790
+ return [Ct, Le];
5791
5791
  case "Date":
5792
- return [hn, Le];
5793
- case "RegExp":
5794
5792
  return [dn, Le];
5795
- case "Map":
5793
+ case "RegExp":
5796
5794
  return [mn, Le];
5797
- case "Set":
5795
+ case "Map":
5798
5796
  return [gn, Le];
5797
+ case "Set":
5798
+ return [yn, Le];
5799
5799
  case "DataView":
5800
5800
  return [it, t];
5801
5801
  }
5802
- return t.includes("Array") ? [it, t] : e instanceof Error ? [li, e.name || "Error"] : [wt, t];
5803
- }, ht = ([e, n]) => e === It && (n === "function" || n === "symbol"), Bs = (e, n, t, r) => {
5802
+ return t.includes("Array") ? [it, t] : e instanceof Error ? [oi, e.name || "Error"] : [Ct, t];
5803
+ }, ht = ([e, n]) => e === At && (n === "function" || n === "symbol"), Bs = (e, n, t, r) => {
5804
5804
  const i = (l, a) => {
5805
5805
  const s = r.push(l) - 1;
5806
5806
  return t.set(a, s), s;
@@ -5809,11 +5809,11 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5809
5809
  return t.get(l);
5810
5810
  let [a, s] = Ke(l);
5811
5811
  switch (a) {
5812
- case It: {
5812
+ case At: {
5813
5813
  let f = l;
5814
5814
  switch (s) {
5815
5815
  case "bigint":
5816
- a = oi, f = l.toString();
5816
+ a = ai, f = l.toString();
5817
5817
  break;
5818
5818
  case "function":
5819
5819
  case "symbol":
@@ -5822,7 +5822,7 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5822
5822
  f = null;
5823
5823
  break;
5824
5824
  case "undefined":
5825
- return i([ii], l);
5825
+ return i([li], l);
5826
5826
  }
5827
5827
  return i([a, f], l);
5828
5828
  }
@@ -5836,7 +5836,7 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5836
5836
  f.push(o(h));
5837
5837
  return c;
5838
5838
  }
5839
- case wt: {
5839
+ case Ct: {
5840
5840
  if (s)
5841
5841
  switch (s) {
5842
5842
  case "BigInt":
@@ -5853,19 +5853,19 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5853
5853
  (e || !ht(Ke(l[h]))) && f.push([o(h), o(l[h])]);
5854
5854
  return c;
5855
5855
  }
5856
- case hn:
5856
+ case dn:
5857
5857
  return i([a, isNaN(l.getTime()) ? Le : l.toISOString()], l);
5858
- case dn: {
5858
+ case mn: {
5859
5859
  const { source: f, flags: c } = l;
5860
5860
  return i([a, { source: f, flags: c }], l);
5861
5861
  }
5862
- case mn: {
5862
+ case gn: {
5863
5863
  const f = [], c = i([a, f], l);
5864
5864
  for (const [h, p] of l)
5865
5865
  (e || !(ht(Ke(h)) || ht(Ke(p)))) && f.push([o(h), o(p)]);
5866
5866
  return c;
5867
5867
  }
5868
- case gn: {
5868
+ case yn: {
5869
5869
  const f = [], c = i([a, f], l);
5870
5870
  for (const h of l)
5871
5871
  (e || !ht(Ke(h))) && f.push(o(h));
@@ -5876,13 +5876,13 @@ const ii = -1, It = 0, it = 1, wt = 2, hn = 3, dn = 4, mn = 5, gn = 6, li = 7, o
5876
5876
  return i([a, { name: s, message: u }], l);
5877
5877
  };
5878
5878
  return o;
5879
- }, tr = (e, { json: n, lossy: t } = {}) => {
5879
+ }, nr = (e, { json: n, lossy: t } = {}) => {
5880
5880
  const r = [];
5881
5881
  return Bs(!(n || t), !!n, /* @__PURE__ */ new Map(), r)(e), r;
5882
- }, Ct = typeof structuredClone == "function" ? (
5882
+ }, St = typeof structuredClone == "function" ? (
5883
5883
  /* c8 ignore start */
5884
- (e, n) => n && ("json" in n || "lossy" in n) ? er(tr(e, n)) : structuredClone(e)
5885
- ) : (e, n) => er(tr(e, n));
5884
+ (e, n) => n && ("json" in n || "lossy" in n) ? tr(nr(e, n)) : structuredClone(e)
5885
+ ) : (e, n) => tr(nr(e, n));
5886
5886
  function js(e, n) {
5887
5887
  const t = [{ type: "text", value: "↩" }];
5888
5888
  return n > 1 && t.push({
@@ -5948,7 +5948,7 @@ function $s(e) {
5948
5948
  type: "element",
5949
5949
  tagName: o,
5950
5950
  properties: {
5951
- ...Ct(l),
5951
+ ...St(l),
5952
5952
  id: "footnote-label"
5953
5953
  },
5954
5954
  children: [{ type: "text", value: i }]
@@ -5966,7 +5966,7 @@ function $s(e) {
5966
5966
  ]
5967
5967
  };
5968
5968
  }
5969
- const At = (
5969
+ const _t = (
5970
5970
  // Note: overloads in JSDoc can’t yet use different `@template`s.
5971
5971
  /**
5972
5972
  * @type {(
@@ -5985,7 +5985,7 @@ const At = (
5985
5985
  if (e == null)
5986
5986
  return Ws;
5987
5987
  if (typeof e == "function")
5988
- return _t(e);
5988
+ return Tt(e);
5989
5989
  if (typeof e == "object")
5990
5990
  return Array.isArray(e) ? qs(e) : (
5991
5991
  // Cast because `ReadonlyArray` goes into the above but `isArray`
@@ -6004,8 +6004,8 @@ function qs(e) {
6004
6004
  const n = [];
6005
6005
  let t = -1;
6006
6006
  for (; ++t < e.length; )
6007
- n[t] = At(e[t]);
6008
- return _t(r);
6007
+ n[t] = _t(e[t]);
6008
+ return Tt(r);
6009
6009
  function r(...i) {
6010
6010
  let o = -1;
6011
6011
  for (; ++o < n.length; )
@@ -6018,7 +6018,7 @@ function Vs(e) {
6018
6018
  /** @type {Record<string, unknown>} */
6019
6019
  e
6020
6020
  );
6021
- return _t(t);
6021
+ return Tt(t);
6022
6022
  function t(r) {
6023
6023
  const i = (
6024
6024
  /** @type {Record<string, unknown>} */
@@ -6032,12 +6032,12 @@ function Vs(e) {
6032
6032
  }
6033
6033
  }
6034
6034
  function Us(e) {
6035
- return _t(n);
6035
+ return Tt(n);
6036
6036
  function n(t) {
6037
6037
  return t && t.type === e;
6038
6038
  }
6039
6039
  }
6040
- function _t(e) {
6040
+ function Tt(e) {
6041
6041
  return n;
6042
6042
  function n(t, r, i) {
6043
6043
  return !!(Qs(t) && e.call(
@@ -6054,11 +6054,11 @@ function Ws() {
6054
6054
  function Qs(e) {
6055
6055
  return e !== null && typeof e == "object" && "type" in e;
6056
6056
  }
6057
- const si = [], Ys = !0, Kt = !1, Xs = "skip";
6058
- function ui(e, n, t, r) {
6057
+ const ui = [], Ys = !0, Zt = !1, Xs = "skip";
6058
+ function ci(e, n, t, r) {
6059
6059
  let i;
6060
6060
  typeof n == "function" && typeof t != "function" ? (r = t, t = n) : i = n;
6061
- const o = At(i), l = r ? -1 : 1;
6061
+ const o = _t(i), l = r ? -1 : 1;
6062
6062
  a(e, void 0, [])();
6063
6063
  function a(s, u, f) {
6064
6064
  const c = (
@@ -6079,8 +6079,8 @@ function ui(e, n, t, r) {
6079
6079
  }
6080
6080
  return h;
6081
6081
  function h() {
6082
- let p = si, g, x, C;
6083
- if ((!n || o(s, u, f[f.length - 1] || void 0)) && (p = Gs(t(s, f)), p[0] === Kt))
6082
+ let p = ui, g, x, C;
6083
+ if ((!n || o(s, u, f[f.length - 1] || void 0)) && (p = Gs(t(s, f)), p[0] === Zt))
6084
6084
  return p;
6085
6085
  if ("children" in s && s.children) {
6086
6086
  const k = (
@@ -6090,7 +6090,7 @@ function ui(e, n, t, r) {
6090
6090
  if (k.children && p[0] !== Xs)
6091
6091
  for (x = (r ? k.children.length : -1) + l, C = f.concat(k); x > -1 && x < k.children.length; ) {
6092
6092
  const I = k.children[x];
6093
- if (g = a(I, x, C)(), g[0] === Kt)
6093
+ if (g = a(I, x, C)(), g[0] === Zt)
6094
6094
  return g;
6095
6095
  x = typeof g[1] == "number" ? g[1] : x + l;
6096
6096
  }
@@ -6100,17 +6100,17 @@ function ui(e, n, t, r) {
6100
6100
  }
6101
6101
  }
6102
6102
  function Gs(e) {
6103
- return Array.isArray(e) ? e : typeof e == "number" ? [Ys, e] : e == null ? si : [e];
6103
+ return Array.isArray(e) ? e : typeof e == "number" ? [Ys, e] : e == null ? ui : [e];
6104
6104
  }
6105
- function yn(e, n, t, r) {
6105
+ function kn(e, n, t, r) {
6106
6106
  let i, o, l;
6107
- typeof n == "function" && typeof t != "function" ? (o = void 0, l = n, i = t) : (o = n, l = t, i = r), ui(e, o, a, i);
6107
+ typeof n == "function" && typeof t != "function" ? (o = void 0, l = n, i = t) : (o = n, l = t, i = r), ci(e, o, a, i);
6108
6108
  function a(s, u) {
6109
6109
  const f = u[u.length - 1], c = f ? f.children.indexOf(s) : void 0;
6110
6110
  return l(s, c, f);
6111
6111
  }
6112
6112
  }
6113
- const Zt = {}.hasOwnProperty, Js = {};
6113
+ const en = {}.hasOwnProperty, Js = {};
6114
6114
  function Ks(e, n) {
6115
6115
  const t = n || Js, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), l = { ...Fs, ...t.handlers }, a = {
6116
6116
  all: u,
@@ -6125,7 +6125,7 @@ function Ks(e, n) {
6125
6125
  patch: Zs,
6126
6126
  wrap: nu
6127
6127
  };
6128
- return yn(e, function(f) {
6128
+ return kn(e, function(f) {
6129
6129
  if (f.type === "definition" || f.type === "footnoteDefinition") {
6130
6130
  const c = f.type === "definition" ? r : i, h = String(f.identifier).toUpperCase();
6131
6131
  c.has(h) || c.set(h, f);
@@ -6133,14 +6133,14 @@ function Ks(e, n) {
6133
6133
  }), a;
6134
6134
  function s(f, c) {
6135
6135
  const h = f.type, p = a.handlers[h];
6136
- if (Zt.call(a.handlers, h) && p)
6136
+ if (en.call(a.handlers, h) && p)
6137
6137
  return p(a, f, c);
6138
6138
  if (a.options.passThrough && a.options.passThrough.includes(h)) {
6139
6139
  if ("children" in f) {
6140
- const { children: x, ...C } = f, k = Ct(C);
6140
+ const { children: x, ...C } = f, k = St(C);
6141
6141
  return k.children = a.all(f), k;
6142
6142
  }
6143
- return Ct(f);
6143
+ return St(f);
6144
6144
  }
6145
6145
  return (a.options.unknownHandler || tu)(a, f, c);
6146
6146
  }
@@ -6152,9 +6152,9 @@ function Ks(e, n) {
6152
6152
  for (; ++p < h.length; ) {
6153
6153
  const g = a.one(h[p], f);
6154
6154
  if (g) {
6155
- if (p && h[p - 1].type === "break" && (!Array.isArray(g) && g.type === "text" && (g.value = nr(g.value)), !Array.isArray(g) && g.type === "element")) {
6155
+ if (p && h[p - 1].type === "break" && (!Array.isArray(g) && g.type === "text" && (g.value = rr(g.value)), !Array.isArray(g) && g.type === "element")) {
6156
6156
  const x = g.children[0];
6157
- x && x.type === "text" && (x.value = nr(x.value));
6157
+ x && x.type === "text" && (x.value = rr(x.value));
6158
6158
  }
6159
6159
  Array.isArray(g) ? c.push(...g) : c.push(g);
6160
6160
  }
@@ -6177,12 +6177,12 @@ function eu(e, n) {
6177
6177
  const l = "children" in t ? t.children : [t];
6178
6178
  t = { type: "element", tagName: r, properties: {}, children: l };
6179
6179
  }
6180
- t.type === "element" && o && Object.assign(t.properties, Ct(o)), "children" in t && t.children && i !== null && i !== void 0 && (t.children = i);
6180
+ t.type === "element" && o && Object.assign(t.properties, St(o)), "children" in t && t.children && i !== null && i !== void 0 && (t.children = i);
6181
6181
  }
6182
6182
  return t;
6183
6183
  }
6184
6184
  function tu(e, n) {
6185
- const t = n.data || {}, r = "value" in n && !(Zt.call(t, "hProperties") || Zt.call(t, "hChildren")) ? { type: "text", value: n.value } : {
6185
+ const t = n.data || {}, r = "value" in n && !(en.call(t, "hProperties") || en.call(t, "hChildren")) ? { type: "text", value: n.value } : {
6186
6186
  type: "element",
6187
6187
  tagName: "div",
6188
6188
  properties: {},
@@ -6200,13 +6200,13 @@ function nu(e, n) {
6200
6200
  return n && e.length > 0 && t.push({ type: "text", value: `
6201
6201
  ` }), t;
6202
6202
  }
6203
- function nr(e) {
6203
+ function rr(e) {
6204
6204
  let n = 0, t = e.charCodeAt(n);
6205
6205
  for (; t === 9 || t === 32; )
6206
6206
  n++, t = e.charCodeAt(n);
6207
6207
  return e.slice(n);
6208
6208
  }
6209
- function rr(e, n) {
6209
+ function ir(e, n) {
6210
6210
  const t = Ks(e, n), r = t.one(e, void 0), i = $s(t), o = Array.isArray(r) ? { type: "root", children: r } : r || { type: "root", children: [] };
6211
6211
  return i && o.children.push({ type: "text", value: `
6212
6212
  ` }, i), o;
@@ -6215,24 +6215,24 @@ function ru(e, n) {
6215
6215
  return e && "run" in e ? async function(t, r) {
6216
6216
  const i = (
6217
6217
  /** @type {HastRoot} */
6218
- rr(t, { file: r, ...n })
6218
+ ir(t, { file: r, ...n })
6219
6219
  );
6220
6220
  await e.run(i, r);
6221
6221
  } : function(t, r) {
6222
6222
  return (
6223
6223
  /** @type {HastRoot} */
6224
- rr(t, { file: r, ...e || n })
6224
+ ir(t, { file: r, ...e || n })
6225
6225
  );
6226
6226
  };
6227
6227
  }
6228
- function ir(e) {
6228
+ function lr(e) {
6229
6229
  if (e)
6230
6230
  throw e;
6231
6231
  }
6232
- var Mt, lr;
6232
+ var Ft, or;
6233
6233
  function iu() {
6234
- if (lr) return Mt;
6235
- lr = 1;
6234
+ if (or) return Ft;
6235
+ or = 1;
6236
6236
  var e = Object.prototype.hasOwnProperty, n = Object.prototype.toString, t = Object.defineProperty, r = Object.getOwnPropertyDescriptor, i = function(u) {
6237
6237
  return typeof Array.isArray == "function" ? Array.isArray(u) : n.call(u) === "[object Array]";
6238
6238
  }, o = function(u) {
@@ -6260,18 +6260,18 @@ function iu() {
6260
6260
  } else return;
6261
6261
  return u[f];
6262
6262
  };
6263
- return Mt = function s() {
6263
+ return Ft = function s() {
6264
6264
  var u, f, c, h, p, g, x = arguments[0], C = 1, k = arguments.length, I = !1;
6265
6265
  for (typeof x == "boolean" && (I = x, x = arguments[1] || {}, C = 2), (x == null || typeof x != "object" && typeof x != "function") && (x = {}); C < k; ++C)
6266
6266
  if (u = arguments[C], u != null)
6267
6267
  for (f in u)
6268
6268
  c = a(x, f), h = a(u, f), x !== h && (I && h && (o(h) || (p = i(h))) ? (p ? (p = !1, g = c && i(c) ? c : []) : g = c && o(c) ? c : {}, l(x, { name: f, newValue: s(I, g, h) })) : typeof h < "u" && l(x, { name: f, newValue: h }));
6269
6269
  return x;
6270
- }, Mt;
6270
+ }, Ft;
6271
6271
  }
6272
6272
  var lu = iu();
6273
- const Ft = /* @__PURE__ */ Fr(lu);
6274
- function en(e) {
6273
+ const Rt = /* @__PURE__ */ Rr(lu);
6274
+ function tn(e) {
6275
6275
  if (typeof e != "object" || e === null)
6276
6276
  return !1;
6277
6277
  const n = Object.getPrototypeOf(e);
@@ -6446,14 +6446,14 @@ const du = { cwd: mu };
6446
6446
  function mu() {
6447
6447
  return "/";
6448
6448
  }
6449
- function tn(e) {
6449
+ function nn(e) {
6450
6450
  return !!(e !== null && typeof e == "object" && "href" in e && e.href && "protocol" in e && e.protocol && // @ts-expect-error: indexing is fine.
6451
6451
  e.auth === void 0);
6452
6452
  }
6453
6453
  function gu(e) {
6454
6454
  if (typeof e == "string")
6455
6455
  e = new URL(e);
6456
- else if (!tn(e)) {
6456
+ else if (!nn(e)) {
6457
6457
  const n = new TypeError(
6458
6458
  'The "path" argument must be of type string or an instance of URL. Received `' + e + "`"
6459
6459
  );
@@ -6486,7 +6486,7 @@ function yu(e) {
6486
6486
  }
6487
6487
  return decodeURIComponent(n);
6488
6488
  }
6489
- const Rt = (
6489
+ const Nt = (
6490
6490
  /** @type {const} */
6491
6491
  [
6492
6492
  "history",
@@ -6497,7 +6497,7 @@ const Rt = (
6497
6497
  "dirname"
6498
6498
  ]
6499
6499
  );
6500
- class ci {
6500
+ class fi {
6501
6501
  /**
6502
6502
  * Create a new virtual file.
6503
6503
  *
@@ -6522,15 +6522,15 @@ class ci {
6522
6522
  */
6523
6523
  constructor(n) {
6524
6524
  let t;
6525
- n ? tn(n) ? t = { path: n } : typeof n == "string" || ku(n) ? t = { value: n } : t = n : t = {}, this.cwd = "cwd" in t ? "" : du.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
6525
+ n ? nn(n) ? t = { path: n } : typeof n == "string" || ku(n) ? t = { value: n } : t = n : t = {}, this.cwd = "cwd" in t ? "" : du.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
6526
6526
  let r = -1;
6527
- for (; ++r < Rt.length; ) {
6528
- const o = Rt[r];
6527
+ for (; ++r < Nt.length; ) {
6528
+ const o = Nt[r];
6529
6529
  o in t && t[o] !== void 0 && t[o] !== null && (this[o] = o === "history" ? [...t[o]] : t[o]);
6530
6530
  }
6531
6531
  let i;
6532
6532
  for (i in t)
6533
- Rt.includes(i) || (this[i] = t[i]);
6533
+ Nt.includes(i) || (this[i] = t[i]);
6534
6534
  }
6535
6535
  /**
6536
6536
  * Get the basename (including extname) (example: `'index.min.js'`).
@@ -6554,7 +6554,7 @@ class ci {
6554
6554
  * Nothing.
6555
6555
  */
6556
6556
  set basename(n) {
6557
- Ot(n, "basename"), Nt(n, "basename"), this.path = me.join(this.dirname || "", n);
6557
+ Bt(n, "basename"), Ot(n, "basename"), this.path = me.join(this.dirname || "", n);
6558
6558
  }
6559
6559
  /**
6560
6560
  * Get the parent path (example: `'~'`).
@@ -6576,7 +6576,7 @@ class ci {
6576
6576
  * Nothing.
6577
6577
  */
6578
6578
  set dirname(n) {
6579
- or(this.basename, "dirname"), this.path = me.join(n || "", this.basename);
6579
+ ar(this.basename, "dirname"), this.path = me.join(n || "", this.basename);
6580
6580
  }
6581
6581
  /**
6582
6582
  * Get the extname (including dot) (example: `'.js'`).
@@ -6600,7 +6600,7 @@ class ci {
6600
6600
  * Nothing.
6601
6601
  */
6602
6602
  set extname(n) {
6603
- if (Nt(n, "extname"), or(this.dirname, "extname"), n) {
6603
+ if (Ot(n, "extname"), ar(this.dirname, "extname"), n) {
6604
6604
  if (n.codePointAt(0) !== 46)
6605
6605
  throw new Error("`extname` must start with `.`");
6606
6606
  if (n.includes(".", 1))
@@ -6630,7 +6630,7 @@ class ci {
6630
6630
  * Nothing.
6631
6631
  */
6632
6632
  set path(n) {
6633
- tn(n) && (n = gu(n)), Ot(n, "path"), this.path !== n && this.history.push(n);
6633
+ nn(n) && (n = gu(n)), Bt(n, "path"), this.path !== n && this.history.push(n);
6634
6634
  }
6635
6635
  /**
6636
6636
  * Get the stem (basename w/o extname) (example: `'index.min'`).
@@ -6654,7 +6654,7 @@ class ci {
6654
6654
  * Nothing.
6655
6655
  */
6656
6656
  set stem(n) {
6657
- Ot(n, "stem"), Nt(n, "stem"), this.path = me.join(this.dirname || "", n + (this.extname || ""));
6657
+ Bt(n, "stem"), Ot(n, "stem"), this.path = me.join(this.dirname || "", n + (this.extname || ""));
6658
6658
  }
6659
6659
  // Normal prototypal methods.
6660
6660
  /**
@@ -6867,17 +6867,17 @@ class ci {
6867
6867
  return this.value === void 0 ? "" : typeof this.value == "string" ? this.value : new TextDecoder(n || void 0).decode(this.value);
6868
6868
  }
6869
6869
  }
6870
- function Nt(e, n) {
6870
+ function Ot(e, n) {
6871
6871
  if (e && e.includes(me.sep))
6872
6872
  throw new Error(
6873
6873
  "`" + n + "` cannot be a path: did not expect `" + me.sep + "`"
6874
6874
  );
6875
6875
  }
6876
- function Ot(e, n) {
6876
+ function Bt(e, n) {
6877
6877
  if (!e)
6878
6878
  throw new Error("`" + n + "` cannot be empty");
6879
6879
  }
6880
- function or(e, n) {
6880
+ function ar(e, n) {
6881
6881
  if (!e)
6882
6882
  throw new Error("Setting `" + n + "` requires `path` to be set too");
6883
6883
  }
@@ -6906,7 +6906,7 @@ const xu = (
6906
6906
  return Object.setPrototypeOf(o, r), o;
6907
6907
  })
6908
6908
  ), bu = {}.hasOwnProperty;
6909
- class kn extends xu {
6909
+ class xn extends xu {
6910
6910
  /**
6911
6911
  * Create a processor.
6912
6912
  */
@@ -6927,14 +6927,14 @@ class kn extends xu {
6927
6927
  copy() {
6928
6928
  const n = (
6929
6929
  /** @type {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>} */
6930
- new kn()
6930
+ new xn()
6931
6931
  );
6932
6932
  let t = -1;
6933
6933
  for (; ++t < this.attachers.length; ) {
6934
6934
  const r = this.attachers[t];
6935
6935
  n.use(...r);
6936
6936
  }
6937
- return n.data(Ft(!0, {}, this.namespace)), n;
6937
+ return n.data(Rt(!0, {}, this.namespace)), n;
6938
6938
  }
6939
6939
  /**
6940
6940
  * Configure the processor with info available to all plugins.
@@ -6996,7 +6996,7 @@ class kn extends xu {
6996
6996
  * the entire dataset when getting without key.
6997
6997
  */
6998
6998
  data(n, t) {
6999
- return typeof n == "string" ? arguments.length === 2 ? (Ht("data", this.frozen), this.namespace[n] = t, this) : bu.call(this.namespace, n) && this.namespace[n] || void 0 : n ? (Ht("data", this.frozen), this.namespace = n, this) : this.namespace;
6999
+ return typeof n == "string" ? arguments.length === 2 ? ($t("data", this.frozen), this.namespace[n] = t, this) : bu.call(this.namespace, n) && this.namespace[n] || void 0 : n ? ($t("data", this.frozen), this.namespace = n, this) : this.namespace;
7000
7000
  }
7001
7001
  /**
7002
7002
  * Freeze a processor.
@@ -7050,7 +7050,7 @@ class kn extends xu {
7050
7050
  parse(n) {
7051
7051
  this.freeze();
7052
7052
  const t = dt(n), r = this.parser || this.Parser;
7053
- return Bt("parse", r), r(String(t), t);
7053
+ return jt("parse", r), r(String(t), t);
7054
7054
  }
7055
7055
  /**
7056
7056
  * Process the given file as configured on the processor.
@@ -7096,7 +7096,7 @@ class kn extends xu {
7096
7096
  */
7097
7097
  process(n, t) {
7098
7098
  const r = this;
7099
- return this.freeze(), Bt("process", this.parser || this.Parser), jt("process", this.compiler || this.Compiler), t ? i(void 0, t) : new Promise(i);
7099
+ return this.freeze(), jt("process", this.parser || this.Parser), Ht("process", this.compiler || this.Compiler), t ? i(void 0, t) : new Promise(i);
7100
7100
  function i(o, l) {
7101
7101
  const a = dt(n), s = (
7102
7102
  /** @type {HeadTree extends undefined ? Node : HeadTree} */
@@ -7155,9 +7155,9 @@ class kn extends xu {
7155
7155
  */
7156
7156
  processSync(n) {
7157
7157
  let t = !1, r;
7158
- return this.freeze(), Bt("processSync", this.parser || this.Parser), jt("processSync", this.compiler || this.Compiler), this.process(n, i), sr("processSync", "process", t), r;
7158
+ return this.freeze(), jt("processSync", this.parser || this.Parser), Ht("processSync", this.compiler || this.Compiler), this.process(n, i), ur("processSync", "process", t), r;
7159
7159
  function i(o, l) {
7160
- t = !0, ir(o), r = l;
7160
+ t = !0, lr(o), r = l;
7161
7161
  }
7162
7162
  }
7163
7163
  /**
@@ -7199,7 +7199,7 @@ class kn extends xu {
7199
7199
  * transformed tree.
7200
7200
  */
7201
7201
  run(n, t, r) {
7202
- ar(n), this.freeze();
7202
+ sr(n), this.freeze();
7203
7203
  const i = this.transformers;
7204
7204
  return !r && typeof t == "function" && (r = t, t = void 0), r ? o(void 0, r) : new Promise(o);
7205
7205
  function o(l, a) {
@@ -7233,9 +7233,9 @@ class kn extends xu {
7233
7233
  */
7234
7234
  runSync(n, t) {
7235
7235
  let r = !1, i;
7236
- return this.run(n, t, o), sr("runSync", "run", r), i;
7236
+ return this.run(n, t, o), ur("runSync", "run", r), i;
7237
7237
  function o(l, a) {
7238
- ir(l), i = a, r = !0;
7238
+ lr(l), i = a, r = !0;
7239
7239
  }
7240
7240
  }
7241
7241
  /**
@@ -7270,7 +7270,7 @@ class kn extends xu {
7270
7270
  stringify(n, t) {
7271
7271
  this.freeze();
7272
7272
  const r = dt(t), i = this.compiler || this.Compiler;
7273
- return jt("stringify", i), ar(n), i(n, r);
7273
+ return Ht("stringify", i), sr(n), i(n, r);
7274
7274
  }
7275
7275
  /**
7276
7276
  * Configure the processor to use a plugin, a list of usable values, or a
@@ -7331,7 +7331,7 @@ class kn extends xu {
7331
7331
  */
7332
7332
  use(n, ...t) {
7333
7333
  const r = this.attachers, i = this.namespace;
7334
- if (Ht("use", this.frozen), n != null) if (typeof n == "function")
7334
+ if ($t("use", this.frozen), n != null) if (typeof n == "function")
7335
7335
  s(n, t);
7336
7336
  else if (typeof n == "object")
7337
7337
  Array.isArray(n) ? a(n) : l(n);
@@ -7358,7 +7358,7 @@ class kn extends xu {
7358
7358
  throw new Error(
7359
7359
  "Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither"
7360
7360
  );
7361
- a(u.plugins), u.settings && (i.settings = Ft(!0, i.settings, u.settings));
7361
+ a(u.plugins), u.settings && (i.settings = Rt(!0, i.settings, u.settings));
7362
7362
  }
7363
7363
  function a(u) {
7364
7364
  let f = -1;
@@ -7382,38 +7382,38 @@ class kn extends xu {
7382
7382
  else if (f.length > 0) {
7383
7383
  let [p, ...g] = f;
7384
7384
  const x = r[h][1];
7385
- en(x) && en(p) && (p = Ft(!0, x, p)), r[h] = [u, p, ...g];
7385
+ tn(x) && tn(p) && (p = Rt(!0, x, p)), r[h] = [u, p, ...g];
7386
7386
  }
7387
7387
  }
7388
7388
  }
7389
7389
  }
7390
- const wu = new kn().freeze();
7391
- function Bt(e, n) {
7390
+ const wu = new xn().freeze();
7391
+ function jt(e, n) {
7392
7392
  if (typeof n != "function")
7393
7393
  throw new TypeError("Cannot `" + e + "` without `parser`");
7394
7394
  }
7395
- function jt(e, n) {
7395
+ function Ht(e, n) {
7396
7396
  if (typeof n != "function")
7397
7397
  throw new TypeError("Cannot `" + e + "` without `compiler`");
7398
7398
  }
7399
- function Ht(e, n) {
7399
+ function $t(e, n) {
7400
7400
  if (n)
7401
7401
  throw new Error(
7402
7402
  "Cannot call `" + e + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
7403
7403
  );
7404
7404
  }
7405
- function ar(e) {
7406
- if (!en(e) || typeof e.type != "string")
7405
+ function sr(e) {
7406
+ if (!tn(e) || typeof e.type != "string")
7407
7407
  throw new TypeError("Expected node, got `" + e + "`");
7408
7408
  }
7409
- function sr(e, n, t) {
7409
+ function ur(e, n, t) {
7410
7410
  if (!t)
7411
7411
  throw new Error(
7412
7412
  "`" + e + "` finished async. Use `" + n + "` instead"
7413
7413
  );
7414
7414
  }
7415
7415
  function dt(e) {
7416
- return Cu(e) ? e : new ci(e);
7416
+ return Cu(e) ? e : new fi(e);
7417
7417
  }
7418
7418
  function Cu(e) {
7419
7419
  return !!(e && typeof e == "object" && "message" in e && "messages" in e);
@@ -7424,7 +7424,7 @@ function Su(e) {
7424
7424
  function vu(e) {
7425
7425
  return !!(e && typeof e == "object" && "byteLength" in e && "byteOffset" in e);
7426
7426
  }
7427
- const Eu = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", ur = [], cr = { allowDangerousHtml: !0 }, Iu = /^(https?|ircs?|mailto|xmpp)$/i, Au = [
7427
+ const Eu = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", cr = [], fr = { allowDangerousHtml: !0 }, Iu = /^(https?|ircs?|mailto|xmpp)$/i, Au = [
7428
7428
  { from: "astPlugins", id: "remove-buggy-html-in-markdown-parser" },
7429
7429
  { from: "allowDangerousHtml", id: "remove-buggy-html-in-markdown-parser" },
7430
7430
  {
@@ -7463,19 +7463,19 @@ function _u(e) {
7463
7463
  return zu(n.runSync(n.parse(t), t), e);
7464
7464
  }
7465
7465
  function Tu(e) {
7466
- const n = e.rehypePlugins || ur, t = e.remarkPlugins || ur, r = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...cr } : cr;
7466
+ const n = e.rehypePlugins || cr, t = e.remarkPlugins || cr, r = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...fr } : fr;
7467
7467
  return wu().use(us).use(t).use(ru, r).use(n);
7468
7468
  }
7469
7469
  function Pu(e) {
7470
- const n = e.children || "", t = new ci();
7470
+ const n = e.children || "", t = new fi();
7471
7471
  return typeof n == "string" && (t.value = n), t;
7472
7472
  }
7473
7473
  function zu(e, n) {
7474
7474
  const t = n.allowedElements, r = n.allowElement, i = n.components, o = n.disallowedElements, l = n.skipHtml, a = n.unwrapDisallowed, s = n.urlTransform || Lu;
7475
7475
  for (const f of Au)
7476
7476
  Object.hasOwn(n, f.from) && ("" + f.from + (f.to ? "use `" + f.to + "` instead" : "remove it") + Eu + f.id, void 0);
7477
- return yn(e, u), Ul(e, {
7478
- Fragment: Cr,
7477
+ return kn(e, u), Ul(e, {
7478
+ Fragment: Sr,
7479
7479
  components: i,
7480
7480
  ignoreInvalidStyle: !0,
7481
7481
  jsx: S,
@@ -7488,9 +7488,9 @@ function zu(e, n) {
7488
7488
  return l ? h.children.splice(c, 1) : h.children[c] = { type: "text", value: f.value }, c;
7489
7489
  if (f.type === "element") {
7490
7490
  let p;
7491
- for (p in zt)
7492
- if (Object.hasOwn(zt, p) && Object.hasOwn(f.properties, p)) {
7493
- const g = f.properties[p], x = zt[p];
7491
+ for (p in Lt)
7492
+ if (Object.hasOwn(Lt, p) && Object.hasOwn(f.properties, p)) {
7493
+ const g = f.properties[p], x = Lt[p];
7494
7494
  (x === null || x.includes(f.tagName)) && (f.properties[p] = s(String(g || ""), p, f));
7495
7495
  }
7496
7496
  }
@@ -7510,7 +7510,7 @@ function Lu(e) {
7510
7510
  Iu.test(e.slice(0, n)) ? e : ""
7511
7511
  );
7512
7512
  }
7513
- function fr(e, n) {
7513
+ function pr(e, n) {
7514
7514
  const t = String(e);
7515
7515
  if (typeof n != "string")
7516
7516
  throw new TypeError("Expected character");
@@ -7525,10 +7525,10 @@ function Du(e) {
7525
7525
  return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
7526
7526
  }
7527
7527
  function Mu(e, n, t) {
7528
- const i = At((t || {}).ignore || []), o = Fu(n);
7528
+ const i = _t((t || {}).ignore || []), o = Fu(n);
7529
7529
  let l = -1;
7530
7530
  for (; ++l < o.length; )
7531
- ui(e, "text", a);
7531
+ ci(e, "text", a);
7532
7532
  function a(u, f) {
7533
7533
  let c = -1, h;
7534
7534
  for (; ++c < f.length; ) {
@@ -7588,15 +7588,15 @@ function Nu(e) {
7588
7588
  return e;
7589
7589
  };
7590
7590
  }
7591
- const $t = "phrasing", qt = ["autolink", "link", "image", "label"];
7591
+ const qt = "phrasing", Vt = ["autolink", "link", "image", "label"];
7592
7592
  function Ou() {
7593
7593
  return {
7594
7594
  transforms: [Uu],
7595
7595
  enter: {
7596
7596
  literalAutolink: ju,
7597
- literalAutolinkEmail: Vt,
7598
- literalAutolinkHttp: Vt,
7599
- literalAutolinkWww: Vt
7597
+ literalAutolinkEmail: Ut,
7598
+ literalAutolinkHttp: Ut,
7599
+ literalAutolinkWww: Ut
7600
7600
  },
7601
7601
  exit: {
7602
7602
  literalAutolink: Vu,
@@ -7613,22 +7613,22 @@ function Bu() {
7613
7613
  character: "@",
7614
7614
  before: "[+\\-.\\w]",
7615
7615
  after: "[\\-.\\w]",
7616
- inConstruct: $t,
7617
- notInConstruct: qt
7616
+ inConstruct: qt,
7617
+ notInConstruct: Vt
7618
7618
  },
7619
7619
  {
7620
7620
  character: ".",
7621
7621
  before: "[Ww]",
7622
7622
  after: "[\\-.\\w]",
7623
- inConstruct: $t,
7624
- notInConstruct: qt
7623
+ inConstruct: qt,
7624
+ notInConstruct: Vt
7625
7625
  },
7626
7626
  {
7627
7627
  character: ":",
7628
7628
  before: "[ps]",
7629
7629
  after: "\\/",
7630
- inConstruct: $t,
7631
- notInConstruct: qt
7630
+ inConstruct: qt,
7631
+ notInConstruct: Vt
7632
7632
  }
7633
7633
  ]
7634
7634
  };
@@ -7636,7 +7636,7 @@ function Bu() {
7636
7636
  function ju(e) {
7637
7637
  this.enter({ type: "link", title: null, url: "", children: [] }, e);
7638
7638
  }
7639
- function Vt(e) {
7639
+ function Ut(e) {
7640
7640
  this.config.enter.autolinkProtocol.call(this, e);
7641
7641
  }
7642
7642
  function Hu(e) {
@@ -7665,7 +7665,7 @@ function Uu(e) {
7665
7665
  }
7666
7666
  function Wu(e, n, t, r, i) {
7667
7667
  let o = "";
7668
- if (!fi(i) || (/^w/i.test(n) && (t = n + t, n = "", o = "http://"), !Yu(t)))
7668
+ if (!pi(i) || (/^w/i.test(n) && (t = n + t, n = "", o = "http://"), !Yu(t)))
7669
7669
  return !1;
7670
7670
  const l = Xu(t + r);
7671
7671
  if (!l[0]) return !1;
@@ -7680,7 +7680,7 @@ function Wu(e, n, t, r, i) {
7680
7680
  function Qu(e, n, t, r) {
7681
7681
  return (
7682
7682
  // Not an expected previous character.
7683
- !fi(r, !0) || // Label ends in not allowed character.
7683
+ !pi(r, !0) || // Label ends in not allowed character.
7684
7684
  /[-\d_]$/.test(t) ? !1 : {
7685
7685
  type: "link",
7686
7686
  title: null,
@@ -7699,18 +7699,18 @@ function Xu(e) {
7699
7699
  return [e, void 0];
7700
7700
  e = e.slice(0, n.index);
7701
7701
  let t = n[0], r = t.indexOf(")");
7702
- const i = fr(e, "(");
7703
- let o = fr(e, ")");
7702
+ const i = pr(e, "(");
7703
+ let o = pr(e, ")");
7704
7704
  for (; r !== -1 && i > o; )
7705
7705
  e += t.slice(0, r + 1), t = t.slice(r + 1), r = t.indexOf(")"), o++;
7706
7706
  return [e, t];
7707
7707
  }
7708
- function fi(e, n) {
7708
+ function pi(e, n) {
7709
7709
  const t = e.input.charCodeAt(e.index - 1);
7710
- return (e.index === 0 || Fe(t) || vt(t)) && // If it’s an email, the previous character should not be a slash.
7710
+ return (e.index === 0 || Fe(t) || Et(t)) && // If it’s an email, the previous character should not be a slash.
7711
7711
  (!n || t !== 47);
7712
7712
  }
7713
- pi.peek = ic;
7713
+ hi.peek = ic;
7714
7714
  function Gu() {
7715
7715
  this.buffer();
7716
7716
  }
@@ -7747,7 +7747,7 @@ function rc(e) {
7747
7747
  function ic() {
7748
7748
  return "[";
7749
7749
  }
7750
- function pi(e, n, t, r) {
7750
+ function hi(e, n, t, r) {
7751
7751
  const i = t.createTracker(r);
7752
7752
  let o = i.move("[^");
7753
7753
  const l = t.enter("footnoteReference"), a = t.enter("reference");
@@ -7774,7 +7774,7 @@ function lc() {
7774
7774
  function oc(e) {
7775
7775
  let n = !1;
7776
7776
  return e && e.firstLineBlank && (n = !0), {
7777
- handlers: { footnoteDefinition: t, footnoteReference: pi },
7777
+ handlers: { footnoteDefinition: t, footnoteReference: hi },
7778
7778
  // This is on by default already.
7779
7779
  unsafe: [{ character: "[", inConstruct: ["label", "phrasing", "reference"] }]
7780
7780
  };
@@ -7788,15 +7788,15 @@ function oc(e) {
7788
7788
  (n ? `
7789
7789
  ` : " ") + o.indentLines(
7790
7790
  o.containerFlow(r, a.current()),
7791
- n ? hi : ac
7791
+ n ? di : ac
7792
7792
  )
7793
7793
  )), u(), s;
7794
7794
  }
7795
7795
  }
7796
7796
  function ac(e, n, t) {
7797
- return n === 0 ? e : hi(e, n, t);
7797
+ return n === 0 ? e : di(e, n, t);
7798
7798
  }
7799
- function hi(e, n, t) {
7799
+ function di(e, n, t) {
7800
7800
  return (t ? "" : " ") + e;
7801
7801
  }
7802
7802
  const sc = [
@@ -7807,7 +7807,7 @@ const sc = [
7807
7807
  "titleQuote",
7808
7808
  "titleApostrophe"
7809
7809
  ];
7810
- di.peek = hc;
7810
+ mi.peek = hc;
7811
7811
  function uc() {
7812
7812
  return {
7813
7813
  canContainEols: ["delete"],
@@ -7824,7 +7824,7 @@ function cc() {
7824
7824
  notInConstruct: sc
7825
7825
  }
7826
7826
  ],
7827
- handlers: { delete: di }
7827
+ handlers: { delete: mi }
7828
7828
  };
7829
7829
  }
7830
7830
  function fc(e) {
@@ -7833,7 +7833,7 @@ function fc(e) {
7833
7833
  function pc(e) {
7834
7834
  this.exit(e);
7835
7835
  }
7836
- function di(e, n, t, r) {
7836
+ function mi(e, n, t, r) {
7837
7837
  const i = t.createTracker(r), o = t.enter("strikethrough");
7838
7838
  let l = i.move("~~");
7839
7839
  return l += t.containerPhrasing(e, {
@@ -7867,9 +7867,9 @@ function mc(e, n) {
7867
7867
  let c = -1;
7868
7868
  if (typeof r == "object" && "length" in r)
7869
7869
  for (; ++c < u; )
7870
- o[c] = pr(r[c]);
7870
+ o[c] = hr(r[c]);
7871
7871
  else {
7872
- const x = pr(r);
7872
+ const x = hr(r);
7873
7873
  for (; ++c < u; )
7874
7874
  o[c] = x;
7875
7875
  }
@@ -7913,7 +7913,7 @@ function mc(e, n) {
7913
7913
  function gc(e) {
7914
7914
  return e == null ? "" : String(e);
7915
7915
  }
7916
- function pr(e) {
7916
+ function hr(e) {
7917
7917
  const n = typeof e == "string" ? e.codePointAt(0) : 0;
7918
7918
  return n === 67 || n === 99 ? 99 : n === 76 || n === 108 ? 108 : n === 82 || n === 114 ? 114 : 0;
7919
7919
  }
@@ -7930,9 +7930,9 @@ function kc(e, n, t) {
7930
7930
  return ">" + (t ? "" : " ") + e;
7931
7931
  }
7932
7932
  function xc(e, n) {
7933
- return hr(e, n.inConstruct, !0) && !hr(e, n.notInConstruct, !1);
7933
+ return dr(e, n.inConstruct, !0) && !dr(e, n.notInConstruct, !1);
7934
7934
  }
7935
- function hr(e, n, t) {
7935
+ function dr(e, n, t) {
7936
7936
  if (typeof n == "string" && (n = [n]), !n || n.length === 0)
7937
7937
  return t;
7938
7938
  let r = -1;
@@ -7941,7 +7941,7 @@ function hr(e, n, t) {
7941
7941
  return !0;
7942
7942
  return !1;
7943
7943
  }
7944
- function dr(e, n, t, r) {
7944
+ function mr(e, n, t, r) {
7945
7945
  let i = -1;
7946
7946
  for (; ++i < t.unsafe.length; )
7947
7947
  if (t.unsafe[i].character === `
@@ -8011,7 +8011,7 @@ function Sc(e, n, t, r) {
8011
8011
  function vc(e, n, t) {
8012
8012
  return (t ? "" : " ") + e;
8013
8013
  }
8014
- function xn(e) {
8014
+ function bn(e) {
8015
8015
  const n = e.options.quote || '"';
8016
8016
  if (n !== '"' && n !== "'")
8017
8017
  throw new Error(
@@ -8020,7 +8020,7 @@ function xn(e) {
8020
8020
  return n;
8021
8021
  }
8022
8022
  function Ec(e, n, t, r) {
8023
- const i = xn(t), o = i === '"' ? "Quote" : "Apostrophe", l = t.enter("definition");
8023
+ const i = bn(t), o = i === '"' ? "Quote" : "Apostrophe", l = t.enter("definition");
8024
8024
  let a = t.enter("label");
8025
8025
  const s = t.createTracker(r);
8026
8026
  let u = s.move("[");
@@ -8060,7 +8060,7 @@ function Ic(e) {
8060
8060
  function ot(e) {
8061
8061
  return "&#x" + e.toString(16).toUpperCase() + ";";
8062
8062
  }
8063
- function St(e, n, t) {
8063
+ function vt(e, n, t) {
8064
8064
  const r = qe(e), i = qe(n);
8065
8065
  return r === void 0 ? i === void 0 ? (
8066
8066
  // Letter inside:
@@ -8093,8 +8093,8 @@ function St(e, n, t) {
8093
8093
  { inside: !1, outside: !1 }
8094
8094
  );
8095
8095
  }
8096
- mi.peek = Ac;
8097
- function mi(e, n, t, r) {
8096
+ gi.peek = Ac;
8097
+ function gi(e, n, t, r) {
8098
8098
  const i = Ic(t), o = t.enter("emphasis"), l = t.createTracker(r), a = l.move(i);
8099
8099
  let s = l.move(
8100
8100
  t.containerPhrasing(e, {
@@ -8103,13 +8103,13 @@ function mi(e, n, t, r) {
8103
8103
  ...l.current()
8104
8104
  })
8105
8105
  );
8106
- const u = s.charCodeAt(0), f = St(
8106
+ const u = s.charCodeAt(0), f = vt(
8107
8107
  r.before.charCodeAt(r.before.length - 1),
8108
8108
  u,
8109
8109
  i
8110
8110
  );
8111
8111
  f.inside && (s = ot(u) + s.slice(1));
8112
- const c = s.charCodeAt(s.length - 1), h = St(r.after.charCodeAt(0), c, i);
8112
+ const c = s.charCodeAt(s.length - 1), h = vt(r.after.charCodeAt(0), c, i);
8113
8113
  h.inside && (s = s.slice(0, -1) + ot(c));
8114
8114
  const p = l.move(i);
8115
8115
  return o(), t.attentionEncodeSurroundingInfo = {
@@ -8122,10 +8122,10 @@ function Ac(e, n, t) {
8122
8122
  }
8123
8123
  function _c(e, n) {
8124
8124
  let t = !1;
8125
- return yn(e, function(r) {
8125
+ return kn(e, function(r) {
8126
8126
  if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
8127
- return t = !0, Kt;
8128
- }), !!((!e.depth || e.depth < 3) && cn(e) && (n.options.setext || t));
8127
+ return t = !0, Zt;
8128
+ }), !!((!e.depth || e.depth < 3) && fn(e) && (n.options.setext || t));
8129
8129
  }
8130
8130
  function Tc(e, n, t, r) {
8131
8131
  const i = Math.max(Math.min(6, e.depth || 1), 1), o = t.createTracker(r);
@@ -8156,16 +8156,16 @@ function Tc(e, n, t, r) {
8156
8156
  });
8157
8157
  return /^[\t ]/.test(u) && (u = ot(u.charCodeAt(0)) + u.slice(1)), u = u ? l + " " + u : l, t.options.closeAtx && (u += " " + l), s(), a(), u;
8158
8158
  }
8159
- gi.peek = Pc;
8160
- function gi(e) {
8159
+ yi.peek = Pc;
8160
+ function yi(e) {
8161
8161
  return e.value || "";
8162
8162
  }
8163
8163
  function Pc() {
8164
8164
  return "<";
8165
8165
  }
8166
- yi.peek = zc;
8167
- function yi(e, n, t, r) {
8168
- const i = xn(t), o = i === '"' ? "Quote" : "Apostrophe", l = t.enter("image");
8166
+ ki.peek = zc;
8167
+ function ki(e, n, t, r) {
8168
+ const i = bn(t), o = i === '"' ? "Quote" : "Apostrophe", l = t.enter("image");
8169
8169
  let a = t.enter("label");
8170
8170
  const s = t.createTracker(r);
8171
8171
  let u = s.move("![");
@@ -8192,8 +8192,8 @@ function yi(e, n, t, r) {
8192
8192
  function zc() {
8193
8193
  return "!";
8194
8194
  }
8195
- ki.peek = Lc;
8196
- function ki(e, n, t, r) {
8195
+ xi.peek = Lc;
8196
+ function xi(e, n, t, r) {
8197
8197
  const i = e.referenceType, o = t.enter("imageReference");
8198
8198
  let l = t.enter("label");
8199
8199
  const a = t.createTracker(r);
@@ -8216,8 +8216,8 @@ function ki(e, n, t, r) {
8216
8216
  function Lc() {
8217
8217
  return "!";
8218
8218
  }
8219
- xi.peek = Dc;
8220
- function xi(e, n, t) {
8219
+ bi.peek = Dc;
8220
+ function bi(e, n, t) {
8221
8221
  let r = e.value || "", i = "`", o = -1;
8222
8222
  for (; new RegExp("(^|[^`])" + i + "([^`]|$)").test(r); )
8223
8223
  i += "`";
@@ -8235,8 +8235,8 @@ function xi(e, n, t) {
8235
8235
  function Dc() {
8236
8236
  return "`";
8237
8237
  }
8238
- function bi(e, n) {
8239
- const t = cn(e);
8238
+ function wi(e, n) {
8239
+ const t = fn(e);
8240
8240
  return !!(!n.options.resourceLink && // If there’s a url…
8241
8241
  e.url && // And there’s a no title…
8242
8242
  !e.title && // And the content of `node` is a single text node…
@@ -8246,11 +8246,11 @@ function bi(e, n) {
8246
8246
  // references don’t work), space, or angle brackets…
8247
8247
  !/[\0- <>\u007F]/.test(e.url));
8248
8248
  }
8249
- wi.peek = Mc;
8250
- function wi(e, n, t, r) {
8251
- const i = xn(t), o = i === '"' ? "Quote" : "Apostrophe", l = t.createTracker(r);
8249
+ Ci.peek = Mc;
8250
+ function Ci(e, n, t, r) {
8251
+ const i = bn(t), o = i === '"' ? "Quote" : "Apostrophe", l = t.createTracker(r);
8252
8252
  let a, s;
8253
- if (bi(e, t)) {
8253
+ if (wi(e, t)) {
8254
8254
  const f = t.stack;
8255
8255
  t.stack = [], a = t.enter("autolink");
8256
8256
  let c = l.move("<");
@@ -8289,10 +8289,10 @@ function wi(e, n, t, r) {
8289
8289
  ), u += l.move(i), s()), u += l.move(")"), a(), u;
8290
8290
  }
8291
8291
  function Mc(e, n, t) {
8292
- return bi(e, t) ? "<" : "[";
8292
+ return wi(e, t) ? "<" : "[";
8293
8293
  }
8294
- Ci.peek = Fc;
8295
- function Ci(e, n, t, r) {
8294
+ Si.peek = Fc;
8295
+ function Si(e, n, t, r) {
8296
8296
  const i = e.referenceType, o = t.enter("linkReference");
8297
8297
  let l = t.enter("label");
8298
8298
  const a = t.createTracker(r);
@@ -8315,7 +8315,7 @@ function Ci(e, n, t, r) {
8315
8315
  function Fc() {
8316
8316
  return "[";
8317
8317
  }
8318
- function bn(e) {
8318
+ function wn(e) {
8319
8319
  const n = e.options.bullet || "*";
8320
8320
  if (n !== "*" && n !== "+" && n !== "-")
8321
8321
  throw new Error(
@@ -8324,7 +8324,7 @@ function bn(e) {
8324
8324
  return n;
8325
8325
  }
8326
8326
  function Rc(e) {
8327
- const n = bn(e), t = e.options.bulletOther;
8327
+ const n = wn(e), t = e.options.bulletOther;
8328
8328
  if (!t)
8329
8329
  return n === "*" ? "-" : "*";
8330
8330
  if (t !== "*" && t !== "+" && t !== "-")
@@ -8345,7 +8345,7 @@ function Nc(e) {
8345
8345
  );
8346
8346
  return n;
8347
8347
  }
8348
- function Si(e) {
8348
+ function vi(e) {
8349
8349
  const n = e.options.rule || "*";
8350
8350
  if (n !== "*" && n !== "-" && n !== "_")
8351
8351
  throw new Error(
@@ -8355,7 +8355,7 @@ function Si(e) {
8355
8355
  }
8356
8356
  function Oc(e, n, t, r) {
8357
8357
  const i = t.enter("list"), o = t.bulletCurrent;
8358
- let l = e.ordered ? Nc(t) : bn(t);
8358
+ let l = e.ordered ? Nc(t) : wn(t);
8359
8359
  const a = e.ordered ? l === "." ? ")" : "." : Rc(t);
8360
8360
  let s = n && t.bulletLastUsed ? l === t.bulletLastUsed : !1;
8361
8361
  if (!e.ordered) {
@@ -8365,7 +8365,7 @@ function Oc(e, n, t, r) {
8365
8365
  (l === "*" || l === "-") && // Empty first list item:
8366
8366
  f && (!f.children || !f.children[0]) && // Directly in two other list items:
8367
8367
  t.stack[t.stack.length - 1] === "list" && t.stack[t.stack.length - 2] === "listItem" && t.stack[t.stack.length - 3] === "list" && t.stack[t.stack.length - 4] === "listItem" && // That are each the first child.
8368
- t.indexStack[t.indexStack.length - 1] === 0 && t.indexStack[t.indexStack.length - 2] === 0 && t.indexStack[t.indexStack.length - 3] === 0 && (s = !0), Si(t) === l && f
8368
+ t.indexStack[t.indexStack.length - 1] === 0 && t.indexStack[t.indexStack.length - 2] === 0 && t.indexStack[t.indexStack.length - 3] === 0 && (s = !0), vi(t) === l && f
8369
8369
  ) {
8370
8370
  let c = -1;
8371
8371
  for (; ++c < e.children.length; ) {
@@ -8391,7 +8391,7 @@ function Bc(e) {
8391
8391
  }
8392
8392
  function jc(e, n, t, r) {
8393
8393
  const i = Bc(t);
8394
- let o = t.bulletCurrent || bn(t);
8394
+ let o = t.bulletCurrent || wn(t);
8395
8395
  n && n.type === "list" && n.ordered && (o = (typeof n.start == "number" && n.start > -1 ? n.start : 1) + (t.options.incrementListMarker === !1 ? 0 : n.children.indexOf(e)) + o);
8396
8396
  let l = o.length + 1;
8397
8397
  (i === "tab" || i === "mixed" && (n && n.type === "list" && n.spread || e.spread)) && (l = Math.ceil(l / 4) * 4);
@@ -8412,7 +8412,7 @@ function Hc(e, n, t, r) {
8412
8412
  }
8413
8413
  const $c = (
8414
8414
  /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
8415
- At([
8415
+ _t([
8416
8416
  "break",
8417
8417
  "delete",
8418
8418
  "emphasis",
@@ -8449,8 +8449,8 @@ function Vc(e) {
8449
8449
  );
8450
8450
  return n;
8451
8451
  }
8452
- vi.peek = Uc;
8453
- function vi(e, n, t, r) {
8452
+ Ei.peek = Uc;
8453
+ function Ei(e, n, t, r) {
8454
8454
  const i = Vc(t), o = t.enter("strong"), l = t.createTracker(r), a = l.move(i + i);
8455
8455
  let s = l.move(
8456
8456
  t.containerPhrasing(e, {
@@ -8459,13 +8459,13 @@ function vi(e, n, t, r) {
8459
8459
  ...l.current()
8460
8460
  })
8461
8461
  );
8462
- const u = s.charCodeAt(0), f = St(
8462
+ const u = s.charCodeAt(0), f = vt(
8463
8463
  r.before.charCodeAt(r.before.length - 1),
8464
8464
  u,
8465
8465
  i
8466
8466
  );
8467
8467
  f.inside && (s = ot(u) + s.slice(1));
8468
- const c = s.charCodeAt(s.length - 1), h = St(r.after.charCodeAt(0), c, i);
8468
+ const c = s.charCodeAt(s.length - 1), h = vt(r.after.charCodeAt(0), c, i);
8469
8469
  h.inside && (s = s.slice(0, -1) + ot(c));
8470
8470
  const p = l.move(i + i);
8471
8471
  return o(), t.attentionEncodeSurroundingInfo = {
@@ -8488,28 +8488,28 @@ function Qc(e) {
8488
8488
  return n;
8489
8489
  }
8490
8490
  function Yc(e, n, t) {
8491
- const r = (Si(t) + (t.options.ruleSpaces ? " " : "")).repeat(Qc(t));
8491
+ const r = (vi(t) + (t.options.ruleSpaces ? " " : "")).repeat(Qc(t));
8492
8492
  return t.options.ruleSpaces ? r.slice(0, -1) : r;
8493
8493
  }
8494
- const Ei = {
8494
+ const Ii = {
8495
8495
  blockquote: yc,
8496
- break: dr,
8496
+ break: mr,
8497
8497
  code: Sc,
8498
8498
  definition: Ec,
8499
- emphasis: mi,
8500
- hardBreak: dr,
8499
+ emphasis: gi,
8500
+ hardBreak: mr,
8501
8501
  heading: Tc,
8502
- html: gi,
8503
- image: yi,
8504
- imageReference: ki,
8505
- inlineCode: xi,
8506
- link: wi,
8507
- linkReference: Ci,
8502
+ html: yi,
8503
+ image: ki,
8504
+ imageReference: xi,
8505
+ inlineCode: bi,
8506
+ link: Ci,
8507
+ linkReference: Si,
8508
8508
  list: Oc,
8509
8509
  listItem: jc,
8510
8510
  paragraph: Hc,
8511
8511
  root: qc,
8512
- strong: vi,
8512
+ strong: Ei,
8513
8513
  text: Wc,
8514
8514
  thematicBreak: Yc
8515
8515
  };
@@ -8517,16 +8517,16 @@ function Xc() {
8517
8517
  return {
8518
8518
  enter: {
8519
8519
  table: Gc,
8520
- tableData: mr,
8521
- tableHeader: mr,
8520
+ tableData: gr,
8521
+ tableHeader: gr,
8522
8522
  tableRow: Kc
8523
8523
  },
8524
8524
  exit: {
8525
8525
  codeText: Zc,
8526
8526
  table: Jc,
8527
- tableData: Ut,
8528
- tableHeader: Ut,
8529
- tableRow: Ut
8527
+ tableData: Wt,
8528
+ tableHeader: Wt,
8529
+ tableRow: Wt
8530
8530
  }
8531
8531
  };
8532
8532
  }
@@ -8549,10 +8549,10 @@ function Jc(e) {
8549
8549
  function Kc(e) {
8550
8550
  this.enter({ type: "tableRow", children: [] }, e);
8551
8551
  }
8552
- function Ut(e) {
8552
+ function Wt(e) {
8553
8553
  this.exit(e);
8554
8554
  }
8555
- function mr(e) {
8555
+ function gr(e) {
8556
8556
  this.enter({ type: "tableCell", children: [] }, e);
8557
8557
  }
8558
8558
  function Zc(e) {
@@ -8637,15 +8637,15 @@ function tf(e) {
8637
8637
  return v(), I;
8638
8638
  }
8639
8639
  function h(p, g, x) {
8640
- let C = Ei.inlineCode(p, g, x);
8640
+ let C = Ii.inlineCode(p, g, x);
8641
8641
  return x.stack.includes("tableCell") && (C = C.replace(/\|/g, "\\$&")), C;
8642
8642
  }
8643
8643
  }
8644
8644
  function nf() {
8645
8645
  return {
8646
8646
  exit: {
8647
- taskListCheckValueChecked: gr,
8648
- taskListCheckValueUnchecked: gr,
8647
+ taskListCheckValueChecked: yr,
8648
+ taskListCheckValueUnchecked: yr,
8649
8649
  paragraph: lf
8650
8650
  }
8651
8651
  };
@@ -8656,7 +8656,7 @@ function rf() {
8656
8656
  handlers: { listItem: of }
8657
8657
  };
8658
8658
  }
8659
- function gr(e) {
8659
+ function yr(e) {
8660
8660
  const n = this.stack[this.stack.length - 2];
8661
8661
  n.type, n.checked = e.type === "taskListCheckValueChecked";
8662
8662
  }
@@ -8684,7 +8684,7 @@ function lf(e) {
8684
8684
  function of(e, n, t, r) {
8685
8685
  const i = e.children[0], o = typeof e.checked == "boolean" && i && i.type === "paragraph", l = "[" + (e.checked ? "x" : " ") + "] ", a = t.createTracker(r);
8686
8686
  o && a.move(l);
8687
- let s = Ei.listItem(e, n, t, {
8687
+ let s = Ii.listItem(e, n, t, {
8688
8688
  ...r,
8689
8689
  ...a.current()
8690
8690
  });
@@ -8716,30 +8716,30 @@ function sf(e) {
8716
8716
  const uf = {
8717
8717
  tokenize: mf,
8718
8718
  partial: !0
8719
- }, Ii = {
8719
+ }, Ai = {
8720
8720
  tokenize: gf,
8721
8721
  partial: !0
8722
- }, Ai = {
8722
+ }, _i = {
8723
8723
  tokenize: yf,
8724
8724
  partial: !0
8725
- }, _i = {
8725
+ }, Ti = {
8726
8726
  tokenize: kf,
8727
8727
  partial: !0
8728
8728
  }, cf = {
8729
8729
  tokenize: xf,
8730
8730
  partial: !0
8731
- }, Ti = {
8731
+ }, Pi = {
8732
8732
  name: "wwwAutolink",
8733
8733
  tokenize: hf,
8734
- previous: zi
8735
- }, Pi = {
8734
+ previous: Li
8735
+ }, zi = {
8736
8736
  name: "protocolAutolink",
8737
8737
  tokenize: df,
8738
- previous: Li
8738
+ previous: Di
8739
8739
  }, Ce = {
8740
8740
  name: "emailAutolink",
8741
8741
  tokenize: pf,
8742
- previous: Di
8742
+ previous: Mi
8743
8743
  }, ge = {};
8744
8744
  function ff() {
8745
8745
  return {
@@ -8753,19 +8753,19 @@ ge[43] = Ce;
8753
8753
  ge[45] = Ce;
8754
8754
  ge[46] = Ce;
8755
8755
  ge[95] = Ce;
8756
- ge[72] = [Ce, Pi];
8757
- ge[104] = [Ce, Pi];
8758
- ge[87] = [Ce, Ti];
8759
- ge[119] = [Ce, Ti];
8756
+ ge[72] = [Ce, zi];
8757
+ ge[104] = [Ce, zi];
8758
+ ge[87] = [Ce, Pi];
8759
+ ge[119] = [Ce, Pi];
8760
8760
  function pf(e, n, t) {
8761
8761
  const r = this;
8762
8762
  let i, o;
8763
8763
  return l;
8764
8764
  function l(c) {
8765
- return !nn(c) || !Di.call(r, r.previous) || wn(r.events) ? t(c) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), a(c));
8765
+ return !rn(c) || !Mi.call(r, r.previous) || Cn(r.events) ? t(c) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), a(c));
8766
8766
  }
8767
8767
  function a(c) {
8768
- return nn(c) ? (e.consume(c), a) : c === 64 ? (e.consume(c), s) : t(c);
8768
+ return rn(c) ? (e.consume(c), a) : c === 64 ? (e.consume(c), s) : t(c);
8769
8769
  }
8770
8770
  function s(c) {
8771
8771
  return c === 46 ? e.check(cf, f, u)(c) : c === 45 || c === 95 || ee(c) ? (o = !0, e.consume(c), s) : f(c);
@@ -8781,7 +8781,7 @@ function hf(e, n, t) {
8781
8781
  const r = this;
8782
8782
  return i;
8783
8783
  function i(l) {
8784
- return l !== 87 && l !== 119 || !zi.call(r, r.previous) || wn(r.events) ? t(l) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(uf, e.attempt(Ii, e.attempt(Ai, o), t), t)(l));
8784
+ return l !== 87 && l !== 119 || !Li.call(r, r.previous) || Cn(r.events) ? t(l) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(uf, e.attempt(Ai, e.attempt(_i, o), t), t)(l));
8785
8785
  }
8786
8786
  function o(l) {
8787
8787
  return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), n(l);
@@ -8792,7 +8792,7 @@ function df(e, n, t) {
8792
8792
  let i = "", o = !1;
8793
8793
  return l;
8794
8794
  function l(c) {
8795
- return (c === 72 || c === 104) && Li.call(r, r.previous) && !wn(r.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), i += String.fromCodePoint(c), e.consume(c), a) : t(c);
8795
+ return (c === 72 || c === 104) && Di.call(r, r.previous) && !Cn(r.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), i += String.fromCodePoint(c), e.consume(c), a) : t(c);
8796
8796
  }
8797
8797
  function a(c) {
8798
8798
  if (ne(c) && i.length < 5)
@@ -8808,7 +8808,7 @@ function df(e, n, t) {
8808
8808
  return c === 47 ? (e.consume(c), o ? u : (o = !0, s)) : t(c);
8809
8809
  }
8810
8810
  function u(c) {
8811
- return c === null || bt(c) || Y(c) || Fe(c) || vt(c) ? t(c) : e.attempt(Ii, e.attempt(Ai, f), t)(c);
8811
+ return c === null || wt(c) || Y(c) || Fe(c) || Et(c) ? t(c) : e.attempt(Ai, e.attempt(_i, f), t)(c);
8812
8812
  }
8813
8813
  function f(c) {
8814
8814
  return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), n(c);
@@ -8828,7 +8828,7 @@ function gf(e, n, t) {
8828
8828
  let r, i, o;
8829
8829
  return l;
8830
8830
  function l(u) {
8831
- return u === 46 || u === 95 ? e.check(_i, s, a)(u) : u === null || Y(u) || Fe(u) || u !== 45 && vt(u) ? s(u) : (o = !0, e.consume(u), l);
8831
+ return u === 46 || u === 95 ? e.check(Ti, s, a)(u) : u === null || Y(u) || Fe(u) || u !== 45 && Et(u) ? s(u) : (o = !0, e.consume(u), l);
8832
8832
  }
8833
8833
  function a(u) {
8834
8834
  return u === 95 ? r = !0 : (i = r, r = void 0), e.consume(u), l;
@@ -8841,7 +8841,7 @@ function yf(e, n) {
8841
8841
  let t = 0, r = 0;
8842
8842
  return i;
8843
8843
  function i(l) {
8844
- return l === 40 ? (t++, e.consume(l), i) : l === 41 && r < t ? o(l) : l === 33 || l === 34 || l === 38 || l === 39 || l === 41 || l === 42 || l === 44 || l === 46 || l === 58 || l === 59 || l === 60 || l === 63 || l === 93 || l === 95 || l === 126 ? e.check(_i, n, o)(l) : l === null || Y(l) || Fe(l) ? n(l) : (e.consume(l), i);
8844
+ return l === 40 ? (t++, e.consume(l), i) : l === 41 && r < t ? o(l) : l === 33 || l === 34 || l === 38 || l === 39 || l === 41 || l === 42 || l === 44 || l === 46 || l === 58 || l === 59 || l === 60 || l === 63 || l === 93 || l === 95 || l === 126 ? e.check(Ti, n, o)(l) : l === null || Y(l) || Fe(l) ? n(l) : (e.consume(l), i);
8845
8845
  }
8846
8846
  function o(l) {
8847
8847
  return l === 41 && r++, e.consume(l), i;
@@ -8875,19 +8875,19 @@ function xf(e, n, t) {
8875
8875
  return ee(o) ? t(o) : n(o);
8876
8876
  }
8877
8877
  }
8878
- function zi(e) {
8878
+ function Li(e) {
8879
8879
  return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || Y(e);
8880
8880
  }
8881
- function Li(e) {
8881
+ function Di(e) {
8882
8882
  return !ne(e);
8883
8883
  }
8884
- function Di(e) {
8885
- return !(e === 47 || nn(e));
8884
+ function Mi(e) {
8885
+ return !(e === 47 || rn(e));
8886
8886
  }
8887
- function nn(e) {
8887
+ function rn(e) {
8888
8888
  return e === 43 || e === 45 || e === 46 || e === 95 || ee(e);
8889
8889
  }
8890
- function wn(e) {
8890
+ function Cn(e) {
8891
8891
  let n = e.length, t = !1;
8892
8892
  for (; n--; ) {
8893
8893
  const r = e[n][1];
@@ -9123,7 +9123,7 @@ function Tf(e) {
9123
9123
  start: Object.assign({}, l[u][1].end),
9124
9124
  end: Object.assign({}, l[s][1].start)
9125
9125
  }, h = [["enter", f, a], ["enter", l[u][1], a], ["exit", l[u][1], a], ["enter", c, a]], p = a.parser.constructs.insideSpan.null;
9126
- p && ae(h, h.length, 0, Et(p, l.slice(u + 1, s), a)), ae(h, h.length, 0, [["exit", c, a], ["enter", l[s][1], a], ["exit", l[s][1], a], ["exit", f, a]]), ae(l, u - 1, s - u + 3, h), s = u + h.length - 2;
9126
+ p && ae(h, h.length, 0, It(p, l.slice(u + 1, s), a)), ae(h, h.length, 0, [["exit", c, a], ["enter", l[s][1], a], ["exit", l[s][1], a], ["exit", f, a]]), ae(l, u - 1, s - u + 3, h), s = u + h.length - 2;
9127
9127
  break;
9128
9128
  }
9129
9129
  }
@@ -9322,7 +9322,7 @@ function Ff(e, n) {
9322
9322
  const h = new Pf();
9323
9323
  for (; ++t < e.length; ) {
9324
9324
  const p = e[t], g = p[1];
9325
- p[0] === "enter" ? g.type === "tableHead" ? (a = !1, s !== 0 && (yr(h, n, s, u, f), f = void 0, s = 0), u = {
9325
+ p[0] === "enter" ? g.type === "tableHead" ? (a = !1, s !== 0 && (kr(h, n, s, u, f), f = void 0, s = 0), u = {
9326
9326
  type: "table",
9327
9327
  start: Object.assign({}, g.start),
9328
9328
  // Note: correct end is set later.
@@ -9334,7 +9334,7 @@ function Ff(e, n) {
9334
9334
  end: Object.assign({}, g.end)
9335
9335
  }, h.add(t, 0, [["enter", f, n]])), i = g.type === "tableDelimiterRow" ? 2 : f ? 3 : 1) : i && (g.type === "data" || g.type === "tableDelimiterMarker" || g.type === "tableDelimiterFiller") ? (r = !1, l[2] === 0 && (o[1] !== 0 && (l[0] = l[1], c = mt(h, n, o, i, void 0, c), o = [0, 0, 0, 0]), l[2] = t)) : g.type === "tableCellDivider" && (r ? r = !1 : (o[1] !== 0 && (l[0] = l[1], c = mt(h, n, o, i, void 0, c)), o = l, l = [o[1], t, 0, 0])) : g.type === "tableHead" ? (a = !0, s = t) : g.type === "tableRow" || g.type === "tableDelimiterRow" ? (s = t, o[1] !== 0 ? (l[0] = l[1], c = mt(h, n, o, i, t, c)) : l[1] !== 0 && (c = mt(h, n, l, i, t, c)), i = 0) : i && (g.type === "data" || g.type === "tableDelimiterMarker" || g.type === "tableDelimiterFiller") && (l[3] = t);
9336
9336
  }
9337
- for (s !== 0 && yr(h, n, s, u, f), h.consume(n.events), t = -1; ++t < n.events.length; ) {
9337
+ for (s !== 0 && kr(h, n, s, u, f), h.consume(n.events), t = -1; ++t < n.events.length; ) {
9338
9338
  const p = n.events[t];
9339
9339
  p[0] === "enter" && p[1].type === "table" && (p[1]._align = Lf(n.events, t));
9340
9340
  }
@@ -9366,7 +9366,7 @@ function mt(e, n, t, r, i, o) {
9366
9366
  }
9367
9367
  return i !== void 0 && (o.end = Object.assign({}, $e(n.events, i)), e.add(i, 0, [["exit", o, n]]), o = void 0), o;
9368
9368
  }
9369
- function yr(e, n, t, r, i) {
9369
+ function kr(e, n, t, r, i) {
9370
9370
  const o = [], l = $e(n.events, t);
9371
9371
  i && (i.end = Object.assign({}, l), o.push(["exit", i, n])), r.end = Object.assign({}, l), o.push(["exit", r, n]), e.add(t + 1, 0, o);
9372
9372
  }
@@ -9415,7 +9415,7 @@ function Bf(e, n, t) {
9415
9415
  }
9416
9416
  }
9417
9417
  function jf(e) {
9418
- return qr([
9418
+ return Vr([
9419
9419
  ff(),
9420
9420
  wf(),
9421
9421
  Tf(e),
@@ -9508,7 +9508,7 @@ function dp({ part: e, onProposalConfirm: n, onProposalCancel: t, renderPart: r
9508
9508
  if (r) {
9509
9509
  const i = r(e);
9510
9510
  if (i != null)
9511
- return /* @__PURE__ */ S(Cr, { children: i });
9511
+ return /* @__PURE__ */ S(Sr, { children: i });
9512
9512
  }
9513
9513
  switch (e.type) {
9514
9514
  case "text":
@@ -9553,7 +9553,7 @@ const mp = "_wrapper_1jkxo_1", gp = "_user_1jkxo_15", yp = "_assistant_1jkxo_23"
9553
9553
  function wp({ message: e, onProposalConfirm: n, onProposalCancel: t, assistantIcon: r, renderPart: i }) {
9554
9554
  const o = Re(), l = e.role === "user";
9555
9555
  return /* @__PURE__ */ X("div", { className: `${Pe.wrapper} ${l ? Pe.user : Pe.assistant}`, children: [
9556
- !l && /* @__PURE__ */ S("div", { className: Pe.avatar, "aria-hidden": "true", children: r ?? /* @__PURE__ */ S(Ar, {}) }),
9556
+ !l && /* @__PURE__ */ S("div", { className: Pe.avatar, "aria-hidden": "true", children: r ?? /* @__PURE__ */ S(_r, {}) }),
9557
9557
  /* @__PURE__ */ X("div", { className: Pe.bubble, children: [
9558
9558
  e.parts.map((a, s) => /* @__PURE__ */ S(
9559
9559
  dp,
@@ -9598,8 +9598,8 @@ const Ip = "_list_ixto8_1", Ap = "_empty_ixto8_21", _p = "_hint_ixto8_47", Tp =
9598
9598
  typing: Tp
9599
9599
  };
9600
9600
  function Pp({ messages: e, isLoading: n, isConnecting: t, onProposalConfirm: r, onProposalCancel: i, assistantIcon: o, renderPart: l }) {
9601
- const a = Re(), s = xr(null);
9602
- return qi(() => {
9601
+ const a = Re(), s = bt(null);
9602
+ return Cr(() => {
9603
9603
  s.current?.scrollIntoView({ behavior: "smooth" });
9604
9604
  }, [e, n]), /* @__PURE__ */ X("div", { className: yt.list, children: [
9605
9605
  e.length === 0 && /* @__PURE__ */ X("div", { className: yt.empty, children: [
@@ -9633,44 +9633,48 @@ const zp = "_wrapper_ehrkb_1", Lp = "_textarea_ehrkb_21", Dp = "_toolbar_ehrkb_6
9633
9633
  stopIcon: Bp
9634
9634
  };
9635
9635
  function jp({ value: e, onChange: n, onSend: t, onStop: r, isLoading: i, placeholder: o, actions: l, sendIcon: a }) {
9636
- const s = Re(), u = [
9636
+ const s = Re(), u = bt(null), f = bt(!1);
9637
+ Cr(() => {
9638
+ f.current && !i && u.current?.focus(), f.current = i;
9639
+ }, [i]);
9640
+ const c = [
9637
9641
  { icon: /* @__PURE__ */ S(ul, {}), label: s.actionAddFile },
9638
9642
  { icon: /* @__PURE__ */ S(cl, {}), label: s.actionQuickActions },
9639
9643
  { icon: /* @__PURE__ */ S(fl, {}), label: s.actionNew },
9640
9644
  { icon: /* @__PURE__ */ S(pl, {}), label: s.actionHistory },
9641
9645
  { icon: /* @__PURE__ */ S(hl, {}), label: s.actionRules }
9642
- ], f = l ?? u, c = (h) => {
9643
- h.key === "Enter" && !h.shiftKey && (h.preventDefault(), t());
9646
+ ], h = l ?? c, p = (g) => {
9647
+ g.key === "Enter" && !g.shiftKey && (g.preventDefault(), i || t());
9644
9648
  };
9645
9649
  return /* @__PURE__ */ X("div", { className: we.wrapper, children: [
9646
9650
  /* @__PURE__ */ S(
9647
9651
  "textarea",
9648
9652
  {
9653
+ ref: u,
9649
9654
  className: we.textarea,
9650
9655
  value: e,
9651
- onChange: (h) => n(h.target.value),
9652
- onKeyDown: c,
9656
+ onChange: (g) => n(g.target.value),
9657
+ onKeyDown: p,
9653
9658
  placeholder: o ?? s.inputPlaceholder,
9654
9659
  rows: 3,
9655
- disabled: i,
9656
9660
  "aria-label": s.sendMessage
9657
9661
  }
9658
9662
  ),
9659
9663
  /* @__PURE__ */ X("div", { className: we.toolbar, children: [
9660
- f.length > 0 && /* @__PURE__ */ S("div", { className: we.actions, children: f.map((h, p) => /* @__PURE__ */ X(
9664
+ h.length > 0 && /* @__PURE__ */ S("div", { className: we.actions, children: h.map((g, x) => /* @__PURE__ */ X(
9661
9665
  "button",
9662
9666
  {
9663
9667
  className: we.actionBtn,
9664
9668
  type: "button",
9665
9669
  disabled: i,
9666
- "aria-label": h.label,
9667
- onClick: h.onClick,
9670
+ "aria-label": g.label,
9671
+ onClick: g.onClick,
9668
9672
  children: [
9669
- h.icon,
9670
- /* @__PURE__ */ S("span", { children: h.label })
9673
+ g.icon,
9674
+ /* @__PURE__ */ S("span", { children: g.label })
9671
9675
  ]
9672
9676
  },
9673
- p
9677
+ x
9674
9678
  )) }),
9675
9679
  i && r ? /* @__PURE__ */ X(
9676
9680
  "button",
@@ -9785,7 +9789,7 @@ function th({ title: e, onMinimize: n, isMinimized: t, icon: r, onReset: i }) {
9785
9789
  const o = Re();
9786
9790
  return /* @__PURE__ */ X("div", { className: ze.header, children: [
9787
9791
  /* @__PURE__ */ X("div", { className: ze.left, children: [
9788
- /* @__PURE__ */ S("span", { className: ze.icon, "aria-hidden": "true", children: r ?? /* @__PURE__ */ S(Ar, {}) }),
9792
+ /* @__PURE__ */ S("span", { className: ze.icon, "aria-hidden": "true", children: r ?? /* @__PURE__ */ S(_r, {}) }),
9789
9793
  /* @__PURE__ */ S("span", { className: ze.title, children: e ?? o.sidebarTitle })
9790
9794
  ] }),
9791
9795
  (n || i) && /* @__PURE__ */ X("div", { className: ze.actions, children: [
@@ -9812,7 +9816,7 @@ function th({ title: e, onMinimize: n, isMinimized: t, icon: r, onReset: i }) {
9812
9816
  ] })
9813
9817
  ] });
9814
9818
  }
9815
- const nh = "_sidebar_u9ybt_1", rh = "_minimized_u9ybt_39", kr = {
9819
+ const nh = "_sidebar_u9ybt_1", rh = "_minimized_u9ybt_39", xr = {
9816
9820
  sidebar: nh,
9817
9821
  minimized: rh
9818
9822
  };
@@ -9845,7 +9849,7 @@ function ph({
9845
9849
  return /* @__PURE__ */ X(
9846
9850
  "aside",
9847
9851
  {
9848
- className: [kr.sidebar, u ? kr.minimized : "", o].filter(Boolean).join(" "),
9852
+ className: [xr.sidebar, u ? xr.minimized : "", o].filter(Boolean).join(" "),
9849
9853
  style: { height: u ? void 0 : i, ...l },
9850
9854
  children: [
9851
9855
  /* @__PURE__ */ S(
@@ -9895,13 +9899,13 @@ export {
9895
9899
  Yf as AiTablePart,
9896
9900
  Ep as AiTypingIndicator,
9897
9901
  uh as JuneauProvider,
9898
- An as consumeStream,
9902
+ _n as consumeStream,
9899
9903
  sh as createFetchStreamAdapter,
9900
9904
  ah as createSseAdapter,
9901
9905
  J as delay,
9902
9906
  Ui as getMessageText,
9903
9907
  fh as juneauCs,
9904
- vr as juneauEn,
9908
+ Er as juneauEn,
9905
9909
  oh as mockAdapter,
9906
9910
  Vi as serializeMessages,
9907
9911
  rl as useAiChat,