@aws-cdk/integ-runner 2.197.5 → 2.197.6

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.
@@ -4670,7 +4670,7 @@ var require_semver2 = __commonJS({
4670
4670
  // ../cloud-assembly-schema/cli-version.json
4671
4671
  var require_cli_version = __commonJS({
4672
4672
  "../cloud-assembly-schema/cli-version.json"(exports2, module2) {
4673
- module2.exports = { version: "2.1112.0" };
4673
+ module2.exports = { version: "2.1113.0" };
4674
4674
  }
4675
4675
  });
4676
4676
 
@@ -91805,45 +91805,45 @@ var require_fxp = __commonJS({
91805
91805
  "../../../node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) {
91806
91806
  (() => {
91807
91807
  "use strict";
91808
- var t10 = { d: /* @__PURE__ */ __name((e11, n11) => {
91809
- for (var i11 in n11) t10.o(n11, i11) && !t10.o(e11, i11) && Object.defineProperty(e11, i11, { enumerable: true, get: n11[i11] });
91808
+ var t10 = { d: /* @__PURE__ */ __name((e11, i11) => {
91809
+ for (var n11 in i11) t10.o(i11, n11) && !t10.o(e11, n11) && Object.defineProperty(e11, n11, { enumerable: true, get: i11[n11] });
91810
91810
  }, "d"), o: /* @__PURE__ */ __name((t11, e11) => Object.prototype.hasOwnProperty.call(t11, e11), "o"), r: /* @__PURE__ */ __name((t11) => {
91811
91811
  "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t11, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t11, "__esModule", { value: true });
91812
91812
  }, "r") }, e10 = {};
91813
- t10.r(e10), t10.d(e10, { XMLBuilder: /* @__PURE__ */ __name(() => gt, "XMLBuilder"), XMLParser: /* @__PURE__ */ __name(() => it, "XMLParser"), XMLValidator: /* @__PURE__ */ __name(() => xt, "XMLValidator") });
91814
- const n10 = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", i10 = new RegExp("^[" + n10 + "][" + n10 + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
91813
+ t10.r(e10), t10.d(e10, { XMLBuilder: /* @__PURE__ */ __name(() => Ot, "XMLBuilder"), XMLParser: /* @__PURE__ */ __name(() => ft, "XMLParser"), XMLValidator: /* @__PURE__ */ __name(() => $t, "XMLValidator") });
91814
+ const i10 = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n10 = new RegExp("^[" + i10 + "][" + i10 + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
91815
91815
  function s10(t11, e11) {
91816
- const n11 = [];
91817
- let i11 = e11.exec(t11);
91818
- for (; i11; ) {
91816
+ const i11 = [];
91817
+ let n11 = e11.exec(t11);
91818
+ for (; n11; ) {
91819
91819
  const s11 = [];
91820
- s11.startIndex = e11.lastIndex - i11[0].length;
91821
- const r11 = i11.length;
91822
- for (let t12 = 0; t12 < r11; t12++) s11.push(i11[t12]);
91823
- n11.push(s11), i11 = e11.exec(t11);
91820
+ s11.startIndex = e11.lastIndex - n11[0].length;
91821
+ const r11 = n11.length;
91822
+ for (let t12 = 0; t12 < r11; t12++) s11.push(n11[t12]);
91823
+ i11.push(s11), n11 = e11.exec(t11);
91824
91824
  }
91825
- return n11;
91825
+ return i11;
91826
91826
  }
91827
91827
  __name(s10, "s");
91828
91828
  const r10 = /* @__PURE__ */ __name(function(t11) {
91829
- return !(null == i10.exec(t11));
91830
- }, "r"), o10 = { allowBooleanAttributes: false, unpairedTags: [] };
91831
- function a10(t11, e11) {
91832
- e11 = Object.assign({}, o10, e11);
91833
- const n11 = [];
91834
- let i11 = false, s11 = false;
91829
+ return !(null == n10.exec(t11));
91830
+ }, "r"), o10 = ["hasOwnProperty", "toString", "valueOf", "__defineGetter__", "__defineSetter__", "__lookupGetter__", "__lookupSetter__"], a10 = ["__proto__", "constructor", "prototype"], h10 = { allowBooleanAttributes: false, unpairedTags: [] };
91831
+ function l10(t11, e11) {
91832
+ e11 = Object.assign({}, h10, e11);
91833
+ const i11 = [];
91834
+ let n11 = false, s11 = false;
91835
91835
  "\uFEFF" === t11[0] && (t11 = t11.substr(1));
91836
91836
  for (let r11 = 0; r11 < t11.length; r11++) if ("<" === t11[r11] && "?" === t11[r11 + 1]) {
91837
91837
  if (r11 += 2, r11 = u10(t11, r11), r11.err) return r11;
91838
91838
  } else {
91839
91839
  if ("<" !== t11[r11]) {
91840
- if (l10(t11[r11])) continue;
91841
- return m10("InvalidChar", "char '" + t11[r11] + "' is not expected.", N(t11, r11));
91840
+ if (p10(t11[r11])) continue;
91841
+ return b10("InvalidChar", "char '" + t11[r11] + "' is not expected.", w10(t11, r11));
91842
91842
  }
91843
91843
  {
91844
91844
  let o11 = r11;
91845
91845
  if (r11++, "!" === t11[r11]) {
91846
- r11 = d10(t11, r11);
91846
+ r11 = c10(t11, r11);
91847
91847
  continue;
91848
91848
  }
91849
91849
  {
@@ -91851,65 +91851,65 @@ var require_fxp = __commonJS({
91851
91851
  "/" === t11[r11] && (a11 = true, r11++);
91852
91852
  let h11 = "";
91853
91853
  for (; r11 < t11.length && ">" !== t11[r11] && " " !== t11[r11] && " " !== t11[r11] && "\n" !== t11[r11] && "\r" !== t11[r11]; r11++) h11 += t11[r11];
91854
- if (h11 = h11.trim(), "/" === h11[h11.length - 1] && (h11 = h11.substring(0, h11.length - 1), r11--), !b10(h11)) {
91854
+ if (h11 = h11.trim(), "/" === h11[h11.length - 1] && (h11 = h11.substring(0, h11.length - 1), r11--), !y4(h11)) {
91855
91855
  let e12;
91856
- return e12 = 0 === h11.trim().length ? "Invalid space after '<'." : "Tag '" + h11 + "' is an invalid name.", m10("InvalidTag", e12, N(t11, r11));
91856
+ return e12 = 0 === h11.trim().length ? "Invalid space after '<'." : "Tag '" + h11 + "' is an invalid name.", b10("InvalidTag", e12, w10(t11, r11));
91857
91857
  }
91858
- const p11 = c10(t11, r11);
91859
- if (false === p11) return m10("InvalidAttr", "Attributes for '" + h11 + "' have open quote.", N(t11, r11));
91860
- let f11 = p11.value;
91861
- if (r11 = p11.index, "/" === f11[f11.length - 1]) {
91862
- const n12 = r11 - f11.length;
91863
- f11 = f11.substring(0, f11.length - 1);
91864
- const s12 = g10(f11, e11);
91865
- if (true !== s12) return m10(s12.err.code, s12.err.msg, N(t11, n12 + s12.err.line));
91866
- i11 = true;
91858
+ const l11 = g10(t11, r11);
91859
+ if (false === l11) return b10("InvalidAttr", "Attributes for '" + h11 + "' have open quote.", w10(t11, r11));
91860
+ let d11 = l11.value;
91861
+ if (r11 = l11.index, "/" === d11[d11.length - 1]) {
91862
+ const i12 = r11 - d11.length;
91863
+ d11 = d11.substring(0, d11.length - 1);
91864
+ const s12 = x10(d11, e11);
91865
+ if (true !== s12) return b10(s12.err.code, s12.err.msg, w10(t11, i12 + s12.err.line));
91866
+ n11 = true;
91867
91867
  } else if (a11) {
91868
- if (!p11.tagClosed) return m10("InvalidTag", "Closing tag '" + h11 + "' doesn't have proper closing.", N(t11, r11));
91869
- if (f11.trim().length > 0) return m10("InvalidTag", "Closing tag '" + h11 + "' can't have attributes or invalid starting.", N(t11, o11));
91870
- if (0 === n11.length) return m10("InvalidTag", "Closing tag '" + h11 + "' has not been opened.", N(t11, o11));
91868
+ if (!l11.tagClosed) return b10("InvalidTag", "Closing tag '" + h11 + "' doesn't have proper closing.", w10(t11, r11));
91869
+ if (d11.trim().length > 0) return b10("InvalidTag", "Closing tag '" + h11 + "' can't have attributes or invalid starting.", w10(t11, o11));
91870
+ if (0 === i11.length) return b10("InvalidTag", "Closing tag '" + h11 + "' has not been opened.", w10(t11, o11));
91871
91871
  {
91872
- const e12 = n11.pop();
91872
+ const e12 = i11.pop();
91873
91873
  if (h11 !== e12.tagName) {
91874
- let n12 = N(t11, e12.tagStartPos);
91875
- return m10("InvalidTag", "Expected closing tag '" + e12.tagName + "' (opened in line " + n12.line + ", col " + n12.col + ") instead of closing tag '" + h11 + "'.", N(t11, o11));
91874
+ let i12 = w10(t11, e12.tagStartPos);
91875
+ return b10("InvalidTag", "Expected closing tag '" + e12.tagName + "' (opened in line " + i12.line + ", col " + i12.col + ") instead of closing tag '" + h11 + "'.", w10(t11, o11));
91876
91876
  }
91877
- 0 == n11.length && (s11 = true);
91877
+ 0 == i11.length && (s11 = true);
91878
91878
  }
91879
91879
  } else {
91880
- const a12 = g10(f11, e11);
91881
- if (true !== a12) return m10(a12.err.code, a12.err.msg, N(t11, r11 - f11.length + a12.err.line));
91882
- if (true === s11) return m10("InvalidXml", "Multiple possible root nodes found.", N(t11, r11));
91883
- -1 !== e11.unpairedTags.indexOf(h11) || n11.push({ tagName: h11, tagStartPos: o11 }), i11 = true;
91880
+ const a12 = x10(d11, e11);
91881
+ if (true !== a12) return b10(a12.err.code, a12.err.msg, w10(t11, r11 - d11.length + a12.err.line));
91882
+ if (true === s11) return b10("InvalidXml", "Multiple possible root nodes found.", w10(t11, r11));
91883
+ -1 !== e11.unpairedTags.indexOf(h11) || i11.push({ tagName: h11, tagStartPos: o11 }), n11 = true;
91884
91884
  }
91885
91885
  for (r11++; r11 < t11.length; r11++) if ("<" === t11[r11]) {
91886
91886
  if ("!" === t11[r11 + 1]) {
91887
- r11++, r11 = d10(t11, r11);
91887
+ r11++, r11 = c10(t11, r11);
91888
91888
  continue;
91889
91889
  }
91890
91890
  if ("?" !== t11[r11 + 1]) break;
91891
91891
  if (r11 = u10(t11, ++r11), r11.err) return r11;
91892
91892
  } else if ("&" === t11[r11]) {
91893
- const e12 = x10(t11, r11);
91894
- if (-1 == e12) return m10("InvalidChar", "char '&' is not expected.", N(t11, r11));
91893
+ const e12 = N(t11, r11);
91894
+ if (-1 == e12) return b10("InvalidChar", "char '&' is not expected.", w10(t11, r11));
91895
91895
  r11 = e12;
91896
- } else if (true === s11 && !l10(t11[r11])) return m10("InvalidXml", "Extra text at the end", N(t11, r11));
91896
+ } else if (true === s11 && !p10(t11[r11])) return b10("InvalidXml", "Extra text at the end", w10(t11, r11));
91897
91897
  "<" === t11[r11] && r11--;
91898
91898
  }
91899
91899
  }
91900
91900
  }
91901
- return i11 ? 1 == n11.length ? m10("InvalidTag", "Unclosed tag '" + n11[0].tagName + "'.", N(t11, n11[0].tagStartPos)) : !(n11.length > 0) || m10("InvalidXml", "Invalid '" + JSON.stringify(n11.map((t12) => t12.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m10("InvalidXml", "Start tag expected.", 1);
91901
+ return n11 ? 1 == i11.length ? b10("InvalidTag", "Unclosed tag '" + i11[0].tagName + "'.", w10(t11, i11[0].tagStartPos)) : !(i11.length > 0) || b10("InvalidXml", "Invalid '" + JSON.stringify(i11.map((t12) => t12.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : b10("InvalidXml", "Start tag expected.", 1);
91902
91902
  }
91903
- __name(a10, "a");
91904
- function l10(t11) {
91903
+ __name(l10, "l");
91904
+ function p10(t11) {
91905
91905
  return " " === t11 || " " === t11 || "\n" === t11 || "\r" === t11;
91906
91906
  }
91907
- __name(l10, "l");
91907
+ __name(p10, "p");
91908
91908
  function u10(t11, e11) {
91909
- const n11 = e11;
91909
+ const i11 = e11;
91910
91910
  for (; e11 < t11.length; e11++) if ("?" == t11[e11] || " " == t11[e11]) {
91911
- const i11 = t11.substr(n11, e11 - n11);
91912
- if (e11 > 5 && "xml" === i11) return m10("InvalidXml", "XML declaration allowed only at the start of the document.", N(t11, e11));
91911
+ const n11 = t11.substr(i11, e11 - i11);
91912
+ if (e11 > 5 && "xml" === n11) return b10("InvalidXml", "XML declaration allowed only at the start of the document.", w10(t11, e11));
91913
91913
  if ("?" == t11[e11] && ">" == t11[e11 + 1]) {
91914
91914
  e11++;
91915
91915
  break;
@@ -91919,16 +91919,16 @@ var require_fxp = __commonJS({
91919
91919
  return e11;
91920
91920
  }
91921
91921
  __name(u10, "u");
91922
- function d10(t11, e11) {
91922
+ function c10(t11, e11) {
91923
91923
  if (t11.length > e11 + 5 && "-" === t11[e11 + 1] && "-" === t11[e11 + 2]) {
91924
91924
  for (e11 += 3; e11 < t11.length; e11++) if ("-" === t11[e11] && "-" === t11[e11 + 1] && ">" === t11[e11 + 2]) {
91925
91925
  e11 += 2;
91926
91926
  break;
91927
91927
  }
91928
91928
  } else if (t11.length > e11 + 8 && "D" === t11[e11 + 1] && "O" === t11[e11 + 2] && "C" === t11[e11 + 3] && "T" === t11[e11 + 4] && "Y" === t11[e11 + 5] && "P" === t11[e11 + 6] && "E" === t11[e11 + 7]) {
91929
- let n11 = 1;
91930
- for (e11 += 8; e11 < t11.length; e11++) if ("<" === t11[e11]) n11++;
91931
- else if (">" === t11[e11] && (n11--, 0 === n11)) break;
91929
+ let i11 = 1;
91930
+ for (e11 += 8; e11 < t11.length; e11++) if ("<" === t11[e11]) i11++;
91931
+ else if (">" === t11[e11] && (i11--, 0 === i11)) break;
91932
91932
  } else if (t11.length > e11 + 9 && "[" === t11[e11 + 1] && "C" === t11[e11 + 2] && "D" === t11[e11 + 3] && "A" === t11[e11 + 4] && "T" === t11[e11 + 5] && "A" === t11[e11 + 6] && "[" === t11[e11 + 7]) {
91933
91933
  for (e11 += 8; e11 < t11.length; e11++) if ("]" === t11[e11] && "]" === t11[e11 + 1] && ">" === t11[e11 + 2]) {
91934
91934
  e11 += 2;
@@ -91937,95 +91937,103 @@ var require_fxp = __commonJS({
91937
91937
  }
91938
91938
  return e11;
91939
91939
  }
91940
- __name(d10, "d");
91941
- const h10 = '"', p10 = "'";
91942
- function c10(t11, e11) {
91943
- let n11 = "", i11 = "", s11 = false;
91940
+ __name(c10, "c");
91941
+ const d10 = '"', f10 = "'";
91942
+ function g10(t11, e11) {
91943
+ let i11 = "", n11 = "", s11 = false;
91944
91944
  for (; e11 < t11.length; e11++) {
91945
- if (t11[e11] === h10 || t11[e11] === p10) "" === i11 ? i11 = t11[e11] : i11 !== t11[e11] || (i11 = "");
91946
- else if (">" === t11[e11] && "" === i11) {
91945
+ if (t11[e11] === d10 || t11[e11] === f10) "" === n11 ? n11 = t11[e11] : n11 !== t11[e11] || (n11 = "");
91946
+ else if (">" === t11[e11] && "" === n11) {
91947
91947
  s11 = true;
91948
91948
  break;
91949
91949
  }
91950
- n11 += t11[e11];
91950
+ i11 += t11[e11];
91951
91951
  }
91952
- return "" === i11 && { value: n11, index: e11, tagClosed: s11 };
91952
+ return "" === n11 && { value: i11, index: e11, tagClosed: s11 };
91953
91953
  }
91954
- __name(c10, "c");
91955
- const f10 = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
91956
- function g10(t11, e11) {
91957
- const n11 = s10(t11, f10), i11 = {};
91958
- for (let t12 = 0; t12 < n11.length; t12++) {
91959
- if (0 === n11[t12][1].length) return m10("InvalidAttr", "Attribute '" + n11[t12][2] + "' has no space in starting.", y4(n11[t12]));
91960
- if (void 0 !== n11[t12][3] && void 0 === n11[t12][4]) return m10("InvalidAttr", "Attribute '" + n11[t12][2] + "' is without value.", y4(n11[t12]));
91961
- if (void 0 === n11[t12][3] && !e11.allowBooleanAttributes) return m10("InvalidAttr", "boolean attribute '" + n11[t12][2] + "' is not allowed.", y4(n11[t12]));
91962
- const s11 = n11[t12][2];
91963
- if (!E3(s11)) return m10("InvalidAttr", "Attribute '" + s11 + "' is an invalid name.", y4(n11[t12]));
91964
- if (Object.prototype.hasOwnProperty.call(i11, s11)) return m10("InvalidAttr", "Attribute '" + s11 + "' is repeated.", y4(n11[t12]));
91965
- i11[s11] = 1;
91954
+ __name(g10, "g");
91955
+ const m10 = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
91956
+ function x10(t11, e11) {
91957
+ const i11 = s10(t11, m10), n11 = {};
91958
+ for (let t12 = 0; t12 < i11.length; t12++) {
91959
+ if (0 === i11[t12][1].length) return b10("InvalidAttr", "Attribute '" + i11[t12][2] + "' has no space in starting.", v11(i11[t12]));
91960
+ if (void 0 !== i11[t12][3] && void 0 === i11[t12][4]) return b10("InvalidAttr", "Attribute '" + i11[t12][2] + "' is without value.", v11(i11[t12]));
91961
+ if (void 0 === i11[t12][3] && !e11.allowBooleanAttributes) return b10("InvalidAttr", "boolean attribute '" + i11[t12][2] + "' is not allowed.", v11(i11[t12]));
91962
+ const s11 = i11[t12][2];
91963
+ if (!E3(s11)) return b10("InvalidAttr", "Attribute '" + s11 + "' is an invalid name.", v11(i11[t12]));
91964
+ if (Object.prototype.hasOwnProperty.call(n11, s11)) return b10("InvalidAttr", "Attribute '" + s11 + "' is repeated.", v11(i11[t12]));
91965
+ n11[s11] = 1;
91966
91966
  }
91967
91967
  return true;
91968
91968
  }
91969
- __name(g10, "g");
91970
- function x10(t11, e11) {
91969
+ __name(x10, "x");
91970
+ function N(t11, e11) {
91971
91971
  if (";" === t11[++e11]) return -1;
91972
91972
  if ("#" === t11[e11]) return (function(t12, e12) {
91973
- let n12 = /\d/;
91974
- for ("x" === t12[e12] && (e12++, n12 = /[\da-fA-F]/); e12 < t12.length; e12++) {
91973
+ let i12 = /\d/;
91974
+ for ("x" === t12[e12] && (e12++, i12 = /[\da-fA-F]/); e12 < t12.length; e12++) {
91975
91975
  if (";" === t12[e12]) return e12;
91976
- if (!t12[e12].match(n12)) break;
91976
+ if (!t12[e12].match(i12)) break;
91977
91977
  }
91978
91978
  return -1;
91979
91979
  })(t11, ++e11);
91980
- let n11 = 0;
91981
- for (; e11 < t11.length; e11++, n11++) if (!(t11[e11].match(/\w/) && n11 < 20)) {
91980
+ let i11 = 0;
91981
+ for (; e11 < t11.length; e11++, i11++) if (!(t11[e11].match(/\w/) && i11 < 20)) {
91982
91982
  if (";" === t11[e11]) break;
91983
91983
  return -1;
91984
91984
  }
91985
91985
  return e11;
91986
91986
  }
91987
- __name(x10, "x");
91988
- function m10(t11, e11, n11) {
91989
- return { err: { code: t11, msg: e11, line: n11.line || n11, col: n11.col } };
91987
+ __name(N, "N");
91988
+ function b10(t11, e11, i11) {
91989
+ return { err: { code: t11, msg: e11, line: i11.line || i11, col: i11.col } };
91990
91990
  }
91991
- __name(m10, "m");
91991
+ __name(b10, "b");
91992
91992
  function E3(t11) {
91993
91993
  return r10(t11);
91994
91994
  }
91995
91995
  __name(E3, "E");
91996
- function b10(t11) {
91996
+ function y4(t11) {
91997
91997
  return r10(t11);
91998
91998
  }
91999
- __name(b10, "b");
92000
- function N(t11, e11) {
92001
- const n11 = t11.substring(0, e11).split(/\r?\n/);
92002
- return { line: n11.length, col: n11[n11.length - 1].length + 1 };
91999
+ __name(y4, "y");
92000
+ function w10(t11, e11) {
92001
+ const i11 = t11.substring(0, e11).split(/\r?\n/);
92002
+ return { line: i11.length, col: i11[i11.length - 1].length + 1 };
92003
92003
  }
92004
- __name(N, "N");
92005
- function y4(t11) {
92004
+ __name(w10, "w");
92005
+ function v11(t11) {
92006
92006
  return t11.startIndex + t11[1].length;
92007
92007
  }
92008
- __name(y4, "y");
92009
- const T = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: /* @__PURE__ */ __name(function(t11, e11) {
92008
+ __name(v11, "v");
92009
+ const T = /* @__PURE__ */ __name((t11) => o10.includes(t11) ? "__" + t11 : t11, "T"), P = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: /* @__PURE__ */ __name(function(t11, e11) {
92010
92010
  return e11;
92011
92011
  }, "tagValueProcessor"), attributeValueProcessor: /* @__PURE__ */ __name(function(t11, e11) {
92012
92012
  return e11;
92013
- }, "attributeValueProcessor"), stopNodes: [], alwaysCreateTextNode: false, isArray: /* @__PURE__ */ __name(() => false, "isArray"), commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: /* @__PURE__ */ __name(function(t11, e11, n11) {
92013
+ }, "attributeValueProcessor"), stopNodes: [], alwaysCreateTextNode: false, isArray: /* @__PURE__ */ __name(() => false, "isArray"), commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: /* @__PURE__ */ __name(function(t11, e11, i11) {
92014
92014
  return t11;
92015
- }, "updateTag"), captureMetaData: false, maxNestedTags: 100, strictReservedNames: true };
92016
- function w10(t11) {
92017
- return "boolean" == typeof t11 ? { enabled: t11, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t11 && null !== t11 ? { enabled: false !== t11.enabled, maxEntitySize: t11.maxEntitySize ?? 1e4, maxExpansionDepth: t11.maxExpansionDepth ?? 10, maxTotalExpansions: t11.maxTotalExpansions ?? 1e3, maxExpandedLength: t11.maxExpandedLength ?? 1e5, allowedTags: t11.allowedTags ?? null, tagFilter: t11.tagFilter ?? null } : w10(true);
92015
+ }, "updateTag"), captureMetaData: false, maxNestedTags: 100, strictReservedNames: true, jPath: true, onDangerousProperty: T };
92016
+ function S(t11, e11) {
92017
+ if ("string" != typeof t11) return;
92018
+ const i11 = t11.toLowerCase();
92019
+ if (o10.some((t12) => i11 === t12.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e11}: "${t11}" is a reserved JavaScript keyword that could cause prototype pollution`);
92020
+ if (a10.some((t12) => i11 === t12.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e11}: "${t11}" is a reserved JavaScript keyword that could cause prototype pollution`);
92018
92021
  }
92019
- __name(w10, "w");
92020
- const v11 = /* @__PURE__ */ __name(function(t11) {
92021
- const e11 = Object.assign({}, T, t11);
92022
- return e11.processEntities = w10(e11.processEntities), e11;
92023
- }, "v");
92022
+ __name(S, "S");
92023
+ function A3(t11) {
92024
+ return "boolean" == typeof t11 ? { enabled: t11, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t11 && null !== t11 ? { enabled: false !== t11.enabled, maxEntitySize: t11.maxEntitySize ?? 1e4, maxExpansionDepth: t11.maxExpansionDepth ?? 10, maxTotalExpansions: t11.maxTotalExpansions ?? 1e3, maxExpandedLength: t11.maxExpandedLength ?? 1e5, maxEntityCount: t11.maxEntityCount ?? 100, allowedTags: t11.allowedTags ?? null, tagFilter: t11.tagFilter ?? null } : A3(true);
92025
+ }
92026
+ __name(A3, "A");
92027
+ const C3 = /* @__PURE__ */ __name(function(t11) {
92028
+ const e11 = Object.assign({}, P, t11), i11 = [{ value: e11.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e11.attributesGroupName, name: "attributesGroupName" }, { value: e11.textNodeName, name: "textNodeName" }, { value: e11.cdataPropName, name: "cdataPropName" }, { value: e11.commentPropName, name: "commentPropName" }];
92029
+ for (const { value: t12, name: e12 } of i11) t12 && S(t12, e12);
92030
+ return null === e11.onDangerousProperty && (e11.onDangerousProperty = T), e11.processEntities = A3(e11.processEntities), e11.stopNodes && Array.isArray(e11.stopNodes) && (e11.stopNodes = e11.stopNodes.map((t12) => "string" == typeof t12 && t12.startsWith("*.") ? ".." + t12.substring(2) : t12)), e11;
92031
+ }, "C");
92024
92032
  let O;
92025
92033
  O = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
92026
- class I3 {
92034
+ class $ {
92027
92035
  static {
92028
- __name(this, "I");
92036
+ __name(this, "$");
92029
92037
  }
92030
92038
  constructor(t11) {
92031
92039
  this.tagname = t11, this.child = [], this[":@"] = /* @__PURE__ */ Object.create(null);
@@ -92040,201 +92048,418 @@ var require_fxp = __commonJS({
92040
92048
  return O;
92041
92049
  }
92042
92050
  }
92043
- class P {
92051
+ class I3 {
92044
92052
  static {
92045
- __name(this, "P");
92053
+ __name(this, "I");
92046
92054
  }
92047
92055
  constructor(t11) {
92048
92056
  this.suppressValidationErr = !t11, this.options = t11;
92049
92057
  }
92050
92058
  readDocType(t11, e11) {
92051
- const n11 = /* @__PURE__ */ Object.create(null);
92059
+ const i11 = /* @__PURE__ */ Object.create(null);
92060
+ let n11 = 0;
92052
92061
  if ("O" !== t11[e11 + 3] || "C" !== t11[e11 + 4] || "T" !== t11[e11 + 5] || "Y" !== t11[e11 + 6] || "P" !== t11[e11 + 7] || "E" !== t11[e11 + 8]) throw new Error("Invalid Tag instead of DOCTYPE");
92053
92062
  {
92054
92063
  e11 += 9;
92055
- let i11 = 1, s11 = false, r11 = false, o11 = "";
92056
- for (; e11 < t11.length; e11++) if ("<" !== t11[e11] || r11) if (">" === t11[e11]) {
92057
- if (r11 ? "-" === t11[e11 - 1] && "-" === t11[e11 - 2] && (r11 = false, i11--) : i11--, 0 === i11) break;
92058
- } else "[" === t11[e11] ? s11 = true : o11 += t11[e11];
92064
+ let s11 = 1, r11 = false, o11 = false, a11 = "";
92065
+ for (; e11 < t11.length; e11++) if ("<" !== t11[e11] || o11) if (">" === t11[e11]) {
92066
+ if (o11 ? "-" === t11[e11 - 1] && "-" === t11[e11 - 2] && (o11 = false, s11--) : s11--, 0 === s11) break;
92067
+ } else "[" === t11[e11] ? r11 = true : a11 += t11[e11];
92059
92068
  else {
92060
- if (s11 && S(t11, "!ENTITY", e11)) {
92061
- let i12, s12;
92062
- if (e11 += 7, [i12, s12, e11] = this.readEntityExp(t11, e11 + 1, this.suppressValidationErr), -1 === s12.indexOf("&")) {
92063
- const t12 = i12.replace(/[.\-+*:]/g, "\\.");
92064
- n11[i12] = { regx: RegExp(`&${t12};`, "g"), val: s12 };
92069
+ if (r11 && _2(t11, "!ENTITY", e11)) {
92070
+ let s12, r12;
92071
+ if (e11 += 7, [s12, r12, e11] = this.readEntityExp(t11, e11 + 1, this.suppressValidationErr), -1 === r12.indexOf("&")) {
92072
+ if (false !== this.options.enabled && this.options.maxEntityCount && n11 >= this.options.maxEntityCount) throw new Error(`Entity count (${n11 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
92073
+ const t12 = s12.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
92074
+ i11[s12] = { regx: RegExp(`&${t12};`, "g"), val: r12 }, n11++;
92065
92075
  }
92066
- } else if (s11 && S(t11, "!ELEMENT", e11)) {
92076
+ } else if (r11 && _2(t11, "!ELEMENT", e11)) {
92067
92077
  e11 += 8;
92068
- const { index: n12 } = this.readElementExp(t11, e11 + 1);
92069
- e11 = n12;
92070
- } else if (s11 && S(t11, "!ATTLIST", e11)) e11 += 8;
92071
- else if (s11 && S(t11, "!NOTATION", e11)) {
92078
+ const { index: i12 } = this.readElementExp(t11, e11 + 1);
92079
+ e11 = i12;
92080
+ } else if (r11 && _2(t11, "!ATTLIST", e11)) e11 += 8;
92081
+ else if (r11 && _2(t11, "!NOTATION", e11)) {
92072
92082
  e11 += 9;
92073
- const { index: n12 } = this.readNotationExp(t11, e11 + 1, this.suppressValidationErr);
92074
- e11 = n12;
92083
+ const { index: i12 } = this.readNotationExp(t11, e11 + 1, this.suppressValidationErr);
92084
+ e11 = i12;
92075
92085
  } else {
92076
- if (!S(t11, "!--", e11)) throw new Error("Invalid DOCTYPE");
92077
- r11 = true;
92086
+ if (!_2(t11, "!--", e11)) throw new Error("Invalid DOCTYPE");
92087
+ o11 = true;
92078
92088
  }
92079
- i11++, o11 = "";
92089
+ s11++, a11 = "";
92080
92090
  }
92081
- if (0 !== i11) throw new Error("Unclosed DOCTYPE");
92091
+ if (0 !== s11) throw new Error("Unclosed DOCTYPE");
92082
92092
  }
92083
- return { entities: n11, i: e11 };
92093
+ return { entities: i11, i: e11 };
92084
92094
  }
92085
92095
  readEntityExp(t11, e11) {
92086
- e11 = A3(t11, e11);
92087
- let n11 = "";
92088
- for (; e11 < t11.length && !/\s/.test(t11[e11]) && '"' !== t11[e11] && "'" !== t11[e11]; ) n11 += t11[e11], e11++;
92089
- if (C3(n11), e11 = A3(t11, e11), !this.suppressValidationErr) {
92096
+ e11 = j10(t11, e11);
92097
+ let i11 = "";
92098
+ for (; e11 < t11.length && !/\s/.test(t11[e11]) && '"' !== t11[e11] && "'" !== t11[e11]; ) i11 += t11[e11], e11++;
92099
+ if (D3(i11), e11 = j10(t11, e11), !this.suppressValidationErr) {
92090
92100
  if ("SYSTEM" === t11.substring(e11, e11 + 6).toUpperCase()) throw new Error("External entities are not supported");
92091
92101
  if ("%" === t11[e11]) throw new Error("Parameter entities are not supported");
92092
92102
  }
92093
- let i11 = "";
92094
- if ([e11, i11] = this.readIdentifierVal(t11, e11, "entity"), false !== this.options.enabled && this.options.maxEntitySize && i11.length > this.options.maxEntitySize) throw new Error(`Entity "${n11}" size (${i11.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
92095
- return [n11, i11, --e11];
92103
+ let n11 = "";
92104
+ if ([e11, n11] = this.readIdentifierVal(t11, e11, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n11.length > this.options.maxEntitySize) throw new Error(`Entity "${i11}" size (${n11.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
92105
+ return [i11, n11, --e11];
92096
92106
  }
92097
92107
  readNotationExp(t11, e11) {
92098
- e11 = A3(t11, e11);
92099
- let n11 = "";
92100
- for (; e11 < t11.length && !/\s/.test(t11[e11]); ) n11 += t11[e11], e11++;
92101
- !this.suppressValidationErr && C3(n11), e11 = A3(t11, e11);
92102
- const i11 = t11.substring(e11, e11 + 6).toUpperCase();
92103
- if (!this.suppressValidationErr && "SYSTEM" !== i11 && "PUBLIC" !== i11) throw new Error(`Expected SYSTEM or PUBLIC, found "${i11}"`);
92104
- e11 += i11.length, e11 = A3(t11, e11);
92108
+ e11 = j10(t11, e11);
92109
+ let i11 = "";
92110
+ for (; e11 < t11.length && !/\s/.test(t11[e11]); ) i11 += t11[e11], e11++;
92111
+ !this.suppressValidationErr && D3(i11), e11 = j10(t11, e11);
92112
+ const n11 = t11.substring(e11, e11 + 6).toUpperCase();
92113
+ if (!this.suppressValidationErr && "SYSTEM" !== n11 && "PUBLIC" !== n11) throw new Error(`Expected SYSTEM or PUBLIC, found "${n11}"`);
92114
+ e11 += n11.length, e11 = j10(t11, e11);
92105
92115
  let s11 = null, r11 = null;
92106
- if ("PUBLIC" === i11) [e11, s11] = this.readIdentifierVal(t11, e11, "publicIdentifier"), '"' !== t11[e11 = A3(t11, e11)] && "'" !== t11[e11] || ([e11, r11] = this.readIdentifierVal(t11, e11, "systemIdentifier"));
92107
- else if ("SYSTEM" === i11 && ([e11, r11] = this.readIdentifierVal(t11, e11, "systemIdentifier"), !this.suppressValidationErr && !r11)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
92108
- return { notationName: n11, publicIdentifier: s11, systemIdentifier: r11, index: --e11 };
92116
+ if ("PUBLIC" === n11) [e11, s11] = this.readIdentifierVal(t11, e11, "publicIdentifier"), '"' !== t11[e11 = j10(t11, e11)] && "'" !== t11[e11] || ([e11, r11] = this.readIdentifierVal(t11, e11, "systemIdentifier"));
92117
+ else if ("SYSTEM" === n11 && ([e11, r11] = this.readIdentifierVal(t11, e11, "systemIdentifier"), !this.suppressValidationErr && !r11)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
92118
+ return { notationName: i11, publicIdentifier: s11, systemIdentifier: r11, index: --e11 };
92109
92119
  }
92110
- readIdentifierVal(t11, e11, n11) {
92111
- let i11 = "";
92120
+ readIdentifierVal(t11, e11, i11) {
92121
+ let n11 = "";
92112
92122
  const s11 = t11[e11];
92113
92123
  if ('"' !== s11 && "'" !== s11) throw new Error(`Expected quoted string, found "${s11}"`);
92114
- for (e11++; e11 < t11.length && t11[e11] !== s11; ) i11 += t11[e11], e11++;
92115
- if (t11[e11] !== s11) throw new Error(`Unterminated ${n11} value`);
92116
- return [++e11, i11];
92124
+ for (e11++; e11 < t11.length && t11[e11] !== s11; ) n11 += t11[e11], e11++;
92125
+ if (t11[e11] !== s11) throw new Error(`Unterminated ${i11} value`);
92126
+ return [++e11, n11];
92117
92127
  }
92118
92128
  readElementExp(t11, e11) {
92119
- e11 = A3(t11, e11);
92120
- let n11 = "";
92121
- for (; e11 < t11.length && !/\s/.test(t11[e11]); ) n11 += t11[e11], e11++;
92122
- if (!this.suppressValidationErr && !r10(n11)) throw new Error(`Invalid element name: "${n11}"`);
92129
+ e11 = j10(t11, e11);
92123
92130
  let i11 = "";
92124
- if ("E" === t11[e11 = A3(t11, e11)] && S(t11, "MPTY", e11)) e11 += 4;
92125
- else if ("A" === t11[e11] && S(t11, "NY", e11)) e11 += 2;
92131
+ for (; e11 < t11.length && !/\s/.test(t11[e11]); ) i11 += t11[e11], e11++;
92132
+ if (!this.suppressValidationErr && !r10(i11)) throw new Error(`Invalid element name: "${i11}"`);
92133
+ let n11 = "";
92134
+ if ("E" === t11[e11 = j10(t11, e11)] && _2(t11, "MPTY", e11)) e11 += 4;
92135
+ else if ("A" === t11[e11] && _2(t11, "NY", e11)) e11 += 2;
92126
92136
  else if ("(" === t11[e11]) {
92127
- for (e11++; e11 < t11.length && ")" !== t11[e11]; ) i11 += t11[e11], e11++;
92137
+ for (e11++; e11 < t11.length && ")" !== t11[e11]; ) n11 += t11[e11], e11++;
92128
92138
  if (")" !== t11[e11]) throw new Error("Unterminated content model");
92129
92139
  } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t11[e11]}"`);
92130
- return { elementName: n11, contentModel: i11.trim(), index: e11 };
92140
+ return { elementName: i11, contentModel: n11.trim(), index: e11 };
92131
92141
  }
92132
92142
  readAttlistExp(t11, e11) {
92133
- e11 = A3(t11, e11);
92134
- let n11 = "";
92135
- for (; e11 < t11.length && !/\s/.test(t11[e11]); ) n11 += t11[e11], e11++;
92136
- C3(n11), e11 = A3(t11, e11);
92143
+ e11 = j10(t11, e11);
92137
92144
  let i11 = "";
92138
92145
  for (; e11 < t11.length && !/\s/.test(t11[e11]); ) i11 += t11[e11], e11++;
92139
- if (!C3(i11)) throw new Error(`Invalid attribute name: "${i11}"`);
92140
- e11 = A3(t11, e11);
92146
+ D3(i11), e11 = j10(t11, e11);
92147
+ let n11 = "";
92148
+ for (; e11 < t11.length && !/\s/.test(t11[e11]); ) n11 += t11[e11], e11++;
92149
+ if (!D3(n11)) throw new Error(`Invalid attribute name: "${n11}"`);
92150
+ e11 = j10(t11, e11);
92141
92151
  let s11 = "";
92142
92152
  if ("NOTATION" === t11.substring(e11, e11 + 8).toUpperCase()) {
92143
- if (s11 = "NOTATION", "(" !== t11[e11 = A3(t11, e11 += 8)]) throw new Error(`Expected '(', found "${t11[e11]}"`);
92153
+ if (s11 = "NOTATION", "(" !== t11[e11 = j10(t11, e11 += 8)]) throw new Error(`Expected '(', found "${t11[e11]}"`);
92144
92154
  e11++;
92145
- let n12 = [];
92155
+ let i12 = [];
92146
92156
  for (; e11 < t11.length && ")" !== t11[e11]; ) {
92147
- let i12 = "";
92148
- for (; e11 < t11.length && "|" !== t11[e11] && ")" !== t11[e11]; ) i12 += t11[e11], e11++;
92149
- if (i12 = i12.trim(), !C3(i12)) throw new Error(`Invalid notation name: "${i12}"`);
92150
- n12.push(i12), "|" === t11[e11] && (e11++, e11 = A3(t11, e11));
92157
+ let n12 = "";
92158
+ for (; e11 < t11.length && "|" !== t11[e11] && ")" !== t11[e11]; ) n12 += t11[e11], e11++;
92159
+ if (n12 = n12.trim(), !D3(n12)) throw new Error(`Invalid notation name: "${n12}"`);
92160
+ i12.push(n12), "|" === t11[e11] && (e11++, e11 = j10(t11, e11));
92151
92161
  }
92152
92162
  if (")" !== t11[e11]) throw new Error("Unterminated list of notations");
92153
- e11++, s11 += " (" + n12.join("|") + ")";
92163
+ e11++, s11 += " (" + i12.join("|") + ")";
92154
92164
  } else {
92155
92165
  for (; e11 < t11.length && !/\s/.test(t11[e11]); ) s11 += t11[e11], e11++;
92156
- const n12 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
92157
- if (!this.suppressValidationErr && !n12.includes(s11.toUpperCase())) throw new Error(`Invalid attribute type: "${s11}"`);
92166
+ const i12 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
92167
+ if (!this.suppressValidationErr && !i12.includes(s11.toUpperCase())) throw new Error(`Invalid attribute type: "${s11}"`);
92158
92168
  }
92159
- e11 = A3(t11, e11);
92169
+ e11 = j10(t11, e11);
92160
92170
  let r11 = "";
92161
- return "#REQUIRED" === t11.substring(e11, e11 + 8).toUpperCase() ? (r11 = "#REQUIRED", e11 += 8) : "#IMPLIED" === t11.substring(e11, e11 + 7).toUpperCase() ? (r11 = "#IMPLIED", e11 += 7) : [e11, r11] = this.readIdentifierVal(t11, e11, "ATTLIST"), { elementName: n11, attributeName: i11, attributeType: s11, defaultValue: r11, index: e11 };
92171
+ return "#REQUIRED" === t11.substring(e11, e11 + 8).toUpperCase() ? (r11 = "#REQUIRED", e11 += 8) : "#IMPLIED" === t11.substring(e11, e11 + 7).toUpperCase() ? (r11 = "#IMPLIED", e11 += 7) : [e11, r11] = this.readIdentifierVal(t11, e11, "ATTLIST"), { elementName: i11, attributeName: n11, attributeType: s11, defaultValue: r11, index: e11 };
92162
92172
  }
92163
92173
  }
92164
- const A3 = /* @__PURE__ */ __name((t11, e11) => {
92174
+ const j10 = /* @__PURE__ */ __name((t11, e11) => {
92165
92175
  for (; e11 < t11.length && /\s/.test(t11[e11]); ) e11++;
92166
92176
  return e11;
92167
- }, "A");
92168
- function S(t11, e11, n11) {
92169
- for (let i11 = 0; i11 < e11.length; i11++) if (e11[i11] !== t11[n11 + i11 + 1]) return false;
92177
+ }, "j");
92178
+ function _2(t11, e11, i11) {
92179
+ for (let n11 = 0; n11 < e11.length; n11++) if (e11[n11] !== t11[i11 + n11 + 1]) return false;
92170
92180
  return true;
92171
92181
  }
92172
- __name(S, "S");
92173
- function C3(t11) {
92182
+ __name(_2, "_");
92183
+ function D3(t11) {
92174
92184
  if (r10(t11)) return t11;
92175
92185
  throw new Error(`Invalid entity name ${t11}`);
92176
92186
  }
92177
- __name(C3, "C");
92178
- const $ = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, D3 = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
92179
- const j10 = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
92180
- class L {
92187
+ __name(D3, "D");
92188
+ const V = /^[-+]?0x[a-fA-F0-9]+$/, k10 = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F3 = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
92189
+ const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
92190
+ class M {
92191
+ static {
92192
+ __name(this, "M");
92193
+ }
92194
+ constructor(t11 = {}) {
92195
+ this.separator = t11.separator || ".", this.path = [], this.siblingStacks = [];
92196
+ }
92197
+ push(t11, e11 = null, i11 = null) {
92198
+ this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
92199
+ const n11 = this.path.length;
92200
+ this.siblingStacks[n11] || (this.siblingStacks[n11] = /* @__PURE__ */ new Map());
92201
+ const s11 = this.siblingStacks[n11], r11 = i11 ? `${i11}:${t11}` : t11, o11 = s11.get(r11) || 0;
92202
+ let a11 = 0;
92203
+ for (const t12 of s11.values()) a11 += t12;
92204
+ s11.set(r11, o11 + 1);
92205
+ const h11 = { tag: t11, position: a11, counter: o11 };
92206
+ null != i11 && (h11.namespace = i11), null != e11 && (h11.values = e11), this.path.push(h11);
92207
+ }
92208
+ pop() {
92209
+ if (0 === this.path.length) return;
92210
+ const t11 = this.path.pop();
92211
+ return this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1), t11;
92212
+ }
92213
+ updateCurrent(t11) {
92214
+ if (this.path.length > 0) {
92215
+ const e11 = this.path[this.path.length - 1];
92216
+ null != t11 && (e11.values = t11);
92217
+ }
92218
+ }
92219
+ getCurrentTag() {
92220
+ return this.path.length > 0 ? this.path[this.path.length - 1].tag : void 0;
92221
+ }
92222
+ getCurrentNamespace() {
92223
+ return this.path.length > 0 ? this.path[this.path.length - 1].namespace : void 0;
92224
+ }
92225
+ getAttrValue(t11) {
92226
+ if (0 === this.path.length) return;
92227
+ const e11 = this.path[this.path.length - 1];
92228
+ return e11.values?.[t11];
92229
+ }
92230
+ hasAttr(t11) {
92231
+ if (0 === this.path.length) return false;
92232
+ const e11 = this.path[this.path.length - 1];
92233
+ return void 0 !== e11.values && t11 in e11.values;
92234
+ }
92235
+ getPosition() {
92236
+ return 0 === this.path.length ? -1 : this.path[this.path.length - 1].position ?? 0;
92237
+ }
92238
+ getCounter() {
92239
+ return 0 === this.path.length ? -1 : this.path[this.path.length - 1].counter ?? 0;
92240
+ }
92241
+ getIndex() {
92242
+ return this.getPosition();
92243
+ }
92244
+ getDepth() {
92245
+ return this.path.length;
92246
+ }
92247
+ toString(t11, e11 = true) {
92248
+ const i11 = t11 || this.separator;
92249
+ return this.path.map((t12) => e11 && t12.namespace ? `${t12.namespace}:${t12.tag}` : t12.tag).join(i11);
92250
+ }
92251
+ toArray() {
92252
+ return this.path.map((t11) => t11.tag);
92253
+ }
92254
+ reset() {
92255
+ this.path = [], this.siblingStacks = [];
92256
+ }
92257
+ matches(t11) {
92258
+ const e11 = t11.segments;
92259
+ return 0 !== e11.length && (t11.hasDeepWildcard() ? this._matchWithDeepWildcard(e11) : this._matchSimple(e11));
92260
+ }
92261
+ _matchSimple(t11) {
92262
+ if (this.path.length !== t11.length) return false;
92263
+ for (let e11 = 0; e11 < t11.length; e11++) {
92264
+ const i11 = t11[e11], n11 = this.path[e11], s11 = e11 === this.path.length - 1;
92265
+ if (!this._matchSegment(i11, n11, s11)) return false;
92266
+ }
92267
+ return true;
92268
+ }
92269
+ _matchWithDeepWildcard(t11) {
92270
+ let e11 = this.path.length - 1, i11 = t11.length - 1;
92271
+ for (; i11 >= 0 && e11 >= 0; ) {
92272
+ const n11 = t11[i11];
92273
+ if ("deep-wildcard" === n11.type) {
92274
+ if (i11--, i11 < 0) return true;
92275
+ const n12 = t11[i11];
92276
+ let s11 = false;
92277
+ for (let t12 = e11; t12 >= 0; t12--) {
92278
+ const r11 = t12 === this.path.length - 1;
92279
+ if (this._matchSegment(n12, this.path[t12], r11)) {
92280
+ e11 = t12 - 1, i11--, s11 = true;
92281
+ break;
92282
+ }
92283
+ }
92284
+ if (!s11) return false;
92285
+ } else {
92286
+ const t12 = e11 === this.path.length - 1;
92287
+ if (!this._matchSegment(n11, this.path[e11], t12)) return false;
92288
+ e11--, i11--;
92289
+ }
92290
+ }
92291
+ return i11 < 0;
92292
+ }
92293
+ _matchSegment(t11, e11, i11) {
92294
+ if ("*" !== t11.tag && t11.tag !== e11.tag) return false;
92295
+ if (void 0 !== t11.namespace && "*" !== t11.namespace && t11.namespace !== e11.namespace) return false;
92296
+ if (void 0 !== t11.attrName) {
92297
+ if (!i11) return false;
92298
+ if (!e11.values || !(t11.attrName in e11.values)) return false;
92299
+ if (void 0 !== t11.attrValue) {
92300
+ const i12 = e11.values[t11.attrName];
92301
+ if (String(i12) !== String(t11.attrValue)) return false;
92302
+ }
92303
+ }
92304
+ if (void 0 !== t11.position) {
92305
+ if (!i11) return false;
92306
+ const n11 = e11.counter ?? 0;
92307
+ if ("first" === t11.position && 0 !== n11) return false;
92308
+ if ("odd" === t11.position && n11 % 2 != 1) return false;
92309
+ if ("even" === t11.position && n11 % 2 != 0) return false;
92310
+ if ("nth" === t11.position && n11 !== t11.positionValue) return false;
92311
+ }
92312
+ return true;
92313
+ }
92314
+ snapshot() {
92315
+ return { path: this.path.map((t11) => ({ ...t11 })), siblingStacks: this.siblingStacks.map((t11) => new Map(t11)) };
92316
+ }
92317
+ restore(t11) {
92318
+ this.path = t11.path.map((t12) => ({ ...t12 })), this.siblingStacks = t11.siblingStacks.map((t12) => new Map(t12));
92319
+ }
92320
+ }
92321
+ class G3 {
92322
+ static {
92323
+ __name(this, "G");
92324
+ }
92325
+ constructor(t11, e11 = {}) {
92326
+ this.pattern = t11, this.separator = e11.separator || ".", this.segments = this._parse(t11), this._hasDeepWildcard = this.segments.some((t12) => "deep-wildcard" === t12.type), this._hasAttributeCondition = this.segments.some((t12) => void 0 !== t12.attrName), this._hasPositionSelector = this.segments.some((t12) => void 0 !== t12.position);
92327
+ }
92328
+ _parse(t11) {
92329
+ const e11 = [];
92330
+ let i11 = 0, n11 = "";
92331
+ for (; i11 < t11.length; ) t11[i11] === this.separator ? i11 + 1 < t11.length && t11[i11 + 1] === this.separator ? (n11.trim() && (e11.push(this._parseSegment(n11.trim())), n11 = ""), e11.push({ type: "deep-wildcard" }), i11 += 2) : (n11.trim() && e11.push(this._parseSegment(n11.trim())), n11 = "", i11++) : (n11 += t11[i11], i11++);
92332
+ return n11.trim() && e11.push(this._parseSegment(n11.trim())), e11;
92333
+ }
92334
+ _parseSegment(t11) {
92335
+ const e11 = { type: "tag" };
92336
+ let i11 = null, n11 = t11;
92337
+ const s11 = t11.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);
92338
+ if (s11 && (n11 = s11[1] + s11[3], s11[2])) {
92339
+ const t12 = s11[2].slice(1, -1);
92340
+ t12 && (i11 = t12);
92341
+ }
92342
+ let r11, o11, a11 = n11;
92343
+ if (n11.includes("::")) {
92344
+ const e12 = n11.indexOf("::");
92345
+ if (r11 = n11.substring(0, e12).trim(), a11 = n11.substring(e12 + 2).trim(), !r11) throw new Error(`Invalid namespace in pattern: ${t11}`);
92346
+ }
92347
+ let h11 = null;
92348
+ if (a11.includes(":")) {
92349
+ const t12 = a11.lastIndexOf(":"), e12 = a11.substring(0, t12).trim(), i12 = a11.substring(t12 + 1).trim();
92350
+ ["first", "last", "odd", "even"].includes(i12) || /^nth\(\d+\)$/.test(i12) ? (o11 = e12, h11 = i12) : o11 = a11;
92351
+ } else o11 = a11;
92352
+ if (!o11) throw new Error(`Invalid segment pattern: ${t11}`);
92353
+ if (e11.tag = o11, r11 && (e11.namespace = r11), i11) if (i11.includes("=")) {
92354
+ const t12 = i11.indexOf("=");
92355
+ e11.attrName = i11.substring(0, t12).trim(), e11.attrValue = i11.substring(t12 + 1).trim();
92356
+ } else e11.attrName = i11.trim();
92357
+ if (h11) {
92358
+ const t12 = h11.match(/^nth\((\d+)\)$/);
92359
+ t12 ? (e11.position = "nth", e11.positionValue = parseInt(t12[1], 10)) : e11.position = h11;
92360
+ }
92361
+ return e11;
92362
+ }
92363
+ get length() {
92364
+ return this.segments.length;
92365
+ }
92366
+ hasDeepWildcard() {
92367
+ return this._hasDeepWildcard;
92368
+ }
92369
+ hasAttributeCondition() {
92370
+ return this._hasAttributeCondition;
92371
+ }
92372
+ hasPositionSelector() {
92373
+ return this._hasPositionSelector;
92374
+ }
92375
+ toString() {
92376
+ return this.pattern;
92377
+ }
92378
+ }
92379
+ function R(t11, e11) {
92380
+ if (!t11) return {};
92381
+ const i11 = e11.attributesGroupName ? t11[e11.attributesGroupName] : t11;
92382
+ if (!i11) return {};
92383
+ const n11 = {};
92384
+ for (const t12 in i11) t12.startsWith(e11.attributeNamePrefix) ? n11[t12.substring(e11.attributeNamePrefix.length)] = i11[t12] : n11[t12] = i11[t12];
92385
+ return n11;
92386
+ }
92387
+ __name(R, "R");
92388
+ function U(t11) {
92389
+ if (!t11 || "string" != typeof t11) return;
92390
+ const e11 = t11.indexOf(":");
92391
+ if (-1 !== e11 && e11 > 0) {
92392
+ const i11 = t11.substring(0, e11);
92393
+ if ("xmlns" !== i11) return i11;
92394
+ }
92395
+ }
92396
+ __name(U, "U");
92397
+ class B3 {
92181
92398
  static {
92182
- __name(this, "L");
92399
+ __name(this, "B");
92183
92400
  }
92184
92401
  constructor(t11) {
92185
92402
  var e11;
92186
- if (this.options = t11, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: /* @__PURE__ */ __name((t12, e12) => K(e12, 10, "&#"), "val") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: /* @__PURE__ */ __name((t12, e12) => K(e12, 16, "&#x"), "val") } }, this.addExternalEntities = F3, this.parseXml = R, this.parseTextData = M, this.resolveNameSpace = k10, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q10, this.saveTextToParentTag = G3, this.addChild = B3, this.ignoreAttributesFn = "function" == typeof (e11 = this.options.ignoreAttributes) ? e11 : Array.isArray(e11) ? (t12) => {
92187
- for (const n11 of e11) {
92188
- if ("string" == typeof n11 && t12 === n11) return true;
92189
- if (n11 instanceof RegExp && n11.test(t12)) return true;
92403
+ if (this.options = t11, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: /* @__PURE__ */ __name((t12, e12) => st(e12, 10, "&#"), "val") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: /* @__PURE__ */ __name((t12, e12) => st(e12, 16, "&#x"), "val") } }, this.addExternalEntities = W, this.parseXml = Z, this.parseTextData = Y, this.resolveNameSpace = X, this.buildAttributesMap = q10, this.isItStopNode = H3, this.replaceEntitiesValue = K, this.readStopNodeData = it, this.saveTextToParentTag = Q, this.addChild = J3, this.ignoreAttributesFn = "function" == typeof (e11 = this.options.ignoreAttributes) ? e11 : Array.isArray(e11) ? (t12) => {
92404
+ for (const i11 of e11) {
92405
+ if ("string" == typeof i11 && t12 === i11) return true;
92406
+ if (i11 instanceof RegExp && i11.test(t12)) return true;
92190
92407
  }
92191
- } : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
92192
- this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
92408
+ } : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
92409
+ this.stopNodeExpressions = [];
92193
92410
  for (let t12 = 0; t12 < this.options.stopNodes.length; t12++) {
92194
92411
  const e12 = this.options.stopNodes[t12];
92195
- "string" == typeof e12 && (e12.startsWith("*.") ? this.stopNodesWildcard.add(e12.substring(2)) : this.stopNodesExact.add(e12));
92412
+ "string" == typeof e12 ? this.stopNodeExpressions.push(new G3(e12)) : e12 instanceof G3 && this.stopNodeExpressions.push(e12);
92196
92413
  }
92197
92414
  }
92198
92415
  }
92199
92416
  }
92200
- function F3(t11) {
92417
+ function W(t11) {
92201
92418
  const e11 = Object.keys(t11);
92202
- for (let n11 = 0; n11 < e11.length; n11++) {
92203
- const i11 = e11[n11], s11 = i11.replace(/[.\-+*:]/g, "\\.");
92204
- this.lastEntities[i11] = { regex: new RegExp("&" + s11 + ";", "g"), val: t11[i11] };
92419
+ for (let i11 = 0; i11 < e11.length; i11++) {
92420
+ const n11 = e11[i11], s11 = n11.replace(/[.\-+*:]/g, "\\.");
92421
+ this.lastEntities[n11] = { regex: new RegExp("&" + s11 + ";", "g"), val: t11[n11] };
92205
92422
  }
92206
92423
  }
92207
- __name(F3, "F");
92208
- function M(t11, e11, n11, i11, s11, r11, o11) {
92209
- if (void 0 !== t11 && (this.options.trimValues && !i11 && (t11 = t11.trim()), t11.length > 0)) {
92210
- o11 || (t11 = this.replaceEntitiesValue(t11, e11, n11));
92211
- const i12 = this.options.tagValueProcessor(e11, t11, n11, s11, r11);
92212
- return null == i12 ? t11 : typeof i12 != typeof t11 || i12 !== t11 ? i12 : this.options.trimValues || t11.trim() === t11 ? Z(t11, this.options.parseTagValue, this.options.numberParseOptions) : t11;
92424
+ __name(W, "W");
92425
+ function Y(t11, e11, i11, n11, s11, r11, o11) {
92426
+ if (void 0 !== t11 && (this.options.trimValues && !n11 && (t11 = t11.trim()), t11.length > 0)) {
92427
+ o11 || (t11 = this.replaceEntitiesValue(t11, e11, i11));
92428
+ const n12 = this.options.jPath ? i11.toString() : i11, a11 = this.options.tagValueProcessor(e11, t11, n12, s11, r11);
92429
+ return null == a11 ? t11 : typeof a11 != typeof t11 || a11 !== t11 ? a11 : this.options.trimValues || t11.trim() === t11 ? nt(t11, this.options.parseTagValue, this.options.numberParseOptions) : t11;
92213
92430
  }
92214
92431
  }
92215
- __name(M, "M");
92216
- function k10(t11) {
92432
+ __name(Y, "Y");
92433
+ function X(t11) {
92217
92434
  if (this.options.removeNSPrefix) {
92218
- const e11 = t11.split(":"), n11 = "/" === t11.charAt(0) ? "/" : "";
92435
+ const e11 = t11.split(":"), i11 = "/" === t11.charAt(0) ? "/" : "";
92219
92436
  if ("xmlns" === e11[0]) return "";
92220
- 2 === e11.length && (t11 = n11 + e11[1]);
92437
+ 2 === e11.length && (t11 = i11 + e11[1]);
92221
92438
  }
92222
92439
  return t11;
92223
92440
  }
92224
- __name(k10, "k");
92225
- const _2 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
92226
- function U(t11, e11, n11) {
92441
+ __name(X, "X");
92442
+ const z4 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
92443
+ function q10(t11, e11, i11) {
92227
92444
  if (true !== this.options.ignoreAttributes && "string" == typeof t11) {
92228
- const i11 = s10(t11, _2), r11 = i11.length, o11 = {};
92445
+ const n11 = s10(t11, z4), r11 = n11.length, o11 = {}, a11 = {};
92446
+ for (let t12 = 0; t12 < r11; t12++) {
92447
+ const s11 = this.resolveNameSpace(n11[t12][1]), r12 = n11[t12][4];
92448
+ if (s11.length && void 0 !== r12) {
92449
+ let t13 = r12;
92450
+ this.options.trimValues && (t13 = t13.trim()), t13 = this.replaceEntitiesValue(t13, i11, e11), a11[s11] = t13;
92451
+ }
92452
+ }
92453
+ Object.keys(a11).length > 0 && "object" == typeof e11 && e11.updateCurrent && e11.updateCurrent(a11);
92229
92454
  for (let t12 = 0; t12 < r11; t12++) {
92230
- const s11 = this.resolveNameSpace(i11[t12][1]);
92231
- if (this.ignoreAttributesFn(s11, e11)) continue;
92232
- let r12 = i11[t12][4], a11 = this.options.attributeNamePrefix + s11;
92233
- if (s11.length) if (this.options.transformAttributeName && (a11 = this.options.transformAttributeName(a11)), "__proto__" === a11 && (a11 = "#__proto__"), void 0 !== r12) {
92234
- this.options.trimValues && (r12 = r12.trim()), r12 = this.replaceEntitiesValue(r12, n11, e11);
92235
- const t13 = this.options.attributeValueProcessor(s11, r12, e11);
92236
- o11[a11] = null == t13 ? r12 : typeof t13 != typeof r12 || t13 !== r12 ? t13 : Z(r12, this.options.parseAttributeValue, this.options.numberParseOptions);
92237
- } else this.options.allowBooleanAttributes && (o11[a11] = true);
92455
+ const s11 = this.resolveNameSpace(n11[t12][1]), r12 = this.options.jPath ? e11.toString() : e11;
92456
+ if (this.ignoreAttributesFn(s11, r12)) continue;
92457
+ let a12 = n11[t12][4], h11 = this.options.attributeNamePrefix + s11;
92458
+ if (s11.length) if (this.options.transformAttributeName && (h11 = this.options.transformAttributeName(h11)), h11 = ot(h11, this.options), void 0 !== a12) {
92459
+ this.options.trimValues && (a12 = a12.trim()), a12 = this.replaceEntitiesValue(a12, i11, e11);
92460
+ const t13 = this.options.jPath ? e11.toString() : e11, n12 = this.options.attributeValueProcessor(s11, a12, t13);
92461
+ o11[h11] = null == n12 ? a12 : typeof n12 != typeof a12 || n12 !== a12 ? n12 : nt(a12, this.options.parseAttributeValue, this.options.numberParseOptions);
92462
+ } else this.options.allowBooleanAttributes && (o11[h11] = true);
92238
92463
  }
92239
92464
  if (!Object.keys(o11).length) return;
92240
92465
  if (this.options.attributesGroupName) {
@@ -92244,307 +92469,346 @@ var require_fxp = __commonJS({
92244
92469
  return o11;
92245
92470
  }
92246
92471
  }
92247
- __name(U, "U");
92248
- const R = /* @__PURE__ */ __name(function(t11) {
92472
+ __name(q10, "q");
92473
+ const Z = /* @__PURE__ */ __name(function(t11) {
92249
92474
  t11 = t11.replace(/\r\n?/g, "\n");
92250
- const e11 = new I3("!xml");
92251
- let n11 = e11, i11 = "", s11 = "";
92252
- this.entityExpansionCount = 0, this.currentExpandedLength = 0;
92253
- const r11 = new P(this.options.processEntities);
92254
- for (let o11 = 0; o11 < t11.length; o11++) if ("<" === t11[o11]) if ("/" === t11[o11 + 1]) {
92255
- const e12 = z4(t11, ">", o11, "Closing Tag is not closed.");
92256
- let r12 = t11.substring(o11 + 2, e12).trim();
92475
+ const e11 = new $("!xml");
92476
+ let i11 = e11, n11 = "";
92477
+ this.matcher.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
92478
+ const s11 = new I3(this.options.processEntities);
92479
+ for (let r11 = 0; r11 < t11.length; r11++) if ("<" === t11[r11]) if ("/" === t11[r11 + 1]) {
92480
+ const e12 = tt(t11, ">", r11, "Closing Tag is not closed.");
92481
+ let s12 = t11.substring(r11 + 2, e12).trim();
92257
92482
  if (this.options.removeNSPrefix) {
92258
- const t12 = r12.indexOf(":");
92259
- -1 !== t12 && (r12 = r12.substr(t12 + 1));
92260
- }
92261
- this.options.transformTagName && (r12 = this.options.transformTagName(r12)), n11 && (i11 = this.saveTextToParentTag(i11, n11, s11));
92262
- const a11 = s11.substring(s11.lastIndexOf(".") + 1);
92263
- if (r12 && -1 !== this.options.unpairedTags.indexOf(r12)) throw new Error(`Unpaired tag can not be used as closing tag: </${r12}>`);
92264
- let l11 = 0;
92265
- a11 && -1 !== this.options.unpairedTags.indexOf(a11) ? (l11 = s11.lastIndexOf(".", s11.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l11 = s11.lastIndexOf("."), s11 = s11.substring(0, l11), n11 = this.tagsNodeStack.pop(), i11 = "", o11 = e12;
92266
- } else if ("?" === t11[o11 + 1]) {
92267
- let e12 = W(t11, o11, false, "?>");
92483
+ const t12 = s12.indexOf(":");
92484
+ -1 !== t12 && (s12 = s12.substr(t12 + 1));
92485
+ }
92486
+ s12 = rt(this.options.transformTagName, s12, "", this.options).tagName, i11 && (n11 = this.saveTextToParentTag(n11, i11, this.matcher));
92487
+ const o11 = this.matcher.getCurrentTag();
92488
+ if (s12 && -1 !== this.options.unpairedTags.indexOf(s12)) throw new Error(`Unpaired tag can not be used as closing tag: </${s12}>`);
92489
+ o11 && -1 !== this.options.unpairedTags.indexOf(o11) && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = false, i11 = this.tagsNodeStack.pop(), n11 = "", r11 = e12;
92490
+ } else if ("?" === t11[r11 + 1]) {
92491
+ let e12 = et(t11, r11, false, "?>");
92268
92492
  if (!e12) throw new Error("Pi Tag is not closed.");
92269
- if (i11 = this.saveTextToParentTag(i11, n11, s11), this.options.ignoreDeclaration && "?xml" === e12.tagName || this.options.ignorePiTags) ;
92493
+ if (n11 = this.saveTextToParentTag(n11, i11, this.matcher), this.options.ignoreDeclaration && "?xml" === e12.tagName || this.options.ignorePiTags) ;
92270
92494
  else {
92271
- const t12 = new I3(e12.tagName);
92272
- t12.add(this.options.textNodeName, ""), e12.tagName !== e12.tagExp && e12.attrExpPresent && (t12[":@"] = this.buildAttributesMap(e12.tagExp, s11, e12.tagName)), this.addChild(n11, t12, s11, o11);
92495
+ const t12 = new $(e12.tagName);
92496
+ t12.add(this.options.textNodeName, ""), e12.tagName !== e12.tagExp && e12.attrExpPresent && (t12[":@"] = this.buildAttributesMap(e12.tagExp, this.matcher, e12.tagName)), this.addChild(i11, t12, this.matcher, r11);
92273
92497
  }
92274
- o11 = e12.closeIndex + 1;
92275
- } else if ("!--" === t11.substr(o11 + 1, 3)) {
92276
- const e12 = z4(t11, "-->", o11 + 4, "Comment is not closed.");
92498
+ r11 = e12.closeIndex + 1;
92499
+ } else if ("!--" === t11.substr(r11 + 1, 3)) {
92500
+ const e12 = tt(t11, "-->", r11 + 4, "Comment is not closed.");
92277
92501
  if (this.options.commentPropName) {
92278
- const r12 = t11.substring(o11 + 4, e12 - 2);
92279
- i11 = this.saveTextToParentTag(i11, n11, s11), n11.add(this.options.commentPropName, [{ [this.options.textNodeName]: r12 }]);
92280
- }
92281
- o11 = e12;
92282
- } else if ("!D" === t11.substr(o11 + 1, 2)) {
92283
- const e12 = r11.readDocType(t11, o11);
92284
- this.docTypeEntities = e12.entities, o11 = e12.i;
92285
- } else if ("![" === t11.substr(o11 + 1, 2)) {
92286
- const e12 = z4(t11, "]]>", o11, "CDATA is not closed.") - 2, r12 = t11.substring(o11 + 9, e12);
92287
- i11 = this.saveTextToParentTag(i11, n11, s11);
92288
- let a11 = this.parseTextData(r12, n11.tagname, s11, true, false, true, true);
92289
- null == a11 && (a11 = ""), this.options.cdataPropName ? n11.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r12 }]) : n11.add(this.options.textNodeName, a11), o11 = e12 + 2;
92502
+ const s12 = t11.substring(r11 + 4, e12 - 2);
92503
+ n11 = this.saveTextToParentTag(n11, i11, this.matcher), i11.add(this.options.commentPropName, [{ [this.options.textNodeName]: s12 }]);
92504
+ }
92505
+ r11 = e12;
92506
+ } else if ("!D" === t11.substr(r11 + 1, 2)) {
92507
+ const e12 = s11.readDocType(t11, r11);
92508
+ this.docTypeEntities = e12.entities, r11 = e12.i;
92509
+ } else if ("![" === t11.substr(r11 + 1, 2)) {
92510
+ const e12 = tt(t11, "]]>", r11, "CDATA is not closed.") - 2, s12 = t11.substring(r11 + 9, e12);
92511
+ n11 = this.saveTextToParentTag(n11, i11, this.matcher);
92512
+ let o11 = this.parseTextData(s12, i11.tagname, this.matcher, true, false, true, true);
92513
+ null == o11 && (o11 = ""), this.options.cdataPropName ? i11.add(this.options.cdataPropName, [{ [this.options.textNodeName]: s12 }]) : i11.add(this.options.textNodeName, o11), r11 = e12 + 2;
92290
92514
  } else {
92291
- let r12 = W(t11, o11, this.options.removeNSPrefix), a11 = r12.tagName;
92292
- const l11 = r12.rawTagName;
92293
- let u11 = r12.tagExp, d11 = r12.attrExpPresent, h11 = r12.closeIndex;
92294
- if (this.options.transformTagName) {
92295
- const t12 = this.options.transformTagName(a11);
92296
- u11 === a11 && (u11 = t12), a11 = t12;
92297
- }
92298
- if (this.options.strictReservedNames && (a11 === this.options.commentPropName || a11 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${a11}`);
92299
- n11 && i11 && "!xml" !== n11.tagname && (i11 = this.saveTextToParentTag(i11, n11, s11, false));
92300
- const p11 = n11;
92301
- p11 && -1 !== this.options.unpairedTags.indexOf(p11.tagname) && (n11 = this.tagsNodeStack.pop(), s11 = s11.substring(0, s11.lastIndexOf("."))), a11 !== e11.tagname && (s11 += s11 ? "." + a11 : a11);
92302
- const c11 = o11;
92303
- if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s11, a11)) {
92515
+ let s12 = et(t11, r11, this.options.removeNSPrefix);
92516
+ if (!s12) {
92517
+ const e12 = t11.substring(Math.max(0, r11 - 50), Math.min(t11.length, r11 + 50));
92518
+ throw new Error(`readTagExp returned undefined at position ${r11}. Context: "${e12}"`);
92519
+ }
92520
+ let o11 = s12.tagName;
92521
+ const a11 = s12.rawTagName;
92522
+ let h11 = s12.tagExp, l11 = s12.attrExpPresent, p11 = s12.closeIndex;
92523
+ if ({ tagName: o11, tagExp: h11 } = rt(this.options.transformTagName, o11, h11, this.options), this.options.strictReservedNames && (o11 === this.options.commentPropName || o11 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o11}`);
92524
+ i11 && n11 && "!xml" !== i11.tagname && (n11 = this.saveTextToParentTag(n11, i11, this.matcher, false));
92525
+ const u11 = i11;
92526
+ u11 && -1 !== this.options.unpairedTags.indexOf(u11.tagname) && (i11 = this.tagsNodeStack.pop(), this.matcher.pop());
92527
+ let c11 = false;
92528
+ h11.length > 0 && h11.lastIndexOf("/") === h11.length - 1 && (c11 = true, "/" === o11[o11.length - 1] ? (o11 = o11.substr(0, o11.length - 1), h11 = o11) : h11 = h11.substr(0, h11.length - 1), l11 = o11 !== h11);
92529
+ let d11, f11 = null, g11 = {};
92530
+ d11 = U(a11), o11 !== e11.tagname && this.matcher.push(o11, {}, d11), o11 !== h11 && l11 && (f11 = this.buildAttributesMap(h11, this.matcher, o11), f11 && (g11 = R(f11, this.options))), o11 !== e11.tagname && (this.isCurrentNodeStopNode = this.isItStopNode(this.stopNodeExpressions, this.matcher));
92531
+ const m11 = r11;
92532
+ if (this.isCurrentNodeStopNode) {
92304
92533
  let e12 = "";
92305
- if (u11.length > 0 && u11.lastIndexOf("/") === u11.length - 1) "/" === a11[a11.length - 1] ? (a11 = a11.substr(0, a11.length - 1), s11 = s11.substr(0, s11.length - 1), u11 = a11) : u11 = u11.substr(0, u11.length - 1), o11 = r12.closeIndex;
92306
- else if (-1 !== this.options.unpairedTags.indexOf(a11)) o11 = r12.closeIndex;
92534
+ if (c11) r11 = s12.closeIndex;
92535
+ else if (-1 !== this.options.unpairedTags.indexOf(o11)) r11 = s12.closeIndex;
92307
92536
  else {
92308
- const n12 = this.readStopNodeData(t11, l11, h11 + 1);
92309
- if (!n12) throw new Error(`Unexpected end of ${l11}`);
92310
- o11 = n12.i, e12 = n12.tagContent;
92537
+ const i12 = this.readStopNodeData(t11, a11, p11 + 1);
92538
+ if (!i12) throw new Error(`Unexpected end of ${a11}`);
92539
+ r11 = i12.i, e12 = i12.tagContent;
92311
92540
  }
92312
- const i12 = new I3(a11);
92313
- a11 !== u11 && d11 && (i12[":@"] = this.buildAttributesMap(u11, s11, a11)), e12 && (e12 = this.parseTextData(e12, a11, s11, true, d11, true, true)), s11 = s11.substr(0, s11.lastIndexOf(".")), i12.add(this.options.textNodeName, e12), this.addChild(n11, i12, s11, c11);
92541
+ const n12 = new $(o11);
92542
+ f11 && (n12[":@"] = f11), n12.add(this.options.textNodeName, e12), this.matcher.pop(), this.isCurrentNodeStopNode = false, this.addChild(i11, n12, this.matcher, m11);
92314
92543
  } else {
92315
- if (u11.length > 0 && u11.lastIndexOf("/") === u11.length - 1) {
92316
- if ("/" === a11[a11.length - 1] ? (a11 = a11.substr(0, a11.length - 1), s11 = s11.substr(0, s11.length - 1), u11 = a11) : u11 = u11.substr(0, u11.length - 1), this.options.transformTagName) {
92317
- const t13 = this.options.transformTagName(a11);
92318
- u11 === a11 && (u11 = t13), a11 = t13;
92319
- }
92320
- const t12 = new I3(a11);
92321
- a11 !== u11 && d11 && (t12[":@"] = this.buildAttributesMap(u11, s11, a11)), this.addChild(n11, t12, s11, c11), s11 = s11.substr(0, s11.lastIndexOf("."));
92544
+ if (c11) {
92545
+ ({ tagName: o11, tagExp: h11 } = rt(this.options.transformTagName, o11, h11, this.options));
92546
+ const t12 = new $(o11);
92547
+ f11 && (t12[":@"] = f11), this.addChild(i11, t12, this.matcher, m11), this.matcher.pop(), this.isCurrentNodeStopNode = false;
92322
92548
  } else {
92323
- if (-1 !== this.options.unpairedTags.indexOf(a11)) {
92324
- const t12 = new I3(a11);
92325
- a11 !== u11 && d11 && (t12[":@"] = this.buildAttributesMap(u11, s11)), this.addChild(n11, t12, s11, c11), s11 = s11.substr(0, s11.lastIndexOf(".")), o11 = r12.closeIndex;
92549
+ if (-1 !== this.options.unpairedTags.indexOf(o11)) {
92550
+ const t12 = new $(o11);
92551
+ f11 && (t12[":@"] = f11), this.addChild(i11, t12, this.matcher, m11), this.matcher.pop(), this.isCurrentNodeStopNode = false, r11 = s12.closeIndex;
92326
92552
  continue;
92327
92553
  }
92328
92554
  {
92329
- const t12 = new I3(a11);
92555
+ const t12 = new $(o11);
92330
92556
  if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
92331
- this.tagsNodeStack.push(n11), a11 !== u11 && d11 && (t12[":@"] = this.buildAttributesMap(u11, s11, a11)), this.addChild(n11, t12, s11, c11), n11 = t12;
92557
+ this.tagsNodeStack.push(i11), f11 && (t12[":@"] = f11), this.addChild(i11, t12, this.matcher, m11), i11 = t12;
92332
92558
  }
92333
92559
  }
92334
- i11 = "", o11 = h11;
92560
+ n11 = "", r11 = p11;
92335
92561
  }
92336
92562
  }
92337
- else i11 += t11[o11];
92563
+ else n11 += t11[r11];
92338
92564
  return e11.child;
92339
- }, "R");
92340
- function B3(t11, e11, n11, i11) {
92341
- this.options.captureMetaData || (i11 = void 0);
92342
- const s11 = this.options.updateTag(e11.tagname, n11, e11[":@"]);
92343
- false === s11 || ("string" == typeof s11 ? (e11.tagname = s11, t11.addChild(e11, i11)) : t11.addChild(e11, i11));
92344
- }
92345
- __name(B3, "B");
92346
- const Y = /* @__PURE__ */ __name(function(t11, e11, n11) {
92347
- if (-1 === t11.indexOf("&")) return t11;
92348
- const i11 = this.options.processEntities;
92349
- if (!i11.enabled) return t11;
92350
- if (i11.allowedTags && !i11.allowedTags.includes(e11)) return t11;
92351
- if (i11.tagFilter && !i11.tagFilter(e11, n11)) return t11;
92352
- for (let e12 in this.docTypeEntities) {
92353
- const n12 = this.docTypeEntities[e12], s11 = t11.match(n12.regx);
92565
+ }, "Z");
92566
+ function J3(t11, e11, i11, n11) {
92567
+ this.options.captureMetaData || (n11 = void 0);
92568
+ const s11 = this.options.jPath ? i11.toString() : i11, r11 = this.options.updateTag(e11.tagname, s11, e11[":@"]);
92569
+ false === r11 || ("string" == typeof r11 ? (e11.tagname = r11, t11.addChild(e11, n11)) : t11.addChild(e11, n11));
92570
+ }
92571
+ __name(J3, "J");
92572
+ function K(t11, e11, i11) {
92573
+ const n11 = this.options.processEntities;
92574
+ if (!n11 || !n11.enabled) return t11;
92575
+ if (n11.allowedTags) {
92576
+ const s11 = this.options.jPath ? i11.toString() : i11;
92577
+ if (!(Array.isArray(n11.allowedTags) ? n11.allowedTags.includes(e11) : n11.allowedTags(e11, s11))) return t11;
92578
+ }
92579
+ if (n11.tagFilter) {
92580
+ const s11 = this.options.jPath ? i11.toString() : i11;
92581
+ if (!n11.tagFilter(e11, s11)) return t11;
92582
+ }
92583
+ for (const e12 of Object.keys(this.docTypeEntities)) {
92584
+ const i12 = this.docTypeEntities[e12], s11 = t11.match(i12.regx);
92354
92585
  if (s11) {
92355
- if (this.entityExpansionCount += s11.length, i11.maxTotalExpansions && this.entityExpansionCount > i11.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${i11.maxTotalExpansions}`);
92586
+ if (this.entityExpansionCount += s11.length, n11.maxTotalExpansions && this.entityExpansionCount > n11.maxTotalExpansions) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n11.maxTotalExpansions}`);
92356
92587
  const e13 = t11.length;
92357
- if (t11 = t11.replace(n12.regx, n12.val), i11.maxExpandedLength && (this.currentExpandedLength += t11.length - e13, this.currentExpandedLength > i11.maxExpandedLength)) throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${i11.maxExpandedLength}`);
92588
+ if (t11 = t11.replace(i12.regx, i12.val), n11.maxExpandedLength && (this.currentExpandedLength += t11.length - e13, this.currentExpandedLength > n11.maxExpandedLength)) throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n11.maxExpandedLength}`);
92358
92589
  }
92359
92590
  }
92360
- if (-1 === t11.indexOf("&")) return t11;
92361
- for (let e12 in this.lastEntities) {
92362
- const n12 = this.lastEntities[e12];
92363
- t11 = t11.replace(n12.regex, n12.val);
92591
+ for (const e12 of Object.keys(this.lastEntities)) {
92592
+ const i12 = this.lastEntities[e12], s11 = t11.match(i12.regex);
92593
+ if (s11 && (this.entityExpansionCount += s11.length, n11.maxTotalExpansions && this.entityExpansionCount > n11.maxTotalExpansions)) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n11.maxTotalExpansions}`);
92594
+ t11 = t11.replace(i12.regex, i12.val);
92364
92595
  }
92365
92596
  if (-1 === t11.indexOf("&")) return t11;
92366
- if (this.options.htmlEntities) for (let e12 in this.htmlEntities) {
92367
- const n12 = this.htmlEntities[e12];
92368
- t11 = t11.replace(n12.regex, n12.val);
92597
+ if (this.options.htmlEntities) for (const e12 of Object.keys(this.htmlEntities)) {
92598
+ const i12 = this.htmlEntities[e12], s11 = t11.match(i12.regex);
92599
+ if (s11 && (this.entityExpansionCount += s11.length, n11.maxTotalExpansions && this.entityExpansionCount > n11.maxTotalExpansions)) throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n11.maxTotalExpansions}`);
92600
+ t11 = t11.replace(i12.regex, i12.val);
92369
92601
  }
92370
92602
  return t11.replace(this.ampEntity.regex, this.ampEntity.val);
92371
- }, "Y");
92372
- function G3(t11, e11, n11, i11) {
92373
- return t11 && (void 0 === i11 && (i11 = 0 === e11.child.length), void 0 !== (t11 = this.parseTextData(t11, e11.tagname, n11, false, !!e11[":@"] && 0 !== Object.keys(e11[":@"]).length, i11)) && "" !== t11 && e11.add(this.options.textNodeName, t11), t11 = ""), t11;
92374
92603
  }
92375
- __name(G3, "G");
92376
- function X(t11, e11, n11, i11) {
92377
- return !(!e11 || !e11.has(i11)) || !(!t11 || !t11.has(n11));
92604
+ __name(K, "K");
92605
+ function Q(t11, e11, i11, n11) {
92606
+ return t11 && (void 0 === n11 && (n11 = 0 === e11.child.length), void 0 !== (t11 = this.parseTextData(t11, e11.tagname, i11, false, !!e11[":@"] && 0 !== Object.keys(e11[":@"]).length, n11)) && "" !== t11 && e11.add(this.options.textNodeName, t11), t11 = ""), t11;
92378
92607
  }
92379
- __name(X, "X");
92380
- function z4(t11, e11, n11, i11) {
92381
- const s11 = t11.indexOf(e11, n11);
92382
- if (-1 === s11) throw new Error(i11);
92608
+ __name(Q, "Q");
92609
+ function H3(t11, e11) {
92610
+ if (!t11 || 0 === t11.length) return false;
92611
+ for (let i11 = 0; i11 < t11.length; i11++) if (e11.matches(t11[i11])) return true;
92612
+ return false;
92613
+ }
92614
+ __name(H3, "H");
92615
+ function tt(t11, e11, i11, n11) {
92616
+ const s11 = t11.indexOf(e11, i11);
92617
+ if (-1 === s11) throw new Error(n11);
92383
92618
  return s11 + e11.length - 1;
92384
92619
  }
92385
- __name(z4, "z");
92386
- function W(t11, e11, n11, i11 = ">") {
92387
- const s11 = (function(t12, e12, n12 = ">") {
92388
- let i12, s12 = "";
92620
+ __name(tt, "tt");
92621
+ function et(t11, e11, i11, n11 = ">") {
92622
+ const s11 = (function(t12, e12, i12 = ">") {
92623
+ let n12, s12 = "";
92389
92624
  for (let r12 = e12; r12 < t12.length; r12++) {
92390
92625
  let e13 = t12[r12];
92391
- if (i12) e13 === i12 && (i12 = "");
92392
- else if ('"' === e13 || "'" === e13) i12 = e13;
92393
- else if (e13 === n12[0]) {
92394
- if (!n12[1]) return { data: s12, index: r12 };
92395
- if (t12[r12 + 1] === n12[1]) return { data: s12, index: r12 };
92626
+ if (n12) e13 === n12 && (n12 = "");
92627
+ else if ('"' === e13 || "'" === e13) n12 = e13;
92628
+ else if (e13 === i12[0]) {
92629
+ if (!i12[1]) return { data: s12, index: r12 };
92630
+ if (t12[r12 + 1] === i12[1]) return { data: s12, index: r12 };
92396
92631
  } else " " === e13 && (e13 = " ");
92397
92632
  s12 += e13;
92398
92633
  }
92399
- })(t11, e11 + 1, i11);
92634
+ })(t11, e11 + 1, n11);
92400
92635
  if (!s11) return;
92401
92636
  let r11 = s11.data;
92402
92637
  const o11 = s11.index, a11 = r11.search(/\s/);
92403
- let l11 = r11, u11 = true;
92404
- -1 !== a11 && (l11 = r11.substring(0, a11), r11 = r11.substring(a11 + 1).trimStart());
92405
- const d11 = l11;
92406
- if (n11) {
92407
- const t12 = l11.indexOf(":");
92408
- -1 !== t12 && (l11 = l11.substr(t12 + 1), u11 = l11 !== s11.data.substr(t12 + 1));
92638
+ let h11 = r11, l11 = true;
92639
+ -1 !== a11 && (h11 = r11.substring(0, a11), r11 = r11.substring(a11 + 1).trimStart());
92640
+ const p11 = h11;
92641
+ if (i11) {
92642
+ const t12 = h11.indexOf(":");
92643
+ -1 !== t12 && (h11 = h11.substr(t12 + 1), l11 = h11 !== s11.data.substr(t12 + 1));
92409
92644
  }
92410
- return { tagName: l11, tagExp: r11, closeIndex: o11, attrExpPresent: u11, rawTagName: d11 };
92645
+ return { tagName: h11, tagExp: r11, closeIndex: o11, attrExpPresent: l11, rawTagName: p11 };
92411
92646
  }
92412
- __name(W, "W");
92413
- function q10(t11, e11, n11) {
92414
- const i11 = n11;
92647
+ __name(et, "et");
92648
+ function it(t11, e11, i11) {
92649
+ const n11 = i11;
92415
92650
  let s11 = 1;
92416
- for (; n11 < t11.length; n11++) if ("<" === t11[n11]) if ("/" === t11[n11 + 1]) {
92417
- const r11 = z4(t11, ">", n11, `${e11} is not closed`);
92418
- if (t11.substring(n11 + 2, r11).trim() === e11 && (s11--, 0 === s11)) return { tagContent: t11.substring(i11, n11), i: r11 };
92419
- n11 = r11;
92420
- } else if ("?" === t11[n11 + 1]) n11 = z4(t11, "?>", n11 + 1, "StopNode is not closed.");
92421
- else if ("!--" === t11.substr(n11 + 1, 3)) n11 = z4(t11, "-->", n11 + 3, "StopNode is not closed.");
92422
- else if ("![" === t11.substr(n11 + 1, 2)) n11 = z4(t11, "]]>", n11, "StopNode is not closed.") - 2;
92651
+ for (; i11 < t11.length; i11++) if ("<" === t11[i11]) if ("/" === t11[i11 + 1]) {
92652
+ const r11 = tt(t11, ">", i11, `${e11} is not closed`);
92653
+ if (t11.substring(i11 + 2, r11).trim() === e11 && (s11--, 0 === s11)) return { tagContent: t11.substring(n11, i11), i: r11 };
92654
+ i11 = r11;
92655
+ } else if ("?" === t11[i11 + 1]) i11 = tt(t11, "?>", i11 + 1, "StopNode is not closed.");
92656
+ else if ("!--" === t11.substr(i11 + 1, 3)) i11 = tt(t11, "-->", i11 + 3, "StopNode is not closed.");
92657
+ else if ("![" === t11.substr(i11 + 1, 2)) i11 = tt(t11, "]]>", i11, "StopNode is not closed.") - 2;
92423
92658
  else {
92424
- const i12 = W(t11, n11, ">");
92425
- i12 && ((i12 && i12.tagName) === e11 && "/" !== i12.tagExp[i12.tagExp.length - 1] && s11++, n11 = i12.closeIndex);
92659
+ const n12 = et(t11, i11, ">");
92660
+ n12 && ((n12 && n12.tagName) === e11 && "/" !== n12.tagExp[n12.tagExp.length - 1] && s11++, i11 = n12.closeIndex);
92426
92661
  }
92427
92662
  }
92428
- __name(q10, "q");
92429
- function Z(t11, e11, n11) {
92663
+ __name(it, "it");
92664
+ function nt(t11, e11, i11) {
92430
92665
  if (e11 && "string" == typeof t11) {
92431
92666
  const e12 = t11.trim();
92432
92667
  return "true" === e12 || "false" !== e12 && (function(t12, e13 = {}) {
92433
- if (e13 = Object.assign({}, D3, e13), !t12 || "string" != typeof t12) return t12;
92434
- let n12 = t12.trim();
92435
- if (void 0 !== e13.skipLike && e13.skipLike.test(n12)) return t12;
92668
+ if (e13 = Object.assign({}, F3, e13), !t12 || "string" != typeof t12) return t12;
92669
+ let i12 = t12.trim();
92670
+ if (void 0 !== e13.skipLike && e13.skipLike.test(i12)) return t12;
92436
92671
  if ("0" === t12) return 0;
92437
- if (e13.hex && $.test(n12)) return (function(t13) {
92672
+ if (e13.hex && V.test(i12)) return (function(t13) {
92438
92673
  if (parseInt) return parseInt(t13, 16);
92439
92674
  if (Number.parseInt) return Number.parseInt(t13, 16);
92440
92675
  if (window && window.parseInt) return window.parseInt(t13, 16);
92441
92676
  throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
92442
- })(n12);
92443
- if (n12.includes("e") || n12.includes("E")) return (function(t13, e14, n13) {
92444
- if (!n13.eNotation) return t13;
92445
- const i12 = e14.match(j10);
92446
- if (i12) {
92447
- let s11 = i12[1] || "";
92448
- const r11 = -1 === i12[3].indexOf("e") ? "E" : "e", o11 = i12[2], a11 = s11 ? t13[o11.length + 1] === r11 : t13[o11.length] === r11;
92449
- return o11.length > 1 && a11 ? t13 : 1 !== o11.length || !i12[3].startsWith(`.${r11}`) && i12[3][0] !== r11 ? n13.leadingZeros && !a11 ? (e14 = (i12[1] || "") + i12[3], Number(e14)) : t13 : Number(e14);
92677
+ })(i12);
92678
+ if (i12.includes("e") || i12.includes("E")) return (function(t13, e14, i13) {
92679
+ if (!i13.eNotation) return t13;
92680
+ const n12 = e14.match(L);
92681
+ if (n12) {
92682
+ let s11 = n12[1] || "";
92683
+ const r11 = -1 === n12[3].indexOf("e") ? "E" : "e", o11 = n12[2], a11 = s11 ? t13[o11.length + 1] === r11 : t13[o11.length] === r11;
92684
+ return o11.length > 1 && a11 ? t13 : 1 !== o11.length || !n12[3].startsWith(`.${r11}`) && n12[3][0] !== r11 ? i13.leadingZeros && !a11 ? (e14 = (n12[1] || "") + n12[3], Number(e14)) : t13 : Number(e14);
92450
92685
  }
92451
92686
  return t13;
92452
- })(t12, n12, e13);
92687
+ })(t12, i12, e13);
92453
92688
  {
92454
- const s11 = V.exec(n12);
92689
+ const s11 = k10.exec(i12);
92455
92690
  if (s11) {
92456
92691
  const r11 = s11[1] || "", o11 = s11[2];
92457
- let a11 = (i11 = s11[3]) && -1 !== i11.indexOf(".") ? ("." === (i11 = i11.replace(/0+$/, "")) ? i11 = "0" : "." === i11[0] ? i11 = "0" + i11 : "." === i11[i11.length - 1] && (i11 = i11.substring(0, i11.length - 1)), i11) : i11;
92458
- const l11 = r11 ? "." === t12[o11.length + 1] : "." === t12[o11.length];
92459
- if (!e13.leadingZeros && (o11.length > 1 || 1 === o11.length && !l11)) return t12;
92692
+ let a11 = (n11 = s11[3]) && -1 !== n11.indexOf(".") ? ("." === (n11 = n11.replace(/0+$/, "")) ? n11 = "0" : "." === n11[0] ? n11 = "0" + n11 : "." === n11[n11.length - 1] && (n11 = n11.substring(0, n11.length - 1)), n11) : n11;
92693
+ const h11 = r11 ? "." === t12[o11.length + 1] : "." === t12[o11.length];
92694
+ if (!e13.leadingZeros && (o11.length > 1 || 1 === o11.length && !h11)) return t12;
92460
92695
  {
92461
- const i12 = Number(n12), s12 = String(i12);
92462
- if (0 === i12) return i12;
92463
- if (-1 !== s12.search(/[eE]/)) return e13.eNotation ? i12 : t12;
92464
- if (-1 !== n12.indexOf(".")) return "0" === s12 || s12 === a11 || s12 === `${r11}${a11}` ? i12 : t12;
92465
- let l12 = o11 ? a11 : n12;
92466
- return o11 ? l12 === s12 || r11 + l12 === s12 ? i12 : t12 : l12 === s12 || l12 === r11 + s12 ? i12 : t12;
92696
+ const n12 = Number(i12), s12 = String(n12);
92697
+ if (0 === n12) return n12;
92698
+ if (-1 !== s12.search(/[eE]/)) return e13.eNotation ? n12 : t12;
92699
+ if (-1 !== i12.indexOf(".")) return "0" === s12 || s12 === a11 || s12 === `${r11}${a11}` ? n12 : t12;
92700
+ let h12 = o11 ? a11 : i12;
92701
+ return o11 ? h12 === s12 || r11 + h12 === s12 ? n12 : t12 : h12 === s12 || h12 === r11 + s12 ? n12 : t12;
92467
92702
  }
92468
92703
  }
92469
92704
  return t12;
92470
92705
  }
92471
- var i11;
92472
- })(t11, n11);
92706
+ var n11;
92707
+ })(t11, i11);
92473
92708
  }
92474
92709
  return void 0 !== t11 ? t11 : "";
92475
92710
  }
92476
- __name(Z, "Z");
92477
- function K(t11, e11, n11) {
92478
- const i11 = Number.parseInt(t11, e11);
92479
- return i11 >= 0 && i11 <= 1114111 ? String.fromCodePoint(i11) : n11 + t11 + ";";
92711
+ __name(nt, "nt");
92712
+ function st(t11, e11, i11) {
92713
+ const n11 = Number.parseInt(t11, e11);
92714
+ return n11 >= 0 && n11 <= 1114111 ? String.fromCodePoint(n11) : i11 + t11 + ";";
92480
92715
  }
92481
- __name(K, "K");
92482
- const Q = I3.getMetaDataSymbol();
92483
- function J3(t11, e11) {
92484
- return H3(t11, e11);
92716
+ __name(st, "st");
92717
+ function rt(t11, e11, i11, n11) {
92718
+ if (t11) {
92719
+ const n12 = t11(e11);
92720
+ i11 === e11 && (i11 = n12), e11 = n12;
92721
+ }
92722
+ return { tagName: e11 = ot(e11, n11), tagExp: i11 };
92485
92723
  }
92486
- __name(J3, "J");
92487
- function H3(t11, e11, n11) {
92488
- let i11;
92724
+ __name(rt, "rt");
92725
+ function ot(t11, e11) {
92726
+ if (a10.includes(t11)) throw new Error(`[SECURITY] Invalid name: "${t11}" is a reserved JavaScript keyword that could cause prototype pollution`);
92727
+ return o10.includes(t11) ? e11.onDangerousProperty(t11) : t11;
92728
+ }
92729
+ __name(ot, "ot");
92730
+ const at = $.getMetaDataSymbol();
92731
+ function ht(t11, e11) {
92732
+ if (!t11 || "object" != typeof t11) return {};
92733
+ if (!e11) return t11;
92734
+ const i11 = {};
92735
+ for (const n11 in t11) n11.startsWith(e11) ? i11[n11.substring(e11.length)] = t11[n11] : i11[n11] = t11[n11];
92736
+ return i11;
92737
+ }
92738
+ __name(ht, "ht");
92739
+ function lt(t11, e11, i11) {
92740
+ return pt(t11, e11, i11);
92741
+ }
92742
+ __name(lt, "lt");
92743
+ function pt(t11, e11, i11) {
92744
+ let n11;
92489
92745
  const s11 = {};
92490
92746
  for (let r11 = 0; r11 < t11.length; r11++) {
92491
- const o11 = t11[r11], a11 = tt(o11);
92492
- let l11 = "";
92493
- if (l11 = void 0 === n11 ? a11 : n11 + "." + a11, a11 === e11.textNodeName) void 0 === i11 ? i11 = o11[a11] : i11 += "" + o11[a11];
92747
+ const o11 = t11[r11], a11 = ut(o11);
92748
+ if (void 0 !== a11 && a11 !== e11.textNodeName) {
92749
+ const t12 = ht(o11[":@"] || {}, e11.attributeNamePrefix);
92750
+ i11.push(a11, t12);
92751
+ }
92752
+ if (a11 === e11.textNodeName) void 0 === n11 ? n11 = o11[a11] : n11 += "" + o11[a11];
92494
92753
  else {
92495
92754
  if (void 0 === a11) continue;
92496
92755
  if (o11[a11]) {
92497
- let t12 = H3(o11[a11], e11, l11);
92498
- const n12 = nt(t12, e11);
92499
- o11[":@"] ? et(t12, o11[":@"], l11, e11) : 1 !== Object.keys(t12).length || void 0 === t12[e11.textNodeName] || e11.alwaysCreateTextNode ? 0 === Object.keys(t12).length && (e11.alwaysCreateTextNode ? t12[e11.textNodeName] = "" : t12 = "") : t12 = t12[e11.textNodeName], void 0 !== o11[Q] && "object" == typeof t12 && null !== t12 && (t12[Q] = o11[Q]), void 0 !== s11[a11] && Object.prototype.hasOwnProperty.call(s11, a11) ? (Array.isArray(s11[a11]) || (s11[a11] = [s11[a11]]), s11[a11].push(t12)) : e11.isArray(a11, l11, n12) ? s11[a11] = [t12] : s11[a11] = t12;
92756
+ let t12 = pt(o11[a11], e11, i11);
92757
+ const n12 = dt(t12, e11);
92758
+ if (o11[":@"] ? ct(t12, o11[":@"], i11, e11) : 1 !== Object.keys(t12).length || void 0 === t12[e11.textNodeName] || e11.alwaysCreateTextNode ? 0 === Object.keys(t12).length && (e11.alwaysCreateTextNode ? t12[e11.textNodeName] = "" : t12 = "") : t12 = t12[e11.textNodeName], void 0 !== o11[at] && "object" == typeof t12 && null !== t12 && (t12[at] = o11[at]), void 0 !== s11[a11] && Object.prototype.hasOwnProperty.call(s11, a11)) Array.isArray(s11[a11]) || (s11[a11] = [s11[a11]]), s11[a11].push(t12);
92759
+ else {
92760
+ const r12 = e11.jPath ? i11.toString() : i11;
92761
+ e11.isArray(a11, r12, n12) ? s11[a11] = [t12] : s11[a11] = t12;
92762
+ }
92763
+ void 0 !== a11 && a11 !== e11.textNodeName && i11.pop();
92500
92764
  }
92501
92765
  }
92502
92766
  }
92503
- return "string" == typeof i11 ? i11.length > 0 && (s11[e11.textNodeName] = i11) : void 0 !== i11 && (s11[e11.textNodeName] = i11), s11;
92767
+ return "string" == typeof n11 ? n11.length > 0 && (s11[e11.textNodeName] = n11) : void 0 !== n11 && (s11[e11.textNodeName] = n11), s11;
92504
92768
  }
92505
- __name(H3, "H");
92506
- function tt(t11) {
92769
+ __name(pt, "pt");
92770
+ function ut(t11) {
92507
92771
  const e11 = Object.keys(t11);
92508
92772
  for (let t12 = 0; t12 < e11.length; t12++) {
92509
- const n11 = e11[t12];
92510
- if (":@" !== n11) return n11;
92773
+ const i11 = e11[t12];
92774
+ if (":@" !== i11) return i11;
92511
92775
  }
92512
92776
  }
92513
- __name(tt, "tt");
92514
- function et(t11, e11, n11, i11) {
92777
+ __name(ut, "ut");
92778
+ function ct(t11, e11, i11, n11) {
92515
92779
  if (e11) {
92516
92780
  const s11 = Object.keys(e11), r11 = s11.length;
92517
92781
  for (let o11 = 0; o11 < r11; o11++) {
92518
- const r12 = s11[o11];
92519
- i11.isArray(r12, n11 + "." + r12, true, true) ? t11[r12] = [e11[r12]] : t11[r12] = e11[r12];
92782
+ const r12 = s11[o11], a11 = r12.startsWith(n11.attributeNamePrefix) ? r12.substring(n11.attributeNamePrefix.length) : r12, h11 = n11.jPath ? i11.toString() + "." + a11 : i11;
92783
+ n11.isArray(r12, h11, true, true) ? t11[r12] = [e11[r12]] : t11[r12] = e11[r12];
92520
92784
  }
92521
92785
  }
92522
92786
  }
92523
- __name(et, "et");
92524
- function nt(t11, e11) {
92525
- const { textNodeName: n11 } = e11, i11 = Object.keys(t11).length;
92526
- return 0 === i11 || !(1 !== i11 || !t11[n11] && "boolean" != typeof t11[n11] && 0 !== t11[n11]);
92787
+ __name(ct, "ct");
92788
+ function dt(t11, e11) {
92789
+ const { textNodeName: i11 } = e11, n11 = Object.keys(t11).length;
92790
+ return 0 === n11 || !(1 !== n11 || !t11[i11] && "boolean" != typeof t11[i11] && 0 !== t11[i11]);
92527
92791
  }
92528
- __name(nt, "nt");
92529
- class it {
92792
+ __name(dt, "dt");
92793
+ class ft {
92530
92794
  static {
92531
- __name(this, "it");
92795
+ __name(this, "ft");
92532
92796
  }
92533
92797
  constructor(t11) {
92534
- this.externalEntities = {}, this.options = v11(t11);
92798
+ this.externalEntities = {}, this.options = C3(t11);
92535
92799
  }
92536
92800
  parse(t11, e11) {
92537
92801
  if ("string" != typeof t11 && t11.toString) t11 = t11.toString();
92538
92802
  else if ("string" != typeof t11) throw new Error("XML data is accepted in String or Bytes[] form.");
92539
92803
  if (e11) {
92540
92804
  true === e11 && (e11 = {});
92541
- const n12 = a10(t11, e11);
92542
- if (true !== n12) throw Error(`${n12.err.msg}:${n12.err.line}:${n12.err.col}`);
92805
+ const i12 = l10(t11, e11);
92806
+ if (true !== i12) throw Error(`${i12.err.msg}:${i12.err.line}:${i12.err.col}`);
92543
92807
  }
92544
- const n11 = new L(this.options);
92545
- n11.addExternalEntities(this.externalEntities);
92546
- const i11 = n11.parseXml(t11);
92547
- return this.options.preserveOrder || void 0 === i11 ? i11 : J3(i11, this.options);
92808
+ const i11 = new B3(this.options);
92809
+ i11.addExternalEntities(this.externalEntities);
92810
+ const n11 = i11.parseXml(t11);
92811
+ return this.options.preserveOrder || void 0 === n11 ? n11 : lt(n11, this.options, i11.matcher);
92548
92812
  }
92549
92813
  addEntity(t11, e11) {
92550
92814
  if (-1 !== e11.indexOf("&")) throw new Error("Entity value can't have '&'");
@@ -92553,182 +92817,318 @@ var require_fxp = __commonJS({
92553
92817
  this.externalEntities[t11] = e11;
92554
92818
  }
92555
92819
  static getMetaDataSymbol() {
92556
- return I3.getMetaDataSymbol();
92820
+ return $.getMetaDataSymbol();
92557
92821
  }
92558
92822
  }
92559
- function st(t11, e11) {
92560
- let n11 = "";
92561
- return e11.format && e11.indentBy.length > 0 && (n11 = "\n"), rt(t11, e11, "", n11);
92823
+ function gt(t11, e11) {
92824
+ let i11 = "";
92825
+ e11.format && e11.indentBy.length > 0 && (i11 = "\n");
92826
+ const n11 = [];
92827
+ if (e11.stopNodes && Array.isArray(e11.stopNodes)) for (let t12 = 0; t12 < e11.stopNodes.length; t12++) {
92828
+ const i12 = e11.stopNodes[t12];
92829
+ "string" == typeof i12 ? n11.push(new G3(i12)) : i12 instanceof G3 && n11.push(i12);
92830
+ }
92831
+ return mt(t11, e11, i11, new M(), n11);
92562
92832
  }
92563
- __name(st, "st");
92564
- function rt(t11, e11, n11, i11) {
92565
- let s11 = "", r11 = false;
92833
+ __name(gt, "gt");
92834
+ function mt(t11, e11, i11, n11, s11) {
92835
+ let r11 = "", o11 = false;
92836
+ if (e11.maxNestedTags && n11.getDepth() > e11.maxNestedTags) throw new Error("Maximum nested tags exceeded");
92566
92837
  if (!Array.isArray(t11)) {
92567
92838
  if (null != t11) {
92568
- let n12 = t11.toString();
92569
- return n12 = ut(n12, e11), n12;
92839
+ let i12 = t11.toString();
92840
+ return i12 = vt(i12, e11), i12;
92570
92841
  }
92571
92842
  return "";
92572
92843
  }
92573
- for (let o11 = 0; o11 < t11.length; o11++) {
92574
- const a11 = t11[o11], l11 = ot(a11);
92844
+ for (let a11 = 0; a11 < t11.length; a11++) {
92845
+ const h11 = t11[a11], l11 = Et(h11);
92575
92846
  if (void 0 === l11) continue;
92576
- let u11 = "";
92577
- if (u11 = 0 === n11.length ? l11 : `${n11}.${l11}`, l11 === e11.textNodeName) {
92578
- let t12 = a11[l11];
92579
- lt(u11, e11) || (t12 = e11.tagValueProcessor(l11, t12), t12 = ut(t12, e11)), r11 && (s11 += i11), s11 += t12, r11 = false;
92847
+ const p11 = xt(h11[":@"], e11);
92848
+ n11.push(l11, p11);
92849
+ const u11 = wt(n11, s11);
92850
+ if (l11 === e11.textNodeName) {
92851
+ let t12 = h11[l11];
92852
+ u11 || (t12 = e11.tagValueProcessor(l11, t12), t12 = vt(t12, e11)), o11 && (r11 += i11), r11 += t12, o11 = false, n11.pop();
92580
92853
  continue;
92581
92854
  }
92582
92855
  if (l11 === e11.cdataPropName) {
92583
- r11 && (s11 += i11), s11 += `<![CDATA[${a11[l11][0][e11.textNodeName]}]]>`, r11 = false;
92856
+ o11 && (r11 += i11), r11 += `<![CDATA[${h11[l11][0][e11.textNodeName]}]]>`, o11 = false, n11.pop();
92584
92857
  continue;
92585
92858
  }
92586
92859
  if (l11 === e11.commentPropName) {
92587
- s11 += i11 + `<!--${a11[l11][0][e11.textNodeName]}-->`, r11 = true;
92860
+ r11 += i11 + `<!--${h11[l11][0][e11.textNodeName]}-->`, o11 = true, n11.pop();
92588
92861
  continue;
92589
92862
  }
92590
92863
  if ("?" === l11[0]) {
92591
- const t12 = at(a11[":@"], e11), n12 = "?xml" === l11 ? "" : i11;
92592
- let o12 = a11[l11][0][e11.textNodeName];
92593
- o12 = 0 !== o12.length ? " " + o12 : "", s11 += n12 + `<${l11}${o12}${t12}?>`, r11 = true;
92864
+ const t12 = yt(h11[":@"], e11, u11), s12 = "?xml" === l11 ? "" : i11;
92865
+ let a12 = h11[l11][0][e11.textNodeName];
92866
+ a12 = 0 !== a12.length ? " " + a12 : "", r11 += s12 + `<${l11}${a12}${t12}?>`, o11 = true, n11.pop();
92594
92867
  continue;
92595
92868
  }
92596
- let d11 = i11;
92597
- "" !== d11 && (d11 += e11.indentBy);
92598
- const h11 = i11 + `<${l11}${at(a11[":@"], e11)}`, p11 = rt(a11[l11], e11, u11, d11);
92599
- -1 !== e11.unpairedTags.indexOf(l11) ? e11.suppressUnpairedNode ? s11 += h11 + ">" : s11 += h11 + "/>" : p11 && 0 !== p11.length || !e11.suppressEmptyNode ? p11 && p11.endsWith(">") ? s11 += h11 + `>${p11}${i11}</${l11}>` : (s11 += h11 + ">", p11 && "" !== i11 && (p11.includes("/>") || p11.includes("</")) ? s11 += i11 + e11.indentBy + p11 + i11 : s11 += p11, s11 += `</${l11}>`) : s11 += h11 + "/>", r11 = true;
92869
+ let c11 = i11;
92870
+ "" !== c11 && (c11 += e11.indentBy);
92871
+ const d11 = i11 + `<${l11}${yt(h11[":@"], e11, u11)}`;
92872
+ let f11;
92873
+ f11 = u11 ? Nt(h11[l11], e11) : mt(h11[l11], e11, c11, n11, s11), -1 !== e11.unpairedTags.indexOf(l11) ? e11.suppressUnpairedNode ? r11 += d11 + ">" : r11 += d11 + "/>" : f11 && 0 !== f11.length || !e11.suppressEmptyNode ? f11 && f11.endsWith(">") ? r11 += d11 + `>${f11}${i11}</${l11}>` : (r11 += d11 + ">", f11 && "" !== i11 && (f11.includes("/>") || f11.includes("</")) ? r11 += i11 + e11.indentBy + f11 + i11 : r11 += f11, r11 += `</${l11}>`) : r11 += d11 + "/>", o11 = true, n11.pop();
92874
+ }
92875
+ return r11;
92876
+ }
92877
+ __name(mt, "mt");
92878
+ function xt(t11, e11) {
92879
+ if (!t11 || e11.ignoreAttributes) return null;
92880
+ const i11 = {};
92881
+ let n11 = false;
92882
+ for (let s11 in t11) Object.prototype.hasOwnProperty.call(t11, s11) && (i11[s11.startsWith(e11.attributeNamePrefix) ? s11.substr(e11.attributeNamePrefix.length) : s11] = t11[s11], n11 = true);
92883
+ return n11 ? i11 : null;
92884
+ }
92885
+ __name(xt, "xt");
92886
+ function Nt(t11, e11) {
92887
+ if (!Array.isArray(t11)) return null != t11 ? t11.toString() : "";
92888
+ let i11 = "";
92889
+ for (let n11 = 0; n11 < t11.length; n11++) {
92890
+ const s11 = t11[n11], r11 = Et(s11);
92891
+ if (r11 === e11.textNodeName) i11 += s11[r11];
92892
+ else if (r11 === e11.cdataPropName) i11 += s11[r11][0][e11.textNodeName];
92893
+ else if (r11 === e11.commentPropName) i11 += s11[r11][0][e11.textNodeName];
92894
+ else {
92895
+ if (r11 && "?" === r11[0]) continue;
92896
+ if (r11) {
92897
+ const t12 = bt(s11[":@"], e11), n12 = Nt(s11[r11], e11);
92898
+ n12 && 0 !== n12.length ? i11 += `<${r11}${t12}>${n12}</${r11}>` : i11 += `<${r11}${t12}/>`;
92899
+ }
92900
+ }
92600
92901
  }
92601
- return s11;
92902
+ return i11;
92602
92903
  }
92603
- __name(rt, "rt");
92604
- function ot(t11) {
92904
+ __name(Nt, "Nt");
92905
+ function bt(t11, e11) {
92906
+ let i11 = "";
92907
+ if (t11 && !e11.ignoreAttributes) for (let n11 in t11) {
92908
+ if (!Object.prototype.hasOwnProperty.call(t11, n11)) continue;
92909
+ let s11 = t11[n11];
92910
+ true === s11 && e11.suppressBooleanAttributes ? i11 += ` ${n11.substr(e11.attributeNamePrefix.length)}` : i11 += ` ${n11.substr(e11.attributeNamePrefix.length)}="${s11}"`;
92911
+ }
92912
+ return i11;
92913
+ }
92914
+ __name(bt, "bt");
92915
+ function Et(t11) {
92605
92916
  const e11 = Object.keys(t11);
92606
- for (let n11 = 0; n11 < e11.length; n11++) {
92607
- const i11 = e11[n11];
92608
- if (Object.prototype.hasOwnProperty.call(t11, i11) && ":@" !== i11) return i11;
92917
+ for (let i11 = 0; i11 < e11.length; i11++) {
92918
+ const n11 = e11[i11];
92919
+ if (Object.prototype.hasOwnProperty.call(t11, n11) && ":@" !== n11) return n11;
92609
92920
  }
92610
92921
  }
92611
- __name(ot, "ot");
92612
- function at(t11, e11) {
92922
+ __name(Et, "Et");
92923
+ function yt(t11, e11, i11) {
92613
92924
  let n11 = "";
92614
- if (t11 && !e11.ignoreAttributes) for (let i11 in t11) {
92615
- if (!Object.prototype.hasOwnProperty.call(t11, i11)) continue;
92616
- let s11 = e11.attributeValueProcessor(i11, t11[i11]);
92617
- s11 = ut(s11, e11), true === s11 && e11.suppressBooleanAttributes ? n11 += ` ${i11.substr(e11.attributeNamePrefix.length)}` : n11 += ` ${i11.substr(e11.attributeNamePrefix.length)}="${s11}"`;
92925
+ if (t11 && !e11.ignoreAttributes) for (let s11 in t11) {
92926
+ if (!Object.prototype.hasOwnProperty.call(t11, s11)) continue;
92927
+ let r11;
92928
+ i11 ? r11 = t11[s11] : (r11 = e11.attributeValueProcessor(s11, t11[s11]), r11 = vt(r11, e11)), true === r11 && e11.suppressBooleanAttributes ? n11 += ` ${s11.substr(e11.attributeNamePrefix.length)}` : n11 += ` ${s11.substr(e11.attributeNamePrefix.length)}="${r11}"`;
92618
92929
  }
92619
92930
  return n11;
92620
92931
  }
92621
- __name(at, "at");
92622
- function lt(t11, e11) {
92623
- let n11 = (t11 = t11.substr(0, t11.length - e11.textNodeName.length - 1)).substr(t11.lastIndexOf(".") + 1);
92624
- for (let i11 in e11.stopNodes) if (e11.stopNodes[i11] === t11 || e11.stopNodes[i11] === "*." + n11) return true;
92932
+ __name(yt, "yt");
92933
+ function wt(t11, e11) {
92934
+ if (!e11 || 0 === e11.length) return false;
92935
+ for (let i11 = 0; i11 < e11.length; i11++) if (t11.matches(e11[i11])) return true;
92625
92936
  return false;
92626
92937
  }
92627
- __name(lt, "lt");
92628
- function ut(t11, e11) {
92629
- if (t11 && t11.length > 0 && e11.processEntities) for (let n11 = 0; n11 < e11.entities.length; n11++) {
92630
- const i11 = e11.entities[n11];
92631
- t11 = t11.replace(i11.regex, i11.val);
92938
+ __name(wt, "wt");
92939
+ function vt(t11, e11) {
92940
+ if (t11 && t11.length > 0 && e11.processEntities) for (let i11 = 0; i11 < e11.entities.length; i11++) {
92941
+ const n11 = e11.entities[i11];
92942
+ t11 = t11.replace(n11.regex, n11.val);
92632
92943
  }
92633
92944
  return t11;
92634
92945
  }
92635
- __name(ut, "ut");
92636
- const dt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: /* @__PURE__ */ __name(function(t11, e11) {
92946
+ __name(vt, "vt");
92947
+ const Tt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: /* @__PURE__ */ __name(function(t11, e11) {
92637
92948
  return e11;
92638
92949
  }, "tagValueProcessor"), attributeValueProcessor: /* @__PURE__ */ __name(function(t11, e11) {
92639
92950
  return e11;
92640
- }, "attributeValueProcessor"), preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false };
92641
- function ht(t11) {
92951
+ }, "attributeValueProcessor"), preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false, maxNestedTags: 100, jPath: true };
92952
+ function Pt(t11) {
92953
+ if (this.options = Object.assign({}, Tt, t11), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((t12) => "string" == typeof t12 && t12.startsWith("*.") ? ".." + t12.substring(2) : t12)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let t12 = 0; t12 < this.options.stopNodes.length; t12++) {
92954
+ const e12 = this.options.stopNodes[t12];
92955
+ "string" == typeof e12 ? this.stopNodeExpressions.push(new G3(e12)) : e12 instanceof G3 && this.stopNodeExpressions.push(e12);
92956
+ }
92642
92957
  var e11;
92643
- this.options = Object.assign({}, dt, t11), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
92958
+ true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
92644
92959
  return false;
92645
92960
  } : (this.ignoreAttributesFn = "function" == typeof (e11 = this.options.ignoreAttributes) ? e11 : Array.isArray(e11) ? (t12) => {
92646
- for (const n11 of e11) {
92647
- if ("string" == typeof n11 && t12 === n11) return true;
92648
- if (n11 instanceof RegExp && n11.test(t12)) return true;
92961
+ for (const i11 of e11) {
92962
+ if ("string" == typeof i11 && t12 === i11) return true;
92963
+ if (i11 instanceof RegExp && i11.test(t12)) return true;
92649
92964
  }
92650
- } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ft), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ct, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
92965
+ } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Ct), this.processTextOrObjNode = St, this.options.format ? (this.indentate = At, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
92651
92966
  return "";
92652
92967
  }, this.tagEndChar = ">", this.newLine = "");
92653
92968
  }
92654
- __name(ht, "ht");
92655
- function pt(t11, e11, n11, i11) {
92656
- const s11 = this.j2x(t11, n11 + 1, i11.concat(e11));
92657
- return void 0 !== t11[this.options.textNodeName] && 1 === Object.keys(t11).length ? this.buildTextValNode(t11[this.options.textNodeName], e11, s11.attrStr, n11) : this.buildObjectNode(s11.val, e11, s11.attrStr, n11);
92969
+ __name(Pt, "Pt");
92970
+ function St(t11, e11, i11, n11) {
92971
+ const s11 = this.extractAttributes(t11);
92972
+ if (n11.push(e11, s11), this.checkStopNode(n11)) {
92973
+ const s12 = this.buildRawContent(t11), r12 = this.buildAttributesForStopNode(t11);
92974
+ return n11.pop(), this.buildObjectNode(s12, e11, r12, i11);
92975
+ }
92976
+ const r11 = this.j2x(t11, i11 + 1, n11);
92977
+ return n11.pop(), void 0 !== t11[this.options.textNodeName] && 1 === Object.keys(t11).length ? this.buildTextValNode(t11[this.options.textNodeName], e11, r11.attrStr, i11, n11) : this.buildObjectNode(r11.val, e11, r11.attrStr, i11);
92658
92978
  }
92659
- __name(pt, "pt");
92660
- function ct(t11) {
92979
+ __name(St, "St");
92980
+ function At(t11) {
92661
92981
  return this.options.indentBy.repeat(t11);
92662
92982
  }
92663
- __name(ct, "ct");
92664
- function ft(t11) {
92983
+ __name(At, "At");
92984
+ function Ct(t11) {
92665
92985
  return !(!t11.startsWith(this.options.attributeNamePrefix) || t11 === this.options.textNodeName) && t11.substr(this.attrPrefixLen);
92666
92986
  }
92667
- __name(ft, "ft");
92668
- ht.prototype.build = function(t11) {
92669
- return this.options.preserveOrder ? st(t11, this.options) : (Array.isArray(t11) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t11 = { [this.options.arrayNodeName]: t11 }), this.j2x(t11, 0, []).val);
92670
- }, ht.prototype.j2x = function(t11, e11, n11) {
92671
- let i11 = "", s11 = "";
92672
- const r11 = n11.join(".");
92673
- for (let o11 in t11) if (Object.prototype.hasOwnProperty.call(t11, o11)) if (void 0 === t11[o11]) this.isAttribute(o11) && (s11 += "");
92674
- else if (null === t11[o11]) this.isAttribute(o11) || o11 === this.options.cdataPropName ? s11 += "" : "?" === o11[0] ? s11 += this.indentate(e11) + "<" + o11 + "?" + this.tagEndChar : s11 += this.indentate(e11) + "<" + o11 + "/" + this.tagEndChar;
92675
- else if (t11[o11] instanceof Date) s11 += this.buildTextValNode(t11[o11], o11, "", e11);
92676
- else if ("object" != typeof t11[o11]) {
92677
- const n12 = this.isAttribute(o11);
92678
- if (n12 && !this.ignoreAttributesFn(n12, r11)) i11 += this.buildAttrPairStr(n12, "" + t11[o11]);
92679
- else if (!n12) if (o11 === this.options.textNodeName) {
92680
- let e12 = this.options.tagValueProcessor(o11, "" + t11[o11]);
92987
+ __name(Ct, "Ct");
92988
+ Pt.prototype.build = function(t11) {
92989
+ if (this.options.preserveOrder) return gt(t11, this.options);
92990
+ {
92991
+ Array.isArray(t11) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t11 = { [this.options.arrayNodeName]: t11 });
92992
+ const e11 = new M();
92993
+ return this.j2x(t11, 0, e11).val;
92994
+ }
92995
+ }, Pt.prototype.j2x = function(t11, e11, i11) {
92996
+ let n11 = "", s11 = "";
92997
+ if (this.options.maxNestedTags && i11.getDepth() >= this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
92998
+ const r11 = this.options.jPath ? i11.toString() : i11, o11 = this.checkStopNode(i11);
92999
+ for (let a11 in t11) if (Object.prototype.hasOwnProperty.call(t11, a11)) if (void 0 === t11[a11]) this.isAttribute(a11) && (s11 += "");
93000
+ else if (null === t11[a11]) this.isAttribute(a11) || a11 === this.options.cdataPropName ? s11 += "" : "?" === a11[0] ? s11 += this.indentate(e11) + "<" + a11 + "?" + this.tagEndChar : s11 += this.indentate(e11) + "<" + a11 + "/" + this.tagEndChar;
93001
+ else if (t11[a11] instanceof Date) s11 += this.buildTextValNode(t11[a11], a11, "", e11, i11);
93002
+ else if ("object" != typeof t11[a11]) {
93003
+ const h11 = this.isAttribute(a11);
93004
+ if (h11 && !this.ignoreAttributesFn(h11, r11)) n11 += this.buildAttrPairStr(h11, "" + t11[a11], o11);
93005
+ else if (!h11) if (a11 === this.options.textNodeName) {
93006
+ let e12 = this.options.tagValueProcessor(a11, "" + t11[a11]);
92681
93007
  s11 += this.replaceEntitiesValue(e12);
92682
- } else s11 += this.buildTextValNode(t11[o11], o11, "", e11);
92683
- } else if (Array.isArray(t11[o11])) {
92684
- const i12 = t11[o11].length;
92685
- let r12 = "", a11 = "";
92686
- for (let l11 = 0; l11 < i12; l11++) {
92687
- const i13 = t11[o11][l11];
92688
- if (void 0 === i13) ;
92689
- else if (null === i13) "?" === o11[0] ? s11 += this.indentate(e11) + "<" + o11 + "?" + this.tagEndChar : s11 += this.indentate(e11) + "<" + o11 + "/" + this.tagEndChar;
92690
- else if ("object" == typeof i13) if (this.options.oneListGroup) {
92691
- const t12 = this.j2x(i13, e11 + 1, n11.concat(o11));
92692
- r12 += t12.val, this.options.attributesGroupName && i13.hasOwnProperty(this.options.attributesGroupName) && (a11 += t12.attrStr);
92693
- } else r12 += this.processTextOrObjNode(i13, o11, e11, n11);
93008
+ } else {
93009
+ i11.push(a11);
93010
+ const n12 = this.checkStopNode(i11);
93011
+ if (i11.pop(), n12) {
93012
+ const i12 = "" + t11[a11];
93013
+ s11 += "" === i12 ? this.indentate(e11) + "<" + a11 + this.closeTag(a11) + this.tagEndChar : this.indentate(e11) + "<" + a11 + ">" + i12 + "</" + a11 + this.tagEndChar;
93014
+ } else s11 += this.buildTextValNode(t11[a11], a11, "", e11, i11);
93015
+ }
93016
+ } else if (Array.isArray(t11[a11])) {
93017
+ const n12 = t11[a11].length;
93018
+ let r12 = "", o12 = "";
93019
+ for (let h11 = 0; h11 < n12; h11++) {
93020
+ const n13 = t11[a11][h11];
93021
+ if (void 0 === n13) ;
93022
+ else if (null === n13) "?" === a11[0] ? s11 += this.indentate(e11) + "<" + a11 + "?" + this.tagEndChar : s11 += this.indentate(e11) + "<" + a11 + "/" + this.tagEndChar;
93023
+ else if ("object" == typeof n13) if (this.options.oneListGroup) {
93024
+ i11.push(a11);
93025
+ const t12 = this.j2x(n13, e11 + 1, i11);
93026
+ i11.pop(), r12 += t12.val, this.options.attributesGroupName && n13.hasOwnProperty(this.options.attributesGroupName) && (o12 += t12.attrStr);
93027
+ } else r12 += this.processTextOrObjNode(n13, a11, e11, i11);
92694
93028
  else if (this.options.oneListGroup) {
92695
- let t12 = this.options.tagValueProcessor(o11, i13);
93029
+ let t12 = this.options.tagValueProcessor(a11, n13);
92696
93030
  t12 = this.replaceEntitiesValue(t12), r12 += t12;
92697
- } else r12 += this.buildTextValNode(i13, o11, "", e11);
92698
- }
92699
- this.options.oneListGroup && (r12 = this.buildObjectNode(r12, o11, a11, e11)), s11 += r12;
92700
- } else if (this.options.attributesGroupName && o11 === this.options.attributesGroupName) {
92701
- const e12 = Object.keys(t11[o11]), n12 = e12.length;
92702
- for (let s12 = 0; s12 < n12; s12++) i11 += this.buildAttrPairStr(e12[s12], "" + t11[o11][e12[s12]]);
92703
- } else s11 += this.processTextOrObjNode(t11[o11], o11, e11, n11);
92704
- return { attrStr: i11, val: s11 };
92705
- }, ht.prototype.buildAttrPairStr = function(t11, e11) {
92706
- return e11 = this.options.attributeValueProcessor(t11, "" + e11), e11 = this.replaceEntitiesValue(e11), this.options.suppressBooleanAttributes && "true" === e11 ? " " + t11 : " " + t11 + '="' + e11 + '"';
92707
- }, ht.prototype.buildObjectNode = function(t11, e11, n11, i11) {
92708
- if ("" === t11) return "?" === e11[0] ? this.indentate(i11) + "<" + e11 + n11 + "?" + this.tagEndChar : this.indentate(i11) + "<" + e11 + n11 + this.closeTag(e11) + this.tagEndChar;
93031
+ } else {
93032
+ i11.push(a11);
93033
+ const t12 = this.checkStopNode(i11);
93034
+ if (i11.pop(), t12) {
93035
+ const t13 = "" + n13;
93036
+ r12 += "" === t13 ? this.indentate(e11) + "<" + a11 + this.closeTag(a11) + this.tagEndChar : this.indentate(e11) + "<" + a11 + ">" + t13 + "</" + a11 + this.tagEndChar;
93037
+ } else r12 += this.buildTextValNode(n13, a11, "", e11, i11);
93038
+ }
93039
+ }
93040
+ this.options.oneListGroup && (r12 = this.buildObjectNode(r12, a11, o12, e11)), s11 += r12;
93041
+ } else if (this.options.attributesGroupName && a11 === this.options.attributesGroupName) {
93042
+ const e12 = Object.keys(t11[a11]), i12 = e12.length;
93043
+ for (let s12 = 0; s12 < i12; s12++) n11 += this.buildAttrPairStr(e12[s12], "" + t11[a11][e12[s12]], o11);
93044
+ } else s11 += this.processTextOrObjNode(t11[a11], a11, e11, i11);
93045
+ return { attrStr: n11, val: s11 };
93046
+ }, Pt.prototype.buildAttrPairStr = function(t11, e11, i11) {
93047
+ return i11 || (e11 = this.options.attributeValueProcessor(t11, "" + e11), e11 = this.replaceEntitiesValue(e11)), this.options.suppressBooleanAttributes && "true" === e11 ? " " + t11 : " " + t11 + '="' + e11 + '"';
93048
+ }, Pt.prototype.extractAttributes = function(t11) {
93049
+ if (!t11 || "object" != typeof t11) return null;
93050
+ const e11 = {};
93051
+ let i11 = false;
93052
+ if (this.options.attributesGroupName && t11[this.options.attributesGroupName]) {
93053
+ const n11 = t11[this.options.attributesGroupName];
93054
+ for (let t12 in n11) Object.prototype.hasOwnProperty.call(n11, t12) && (e11[t12.startsWith(this.options.attributeNamePrefix) ? t12.substring(this.options.attributeNamePrefix.length) : t12] = n11[t12], i11 = true);
93055
+ } else for (let n11 in t11) {
93056
+ if (!Object.prototype.hasOwnProperty.call(t11, n11)) continue;
93057
+ const s11 = this.isAttribute(n11);
93058
+ s11 && (e11[s11] = t11[n11], i11 = true);
93059
+ }
93060
+ return i11 ? e11 : null;
93061
+ }, Pt.prototype.buildRawContent = function(t11) {
93062
+ if ("string" == typeof t11) return t11;
93063
+ if ("object" != typeof t11 || null === t11) return String(t11);
93064
+ if (void 0 !== t11[this.options.textNodeName]) return t11[this.options.textNodeName];
93065
+ let e11 = "";
93066
+ for (let i11 in t11) {
93067
+ if (!Object.prototype.hasOwnProperty.call(t11, i11)) continue;
93068
+ if (this.isAttribute(i11)) continue;
93069
+ if (this.options.attributesGroupName && i11 === this.options.attributesGroupName) continue;
93070
+ const n11 = t11[i11];
93071
+ if (i11 === this.options.textNodeName) e11 += n11;
93072
+ else if (Array.isArray(n11)) {
93073
+ for (let t12 of n11) if ("string" == typeof t12 || "number" == typeof t12) e11 += `<${i11}>${t12}</${i11}>`;
93074
+ else if ("object" == typeof t12 && null !== t12) {
93075
+ const n12 = this.buildRawContent(t12), s11 = this.buildAttributesForStopNode(t12);
93076
+ e11 += "" === n12 ? `<${i11}${s11}/>` : `<${i11}${s11}>${n12}</${i11}>`;
93077
+ }
93078
+ } else if ("object" == typeof n11 && null !== n11) {
93079
+ const t12 = this.buildRawContent(n11), s11 = this.buildAttributesForStopNode(n11);
93080
+ e11 += "" === t12 ? `<${i11}${s11}/>` : `<${i11}${s11}>${t12}</${i11}>`;
93081
+ } else e11 += `<${i11}>${n11}</${i11}>`;
93082
+ }
93083
+ return e11;
93084
+ }, Pt.prototype.buildAttributesForStopNode = function(t11) {
93085
+ if (!t11 || "object" != typeof t11) return "";
93086
+ let e11 = "";
93087
+ if (this.options.attributesGroupName && t11[this.options.attributesGroupName]) {
93088
+ const i11 = t11[this.options.attributesGroupName];
93089
+ for (let t12 in i11) {
93090
+ if (!Object.prototype.hasOwnProperty.call(i11, t12)) continue;
93091
+ const n11 = t12.startsWith(this.options.attributeNamePrefix) ? t12.substring(this.options.attributeNamePrefix.length) : t12, s11 = i11[t12];
93092
+ true === s11 && this.options.suppressBooleanAttributes ? e11 += " " + n11 : e11 += " " + n11 + '="' + s11 + '"';
93093
+ }
93094
+ } else for (let i11 in t11) {
93095
+ if (!Object.prototype.hasOwnProperty.call(t11, i11)) continue;
93096
+ const n11 = this.isAttribute(i11);
93097
+ if (n11) {
93098
+ const s11 = t11[i11];
93099
+ true === s11 && this.options.suppressBooleanAttributes ? e11 += " " + n11 : e11 += " " + n11 + '="' + s11 + '"';
93100
+ }
93101
+ }
93102
+ return e11;
93103
+ }, Pt.prototype.buildObjectNode = function(t11, e11, i11, n11) {
93104
+ if ("" === t11) return "?" === e11[0] ? this.indentate(n11) + "<" + e11 + i11 + "?" + this.tagEndChar : this.indentate(n11) + "<" + e11 + i11 + this.closeTag(e11) + this.tagEndChar;
92709
93105
  {
92710
93106
  let s11 = "</" + e11 + this.tagEndChar, r11 = "";
92711
- return "?" === e11[0] && (r11 = "?", s11 = ""), !n11 && "" !== n11 || -1 !== t11.indexOf("<") ? false !== this.options.commentPropName && e11 === this.options.commentPropName && 0 === r11.length ? this.indentate(i11) + `<!--${t11}-->` + this.newLine : this.indentate(i11) + "<" + e11 + n11 + r11 + this.tagEndChar + t11 + this.indentate(i11) + s11 : this.indentate(i11) + "<" + e11 + n11 + r11 + ">" + t11 + s11;
93107
+ return "?" === e11[0] && (r11 = "?", s11 = ""), !i11 && "" !== i11 || -1 !== t11.indexOf("<") ? false !== this.options.commentPropName && e11 === this.options.commentPropName && 0 === r11.length ? this.indentate(n11) + `<!--${t11}-->` + this.newLine : this.indentate(n11) + "<" + e11 + i11 + r11 + this.tagEndChar + t11 + this.indentate(n11) + s11 : this.indentate(n11) + "<" + e11 + i11 + r11 + ">" + t11 + s11;
92712
93108
  }
92713
- }, ht.prototype.closeTag = function(t11) {
93109
+ }, Pt.prototype.closeTag = function(t11) {
92714
93110
  let e11 = "";
92715
93111
  return -1 !== this.options.unpairedTags.indexOf(t11) ? this.options.suppressUnpairedNode || (e11 = "/") : e11 = this.options.suppressEmptyNode ? "/" : `></${t11}`, e11;
92716
- }, ht.prototype.buildTextValNode = function(t11, e11, n11, i11) {
92717
- if (false !== this.options.cdataPropName && e11 === this.options.cdataPropName) return this.indentate(i11) + `<![CDATA[${t11}]]>` + this.newLine;
92718
- if (false !== this.options.commentPropName && e11 === this.options.commentPropName) return this.indentate(i11) + `<!--${t11}-->` + this.newLine;
92719
- if ("?" === e11[0]) return this.indentate(i11) + "<" + e11 + n11 + "?" + this.tagEndChar;
93112
+ }, Pt.prototype.checkStopNode = function(t11) {
93113
+ if (!this.stopNodeExpressions || 0 === this.stopNodeExpressions.length) return false;
93114
+ for (let e11 = 0; e11 < this.stopNodeExpressions.length; e11++) if (t11.matches(this.stopNodeExpressions[e11])) return true;
93115
+ return false;
93116
+ }, Pt.prototype.buildTextValNode = function(t11, e11, i11, n11, s11) {
93117
+ if (false !== this.options.cdataPropName && e11 === this.options.cdataPropName) return this.indentate(n11) + `<![CDATA[${t11}]]>` + this.newLine;
93118
+ if (false !== this.options.commentPropName && e11 === this.options.commentPropName) return this.indentate(n11) + `<!--${t11}-->` + this.newLine;
93119
+ if ("?" === e11[0]) return this.indentate(n11) + "<" + e11 + i11 + "?" + this.tagEndChar;
92720
93120
  {
92721
- let s11 = this.options.tagValueProcessor(e11, t11);
92722
- return s11 = this.replaceEntitiesValue(s11), "" === s11 ? this.indentate(i11) + "<" + e11 + n11 + this.closeTag(e11) + this.tagEndChar : this.indentate(i11) + "<" + e11 + n11 + ">" + s11 + "</" + e11 + this.tagEndChar;
93121
+ let s12 = this.options.tagValueProcessor(e11, t11);
93122
+ return s12 = this.replaceEntitiesValue(s12), "" === s12 ? this.indentate(n11) + "<" + e11 + i11 + this.closeTag(e11) + this.tagEndChar : this.indentate(n11) + "<" + e11 + i11 + ">" + s12 + "</" + e11 + this.tagEndChar;
92723
93123
  }
92724
- }, ht.prototype.replaceEntitiesValue = function(t11) {
93124
+ }, Pt.prototype.replaceEntitiesValue = function(t11) {
92725
93125
  if (t11 && t11.length > 0 && this.options.processEntities) for (let e11 = 0; e11 < this.options.entities.length; e11++) {
92726
- const n11 = this.options.entities[e11];
92727
- t11 = t11.replace(n11.regex, n11.val);
93126
+ const i11 = this.options.entities[e11];
93127
+ t11 = t11.replace(i11.regex, i11.val);
92728
93128
  }
92729
93129
  return t11;
92730
93130
  };
92731
- const gt = ht, xt = { validate: a10 };
93131
+ const Ot = Pt, $t = { validate: l10 };
92732
93132
  module2.exports = e10;
92733
93133
  })();
92734
93134
  }
@@ -92743,13 +93143,17 @@ var require_xml_parser = __commonJS({
92743
93143
  var fast_xml_parser_1 = require_fxp();
92744
93144
  var parser = new fast_xml_parser_1.XMLParser({
92745
93145
  attributeNamePrefix: "",
93146
+ processEntities: {
93147
+ enabled: true,
93148
+ maxTotalExpansions: Infinity
93149
+ },
92746
93150
  htmlEntities: true,
92747
93151
  ignoreAttributes: false,
92748
93152
  ignoreDeclaration: true,
92749
93153
  parseTagValue: false,
92750
93154
  trimValues: false,
92751
93155
  tagValueProcessor: /* @__PURE__ */ __name((_2, val) => val.trim() === "" && val.includes("\n") ? "" : void 0, "tagValueProcessor"),
92752
- maxNestedTags: 1024
93156
+ maxNestedTags: Infinity
92753
93157
  });
92754
93158
  parser.addEntity("#xD", "\r");
92755
93159
  parser.addEntity("#10", "\n");
@@ -92765,12 +93169,31 @@ var require_dist_cjs27 = __commonJS({
92765
93169
  "../../../node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports2) {
92766
93170
  "use strict";
92767
93171
  var xmlParser = require_xml_parser();
93172
+ var ATTR_ESCAPE_RE = /[&<>"]/g;
93173
+ var ATTR_ESCAPE_MAP = {
93174
+ "&": "&amp;",
93175
+ "<": "&lt;",
93176
+ ">": "&gt;",
93177
+ '"': "&quot;"
93178
+ };
92768
93179
  function escapeAttribute(value) {
92769
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
93180
+ return value.replace(ATTR_ESCAPE_RE, (ch) => ATTR_ESCAPE_MAP[ch]);
92770
93181
  }
92771
93182
  __name(escapeAttribute, "escapeAttribute");
93183
+ var ELEMENT_ESCAPE_RE = /[&"'<>\r\n\u0085\u2028]/g;
93184
+ var ELEMENT_ESCAPE_MAP = {
93185
+ "&": "&amp;",
93186
+ '"': "&quot;",
93187
+ "'": "&apos;",
93188
+ "<": "&lt;",
93189
+ ">": "&gt;",
93190
+ "\r": "&#x0D;",
93191
+ "\n": "&#x0A;",
93192
+ "\x85": "&#x85;",
93193
+ "\u2028": "&#x2028;"
93194
+ };
92772
93195
  function escapeElement(value) {
92773
- return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r/g, "&#x0D;").replace(/\n/g, "&#x0A;").replace(/\u0085/g, "&#x85;").replace(/\u2028/, "&#x2028;");
93196
+ return value.replace(ELEMENT_ESCAPE_RE, (ch) => ELEMENT_ESCAPE_MAP[ch]);
92774
93197
  }
92775
93198
  __name(escapeElement, "escapeElement");
92776
93199
  var XmlText2 = class {
@@ -313686,6 +314109,9 @@ async function tryHotswapDeployment(sdkProvider, ioHelper, assetParams, cloudFor
313686
314109
  hotswapPropertyOverrides
313687
314110
  );
313688
314111
  await hotswapSpan.end(result2);
314112
+ if (result2.error) {
314113
+ throw result2.error;
314114
+ }
313689
314115
  if (result2?.hotswapped === true) {
313690
314116
  return {
313691
314117
  type: "did-deploy-stack",
@@ -313737,13 +314163,19 @@ async function hotswapDeployment(sdkProvider, ioSpan, assetParams, stack, hotswa
313737
314163
  };
313738
314164
  }
313739
314165
  }
313740
- await applyAllHotswapOperations(sdk, ioSpan, hotswappable);
314166
+ let error4;
314167
+ try {
314168
+ await applyAllHotswapOperations(sdk, ioSpan, hotswappable);
314169
+ } catch (e10) {
314170
+ error4 = e10;
314171
+ }
313741
314172
  return {
313742
314173
  stack,
313743
314174
  mode: hotswapMode,
313744
- hotswapped: true,
314175
+ hotswapped: !error4,
313745
314176
  hotswappableChanges,
313746
- nonHotswappableChanges
314177
+ nonHotswappableChanges,
314178
+ error: error4
313747
314179
  };
313748
314180
  }
313749
314181
  async function classifyResourceChanges(stackChanges, evaluateCfnTemplate, sdk, nestedStackNames, hotswapPropertyOverrides) {