@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.
- package/THIRD_PARTY_LICENSES +6 -6
- package/lib/workers/extract/index.js +977 -545
- package/package.json +5 -5
|
@@ -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.
|
|
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,
|
|
91809
|
-
for (var
|
|
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(() =>
|
|
91814
|
-
const
|
|
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
|
|
91817
|
-
let
|
|
91818
|
-
for (;
|
|
91816
|
+
const i11 = [];
|
|
91817
|
+
let n11 = e11.exec(t11);
|
|
91818
|
+
for (; n11; ) {
|
|
91819
91819
|
const s11 = [];
|
|
91820
|
-
s11.startIndex = e11.lastIndex -
|
|
91821
|
-
const r11 =
|
|
91822
|
-
for (let t12 = 0; t12 < r11; t12++) s11.push(
|
|
91823
|
-
|
|
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
|
|
91825
|
+
return i11;
|
|
91826
91826
|
}
|
|
91827
91827
|
__name(s10, "s");
|
|
91828
91828
|
const r10 = /* @__PURE__ */ __name(function(t11) {
|
|
91829
|
-
return !(null ==
|
|
91830
|
-
}, "r"), o10 = { allowBooleanAttributes: false, unpairedTags: [] };
|
|
91831
|
-
function
|
|
91832
|
-
e11 = Object.assign({},
|
|
91833
|
-
const
|
|
91834
|
-
let
|
|
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 (
|
|
91841
|
-
return
|
|
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 =
|
|
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--), !
|
|
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.",
|
|
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
|
|
91859
|
-
if (false ===
|
|
91860
|
-
let
|
|
91861
|
-
if (r11 =
|
|
91862
|
-
const
|
|
91863
|
-
|
|
91864
|
-
const s12 =
|
|
91865
|
-
if (true !== s12) return
|
|
91866
|
-
|
|
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 (!
|
|
91869
|
-
if (
|
|
91870
|
-
if (0 ===
|
|
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 =
|
|
91872
|
+
const e12 = i11.pop();
|
|
91873
91873
|
if (h11 !== e12.tagName) {
|
|
91874
|
-
let
|
|
91875
|
-
return
|
|
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 ==
|
|
91877
|
+
0 == i11.length && (s11 = true);
|
|
91878
91878
|
}
|
|
91879
91879
|
} else {
|
|
91880
|
-
const a12 =
|
|
91881
|
-
if (true !== a12) return
|
|
91882
|
-
if (true === s11) return
|
|
91883
|
-
-1 !== e11.unpairedTags.indexOf(h11) ||
|
|
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 =
|
|
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 =
|
|
91894
|
-
if (-1 == e12) return
|
|
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 && !
|
|
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
|
|
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(
|
|
91904
|
-
function
|
|
91903
|
+
__name(l10, "l");
|
|
91904
|
+
function p10(t11) {
|
|
91905
91905
|
return " " === t11 || " " === t11 || "\n" === t11 || "\r" === t11;
|
|
91906
91906
|
}
|
|
91907
|
-
__name(
|
|
91907
|
+
__name(p10, "p");
|
|
91908
91908
|
function u10(t11, e11) {
|
|
91909
|
-
const
|
|
91909
|
+
const i11 = e11;
|
|
91910
91910
|
for (; e11 < t11.length; e11++) if ("?" == t11[e11] || " " == t11[e11]) {
|
|
91911
|
-
const
|
|
91912
|
-
if (e11 > 5 && "xml" ===
|
|
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
|
|
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
|
|
91930
|
-
for (e11 += 8; e11 < t11.length; e11++) if ("<" === t11[e11])
|
|
91931
|
-
else if (">" === t11[e11] && (
|
|
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(
|
|
91941
|
-
const
|
|
91942
|
-
function
|
|
91943
|
-
let
|
|
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] ===
|
|
91946
|
-
else if (">" === t11[e11] && "" ===
|
|
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
|
-
|
|
91950
|
+
i11 += t11[e11];
|
|
91951
91951
|
}
|
|
91952
|
-
return "" ===
|
|
91952
|
+
return "" === n11 && { value: i11, index: e11, tagClosed: s11 };
|
|
91953
91953
|
}
|
|
91954
|
-
__name(
|
|
91955
|
-
const
|
|
91956
|
-
function
|
|
91957
|
-
const
|
|
91958
|
-
for (let t12 = 0; t12 <
|
|
91959
|
-
if (0 ===
|
|
91960
|
-
if (void 0 !==
|
|
91961
|
-
if (void 0 ===
|
|
91962
|
-
const s11 =
|
|
91963
|
-
if (!E3(s11)) return
|
|
91964
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
91965
|
-
|
|
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(
|
|
91970
|
-
function
|
|
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
|
|
91974
|
-
for ("x" === t12[e12] && (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(
|
|
91976
|
+
if (!t12[e12].match(i12)) break;
|
|
91977
91977
|
}
|
|
91978
91978
|
return -1;
|
|
91979
91979
|
})(t11, ++e11);
|
|
91980
|
-
let
|
|
91981
|
-
for (; e11 < t11.length; e11++,
|
|
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(
|
|
91988
|
-
function
|
|
91989
|
-
return { err: { code: t11, msg: e11, line:
|
|
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(
|
|
91991
|
+
__name(b10, "b");
|
|
91992
91992
|
function E3(t11) {
|
|
91993
91993
|
return r10(t11);
|
|
91994
91994
|
}
|
|
91995
91995
|
__name(E3, "E");
|
|
91996
|
-
function
|
|
91996
|
+
function y4(t11) {
|
|
91997
91997
|
return r10(t11);
|
|
91998
91998
|
}
|
|
91999
|
-
__name(
|
|
92000
|
-
function
|
|
92001
|
-
const
|
|
92002
|
-
return { line:
|
|
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(
|
|
92005
|
-
function
|
|
92004
|
+
__name(w10, "w");
|
|
92005
|
+
function v11(t11) {
|
|
92006
92006
|
return t11.startIndex + t11[1].length;
|
|
92007
92007
|
}
|
|
92008
|
-
__name(
|
|
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,
|
|
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
|
|
92017
|
-
|
|
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(
|
|
92020
|
-
|
|
92021
|
-
|
|
92022
|
-
|
|
92023
|
-
|
|
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
|
|
92034
|
+
class $ {
|
|
92027
92035
|
static {
|
|
92028
|
-
__name(this, "
|
|
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
|
|
92051
|
+
class I3 {
|
|
92044
92052
|
static {
|
|
92045
|
-
__name(this, "
|
|
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
|
|
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
|
|
92056
|
-
for (; e11 < t11.length; e11++) if ("<" !== t11[e11] ||
|
|
92057
|
-
if (
|
|
92058
|
-
} else "[" === 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 (
|
|
92061
|
-
let
|
|
92062
|
-
if (e11 += 7, [
|
|
92063
|
-
|
|
92064
|
-
|
|
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 (
|
|
92076
|
+
} else if (r11 && _2(t11, "!ELEMENT", e11)) {
|
|
92067
92077
|
e11 += 8;
|
|
92068
|
-
const { index:
|
|
92069
|
-
e11 =
|
|
92070
|
-
} else if (
|
|
92071
|
-
else if (
|
|
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:
|
|
92074
|
-
e11 =
|
|
92083
|
+
const { index: i12 } = this.readNotationExp(t11, e11 + 1, this.suppressValidationErr);
|
|
92084
|
+
e11 = i12;
|
|
92075
92085
|
} else {
|
|
92076
|
-
if (!
|
|
92077
|
-
|
|
92086
|
+
if (!_2(t11, "!--", e11)) throw new Error("Invalid DOCTYPE");
|
|
92087
|
+
o11 = true;
|
|
92078
92088
|
}
|
|
92079
|
-
|
|
92089
|
+
s11++, a11 = "";
|
|
92080
92090
|
}
|
|
92081
|
-
if (0 !==
|
|
92091
|
+
if (0 !== s11) throw new Error("Unclosed DOCTYPE");
|
|
92082
92092
|
}
|
|
92083
|
-
return { entities:
|
|
92093
|
+
return { entities: i11, i: e11 };
|
|
92084
92094
|
}
|
|
92085
92095
|
readEntityExp(t11, e11) {
|
|
92086
|
-
e11 =
|
|
92087
|
-
let
|
|
92088
|
-
for (; e11 < t11.length && !/\s/.test(t11[e11]) && '"' !== t11[e11] && "'" !== t11[e11]; )
|
|
92089
|
-
if (
|
|
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
|
|
92094
|
-
if ([e11,
|
|
92095
|
-
return [
|
|
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 =
|
|
92099
|
-
let
|
|
92100
|
-
for (; e11 < t11.length && !/\s/.test(t11[e11]); )
|
|
92101
|
-
!this.suppressValidationErr &&
|
|
92102
|
-
const
|
|
92103
|
-
if (!this.suppressValidationErr && "SYSTEM" !==
|
|
92104
|
-
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" ===
|
|
92107
|
-
else if ("SYSTEM" ===
|
|
92108
|
-
return { notationName:
|
|
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,
|
|
92111
|
-
let
|
|
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; )
|
|
92115
|
-
if (t11[e11] !== s11) throw new Error(`Unterminated ${
|
|
92116
|
-
return [++e11,
|
|
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 =
|
|
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
|
-
|
|
92125
|
-
|
|
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]; )
|
|
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:
|
|
92140
|
+
return { elementName: i11, contentModel: n11.trim(), index: e11 };
|
|
92131
92141
|
}
|
|
92132
92142
|
readAttlistExp(t11, e11) {
|
|
92133
|
-
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
|
-
|
|
92140
|
-
|
|
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 =
|
|
92153
|
+
if (s11 = "NOTATION", "(" !== t11[e11 = j10(t11, e11 += 8)]) throw new Error(`Expected '(', found "${t11[e11]}"`);
|
|
92144
92154
|
e11++;
|
|
92145
|
-
let
|
|
92155
|
+
let i12 = [];
|
|
92146
92156
|
for (; e11 < t11.length && ")" !== t11[e11]; ) {
|
|
92147
|
-
let
|
|
92148
|
-
for (; e11 < t11.length && "|" !== t11[e11] && ")" !== t11[e11]; )
|
|
92149
|
-
if (
|
|
92150
|
-
|
|
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 += " (" +
|
|
92163
|
+
e11++, s11 += " (" + i12.join("|") + ")";
|
|
92154
92164
|
} else {
|
|
92155
92165
|
for (; e11 < t11.length && !/\s/.test(t11[e11]); ) s11 += t11[e11], e11++;
|
|
92156
|
-
const
|
|
92157
|
-
if (!this.suppressValidationErr && !
|
|
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 =
|
|
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:
|
|
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
|
|
92174
|
+
const j10 = /* @__PURE__ */ __name((t11, e11) => {
|
|
92165
92175
|
for (; e11 < t11.length && /\s/.test(t11[e11]); ) e11++;
|
|
92166
92176
|
return e11;
|
|
92167
|
-
}, "
|
|
92168
|
-
function
|
|
92169
|
-
for (let
|
|
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(
|
|
92173
|
-
function
|
|
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(
|
|
92178
|
-
const
|
|
92179
|
-
const
|
|
92180
|
-
class
|
|
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, "
|
|
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) =>
|
|
92187
|
-
for (const
|
|
92188
|
-
if ("string" == typeof
|
|
92189
|
-
if (
|
|
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.
|
|
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
|
|
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
|
|
92417
|
+
function W(t11) {
|
|
92201
92418
|
const e11 = Object.keys(t11);
|
|
92202
|
-
for (let
|
|
92203
|
-
const
|
|
92204
|
-
this.lastEntities[
|
|
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(
|
|
92208
|
-
function
|
|
92209
|
-
if (void 0 !== t11 && (this.options.trimValues && !
|
|
92210
|
-
o11 || (t11 = this.replaceEntitiesValue(t11, e11,
|
|
92211
|
-
const
|
|
92212
|
-
return null ==
|
|
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(
|
|
92216
|
-
function
|
|
92432
|
+
__name(Y, "Y");
|
|
92433
|
+
function X(t11) {
|
|
92217
92434
|
if (this.options.removeNSPrefix) {
|
|
92218
|
-
const e11 = t11.split(":"),
|
|
92435
|
+
const e11 = t11.split(":"), i11 = "/" === t11.charAt(0) ? "/" : "";
|
|
92219
92436
|
if ("xmlns" === e11[0]) return "";
|
|
92220
|
-
2 === e11.length && (t11 =
|
|
92437
|
+
2 === e11.length && (t11 = i11 + e11[1]);
|
|
92221
92438
|
}
|
|
92222
92439
|
return t11;
|
|
92223
92440
|
}
|
|
92224
|
-
__name(
|
|
92225
|
-
const
|
|
92226
|
-
function
|
|
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
|
|
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(
|
|
92231
|
-
if (this.ignoreAttributesFn(s11,
|
|
92232
|
-
let
|
|
92233
|
-
if (s11.length) if (this.options.transformAttributeName && (
|
|
92234
|
-
this.options.trimValues && (
|
|
92235
|
-
const t13 = this.options.attributeValueProcessor(s11,
|
|
92236
|
-
o11[
|
|
92237
|
-
} else this.options.allowBooleanAttributes && (o11[
|
|
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(
|
|
92248
|
-
const
|
|
92472
|
+
__name(q10, "q");
|
|
92473
|
+
const Z = /* @__PURE__ */ __name(function(t11) {
|
|
92249
92474
|
t11 = t11.replace(/\r\n?/g, "\n");
|
|
92250
|
-
const e11 = new
|
|
92251
|
-
let
|
|
92252
|
-
this.entityExpansionCount = 0, this.currentExpandedLength = 0;
|
|
92253
|
-
const
|
|
92254
|
-
for (let
|
|
92255
|
-
const e12 =
|
|
92256
|
-
let
|
|
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 =
|
|
92259
|
-
-1 !== t12 && (
|
|
92260
|
-
}
|
|
92261
|
-
this.options.transformTagName
|
|
92262
|
-
const
|
|
92263
|
-
if (
|
|
92264
|
-
|
|
92265
|
-
|
|
92266
|
-
|
|
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 (
|
|
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
|
|
92272
|
-
t12.add(this.options.textNodeName, ""), e12.tagName !== e12.tagExp && e12.attrExpPresent && (t12[":@"] = this.buildAttributesMap(e12.tagExp,
|
|
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
|
-
|
|
92275
|
-
} else if ("!--" === t11.substr(
|
|
92276
|
-
const e12 =
|
|
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
|
|
92279
|
-
|
|
92280
|
-
}
|
|
92281
|
-
|
|
92282
|
-
} else if ("!D" === t11.substr(
|
|
92283
|
-
const e12 =
|
|
92284
|
-
this.docTypeEntities = e12.entities,
|
|
92285
|
-
} else if ("![" === t11.substr(
|
|
92286
|
-
const e12 =
|
|
92287
|
-
|
|
92288
|
-
let
|
|
92289
|
-
null ==
|
|
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
|
|
92292
|
-
|
|
92293
|
-
|
|
92294
|
-
|
|
92295
|
-
|
|
92296
|
-
|
|
92297
|
-
|
|
92298
|
-
|
|
92299
|
-
|
|
92300
|
-
|
|
92301
|
-
|
|
92302
|
-
|
|
92303
|
-
|
|
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 (
|
|
92306
|
-
else if (-1 !== this.options.unpairedTags.indexOf(
|
|
92534
|
+
if (c11) r11 = s12.closeIndex;
|
|
92535
|
+
else if (-1 !== this.options.unpairedTags.indexOf(o11)) r11 = s12.closeIndex;
|
|
92307
92536
|
else {
|
|
92308
|
-
const
|
|
92309
|
-
if (!
|
|
92310
|
-
|
|
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
|
|
92313
|
-
|
|
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 (
|
|
92316
|
-
|
|
92317
|
-
|
|
92318
|
-
|
|
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(
|
|
92324
|
-
const t12 = new
|
|
92325
|
-
|
|
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
|
|
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(
|
|
92557
|
+
this.tagsNodeStack.push(i11), f11 && (t12[":@"] = f11), this.addChild(i11, t12, this.matcher, m11), i11 = t12;
|
|
92332
92558
|
}
|
|
92333
92559
|
}
|
|
92334
|
-
|
|
92560
|
+
n11 = "", r11 = p11;
|
|
92335
92561
|
}
|
|
92336
92562
|
}
|
|
92337
|
-
else
|
|
92563
|
+
else n11 += t11[r11];
|
|
92338
92564
|
return e11.child;
|
|
92339
|
-
}, "
|
|
92340
|
-
function
|
|
92341
|
-
this.options.captureMetaData || (
|
|
92342
|
-
const s11 = this.options.updateTag(e11.tagname,
|
|
92343
|
-
false ===
|
|
92344
|
-
}
|
|
92345
|
-
__name(
|
|
92346
|
-
|
|
92347
|
-
|
|
92348
|
-
|
|
92349
|
-
if (
|
|
92350
|
-
|
|
92351
|
-
|
|
92352
|
-
|
|
92353
|
-
|
|
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,
|
|
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(
|
|
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
|
-
|
|
92361
|
-
|
|
92362
|
-
|
|
92363
|
-
t11 = t11.replace(
|
|
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 (
|
|
92367
|
-
const
|
|
92368
|
-
|
|
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(
|
|
92376
|
-
function
|
|
92377
|
-
return
|
|
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(
|
|
92380
|
-
function
|
|
92381
|
-
|
|
92382
|
-
|
|
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(
|
|
92386
|
-
function
|
|
92387
|
-
const s11 = (function(t12, e12,
|
|
92388
|
-
let
|
|
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 (
|
|
92392
|
-
else if ('"' === e13 || "'" === e13)
|
|
92393
|
-
else if (e13 ===
|
|
92394
|
-
if (!
|
|
92395
|
-
if (t12[r12 + 1] ===
|
|
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,
|
|
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
|
|
92404
|
-
-1 !== a11 && (
|
|
92405
|
-
const
|
|
92406
|
-
if (
|
|
92407
|
-
const t12 =
|
|
92408
|
-
-1 !== t12 && (
|
|
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:
|
|
92645
|
+
return { tagName: h11, tagExp: r11, closeIndex: o11, attrExpPresent: l11, rawTagName: p11 };
|
|
92411
92646
|
}
|
|
92412
|
-
__name(
|
|
92413
|
-
function
|
|
92414
|
-
const
|
|
92647
|
+
__name(et, "et");
|
|
92648
|
+
function it(t11, e11, i11) {
|
|
92649
|
+
const n11 = i11;
|
|
92415
92650
|
let s11 = 1;
|
|
92416
|
-
for (;
|
|
92417
|
-
const r11 =
|
|
92418
|
-
if (t11.substring(
|
|
92419
|
-
|
|
92420
|
-
} else if ("?" === t11[
|
|
92421
|
-
else if ("!--" === t11.substr(
|
|
92422
|
-
else if ("![" === t11.substr(
|
|
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
|
|
92425
|
-
|
|
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(
|
|
92429
|
-
function
|
|
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({},
|
|
92434
|
-
let
|
|
92435
|
-
if (void 0 !== e13.skipLike && e13.skipLike.test(
|
|
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 &&
|
|
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
|
-
})(
|
|
92443
|
-
if (
|
|
92444
|
-
if (!
|
|
92445
|
-
const
|
|
92446
|
-
if (
|
|
92447
|
-
let s11 =
|
|
92448
|
-
const r11 = -1 ===
|
|
92449
|
-
return o11.length > 1 && a11 ? t13 : 1 !== o11.length || !
|
|
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,
|
|
92687
|
+
})(t12, i12, e13);
|
|
92453
92688
|
{
|
|
92454
|
-
const s11 =
|
|
92689
|
+
const s11 = k10.exec(i12);
|
|
92455
92690
|
if (s11) {
|
|
92456
92691
|
const r11 = s11[1] || "", o11 = s11[2];
|
|
92457
|
-
let a11 = (
|
|
92458
|
-
const
|
|
92459
|
-
if (!e13.leadingZeros && (o11.length > 1 || 1 === o11.length && !
|
|
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
|
|
92462
|
-
if (0 ===
|
|
92463
|
-
if (-1 !== s12.search(/[eE]/)) return e13.eNotation ?
|
|
92464
|
-
if (-1 !==
|
|
92465
|
-
let
|
|
92466
|
-
return o11 ?
|
|
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
|
|
92472
|
-
})(t11,
|
|
92706
|
+
var n11;
|
|
92707
|
+
})(t11, i11);
|
|
92473
92708
|
}
|
|
92474
92709
|
return void 0 !== t11 ? t11 : "";
|
|
92475
92710
|
}
|
|
92476
|
-
__name(
|
|
92477
|
-
function
|
|
92478
|
-
const
|
|
92479
|
-
return
|
|
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(
|
|
92482
|
-
|
|
92483
|
-
|
|
92484
|
-
|
|
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(
|
|
92487
|
-
function
|
|
92488
|
-
|
|
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 =
|
|
92492
|
-
|
|
92493
|
-
|
|
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 =
|
|
92498
|
-
const n12 =
|
|
92499
|
-
o11[":@"] ?
|
|
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
|
|
92767
|
+
return "string" == typeof n11 ? n11.length > 0 && (s11[e11.textNodeName] = n11) : void 0 !== n11 && (s11[e11.textNodeName] = n11), s11;
|
|
92504
92768
|
}
|
|
92505
|
-
__name(
|
|
92506
|
-
function
|
|
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
|
|
92510
|
-
if (":@" !==
|
|
92773
|
+
const i11 = e11[t12];
|
|
92774
|
+
if (":@" !== i11) return i11;
|
|
92511
92775
|
}
|
|
92512
92776
|
}
|
|
92513
|
-
__name(
|
|
92514
|
-
function
|
|
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
|
-
|
|
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(
|
|
92524
|
-
function
|
|
92525
|
-
const { textNodeName:
|
|
92526
|
-
return 0 ===
|
|
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(
|
|
92529
|
-
class
|
|
92792
|
+
__name(dt, "dt");
|
|
92793
|
+
class ft {
|
|
92530
92794
|
static {
|
|
92531
|
-
__name(this, "
|
|
92795
|
+
__name(this, "ft");
|
|
92532
92796
|
}
|
|
92533
92797
|
constructor(t11) {
|
|
92534
|
-
this.externalEntities = {}, this.options =
|
|
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
|
|
92542
|
-
if (true !==
|
|
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
|
|
92545
|
-
|
|
92546
|
-
const
|
|
92547
|
-
return this.options.preserveOrder || void 0 ===
|
|
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
|
|
92820
|
+
return $.getMetaDataSymbol();
|
|
92557
92821
|
}
|
|
92558
92822
|
}
|
|
92559
|
-
function
|
|
92560
|
-
let
|
|
92561
|
-
|
|
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(
|
|
92564
|
-
function
|
|
92565
|
-
let
|
|
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
|
|
92569
|
-
return
|
|
92839
|
+
let i12 = t11.toString();
|
|
92840
|
+
return i12 = vt(i12, e11), i12;
|
|
92570
92841
|
}
|
|
92571
92842
|
return "";
|
|
92572
92843
|
}
|
|
92573
|
-
for (let
|
|
92574
|
-
const
|
|
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
|
-
|
|
92577
|
-
|
|
92578
|
-
|
|
92579
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
92592
|
-
let
|
|
92593
|
-
|
|
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
|
|
92597
|
-
"" !==
|
|
92598
|
-
const
|
|
92599
|
-
|
|
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
|
|
92902
|
+
return i11;
|
|
92602
92903
|
}
|
|
92603
|
-
__name(
|
|
92604
|
-
function
|
|
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
|
|
92607
|
-
const
|
|
92608
|
-
if (Object.prototype.hasOwnProperty.call(t11,
|
|
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(
|
|
92612
|
-
function
|
|
92922
|
+
__name(Et, "Et");
|
|
92923
|
+
function yt(t11, e11, i11) {
|
|
92613
92924
|
let n11 = "";
|
|
92614
|
-
if (t11 && !e11.ignoreAttributes) for (let
|
|
92615
|
-
if (!Object.prototype.hasOwnProperty.call(t11,
|
|
92616
|
-
let
|
|
92617
|
-
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(
|
|
92622
|
-
function
|
|
92623
|
-
|
|
92624
|
-
for (let i11
|
|
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(
|
|
92628
|
-
function
|
|
92629
|
-
if (t11 && t11.length > 0 && e11.processEntities) for (let
|
|
92630
|
-
const
|
|
92631
|
-
t11 = t11.replace(
|
|
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(
|
|
92636
|
-
const
|
|
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: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false };
|
|
92641
|
-
function
|
|
92951
|
+
}, "attributeValueProcessor"), preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], 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
|
-
|
|
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
|
|
92647
|
-
if ("string" == typeof
|
|
92648
|
-
if (
|
|
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 =
|
|
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(
|
|
92655
|
-
function
|
|
92656
|
-
const s11 = this.
|
|
92657
|
-
|
|
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(
|
|
92660
|
-
function
|
|
92979
|
+
__name(St, "St");
|
|
92980
|
+
function At(t11) {
|
|
92661
92981
|
return this.options.indentBy.repeat(t11);
|
|
92662
92982
|
}
|
|
92663
|
-
__name(
|
|
92664
|
-
function
|
|
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(
|
|
92668
|
-
|
|
92669
|
-
|
|
92670
|
-
|
|
92671
|
-
|
|
92672
|
-
|
|
92673
|
-
|
|
92674
|
-
|
|
92675
|
-
|
|
92676
|
-
|
|
92677
|
-
|
|
92678
|
-
|
|
92679
|
-
|
|
92680
|
-
|
|
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
|
|
92683
|
-
|
|
92684
|
-
|
|
92685
|
-
|
|
92686
|
-
|
|
92687
|
-
|
|
92688
|
-
|
|
92689
|
-
|
|
92690
|
-
|
|
92691
|
-
|
|
92692
|
-
|
|
92693
|
-
|
|
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(
|
|
93029
|
+
let t12 = this.options.tagValueProcessor(a11, n13);
|
|
92696
93030
|
t12 = this.replaceEntitiesValue(t12), r12 += t12;
|
|
92697
|
-
} else
|
|
92698
|
-
|
|
92699
|
-
|
|
92700
|
-
|
|
92701
|
-
|
|
92702
|
-
|
|
92703
|
-
|
|
92704
|
-
|
|
92705
|
-
|
|
92706
|
-
|
|
92707
|
-
|
|
92708
|
-
|
|
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 = ""), !
|
|
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
|
-
},
|
|
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
|
-
},
|
|
92717
|
-
if (
|
|
92718
|
-
|
|
92719
|
-
|
|
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
|
|
92722
|
-
return
|
|
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
|
-
},
|
|
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
|
|
92727
|
-
t11 = t11.replace(
|
|
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
|
|
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:
|
|
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
|
+
"&": "&",
|
|
93175
|
+
"<": "<",
|
|
93176
|
+
">": ">",
|
|
93177
|
+
'"': """
|
|
93178
|
+
};
|
|
92768
93179
|
function escapeAttribute(value) {
|
|
92769
|
-
return value.replace(
|
|
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
|
+
"&": "&",
|
|
93186
|
+
'"': """,
|
|
93187
|
+
"'": "'",
|
|
93188
|
+
"<": "<",
|
|
93189
|
+
">": ">",
|
|
93190
|
+
"\r": "
",
|
|
93191
|
+
"\n": "
",
|
|
93192
|
+
"\x85": "…",
|
|
93193
|
+
"\u2028": "
"
|
|
93194
|
+
};
|
|
92772
93195
|
function escapeElement(value) {
|
|
92773
|
-
return value.replace(
|
|
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
|
-
|
|
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:
|
|
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) {
|