oasis-editor 0.0.365 → 0.0.367

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.
@@ -10283,56 +10283,56 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10283
10283
  ...void 0 !== p ? { displacedByCustomXml: p } : {}
10284
10284
  };
10285
10285
  }
10286
- async function mn(e, t, r, n, o) {
10287
- const i = [];
10288
- let a, s, l, c = 0;
10289
- const u = [], d = [], p = (e) => {
10290
- i.push(e), c += e.length;
10291
- }, f = e.childNodes;
10292
- for (let h = 0; h < f.length; h += 1) {
10293
- const e = f[h];
10286
+ async function mn(e, t, r, n, o, i) {
10287
+ const a = [];
10288
+ let s, l, c, u = 0;
10289
+ const d = [], p = [], f = (e) => {
10290
+ a.push(e), u += e.length;
10291
+ }, h = i ?? e.childNodes;
10292
+ for (let m = 0; m < h.length; m += 1) {
10293
+ const e = h[m];
10294
10294
  if (e?.nodeType !== e.ELEMENT_NODE) continue;
10295
10295
  const i = e;
10296
- if ("http://schemas.openxmlformats.org/wordprocessingml/2006/main" === i.namespaceURI) if ("t" === i.localName || "delText" === i.localName) p(i.textContent ?? "");
10297
- else if ("tab" === i.localName) p(" ");
10298
- else if ("noBreakHyphen" === i.localName) p("‑");
10299
- else if ("softHyphen" === i.localName) p("­");
10296
+ if ("http://schemas.openxmlformats.org/wordprocessingml/2006/main" === i.namespaceURI) if ("t" === i.localName || "delText" === i.localName) f(i.textContent ?? "");
10297
+ else if ("tab" === i.localName) f(" ");
10298
+ else if ("noBreakHyphen" === i.localName) f("‑");
10299
+ else if ("softHyphen" === i.localName) f("­");
10300
10300
  else if ("br" === i.localName) {
10301
10301
  const e = Fe(i, "type");
10302
- p("page" === e ? "\f" : "column" === e ? "\v" : "\n");
10302
+ f("page" === e ? "\f" : "column" === e ? "\v" : "\n");
10303
10303
  } else {
10304
10304
  if ("lastRenderedPageBreak" === i.localName) continue;
10305
10305
  if ("bookmarkStart" === i.localName || "bookmarkEnd" === i.localName) {
10306
10306
  const e = un(i);
10307
- e && u.push({
10308
- offset: c,
10307
+ e && d.push({
10308
+ offset: u,
10309
10309
  marker: e
10310
10310
  });
10311
10311
  continue;
10312
10312
  }
10313
10313
  if ("commentRangeStart" === i.localName || "commentRangeEnd" === i.localName) {
10314
10314
  const e = dn(i);
10315
- e && d.push({
10316
- offset: c,
10315
+ e && p.push({
10316
+ offset: u,
10317
10317
  marker: e
10318
10318
  });
10319
10319
  continue;
10320
10320
  }
10321
10321
  if ("proofErr" === i.localName || "commentReference" === i.localName || "permStart" === i.localName || "permEnd" === i.localName) continue;
10322
- if ("cr" === i.localName) p("\n");
10322
+ if ("cr" === i.localName) f("\n");
10323
10323
  else if ("drawing" === i.localName) {
10324
10324
  const e = await nn(i, t, r, n);
10325
- if (e.image) p(e.text), a = e.image;
10325
+ if (e.image) f(e.text), s = e.image;
10326
10326
  else {
10327
10327
  const e = await sn(i, o);
10328
- e && (p(""), s = e);
10328
+ e && (f(""), l = e);
10329
10329
  }
10330
10330
  } else if ("pict" === i.localName) {
10331
10331
  const e = await an(i, t, r, n);
10332
- e && (p(""), a = e);
10332
+ e && (f(""), s = e);
10333
10333
  } else if ("sym" === i.localName) {
10334
10334
  const e = Fe(i, "font") ?? "", t = Fe(i, "char") ?? "", r = parseInt(t, 16);
10335
- p(Number.isFinite(r) && r > 0 ? String.fromCodePoint(r) : "?"), l = {
10335
+ f(Number.isFinite(r) && r > 0 ? String.fromCodePoint(r) : "?"), c = {
10336
10336
  font: e,
10337
10337
  char: t
10338
10338
  };
@@ -10342,17 +10342,17 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10342
10342
  const e = ln(i);
10343
10343
  if (e) {
10344
10344
  const t = await sn(e, o);
10345
- t && (p(""), s = t);
10345
+ t && (f(""), l = t);
10346
10346
  }
10347
10347
  }
10348
10348
  }
10349
10349
  return {
10350
- text: i.join(""),
10351
- image: a,
10352
- ...s ? { textBox: s } : {},
10353
- ...u.length > 0 ? { innerBookmarks: u } : {},
10354
- ...d.length > 0 ? { innerComments: d } : {},
10355
- ...l ? { sym: l } : {}
10350
+ text: a.join(""),
10351
+ image: s,
10352
+ ...l ? { textBox: l } : {},
10353
+ ...d.length > 0 ? { innerBookmarks: d } : {},
10354
+ ...p.length > 0 ? { innerComments: p } : {},
10355
+ ...c ? { sym: c } : {}
10356
10356
  };
10357
10357
  }
10358
10358
  async function gn(e, t, r, n, o, i, a, s) {
@@ -10387,7 +10387,7 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10387
10387
  const t = /\bNUMPAGES\b/i.test(e.instruction) ? "NUMPAGES" : /\bPAGE\b/i.test(e.instruction) ? "PAGE" : /\bDATE\b/i.test(e.instruction) ? "DATE" : /\bREF\b/i.test(e.instruction) ? "REF" : /\bPAGEREF\b/i.test(e.instruction) ? "PAGEREF" : null;
10388
10388
  if (!t) return;
10389
10389
  const r = Cr(/\*\s*([A-Za-z]+)/.exec(e.instruction)?.[1]), n = "DATE" === t ? /@\s*"([^"]*)"/.exec(e.instruction)?.[1] : void 0, o = "REF" === t || "PAGEREF" === t ? cn(e.instruction) : void 0, i = l.slice(e.beginIndex);
10390
- if (i.some((e) => e.bookmark)) return;
10390
+ if (i.some((e) => Boolean(e.bookmark || e.comment || e.opaque || e.image || e.textBox || e.math || e.sym || e.footnoteReference || e.endnoteReference || e.revision || e.sdtWrappers?.length))) return;
10391
10391
  const a = i.filter((e) => !e.fieldChar && void 0 === e.fieldInstruction), s = a.map((e) => e.text).join("") || "1", c = a.find((e) => e.styles)?.styles ?? e.beginStyles;
10392
10392
  l.length = e.beginIndex;
10393
10393
  const u = "DATE" === t ? n ? {
@@ -10418,19 +10418,19 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10418
10418
  n && (n.instruction += r);
10419
10419
  };
10420
10420
  for (let p = 0; p < e.childNodes.length; p += 1) {
10421
- const c = e.childNodes[p];
10422
- if (c?.nodeType !== c.ELEMENT_NODE) continue;
10423
- const f = c;
10424
- if ("http://schemas.openxmlformats.org/officeDocument/2006/math" === f.namespaceURI && ("oMath" === f.localName || "oMathPara" === f.localName)) {
10421
+ const f = e.childNodes[p];
10422
+ if (f?.nodeType !== f.ELEMENT_NODE) continue;
10423
+ const h = f;
10424
+ if ("http://schemas.openxmlformats.org/officeDocument/2006/math" === h.namespaceURI && ("oMath" === h.localName || "oMathPara" === h.localName)) {
10425
10425
  l.push({
10426
10426
  text: "",
10427
- math: Or(f)
10427
+ math: Or(h)
10428
10428
  });
10429
10429
  continue;
10430
10430
  }
10431
- if ("http://schemas.openxmlformats.org/wordprocessingml/2006/main" !== f.namespaceURI) continue;
10432
- if ("bookmarkStart" === f.localName || "bookmarkEnd" === f.localName) {
10433
- const e = un(f);
10431
+ if ("http://schemas.openxmlformats.org/wordprocessingml/2006/main" !== h.namespaceURI) continue;
10432
+ if ("bookmarkStart" === h.localName || "bookmarkEnd" === h.localName) {
10433
+ const e = un(h);
10434
10434
  if (!e) continue;
10435
10435
  l.push({
10436
10436
  text: "",
@@ -10438,8 +10438,8 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10438
10438
  });
10439
10439
  continue;
10440
10440
  }
10441
- if ("commentRangeStart" === f.localName || "commentRangeEnd" === f.localName) {
10442
- const e = dn(f);
10441
+ if ("commentRangeStart" === h.localName || "commentRangeEnd" === h.localName) {
10442
+ const e = dn(h);
10443
10443
  if (!e) continue;
10444
10444
  l.push({
10445
10445
  text: "",
@@ -10447,27 +10447,27 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10447
10447
  });
10448
10448
  continue;
10449
10449
  }
10450
- const h = hn(f);
10451
- if (h) {
10450
+ const m = hn(h);
10451
+ if (m) {
10452
10452
  l.push({
10453
10453
  text: "",
10454
- revisionRangeMarker: h
10454
+ revisionRangeMarker: m
10455
10455
  });
10456
10456
  continue;
10457
10457
  }
10458
- const m = fn(f);
10459
- if (m) {
10460
- const e = await gn(f, t, r, n, o, i, a, s);
10458
+ const g = fn(h);
10459
+ if (g) {
10460
+ const e = await gn(h, t, r, n, o, i, a, s);
10461
10461
  for (const t of e) l.push({
10462
10462
  ...t,
10463
- revision: t.revision ?? m
10463
+ revision: t.revision ?? g
10464
10464
  });
10465
10465
  continue;
10466
10466
  }
10467
- if ("sdt" === f.localName) {
10468
- const e = De(f, Ne, "sdtContent");
10467
+ if ("sdt" === h.localName) {
10468
+ const e = De(h, Ne, "sdtContent");
10469
10469
  if (!e) continue;
10470
- const c = De(f, Ne, "sdtPr"), u = De(f, Ne, "sdtEndPr"), d = {
10470
+ const c = De(h, Ne, "sdtPr"), u = De(h, Ne, "sdtEndPr"), d = {
10471
10471
  groupId: v("sdt"),
10472
10472
  sdtPr: Ur(c),
10473
10473
  ...u ? { sdtEndPrXml: new b.XMLSerializer().serializeToString(u) } : {}
@@ -10478,33 +10478,112 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10478
10478
  });
10479
10479
  continue;
10480
10480
  }
10481
- if ("r" === f.localName) {
10482
- const e = Ct(De(f, Ne, "rPr"), i), t = Array.from(f.childNodes).filter((e) => 1 === e.nodeType && !("http://schemas.openxmlformats.org/wordprocessingml/2006/main" === e.namespaceURI && "rPr" === e.localName));
10483
- if (1 === t.length) {
10484
- const r = Tr(t[0]);
10485
- if (r) {
10486
- l.push({
10487
- text: "",
10488
- opaque: r,
10489
- ...e ? { styles: e } : {}
10490
- });
10491
- continue;
10481
+ if ("r" === h.localName) {
10482
+ const e = Ct(De(h, Ne, "rPr"), i), t = Array.from(h.childNodes).filter((e) => 1 === e.nodeType && !("http://schemas.openxmlformats.org/wordprocessingml/2006/main" === e.namespaceURI && "rPr" === e.localName)), p = t.map((e) => ({
10483
+ child: e,
10484
+ opaque: Tr(e)
10485
+ })), f = (e) => "http://schemas.openxmlformats.org/wordprocessingml/2006/main" === e.namespaceURI && [
10486
+ "t",
10487
+ "delText",
10488
+ "tab",
10489
+ "noBreakHyphen",
10490
+ "softHyphen",
10491
+ "br",
10492
+ "cr",
10493
+ "lastRenderedPageBreak"
10494
+ ].includes(e.localName ?? ""), m = (e) => "http://schemas.openxmlformats.org/wordprocessingml/2006/main" === e.namespaceURI && [
10495
+ "drawing",
10496
+ "pict",
10497
+ "sym",
10498
+ "bookmarkStart",
10499
+ "bookmarkEnd",
10500
+ "commentRangeStart",
10501
+ "commentRangeEnd"
10502
+ ].includes(e.localName ?? "") || "http://schemas.openxmlformats.org/markup-compatibility/2006" === e.namespaceURI && "AlternateContent" === e.localName;
10503
+ if (p.some((e) => e.opaque) && (1 === t.length || !c.length && p.every((e) => e.opaque || f(e.child) || m(e.child)))) {
10504
+ let t = "";
10505
+ const i = a ? {
10506
+ ...e,
10507
+ link: a
10508
+ } : e, c = () => {
10509
+ t.length && (l.push({
10510
+ text: t,
10511
+ ...i ? { styles: { ...i } } : {}
10512
+ }), t = "");
10513
+ };
10514
+ for (const { child: e, opaque: a } of p) if (a) c(), l.push({
10515
+ text: "",
10516
+ opaque: a,
10517
+ ...i ? { styles: { ...i } } : {}
10518
+ });
10519
+ else {
10520
+ if (m(e)) {
10521
+ c();
10522
+ const t = await mn(h, r, n, o, s, [e]);
10523
+ for (const e of t.innerBookmarks ?? []) l.push({
10524
+ text: "",
10525
+ bookmark: e.marker
10526
+ });
10527
+ for (const e of t.innerComments ?? []) l.push({
10528
+ text: "",
10529
+ comment: e.marker
10530
+ });
10531
+ if (t.text.length || t.image || t.textBox) {
10532
+ const e = t.sym && !i?.fontFamily ? {
10533
+ ...i,
10534
+ fontFamily: t.sym.font
10535
+ } : i;
10536
+ l.push({
10537
+ text: t.text,
10538
+ ...t.image ? { image: t.image } : {},
10539
+ ...t.textBox ? { textBox: t.textBox } : {},
10540
+ ...t.sym ? { sym: t.sym } : {},
10541
+ ...e ? { styles: { ...e } } : {}
10542
+ });
10543
+ }
10544
+ continue;
10545
+ }
10546
+ switch (e.localName) {
10547
+ case "t":
10548
+ case "delText":
10549
+ t += e.textContent ?? "";
10550
+ break;
10551
+ case "tab":
10552
+ t += " ";
10553
+ break;
10554
+ case "noBreakHyphen":
10555
+ t += "‑";
10556
+ break;
10557
+ case "softHyphen":
10558
+ t += "­";
10559
+ break;
10560
+ case "cr":
10561
+ t += "\n";
10562
+ break;
10563
+ case "br": {
10564
+ const r = Fe(e, "type");
10565
+ t += "page" === r ? "\f" : "column" === r ? "\v" : "\n";
10566
+ break;
10567
+ }
10568
+ }
10492
10569
  }
10570
+ c();
10571
+ continue;
10493
10572
  }
10494
- if (Ae(f, "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "fldChar").length > 0 || Ae(f, "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "instrText").length > 0 || Ae(f, "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "delInstrText").length > 0) {
10495
- for (let t = 0; t < f.childNodes.length; t += 1) {
10496
- const r = f.childNodes[t];
10573
+ if (Ae(h, "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "fldChar").length > 0 || Ae(h, "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "instrText").length > 0 || Ae(h, "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "delInstrText").length > 0) {
10574
+ for (let t = 0; t < h.childNodes.length; t += 1) {
10575
+ const r = h.childNodes[t];
10497
10576
  if (r?.nodeType !== r.ELEMENT_NODE) continue;
10498
10577
  const n = r;
10499
10578
  "http://schemas.openxmlformats.org/wordprocessingml/2006/main" === n.namespaceURI && ("fldChar" === n.localName ? u(n, e) : "instrText" !== n.localName && "delInstrText" !== n.localName || d(n, e));
10500
10579
  }
10501
10580
  continue;
10502
10581
  }
10503
- const c = De(f, Ne, "footnoteReference");
10504
- if (c) {
10505
- const t = Fe(c, "id");
10582
+ const g = De(h, Ne, "footnoteReference");
10583
+ if (g) {
10584
+ const t = Fe(g, "id");
10506
10585
  if (!t) continue;
10507
- const r = Fe(c, "customMarkFollows");
10586
+ const r = Fe(g, "customMarkFollows");
10508
10587
  let n = e;
10509
10588
  (n ??= {}).styleId ??= "footnoteReference", void 0 === n.superscript && (n.superscript = !0), l.push({
10510
10589
  text: "?",
@@ -10516,11 +10595,11 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10516
10595
  });
10517
10596
  continue;
10518
10597
  }
10519
- const p = De(f, Ne, "endnoteReference");
10520
- if (p) {
10521
- const t = Fe(p, "id");
10598
+ const w = De(h, Ne, "endnoteReference");
10599
+ if (w) {
10600
+ const t = Fe(w, "id");
10522
10601
  if (!t) continue;
10523
- const r = Fe(p, "customMarkFollows");
10602
+ const r = Fe(w, "customMarkFollows");
10524
10603
  let n = e;
10525
10604
  (n ??= {}).styleId ??= "endnoteReference", void 0 === n.superscript && (n.superscript = !0), l.push({
10526
10605
  text: "?",
@@ -10532,61 +10611,61 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10532
10611
  });
10533
10612
  continue;
10534
10613
  }
10535
- const { text: h, image: m, textBox: g, innerBookmarks: w, innerComments: b, sym: v } = await mn(f, r, n, o, s);
10536
- let y = e;
10537
- v && !y?.fontFamily && ((y ??= {}).fontFamily = v.font), a && ((y ??= {}).link = a);
10538
- const x = [...(w ?? []).map((e) => ({
10614
+ const { text: b, image: v, textBox: y, innerBookmarks: x, innerComments: E, sym: S } = await mn(h, r, n, o, s);
10615
+ let N = e;
10616
+ S && !N?.fontFamily && ((N ??= {}).fontFamily = S.font), a && ((N ??= {}).link = a);
10617
+ const k = [...(x ?? []).map((e) => ({
10539
10618
  offset: e.offset,
10540
10619
  run: {
10541
10620
  text: "",
10542
10621
  bookmark: e.marker
10543
10622
  }
10544
- })), ...(b ?? []).map((e) => ({
10623
+ })), ...(E ?? []).map((e) => ({
10545
10624
  offset: e.offset,
10546
10625
  run: {
10547
10626
  text: "",
10548
10627
  comment: e.marker
10549
10628
  }
10550
10629
  }))];
10551
- if (x.length > 0 && !m && !g) {
10552
- x.sort((e, t) => e.offset - t.offset);
10630
+ if (k.length > 0 && !v && !y) {
10631
+ k.sort((e, t) => e.offset - t.offset);
10553
10632
  let e = 0;
10554
- for (const r of x) {
10555
- const t = h.slice(e, r.offset);
10633
+ for (const r of k) {
10634
+ const t = b.slice(e, r.offset);
10556
10635
  t.length > 0 && l.push({
10557
10636
  text: t,
10558
- ...y ? { styles: y } : {}
10637
+ ...N ? { styles: N } : {}
10559
10638
  }), l.push(r.run), e = r.offset;
10560
10639
  }
10561
- const t = h.slice(e);
10640
+ const t = b.slice(e);
10562
10641
  t.length > 0 && l.push({
10563
10642
  text: t,
10564
- ...y ? { styles: y } : {}
10643
+ ...N ? { styles: N } : {}
10565
10644
  });
10566
10645
  continue;
10567
10646
  }
10568
- if (0 === h.length && !m && !g) continue;
10647
+ if (0 === b.length && !v && !y) continue;
10569
10648
  if (l.push({
10570
- text: h,
10571
- ...m ? { image: m } : {},
10572
- ...g ? { textBox: g } : {},
10573
- ...v ? { sym: v } : {},
10574
- ...y ? { styles: y } : {}
10575
- }), w) for (const r of w) l.push({
10649
+ text: b,
10650
+ ...v ? { image: v } : {},
10651
+ ...y ? { textBox: y } : {},
10652
+ ...S ? { sym: S } : {},
10653
+ ...N ? { styles: N } : {}
10654
+ }), x) for (const r of x) l.push({
10576
10655
  text: "",
10577
10656
  bookmark: r.marker
10578
10657
  });
10579
10658
  continue;
10580
10659
  }
10581
- if ("fldSimple" === f.localName) {
10582
- const e = f.getAttribute("w:instr") ?? f.getAttributeNS("http://schemas.openxmlformats.org/wordprocessingml/2006/main", "instr") ?? f.getAttribute("instr") ?? "", c = /\bNUMPAGES\b/i.test(e) ? "NUMPAGES" : /\bPAGE\b/i.test(e) ? "PAGE" : /\bDATE\b/i.test(e) ? "DATE" : /\bREF\b/i.test(e) ? "REF" : /\bPAGEREF\b/i.test(e) ? "PAGEREF" : null, u = /\*\s*([A-Za-z]+)/.exec(e)?.[1], d = Cr(u), p = "DATE" === c ? /@\s*"([^"]*)"/.exec(e)?.[1] : void 0, h = "REF" === c || "PAGEREF" === c ? cn(e) : void 0, m = await gn(f, t, r, n, o, i, a, s);
10660
+ if ("fldSimple" === h.localName) {
10661
+ const e = h.getAttribute("w:instr") ?? h.getAttributeNS("http://schemas.openxmlformats.org/wordprocessingml/2006/main", "instr") ?? h.getAttribute("instr") ?? "", c = /\bNUMPAGES\b/i.test(e) ? "NUMPAGES" : /\bPAGE\b/i.test(e) ? "PAGE" : /\bDATE\b/i.test(e) ? "DATE" : /\bREF\b/i.test(e) ? "REF" : /\bPAGEREF\b/i.test(e) ? "PAGEREF" : null, u = /\*\s*([A-Za-z]+)/.exec(e)?.[1], d = Cr(u), p = "DATE" === c ? /@\s*"([^"]*)"/.exec(e)?.[1] : void 0, f = "REF" === c || "PAGEREF" === c ? cn(e) : void 0, m = await gn(h, t, r, n, o, i, a, s);
10583
10662
  if (c) {
10584
10663
  const e = m.map((e) => e.text).join("") || "1", t = m.find((e) => e.styles)?.styles, r = "DATE" === c ? p ? {
10585
10664
  type: "DATE",
10586
10665
  dateFormat: p
10587
10666
  } : { type: "DATE" } : "REF" === c || "PAGEREF" === c ? {
10588
10667
  type: c,
10589
- bookmark: h
10668
+ bookmark: f
10590
10669
  } : d ? {
10591
10670
  type: c,
10592
10671
  format: d
@@ -10611,13 +10690,13 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10611
10690
  });
10612
10691
  continue;
10613
10692
  }
10614
- if ("hyperlink" === f.localName) {
10615
- let e = n.get(f.getAttribute("r:id") ?? f.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "id") ?? "") ?? null;
10693
+ if ("hyperlink" === h.localName) {
10694
+ let e = n.get(h.getAttribute("r:id") ?? h.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "id") ?? "") ?? null;
10616
10695
  if (!e) {
10617
- const t = Fe(f, "anchor");
10696
+ const t = Fe(h, "anchor");
10618
10697
  t && (e = `#${t}`);
10619
10698
  }
10620
- l.push(...await gn(f, t, r, n, o, i, e, s));
10699
+ l.push(...await gn(h, t, r, n, o, i, e, s));
10621
10700
  }
10622
10701
  }
10623
10702
  return l;
@@ -10773,7 +10852,7 @@ while (n === s[++o] && n === s[++o] && n === s[++o] && n === s[++o] && n === s[+
10773
10852
  }
10774
10853
  };
10775
10854
  return n(e), r;
10776
- }(e, n), c = l.length === r.length ? l : void 0;
10855
+ }(e, n), c = r.some((e) => e.opaque) || l.length !== r.length ? void 0 : l;
10777
10856
  if (a || o || s || c) return {
10778
10857
  ...a ? { xml: a } : {},
10779
10858
  ...o ? { attributes: o } : {},