mark-deco-cli 0.7.0 → 0.9.0

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/cli.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  /*!
3
3
  * name: mark-deco-cli
4
- * version: 0.7.0
4
+ * version: 0.9.0
5
5
  * description: Command-line interface for mark-deco Markdown to HTML conversion processor
6
6
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
7
7
  * license: MIT
8
8
  * repository.url: https://github.com/kekyo/mark-deco.git
9
- * git.commit.hash: 2b8fc59fb30d614d1c529a3d2c9ec721a49c9115
9
+ * git.commit.hash: d0e45da82482af0e17292db548313487c588061b
10
10
  */
11
11
  "use strict";
12
12
  const commander = require("commander");
@@ -4338,7 +4338,7 @@ function requireJs() {
4338
4338
  return js$1.exports;
4339
4339
  }
4340
4340
  var jsExports = requireJs();
4341
- const Y$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsExports);
4341
+ const tt$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsExports);
4342
4342
  const htmlVoidElements = [
4343
4343
  "area",
4344
4344
  "base",
@@ -21417,12 +21417,12 @@ var load = loader.load;
21417
21417
  var dump = dumper.dump;
21418
21418
  /*!
21419
21419
  * name: mark-deco
21420
- * version: 0.7.0
21420
+ * version: 0.9.0
21421
21421
  * description: Flexible Markdown to HTML conversion library
21422
21422
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
21423
21423
  * license: MIT
21424
21424
  * repository.url: https://github.com/kekyo/mark-deco.git
21425
- * git.commit.hash: 2b8fc59fb30d614d1c529a3d2c9ec721a49c9115
21425
+ * git.commit.hash: d0e45da82482af0e17292db548313487c588061b
21426
21426
  */
21427
21427
  const qd = (e) => {
21428
21428
  try {
@@ -21460,7 +21460,7 @@ const qd = (e) => {
21460
21460
  }, Ys = () => "width: 100%; height: auto; display: block; object-fit: contain; object-position: center;", ou = (e, t, u, r) => {
21461
21461
  const a = Ys(), i = "", n = r ? ` ${r}` : "";
21462
21462
  return `<img src="${e}" alt="${t}"${i} style="${a}"${n} />`;
21463
- }, At$1 = (e, t, u, r, a) => {
21463
+ }, At = (e, t, u, r, a) => {
21464
21464
  const i = ou(e, t, r, a);
21465
21465
  return `<div class="${u}">
21466
21466
  ${i}
@@ -21587,7 +21587,7 @@ const qd = (e) => {
21587
21587
  if (h) {
21588
21588
  const m = h[0].match(/href=['"]([^'"]+)['"]/i);
21589
21589
  if (m && m[1]) {
21590
- const f = m[1], T2 = $s(f), A = new URL(T2, e).toString();
21590
+ const f = m[1], T = $s(f), A = new URL(T, e).toString();
21591
21591
  return u.info("getOEmbedUrl: Discovered oEmbed endpoint:", A), A;
21592
21592
  }
21593
21593
  }
@@ -21611,9 +21611,9 @@ const qd = (e) => {
21611
21611
  headers: h
21612
21612
  }, f = Er(u);
21613
21613
  m.signal = i ? Tr(i, f) : f;
21614
- const T2 = await fetch(n, m);
21615
- if (T2.status >= 300 && T2.status < 400) {
21616
- const A = T2.headers.get("location");
21614
+ const T = await fetch(n, m);
21615
+ if (T.status >= 300 && T.status < 400) {
21616
+ const A = T.headers.get("location");
21617
21617
  if (A) {
21618
21618
  n = new URL(A, n).toString(), c++;
21619
21619
  continue;
@@ -21655,13 +21655,13 @@ const Gd = async (e, t, u, r, a) => {
21655
21655
  );
21656
21656
  const m = await Ws(r, a), f = await zs(h, m, r);
21657
21657
  i.info("fetchOEmbedData: oEmbed API URL:", f);
21658
- const T2 = await js(
21658
+ const T = await js(
21659
21659
  c,
21660
21660
  f,
21661
21661
  n,
21662
21662
  i
21663
21663
  );
21664
- return i.info("fetchOEmbedData: Parsed JSON data:", T2), T2.web_page || (T2.web_page = h), T2;
21664
+ return i.info("fetchOEmbedData: Parsed JSON data:", T), T.web_page || (T.web_page = h), T;
21665
21665
  } catch (h) {
21666
21666
  throw vt$1(h) ? (typeof window < "u" ? i.debug(
21667
21667
  "fetchOEmbedData: Browser CORS restrictions block oEmbed API access for URL:",
@@ -21730,29 +21730,29 @@ const Gd = async (e, t, u, r, a) => {
21730
21730
  const i = e.title || "Untitled", n = e.author_name || "Unknown", c = e.url || "", h = e.width || 0, m = e.height || 0;
21731
21731
  let f = "";
21732
21732
  h > 0 && m > 0 && (f = ` width="${h}" height="${m}"`);
21733
- const T2 = [];
21734
- if (r.title !== void 0 && T2.push({
21733
+ const T = [];
21734
+ if (r.title !== void 0 && T.push({
21735
21735
  order: r.title,
21736
21736
  html: `<div class="oembed-title">${R(i)}</div>`
21737
- }), r.author !== void 0 && T2.push({
21737
+ }), r.author !== void 0 && T.push({
21738
21738
  order: r.author,
21739
21739
  html: `<div class="oembed-author">by ${R(n)}</div>`
21740
- }), r.provider !== void 0 && T2.push({
21740
+ }), r.provider !== void 0 && T.push({
21741
21741
  order: r.provider,
21742
21742
  html: `<div class="oembed-provider">${R(u)}</div>`
21743
- }), r.description !== void 0 && e.author_name && T2.push({
21743
+ }), r.description !== void 0 && e.author_name && T.push({
21744
21744
  order: r.description,
21745
21745
  html: `<div class="oembed-description">${R(e.author_name)}</div>`
21746
- }), r.thumbnail !== void 0 && e.thumbnail_url && T2.push({
21746
+ }), r.thumbnail !== void 0 && e.thumbnail_url && T.push({
21747
21747
  order: r.thumbnail,
21748
- html: At$1(
21748
+ html: At(
21749
21749
  R(e.thumbnail_url),
21750
21750
  R(i),
21751
21751
  "oembed-thumbnail"
21752
21752
  )
21753
21753
  }), r.embeddedContent !== void 0 && c) {
21754
21754
  const M2 = f ? f.trim() : "";
21755
- T2.push({
21755
+ T.push({
21756
21756
  order: r.embeddedContent,
21757
21757
  html: ou(
21758
21758
  R(c),
@@ -21764,7 +21764,7 @@ const Gd = async (e, t, u, r, a) => {
21764
21764
  }
21765
21765
  if (r.externalLink !== void 0) {
21766
21766
  const M2 = a.useMetadataUrlLink && e.web_page || t;
21767
- T2.push({
21767
+ T.push({
21768
21768
  order: r.externalLink,
21769
21769
  html: `<div class="oembed-external-link">
21770
21770
  <a href="${R(M2)}" target="_blank" rel="noopener noreferrer">
@@ -21773,17 +21773,17 @@ const Gd = async (e, t, u, r, a) => {
21773
21773
  </div>`
21774
21774
  });
21775
21775
  }
21776
- const A = T2.sort((M2, ee2) => M2.order - ee2.order), w = [], v = [];
21776
+ const A = T.sort((M2, ee) => M2.order - ee.order), w = [], v = [];
21777
21777
  A.forEach((M2) => {
21778
21778
  M2.html.includes("oembed-title") || M2.html.includes("oembed-author") || M2.html.includes("oembed-provider") || M2.html.includes("oembed-description") ? w.push(M2.html) : v.push(M2.html);
21779
21779
  });
21780
- let S2 = "";
21781
- w.length > 0 && (S2 = `<div class="oembed-header">${w.join("")}</div>`);
21780
+ let S = "";
21781
+ w.length > 0 && (S = `<div class="oembed-header">${w.join("")}</div>`);
21782
21782
  let U2 = "";
21783
21783
  return v.length > 0 && (U2 = `<div class="oembed-content">
21784
21784
  ${v.join("")}
21785
21785
  </div>`), `<div class="oembed-container oembed-photo">
21786
- ${S2}
21786
+ ${S}
21787
21787
  ${U2}
21788
21788
  </div>`;
21789
21789
  }, Js = (e, t, u, r, a) => {
@@ -21802,7 +21802,7 @@ const Gd = async (e, t, u, r, a) => {
21802
21802
  html: `<div class="oembed-description">${R(e.author_name)}</div>`
21803
21803
  }), r.thumbnail !== void 0 && e.thumbnail_url && m.push({
21804
21804
  order: r.thumbnail,
21805
- html: At$1(
21805
+ html: At(
21806
21806
  R(e.thumbnail_url),
21807
21807
  R(i),
21808
21808
  "oembed-thumbnail"
@@ -21811,22 +21811,22 @@ const Gd = async (e, t, u, r, a) => {
21811
21811
  order: r.embeddedContent,
21812
21812
  html: h
21813
21813
  }), r.externalLink !== void 0) {
21814
- const S2 = a.useMetadataUrlLink && e.web_page || t;
21814
+ const S = a.useMetadataUrlLink && e.web_page || t;
21815
21815
  m.push({
21816
21816
  order: r.externalLink,
21817
21817
  html: `<div class="oembed-external-link">
21818
- <a href="${R(S2)}" target="_blank" rel="noopener noreferrer">
21818
+ <a href="${R(S)}" target="_blank" rel="noopener noreferrer">
21819
21819
  Visit ${R(u)}
21820
21820
  </a>
21821
21821
  </div>`
21822
21822
  });
21823
21823
  }
21824
- const f = m.sort((S2, U2) => S2.order - U2.order), T2 = [], A = [];
21825
- f.forEach((S2) => {
21826
- S2.html.includes("oembed-title") || S2.html.includes("oembed-author") || S2.html.includes("oembed-provider") || S2.html.includes("oembed-description") ? T2.push(S2.html) : A.push(S2.html);
21824
+ const f = m.sort((S, U2) => S.order - U2.order), T = [], A = [];
21825
+ f.forEach((S) => {
21826
+ S.html.includes("oembed-title") || S.html.includes("oembed-author") || S.html.includes("oembed-provider") || S.html.includes("oembed-description") ? T.push(S.html) : A.push(S.html);
21827
21827
  });
21828
21828
  let w = "";
21829
- T2.length > 0 && (w = `<div class="oembed-header">${T2.join("")}</div>`);
21829
+ T.length > 0 && (w = `<div class="oembed-header">${T.join("")}</div>`);
21830
21830
  let v = "";
21831
21831
  return A.length > 0 && (v = `<div class="oembed-content">
21832
21832
  ${A.join("")}
@@ -21850,7 +21850,7 @@ const Gd = async (e, t, u, r, a) => {
21850
21850
  html: `<div class="oembed-description">${R(n)}</div>`
21851
21851
  }), r.thumbnail !== void 0 && c && h.push({
21852
21852
  order: r.thumbnail,
21853
- html: At$1(
21853
+ html: At(
21854
21854
  R(c),
21855
21855
  R(i),
21856
21856
  "oembed-thumbnail"
@@ -21867,14 +21867,14 @@ const Gd = async (e, t, u, r, a) => {
21867
21867
  </a>`
21868
21868
  });
21869
21869
  }
21870
- const m = h.sort((v, S2) => v.order - S2.order), f = [], T2 = [];
21870
+ const m = h.sort((v, S) => v.order - S.order), f = [], T = [];
21871
21871
  m.forEach((v) => {
21872
- v.html.includes("oembed-title") || v.html.includes("oembed-author") || v.html.includes("oembed-provider") || v.html.includes("oembed-description") ? f.push(v.html) : T2.push(v.html);
21872
+ v.html.includes("oembed-title") || v.html.includes("oembed-author") || v.html.includes("oembed-provider") || v.html.includes("oembed-description") ? f.push(v.html) : T.push(v.html);
21873
21873
  });
21874
21874
  let A = "";
21875
21875
  f.length > 0 && (A = `<div class="oembed-header">${f.join("")}</div>`);
21876
21876
  let w = "";
21877
- return T2.length > 0 && (w = `<div class="oembed-content">${T2.join("")}</div>`), `<div class="oembed-container oembed-link">
21877
+ return T.length > 0 && (w = `<div class="oembed-content">${T.join("")}</div>`), `<div class="oembed-container oembed-link">
21878
21878
  ${A}
21879
21879
  ${w}
21880
21880
  </div>`;
@@ -21910,14 +21910,14 @@ const Gd = async (e, t, u, r, a) => {
21910
21910
  } else
21911
21911
  return `<div class="oembed-responsive-content">${e}</div>`;
21912
21912
  };
21913
- var L;
21913
+ var L$1;
21914
21914
  (function(e) {
21915
21915
  e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
21916
- })(L || (L = {}));
21916
+ })(L$1 || (L$1 = {}));
21917
21917
  function aa(e) {
21918
- return e.type === L.Tag || e.type === L.Script || e.type === L.Style;
21918
+ return e.type === L$1.Tag || e.type === L$1.Script || e.type === L$1.Style;
21919
21919
  }
21920
- const cu = L.Root, gr = L.Text, ia = L.Directive, Ar = L.Comment, na = L.Script, oa = L.Style, zt = L.Tag, ca = L.CDATA, da = L.Doctype;
21920
+ const cu = L$1.Root, gr = L$1.Text, ia = L$1.Directive, Ar = L$1.Comment, na = L$1.Script, oa = L$1.Style, zt = L$1.Tag, ca = L$1.CDATA, da = L$1.Doctype;
21921
21921
  class vr {
21922
21922
  constructor() {
21923
21923
  this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
@@ -21983,7 +21983,7 @@ class du extends vr {
21983
21983
  }
21984
21984
  class We extends du {
21985
21985
  constructor() {
21986
- super(...arguments), this.type = L.Text;
21986
+ super(...arguments), this.type = L$1.Text;
21987
21987
  }
21988
21988
  get nodeType() {
21989
21989
  return 3;
@@ -21991,7 +21991,7 @@ class We extends du {
21991
21991
  }
21992
21992
  class hu extends du {
21993
21993
  constructor() {
21994
- super(...arguments), this.type = L.Comment;
21994
+ super(...arguments), this.type = L$1.Comment;
21995
21995
  }
21996
21996
  get nodeType() {
21997
21997
  return 8;
@@ -21999,7 +21999,7 @@ class hu extends du {
21999
21999
  }
22000
22000
  class lu extends du {
22001
22001
  constructor(t, u) {
22002
- super(u), this.name = t, this.type = L.Directive;
22002
+ super(u), this.name = t, this.type = L$1.Directive;
22003
22003
  }
22004
22004
  get nodeType() {
22005
22005
  return 1;
@@ -22035,7 +22035,7 @@ class mu extends vr {
22035
22035
  }
22036
22036
  class wr extends mu {
22037
22037
  constructor() {
22038
- super(...arguments), this.type = L.CDATA;
22038
+ super(...arguments), this.type = L$1.CDATA;
22039
22039
  }
22040
22040
  get nodeType() {
22041
22041
  return 4;
@@ -22043,7 +22043,7 @@ class wr extends mu {
22043
22043
  }
22044
22044
  class Ne extends mu {
22045
22045
  constructor() {
22046
- super(...arguments), this.type = L.Root;
22046
+ super(...arguments), this.type = L$1.Root;
22047
22047
  }
22048
22048
  get nodeType() {
22049
22049
  return 9;
@@ -22055,7 +22055,7 @@ class pu extends mu {
22055
22055
  * @param attribs Object mapping attribute names to attribute values.
22056
22056
  * @param children Children of the node.
22057
22057
  */
22058
- constructor(t, u, r = [], a = t === "script" ? L.Script : t === "style" ? L.Style : L.Tag) {
22058
+ constructor(t, u, r = [], a = t === "script" ? L$1.Script : t === "style" ? L$1.Style : L$1.Tag) {
22059
22059
  super(r), this.name = t, this.attribs = u, this.type = a;
22060
22060
  }
22061
22061
  get nodeType() {
@@ -22088,21 +22088,21 @@ function I(e) {
22088
22088
  return aa(e);
22089
22089
  }
22090
22090
  function wt$1(e) {
22091
- return e.type === L.CDATA;
22091
+ return e.type === L$1.CDATA;
22092
22092
  }
22093
22093
  function se(e) {
22094
- return e.type === L.Text;
22094
+ return e.type === L$1.Text;
22095
22095
  }
22096
22096
  function Nt$1(e) {
22097
- return e.type === L.Comment;
22097
+ return e.type === L$1.Comment;
22098
22098
  }
22099
22099
  function Qt$1(e) {
22100
- return e.type === L.Directive;
22100
+ return e.type === L$1.Directive;
22101
22101
  }
22102
22102
  function Te(e) {
22103
- return e.type === L.Root;
22103
+ return e.type === L$1.Root;
22104
22104
  }
22105
- function B$1(e) {
22105
+ function B(e) {
22106
22106
  return Object.prototype.hasOwnProperty.call(e, "children");
22107
22107
  }
22108
22108
  function ze(e, t = false) {
@@ -22167,12 +22167,12 @@ class ha {
22167
22167
  this.options.withEndIndices && (t.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(t);
22168
22168
  }
22169
22169
  onopentag(t, u) {
22170
- const r = this.options.xmlMode ? L.Tag : void 0, a = new pu(t, u, void 0, r);
22170
+ const r = this.options.xmlMode ? L$1.Tag : void 0, a = new pu(t, u, void 0, r);
22171
22171
  this.addNode(a), this.tagStack.push(a);
22172
22172
  }
22173
22173
  ontext(t) {
22174
22174
  const { lastNode: u } = this;
22175
- if (u && u.type === L.Text)
22175
+ if (u && u.type === L$1.Text)
22176
22176
  u.data += t, this.options.withEndIndices && (u.endIndex = this.parser.endIndex);
22177
22177
  else {
22178
22178
  const r = new We(t);
@@ -22180,7 +22180,7 @@ class ha {
22180
22180
  }
22181
22181
  }
22182
22182
  oncomment(t) {
22183
- if (this.lastNode && this.lastNode.type === L.Comment) {
22183
+ if (this.lastNode && this.lastNode.type === L$1.Comment) {
22184
22184
  this.lastNode.data += t;
22185
22185
  return;
22186
22186
  }
@@ -22462,20 +22462,20 @@ function Ir(e, t) {
22462
22462
  return xt$1(e, t);
22463
22463
  }
22464
22464
  function ya(e, t) {
22465
- return B$1(e) ? e.children.map((u) => Ir(u, t)).join("") : "";
22465
+ return B(e) ? e.children.map((u) => Ir(u, t)).join("") : "";
22466
22466
  }
22467
22467
  function ot(e) {
22468
22468
  return Array.isArray(e) ? e.map(ot).join("") : I(e) ? e.name === "br" ? `
22469
22469
  ` : ot(e.children) : wt$1(e) ? ot(e.children) : se(e) ? e.data : "";
22470
22470
  }
22471
22471
  function Le(e) {
22472
- return Array.isArray(e) ? e.map(Le).join("") : B$1(e) && !Nt$1(e) ? Le(e.children) : se(e) ? e.data : "";
22472
+ return Array.isArray(e) ? e.map(Le).join("") : B(e) && !Nt$1(e) ? Le(e.children) : se(e) ? e.data : "";
22473
22473
  }
22474
22474
  function dt(e) {
22475
- return Array.isArray(e) ? e.map(dt).join("") : B$1(e) && (e.type === L.Tag || wt$1(e)) ? dt(e.children) : se(e) ? e.data : "";
22475
+ return Array.isArray(e) ? e.map(dt).join("") : B(e) && (e.type === L$1.Tag || wt$1(e)) ? dt(e.children) : se(e) ? e.data : "";
22476
22476
  }
22477
22477
  function It$1(e) {
22478
- return B$1(e) ? e.children : [];
22478
+ return B(e) ? e.children : [];
22479
22479
  }
22480
22480
  function Sr(e) {
22481
22481
  return e.parent || null;
@@ -22580,7 +22580,7 @@ function Eu(e, t, u, r) {
22580
22580
  const c = i[0][n[0]++];
22581
22581
  if (e(c) && (a.push(c), --r <= 0))
22582
22582
  return a;
22583
- u && B$1(c) && c.children.length > 0 && (n.unshift(0), i.unshift(c.children));
22583
+ u && B(c) && c.children.length > 0 && (n.unshift(0), i.unshift(c.children));
22584
22584
  }
22585
22585
  }
22586
22586
  function Ua(e, t) {
@@ -22592,7 +22592,7 @@ function Tu(e, t, u = true) {
22592
22592
  const i = r[a];
22593
22593
  if (I(i) && e(i))
22594
22594
  return i;
22595
- if (u && B$1(i) && i.children.length > 0) {
22595
+ if (u && B(i) && i.children.length > 0) {
22596
22596
  const n = Tu(e, i.children, true);
22597
22597
  if (n)
22598
22598
  return n;
@@ -22601,7 +22601,7 @@ function Tu(e, t, u = true) {
22601
22601
  return null;
22602
22602
  }
22603
22603
  function yr(e, t) {
22604
- return (Array.isArray(t) ? t : [t]).some((u) => I(u) && e(u) || B$1(u) && yr(e, u.children));
22604
+ return (Array.isArray(t) ? t : [t]).some((u) => I(u) && e(u) || B(u) && yr(e, u.children));
22605
22605
  }
22606
22606
  function Fa(e, t) {
22607
22607
  const u = [], r = [Array.isArray(t) ? t : [t]], a = [0];
@@ -22613,7 +22613,7 @@ function Fa(e, t) {
22613
22613
  continue;
22614
22614
  }
22615
22615
  const i = r[0][a[0]++];
22616
- I(i) && e(i) && u.push(i), B$1(i) && i.children.length > 0 && (a.unshift(0), r.unshift(i.children));
22616
+ I(i) && e(i) && u.push(i), B(i) && i.children.length > 0 && (a.unshift(0), r.unshift(i.children));
22617
22617
  }
22618
22618
  }
22619
22619
  const ht = {
@@ -22676,32 +22676,32 @@ function Ga(e) {
22676
22676
  }
22677
22677
  return e;
22678
22678
  }
22679
- var Z;
22679
+ var Z$1;
22680
22680
  (function(e) {
22681
22681
  e[e.DISCONNECTED = 1] = "DISCONNECTED", e[e.PRECEDING = 2] = "PRECEDING", e[e.FOLLOWING = 4] = "FOLLOWING", e[e.CONTAINS = 8] = "CONTAINS", e[e.CONTAINED_BY = 16] = "CONTAINED_BY";
22682
- })(Z || (Z = {}));
22682
+ })(Z$1 || (Z$1 = {}));
22683
22683
  function Lr(e, t) {
22684
22684
  const u = [], r = [];
22685
22685
  if (e === t)
22686
22686
  return 0;
22687
- let a = B$1(e) ? e : e.parent;
22687
+ let a = B(e) ? e : e.parent;
22688
22688
  for (; a; )
22689
22689
  u.unshift(a), a = a.parent;
22690
- for (a = B$1(t) ? t : t.parent; a; )
22690
+ for (a = B(t) ? t : t.parent; a; )
22691
22691
  r.unshift(a), a = a.parent;
22692
22692
  const i = Math.min(u.length, r.length);
22693
22693
  let n = 0;
22694
22694
  for (; n < i && u[n] === r[n]; )
22695
22695
  n++;
22696
22696
  if (n === 0)
22697
- return Z.DISCONNECTED;
22697
+ return Z$1.DISCONNECTED;
22698
22698
  const c = u[n - 1], h = c.children, m = u[n], f = r[n];
22699
- return h.indexOf(m) > h.indexOf(f) ? c === t ? Z.FOLLOWING | Z.CONTAINED_BY : Z.FOLLOWING : c === e ? Z.PRECEDING | Z.CONTAINS : Z.PRECEDING;
22699
+ return h.indexOf(m) > h.indexOf(f) ? c === t ? Z$1.FOLLOWING | Z$1.CONTAINED_BY : Z$1.FOLLOWING : c === e ? Z$1.PRECEDING | Z$1.CONTAINS : Z$1.PRECEDING;
22700
22700
  }
22701
22701
  function ke(e) {
22702
22702
  return e = e.filter((t, u, r) => !r.includes(t, u + 1)), e.sort((t, u) => {
22703
22703
  const r = Lr(t, u);
22704
- return r & Z.PRECEDING ? -1 : r & Z.FOLLOWING ? 1 : 0;
22704
+ return r & Z$1.PRECEDING ? -1 : r & Z$1.FOLLOWING ? 1 : 0;
22705
22705
  }), e;
22706
22706
  }
22707
22707
  function Wa(e) {
@@ -22715,20 +22715,20 @@ function za(e) {
22715
22715
  items: De("entry", u).map((n) => {
22716
22716
  var c;
22717
22717
  const { children: h } = n, m = { media: Rr(h) };
22718
- Q(m, "id", "id", h), Q(m, "title", "title", h);
22718
+ Q$1(m, "id", "id", h), Q$1(m, "title", "title", h);
22719
22719
  const f = (c = lt("link", h)) === null || c === void 0 ? void 0 : c.attribs.href;
22720
22720
  f && (m.link = f);
22721
- const T2 = fe("summary", h) || fe("content", h);
22722
- T2 && (m.description = T2);
22721
+ const T = fe("summary", h) || fe("content", h);
22722
+ T && (m.description = T);
22723
22723
  const A = fe("updated", h);
22724
22724
  return A && (m.pubDate = new Date(A)), m;
22725
22725
  })
22726
22726
  };
22727
- Q(r, "id", "id", u), Q(r, "title", "title", u);
22727
+ Q$1(r, "id", "id", u), Q$1(r, "title", "title", u);
22728
22728
  const a = (t = lt("link", u)) === null || t === void 0 ? void 0 : t.attribs.href;
22729
- a && (r.link = a), Q(r, "description", "subtitle", u);
22729
+ a && (r.link = a), Q$1(r, "description", "subtitle", u);
22730
22730
  const i = fe("updated", u);
22731
- return i && (r.updated = new Date(i)), Q(r, "author", "email", u, true), r;
22731
+ return i && (r.updated = new Date(i)), Q$1(r, "author", "email", u, true), r;
22732
22732
  }
22733
22733
  function Qa(e) {
22734
22734
  var t, u;
@@ -22737,14 +22737,14 @@ function Qa(e) {
22737
22737
  id: "",
22738
22738
  items: De("item", e.children).map((n) => {
22739
22739
  const { children: c } = n, h = { media: Rr(c) };
22740
- Q(h, "id", "guid", c), Q(h, "title", "title", c), Q(h, "link", "link", c), Q(h, "description", "description", c);
22740
+ Q$1(h, "id", "guid", c), Q$1(h, "title", "title", c), Q$1(h, "link", "link", c), Q$1(h, "description", "description", c);
22741
22741
  const m = fe("pubDate", c) || fe("dc:date", c);
22742
22742
  return m && (h.pubDate = new Date(m)), h;
22743
22743
  })
22744
22744
  };
22745
- Q(a, "title", "title", r), Q(a, "link", "link", r), Q(a, "description", "description", r);
22745
+ Q$1(a, "title", "title", r), Q$1(a, "link", "link", r), Q$1(a, "description", "description", r);
22746
22746
  const i = fe("lastBuildDate", r);
22747
- return i && (a.updated = new Date(i)), Q(a, "author", "managingEditor", r, true), a;
22747
+ return i && (a.updated = new Date(i)), Q$1(a, "author", "managingEditor", r, true), a;
22748
22748
  }
22749
22749
  const Ka = ["url", "type", "lang"], Xa = [
22750
22750
  "fileSize",
@@ -22775,7 +22775,7 @@ function lt(e, t) {
22775
22775
  function fe(e, t, u = false) {
22776
22776
  return Le(De(e, t, u, 1)).trim();
22777
22777
  }
22778
- function Q(e, t, u, r, a = false) {
22778
+ function Q$1(e, t, u, r, a = false) {
22779
22779
  const i = fe(u, r, a);
22780
22780
  i && (e[t] = i);
22781
22781
  }
@@ -22785,7 +22785,7 @@ function Za(e) {
22785
22785
  const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22786
22786
  __proto__: null,
22787
22787
  get DocumentPosition() {
22788
- return Z;
22788
+ return Z$1;
22789
22789
  },
22790
22790
  append: Pa,
22791
22791
  appendChild: ka,
@@ -22811,7 +22811,7 @@ const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
22811
22811
  getSiblings: Cr,
22812
22812
  getText: ot,
22813
22813
  hasAttrib: La,
22814
- hasChildren: B$1,
22814
+ hasChildren: B,
22815
22815
  innerText: dt,
22816
22816
  isCDATA: wt$1,
22817
22817
  isComment: Nt$1,
@@ -22831,7 +22831,7 @@ const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
22831
22831
  }, Symbol.toStringTag, { value: "Module" })), Ja = {
22832
22832
  _useHtmlParser2: false
22833
22833
  };
22834
- function Kt(e, t) {
22834
+ function Kt$1(e, t) {
22835
22835
  if (!e)
22836
22836
  return t ?? Ja;
22837
22837
  const u = {
@@ -22850,7 +22850,7 @@ function ei(e, t) {
22850
22850
  function ti(e, t) {
22851
22851
  const u = ei(e) ? (t = e, void 0) : e, r = {
22852
22852
  ...this === null || this === void 0 ? void 0 : this._options,
22853
- ...Kt(t)
22853
+ ...Kt$1(t)
22854
22854
  };
22855
22855
  return Dr(this, u, r);
22856
22856
  }
@@ -22936,7 +22936,7 @@ var ve;
22936
22936
  (function(e) {
22937
22937
  e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation";
22938
22938
  })(ve || (ve = {}));
22939
- function Xt$1(e) {
22939
+ function Xt(e) {
22940
22940
  const t = e.indexOf("<");
22941
22941
  if (t === -1 || t > e.length - 3)
22942
22942
  return false;
@@ -22992,26 +22992,26 @@ function mi(e) {
22992
22992
  var t;
22993
22993
  return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = li.get(e)) !== null && t !== void 0 ? t : e;
22994
22994
  }
22995
- var V;
22995
+ var V$1;
22996
22996
  (function(e) {
22997
22997
  e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
22998
- })(V || (V = {}));
22998
+ })(V$1 || (V$1 = {}));
22999
22999
  const pi = 32;
23000
23000
  var be;
23001
23001
  (function(e) {
23002
23002
  e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
23003
23003
  })(be || (be = {}));
23004
- function Zt$1(e) {
23005
- return e >= V.ZERO && e <= V.NINE;
23004
+ function Zt(e) {
23005
+ return e >= V$1.ZERO && e <= V$1.NINE;
23006
23006
  }
23007
23007
  function fi(e) {
23008
- return e >= V.UPPER_A && e <= V.UPPER_F || e >= V.LOWER_A && e <= V.LOWER_F;
23008
+ return e >= V$1.UPPER_A && e <= V$1.UPPER_F || e >= V$1.LOWER_A && e <= V$1.LOWER_F;
23009
23009
  }
23010
23010
  function bi(e) {
23011
- return e >= V.UPPER_A && e <= V.UPPER_Z || e >= V.LOWER_A && e <= V.LOWER_Z || Zt$1(e);
23011
+ return e >= V$1.UPPER_A && e <= V$1.UPPER_Z || e >= V$1.LOWER_A && e <= V$1.LOWER_Z || Zt(e);
23012
23012
  }
23013
23013
  function Ei(e) {
23014
- return e === V.EQUALS || bi(e);
23014
+ return e === V$1.EQUALS || bi(e);
23015
23015
  }
23016
23016
  var q$1;
23017
23017
  (function(e) {
@@ -23043,7 +23043,7 @@ let Ti = class {
23043
23043
  write(t, u) {
23044
23044
  switch (this.state) {
23045
23045
  case q$1.EntityStart:
23046
- return t.charCodeAt(u) === V.NUM ? (this.state = q$1.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = q$1.NamedEntity, this.stateNamedEntity(t, u));
23046
+ return t.charCodeAt(u) === V$1.NUM ? (this.state = q$1.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = q$1.NamedEntity, this.stateNamedEntity(t, u));
23047
23047
  case q$1.NumericStart:
23048
23048
  return this.stateNumericStart(t, u);
23049
23049
  case q$1.NumericDecimal:
@@ -23064,7 +23064,7 @@ let Ti = class {
23064
23064
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
23065
23065
  */
23066
23066
  stateNumericStart(t, u) {
23067
- return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V.LOWER_X ? (this.state = q$1.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = q$1.NumericDecimal, this.stateNumericDecimal(t, u));
23067
+ return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V$1.LOWER_X ? (this.state = q$1.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = q$1.NumericDecimal, this.stateNumericDecimal(t, u));
23068
23068
  }
23069
23069
  addToNumericResult(t, u, r, a) {
23070
23070
  if (u !== r) {
@@ -23085,7 +23085,7 @@ let Ti = class {
23085
23085
  const r = u;
23086
23086
  for (; u < t.length; ) {
23087
23087
  const a = t.charCodeAt(u);
23088
- if (Zt$1(a) || fi(a))
23088
+ if (Zt(a) || fi(a))
23089
23089
  u += 1;
23090
23090
  else
23091
23091
  return this.addToNumericResult(t, r, u, 16), this.emitNumericEntity(a, 3);
@@ -23105,7 +23105,7 @@ let Ti = class {
23105
23105
  const r = u;
23106
23106
  for (; u < t.length; ) {
23107
23107
  const a = t.charCodeAt(u);
23108
- if (Zt$1(a))
23108
+ if (Zt(a))
23109
23109
  u += 1;
23110
23110
  else
23111
23111
  return this.addToNumericResult(t, r, u, 10), this.emitNumericEntity(a, 2);
@@ -23129,11 +23129,11 @@ let Ti = class {
23129
23129
  var r;
23130
23130
  if (this.consumed <= u)
23131
23131
  return (r = this.errors) === null || r === void 0 || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
23132
- if (t === V.SEMI)
23132
+ if (t === V$1.SEMI)
23133
23133
  this.consumed += 1;
23134
23134
  else if (this.decodeMode === ue.Strict)
23135
23135
  return 0;
23136
- return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
23136
+ return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V$1.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
23137
23137
  }
23138
23138
  /**
23139
23139
  * Parses a named entity.
@@ -23155,7 +23155,7 @@ let Ti = class {
23155
23155
  (i === 0 || // And there should be no invalid characters.
23156
23156
  Ei(n)) ? 0 : this.emitNotTerminatedNamedEntity();
23157
23157
  if (a = r[this.treeIndex], i = (a & be.VALUE_LENGTH) >> 14, i !== 0) {
23158
- if (n === V.SEMI)
23158
+ if (n === V$1.SEMI)
23159
23159
  return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
23160
23160
  this.decodeMode !== ue.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
23161
23161
  }
@@ -23233,10 +23233,10 @@ var x;
23233
23233
  (function(e) {
23234
23234
  e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
23235
23235
  })(x || (x = {}));
23236
- var _;
23236
+ var _$1;
23237
23237
  (function(e) {
23238
23238
  e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
23239
- })(_ || (_ = {}));
23239
+ })(_$1 || (_$1 = {}));
23240
23240
  function ne(e) {
23241
23241
  return e === x.Space || e === x.NewLine || e === x.Tab || e === x.FormFeed || e === x.CarriageReturn;
23242
23242
  }
@@ -23250,7 +23250,7 @@ var re;
23250
23250
  (function(e) {
23251
23251
  e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
23252
23252
  })(re || (re = {}));
23253
- const F$1 = {
23253
+ const F = {
23254
23254
  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
23255
23255
  // CDATA[
23256
23256
  CdataEnd: new Uint8Array([93, 93, 62]),
@@ -23281,10 +23281,10 @@ const F$1 = {
23281
23281
  };
23282
23282
  let Ai = class {
23283
23283
  constructor({ xmlMode: t = false, decodeEntities: u = true }, r) {
23284
- this.cbs = r, this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = _.Text, this.isSpecial = false, this.running = true, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = u, this.entityDecoder = new Ti(t ? hi : di, (a, i) => this.emitCodePoint(a, i));
23284
+ this.cbs = r, this.state = _$1.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = _$1.Text, this.isSpecial = false, this.running = true, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = u, this.entityDecoder = new Ti(t ? hi : di, (a, i) => this.emitCodePoint(a, i));
23285
23285
  }
23286
23286
  reset() {
23287
- this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = _.Text, this.currentSequence = void 0, this.running = true, this.offset = 0;
23287
+ this.state = _$1.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = _$1.Text, this.currentSequence = void 0, this.running = true, this.offset = 0;
23288
23288
  }
23289
23289
  write(t) {
23290
23290
  this.offset += this.buffer.length, this.buffer = t, this.parse();
@@ -23299,7 +23299,7 @@ let Ai = class {
23299
23299
  this.running = true, this.index < this.buffer.length + this.offset && this.parse();
23300
23300
  }
23301
23301
  stateText(t) {
23302
- t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === x.Amp && this.startEntity();
23302
+ t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _$1.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === x.Amp && this.startEntity();
23303
23303
  }
23304
23304
  stateSpecialStartSequence(t) {
23305
23305
  const u = this.sequenceIndex === this.currentSequence.length;
@@ -23315,7 +23315,7 @@ let Ai = class {
23315
23315
  this.sequenceIndex++;
23316
23316
  return;
23317
23317
  }
23318
- this.sequenceIndex = 0, this.state = _.InTagName, this.stateInTagName(t);
23318
+ this.sequenceIndex = 0, this.state = _$1.InTagName, this.stateInTagName(t);
23319
23319
  }
23320
23320
  /** Look for an end tag. For <title> tags, also decode entities. */
23321
23321
  stateInSpecialTag(t) {
@@ -23331,10 +23331,10 @@ let Ai = class {
23331
23331
  }
23332
23332
  this.sequenceIndex = 0;
23333
23333
  }
23334
- (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === F$1.TitleEnd ? this.decodeEntities && t === x.Amp && this.startEntity() : this.fastForwardTo(x.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === x.Lt);
23334
+ (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === F.TitleEnd ? this.decodeEntities && t === x.Amp && this.startEntity() : this.fastForwardTo(x.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === x.Lt);
23335
23335
  }
23336
23336
  stateCDATASequence(t) {
23337
- t === F$1.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === F$1.Cdata.length && (this.state = _.InCommentLike, this.currentSequence = F$1.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = _.InDeclaration, this.stateInDeclaration(t));
23337
+ t === F.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === F.Cdata.length && (this.state = _$1.InCommentLike, this.currentSequence = F.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = _$1.InDeclaration, this.stateInDeclaration(t));
23338
23338
  }
23339
23339
  /**
23340
23340
  * When we wait for one specific character, we can speed things up
@@ -23357,7 +23357,7 @@ let Ai = class {
23357
23357
  * - All characters but the start character of the sequence can be skipped.
23358
23358
  */
23359
23359
  stateInCommentLike(t) {
23360
- t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F$1.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = _.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
23360
+ t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = _$1.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
23361
23361
  }
23362
23362
  /**
23363
23363
  * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
@@ -23369,47 +23369,47 @@ let Ai = class {
23369
23369
  return this.xmlMode ? !st(t) : gi(t);
23370
23370
  }
23371
23371
  startSpecial(t, u) {
23372
- this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _.SpecialStartSequence;
23372
+ this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _$1.SpecialStartSequence;
23373
23373
  }
23374
23374
  stateBeforeTagName(t) {
23375
23375
  if (t === x.ExclamationMark)
23376
- this.state = _.BeforeDeclaration, this.sectionStart = this.index + 1;
23376
+ this.state = _$1.BeforeDeclaration, this.sectionStart = this.index + 1;
23377
23377
  else if (t === x.Questionmark)
23378
- this.state = _.InProcessingInstruction, this.sectionStart = this.index + 1;
23378
+ this.state = _$1.InProcessingInstruction, this.sectionStart = this.index + 1;
23379
23379
  else if (this.isTagStartChar(t)) {
23380
23380
  const u = t | 32;
23381
- this.sectionStart = this.index, this.xmlMode ? this.state = _.InTagName : u === F$1.ScriptEnd[2] ? this.state = _.BeforeSpecialS : u === F$1.TitleEnd[2] || u === F$1.XmpEnd[2] ? this.state = _.BeforeSpecialT : this.state = _.InTagName;
23382
- } else t === x.Slash ? this.state = _.BeforeClosingTagName : (this.state = _.Text, this.stateText(t));
23381
+ this.sectionStart = this.index, this.xmlMode ? this.state = _$1.InTagName : u === F.ScriptEnd[2] ? this.state = _$1.BeforeSpecialS : u === F.TitleEnd[2] || u === F.XmpEnd[2] ? this.state = _$1.BeforeSpecialT : this.state = _$1.InTagName;
23382
+ } else t === x.Slash ? this.state = _$1.BeforeClosingTagName : (this.state = _$1.Text, this.stateText(t));
23383
23383
  }
23384
23384
  stateInTagName(t) {
23385
- st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
23385
+ st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t));
23386
23386
  }
23387
23387
  stateBeforeClosingTagName(t) {
23388
- ne(t) || (t === x.Gt ? this.state = _.Text : (this.state = this.isTagStartChar(t) ? _.InClosingTagName : _.InSpecialComment, this.sectionStart = this.index));
23388
+ ne(t) || (t === x.Gt ? this.state = _$1.Text : (this.state = this.isTagStartChar(t) ? _$1.InClosingTagName : _$1.InSpecialComment, this.sectionStart = this.index));
23389
23389
  }
23390
23390
  stateInClosingTagName(t) {
23391
- (t === x.Gt || ne(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.AfterClosingTagName, this.stateAfterClosingTagName(t));
23391
+ (t === x.Gt || ne(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _$1.AfterClosingTagName, this.stateAfterClosingTagName(t));
23392
23392
  }
23393
23393
  stateAfterClosingTagName(t) {
23394
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _.Text, this.sectionStart = this.index + 1);
23394
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _$1.Text, this.sectionStart = this.index + 1);
23395
23395
  }
23396
23396
  stateBeforeAttributeName(t) {
23397
- t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _.InSpecialTag, this.sequenceIndex = 0) : this.state = _.Text, this.sectionStart = this.index + 1) : t === x.Slash ? this.state = _.InSelfClosingTag : ne(t) || (this.state = _.InAttributeName, this.sectionStart = this.index);
23397
+ t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _$1.InSpecialTag, this.sequenceIndex = 0) : this.state = _$1.Text, this.sectionStart = this.index + 1) : t === x.Slash ? this.state = _$1.InSelfClosingTag : ne(t) || (this.state = _$1.InAttributeName, this.sectionStart = this.index);
23398
23398
  }
23399
23399
  stateInSelfClosingTag(t) {
23400
- t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _.Text, this.sectionStart = this.index + 1, this.isSpecial = false) : ne(t) || (this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
23400
+ t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _$1.Text, this.sectionStart = this.index + 1, this.isSpecial = false) : ne(t) || (this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t));
23401
23401
  }
23402
23402
  stateInAttributeName(t) {
23403
- (t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _.AfterAttributeName, this.stateAfterAttributeName(t));
23403
+ (t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _$1.AfterAttributeName, this.stateAfterAttributeName(t));
23404
23404
  }
23405
23405
  stateAfterAttributeName(t) {
23406
- t === x.Eq ? this.state = _.BeforeAttributeValue : t === x.Slash || t === x.Gt ? (this.cbs.onattribend(re.NoValue, this.sectionStart), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : ne(t) || (this.cbs.onattribend(re.NoValue, this.sectionStart), this.state = _.InAttributeName, this.sectionStart = this.index);
23406
+ t === x.Eq ? this.state = _$1.BeforeAttributeValue : t === x.Slash || t === x.Gt ? (this.cbs.onattribend(re.NoValue, this.sectionStart), this.sectionStart = -1, this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t)) : ne(t) || (this.cbs.onattribend(re.NoValue, this.sectionStart), this.state = _$1.InAttributeName, this.sectionStart = this.index);
23407
23407
  }
23408
23408
  stateBeforeAttributeValue(t) {
23409
- t === x.DoubleQuote ? (this.state = _.InAttributeValueDq, this.sectionStart = this.index + 1) : t === x.SingleQuote ? (this.state = _.InAttributeValueSq, this.sectionStart = this.index + 1) : ne(t) || (this.sectionStart = this.index, this.state = _.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
23409
+ t === x.DoubleQuote ? (this.state = _$1.InAttributeValueDq, this.sectionStart = this.index + 1) : t === x.SingleQuote ? (this.state = _$1.InAttributeValueSq, this.sectionStart = this.index + 1) : ne(t) || (this.sectionStart = this.index, this.state = _$1.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
23410
23410
  }
23411
23411
  handleInAttributeValue(t, u) {
23412
- t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re.Double : re.Single, this.index + 1), this.state = _.BeforeAttributeName) : this.decodeEntities && t === x.Amp && this.startEntity();
23412
+ t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re.Double : re.Single, this.index + 1), this.state = _$1.BeforeAttributeName) : this.decodeEntities && t === x.Amp && this.startEntity();
23413
23413
  }
23414
23414
  stateInAttributeValueDoubleQuotes(t) {
23415
23415
  this.handleInAttributeValue(t, x.DoubleQuote);
@@ -23418,47 +23418,47 @@ let Ai = class {
23418
23418
  this.handleInAttributeValue(t, x.SingleQuote);
23419
23419
  }
23420
23420
  stateInAttributeValueNoQuotes(t) {
23421
- ne(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re.Unquoted, this.index), this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === x.Amp && this.startEntity();
23421
+ ne(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re.Unquoted, this.index), this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === x.Amp && this.startEntity();
23422
23422
  }
23423
23423
  stateBeforeDeclaration(t) {
23424
- t === x.OpeningSquareBracket ? (this.state = _.CDATASequence, this.sequenceIndex = 0) : this.state = t === x.Dash ? _.BeforeComment : _.InDeclaration;
23424
+ t === x.OpeningSquareBracket ? (this.state = _$1.CDATASequence, this.sequenceIndex = 0) : this.state = t === x.Dash ? _$1.BeforeComment : _$1.InDeclaration;
23425
23425
  }
23426
23426
  stateInDeclaration(t) {
23427
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
23427
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _$1.Text, this.sectionStart = this.index + 1);
23428
23428
  }
23429
23429
  stateInProcessingInstruction(t) {
23430
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
23430
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _$1.Text, this.sectionStart = this.index + 1);
23431
23431
  }
23432
23432
  stateBeforeComment(t) {
23433
- t === x.Dash ? (this.state = _.InCommentLike, this.currentSequence = F$1.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = _.InDeclaration;
23433
+ t === x.Dash ? (this.state = _$1.InCommentLike, this.currentSequence = F.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = _$1.InDeclaration;
23434
23434
  }
23435
23435
  stateInSpecialComment(t) {
23436
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _.Text, this.sectionStart = this.index + 1);
23436
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _$1.Text, this.sectionStart = this.index + 1);
23437
23437
  }
23438
23438
  stateBeforeSpecialS(t) {
23439
23439
  const u = t | 32;
23440
- u === F$1.ScriptEnd[3] ? this.startSpecial(F$1.ScriptEnd, 4) : u === F$1.StyleEnd[3] ? this.startSpecial(F$1.StyleEnd, 4) : (this.state = _.InTagName, this.stateInTagName(t));
23440
+ u === F.ScriptEnd[3] ? this.startSpecial(F.ScriptEnd, 4) : u === F.StyleEnd[3] ? this.startSpecial(F.StyleEnd, 4) : (this.state = _$1.InTagName, this.stateInTagName(t));
23441
23441
  }
23442
23442
  stateBeforeSpecialT(t) {
23443
23443
  switch (t | 32) {
23444
- case F$1.TitleEnd[3]: {
23445
- this.startSpecial(F$1.TitleEnd, 4);
23444
+ case F.TitleEnd[3]: {
23445
+ this.startSpecial(F.TitleEnd, 4);
23446
23446
  break;
23447
23447
  }
23448
- case F$1.TextareaEnd[3]: {
23449
- this.startSpecial(F$1.TextareaEnd, 4);
23448
+ case F.TextareaEnd[3]: {
23449
+ this.startSpecial(F.TextareaEnd, 4);
23450
23450
  break;
23451
23451
  }
23452
- case F$1.XmpEnd[3]: {
23453
- this.startSpecial(F$1.XmpEnd, 4);
23452
+ case F.XmpEnd[3]: {
23453
+ this.startSpecial(F.XmpEnd, 4);
23454
23454
  break;
23455
23455
  }
23456
23456
  default:
23457
- this.state = _.InTagName, this.stateInTagName(t);
23457
+ this.state = _$1.InTagName, this.stateInTagName(t);
23458
23458
  }
23459
23459
  }
23460
23460
  startEntity() {
23461
- this.baseState = this.state, this.state = _.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? ue.Strict : this.baseState === _.Text || this.baseState === _.InSpecialTag ? ue.Legacy : ue.Attribute);
23461
+ this.baseState = this.state, this.state = _$1.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? ue.Strict : this.baseState === _$1.Text || this.baseState === _$1.InSpecialTag ? ue.Legacy : ue.Attribute);
23462
23462
  }
23463
23463
  stateInEntity() {
23464
23464
  const t = this.entityDecoder.write(this.buffer, this.index - this.offset);
@@ -23468,7 +23468,7 @@ let Ai = class {
23468
23468
  * Remove data that has already been consumed from the buffer.
23469
23469
  */
23470
23470
  cleanup() {
23471
- this.running && this.sectionStart !== this.index && (this.state === _.Text || this.state === _.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === _.InAttributeValueDq || this.state === _.InAttributeValueSq || this.state === _.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
23471
+ this.running && this.sectionStart !== this.index && (this.state === _$1.Text || this.state === _$1.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === _$1.InAttributeValueDq || this.state === _$1.InAttributeValueSq || this.state === _$1.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
23472
23472
  }
23473
23473
  shouldContinue() {
23474
23474
  return this.index < this.buffer.length + this.offset && this.running;
@@ -23482,107 +23482,107 @@ let Ai = class {
23482
23482
  for (; this.shouldContinue(); ) {
23483
23483
  const t = this.buffer.charCodeAt(this.index - this.offset);
23484
23484
  switch (this.state) {
23485
- case _.Text: {
23485
+ case _$1.Text: {
23486
23486
  this.stateText(t);
23487
23487
  break;
23488
23488
  }
23489
- case _.SpecialStartSequence: {
23489
+ case _$1.SpecialStartSequence: {
23490
23490
  this.stateSpecialStartSequence(t);
23491
23491
  break;
23492
23492
  }
23493
- case _.InSpecialTag: {
23493
+ case _$1.InSpecialTag: {
23494
23494
  this.stateInSpecialTag(t);
23495
23495
  break;
23496
23496
  }
23497
- case _.CDATASequence: {
23497
+ case _$1.CDATASequence: {
23498
23498
  this.stateCDATASequence(t);
23499
23499
  break;
23500
23500
  }
23501
- case _.InAttributeValueDq: {
23501
+ case _$1.InAttributeValueDq: {
23502
23502
  this.stateInAttributeValueDoubleQuotes(t);
23503
23503
  break;
23504
23504
  }
23505
- case _.InAttributeName: {
23505
+ case _$1.InAttributeName: {
23506
23506
  this.stateInAttributeName(t);
23507
23507
  break;
23508
23508
  }
23509
- case _.InCommentLike: {
23509
+ case _$1.InCommentLike: {
23510
23510
  this.stateInCommentLike(t);
23511
23511
  break;
23512
23512
  }
23513
- case _.InSpecialComment: {
23513
+ case _$1.InSpecialComment: {
23514
23514
  this.stateInSpecialComment(t);
23515
23515
  break;
23516
23516
  }
23517
- case _.BeforeAttributeName: {
23517
+ case _$1.BeforeAttributeName: {
23518
23518
  this.stateBeforeAttributeName(t);
23519
23519
  break;
23520
23520
  }
23521
- case _.InTagName: {
23521
+ case _$1.InTagName: {
23522
23522
  this.stateInTagName(t);
23523
23523
  break;
23524
23524
  }
23525
- case _.InClosingTagName: {
23525
+ case _$1.InClosingTagName: {
23526
23526
  this.stateInClosingTagName(t);
23527
23527
  break;
23528
23528
  }
23529
- case _.BeforeTagName: {
23529
+ case _$1.BeforeTagName: {
23530
23530
  this.stateBeforeTagName(t);
23531
23531
  break;
23532
23532
  }
23533
- case _.AfterAttributeName: {
23533
+ case _$1.AfterAttributeName: {
23534
23534
  this.stateAfterAttributeName(t);
23535
23535
  break;
23536
23536
  }
23537
- case _.InAttributeValueSq: {
23537
+ case _$1.InAttributeValueSq: {
23538
23538
  this.stateInAttributeValueSingleQuotes(t);
23539
23539
  break;
23540
23540
  }
23541
- case _.BeforeAttributeValue: {
23541
+ case _$1.BeforeAttributeValue: {
23542
23542
  this.stateBeforeAttributeValue(t);
23543
23543
  break;
23544
23544
  }
23545
- case _.BeforeClosingTagName: {
23545
+ case _$1.BeforeClosingTagName: {
23546
23546
  this.stateBeforeClosingTagName(t);
23547
23547
  break;
23548
23548
  }
23549
- case _.AfterClosingTagName: {
23549
+ case _$1.AfterClosingTagName: {
23550
23550
  this.stateAfterClosingTagName(t);
23551
23551
  break;
23552
23552
  }
23553
- case _.BeforeSpecialS: {
23553
+ case _$1.BeforeSpecialS: {
23554
23554
  this.stateBeforeSpecialS(t);
23555
23555
  break;
23556
23556
  }
23557
- case _.BeforeSpecialT: {
23557
+ case _$1.BeforeSpecialT: {
23558
23558
  this.stateBeforeSpecialT(t);
23559
23559
  break;
23560
23560
  }
23561
- case _.InAttributeValueNq: {
23561
+ case _$1.InAttributeValueNq: {
23562
23562
  this.stateInAttributeValueNoQuotes(t);
23563
23563
  break;
23564
23564
  }
23565
- case _.InSelfClosingTag: {
23565
+ case _$1.InSelfClosingTag: {
23566
23566
  this.stateInSelfClosingTag(t);
23567
23567
  break;
23568
23568
  }
23569
- case _.InDeclaration: {
23569
+ case _$1.InDeclaration: {
23570
23570
  this.stateInDeclaration(t);
23571
23571
  break;
23572
23572
  }
23573
- case _.BeforeDeclaration: {
23573
+ case _$1.BeforeDeclaration: {
23574
23574
  this.stateBeforeDeclaration(t);
23575
23575
  break;
23576
23576
  }
23577
- case _.BeforeComment: {
23577
+ case _$1.BeforeComment: {
23578
23578
  this.stateBeforeComment(t);
23579
23579
  break;
23580
23580
  }
23581
- case _.InProcessingInstruction: {
23581
+ case _$1.InProcessingInstruction: {
23582
23582
  this.stateInProcessingInstruction(t);
23583
23583
  break;
23584
23584
  }
23585
- case _.InEntity: {
23585
+ case _$1.InEntity: {
23586
23586
  this.stateInEntity();
23587
23587
  break;
23588
23588
  }
@@ -23592,15 +23592,15 @@ let Ai = class {
23592
23592
  this.cleanup();
23593
23593
  }
23594
23594
  finish() {
23595
- this.state === _.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
23595
+ this.state === _$1.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
23596
23596
  }
23597
23597
  /** Handle any trailing data. */
23598
23598
  handleTrailingData() {
23599
23599
  const t = this.buffer.length + this.offset;
23600
- this.sectionStart >= t || (this.state === _.InCommentLike ? this.currentSequence === F$1.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === _.InTagName || this.state === _.BeforeAttributeName || this.state === _.BeforeAttributeValue || this.state === _.AfterAttributeName || this.state === _.InAttributeName || this.state === _.InAttributeValueSq || this.state === _.InAttributeValueDq || this.state === _.InAttributeValueNq || this.state === _.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
23600
+ this.sectionStart >= t || (this.state === _$1.InCommentLike ? this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === _$1.InTagName || this.state === _$1.BeforeAttributeName || this.state === _$1.BeforeAttributeValue || this.state === _$1.AfterAttributeName || this.state === _$1.InAttributeName || this.state === _$1.InAttributeValueSq || this.state === _$1.InAttributeValueDq || this.state === _$1.InAttributeValueNq || this.state === _$1.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
23601
23601
  }
23602
23602
  emitCodePoint(t, u) {
23603
- this.baseState !== _.Text && this.baseState !== _.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
23603
+ this.baseState !== _$1.Text && this.baseState !== _$1.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
23604
23604
  }
23605
23605
  };
23606
23606
  const ye = /* @__PURE__ */ new Set([
@@ -23743,17 +23743,17 @@ let xi = class {
23743
23743
  onclosetag(t, u) {
23744
23744
  var r, a, i, n, c, h, m, f;
23745
23745
  this.endIndex = u;
23746
- let T2 = this.getSlice(t, u);
23747
- if (this.lowerCaseTagNames && (T2 = T2.toLowerCase()), this.htmlMode && (ju.has(T2) || Vu.has(T2)) && this.foreignContext.shift(), this.isVoidElement(T2))
23748
- this.htmlMode && T2 === "br" && ((n = (i = this.cbs).onopentagname) === null || n === void 0 || n.call(i, "br"), (h = (c = this.cbs).onopentag) === null || h === void 0 || h.call(c, "br", {}, true), (f = (m = this.cbs).onclosetag) === null || f === void 0 || f.call(m, "br", false));
23746
+ let T = this.getSlice(t, u);
23747
+ if (this.lowerCaseTagNames && (T = T.toLowerCase()), this.htmlMode && (ju.has(T) || Vu.has(T)) && this.foreignContext.shift(), this.isVoidElement(T))
23748
+ this.htmlMode && T === "br" && ((n = (i = this.cbs).onopentagname) === null || n === void 0 || n.call(i, "br"), (h = (c = this.cbs).onopentag) === null || h === void 0 || h.call(c, "br", {}, true), (f = (m = this.cbs).onclosetag) === null || f === void 0 || f.call(m, "br", false));
23749
23749
  else {
23750
- const A = this.stack.indexOf(T2);
23750
+ const A = this.stack.indexOf(T);
23751
23751
  if (A !== -1)
23752
23752
  for (let w = 0; w <= A; w++) {
23753
23753
  const v = this.stack.shift();
23754
23754
  (a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, v, w !== A);
23755
23755
  }
23756
- else this.htmlMode && T2 === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(true));
23756
+ else this.htmlMode && T === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(true));
23757
23757
  }
23758
23758
  this.startIndex = u + 1;
23759
23759
  }
@@ -23817,10 +23817,10 @@ let xi = class {
23817
23817
  }
23818
23818
  /** @internal */
23819
23819
  oncdata(t, u, r) {
23820
- var a, i, n, c, h, m, f, T2, A, w;
23820
+ var a, i, n, c, h, m, f, T, A, w;
23821
23821
  this.endIndex = u;
23822
23822
  const v = this.getSlice(t, u - r);
23823
- !this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T2 = (f = this.cbs).oncomment) === null || T2 === void 0 || T2.call(f, `[CDATA[${v}]]`), (w = (A = this.cbs).oncommentend) === null || w === void 0 || w.call(A)), this.startIndex = u + 1;
23823
+ !this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T = (f = this.cbs).oncomment) === null || T === void 0 || T.call(f, `[CDATA[${v}]]`), (w = (A = this.cbs).oncommentend) === null || w === void 0 || w.call(A)), this.startIndex = u + 1;
23824
23824
  }
23825
23825
  /** @internal */
23826
23826
  onend() {
@@ -24214,17 +24214,17 @@ var N;
24214
24214
  (function(e) {
24215
24215
  e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator";
24216
24216
  })(N || (N = {}));
24217
- var H;
24217
+ var H$1;
24218
24218
  (function(e) {
24219
24219
  e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start";
24220
- })(H || (H = {}));
24220
+ })(H$1 || (H$1 = {}));
24221
24221
  const Wu = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, Bi = /\\([\da-f]{1,6}\s?|(\s)|.)/gi, Ui = /* @__PURE__ */ new Map([
24222
- [126, H.Element],
24223
- [94, H.Start],
24224
- [36, H.End],
24225
- [42, H.Any],
24226
- [33, H.Not],
24227
- [124, H.Hyphen]
24222
+ [126, H$1.Element],
24223
+ [94, H$1.Start],
24224
+ [36, H$1.End],
24225
+ [42, H$1.Any],
24226
+ [33, H$1.Not],
24227
+ [124, H$1.Hyphen]
24228
24228
  ]), Fi = /* @__PURE__ */ new Set([
24229
24229
  "has",
24230
24230
  "not",
@@ -24323,7 +24323,7 @@ function Hr(e, t, u) {
24323
24323
  ignoreCase: "quirks"
24324
24324
  });
24325
24325
  }
24326
- function T2() {
24326
+ function T() {
24327
24327
  if (r.length && r[r.length - 1].type === N.Descendant && r.pop(), r.length === 0)
24328
24328
  throw new Error("Empty sub-selector");
24329
24329
  e.push(r);
@@ -24361,26 +24361,26 @@ function Hr(e, t, u) {
24361
24361
  }
24362
24362
  // Special attribute selectors: .class, #id
24363
24363
  case 46: {
24364
- f("class", H.Element);
24364
+ f("class", H$1.Element);
24365
24365
  break;
24366
24366
  }
24367
24367
  case 35: {
24368
- f("id", H.Equals);
24368
+ f("id", H$1.Equals);
24369
24369
  break;
24370
24370
  }
24371
24371
  case 91: {
24372
24372
  i(1);
24373
24373
  let w, v = null;
24374
24374
  t.charCodeAt(u) === 124 ? w = a(1) : t.startsWith("*|", u) ? (v = "*", w = a(2)) : (w = a(0), t.charCodeAt(u) === 124 && t.charCodeAt(u + 1) !== 61 && (v = w, w = a(1))), i(0);
24375
- let S2 = H.Exists;
24375
+ let S = H$1.Exists;
24376
24376
  const U2 = Ui.get(t.charCodeAt(u));
24377
24377
  if (U2) {
24378
- if (S2 = U2, t.charCodeAt(u + 1) !== 61)
24378
+ if (S = U2, t.charCodeAt(u + 1) !== 61)
24379
24379
  throw new Error("Expected `=`");
24380
24380
  i(2);
24381
- } else t.charCodeAt(u) === 61 && (S2 = H.Equals, i(1));
24382
- let M2 = "", ee2 = null;
24383
- if (S2 !== "exists") {
24381
+ } else t.charCodeAt(u) === 61 && (S = H$1.Equals, i(1));
24382
+ let M2 = "", ee = null;
24383
+ if (S !== "exists") {
24384
24384
  if (Ht$1(t.charCodeAt(u))) {
24385
24385
  const ge = t.charCodeAt(u);
24386
24386
  let ie = u + 1;
@@ -24397,7 +24397,7 @@ function Hr(e, t, u) {
24397
24397
  }
24398
24398
  i(0);
24399
24399
  const ae = t.charCodeAt(u) | 32;
24400
- ae === 115 ? (ee2 = false, i(1)) : ae === 105 && (ee2 = true, i(1));
24400
+ ae === 115 ? (ee = false, i(1)) : ae === 105 && (ee = true, i(1));
24401
24401
  }
24402
24402
  if (t.charCodeAt(u) !== 93)
24403
24403
  throw new Error("Attribute selector didn't terminate");
@@ -24405,10 +24405,10 @@ function Hr(e, t, u) {
24405
24405
  const he = {
24406
24406
  type: N.Attribute,
24407
24407
  name: w,
24408
- action: S2,
24408
+ action: S,
24409
24409
  value: M2,
24410
24410
  namespace: v,
24411
- ignoreCase: ee2
24411
+ ignoreCase: ee
24412
24412
  };
24413
24413
  r.push(he);
24414
24414
  break;
@@ -24433,8 +24433,8 @@ function Hr(e, t, u) {
24433
24433
  u += 1;
24434
24434
  } else {
24435
24435
  if (v = n(), Hi.has(w)) {
24436
- const S2 = v.charCodeAt(0);
24437
- S2 === v.charCodeAt(v.length - 1) && Ht$1(S2) && (v = v.slice(1, -1));
24436
+ const S = v.charCodeAt(0);
24437
+ S === v.charCodeAt(v.length - 1) && Ht$1(S) && (v = v.slice(1, -1));
24438
24438
  }
24439
24439
  v = Be(v);
24440
24440
  }
@@ -24442,15 +24442,15 @@ function Hr(e, t, u) {
24442
24442
  break;
24443
24443
  }
24444
24444
  case 44: {
24445
- T2(), r = [], i(1);
24445
+ T(), r = [], i(1);
24446
24446
  break;
24447
24447
  }
24448
24448
  default: {
24449
24449
  if (t.startsWith("/*", u)) {
24450
- const S2 = t.indexOf("*/", u + 2);
24451
- if (S2 < 0)
24450
+ const S = t.indexOf("*/", u + 2);
24451
+ if (S < 0)
24452
24452
  throw new Error("Comment was not terminated");
24453
- u = S2 + 2, r.length === 0 && i(0);
24453
+ u = S + 2, r.length === 0 && i(0);
24454
24454
  break;
24455
24455
  }
24456
24456
  let w = null, v;
@@ -24469,7 +24469,7 @@ function Hr(e, t, u) {
24469
24469
  }
24470
24470
  }
24471
24471
  }
24472
- return T2(), u;
24472
+ return T(), u;
24473
24473
  }
24474
24474
  function Yi(e) {
24475
24475
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -24496,12 +24496,12 @@ function Au(e) {
24496
24496
  return !qr.has(e.type);
24497
24497
  }
24498
24498
  const Vi = /* @__PURE__ */ new Map([
24499
- [H.Exists, 10],
24500
- [H.Equals, 8],
24501
- [H.Not, 7],
24502
- [H.Start, 6],
24503
- [H.End, 6],
24504
- [H.Any, 5]
24499
+ [H$1.Exists, 10],
24500
+ [H$1.Equals, 8],
24501
+ [H$1.Not, 7],
24502
+ [H$1.Start, 6],
24503
+ [H$1.End, 6],
24504
+ [H$1.Any, 5]
24505
24505
  ]);
24506
24506
  function $i(e) {
24507
24507
  const t = e.map(Yr);
@@ -24517,7 +24517,7 @@ function $i(e) {
24517
24517
  function Yr(e) {
24518
24518
  var t, u;
24519
24519
  let r = (t = qr.get(e.type)) !== null && t !== void 0 ? t : -1;
24520
- return e.type === N.Attribute ? (r = (u = Vi.get(e.action)) !== null && u !== void 0 ? u : 4, e.action === H.Equals && e.name === "id" && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === N.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? r = 0 : Array.isArray(e.data) ? (r = Math.min(...e.data.map((a) => Math.min(...a.map(Yr)))), r < 0 && (r = 0)) : r = 2 : r = 3), r;
24520
+ return e.type === N.Attribute ? (r = (u = Vi.get(e.action)) !== null && u !== void 0 ? u : 4, e.action === H$1.Equals && e.name === "id" && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === N.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? r = 0 : Array.isArray(e.data) ? (r = Math.min(...e.data.map((a) => Math.min(...a.map(Yr)))), r < 0 && (r = 0)) : r = 2 : r = 3), r;
24521
24521
  }
24522
24522
  const Gi = /[-[\]{}()*+?.,\\^$|#\s]/g;
24523
24523
  function Ku(e) {
@@ -24775,11 +24775,11 @@ const eu = {
24775
24775
  const { equals: a } = u;
24776
24776
  return !r || r.length === 0 ? eu.root(e, t, u) : r.length === 1 ? (i) => a(r[0], i) && e(i) : (i) => r.includes(i) && e(i);
24777
24777
  },
24778
- hover: Yt("isHovered"),
24779
- visited: Yt("isVisited"),
24780
- active: Yt("isActive")
24778
+ hover: Yt$1("isHovered"),
24779
+ visited: Yt$1("isVisited"),
24780
+ active: Yt$1("isActive")
24781
24781
  };
24782
- function Yt(e) {
24782
+ function Yt$1(e) {
24783
24783
  return function(u, r, { adapter: a }) {
24784
24784
  const i = a[e];
24785
24785
  return typeof i != "function" ? C.falseFunc : function(c) {
@@ -24926,11 +24926,11 @@ const jt = (e, t, u, r, a) => {
24926
24926
  const m = en(h, i);
24927
24927
  if (c && h !== C.trueFunc) {
24928
24928
  const { shouldTestNextSiblings: f = false } = h;
24929
- return (T2) => {
24930
- if (!e(T2))
24929
+ return (T) => {
24930
+ if (!e(T))
24931
24931
  return false;
24932
- c[0] = T2;
24933
- const A = i.getChildren(T2), w = f ? [...A, ...Vr(T2, i)] : A;
24932
+ c[0] = T;
24933
+ const A = i.getChildren(T), w = f ? [...A, ...Vr(T, i)] : A;
24934
24934
  return i.existsOne(m, w);
24935
24935
  };
24936
24936
  }
@@ -24958,7 +24958,7 @@ function tn(e, t, u, r, a) {
24958
24958
  return eu[n](e, c, u, r);
24959
24959
  if (n in Zu) {
24960
24960
  const f = Zu[n];
24961
- return Ju(f, n, c, 2), (T2) => f(T2, u, c) && e(T2);
24961
+ return Ju(f, n, c, 2), (T) => f(T, u, c) && e(T);
24962
24962
  }
24963
24963
  throw new Error(`Unknown pseudo-class :${n}`);
24964
24964
  }
@@ -25033,10 +25033,10 @@ function un(e, t, u, r, a) {
25033
25033
  return function(h) {
25034
25034
  const m = i.getSiblings(h);
25035
25035
  for (let f = 0; f < m.length; f++) {
25036
- const T2 = m[f];
25037
- if (n(h, T2))
25036
+ const T = m[f];
25037
+ if (n(h, T))
25038
25038
  break;
25039
- if (i.isTag(T2) && e(T2))
25039
+ if (i.isTag(T) && e(T))
25040
25040
  return true;
25041
25041
  }
25042
25042
  return false;
@@ -25048,8 +25048,8 @@ function un(e, t, u, r, a) {
25048
25048
  } : function(h) {
25049
25049
  const m = i.getSiblings(h);
25050
25050
  let f;
25051
- for (let T2 = 0; T2 < m.length; T2++) {
25052
- const A = m[T2];
25051
+ for (let T = 0; T < m.length; T++) {
25052
+ const A = m[T];
25053
25053
  if (n(h, A))
25054
25054
  break;
25055
25055
  i.isTag(A) && (f = A);
@@ -25276,15 +25276,15 @@ function Et$1(e, t, u, r, a) {
25276
25276
  const i = t.findIndex(bt$1), n = t.slice(0, i), c = t[i], h = t.length - 1 === i ? a : 1 / 0, m = fn(c.name, c.data, h);
25277
25277
  if (m === 0)
25278
25278
  return [];
25279
- const T2 = (n.length === 0 && !Array.isArray(e) ? It$1(e).filter(I) : n.length === 0 ? (Array.isArray(e) ? e : [e]).filter(I) : r || n.some(qe) ? uu(e, [n], u, m) : ru(e, [n], u)).slice(0, m);
25280
- let A = _n(c.name, T2, c.data, u);
25279
+ const T = (n.length === 0 && !Array.isArray(e) ? It$1(e).filter(I) : n.length === 0 ? (Array.isArray(e) ? e : [e]).filter(I) : r || n.some(qe) ? uu(e, [n], u, m) : ru(e, [n], u)).slice(0, m);
25280
+ let A = _n(c.name, T, c.data, u);
25281
25281
  if (A.length === 0 || t.length === i + 1)
25282
25282
  return A;
25283
25283
  const w = t.slice(i + 1), v = w.some(qe);
25284
25284
  if (v) {
25285
25285
  if (qe(w[0])) {
25286
- const { type: S2 } = w[0];
25287
- (S2 === N.Sibling || S2 === N.Adjacent) && (A = zr(A, St$1, true)), w.unshift(En);
25286
+ const { type: S } = w[0];
25287
+ (S === N.Sibling || S === N.Adjacent) && (A = zr(A, St$1, true)), w.unshift(En);
25288
25288
  }
25289
25289
  u = {
25290
25290
  ...u,
@@ -25294,7 +25294,7 @@ function Et$1(e, t, u, r, a) {
25294
25294
  * Add a custom root func, to make sure traversals don't match elements
25295
25295
  * that aren't a part of the considered tree.
25296
25296
  */
25297
- rootFunc: (S2) => A.includes(S2)
25297
+ rootFunc: (S) => A.includes(S)
25298
25298
  };
25299
25299
  } else u.rootFunc && u.rootFunc !== ft.trueFunc && (u = { ...u, rootFunc: ft.trueFunc });
25300
25300
  return w.some(bt$1) ? Et$1(A, w, u, false, a) : v ? (
@@ -25426,7 +25426,7 @@ const Cn = xu((e) => fu(e)), yn = et((e) => {
25426
25426
  return t;
25427
25427
  }, Pe), Dn = Iu((e) => bu(e), Pe), kn = et((e) => Cr(e).filter((t) => I(t) && t !== e), ke), Pn = et((e) => It$1(e).filter(I), Pe);
25428
25428
  function Mn() {
25429
- const e = this.toArray().reduce((t, u) => B$1(u) ? t.concat(u.children) : t, []);
25429
+ const e = this.toArray().reduce((t, u) => B(u) ? t.concat(u.children) : t, []);
25430
25430
  return this._make(e);
25431
25431
  }
25432
25432
  function Bn(e) {
@@ -25595,7 +25595,7 @@ function ts(e) {
25595
25595
  return function(...t) {
25596
25596
  const u = this.length - 1;
25597
25597
  return P(this, (r, a) => {
25598
- if (!B$1(r))
25598
+ if (!B(r))
25599
25599
  return;
25600
25600
  const i = typeof t[0] == "function" ? t[0].call(r, a, this._render(r.children)) : t, n = this._makeDomArray(i, a < u);
25601
25601
  e(n, r.children, r);
@@ -25610,12 +25610,12 @@ function _e(e, t, u, r, a) {
25610
25610
  ...r
25611
25611
  ], h = t === 0 ? null : e[t - 1], m = t + u >= e.length ? null : e[t + u];
25612
25612
  for (let f = 0; f < r.length; ++f) {
25613
- const T2 = r[f], A = T2.parent;
25613
+ const T = r[f], A = T.parent;
25614
25614
  if (A) {
25615
- const v = A.children.indexOf(T2);
25615
+ const v = A.children.indexOf(T);
25616
25616
  v !== -1 && (A.children.splice(v, 1), a === A && t > v && c[0]--);
25617
25617
  }
25618
- T2.parent = a, T2.prev && (T2.prev.next = (i = T2.next) !== null && i !== void 0 ? i : null), T2.next && (T2.next.prev = (n = T2.prev) !== null && n !== void 0 ? n : null), T2.prev = f === 0 ? h : r[f - 1], T2.next = f === r.length - 1 ? m : r[f + 1];
25618
+ T.parent = a, T.prev && (T.prev.next = (i = T.next) !== null && i !== void 0 ? i : null), T.next && (T.next.prev = (n = T.prev) !== null && n !== void 0 ? n : null), T.prev = f === 0 ? h : r[f - 1], T.next = f === r.length - 1 ? m : r[f + 1];
25619
25619
  }
25620
25620
  return h && (h.next = r[0]), m && (m.prev = r[r.length - 1]), e.splice(...c);
25621
25621
  }
@@ -25634,8 +25634,8 @@ function us(e) {
25634
25634
  return function(t) {
25635
25635
  const u = this.length - 1, r = this.parents().last();
25636
25636
  for (let a = 0; a < this.length; a++) {
25637
- const i = this[a], n = typeof t == "function" ? t.call(i, a, i) : typeof t == "string" && !Xt$1(t) ? r.find(t).clone() : t, [c] = this._makeDomArray(n, a < u);
25638
- if (!c || !B$1(c))
25637
+ const i = this[a], n = typeof t == "function" ? t.call(i, a, i) : typeof t == "string" && !Xt(t) ? r.find(t).clone() : t, [c] = this._makeDomArray(n, a < u);
25638
+ if (!c || !B(c))
25639
25639
  continue;
25640
25640
  let h = c, m = 0;
25641
25641
  for (; m < h.children.length; ) {
@@ -25654,7 +25654,7 @@ const io = us((e, t, u) => {
25654
25654
  const a = r.children, i = a.indexOf(e);
25655
25655
  xe([e], t), _e(a, i, 0, u, r);
25656
25656
  }), no = us((e, t, u) => {
25657
- B$1(e) && (xe(e.children, t), xe(u, e));
25657
+ B(e) && (xe(e.children, t), xe(u, e));
25658
25658
  });
25659
25659
  function oo(e) {
25660
25660
  return this.parent(e).not("body").each((t, u) => {
@@ -25680,7 +25680,7 @@ function co(e) {
25680
25680
  function ho(...e) {
25681
25681
  const t = this.length - 1;
25682
25682
  return P(this, (u, r) => {
25683
- if (!B$1(u) || !u.parent)
25683
+ if (!B(u) || !u.parent)
25684
25684
  return;
25685
25685
  const a = u.parent.children, i = a.indexOf(u);
25686
25686
  if (i === -1)
@@ -25704,7 +25704,7 @@ function lo(e) {
25704
25704
  function mo(...e) {
25705
25705
  const t = this.length - 1;
25706
25706
  return P(this, (u, r) => {
25707
- if (!B$1(u) || !u.parent)
25707
+ if (!B(u) || !u.parent)
25708
25708
  return;
25709
25709
  const a = u.parent.children, i = a.indexOf(u);
25710
25710
  if (i === -1)
@@ -25744,7 +25744,7 @@ function bo(e) {
25744
25744
  }
25745
25745
  function Eo() {
25746
25746
  return P(this, (e) => {
25747
- if (B$1(e)) {
25747
+ if (B(e)) {
25748
25748
  for (const t of e.children)
25749
25749
  t.next = t.prev = t.parent = null;
25750
25750
  e.children.length = 0;
@@ -25754,10 +25754,10 @@ function Eo() {
25754
25754
  function To(e) {
25755
25755
  if (e === void 0) {
25756
25756
  const t = this[0];
25757
- return !t || !B$1(t) ? null : this._render(t.children);
25757
+ return !t || !B(t) ? null : this._render(t.children);
25758
25758
  }
25759
25759
  return P(this, (t) => {
25760
- if (!B$1(t))
25760
+ if (!B(t))
25761
25761
  return;
25762
25762
  for (const r of t.children)
25763
25763
  r.next = r.prev = r.parent = null;
@@ -25770,7 +25770,7 @@ function _o() {
25770
25770
  }
25771
25771
  function go(e) {
25772
25772
  return e === void 0 ? Qe(this) : typeof e == "function" ? P(this, (t, u) => this._make(t).text(e.call(t, u, Qe([t])))) : P(this, (t) => {
25773
- if (!B$1(t))
25773
+ if (!B(t))
25774
25774
  return;
25775
25775
  for (const r of t.children)
25776
25776
  r.next = r.prev = r.parent = null;
@@ -25943,26 +25943,26 @@ function ko(e, t) {
25943
25943
  return function u(r, a, i = true) {
25944
25944
  if (r == null)
25945
25945
  throw new Error("cheerio.load() expects a string");
25946
- const n = Kt(a), c = e(r, n, i, null);
25946
+ const n = Kt$1(a), c = e(r, n, i, null);
25947
25947
  class h extends ut {
25948
- _make(T2, A) {
25949
- const w = m(T2, A);
25948
+ _make(T, A) {
25949
+ const w = m(T, A);
25950
25950
  return w.prevObject = this, w;
25951
25951
  }
25952
- _parse(T2, A, w, v) {
25953
- return e(T2, A, w, v);
25952
+ _parse(T, A, w, v) {
25953
+ return e(T, A, w, v);
25954
25954
  }
25955
- _render(T2) {
25956
- return t(T2, this.options);
25955
+ _render(T) {
25956
+ return t(T, this.options);
25957
25957
  }
25958
25958
  }
25959
- function m(f, T2, A = c, w) {
25959
+ function m(f, T, A = c, w) {
25960
25960
  if (f && de(f))
25961
25961
  return f;
25962
- const v = Kt(w, n), S2 = typeof A == "string" ? [e(A, v, false, null)] : "length" in A ? A : [A], U2 = de(S2) ? S2 : new h(S2, null, v);
25962
+ const v = Kt$1(w, n), S = typeof A == "string" ? [e(A, v, false, null)] : "length" in A ? A : [A], U2 = de(S) ? S : new h(S, null, v);
25963
25963
  if (U2._root = U2, !f)
25964
25964
  return new h(void 0, U2, v);
25965
- const M2 = typeof f == "string" && Xt$1(f) ? (
25965
+ const M2 = typeof f == "string" && Xt(f) ? (
25966
25966
  // $(<html>)
25967
25967
  e(f, v, false, null).children
25968
25968
  ) : Po(f) ? (
@@ -25971,29 +25971,29 @@ function ko(e, t) {
25971
25971
  ) : Array.isArray(f) ? (
25972
25972
  // $([dom])
25973
25973
  f
25974
- ) : void 0, ee2 = new h(M2, U2, v);
25974
+ ) : void 0, ee = new h(M2, U2, v);
25975
25975
  if (M2)
25976
- return ee2;
25976
+ return ee;
25977
25977
  if (typeof f != "string")
25978
25978
  throw new TypeError("Unexpected type of selector");
25979
25979
  let he = f;
25980
- const ae = T2 ? (
25980
+ const ae = T ? (
25981
25981
  // If we don't have a context, maybe we have a root, from loading
25982
- typeof T2 == "string" ? Xt$1(T2) ? (
25982
+ typeof T == "string" ? Xt(T) ? (
25983
25983
  // $('li', '<ul>...</ul>')
25984
- new h([e(T2, v, false, null)], U2, v)
25984
+ new h([e(T, v, false, null)], U2, v)
25985
25985
  ) : (
25986
25986
  // $('li', 'ul')
25987
- (he = `${T2} ${he}`, U2)
25988
- ) : de(T2) ? (
25987
+ (he = `${T} ${he}`, U2)
25988
+ ) : de(T) ? (
25989
25989
  // $('li', $)
25990
- T2
25990
+ T
25991
25991
  ) : (
25992
25992
  // $('li', node), $('li', [nodes])
25993
- new h(Array.isArray(T2) ? T2 : [T2], U2, v)
25993
+ new h(Array.isArray(T) ? T : [T], U2, v)
25994
25994
  )
25995
25995
  ) : U2;
25996
- return ae ? ae.find(he) : ee2;
25996
+ return ae ? ae.find(he) : ee;
25997
25997
  }
25998
25998
  return Object.assign(m, ni, {
25999
25999
  load: u,
@@ -26056,7 +26056,7 @@ var o;
26056
26056
  (function(e) {
26057
26057
  e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z";
26058
26058
  })(o || (o = {}));
26059
- const z = {
26059
+ const z$1 = {
26060
26060
  DASH_DASH: "--",
26061
26061
  CDATA_START: "[CDATA[",
26062
26062
  DOCTYPE: "doctype",
@@ -26705,7 +26705,7 @@ var d;
26705
26705
  (function(e) {
26706
26706
  e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 72] = "AMBIGUOUS_AMPERSAND";
26707
26707
  })(d || (d = {}));
26708
- const K$1 = {
26708
+ const K = {
26709
26709
  DATA: d.DATA,
26710
26710
  RCDATA: d.RCDATA,
26711
26711
  RAWTEXT: d.RAWTEXT,
@@ -27617,9 +27617,9 @@ class rc {
27617
27617
  // Script data double escape start state
27618
27618
  //------------------------------------------------------------------
27619
27619
  _stateScriptDataDoubleEscapeStart(t) {
27620
- if (this.preprocessor.startsWith(z.SCRIPT, false) && rr(this.preprocessor.peek(z.SCRIPT.length))) {
27620
+ if (this.preprocessor.startsWith(z$1.SCRIPT, false) && rr(this.preprocessor.peek(z$1.SCRIPT.length))) {
27621
27621
  this._emitCodePoint(t);
27622
- for (let u = 0; u < z.SCRIPT.length; u++)
27622
+ for (let u = 0; u < z$1.SCRIPT.length; u++)
27623
27623
  this._emitCodePoint(this._consume());
27624
27624
  this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED;
27625
27625
  } else this._ensureHibernation() || (this.state = d.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t));
@@ -27708,9 +27708,9 @@ class rc {
27708
27708
  // Script data double escape end state
27709
27709
  //------------------------------------------------------------------
27710
27710
  _stateScriptDataDoubleEscapeEnd(t) {
27711
- if (this.preprocessor.startsWith(z.SCRIPT, false) && rr(this.preprocessor.peek(z.SCRIPT.length))) {
27711
+ if (this.preprocessor.startsWith(z$1.SCRIPT, false) && rr(this.preprocessor.peek(z$1.SCRIPT.length))) {
27712
27712
  this._emitCodePoint(t);
27713
- for (let u = 0; u < z.SCRIPT.length; u++)
27713
+ for (let u = 0; u < z$1.SCRIPT.length; u++)
27714
27714
  this._emitCodePoint(this._consume());
27715
27715
  this.state = d.SCRIPT_DATA_ESCAPED;
27716
27716
  } else this._ensureHibernation() || (this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(t));
@@ -27979,7 +27979,7 @@ class rc {
27979
27979
  // Markup declaration open state
27980
27980
  //------------------------------------------------------------------
27981
27981
  _stateMarkupDeclarationOpen(t) {
27982
- this._consumeSequenceIfMatch(z.DASH_DASH, true) ? (this._createCommentToken(z.DASH_DASH.length + 1), this.state = d.COMMENT_START) : this._consumeSequenceIfMatch(z.DOCTYPE, false) ? (this.currentLocation = this.getCurrentLocation(z.DOCTYPE.length + 1), this.state = d.DOCTYPE) : this._consumeSequenceIfMatch(z.CDATA_START, true) ? this.inForeignNode ? this.state = d.CDATA_SECTION : (this._err(b.cdataInHtmlContent), this._createCommentToken(z.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = d.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(b.incorrectlyOpenedComment), this._createCommentToken(2), this.state = d.BOGUS_COMMENT, this._stateBogusComment(t));
27982
+ this._consumeSequenceIfMatch(z$1.DASH_DASH, true) ? (this._createCommentToken(z$1.DASH_DASH.length + 1), this.state = d.COMMENT_START) : this._consumeSequenceIfMatch(z$1.DOCTYPE, false) ? (this.currentLocation = this.getCurrentLocation(z$1.DOCTYPE.length + 1), this.state = d.DOCTYPE) : this._consumeSequenceIfMatch(z$1.CDATA_START, true) ? this.inForeignNode ? this.state = d.CDATA_SECTION : (this._err(b.cdataInHtmlContent), this._createCommentToken(z$1.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = d.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(b.incorrectlyOpenedComment), this._createCommentToken(2), this.state = d.BOGUS_COMMENT, this._stateBogusComment(t));
27983
27983
  }
27984
27984
  // Comment start state
27985
27985
  //------------------------------------------------------------------
@@ -28244,7 +28244,7 @@ class rc {
28244
28244
  break;
28245
28245
  }
28246
28246
  default:
28247
- this._consumeSequenceIfMatch(z.PUBLIC, false) ? this.state = d.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(z.SYSTEM, false) ? this.state = d.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(b.invalidCharacterSequenceAfterDoctypeName), u.forceQuirks = true, this.state = d.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
28247
+ this._consumeSequenceIfMatch(z$1.PUBLIC, false) ? this.state = d.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(z$1.SYSTEM, false) ? this.state = d.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(b.invalidCharacterSequenceAfterDoctypeName), u.forceQuirks = true, this.state = d.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
28248
28248
  }
28249
28249
  }
28250
28250
  // After DOCTYPE public keyword state
@@ -29480,7 +29480,7 @@ class Es {
29480
29480
  this._insertElement(t, E.HTML), this.tokenizer.state = u, this.originalInsertionMode = this.insertionMode, this.insertionMode = l.TEXT;
29481
29481
  }
29482
29482
  switchToPlaintextParsing() {
29483
- this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K$1.PLAINTEXT;
29483
+ this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K.PLAINTEXT;
29484
29484
  }
29485
29485
  //Fragment parsing
29486
29486
  /** @protected */
@@ -29503,7 +29503,7 @@ class Es {
29503
29503
  switch (this.fragmentContextID) {
29504
29504
  case s.TITLE:
29505
29505
  case s.TEXTAREA: {
29506
- this.tokenizer.state = K$1.RCDATA;
29506
+ this.tokenizer.state = K.RCDATA;
29507
29507
  break;
29508
29508
  }
29509
29509
  case s.STYLE:
@@ -29512,15 +29512,15 @@ class Es {
29512
29512
  case s.NOEMBED:
29513
29513
  case s.NOFRAMES:
29514
29514
  case s.NOSCRIPT: {
29515
- this.tokenizer.state = K$1.RAWTEXT;
29515
+ this.tokenizer.state = K.RAWTEXT;
29516
29516
  break;
29517
29517
  }
29518
29518
  case s.SCRIPT: {
29519
- this.tokenizer.state = K$1.SCRIPT_DATA;
29519
+ this.tokenizer.state = K.SCRIPT_DATA;
29520
29520
  break;
29521
29521
  }
29522
29522
  case s.PLAINTEXT: {
29523
- this.tokenizer.state = K$1.PLAINTEXT;
29523
+ this.tokenizer.state = K.PLAINTEXT;
29524
29524
  break;
29525
29525
  }
29526
29526
  }
@@ -29860,7 +29860,7 @@ class Es {
29860
29860
  case l.IN_TABLE:
29861
29861
  case l.IN_TABLE_BODY:
29862
29862
  case l.IN_ROW: {
29863
- Wt(this, t);
29863
+ Wt$1(this, t);
29864
29864
  break;
29865
29865
  }
29866
29866
  case l.IN_TABLE_TEXT: {
@@ -29868,11 +29868,11 @@ class Es {
29868
29868
  break;
29869
29869
  }
29870
29870
  case l.IN_COLUMN_GROUP: {
29871
- _t$1(this, t);
29871
+ _t(this, t);
29872
29872
  break;
29873
29873
  }
29874
29874
  case l.AFTER_BODY: {
29875
- gt$1(this, t);
29875
+ gt(this, t);
29876
29876
  break;
29877
29877
  }
29878
29878
  case l.AFTER_AFTER_BODY: {
@@ -29919,15 +29919,15 @@ class Es {
29919
29919
  case l.IN_TABLE:
29920
29920
  case l.IN_TABLE_BODY:
29921
29921
  case l.IN_ROW: {
29922
- Wt(this, t);
29922
+ Wt$1(this, t);
29923
29923
  break;
29924
29924
  }
29925
29925
  case l.IN_COLUMN_GROUP: {
29926
- _t$1(this, t);
29926
+ _t(this, t);
29927
29927
  break;
29928
29928
  }
29929
29929
  case l.AFTER_BODY: {
29930
- gt$1(this, t);
29930
+ gt(this, t);
29931
29931
  break;
29932
29932
  }
29933
29933
  case l.AFTER_AFTER_BODY: {
@@ -30305,7 +30305,7 @@ class Es {
30305
30305
  case l.IN_TABLE:
30306
30306
  case l.IN_TABLE_BODY:
30307
30307
  case l.IN_ROW: {
30308
- Wt(this, t);
30308
+ Wt$1(this, t);
30309
30309
  break;
30310
30310
  }
30311
30311
  case l.IN_TABLE_TEXT: {
@@ -30445,20 +30445,20 @@ function J(e, t) {
30445
30445
  break;
30446
30446
  }
30447
30447
  case s.TITLE: {
30448
- e._switchToTextParsing(t, K$1.RCDATA);
30448
+ e._switchToTextParsing(t, K.RCDATA);
30449
30449
  break;
30450
30450
  }
30451
30451
  case s.NOSCRIPT: {
30452
- e.options.scriptingEnabled ? e._switchToTextParsing(t, K$1.RAWTEXT) : (e._insertElement(t, E.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT);
30452
+ e.options.scriptingEnabled ? e._switchToTextParsing(t, K.RAWTEXT) : (e._insertElement(t, E.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT);
30453
30453
  break;
30454
30454
  }
30455
30455
  case s.NOFRAMES:
30456
30456
  case s.STYLE: {
30457
- e._switchToTextParsing(t, K$1.RAWTEXT);
30457
+ e._switchToTextParsing(t, K.RAWTEXT);
30458
30458
  break;
30459
30459
  }
30460
30460
  case s.SCRIPT: {
30461
- e._switchToTextParsing(t, K$1.SCRIPT_DATA);
30461
+ e._switchToTextParsing(t, K.SCRIPT_DATA);
30462
30462
  break;
30463
30463
  }
30464
30464
  case s.TEMPLATE: {
@@ -30668,7 +30668,7 @@ function a0(e, t) {
30668
30668
  e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML);
30669
30669
  }
30670
30670
  function i0(e, t) {
30671
- e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K$1.PLAINTEXT;
30671
+ e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K.PLAINTEXT;
30672
30672
  }
30673
30673
  function n0(e, t) {
30674
30674
  e.openElements.hasInScope(s.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false;
@@ -30709,16 +30709,16 @@ function b0(e, t) {
30709
30709
  t.tagName = p.IMG, t.tagID = s.IMG, gs(e, t);
30710
30710
  }
30711
30711
  function E0(e, t) {
30712
- e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K$1.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = false, e.insertionMode = l.TEXT;
30712
+ e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = false, e.insertionMode = l.TEXT;
30713
30713
  }
30714
30714
  function T0(e, t) {
30715
- e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K$1.RAWTEXT);
30715
+ e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
30716
30716
  }
30717
30717
  function _0(e, t) {
30718
- e.framesetOk = false, e._switchToTextParsing(t, K$1.RAWTEXT);
30718
+ e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
30719
30719
  }
30720
30720
  function hr(e, t) {
30721
- e._switchToTextParsing(t, K$1.RAWTEXT);
30721
+ e._switchToTextParsing(t, K.RAWTEXT);
30722
30722
  }
30723
30723
  function g0(e, t) {
30724
30724
  e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false, e.insertionMode = e.insertionMode === l.IN_TABLE || e.insertionMode === l.IN_CAPTION || e.insertionMode === l.IN_TABLE_BODY || e.insertionMode === l.IN_ROW || e.insertionMode === l.IN_CELL ? l.IN_SELECT_IN_TABLE : l.IN_SELECT;
@@ -31111,7 +31111,7 @@ function M0(e, t) {
31111
31111
  function B0(e, t) {
31112
31112
  e._err(t, b.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
31113
31113
  }
31114
- function Wt(e, t) {
31114
+ function Wt$1(e, t) {
31115
31115
  if (e.openElements.currentTagId !== void 0 && bs.has(e.openElements.currentTagId))
31116
31116
  switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = false, e.originalInsertionMode = e.insertionMode, e.insertionMode = l.IN_TABLE_TEXT, t.type) {
31117
31117
  case O.CHARACTER: {
@@ -31287,7 +31287,7 @@ function Lu(e, t) {
31287
31287
  break;
31288
31288
  }
31289
31289
  default:
31290
- _t$1(e, t);
31290
+ _t(e, t);
31291
31291
  }
31292
31292
  }
31293
31293
  function z0(e, t) {
@@ -31303,10 +31303,10 @@ function z0(e, t) {
31303
31303
  case s.COL:
31304
31304
  break;
31305
31305
  default:
31306
- _t$1(e, t);
31306
+ _t(e, t);
31307
31307
  }
31308
31308
  }
31309
- function _t$1(e, t) {
31309
+ function _t(e, t) {
31310
31310
  e.openElements.currentTagId === s.COLGROUP && (e.openElements.pop(), e.insertionMode = l.IN_TABLE, e._processToken(t));
31311
31311
  }
31312
31312
  function Rt(e, t) {
@@ -31547,7 +31547,7 @@ function Os(e, t) {
31547
31547
  e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(s.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : Ou(e, t);
31548
31548
  }
31549
31549
  function td(e, t) {
31550
- t.tagID === s.HTML ? G$1(e, t) : gt$1(e, t);
31550
+ t.tagID === s.HTML ? G$1(e, t) : gt(e, t);
31551
31551
  }
31552
31552
  function Ls(e, t) {
31553
31553
  var u;
@@ -31558,9 +31558,9 @@ function Ls(e, t) {
31558
31558
  r && !(!((u = e.treeAdapter.getNodeSourceCodeLocation(r)) === null || u === void 0) && u.endTag) && e._setEndLocation(r, t);
31559
31559
  }
31560
31560
  } else
31561
- gt$1(e, t);
31561
+ gt(e, t);
31562
31562
  }
31563
- function gt$1(e, t) {
31563
+ function gt(e, t) {
31564
31564
  e.insertionMode = l.IN_BODY, Ot$1(e, t);
31565
31565
  }
31566
31566
  function ud(e, t) {
@@ -32177,20 +32177,20 @@ const Ld = (e) => {
32177
32177
  if (r?.debug(
32178
32178
  `extractField: Found ${h.length} elements for selector "${c}"`
32179
32179
  ), h.each((m, f) => {
32180
- let T2;
32180
+ let T;
32181
32181
  switch (i) {
32182
32182
  case "attr":
32183
- T2 = t(f).attr(e.attr || "href") || "";
32183
+ T = t(f).attr(e.attr || "href") || "";
32184
32184
  break;
32185
32185
  case "html":
32186
- T2 = t(f).html() || "";
32186
+ T = t(f).html() || "";
32187
32187
  break;
32188
32188
  case "text":
32189
32189
  default:
32190
- T2 = t(f).text().trim();
32190
+ T = t(f).text().trim();
32191
32191
  break;
32192
32192
  }
32193
- T2 && n.push(T2);
32193
+ T && n.push(T);
32194
32194
  }), !e.multiple && n.length > 0)
32195
32195
  break;
32196
32196
  }
@@ -32435,11 +32435,11 @@ const Ld = (e) => {
32435
32435
  }, a = u.displayFields || r, i = (y) => {
32436
32436
  const W2 = e[y];
32437
32437
  return typeof W2 == "string" ? W2 : void 0;
32438
- }, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T2 = i("siteName") || Bs(f), A = pr(n, 80), w = pr(fr(c), 160), v = [];
32438
+ }, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T = i("siteName") || Bs(f), A = pr(n, 80), w = pr(fr(c), 160), v = [];
32439
32439
  h && a.image !== void 0 && v.push({
32440
32440
  order: a.image,
32441
32441
  section: "image",
32442
- html: At$1(
32442
+ html: At(
32443
32443
  j$1(h),
32444
32444
  j$1(A),
32445
32445
  "card-image",
@@ -32447,8 +32447,8 @@ const Ld = (e) => {
32447
32447
  'loading="lazy"'
32448
32448
  )
32449
32449
  });
32450
- let S2 = "";
32451
- m && a.favicon !== void 0 && (S2 = ou(
32450
+ let S = "";
32451
+ m && a.favicon !== void 0 && (S = ou(
32452
32452
  j$1(m),
32453
32453
  "",
32454
32454
  void 0,
@@ -32465,8 +32465,8 @@ const Ld = (e) => {
32465
32465
  section: "header",
32466
32466
  isHeader: true,
32467
32467
  html: `<div class="card-provider">
32468
- ${a.favicon !== void 0 ? S2 : ""}
32469
- <span>${j$1(T2)}</span>
32468
+ ${a.favicon !== void 0 ? S : ""}
32469
+ <span>${j$1(T)}</span>
32470
32470
  </div>`
32471
32471
  }), w && a.description !== void 0 && v.push({
32472
32472
  order: a.description,
@@ -32518,7 +32518,7 @@ const Ld = (e) => {
32518
32518
  "locale",
32519
32519
  "favicon"
32520
32520
  ].includes(y) || a[y] === void 0 && M2.push(y);
32521
- let ee2 = 1e3;
32521
+ let ee = 1e3;
32522
32522
  for (const y of M2) {
32523
32523
  const W2 = e[y];
32524
32524
  let Ce = "";
@@ -32534,7 +32534,7 @@ const Ld = (e) => {
32534
32534
  <span class="field-value">${j$1(String(W2))}</span>
32535
32535
  </div>`;
32536
32536
  v.push({
32537
- order: ee2++,
32537
+ order: ee++,
32538
32538
  section: "enhanced",
32539
32539
  html: Ce
32540
32540
  });
@@ -32563,30 +32563,30 @@ const Ld = (e) => {
32563
32563
  };
32564
32564
  /*!
32565
32565
  * name: mark-deco
32566
- * version: 0.7.0
32566
+ * version: 0.9.0
32567
32567
  * description: Flexible Markdown to HTML conversion library
32568
32568
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
32569
32569
  * license: MIT
32570
32570
  * repository.url: https://github.com/kekyo/mark-deco.git
32571
- * git.commit.hash: 2b8fc59fb30d614d1c529a3d2c9ec721a49c9115
32571
+ * git.commit.hash: d0e45da82482af0e17292db548313487c588061b
32572
32572
  */
32573
- function gt(e) {
32574
- const t = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/, r = e.match(t);
32575
- if (!r)
32573
+ function W(e) {
32574
+ const t = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/, n = e.match(t);
32575
+ if (!n)
32576
32576
  return {
32577
32577
  data: {},
32578
32578
  content: e
32579
32579
  };
32580
- const o2 = r[1] || "", n = e.slice(r[0].length);
32580
+ const o2 = n[1] || "", r = e.slice(n[0].length);
32581
32581
  try {
32582
32582
  const s2 = load(o2, { schema: JSON_SCHEMA });
32583
32583
  return {
32584
32584
  data: s2 && typeof s2 == "object" && !Array.isArray(s2) ? s2 : {},
32585
- content: n
32585
+ content: r
32586
32586
  };
32587
32587
  } catch (s2) {
32588
- const h = s2 instanceof Error ? s2.message : "Unknown YAML parsing error";
32589
- throw new Error(`Failed to parse frontmatter YAML: ${h}`);
32588
+ const f = s2 instanceof Error ? s2.message : "Unknown YAML parsing error";
32589
+ throw new Error(`Failed to parse frontmatter YAML: ${f}`);
32590
32590
  }
32591
32591
  }
32592
32592
  function wt(e) {
@@ -32597,176 +32597,176 @@ function wt(e) {
32597
32597
  `) ? t : `${t}
32598
32598
  `;
32599
32599
  }
32600
- function vt(e, t) {
32601
- const r = t ?? "";
32600
+ function G(e, t) {
32601
+ const n = t ?? "";
32602
32602
  return `${`---
32603
32603
  ${wt(e)}---
32604
- `}${r}`;
32605
- }
32606
- const T = () => {
32607
- }, kt = {
32608
- debug: T,
32609
- info: T,
32610
- warn: T,
32611
- error: T
32604
+ `}${n}`;
32605
+ }
32606
+ const _ = () => {
32607
+ }, vt = {
32608
+ debug: _,
32609
+ info: _,
32610
+ warn: _,
32611
+ error: _
32612
32612
  }, Et = {
32613
32613
  debug: console.debug,
32614
32614
  info: console.info,
32615
32615
  warn: console.warn,
32616
32616
  error: console.error
32617
- }, bt = () => kt, Gt = () => Et, S = (e) => {
32618
- const t = {}, r = e.slice(1, -1).trim(), o2 = r.match(/\.([a-zA-Z0-9_-]+)/g);
32617
+ }, kt = () => vt, Kt = () => Et, H = (e) => {
32618
+ const t = {}, n = e.slice(1, -1).trim(), o2 = n.match(/\.([a-zA-Z0-9_-]+)/g);
32619
32619
  if (o2) {
32620
- const h = o2.map((p2) => p2.slice(1));
32621
- t.class = h.join(" ");
32620
+ const f = o2.map((m) => m.slice(1));
32621
+ t.class = f.join(" ");
32622
32622
  }
32623
- const n = r.match(/#([a-zA-Z0-9_-]+)/);
32624
- n && n[1] && (t.id = n[1]);
32625
- const s2 = r.match(/([a-zA-Z0-9_-]+)=["']?([^"'\s]*)["']?/g);
32623
+ const r = n.match(/#([a-zA-Z0-9_-]+)/);
32624
+ r && r[1] && (t.id = r[1]);
32625
+ const s2 = n.match(/([a-zA-Z0-9_-]+)=["']?([^"'\s]*)["']?/g);
32626
32626
  if (s2)
32627
- for (const h of s2) {
32628
- const [p2, d2] = h.split("=");
32629
- p2 && d2 && p2 !== "class" && p2 !== "id" && (t[p2] = d2.replace(/["']/g, ""));
32627
+ for (const f of s2) {
32628
+ const [m, d2] = f.split("=");
32629
+ m && d2 && m !== "class" && m !== "id" && (t[m] = d2.replace(/["']/g, ""));
32630
32630
  }
32631
32631
  return t;
32632
- }, $t = (e) => {
32633
- const t = e.lang ? ` class="language-${e.lang}"` : "", r = e.value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
32634
- return `<pre><code${t}>${r}</code></pre>`;
32635
- }, F = (e, t) => {
32636
- e.data || (e.data = {}), e.data.hProperties || (e.data.hProperties = {}), Object.entries(t).forEach(([r, o2]) => {
32637
- if (r === "class") {
32638
- const n = e.data.hProperties.class;
32639
- n ? typeof n == "string" && n.startsWith("language-") ? e.data.hProperties.class = `${n} ${o2}` : e.data.hProperties.class = `${n} ${o2}` : e.data.hProperties.class = o2;
32632
+ }, bt = (e) => {
32633
+ const t = e.lang ? ` class="language-${e.lang}"` : "", n = e.value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
32634
+ return `<pre><code${t}>${n}</code></pre>`;
32635
+ }, L = (e, t) => {
32636
+ e.data || (e.data = {}), e.data.hProperties || (e.data.hProperties = {}), Object.entries(t).forEach(([n, o2]) => {
32637
+ if (n === "class") {
32638
+ const r = e.data.hProperties.class;
32639
+ r ? typeof r == "string" && r.startsWith("language-") ? e.data.hProperties.class = `${r} ${o2}` : e.data.hProperties.class = `${r} ${o2}` : e.data.hProperties.class = o2;
32640
32640
  } else
32641
- e.data.hProperties[r] = o2;
32641
+ e.data.hProperties[n] = o2;
32642
32642
  });
32643
- }, St = () => (e) => {
32644
- visit(e, (t, r, o2) => {
32643
+ }, $t = () => (e) => {
32644
+ visit(e, (t, n, o2) => {
32645
32645
  if (t.type === "heading" && t.children?.length > 0) {
32646
- const n = t.children[t.children.length - 1];
32647
- if (n?.type === "text" && n.value) {
32648
- const s2 = n.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32646
+ const r = t.children[t.children.length - 1];
32647
+ if (r?.type === "text" && r.value) {
32648
+ const s2 = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32649
32649
  if (s2) {
32650
- const h = s2[1].trim(), p2 = s2[2], d2 = S(p2);
32651
- n.value = h, F(t, d2);
32650
+ const f = s2[1].trim(), m = s2[2], d2 = H(m);
32651
+ r.value = f, L(t, d2);
32652
32652
  }
32653
32653
  }
32654
32654
  }
32655
32655
  if (t.type === "paragraph" && t.children?.length > 0) {
32656
- const n = t.children[t.children.length - 1];
32657
- if (n?.type === "text" && n.value) {
32658
- const s2 = n.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32656
+ const r = t.children[t.children.length - 1];
32657
+ if (r?.type === "text" && r.value) {
32658
+ const s2 = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32659
32659
  if (s2) {
32660
- const h = s2[1].trim(), p2 = s2[2], d2 = S(p2);
32661
- n.value = h, F(t, d2);
32660
+ const f = s2[1].trim(), m = s2[2], d2 = H(m);
32661
+ r.value = f, L(t, d2);
32662
32662
  }
32663
32663
  }
32664
32664
  }
32665
- if (t.type === "link" && o2 && typeof r == "number") {
32666
- const n = o2.children[r + 1];
32667
- if (n?.type === "text" && n.value) {
32668
- const s2 = n.value.match(/^\s*(\{[^}]+\})/);
32665
+ if (t.type === "link" && o2 && typeof n == "number") {
32666
+ const r = o2.children[n + 1];
32667
+ if (r?.type === "text" && r.value) {
32668
+ const s2 = r.value.match(/^\s*(\{[^}]+\})/);
32669
32669
  if (s2) {
32670
- const h = s2[1], p2 = S(h);
32671
- F(t, p2), n.value = n.value.replace(s2[0], "");
32670
+ const f = s2[1], m = H(f);
32671
+ L(t, m), r.value = r.value.replace(s2[0], "");
32672
32672
  }
32673
32673
  }
32674
32674
  }
32675
- if (t.type === "image" && o2 && typeof r == "number") {
32676
- const n = o2.children[r + 1];
32677
- if (n?.type === "text" && n.value) {
32678
- const s2 = n.value.match(/^\s*(\{[^}]+\})/);
32675
+ if (t.type === "image" && o2 && typeof n == "number") {
32676
+ const r = o2.children[n + 1];
32677
+ if (r?.type === "text" && r.value) {
32678
+ const s2 = r.value.match(/^\s*(\{[^}]+\})/);
32679
32679
  if (s2) {
32680
- const h = s2[1], p2 = S(h);
32681
- F(t, p2), n.value = n.value.replace(s2[0], "");
32680
+ const f = s2[1], m = H(f);
32681
+ L(t, m), r.value = r.value.replace(s2[0], "");
32682
32682
  }
32683
32683
  }
32684
32684
  }
32685
32685
  if (t.type === "listItem" && t.children?.length > 0) {
32686
- const n = t.children[t.children.length - 1];
32687
- if (n?.type === "paragraph" && n.children?.length > 0) {
32688
- const s2 = n.children[n.children.length - 1];
32686
+ const r = t.children[t.children.length - 1];
32687
+ if (r?.type === "paragraph" && r.children?.length > 0) {
32688
+ const s2 = r.children[r.children.length - 1];
32689
32689
  if (s2?.type === "text" && s2.value) {
32690
- const h = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32691
- if (h) {
32692
- const p2 = h[1].trim(), d2 = h[2], a = S(d2);
32693
- s2.value = p2, F(t, a);
32690
+ const f = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32691
+ if (f) {
32692
+ const m = f[1].trim(), d2 = f[2], c = H(d2);
32693
+ s2.value = m, L(t, c);
32694
32694
  }
32695
32695
  }
32696
32696
  }
32697
32697
  }
32698
- if (t.type === "list" && o2 && typeof r == "number") {
32699
- const n = o2.children[r + 1];
32700
- if (n?.type === "paragraph" && n.children?.length === 1) {
32701
- const s2 = n.children[0];
32698
+ if (t.type === "list" && o2 && typeof n == "number") {
32699
+ const r = o2.children[n + 1];
32700
+ if (r?.type === "paragraph" && r.children?.length === 1) {
32701
+ const s2 = r.children[0];
32702
32702
  if (s2?.type === "text" && s2.value) {
32703
- const h = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32704
- if (h) {
32705
- const p2 = h[1], d2 = S(p2);
32706
- F(t, d2), o2.children.splice(r + 1, 1);
32703
+ const f = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32704
+ if (f) {
32705
+ const m = f[1], d2 = H(m);
32706
+ L(t, d2), o2.children.splice(n + 1, 1);
32707
32707
  }
32708
32708
  }
32709
32709
  }
32710
32710
  }
32711
32711
  if (t.type === "blockquote" && t.children?.length > 0) {
32712
- const n = t.children[t.children.length - 1];
32713
- if (n?.type === "paragraph" && n.children?.length > 0) {
32714
- const s2 = n.children[n.children.length - 1];
32712
+ const r = t.children[t.children.length - 1];
32713
+ if (r?.type === "paragraph" && r.children?.length > 0) {
32714
+ const s2 = r.children[r.children.length - 1];
32715
32715
  if (s2?.type === "text" && s2.value) {
32716
- const h = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32717
- if (h) {
32718
- const p2 = h[1].trim(), d2 = h[2], a = S(d2);
32719
- s2.value = p2, F(t, a);
32716
+ const f = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32717
+ if (f) {
32718
+ const m = f[1].trim(), d2 = f[2], c = H(d2);
32719
+ s2.value = m, L(t, c);
32720
32720
  }
32721
32721
  }
32722
32722
  }
32723
32723
  }
32724
- if (t.type === "blockquote" && o2 && typeof r == "number") {
32725
- const n = o2.children[r + 1];
32726
- if (n?.type === "paragraph" && n.children?.length === 1) {
32727
- const s2 = n.children[0];
32724
+ if (t.type === "blockquote" && o2 && typeof n == "number") {
32725
+ const r = o2.children[n + 1];
32726
+ if (r?.type === "paragraph" && r.children?.length === 1) {
32727
+ const s2 = r.children[0];
32728
32728
  if (s2?.type === "text" && s2.value) {
32729
- const h = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32730
- if (h) {
32731
- const p2 = h[1], d2 = S(p2);
32732
- F(t, d2), o2.children.splice(r + 1, 1);
32729
+ const f = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32730
+ if (f) {
32731
+ const m = f[1], d2 = H(m);
32732
+ L(t, d2), o2.children.splice(n + 1, 1);
32733
32733
  }
32734
32734
  }
32735
32735
  }
32736
32736
  }
32737
- if (t.type === "inlineCode" && o2 && typeof r == "number") {
32738
- const n = o2.children[r + 1];
32739
- if (n?.type === "text" && n.value) {
32740
- const s2 = n.value.match(/^\s*(\{[^}]+\})/);
32737
+ if (t.type === "inlineCode" && o2 && typeof n == "number") {
32738
+ const r = o2.children[n + 1];
32739
+ if (r?.type === "text" && r.value) {
32740
+ const s2 = r.value.match(/^\s*(\{[^}]+\})/);
32741
32741
  if (s2) {
32742
- const h = s2[1], p2 = S(h);
32743
- F(t, p2), n.value = n.value.replace(s2[0], "");
32742
+ const f = s2[1], m = H(f);
32743
+ L(t, m), r.value = r.value.replace(s2[0], "");
32744
32744
  }
32745
32745
  }
32746
32746
  }
32747
32747
  if (t.type === "code" && t.meta) {
32748
- const n = t.meta.match(/\{([^}]+)\}/);
32749
- if (n) {
32750
- const s2 = `{${n[1]}}`, h = S(s2), p2 = {
32748
+ const r = t.meta.match(/\{([^}]+)\}/);
32749
+ if (r) {
32750
+ const s2 = `{${r[1]}}`, f = H(s2), m = {
32751
32751
  type: "html",
32752
- value: `<div class="${h.class || ""}" ${Object.entries(
32753
- h
32754
- ).filter(([d2]) => d2 !== "class").map(([d2, a]) => `${d2}="${a}"`).join(" ")}>${$t(t)}</div>`
32752
+ value: `<div class="${f.class || ""}" ${Object.entries(
32753
+ f
32754
+ ).filter(([d2]) => d2 !== "class").map(([d2, c]) => `${d2}="${c}"`).join(" ")}>${bt(t)}</div>`
32755
32755
  };
32756
- o2 && typeof r == "number" && (o2.children[r] = p2), t.meta = t.meta.replace(n[0], "").trim() || null;
32756
+ o2 && typeof n == "number" && (o2.children[n] = m), t.meta = t.meta.replace(r[0], "").trim() || null;
32757
32757
  }
32758
32758
  }
32759
32759
  });
32760
- }, xt = () => (e) => {
32760
+ }, St = () => (e) => {
32761
32761
  visit(e, "element", (t) => {
32762
32762
  if (t.tagName === "img") {
32763
- const r = Ys();
32763
+ const n = Ys();
32764
32764
  t.properties || (t.properties = {});
32765
- const o2 = t.properties.style || "", n = o2 ? `${o2}; ${r}` : r;
32766
- t.properties.style = n;
32765
+ const o2 = t.properties.style || "", r = o2 ? `${o2}; ${n}` : n;
32766
+ t.properties.style = r;
32767
32767
  }
32768
32768
  });
32769
- }, { html: Ft } = Y$1, Ht = {
32769
+ }, { html: xt } = tt$1, Ct = {
32770
32770
  indent_size: 2,
32771
32771
  indent_char: " ",
32772
32772
  max_preserve_newlines: 2,
@@ -32778,289 +32778,310 @@ const T = () => {
32778
32778
  unformatted: ["code", "pre", "textarea"],
32779
32779
  content_unformatted: ["pre", "code", "textarea"],
32780
32780
  extra_liners: []
32781
- }, Ct = (e) => {
32782
- const t = (r) => {
32783
- if (r instanceof Date)
32784
- return new Date(r.getTime());
32785
- if (Array.isArray(r))
32786
- return r.map(t);
32787
- if (r && typeof r == "object") {
32788
- const o2 = {};
32789
- for (const [n, s2] of Object.entries(
32790
- r
32791
- ))
32792
- o2[n] = t(s2);
32793
- return o2;
32794
- }
32795
- return r;
32796
- };
32797
- return t(e ?? {});
32798
- }, M = (e) => {
32781
+ }, q = (e) => {
32799
32782
  if (e instanceof Date)
32800
32783
  return e.toISOString();
32801
32784
  if (Array.isArray(e))
32802
- return e.map(M);
32785
+ return e.map(q);
32803
32786
  if (e && typeof e == "object") {
32804
- const t = Object.entries(e).filter(([, o2]) => o2 !== void 0).sort(([o2], [n]) => o2 < n ? -1 : o2 > n ? 1 : 0), r = {};
32805
- for (const [o2, n] of t)
32806
- r[o2] = M(n);
32807
- return r;
32787
+ const t = Object.entries(e).filter(([, o2]) => o2 !== void 0).sort(([o2], [r]) => o2 < r ? -1 : o2 > r ? 1 : 0), n = {};
32788
+ for (const [o2, r] of t)
32789
+ n[o2] = q(r);
32790
+ return n;
32808
32791
  }
32809
32792
  return e;
32810
- }, B = (e) => JSON.stringify(M(e ?? {})), U = (e) => e.type === "text" || e.type === "inlineCode" ? e.value || "" : e.children && Array.isArray(e.children) ? e.children.map(U).join("") : "", Ot = (e, t) => `${e}-${t.join("-")}`, It = (e) => {
32811
- const t = [], r = [];
32793
+ }, j = (e) => JSON.stringify(q(e ?? {})), D = (e) => e.type === "text" || e.type === "inlineCode" ? e.value || "" : e.children && Array.isArray(e.children) ? e.children.map(D).join("") : "", Ht = (e, t) => `${e}-${t.join("-")}`, Ft = (e) => {
32794
+ const t = [], n = [];
32812
32795
  for (const o2 of e) {
32813
- const n = o2.level;
32814
- for (; r.length > n; )
32815
- r.pop();
32816
- for (; r.length < n; )
32817
- r.push(0);
32818
- const s2 = n - 1;
32819
- r[s2] = (r[s2] || 0) + 1;
32820
- const h = r.slice(0, n);
32796
+ const r = o2.level;
32797
+ for (; n.length > r; )
32798
+ n.pop();
32799
+ for (; n.length < r; )
32800
+ n.push(0);
32801
+ const s2 = r - 1;
32802
+ n[s2] = (n[s2] || 0) + 1;
32803
+ const f = n.slice(0, r);
32821
32804
  t.push({
32822
32805
  level: o2.level,
32823
32806
  text: o2.text,
32824
- numbers: h
32807
+ numbers: f
32825
32808
  });
32826
32809
  }
32827
32810
  return t;
32828
- }, K = (e, t, r) => {
32811
+ }, Q = (e, t, n) => {
32829
32812
  const o2 = jd(t);
32830
- return o2 !== void 0 ? `${e}-${o2}` : r();
32831
- }, Lt = (e) => {
32832
- const t = [], r = [];
32813
+ return o2 !== void 0 ? `${e}-${o2}` : n();
32814
+ }, It = (e) => {
32815
+ const t = [], n = [];
32833
32816
  for (const o2 of e) {
32834
- const n = {
32817
+ const r = {
32835
32818
  level: o2.level,
32836
32819
  text: o2.text,
32837
32820
  id: o2.id,
32838
32821
  children: []
32839
32822
  };
32840
- for (; r.length > 0; ) {
32841
- const s2 = r[r.length - 1];
32823
+ for (; n.length > 0; ) {
32824
+ const s2 = n[n.length - 1];
32842
32825
  if (s2 && s2.level >= o2.level)
32843
- r.pop();
32826
+ n.pop();
32844
32827
  else
32845
32828
  break;
32846
32829
  }
32847
- if (r.length === 0)
32848
- t.push(n);
32830
+ if (n.length === 0)
32831
+ t.push(r);
32849
32832
  else {
32850
- const s2 = r[r.length - 1];
32851
- s2 && s2.children.push(n);
32833
+ const s2 = n[n.length - 1];
32834
+ s2 && s2.children.push(r);
32852
32835
  }
32853
- r.push(n);
32836
+ n.push(r);
32854
32837
  }
32855
32838
  return t;
32856
- }, Vt = (e) => {
32857
- const { plugins: t = [], logger: r = bt(), fetcher: o2 } = e, n = /* @__PURE__ */ new Map();
32839
+ }, Wt = (e) => {
32840
+ const { plugins: t = [], logger: n = kt(), fetcher: o2 } = e, r = /* @__PURE__ */ new Map();
32858
32841
  for (const a of t) {
32859
- if (n.has(a.name))
32842
+ if (r.has(a.name))
32860
32843
  throw new Error(
32861
32844
  `Plugin with name '${a.name}' is already registered`
32862
32845
  );
32863
- n.set(a.name, a);
32864
- }
32865
- const s2 = async (a, c, i) => {
32866
- const l2 = n.get(a);
32867
- return l2 ? await l2.processBlock(c, i) : `<pre><code class="language-${a}">${R(c)}</code></pre>`;
32868
- }, h = (a, c, i) => {
32869
- const l2 = {
32870
- logger: r,
32871
- signal: c,
32846
+ r.set(a.name, a);
32847
+ }
32848
+ const s2 = async (a, h, u) => {
32849
+ const p2 = r.get(a);
32850
+ return p2 ? await p2.processBlock(h, u) : `<pre><code class="language-${a}">${R(h)}</code></pre>`;
32851
+ }, f = (a, h, u) => {
32852
+ const p2 = {
32853
+ logger: n,
32854
+ signal: h,
32872
32855
  frontmatter: a,
32873
- getUniqueId: i,
32856
+ getUniqueId: u,
32874
32857
  fetcher: o2
32875
32858
  };
32876
- return () => async (f) => {
32877
- const u = [];
32859
+ return () => async (y) => {
32860
+ const g2 = [];
32878
32861
  visit(
32879
- f,
32862
+ y,
32880
32863
  "code",
32881
- (m, y, w) => {
32882
- if (!m.lang || !n.has(m.lang))
32864
+ (w, E2, C2) => {
32865
+ if (!w.lang || !r.has(w.lang))
32883
32866
  return;
32884
- const g2 = (async () => {
32867
+ const $2 = (async () => {
32885
32868
  const v = {
32886
32869
  type: "html",
32887
32870
  value: await s2(
32888
- m.lang,
32889
- m.value,
32890
- l2
32871
+ w.lang,
32872
+ w.value,
32873
+ p2
32891
32874
  )
32892
32875
  };
32893
- w && typeof y == "number" && (w.children[y] = v);
32876
+ C2 && typeof E2 == "number" && (C2.children[E2] = v);
32894
32877
  })();
32895
- u.push(g2);
32878
+ g2.push($2);
32896
32879
  }
32897
- ), await Promise.all(u);
32880
+ ), await Promise.all(g2);
32898
32881
  };
32899
- }, p2 = (a, c, i = false, l2 = false, f = "") => () => (u) => {
32900
- const m = [], y = [];
32901
- visit(u, "heading", (v) => {
32902
- v.depth >= 1 && v.depth <= 6 && y.push(v);
32882
+ }, m = (a, h, u = false, p2 = false, y = "") => () => (g2) => {
32883
+ const w = [], E2 = [];
32884
+ visit(g2, "heading", (v) => {
32885
+ v.depth >= 1 && v.depth <= 6 && E2.push(v);
32903
32886
  });
32904
- let w = [];
32905
- if (i) {
32906
- const v = y.map((b2) => ({
32907
- level: b2.depth,
32908
- text: U(b2)
32887
+ let C2 = [];
32888
+ if (u) {
32889
+ const v = E2.map((I2) => ({
32890
+ level: I2.depth,
32891
+ text: D(I2)
32909
32892
  }));
32910
- w = It(v);
32911
- }
32912
- const g2 = [];
32913
- y.forEach((v, b2) => {
32914
- const x2 = U(v), C2 = v.data?.hProperties?.id;
32915
- let $2;
32916
- if (C2)
32917
- $2 = C2;
32918
- else if (i && l2) {
32919
- const H2 = K(
32920
- f,
32921
- x2,
32922
- () => c(x2)
32923
- ).replace(`${f}-`, "");
32924
- for (; g2.length > 0; ) {
32925
- const I2 = g2[g2.length - 1];
32926
- if (I2 && I2.level >= v.depth)
32927
- g2.pop();
32893
+ C2 = Ft(v);
32894
+ }
32895
+ const $2 = [];
32896
+ E2.forEach((v, I2) => {
32897
+ const O2 = D(v), N2 = v.data?.hProperties?.id;
32898
+ let k2;
32899
+ if (N2)
32900
+ k2 = N2;
32901
+ else if (u && p2) {
32902
+ const b2 = Q(
32903
+ y,
32904
+ O2,
32905
+ () => h(O2)
32906
+ ).replace(`${y}-`, "");
32907
+ for (; $2.length > 0; ) {
32908
+ const S = $2[$2.length - 1];
32909
+ if (S && S.level >= v.depth)
32910
+ $2.pop();
32928
32911
  else
32929
32912
  break;
32930
32913
  }
32931
- const O2 = g2.map((I2) => I2.contentId);
32932
- $2 = O2.length > 0 ? `${f}-${O2.join("-")}-${H2}` : `${f}-${H2}`, g2.push({
32914
+ const P2 = $2.map((S) => S.contentId);
32915
+ k2 = P2.length > 0 ? `${y}-${P2.join("-")}-${b2}` : `${y}-${b2}`, $2.push({
32933
32916
  level: v.depth,
32934
- contentId: H2
32917
+ contentId: b2
32935
32918
  });
32936
- } else if (i && b2 < w.length) {
32937
- const H2 = w[b2];
32938
- H2 ? $2 = Ot(
32939
- f,
32940
- H2.numbers
32941
- ) : $2 = c(x2);
32919
+ } else if (u && I2 < C2.length) {
32920
+ const b2 = C2[I2];
32921
+ b2 ? k2 = Ht(
32922
+ y,
32923
+ b2.numbers
32924
+ ) : k2 = h(O2);
32942
32925
  } else
32943
- $2 = c(x2);
32944
- v.data || (v.data = {}), v.data.hProperties || (v.data.hProperties = {}), C2 || (v.data.hProperties.id = $2), m.push({
32926
+ k2 = h(O2);
32927
+ v.data || (v.data = {}), v.data.hProperties || (v.data.hProperties = {}), N2 || (v.data.hProperties.id = k2), w.push({
32945
32928
  level: v.depth,
32946
- text: x2,
32947
- id: $2
32929
+ text: O2,
32930
+ id: k2
32948
32931
  });
32949
32932
  });
32950
- const E2 = Lt(m);
32951
- a.push(...E2);
32933
+ const F2 = It(w);
32934
+ a.push(...F2);
32935
+ }, d2 = (a) => {
32936
+ throw n.error(
32937
+ `Failed to process markdown: ${a instanceof Error ? a.message : "Unknown error"}`
32938
+ ), new Error(
32939
+ `Failed to process markdown: ${a instanceof Error ? a.message : "Unknown error"}`
32940
+ );
32941
+ }, c = async (a, h, u, p2, y, g2) => {
32942
+ const {
32943
+ signal: w,
32944
+ useContentStringHeaderId: E2 = false,
32945
+ useHierarchicalHeadingId: C2 = true,
32946
+ advancedOptions: $2
32947
+ } = u ?? {}, {
32948
+ allowDangerousHtml: F2 = true,
32949
+ htmlOptions: v = Ct,
32950
+ gfmOptions: I2 = {},
32951
+ remarkPlugins: O2 = [],
32952
+ rehypePlugins: N2 = []
32953
+ } = $2 || {}, k2 = [];
32954
+ let b2 = 0;
32955
+ const P2 = () => `${h}-${++b2}`;
32956
+ let T = unified().use(remarkParse);
32957
+ if (O2)
32958
+ for (const x2 of O2)
32959
+ Array.isArray(x2) ? T = T.use(x2[0], x2[1]) : T = T.use(x2);
32960
+ let S = T.use(remarkGfm, I2).use($t).use(
32961
+ m(
32962
+ k2,
32963
+ E2 ? (x2) => Q(h, x2, P2) : P2,
32964
+ C2,
32965
+ E2,
32966
+ h
32967
+ )
32968
+ ).use(f(p2, w, P2)).use(remarkRehype, { allowDangerousHtml: F2 }).use(St).use(rehypeStringify, { allowDangerousHtml: F2 });
32969
+ if (N2)
32970
+ for (const x2 of N2)
32971
+ Array.isArray(x2) ? S = S.use(x2[0], x2[1]) : S = S.use(x2);
32972
+ const A = await S.process(y), J2 = String(A);
32973
+ return {
32974
+ html: xt(J2, v),
32975
+ frontmatter: p2,
32976
+ changed: g2,
32977
+ headingTree: k2,
32978
+ composeMarkdown: () => g2 ? G(p2, y) : a,
32979
+ uniqueIdPrefix: h
32980
+ };
32952
32981
  };
32953
32982
  return {
32954
- process: async (a, c, {
32955
- signal: i,
32956
- useContentStringHeaderId: l2 = false,
32957
- useHierarchicalHeadingId: f = true,
32958
- advancedOptions: u,
32959
- frontmatterTransform: m
32960
- } = {}) => {
32961
- const {
32962
- allowDangerousHtml: y = true,
32963
- htmlOptions: w = Ht,
32964
- gfmOptions: g2 = {},
32965
- remarkPlugins: E2 = [],
32966
- rehypePlugins: v = []
32967
- } = u || {};
32983
+ process: async (a, h, u = {}) => {
32968
32984
  try {
32969
- const b2 = a, { data: x2, content: C2 } = gt(a);
32970
- let $2 = x2;
32971
- const H2 = B(x2);
32972
- let O2 = false;
32973
- if (m) {
32974
- const k2 = {
32975
- originalFrontmatter: Ct(x2),
32976
- markdownContent: C2
32977
- }, R2 = m(k2);
32978
- R2 !== void 0 && ($2 = R2, O2 = B(R2) !== H2);
32979
- }
32980
- const A = [];
32981
- let I2 = 0;
32982
- const P2 = () => `${c}-${++I2}`;
32983
- let L2 = unified().use(remarkParse);
32984
- if (E2)
32985
- for (const k2 of E2)
32986
- Array.isArray(k2) ? L2 = L2.use(k2[0], k2[1]) : L2 = L2.use(k2);
32987
- let N2 = L2.use(remarkGfm, g2).use(St).use(
32988
- p2(
32989
- A,
32990
- l2 ? (k2) => K(c, k2, P2) : P2,
32991
- f,
32992
- l2,
32993
- c
32994
- )
32995
- ).use(h($2, i, P2)).use(remarkRehype, { allowDangerousHtml: y }).use(xt).use(rehypeStringify, { allowDangerousHtml: y });
32996
- if (v)
32997
- for (const k2 of v)
32998
- Array.isArray(k2) ? N2 = N2.use(k2[0], k2[1]) : N2 = N2.use(k2);
32999
- const Z2 = await N2.process(C2), X2 = String(Z2);
32985
+ const { data: p2, content: y } = W(a);
32986
+ return await c(
32987
+ a,
32988
+ h,
32989
+ u,
32990
+ p2,
32991
+ y,
32992
+ false
32993
+ );
32994
+ } catch (p2) {
32995
+ return d2(p2);
32996
+ }
32997
+ },
32998
+ processWithFrontmatterTransform: async (a, h, u, p2, y = {}) => {
32999
+ try {
33000
+ const { data: g2, content: w } = W(a), E2 = j(g2), $2 = u({
33001
+ originalFrontmatter: g2,
33002
+ markdownContent: w,
33003
+ uniqueIdPrefix: h
33004
+ });
33005
+ if ($2 === void 0)
33006
+ return;
33007
+ const { frontmatter: F2, uniqueIdPrefix: v } = $2, I2 = v ?? h, N2 = (F2 === g2 ? E2 : j(F2)) !== E2, k2 = await c(
33008
+ a,
33009
+ I2,
33010
+ y,
33011
+ F2,
33012
+ w,
33013
+ N2
33014
+ );
33015
+ let b2 = k2.frontmatter;
33016
+ if (p2) {
33017
+ const A = {
33018
+ frontmatter: b2,
33019
+ headingTree: k2.headingTree
33020
+ };
33021
+ b2 = p2(A);
33022
+ }
33023
+ const T = j(b2) !== E2, S = () => T ? G(b2, w) : a;
33000
33024
  return {
33001
- html: Ft(X2, w),
33002
- frontmatter: $2,
33003
- changed: O2,
33004
- headingTree: A,
33005
- composeMarkdown: () => O2 ? vt($2, C2) : b2
33025
+ html: k2.html,
33026
+ frontmatter: b2,
33027
+ changed: T,
33028
+ headingTree: k2.headingTree,
33029
+ composeMarkdown: S,
33030
+ uniqueIdPrefix: k2.uniqueIdPrefix
33006
33031
  };
33007
- } catch (b2) {
33008
- throw r.error(
33009
- `Failed to process markdown: ${b2 instanceof Error ? b2.message : "Unknown error"}`
33010
- ), new Error(
33011
- `Failed to process markdown: ${b2 instanceof Error ? b2.message : "Unknown error"}`
33012
- );
33032
+ } catch (g2) {
33033
+ return d2(g2);
33013
33034
  }
33014
33035
  }
33015
33036
  };
33016
- }, Qt = (e, t = {}) => {
33017
- const { maxRedirects: r = 5, timeoutEachRedirect: o2 = 1e4 } = t;
33037
+ }, Gt = (e, t = {}) => {
33038
+ const { maxRedirects: n = 5, timeoutEachRedirect: o2 = 1e4 } = t;
33018
33039
  return {
33019
33040
  name: "oembed",
33020
- processBlock: async (s2, h) => {
33021
- const p2 = s2.trim();
33022
- if (!qd(p2))
33023
- throw new Error(`Invalid URL: ${p2}`);
33041
+ processBlock: async (s2, f) => {
33042
+ const m = s2.trim();
33043
+ if (!qd(m))
33044
+ throw new Error(`Invalid URL: ${m}`);
33024
33045
  try {
33025
33046
  const d2 = await Gd(
33026
- p2,
33027
- r,
33047
+ m,
33048
+ n,
33028
33049
  o2,
33029
- h,
33050
+ f,
33030
33051
  e
33031
33052
  );
33032
- return Wd(d2, p2, t);
33053
+ return Wd(d2, m, t);
33033
33054
  } catch (d2) {
33034
- h.logger.warn("oEmbed fetch failed for URL:", p2, d2);
33035
- const a = Vd(d2);
33036
- return typeof window < "u" ? Xs(p2, a) : Xs(p2, a);
33055
+ f.logger.warn("oEmbed fetch failed for URL:", m, d2);
33056
+ const c = Vd(d2);
33057
+ return typeof window < "u" ? Xs(m, c) : Xs(m, c);
33037
33058
  }
33038
33059
  }
33039
33060
  };
33040
- }, Zt = (e = {}) => ({
33061
+ }, Qt = (e = {}) => ({
33041
33062
  name: "card",
33042
- processBlock: async (r, o2) => {
33043
- const n = r.trim();
33044
- if (!Xd(n))
33045
- throw new Error(`Invalid URL: ${n}`);
33063
+ processBlock: async (n, o2) => {
33064
+ const r = n.trim();
33065
+ if (!Xd(r))
33066
+ throw new Error(`Invalid URL: ${r}`);
33046
33067
  try {
33047
- const s2 = await Jd(n, e, o2);
33048
- return th(s2, n, e);
33068
+ const s2 = await Jd(r, e, o2);
33069
+ return th(s2, r, e);
33049
33070
  } catch (s2) {
33050
- o2.logger.warn("Card plugin fetch failed for URL:", n, s2);
33051
- const h = Vd(s2);
33052
- return typeof window < "u" ? eh(n, h) : eh(n, h);
33071
+ o2.logger.warn("Card plugin fetch failed for URL:", r, s2);
33072
+ const f = Vd(s2);
33073
+ return typeof window < "u" ? eh(r, f) : eh(r, f);
33053
33074
  }
33054
33075
  }
33055
- }), Xt = (e = {}) => {
33056
- const { className: t = "mermaid", includeId: r = true } = e;
33076
+ }), Vt = (e = {}) => {
33077
+ const { className: t = "mermaid", includeId: n = true } = e;
33057
33078
  return {
33058
33079
  name: "mermaid",
33059
- processBlock: async (n, s2) => {
33060
- const h = n.trim();
33061
- if (!h) {
33080
+ processBlock: async (r, s2) => {
33081
+ const f = r.trim();
33082
+ if (!f) {
33062
33083
  s2.logger.warn("Mermaid plugin received empty content");
33063
- const c = r ? ` id="${s2.getUniqueId()}"` : "";
33084
+ const l2 = n ? ` id="${s2.getUniqueId()}"` : "";
33064
33085
  return `<div class="${t}-wrapper">
33065
33086
  <style>
33066
33087
  .${t}-wrapper .${t} > svg {
@@ -33069,10 +33090,10 @@ const T = () => {
33069
33090
  max-width: none !important;
33070
33091
  }
33071
33092
  </style>
33072
- <div class="${t}"${c}><!-- Empty mermaid content --></div>
33093
+ <div class="${t}"${l2}><!-- Empty mermaid content --></div>
33073
33094
  </div>`;
33074
33095
  }
33075
- const p2 = r ? ` id="${s2.getUniqueId()}"` : "", d2 = h.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), a = `<div class="${t}-wrapper">
33096
+ const m = n ? ` id="${s2.getUniqueId()}"` : "", d2 = f.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), c = `<div class="${t}-wrapper">
33076
33097
  <style>
33077
33098
  .${t}-wrapper .${t} > svg {
33078
33099
  width: auto !important;
@@ -33080,13 +33101,13 @@ const T = () => {
33080
33101
  max-width: none !important;
33081
33102
  }
33082
33103
  </style>
33083
- <div class="${t}"${p2}>${d2}</div>
33104
+ <div class="${t}"${m}>${d2}</div>
33084
33105
  </div>`;
33085
33106
  return s2.logger.debug("Mermaid plugin processed content:", {
33086
- contentLength: h.length,
33107
+ contentLength: f.length,
33087
33108
  className: t,
33088
- includeId: r
33089
- }), a;
33109
+ includeId: n
33110
+ }), c;
33090
33111
  }
33091
33112
  };
33092
33113
  };
@@ -33099,25 +33120,25 @@ const T = () => {
33099
33120
  * repository.url: https://github.com/kekyo/async-primitives.git
33100
33121
  * git.commit.hash: 3b7bffeaa8ae47aea6e8b0ef0f70e265a6d9ab08
33101
33122
  */
33102
- const W = () => {
33103
- }, G = {
33104
- release: W,
33105
- [Symbol.dispose]: W
33106
- }, Nt = (e, t) => {
33123
+ const V = () => {
33124
+ }, Z = {
33125
+ release: V,
33126
+ [Symbol.dispose]: V
33127
+ }, Ot = (e, t) => {
33107
33128
  if (!e)
33108
- return G;
33129
+ return Z;
33109
33130
  if (e.aborted) {
33110
33131
  try {
33111
33132
  t();
33112
33133
  } catch (s2) {
33113
33134
  console.warn("AbortHook callback error: ", s2);
33114
33135
  }
33115
- return G;
33136
+ return Z;
33116
33137
  }
33117
- let r;
33118
- r = () => {
33119
- if (r) {
33120
- e.removeEventListener("abort", r), r = void 0;
33138
+ let n;
33139
+ n = () => {
33140
+ if (n) {
33141
+ e.removeEventListener("abort", n), n = void 0;
33121
33142
  try {
33122
33143
  t();
33123
33144
  } catch (s2) {
@@ -33126,73 +33147,73 @@ const W = () => {
33126
33147
  }
33127
33148
  };
33128
33149
  const o2 = () => {
33129
- r && (e.removeEventListener("abort", r), r = void 0);
33150
+ n && (e.removeEventListener("abort", n), n = void 0);
33130
33151
  };
33131
- return e.addEventListener("abort", r, { once: true }), {
33152
+ return e.addEventListener("abort", n, { once: true }), {
33132
33153
  release: o2,
33133
33154
  [Symbol.dispose]: o2
33134
33155
  };
33135
33156
  }, Tt = (e) => {
33136
33157
  typeof setImmediate == "function" ? setImmediate(e) : setTimeout(e, 0);
33137
- }, j = () => new Error("Lock acquisition was aborted"), _t = (e) => {
33158
+ }, U = () => new Error("Lock acquisition was aborted"), Lt = (e) => {
33138
33159
  let t = true;
33139
- const r = () => {
33160
+ const n = () => {
33140
33161
  t && (t = false, e());
33141
33162
  };
33142
33163
  return {
33143
33164
  get isActive() {
33144
33165
  return t;
33145
33166
  },
33146
- release: r,
33147
- [Symbol.dispose]: r
33167
+ release: n,
33168
+ [Symbol.dispose]: n
33148
33169
  };
33149
- }, q = (e = 20) => {
33170
+ }, z = (e = 20) => {
33150
33171
  let t = false;
33151
- const r = [];
33172
+ const n = [];
33152
33173
  let o2 = 0;
33153
- const n = () => {
33154
- var c;
33155
- if (t || r.length === 0)
33174
+ const r = () => {
33175
+ var l2;
33176
+ if (t || n.length === 0)
33156
33177
  return;
33157
- const i = r.shift();
33158
- if ((c = i.signal) != null && c.aborted) {
33159
- i.reject(j()), s2();
33178
+ const i = n.shift();
33179
+ if ((l2 = i.signal) != null && l2.aborted) {
33180
+ i.reject(U()), s2();
33160
33181
  return;
33161
33182
  }
33162
33183
  t = true;
33163
- const l2 = _t(h);
33164
- i.resolve(l2);
33184
+ const a = Lt(f);
33185
+ i.resolve(a);
33165
33186
  }, s2 = () => {
33166
- o2++, o2 >= e ? (o2 = 0, Tt(n)) : n();
33167
- }, h = () => {
33187
+ o2++, o2 >= e ? (o2 = 0, Tt(r)) : r();
33188
+ }, f = () => {
33168
33189
  t && (t = false, s2());
33169
- }, p2 = (c) => {
33170
- const i = r.indexOf(c);
33171
- i !== -1 && r.splice(i, 1);
33172
- }, d2 = async (c) => {
33173
- if (c) {
33174
- if (c.aborted)
33175
- throw j();
33176
- return new Promise((i, l2) => {
33177
- const f = {
33190
+ }, m = (l2) => {
33191
+ const i = n.indexOf(l2);
33192
+ i !== -1 && n.splice(i, 1);
33193
+ }, d2 = async (l2) => {
33194
+ if (l2) {
33195
+ if (l2.aborted)
33196
+ throw U();
33197
+ return new Promise((i, a) => {
33198
+ const h = {
33178
33199
  resolve: void 0,
33179
33200
  reject: void 0,
33180
- signal: c
33181
- }, u = Nt(c, () => {
33182
- p2(f), l2(j());
33201
+ signal: l2
33202
+ }, u = Ot(l2, () => {
33203
+ m(h), a(U());
33183
33204
  });
33184
- f.resolve = (m) => {
33185
- u.release(), i(m);
33186
- }, f.reject = (m) => {
33187
- u.release(), l2(m);
33188
- }, r.push(f), n();
33205
+ h.resolve = (p2) => {
33206
+ u.release(), i(p2);
33207
+ }, h.reject = (p2) => {
33208
+ u.release(), a(p2);
33209
+ }, n.push(h), r();
33189
33210
  });
33190
33211
  } else
33191
- return new Promise((i, l2) => {
33192
- r.push({
33212
+ return new Promise((i, a) => {
33213
+ n.push({
33193
33214
  resolve: i,
33194
- reject: l2
33195
- }), n();
33215
+ reject: a
33216
+ }), r();
33196
33217
  });
33197
33218
  };
33198
33219
  return {
@@ -33204,57 +33225,57 @@ const W = () => {
33204
33225
  return t;
33205
33226
  },
33206
33227
  get pendingCount() {
33207
- return r.length;
33228
+ return n.length;
33208
33229
  }
33209
33230
  };
33210
- }, At = () => {
33211
- const e = /* @__PURE__ */ new Map(), t = q(), r = (d2 = Date.now()) => {
33212
- const a = [];
33213
- for (const [c, i] of e.entries())
33214
- i.ttl !== void 0 && (i.ttl === 0 || d2 > i.timestamp + i.ttl) && a.push(c);
33215
- for (const c of a)
33216
- e.delete(c);
33217
- return a;
33231
+ }, Nt = () => {
33232
+ const e = /* @__PURE__ */ new Map(), t = z(), n = (d2 = Date.now()) => {
33233
+ const c = [];
33234
+ for (const [l2, i] of e.entries())
33235
+ i.ttl !== void 0 && (i.ttl === 0 || d2 > i.timestamp + i.ttl) && c.push(l2);
33236
+ for (const l2 of c)
33237
+ e.delete(l2);
33238
+ return c;
33218
33239
  };
33219
33240
  return {
33220
33241
  get: async (d2) => {
33221
- const a = e.get(d2);
33222
- if (!a)
33242
+ const c = e.get(d2);
33243
+ if (!c)
33223
33244
  return null;
33224
- if (a.ttl !== void 0 && (a.ttl === 0 || Date.now() > a.timestamp + a.ttl)) {
33245
+ if (c.ttl !== void 0 && (c.ttl === 0 || Date.now() > c.timestamp + c.ttl)) {
33225
33246
  const i = await t.lock();
33226
33247
  try {
33227
- const l2 = e.get(d2);
33228
- if (l2 && l2.ttl !== void 0) {
33229
- const f = Date.now();
33230
- (l2.ttl === 0 || f > l2.timestamp + l2.ttl) && e.delete(d2);
33248
+ const a = e.get(d2);
33249
+ if (a && a.ttl !== void 0) {
33250
+ const h = Date.now();
33251
+ (a.ttl === 0 || h > a.timestamp + a.ttl) && e.delete(d2);
33231
33252
  }
33232
33253
  return null;
33233
33254
  } finally {
33234
33255
  i.release();
33235
33256
  }
33236
33257
  }
33237
- return a.data;
33258
+ return c.data;
33238
33259
  },
33239
- set: async (d2, a, c) => {
33260
+ set: async (d2, c, l2) => {
33240
33261
  const i = {
33241
- data: a,
33262
+ data: c,
33242
33263
  timestamp: Date.now()
33243
33264
  };
33244
- c !== void 0 && (i.ttl = c);
33245
- const l2 = await t.lock();
33265
+ l2 !== void 0 && (i.ttl = l2);
33266
+ const a = await t.lock();
33246
33267
  try {
33247
33268
  e.set(d2, i);
33248
33269
  } finally {
33249
- l2.release();
33270
+ a.release();
33250
33271
  }
33251
33272
  },
33252
33273
  delete: async (d2) => {
33253
- const a = await t.lock();
33274
+ const c = await t.lock();
33254
33275
  try {
33255
33276
  e.delete(d2);
33256
33277
  } finally {
33257
- a.release();
33278
+ c.release();
33258
33279
  }
33259
33280
  },
33260
33281
  clear: async () => {
@@ -33268,36 +33289,36 @@ const W = () => {
33268
33289
  size: async () => {
33269
33290
  if (Array.from(e.entries()).length === 0)
33270
33291
  return 0;
33271
- const a = await t.lock();
33292
+ const c = await t.lock();
33272
33293
  try {
33273
- return r(), e.size;
33294
+ return n(), e.size;
33274
33295
  } finally {
33275
- a.release();
33296
+ c.release();
33276
33297
  }
33277
33298
  }
33278
33299
  };
33279
33300
  };
33280
- function D(e, t, r) {
33281
- return `fetch:${e}:${t}:${r}`;
33301
+ function M(e, t, n) {
33302
+ return `fetch:${e}:${t}:${n}`;
33282
33303
  }
33283
- const ee = (e, t = 6e4, r, o2) => {
33304
+ const Yt = (e, t = 6e4, n, o2) => {
33284
33305
  const {
33285
- cache: n = true,
33306
+ cache: r = true,
33286
33307
  cacheTTL: s2 = 3600 * 1e3,
33287
33308
  // 1 hour default
33288
- cacheFailures: h = true,
33289
- failureCacheTTL: p2 = 300 * 1e3
33309
+ cacheFailures: f = true,
33310
+ failureCacheTTL: m = 300 * 1e3
33290
33311
  // 5 minutes default for failures
33291
- } = {}, d2 = n ? r || At() : void 0;
33312
+ } = {}, d2 = r ? n || Nt() : void 0;
33292
33313
  return {
33293
- rawFetcher: async (c, i, l2, f) => {
33294
- if (n && d2) {
33295
- const y = D(c, i, e), w = await d2.get(y);
33296
- if (w)
33314
+ rawFetcher: async (l2, i, a, h) => {
33315
+ if (r && d2) {
33316
+ const y = M(l2, i, e), g2 = await d2.get(y);
33317
+ if (g2)
33297
33318
  try {
33298
- const g2 = JSON.parse(w);
33299
- if (g2.type === "success")
33300
- return f?.info(`Cache HIT (success) for URL: ${c}`), new Response(g2.data, {
33319
+ const w = JSON.parse(g2);
33320
+ if (w.type === "success")
33321
+ return h?.info(`Cache HIT (success) for URL: ${l2}`), new Response(w.data, {
33301
33322
  status: 200,
33302
33323
  statusText: "OK",
33303
33324
  headers: {
@@ -33305,73 +33326,73 @@ const ee = (e, t = 6e4, r, o2) => {
33305
33326
  "X-Cache": "HIT"
33306
33327
  }
33307
33328
  });
33308
- if (g2.type === "error" && h)
33309
- throw f?.info(`Cache HIT (error) for URL: ${c}`), new Error("Cached error");
33310
- f?.debug(
33311
- `Cache entry type ${g2.type} not eligible for use, cacheFailures: ${h}`
33329
+ if (w.type === "error" && f)
33330
+ throw h?.info(`Cache HIT (error) for URL: ${l2}`), new Error("Cached error");
33331
+ h?.debug(
33332
+ `Cache entry type ${w.type} not eligible for use, cacheFailures: ${f}`
33312
33333
  );
33313
- } catch (g2) {
33314
- if (f?.warn(
33315
- `Failed to parse cached entry for URL ${c}:`,
33316
- g2
33317
- ), g2 instanceof SyntaxError)
33318
- f?.debug("JSON parse error, continuing to network fetch");
33334
+ } catch (w) {
33335
+ if (h?.warn(
33336
+ `Failed to parse cached entry for URL ${l2}:`,
33337
+ w
33338
+ ), w instanceof SyntaxError)
33339
+ h?.debug("JSON parse error, continuing to network fetch");
33319
33340
  else
33320
- throw g2;
33341
+ throw w;
33321
33342
  }
33322
33343
  else
33323
- f?.info(`Cache MISS for URL: ${c}`);
33344
+ h?.info(`Cache MISS for URL: ${l2}`);
33324
33345
  }
33325
- let u, m = null;
33346
+ let u, p2 = null;
33326
33347
  try {
33327
33348
  u = await Yd(
33328
- c,
33349
+ l2,
33329
33350
  i,
33330
33351
  e,
33331
33352
  t,
33332
- l2,
33333
- f
33353
+ a,
33354
+ h
33334
33355
  );
33335
33356
  } catch (y) {
33336
- if (m = y, n && d2 && h)
33357
+ if (p2 = y, r && d2 && f)
33337
33358
  try {
33338
- const w = D(c, i, e), g2 = {
33359
+ const g2 = M(l2, i, e), w = {
33339
33360
  type: "error",
33340
33361
  data: "",
33341
33362
  error: {
33342
- message: m.message,
33343
- ...m.message.includes("HTTP error, status:") && {
33363
+ message: p2.message,
33364
+ ...p2.message.includes("HTTP error, status:") && {
33344
33365
  status: parseInt(
33345
- m.message.match(/status: (\d+)/)?.[1] || "0"
33366
+ p2.message.match(/status: (\d+)/)?.[1] || "0"
33346
33367
  )
33347
33368
  }
33348
33369
  },
33349
33370
  timestamp: Date.now()
33350
33371
  };
33351
33372
  await d2.set(
33352
- w,
33353
- JSON.stringify(g2),
33354
- p2
33355
- ), f?.debug(`Cached error for URL: ${c}`);
33356
- } catch (w) {
33357
- f?.warn(`Failed to cache error for URL ${c}:`, w), console.warn("Failed to cache error:", w);
33373
+ g2,
33374
+ JSON.stringify(w),
33375
+ m
33376
+ ), h?.debug(`Cached error for URL: ${l2}`);
33377
+ } catch (g2) {
33378
+ h?.warn(`Failed to cache error for URL ${l2}:`, g2), console.warn("Failed to cache error:", g2);
33358
33379
  }
33359
- throw m;
33380
+ throw p2;
33360
33381
  }
33361
- if (n && d2 && u.ok)
33382
+ if (r && d2 && u.ok)
33362
33383
  try {
33363
- const y = await u.clone().text(), w = D(c, i, e), g2 = {
33384
+ const y = await u.clone().text(), g2 = M(l2, i, e), w = {
33364
33385
  type: "success",
33365
33386
  data: y,
33366
33387
  timestamp: Date.now()
33367
33388
  };
33368
33389
  await d2.set(
33369
- w,
33370
- JSON.stringify(g2),
33390
+ g2,
33391
+ JSON.stringify(w),
33371
33392
  s2
33372
- ), f?.debug(`Cached successful response for URL: ${c}`);
33393
+ ), h?.debug(`Cached successful response for URL: ${l2}`);
33373
33394
  } catch (y) {
33374
- f?.warn(`Failed to cache response for URL ${c}:`, y), console.warn("Failed to cache response:", y);
33395
+ h?.warn(`Failed to cache response for URL ${l2}:`, y), console.warn("Failed to cache response:", y);
33375
33396
  }
33376
33397
  return u;
33377
33398
  },
@@ -33380,23 +33401,23 @@ const ee = (e, t = 6e4, r, o2) => {
33380
33401
  };
33381
33402
  function setupProcessor(config) {
33382
33403
  const plugins = [];
33383
- const logger = Gt();
33384
- const fetcher = ee(
33404
+ const logger = Kt();
33405
+ const fetcher = Yt(
33385
33406
  "mark-deco-cli/0.0.1",
33386
33407
  5e3,
33387
- At()
33408
+ Nt()
33388
33409
  );
33389
33410
  const enabledPlugins = config.noPlugins ? [] : Array.isArray(config.plugins) ? config.plugins : ["oembed", "card", "mermaid"];
33390
33411
  if (enabledPlugins.includes("oembed") && config.oembed?.enabled !== false) {
33391
- plugins.push(Qt($d, {}));
33412
+ plugins.push(Gt($d, {}));
33392
33413
  }
33393
33414
  if (enabledPlugins.includes("card") && config.card?.enabled !== false) {
33394
- plugins.push(Zt({}));
33415
+ plugins.push(Qt({}));
33395
33416
  }
33396
33417
  if (enabledPlugins.includes("mermaid") && config.mermaid?.enabled !== false) {
33397
- plugins.push(Xt({}));
33418
+ plugins.push(Vt({}));
33398
33419
  }
33399
- return Vt({
33420
+ return Wt({
33400
33421
  plugins,
33401
33422
  logger,
33402
33423
  fetcher