@probelabs/probe 0.6.0-rc266 → 0.6.0-rc267

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.
@@ -12109,7 +12109,7 @@ var require_fxp = __commonJS({
12109
12109
  }, o: (t6, e6) => Object.prototype.hasOwnProperty.call(t6, e6), r: (t6) => {
12110
12110
  "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t6, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t6, "__esModule", { value: true });
12111
12111
  } }, e5 = {};
12112
- t5.r(e5), t5.d(e5, { XMLBuilder: () => dt, XMLParser: () => it, XMLValidator: () => gt });
12112
+ t5.r(e5), t5.d(e5, { XMLBuilder: () => gt, XMLParser: () => it, XMLValidator: () => xt });
12113
12113
  const n5 = ":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", i5 = new RegExp("^[" + n5 + "][" + n5 + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
12114
12114
  function s5(t6, e6) {
12115
12115
  const n6 = [];
@@ -12131,90 +12131,90 @@ var require_fxp = __commonJS({
12131
12131
  const n6 = [];
12132
12132
  let i6 = false, s6 = false;
12133
12133
  "\uFEFF" === t6[0] && (t6 = t6.substr(1));
12134
- for (let o6 = 0; o6 < t6.length; o6++) if ("<" === t6[o6] && "?" === t6[o6 + 1]) {
12135
- if (o6 += 2, o6 = u5(t6, o6), o6.err) return o6;
12134
+ for (let r6 = 0; r6 < t6.length; r6++) if ("<" === t6[r6] && "?" === t6[r6 + 1]) {
12135
+ if (r6 += 2, r6 = u5(t6, r6), r6.err) return r6;
12136
12136
  } else {
12137
- if ("<" !== t6[o6]) {
12138
- if (l5(t6[o6])) continue;
12139
- return m5("InvalidChar", "char '" + t6[o6] + "' is not expected.", b5(t6, o6));
12137
+ if ("<" !== t6[r6]) {
12138
+ if (l5(t6[r6])) continue;
12139
+ return m5("InvalidChar", "char '" + t6[r6] + "' is not expected.", N(t6, r6));
12140
12140
  }
12141
12141
  {
12142
- let a6 = o6;
12143
- if (o6++, "!" === t6[o6]) {
12144
- o6 = h5(t6, o6);
12142
+ let o6 = r6;
12143
+ if (r6++, "!" === t6[r6]) {
12144
+ r6 = d5(t6, r6);
12145
12145
  continue;
12146
12146
  }
12147
12147
  {
12148
- let d6 = false;
12149
- "/" === t6[o6] && (d6 = true, o6++);
12150
- let p6 = "";
12151
- for (; o6 < t6.length && ">" !== t6[o6] && " " !== t6[o6] && " " !== t6[o6] && "\n" !== t6[o6] && "\r" !== t6[o6]; o6++) p6 += t6[o6];
12152
- if (p6 = p6.trim(), "/" === p6[p6.length - 1] && (p6 = p6.substring(0, p6.length - 1), o6--), !r5(p6)) {
12148
+ let a6 = false;
12149
+ "/" === t6[r6] && (a6 = true, r6++);
12150
+ let h6 = "";
12151
+ for (; r6 < t6.length && ">" !== t6[r6] && " " !== t6[r6] && " " !== t6[r6] && "\n" !== t6[r6] && "\r" !== t6[r6]; r6++) h6 += t6[r6];
12152
+ if (h6 = h6.trim(), "/" === h6[h6.length - 1] && (h6 = h6.substring(0, h6.length - 1), r6--), !b5(h6)) {
12153
12153
  let e7;
12154
- return e7 = 0 === p6.trim().length ? "Invalid space after '<'." : "Tag '" + p6 + "' is an invalid name.", m5("InvalidTag", e7, b5(t6, o6));
12154
+ return e7 = 0 === h6.trim().length ? "Invalid space after '<'." : "Tag '" + h6 + "' is an invalid name.", m5("InvalidTag", e7, N(t6, r6));
12155
12155
  }
12156
- const c6 = f5(t6, o6);
12157
- if (false === c6) return m5("InvalidAttr", "Attributes for '" + p6 + "' have open quote.", b5(t6, o6));
12158
- let E3 = c6.value;
12159
- if (o6 = c6.index, "/" === E3[E3.length - 1]) {
12160
- const n7 = o6 - E3.length;
12161
- E3 = E3.substring(0, E3.length - 1);
12162
- const s7 = g5(E3, e6);
12163
- if (true !== s7) return m5(s7.err.code, s7.err.msg, b5(t6, n7 + s7.err.line));
12156
+ const p6 = c5(t6, r6);
12157
+ if (false === p6) return m5("InvalidAttr", "Attributes for '" + h6 + "' have open quote.", N(t6, r6));
12158
+ let f6 = p6.value;
12159
+ if (r6 = p6.index, "/" === f6[f6.length - 1]) {
12160
+ const n7 = r6 - f6.length;
12161
+ f6 = f6.substring(0, f6.length - 1);
12162
+ const s7 = g5(f6, e6);
12163
+ if (true !== s7) return m5(s7.err.code, s7.err.msg, N(t6, n7 + s7.err.line));
12164
12164
  i6 = true;
12165
- } else if (d6) {
12166
- if (!c6.tagClosed) return m5("InvalidTag", "Closing tag '" + p6 + "' doesn't have proper closing.", b5(t6, o6));
12167
- if (E3.trim().length > 0) return m5("InvalidTag", "Closing tag '" + p6 + "' can't have attributes or invalid starting.", b5(t6, a6));
12168
- if (0 === n6.length) return m5("InvalidTag", "Closing tag '" + p6 + "' has not been opened.", b5(t6, a6));
12165
+ } else if (a6) {
12166
+ if (!p6.tagClosed) return m5("InvalidTag", "Closing tag '" + h6 + "' doesn't have proper closing.", N(t6, r6));
12167
+ if (f6.trim().length > 0) return m5("InvalidTag", "Closing tag '" + h6 + "' can't have attributes or invalid starting.", N(t6, o6));
12168
+ if (0 === n6.length) return m5("InvalidTag", "Closing tag '" + h6 + "' has not been opened.", N(t6, o6));
12169
12169
  {
12170
12170
  const e7 = n6.pop();
12171
- if (p6 !== e7.tagName) {
12172
- let n7 = b5(t6, e7.tagStartPos);
12173
- return m5("InvalidTag", "Expected closing tag '" + e7.tagName + "' (opened in line " + n7.line + ", col " + n7.col + ") instead of closing tag '" + p6 + "'.", b5(t6, a6));
12171
+ if (h6 !== e7.tagName) {
12172
+ let n7 = N(t6, e7.tagStartPos);
12173
+ return m5("InvalidTag", "Expected closing tag '" + e7.tagName + "' (opened in line " + n7.line + ", col " + n7.col + ") instead of closing tag '" + h6 + "'.", N(t6, o6));
12174
12174
  }
12175
12175
  0 == n6.length && (s6 = true);
12176
12176
  }
12177
12177
  } else {
12178
- const r6 = g5(E3, e6);
12179
- if (true !== r6) return m5(r6.err.code, r6.err.msg, b5(t6, o6 - E3.length + r6.err.line));
12180
- if (true === s6) return m5("InvalidXml", "Multiple possible root nodes found.", b5(t6, o6));
12181
- -1 !== e6.unpairedTags.indexOf(p6) || n6.push({ tagName: p6, tagStartPos: a6 }), i6 = true;
12178
+ const a7 = g5(f6, e6);
12179
+ if (true !== a7) return m5(a7.err.code, a7.err.msg, N(t6, r6 - f6.length + a7.err.line));
12180
+ if (true === s6) return m5("InvalidXml", "Multiple possible root nodes found.", N(t6, r6));
12181
+ -1 !== e6.unpairedTags.indexOf(h6) || n6.push({ tagName: h6, tagStartPos: o6 }), i6 = true;
12182
12182
  }
12183
- for (o6++; o6 < t6.length; o6++) if ("<" === t6[o6]) {
12184
- if ("!" === t6[o6 + 1]) {
12185
- o6++, o6 = h5(t6, o6);
12183
+ for (r6++; r6 < t6.length; r6++) if ("<" === t6[r6]) {
12184
+ if ("!" === t6[r6 + 1]) {
12185
+ r6++, r6 = d5(t6, r6);
12186
12186
  continue;
12187
12187
  }
12188
- if ("?" !== t6[o6 + 1]) break;
12189
- if (o6 = u5(t6, ++o6), o6.err) return o6;
12190
- } else if ("&" === t6[o6]) {
12191
- const e7 = x5(t6, o6);
12192
- if (-1 == e7) return m5("InvalidChar", "char '&' is not expected.", b5(t6, o6));
12193
- o6 = e7;
12194
- } else if (true === s6 && !l5(t6[o6])) return m5("InvalidXml", "Extra text at the end", b5(t6, o6));
12195
- "<" === t6[o6] && o6--;
12188
+ if ("?" !== t6[r6 + 1]) break;
12189
+ if (r6 = u5(t6, ++r6), r6.err) return r6;
12190
+ } else if ("&" === t6[r6]) {
12191
+ const e7 = x5(t6, r6);
12192
+ if (-1 == e7) return m5("InvalidChar", "char '&' is not expected.", N(t6, r6));
12193
+ r6 = e7;
12194
+ } else if (true === s6 && !l5(t6[r6])) return m5("InvalidXml", "Extra text at the end", N(t6, r6));
12195
+ "<" === t6[r6] && r6--;
12196
12196
  }
12197
12197
  }
12198
12198
  }
12199
- return i6 ? 1 == n6.length ? m5("InvalidTag", "Unclosed tag '" + n6[0].tagName + "'.", b5(t6, n6[0].tagStartPos)) : !(n6.length > 0) || m5("InvalidXml", "Invalid '" + JSON.stringify(n6.map(((t7) => t7.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m5("InvalidXml", "Start tag expected.", 1);
12199
+ return i6 ? 1 == n6.length ? m5("InvalidTag", "Unclosed tag '" + n6[0].tagName + "'.", N(t6, n6[0].tagStartPos)) : !(n6.length > 0) || m5("InvalidXml", "Invalid '" + JSON.stringify(n6.map((t7) => t7.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m5("InvalidXml", "Start tag expected.", 1);
12200
12200
  }
12201
12201
  function l5(t6) {
12202
12202
  return " " === t6 || " " === t6 || "\n" === t6 || "\r" === t6;
12203
12203
  }
12204
12204
  function u5(t6, e6) {
12205
12205
  const n6 = e6;
12206
- for (; e6 < t6.length; e6++) if ("?" != t6[e6] && " " != t6[e6]) ;
12207
- else {
12206
+ for (; e6 < t6.length; e6++) if ("?" == t6[e6] || " " == t6[e6]) {
12208
12207
  const i6 = t6.substr(n6, e6 - n6);
12209
- if (e6 > 5 && "xml" === i6) return m5("InvalidXml", "XML declaration allowed only at the start of the document.", b5(t6, e6));
12208
+ if (e6 > 5 && "xml" === i6) return m5("InvalidXml", "XML declaration allowed only at the start of the document.", N(t6, e6));
12210
12209
  if ("?" == t6[e6] && ">" == t6[e6 + 1]) {
12211
12210
  e6++;
12212
12211
  break;
12213
12212
  }
12213
+ continue;
12214
12214
  }
12215
12215
  return e6;
12216
12216
  }
12217
- function h5(t6, e6) {
12217
+ function d5(t6, e6) {
12218
12218
  if (t6.length > e6 + 5 && "-" === t6[e6 + 1] && "-" === t6[e6 + 2]) {
12219
12219
  for (e6 += 3; e6 < t6.length; e6++) if ("-" === t6[e6] && "-" === t6[e6 + 1] && ">" === t6[e6 + 2]) {
12220
12220
  e6 += 2;
@@ -12232,11 +12232,11 @@ var require_fxp = __commonJS({
12232
12232
  }
12233
12233
  return e6;
12234
12234
  }
12235
- const d5 = '"', p5 = "'";
12236
- function f5(t6, e6) {
12235
+ const h5 = '"', p5 = "'";
12236
+ function c5(t6, e6) {
12237
12237
  let n6 = "", i6 = "", s6 = false;
12238
12238
  for (; e6 < t6.length; e6++) {
12239
- if (t6[e6] === d5 || t6[e6] === p5) "" === i6 ? i6 = t6[e6] : i6 !== t6[e6] || (i6 = "");
12239
+ if (t6[e6] === h5 || t6[e6] === p5) "" === i6 ? i6 = t6[e6] : i6 !== t6[e6] || (i6 = "");
12240
12240
  else if (">" === t6[e6] && "" === i6) {
12241
12241
  s6 = true;
12242
12242
  break;
@@ -12245,16 +12245,16 @@ var require_fxp = __commonJS({
12245
12245
  }
12246
12246
  return "" === i6 && { value: n6, index: e6, tagClosed: s6 };
12247
12247
  }
12248
- const c5 = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
12248
+ const f5 = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
12249
12249
  function g5(t6, e6) {
12250
- const n6 = s5(t6, c5), i6 = {};
12250
+ const n6 = s5(t6, f5), i6 = {};
12251
12251
  for (let t7 = 0; t7 < n6.length; t7++) {
12252
- if (0 === n6[t7][1].length) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' has no space in starting.", N(n6[t7]));
12253
- if (void 0 !== n6[t7][3] && void 0 === n6[t7][4]) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' is without value.", N(n6[t7]));
12254
- if (void 0 === n6[t7][3] && !e6.allowBooleanAttributes) return m5("InvalidAttr", "boolean attribute '" + n6[t7][2] + "' is not allowed.", N(n6[t7]));
12252
+ if (0 === n6[t7][1].length) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' has no space in starting.", y2(n6[t7]));
12253
+ if (void 0 !== n6[t7][3] && void 0 === n6[t7][4]) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' is without value.", y2(n6[t7]));
12254
+ if (void 0 === n6[t7][3] && !e6.allowBooleanAttributes) return m5("InvalidAttr", "boolean attribute '" + n6[t7][2] + "' is not allowed.", y2(n6[t7]));
12255
12255
  const s6 = n6[t7][2];
12256
- if (!E2(s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is an invalid name.", N(n6[t7]));
12257
- if (i6.hasOwnProperty(s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is repeated.", N(n6[t7]));
12256
+ if (!E2(s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is an invalid name.", y2(n6[t7]));
12257
+ if (Object.prototype.hasOwnProperty.call(i6, s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is repeated.", y2(n6[t7]));
12258
12258
  i6[s6] = 1;
12259
12259
  }
12260
12260
  return true;
@@ -12282,49 +12282,52 @@ var require_fxp = __commonJS({
12282
12282
  function E2(t6) {
12283
12283
  return r5(t6);
12284
12284
  }
12285
- function b5(t6, e6) {
12285
+ function b5(t6) {
12286
+ return r5(t6);
12287
+ }
12288
+ function N(t6, e6) {
12286
12289
  const n6 = t6.substring(0, e6).split(/\r?\n/);
12287
12290
  return { line: n6.length, col: n6[n6.length - 1].length + 1 };
12288
12291
  }
12289
- function N(t6) {
12292
+ function y2(t6) {
12290
12293
  return t6.startIndex + t6[1].length;
12291
12294
  }
12292
- const y2 = { 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: function(t6, e6) {
12295
+ 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: function(t6, e6) {
12293
12296
  return e6;
12294
12297
  }, attributeValueProcessor: function(t6, e6) {
12295
12298
  return e6;
12296
12299
  }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t6, e6, n6) {
12297
12300
  return t6;
12298
- }, captureMetaData: false };
12299
- function T(t6) {
12300
- return "boolean" == typeof t6 ? { enabled: t6, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t6 && null !== t6 ? { enabled: false !== t6.enabled, maxEntitySize: t6.maxEntitySize ?? 1e4, maxExpansionDepth: t6.maxExpansionDepth ?? 10, maxTotalExpansions: t6.maxTotalExpansions ?? 1e3, maxExpandedLength: t6.maxExpandedLength ?? 1e5, allowedTags: t6.allowedTags ?? null, tagFilter: t6.tagFilter ?? null } : T(true);
12301
+ }, captureMetaData: false, maxNestedTags: 100, strictReservedNames: true };
12302
+ function w5(t6) {
12303
+ return "boolean" == typeof t6 ? { enabled: t6, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t6 && null !== t6 ? { enabled: false !== t6.enabled, maxEntitySize: t6.maxEntitySize ?? 1e4, maxExpansionDepth: t6.maxExpansionDepth ?? 10, maxTotalExpansions: t6.maxTotalExpansions ?? 1e3, maxExpandedLength: t6.maxExpandedLength ?? 1e5, allowedTags: t6.allowedTags ?? null, tagFilter: t6.tagFilter ?? null } : w5(true);
12301
12304
  }
12302
- const w5 = function(t6) {
12303
- const e6 = Object.assign({}, y2, t6);
12304
- return e6.processEntities = T(e6.processEntities), e6;
12305
+ const v5 = function(t6) {
12306
+ const e6 = Object.assign({}, T, t6);
12307
+ return e6.processEntities = w5(e6.processEntities), e6;
12305
12308
  };
12306
- let v5;
12307
- v5 = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata");
12309
+ let O;
12310
+ O = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata");
12308
12311
  class I2 {
12309
12312
  constructor(t6) {
12310
- this.tagname = t6, this.child = [], this[":@"] = {};
12313
+ this.tagname = t6, this.child = [], this[":@"] = /* @__PURE__ */ Object.create(null);
12311
12314
  }
12312
12315
  add(t6, e6) {
12313
12316
  "__proto__" === t6 && (t6 = "#__proto__"), this.child.push({ [t6]: e6 });
12314
12317
  }
12315
12318
  addChild(t6, e6) {
12316
- "__proto__" === t6.tagname && (t6.tagname = "#__proto__"), t6[":@"] && Object.keys(t6[":@"]).length > 0 ? this.child.push({ [t6.tagname]: t6.child, ":@": t6[":@"] }) : this.child.push({ [t6.tagname]: t6.child }), void 0 !== e6 && (this.child[this.child.length - 1][v5] = { startIndex: e6 });
12319
+ "__proto__" === t6.tagname && (t6.tagname = "#__proto__"), t6[":@"] && Object.keys(t6[":@"]).length > 0 ? this.child.push({ [t6.tagname]: t6.child, ":@": t6[":@"] }) : this.child.push({ [t6.tagname]: t6.child }), void 0 !== e6 && (this.child[this.child.length - 1][O] = { startIndex: e6 });
12317
12320
  }
12318
12321
  static getMetaDataSymbol() {
12319
- return v5;
12322
+ return O;
12320
12323
  }
12321
12324
  }
12322
- class O {
12325
+ class P {
12323
12326
  constructor(t6) {
12324
12327
  this.suppressValidationErr = !t6, this.options = t6;
12325
12328
  }
12326
12329
  readDocType(t6, e6) {
12327
- const n6 = {};
12330
+ const n6 = /* @__PURE__ */ Object.create(null);
12328
12331
  if ("O" !== t6[e6 + 3] || "C" !== t6[e6 + 4] || "T" !== t6[e6 + 5] || "Y" !== t6[e6 + 6] || "P" !== t6[e6 + 7] || "E" !== t6[e6 + 8]) throw new Error("Invalid Tag instead of DOCTYPE");
12329
12332
  {
12330
12333
  e6 += 9;
@@ -12333,23 +12336,23 @@ var require_fxp = __commonJS({
12333
12336
  if (r6 ? "-" === t6[e6 - 1] && "-" === t6[e6 - 2] && (r6 = false, i6--) : i6--, 0 === i6) break;
12334
12337
  } else "[" === t6[e6] ? s6 = true : o6 += t6[e6];
12335
12338
  else {
12336
- if (s6 && A2(t6, "!ENTITY", e6)) {
12339
+ if (s6 && S(t6, "!ENTITY", e6)) {
12337
12340
  let i7, s7;
12338
12341
  if (e6 += 7, [i7, s7, e6] = this.readEntityExp(t6, e6 + 1, this.suppressValidationErr), -1 === s7.indexOf("&")) {
12339
12342
  const t7 = i7.replace(/[.\-+*:]/g, "\\.");
12340
12343
  n6[i7] = { regx: RegExp(`&${t7};`, "g"), val: s7 };
12341
12344
  }
12342
- } else if (s6 && A2(t6, "!ELEMENT", e6)) {
12345
+ } else if (s6 && S(t6, "!ELEMENT", e6)) {
12343
12346
  e6 += 8;
12344
12347
  const { index: n7 } = this.readElementExp(t6, e6 + 1);
12345
12348
  e6 = n7;
12346
- } else if (s6 && A2(t6, "!ATTLIST", e6)) e6 += 8;
12347
- else if (s6 && A2(t6, "!NOTATION", e6)) {
12349
+ } else if (s6 && S(t6, "!ATTLIST", e6)) e6 += 8;
12350
+ else if (s6 && S(t6, "!NOTATION", e6)) {
12348
12351
  e6 += 9;
12349
12352
  const { index: n7 } = this.readNotationExp(t6, e6 + 1, this.suppressValidationErr);
12350
12353
  e6 = n7;
12351
12354
  } else {
12352
- if (!A2(t6, "!--", e6)) throw new Error("Invalid DOCTYPE");
12355
+ if (!S(t6, "!--", e6)) throw new Error("Invalid DOCTYPE");
12353
12356
  r6 = true;
12354
12357
  }
12355
12358
  i6++, o6 = "";
@@ -12359,10 +12362,10 @@ var require_fxp = __commonJS({
12359
12362
  return { entities: n6, i: e6 };
12360
12363
  }
12361
12364
  readEntityExp(t6, e6) {
12362
- e6 = P(t6, e6);
12365
+ e6 = A2(t6, e6);
12363
12366
  let n6 = "";
12364
12367
  for (; e6 < t6.length && !/\s/.test(t6[e6]) && '"' !== t6[e6] && "'" !== t6[e6]; ) n6 += t6[e6], e6++;
12365
- if (S(n6), e6 = P(t6, e6), !this.suppressValidationErr) {
12368
+ if (C2(n6), e6 = A2(t6, e6), !this.suppressValidationErr) {
12366
12369
  if ("SYSTEM" === t6.substring(e6, e6 + 6).toUpperCase()) throw new Error("External entities are not supported");
12367
12370
  if ("%" === t6[e6]) throw new Error("Parameter entities are not supported");
12368
12371
  }
@@ -12371,15 +12374,15 @@ var require_fxp = __commonJS({
12371
12374
  return [n6, i6, --e6];
12372
12375
  }
12373
12376
  readNotationExp(t6, e6) {
12374
- e6 = P(t6, e6);
12377
+ e6 = A2(t6, e6);
12375
12378
  let n6 = "";
12376
12379
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) n6 += t6[e6], e6++;
12377
- !this.suppressValidationErr && S(n6), e6 = P(t6, e6);
12380
+ !this.suppressValidationErr && C2(n6), e6 = A2(t6, e6);
12378
12381
  const i6 = t6.substring(e6, e6 + 6).toUpperCase();
12379
12382
  if (!this.suppressValidationErr && "SYSTEM" !== i6 && "PUBLIC" !== i6) throw new Error(`Expected SYSTEM or PUBLIC, found "${i6}"`);
12380
- e6 += i6.length, e6 = P(t6, e6);
12383
+ e6 += i6.length, e6 = A2(t6, e6);
12381
12384
  let s6 = null, r6 = null;
12382
- if ("PUBLIC" === i6) [e6, s6] = this.readIdentifierVal(t6, e6, "publicIdentifier"), '"' !== t6[e6 = P(t6, e6)] && "'" !== t6[e6] || ([e6, r6] = this.readIdentifierVal(t6, e6, "systemIdentifier"));
12385
+ if ("PUBLIC" === i6) [e6, s6] = this.readIdentifierVal(t6, e6, "publicIdentifier"), '"' !== t6[e6 = A2(t6, e6)] && "'" !== t6[e6] || ([e6, r6] = this.readIdentifierVal(t6, e6, "systemIdentifier"));
12383
12386
  else if ("SYSTEM" === i6 && ([e6, r6] = this.readIdentifierVal(t6, e6, "systemIdentifier"), !this.suppressValidationErr && !r6)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
12384
12387
  return { notationName: n6, publicIdentifier: s6, systemIdentifier: r6, index: --e6 };
12385
12388
  }
@@ -12392,13 +12395,13 @@ var require_fxp = __commonJS({
12392
12395
  return [++e6, i6];
12393
12396
  }
12394
12397
  readElementExp(t6, e6) {
12395
- e6 = P(t6, e6);
12398
+ e6 = A2(t6, e6);
12396
12399
  let n6 = "";
12397
12400
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) n6 += t6[e6], e6++;
12398
12401
  if (!this.suppressValidationErr && !r5(n6)) throw new Error(`Invalid element name: "${n6}"`);
12399
12402
  let i6 = "";
12400
- if ("E" === t6[e6 = P(t6, e6)] && A2(t6, "MPTY", e6)) e6 += 4;
12401
- else if ("A" === t6[e6] && A2(t6, "NY", e6)) e6 += 2;
12403
+ if ("E" === t6[e6 = A2(t6, e6)] && S(t6, "MPTY", e6)) e6 += 4;
12404
+ else if ("A" === t6[e6] && S(t6, "NY", e6)) e6 += 2;
12402
12405
  else if ("(" === t6[e6]) {
12403
12406
  for (e6++; e6 < t6.length && ")" !== t6[e6]; ) i6 += t6[e6], e6++;
12404
12407
  if (")" !== t6[e6]) throw new Error("Unterminated content model");
@@ -12406,24 +12409,24 @@ var require_fxp = __commonJS({
12406
12409
  return { elementName: n6, contentModel: i6.trim(), index: e6 };
12407
12410
  }
12408
12411
  readAttlistExp(t6, e6) {
12409
- e6 = P(t6, e6);
12412
+ e6 = A2(t6, e6);
12410
12413
  let n6 = "";
12411
12414
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) n6 += t6[e6], e6++;
12412
- S(n6), e6 = P(t6, e6);
12415
+ C2(n6), e6 = A2(t6, e6);
12413
12416
  let i6 = "";
12414
12417
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) i6 += t6[e6], e6++;
12415
- if (!S(i6)) throw new Error(`Invalid attribute name: "${i6}"`);
12416
- e6 = P(t6, e6);
12418
+ if (!C2(i6)) throw new Error(`Invalid attribute name: "${i6}"`);
12419
+ e6 = A2(t6, e6);
12417
12420
  let s6 = "";
12418
12421
  if ("NOTATION" === t6.substring(e6, e6 + 8).toUpperCase()) {
12419
- if (s6 = "NOTATION", "(" !== t6[e6 = P(t6, e6 += 8)]) throw new Error(`Expected '(', found "${t6[e6]}"`);
12422
+ if (s6 = "NOTATION", "(" !== t6[e6 = A2(t6, e6 += 8)]) throw new Error(`Expected '(', found "${t6[e6]}"`);
12420
12423
  e6++;
12421
12424
  let n7 = [];
12422
12425
  for (; e6 < t6.length && ")" !== t6[e6]; ) {
12423
12426
  let i7 = "";
12424
12427
  for (; e6 < t6.length && "|" !== t6[e6] && ")" !== t6[e6]; ) i7 += t6[e6], e6++;
12425
- if (i7 = i7.trim(), !S(i7)) throw new Error(`Invalid notation name: "${i7}"`);
12426
- n7.push(i7), "|" === t6[e6] && (e6++, e6 = P(t6, e6));
12428
+ if (i7 = i7.trim(), !C2(i7)) throw new Error(`Invalid notation name: "${i7}"`);
12429
+ n7.push(i7), "|" === t6[e6] && (e6++, e6 = A2(t6, e6));
12427
12430
  }
12428
12431
  if (")" !== t6[e6]) throw new Error("Unterminated list of notations");
12429
12432
  e6++, s6 += " (" + n7.join("|") + ")";
@@ -12432,45 +12435,43 @@ var require_fxp = __commonJS({
12432
12435
  const n7 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
12433
12436
  if (!this.suppressValidationErr && !n7.includes(s6.toUpperCase())) throw new Error(`Invalid attribute type: "${s6}"`);
12434
12437
  }
12435
- e6 = P(t6, e6);
12438
+ e6 = A2(t6, e6);
12436
12439
  let r6 = "";
12437
12440
  return "#REQUIRED" === t6.substring(e6, e6 + 8).toUpperCase() ? (r6 = "#REQUIRED", e6 += 8) : "#IMPLIED" === t6.substring(e6, e6 + 7).toUpperCase() ? (r6 = "#IMPLIED", e6 += 7) : [e6, r6] = this.readIdentifierVal(t6, e6, "ATTLIST"), { elementName: n6, attributeName: i6, attributeType: s6, defaultValue: r6, index: e6 };
12438
12441
  }
12439
12442
  }
12440
- const P = (t6, e6) => {
12443
+ const A2 = (t6, e6) => {
12441
12444
  for (; e6 < t6.length && /\s/.test(t6[e6]); ) e6++;
12442
12445
  return e6;
12443
12446
  };
12444
- function A2(t6, e6, n6) {
12447
+ function S(t6, e6, n6) {
12445
12448
  for (let i6 = 0; i6 < e6.length; i6++) if (e6[i6] !== t6[n6 + i6 + 1]) return false;
12446
12449
  return true;
12447
12450
  }
12448
- function S(t6) {
12451
+ function C2(t6) {
12449
12452
  if (r5(t6)) return t6;
12450
12453
  throw new Error(`Invalid entity name ${t6}`);
12451
12454
  }
12452
- const C2 = /^[-+]?0x[a-fA-F0-9]+$/, $ = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
12453
- const D2 = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
12454
- function L(t6) {
12455
- return "function" == typeof t6 ? t6 : Array.isArray(t6) ? (e6) => {
12456
- for (const n6 of t6) {
12457
- if ("string" == typeof n6 && e6 === n6) return true;
12458
- if (n6 instanceof RegExp && n6.test(e6)) return true;
12459
- }
12460
- } : () => false;
12461
- }
12462
- class F2 {
12455
+ const $ = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, D2 = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
12456
+ const j5 = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
12457
+ class L {
12463
12458
  constructor(t6) {
12464
- if (this.options = t6, 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: (t7, e6) => K(e6, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t7, e6) => K(e6, 16, "&#x") } }, this.addExternalEntities = j5, this.parseXml = B2, this.parseTextData = M, this.resolveNameSpace = _, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q5, this.saveTextToParentTag = G2, this.addChild = R, this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
12459
+ var e6;
12460
+ if (this.options = t6, 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: (t7, e7) => K(e7, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t7, e7) => K(e7, 16, "&#x") } }, this.addExternalEntities = F2, this.parseXml = R, this.parseTextData = M, this.resolveNameSpace = k5, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q5, this.saveTextToParentTag = G2, this.addChild = B2, this.ignoreAttributesFn = "function" == typeof (e6 = this.options.ignoreAttributes) ? e6 : Array.isArray(e6) ? (t7) => {
12461
+ for (const n6 of e6) {
12462
+ if ("string" == typeof n6 && t7 === n6) return true;
12463
+ if (n6 instanceof RegExp && n6.test(t7)) return true;
12464
+ }
12465
+ } : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
12465
12466
  this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
12466
12467
  for (let t7 = 0; t7 < this.options.stopNodes.length; t7++) {
12467
- const e6 = this.options.stopNodes[t7];
12468
- "string" == typeof e6 && (e6.startsWith("*.") ? this.stopNodesWildcard.add(e6.substring(2)) : this.stopNodesExact.add(e6));
12468
+ const e7 = this.options.stopNodes[t7];
12469
+ "string" == typeof e7 && (e7.startsWith("*.") ? this.stopNodesWildcard.add(e7.substring(2)) : this.stopNodesExact.add(e7));
12469
12470
  }
12470
12471
  }
12471
12472
  }
12472
12473
  }
12473
- function j5(t6) {
12474
+ function F2(t6) {
12474
12475
  const e6 = Object.keys(t6);
12475
12476
  for (let n6 = 0; n6 < e6.length; n6++) {
12476
12477
  const i6 = e6[n6], s6 = i6.replace(/[.\-+*:]/g, "\\.");
@@ -12484,7 +12485,7 @@ var require_fxp = __commonJS({
12484
12485
  return null == i7 ? t6 : typeof i7 != typeof t6 || i7 !== t6 ? i7 : this.options.trimValues || t6.trim() === t6 ? Z(t6, this.options.parseTagValue, this.options.numberParseOptions) : t6;
12485
12486
  }
12486
12487
  }
12487
- function _(t6) {
12488
+ function k5(t6) {
12488
12489
  if (this.options.removeNSPrefix) {
12489
12490
  const e6 = t6.split(":"), n6 = "/" === t6.charAt(0) ? "/" : "";
12490
12491
  if ("xmlns" === e6[0]) return "";
@@ -12492,10 +12493,10 @@ var require_fxp = __commonJS({
12492
12493
  }
12493
12494
  return t6;
12494
12495
  }
12495
- const k5 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
12496
+ const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
12496
12497
  function U(t6, e6, n6) {
12497
12498
  if (true !== this.options.ignoreAttributes && "string" == typeof t6) {
12498
- const i6 = s5(t6, k5), r6 = i6.length, o6 = {};
12499
+ const i6 = s5(t6, _), r6 = i6.length, o6 = {};
12499
12500
  for (let t7 = 0; t7 < r6; t7++) {
12500
12501
  const s6 = this.resolveNameSpace(i6[t7][1]);
12501
12502
  if (this.ignoreAttributesFn(s6, e6)) continue;
@@ -12514,12 +12515,12 @@ var require_fxp = __commonJS({
12514
12515
  return o6;
12515
12516
  }
12516
12517
  }
12517
- const B2 = function(t6) {
12518
+ const R = function(t6) {
12518
12519
  t6 = t6.replace(/\r\n?/g, "\n");
12519
12520
  const e6 = new I2("!xml");
12520
12521
  let n6 = e6, i6 = "", s6 = "";
12521
12522
  this.entityExpansionCount = 0, this.currentExpandedLength = 0;
12522
- const r6 = new O(this.options.processEntities);
12523
+ const r6 = new P(this.options.processEntities);
12523
12524
  for (let o6 = 0; o6 < t6.length; o6++) if ("<" === t6[o6]) if ("/" === t6[o6 + 1]) {
12524
12525
  const e7 = z2(t6, ">", o6, "Closing Tag is not closed.");
12525
12526
  let r7 = t6.substring(o6 + 2, e7).trim();
@@ -12559,26 +12560,27 @@ var require_fxp = __commonJS({
12559
12560
  } else {
12560
12561
  let r7 = W(t6, o6, this.options.removeNSPrefix), a6 = r7.tagName;
12561
12562
  const l6 = r7.rawTagName;
12562
- let u6 = r7.tagExp, h6 = r7.attrExpPresent, d6 = r7.closeIndex;
12563
+ let u6 = r7.tagExp, d6 = r7.attrExpPresent, h6 = r7.closeIndex;
12563
12564
  if (this.options.transformTagName) {
12564
12565
  const t7 = this.options.transformTagName(a6);
12565
12566
  u6 === a6 && (u6 = t7), a6 = t7;
12566
12567
  }
12568
+ if (this.options.strictReservedNames && (a6 === this.options.commentPropName || a6 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${a6}`);
12567
12569
  n6 && i6 && "!xml" !== n6.tagname && (i6 = this.saveTextToParentTag(i6, n6, s6, false));
12568
12570
  const p6 = n6;
12569
12571
  p6 && -1 !== this.options.unpairedTags.indexOf(p6.tagname) && (n6 = this.tagsNodeStack.pop(), s6 = s6.substring(0, s6.lastIndexOf("."))), a6 !== e6.tagname && (s6 += s6 ? "." + a6 : a6);
12570
- const f6 = o6;
12572
+ const c6 = o6;
12571
12573
  if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s6, a6)) {
12572
12574
  let e7 = "";
12573
12575
  if (u6.length > 0 && u6.lastIndexOf("/") === u6.length - 1) "/" === a6[a6.length - 1] ? (a6 = a6.substr(0, a6.length - 1), s6 = s6.substr(0, s6.length - 1), u6 = a6) : u6 = u6.substr(0, u6.length - 1), o6 = r7.closeIndex;
12574
12576
  else if (-1 !== this.options.unpairedTags.indexOf(a6)) o6 = r7.closeIndex;
12575
12577
  else {
12576
- const n7 = this.readStopNodeData(t6, l6, d6 + 1);
12578
+ const n7 = this.readStopNodeData(t6, l6, h6 + 1);
12577
12579
  if (!n7) throw new Error(`Unexpected end of ${l6}`);
12578
12580
  o6 = n7.i, e7 = n7.tagContent;
12579
12581
  }
12580
12582
  const i7 = new I2(a6);
12581
- a6 !== u6 && h6 && (i7[":@"] = this.buildAttributesMap(u6, s6, a6)), e7 && (e7 = this.parseTextData(e7, a6, s6, true, h6, true, true)), s6 = s6.substr(0, s6.lastIndexOf(".")), i7.add(this.options.textNodeName, e7), this.addChild(n6, i7, s6, f6);
12583
+ a6 !== u6 && d6 && (i7[":@"] = this.buildAttributesMap(u6, s6, a6)), e7 && (e7 = this.parseTextData(e7, a6, s6, true, d6, true, true)), s6 = s6.substr(0, s6.lastIndexOf(".")), i7.add(this.options.textNodeName, e7), this.addChild(n6, i7, s6, c6);
12582
12584
  } else {
12583
12585
  if (u6.length > 0 && u6.lastIndexOf("/") === u6.length - 1) {
12584
12586
  if ("/" === a6[a6.length - 1] ? (a6 = a6.substr(0, a6.length - 1), s6 = s6.substr(0, s6.length - 1), u6 = a6) : u6 = u6.substr(0, u6.length - 1), this.options.transformTagName) {
@@ -12586,18 +12588,26 @@ var require_fxp = __commonJS({
12586
12588
  u6 === a6 && (u6 = t8), a6 = t8;
12587
12589
  }
12588
12590
  const t7 = new I2(a6);
12589
- a6 !== u6 && h6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, f6), s6 = s6.substr(0, s6.lastIndexOf("."));
12591
+ a6 !== u6 && d6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, c6), s6 = s6.substr(0, s6.lastIndexOf("."));
12590
12592
  } else {
12591
- const t7 = new I2(a6);
12592
- this.tagsNodeStack.push(n6), a6 !== u6 && h6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, f6), n6 = t7;
12593
+ if (-1 !== this.options.unpairedTags.indexOf(a6)) {
12594
+ const t7 = new I2(a6);
12595
+ a6 !== u6 && d6 && (t7[":@"] = this.buildAttributesMap(u6, s6)), this.addChild(n6, t7, s6, c6), s6 = s6.substr(0, s6.lastIndexOf(".")), o6 = r7.closeIndex;
12596
+ continue;
12597
+ }
12598
+ {
12599
+ const t7 = new I2(a6);
12600
+ if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
12601
+ this.tagsNodeStack.push(n6), a6 !== u6 && d6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, c6), n6 = t7;
12602
+ }
12593
12603
  }
12594
- i6 = "", o6 = d6;
12604
+ i6 = "", o6 = h6;
12595
12605
  }
12596
12606
  }
12597
12607
  else i6 += t6[o6];
12598
12608
  return e6.child;
12599
12609
  };
12600
- function R(t6, e6, n6, i6) {
12610
+ function B2(t6, e6, n6, i6) {
12601
12611
  this.options.captureMetaData || (i6 = void 0);
12602
12612
  const s6 = this.options.updateTag(e6.tagname, n6, e6[":@"]);
12603
12613
  false === s6 || ("string" == typeof s6 ? (e6.tagname = s6, t6.addChild(e6, i6)) : t6.addChild(e6, i6));
@@ -12658,12 +12668,12 @@ var require_fxp = __commonJS({
12658
12668
  const o6 = s6.index, a6 = r6.search(/\s/);
12659
12669
  let l6 = r6, u6 = true;
12660
12670
  -1 !== a6 && (l6 = r6.substring(0, a6), r6 = r6.substring(a6 + 1).trimStart());
12661
- const h6 = l6;
12671
+ const d6 = l6;
12662
12672
  if (n6) {
12663
12673
  const t7 = l6.indexOf(":");
12664
12674
  -1 !== t7 && (l6 = l6.substr(t7 + 1), u6 = l6 !== s6.data.substr(t7 + 1));
12665
12675
  }
12666
- return { tagName: l6, tagExp: r6, closeIndex: o6, attrExpPresent: u6, rawTagName: h6 };
12676
+ return { tagName: l6, tagExp: r6, closeIndex: o6, attrExpPresent: u6, rawTagName: d6 };
12667
12677
  }
12668
12678
  function q5(t6, e6, n6) {
12669
12679
  const i6 = n6;
@@ -12684,19 +12694,19 @@ var require_fxp = __commonJS({
12684
12694
  if (e6 && "string" == typeof t6) {
12685
12695
  const e7 = t6.trim();
12686
12696
  return "true" === e7 || "false" !== e7 && (function(t7, e8 = {}) {
12687
- if (e8 = Object.assign({}, V, e8), !t7 || "string" != typeof t7) return t7;
12697
+ if (e8 = Object.assign({}, D2, e8), !t7 || "string" != typeof t7) return t7;
12688
12698
  let n7 = t7.trim();
12689
12699
  if (void 0 !== e8.skipLike && e8.skipLike.test(n7)) return t7;
12690
12700
  if ("0" === t7) return 0;
12691
- if (e8.hex && C2.test(n7)) return (function(t8) {
12701
+ if (e8.hex && $.test(n7)) return (function(t8) {
12692
12702
  if (parseInt) return parseInt(t8, 16);
12693
12703
  if (Number.parseInt) return Number.parseInt(t8, 16);
12694
12704
  if (window && window.parseInt) return window.parseInt(t8, 16);
12695
12705
  throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
12696
12706
  })(n7);
12697
- if (-1 !== n7.search(/.+[eE].+/)) return (function(t8, e9, n8) {
12707
+ if (n7.includes("e") || n7.includes("E")) return (function(t8, e9, n8) {
12698
12708
  if (!n8.eNotation) return t8;
12699
- const i7 = e9.match(D2);
12709
+ const i7 = e9.match(j5);
12700
12710
  if (i7) {
12701
12711
  let s6 = i7[1] || "";
12702
12712
  const r6 = -1 === i7[3].indexOf("e") ? "E" : "e", o6 = i7[2], a6 = s6 ? t8[o6.length + 1] === r6 : t8[o6.length] === r6;
@@ -12705,7 +12715,7 @@ var require_fxp = __commonJS({
12705
12715
  return t8;
12706
12716
  })(t7, n7, e8);
12707
12717
  {
12708
- const s6 = $.exec(n7);
12718
+ const s6 = V.exec(n7);
12709
12719
  if (s6) {
12710
12720
  const r6 = s6[1] || "", o6 = s6[2];
12711
12721
  let a6 = (i6 = s6[3]) && -1 !== i6.indexOf(".") ? ("." === (i6 = i6.replace(/0+$/, "")) ? i6 = "0" : "." === i6[0] ? i6 = "0" + i6 : "." === i6[i6.length - 1] && (i6 = i6.substring(0, i6.length - 1)), i6) : i6;
@@ -12713,7 +12723,7 @@ var require_fxp = __commonJS({
12713
12723
  if (!e8.leadingZeros && (o6.length > 1 || 1 === o6.length && !l6)) return t7;
12714
12724
  {
12715
12725
  const i7 = Number(n7), s7 = String(i7);
12716
- if (0 === i7 || -0 === i7) return i7;
12726
+ if (0 === i7) return i7;
12717
12727
  if (-1 !== s7.search(/[eE]/)) return e8.eNotation ? i7 : t7;
12718
12728
  if (-1 !== n7.indexOf(".")) return "0" === s7 || s7 === a6 || s7 === `${r6}${a6}` ? i7 : t7;
12719
12729
  let l7 = o6 ? a6 : n7;
@@ -12747,7 +12757,7 @@ var require_fxp = __commonJS({
12747
12757
  if (o6[a6]) {
12748
12758
  let t7 = H2(o6[a6], e6, l6);
12749
12759
  const n7 = nt(t7, e6);
12750
- void 0 !== o6[Q] && (t7[Q] = o6[Q]), o6[":@"] ? et(t7, o6[":@"], l6, e6) : 1 !== Object.keys(t7).length || void 0 === t7[e6.textNodeName] || e6.alwaysCreateTextNode ? 0 === Object.keys(t7).length && (e6.alwaysCreateTextNode ? t7[e6.textNodeName] = "" : t7 = "") : t7 = t7[e6.textNodeName], void 0 !== s6[a6] && s6.hasOwnProperty(a6) ? (Array.isArray(s6[a6]) || (s6[a6] = [s6[a6]]), s6[a6].push(t7)) : e6.isArray(a6, l6, n7) ? s6[a6] = [t7] : s6[a6] = t7;
12760
+ o6[":@"] ? et(t7, o6[":@"], l6, e6) : 1 !== Object.keys(t7).length || void 0 === t7[e6.textNodeName] || e6.alwaysCreateTextNode ? 0 === Object.keys(t7).length && (e6.alwaysCreateTextNode ? t7[e6.textNodeName] = "" : t7 = "") : t7 = t7[e6.textNodeName], void 0 !== o6[Q] && "object" == typeof t7 && null !== t7 && (t7[Q] = o6[Q]), void 0 !== s6[a6] && Object.prototype.hasOwnProperty.call(s6, a6) ? (Array.isArray(s6[a6]) || (s6[a6] = [s6[a6]]), s6[a6].push(t7)) : e6.isArray(a6, l6, n7) ? s6[a6] = [t7] : s6[a6] = t7;
12751
12761
  }
12752
12762
  }
12753
12763
  }
@@ -12775,7 +12785,7 @@ var require_fxp = __commonJS({
12775
12785
  }
12776
12786
  class it {
12777
12787
  constructor(t6) {
12778
- this.externalEntities = {}, this.options = w5(t6);
12788
+ this.externalEntities = {}, this.options = v5(t6);
12779
12789
  }
12780
12790
  parse(t6, e6) {
12781
12791
  if ("string" != typeof t6 && t6.toString) t6 = t6.toString();
@@ -12785,7 +12795,7 @@ var require_fxp = __commonJS({
12785
12795
  const n7 = a5(t6, e6);
12786
12796
  if (true !== n7) throw Error(`${n7.err.msg}:${n7.err.line}:${n7.err.col}`);
12787
12797
  }
12788
- const n6 = new F2(this.options);
12798
+ const n6 = new L(this.options);
12789
12799
  n6.addExternalEntities(this.externalEntities);
12790
12800
  const i6 = n6.parseXml(t6);
12791
12801
  return this.options.preserveOrder || void 0 === i6 ? i6 : J2(i6, this.options);
@@ -12806,6 +12816,13 @@ var require_fxp = __commonJS({
12806
12816
  }
12807
12817
  function rt(t6, e6, n6, i6) {
12808
12818
  let s6 = "", r6 = false;
12819
+ if (!Array.isArray(t6)) {
12820
+ if (null != t6) {
12821
+ let n7 = t6.toString();
12822
+ return n7 = ut(n7, e6), n7;
12823
+ }
12824
+ return "";
12825
+ }
12809
12826
  for (let o6 = 0; o6 < t6.length; o6++) {
12810
12827
  const a6 = t6[o6], l6 = ot(a6);
12811
12828
  if (void 0 === l6) continue;
@@ -12829,10 +12846,10 @@ var require_fxp = __commonJS({
12829
12846
  o7 = 0 !== o7.length ? " " + o7 : "", s6 += n7 + `<${l6}${o7}${t7}?>`, r6 = true;
12830
12847
  continue;
12831
12848
  }
12832
- let h6 = i6;
12833
- "" !== h6 && (h6 += e6.indentBy);
12834
- const d6 = i6 + `<${l6}${at3(a6[":@"], e6)}`, p6 = rt(a6[l6], e6, u6, h6);
12835
- -1 !== e6.unpairedTags.indexOf(l6) ? e6.suppressUnpairedNode ? s6 += d6 + ">" : s6 += d6 + "/>" : p6 && 0 !== p6.length || !e6.suppressEmptyNode ? p6 && p6.endsWith(">") ? s6 += d6 + `>${p6}${i6}</${l6}>` : (s6 += d6 + ">", p6 && "" !== i6 && (p6.includes("/>") || p6.includes("</")) ? s6 += i6 + e6.indentBy + p6 + i6 : s6 += p6, s6 += `</${l6}>`) : s6 += d6 + "/>", r6 = true;
12849
+ let d6 = i6;
12850
+ "" !== d6 && (d6 += e6.indentBy);
12851
+ const h6 = i6 + `<${l6}${at3(a6[":@"], e6)}`, p6 = rt(a6[l6], e6, u6, d6);
12852
+ -1 !== e6.unpairedTags.indexOf(l6) ? e6.suppressUnpairedNode ? s6 += h6 + ">" : s6 += h6 + "/>" : p6 && 0 !== p6.length || !e6.suppressEmptyNode ? p6 && p6.endsWith(">") ? s6 += h6 + `>${p6}${i6}</${l6}>` : (s6 += h6 + ">", p6 && "" !== i6 && (p6.includes("/>") || p6.includes("</")) ? s6 += i6 + e6.indentBy + p6 + i6 : s6 += p6, s6 += `</${l6}>`) : s6 += h6 + "/>", r6 = true;
12836
12853
  }
12837
12854
  return s6;
12838
12855
  }
@@ -12840,13 +12857,13 @@ var require_fxp = __commonJS({
12840
12857
  const e6 = Object.keys(t6);
12841
12858
  for (let n6 = 0; n6 < e6.length; n6++) {
12842
12859
  const i6 = e6[n6];
12843
- if (t6.hasOwnProperty(i6) && ":@" !== i6) return i6;
12860
+ if (Object.prototype.hasOwnProperty.call(t6, i6) && ":@" !== i6) return i6;
12844
12861
  }
12845
12862
  }
12846
12863
  function at3(t6, e6) {
12847
12864
  let n6 = "";
12848
12865
  if (t6 && !e6.ignoreAttributes) for (let i6 in t6) {
12849
- if (!t6.hasOwnProperty(i6)) continue;
12866
+ if (!Object.prototype.hasOwnProperty.call(t6, i6)) continue;
12850
12867
  let s6 = e6.attributeValueProcessor(i6, t6[i6]);
12851
12868
  s6 = ut(s6, e6), true === s6 && e6.suppressBooleanAttributes ? n6 += ` ${i6.substr(e6.attributeNamePrefix.length)}` : n6 += ` ${i6.substr(e6.attributeNamePrefix.length)}="${s6}"`;
12852
12869
  }
@@ -12864,15 +12881,21 @@ var require_fxp = __commonJS({
12864
12881
  }
12865
12882
  return t6;
12866
12883
  }
12867
- const ht = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t6, e6) {
12884
+ const dt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t6, e6) {
12868
12885
  return e6;
12869
12886
  }, attributeValueProcessor: function(t6, e6) {
12870
12887
  return e6;
12871
12888
  }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false };
12872
- function dt(t6) {
12873
- this.options = Object.assign({}, ht, t6), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
12889
+ function ht(t6) {
12890
+ var e6;
12891
+ this.options = Object.assign({}, dt, t6), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
12874
12892
  return false;
12875
- } : (this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ct), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ft, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
12893
+ } : (this.ignoreAttributesFn = "function" == typeof (e6 = this.options.ignoreAttributes) ? e6 : Array.isArray(e6) ? (t7) => {
12894
+ for (const n6 of e6) {
12895
+ if ("string" == typeof n6 && t7 === n6) return true;
12896
+ if (n6 instanceof RegExp && n6.test(t7)) return true;
12897
+ }
12898
+ } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ft), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ct, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
12876
12899
  return "";
12877
12900
  }, this.tagEndChar = ">", this.newLine = "");
12878
12901
  }
@@ -12880,15 +12903,15 @@ var require_fxp = __commonJS({
12880
12903
  const s6 = this.j2x(t6, n6 + 1, i6.concat(e6));
12881
12904
  return void 0 !== t6[this.options.textNodeName] && 1 === Object.keys(t6).length ? this.buildTextValNode(t6[this.options.textNodeName], e6, s6.attrStr, n6) : this.buildObjectNode(s6.val, e6, s6.attrStr, n6);
12882
12905
  }
12883
- function ft(t6) {
12906
+ function ct(t6) {
12884
12907
  return this.options.indentBy.repeat(t6);
12885
12908
  }
12886
- function ct(t6) {
12909
+ function ft(t6) {
12887
12910
  return !(!t6.startsWith(this.options.attributeNamePrefix) || t6 === this.options.textNodeName) && t6.substr(this.attrPrefixLen);
12888
12911
  }
12889
- dt.prototype.build = function(t6) {
12912
+ ht.prototype.build = function(t6) {
12890
12913
  return this.options.preserveOrder ? st(t6, this.options) : (Array.isArray(t6) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t6 = { [this.options.arrayNodeName]: t6 }), this.j2x(t6, 0, []).val);
12891
- }, dt.prototype.j2x = function(t6, e6, n6) {
12914
+ }, ht.prototype.j2x = function(t6, e6, n6) {
12892
12915
  let i6 = "", s6 = "";
12893
12916
  const r6 = n6.join(".");
12894
12917
  for (let o6 in t6) if (Object.prototype.hasOwnProperty.call(t6, o6)) if (void 0 === t6[o6]) this.isAttribute(o6) && (s6 += "");
@@ -12923,18 +12946,18 @@ var require_fxp = __commonJS({
12923
12946
  for (let s7 = 0; s7 < n7; s7++) i6 += this.buildAttrPairStr(e7[s7], "" + t6[o6][e7[s7]]);
12924
12947
  } else s6 += this.processTextOrObjNode(t6[o6], o6, e6, n6);
12925
12948
  return { attrStr: i6, val: s6 };
12926
- }, dt.prototype.buildAttrPairStr = function(t6, e6) {
12949
+ }, ht.prototype.buildAttrPairStr = function(t6, e6) {
12927
12950
  return e6 = this.options.attributeValueProcessor(t6, "" + e6), e6 = this.replaceEntitiesValue(e6), this.options.suppressBooleanAttributes && "true" === e6 ? " " + t6 : " " + t6 + '="' + e6 + '"';
12928
- }, dt.prototype.buildObjectNode = function(t6, e6, n6, i6) {
12951
+ }, ht.prototype.buildObjectNode = function(t6, e6, n6, i6) {
12929
12952
  if ("" === t6) return "?" === e6[0] ? this.indentate(i6) + "<" + e6 + n6 + "?" + this.tagEndChar : this.indentate(i6) + "<" + e6 + n6 + this.closeTag(e6) + this.tagEndChar;
12930
12953
  {
12931
12954
  let s6 = "</" + e6 + this.tagEndChar, r6 = "";
12932
12955
  return "?" === e6[0] && (r6 = "?", s6 = ""), !n6 && "" !== n6 || -1 !== t6.indexOf("<") ? false !== this.options.commentPropName && e6 === this.options.commentPropName && 0 === r6.length ? this.indentate(i6) + `<!--${t6}-->` + this.newLine : this.indentate(i6) + "<" + e6 + n6 + r6 + this.tagEndChar + t6 + this.indentate(i6) + s6 : this.indentate(i6) + "<" + e6 + n6 + r6 + ">" + t6 + s6;
12933
12956
  }
12934
- }, dt.prototype.closeTag = function(t6) {
12957
+ }, ht.prototype.closeTag = function(t6) {
12935
12958
  let e6 = "";
12936
12959
  return -1 !== this.options.unpairedTags.indexOf(t6) ? this.options.suppressUnpairedNode || (e6 = "/") : e6 = this.options.suppressEmptyNode ? "/" : `></${t6}`, e6;
12937
- }, dt.prototype.buildTextValNode = function(t6, e6, n6, i6) {
12960
+ }, ht.prototype.buildTextValNode = function(t6, e6, n6, i6) {
12938
12961
  if (false !== this.options.cdataPropName && e6 === this.options.cdataPropName) return this.indentate(i6) + `<![CDATA[${t6}]]>` + this.newLine;
12939
12962
  if (false !== this.options.commentPropName && e6 === this.options.commentPropName) return this.indentate(i6) + `<!--${t6}-->` + this.newLine;
12940
12963
  if ("?" === e6[0]) return this.indentate(i6) + "<" + e6 + n6 + "?" + this.tagEndChar;
@@ -12942,14 +12965,14 @@ var require_fxp = __commonJS({
12942
12965
  let s6 = this.options.tagValueProcessor(e6, t6);
12943
12966
  return s6 = this.replaceEntitiesValue(s6), "" === s6 ? this.indentate(i6) + "<" + e6 + n6 + this.closeTag(e6) + this.tagEndChar : this.indentate(i6) + "<" + e6 + n6 + ">" + s6 + "</" + e6 + this.tagEndChar;
12944
12967
  }
12945
- }, dt.prototype.replaceEntitiesValue = function(t6) {
12968
+ }, ht.prototype.replaceEntitiesValue = function(t6) {
12946
12969
  if (t6 && t6.length > 0 && this.options.processEntities) for (let e6 = 0; e6 < this.options.entities.length; e6++) {
12947
12970
  const n6 = this.options.entities[e6];
12948
12971
  t6 = t6.replace(n6.regex, n6.val);
12949
12972
  }
12950
12973
  return t6;
12951
12974
  };
12952
- const gt = { validate: a5 };
12975
+ const gt = ht, xt = { validate: a5 };
12953
12976
  module2.exports = e5;
12954
12977
  })();
12955
12978
  }
@@ -12969,7 +12992,8 @@ var require_xml_parser = __commonJS({
12969
12992
  ignoreDeclaration: true,
12970
12993
  parseTagValue: false,
12971
12994
  trimValues: false,
12972
- tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0
12995
+ tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0,
12996
+ maxNestedTags: 1024
12973
12997
  });
12974
12998
  parser.addEntity("#xD", "\r");
12975
12999
  parser.addEntity("#10", "\n");
@@ -17522,7 +17546,7 @@ var require_package2 = __commonJS({
17522
17546
  module2.exports = {
17523
17547
  name: "@aws-sdk/client-bedrock-runtime",
17524
17548
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
17525
- version: "3.1000.0",
17549
+ version: "3.1001.0",
17526
17550
  scripts: {
17527
17551
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
17528
17552
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -17546,54 +17570,54 @@ var require_package2 = __commonJS({
17546
17570
  dependencies: {
17547
17571
  "@aws-crypto/sha256-browser": "5.2.0",
17548
17572
  "@aws-crypto/sha256-js": "5.2.0",
17549
- "@aws-sdk/core": "^3.973.15",
17550
- "@aws-sdk/credential-provider-node": "^3.972.14",
17573
+ "@aws-sdk/core": "^3.973.16",
17574
+ "@aws-sdk/credential-provider-node": "^3.972.15",
17551
17575
  "@aws-sdk/eventstream-handler-node": "^3.972.9",
17552
17576
  "@aws-sdk/middleware-eventstream": "^3.972.6",
17553
17577
  "@aws-sdk/middleware-host-header": "^3.972.6",
17554
17578
  "@aws-sdk/middleware-logger": "^3.972.6",
17555
17579
  "@aws-sdk/middleware-recursion-detection": "^3.972.6",
17556
- "@aws-sdk/middleware-user-agent": "^3.972.15",
17557
- "@aws-sdk/middleware-websocket": "^3.972.10",
17580
+ "@aws-sdk/middleware-user-agent": "^3.972.16",
17581
+ "@aws-sdk/middleware-websocket": "^3.972.11",
17558
17582
  "@aws-sdk/region-config-resolver": "^3.972.6",
17559
- "@aws-sdk/token-providers": "3.1000.0",
17583
+ "@aws-sdk/token-providers": "3.1001.0",
17560
17584
  "@aws-sdk/types": "^3.973.4",
17561
17585
  "@aws-sdk/util-endpoints": "^3.996.3",
17562
17586
  "@aws-sdk/util-user-agent-browser": "^3.972.6",
17563
- "@aws-sdk/util-user-agent-node": "^3.973.0",
17587
+ "@aws-sdk/util-user-agent-node": "^3.973.1",
17564
17588
  "@smithy/config-resolver": "^4.4.9",
17565
- "@smithy/core": "^3.23.6",
17589
+ "@smithy/core": "^3.23.7",
17566
17590
  "@smithy/eventstream-serde-browser": "^4.2.10",
17567
17591
  "@smithy/eventstream-serde-config-resolver": "^4.3.10",
17568
17592
  "@smithy/eventstream-serde-node": "^4.2.10",
17569
- "@smithy/fetch-http-handler": "^5.3.11",
17593
+ "@smithy/fetch-http-handler": "^5.3.12",
17570
17594
  "@smithy/hash-node": "^4.2.10",
17571
17595
  "@smithy/invalid-dependency": "^4.2.10",
17572
17596
  "@smithy/middleware-content-length": "^4.2.10",
17573
- "@smithy/middleware-endpoint": "^4.4.20",
17574
- "@smithy/middleware-retry": "^4.4.37",
17597
+ "@smithy/middleware-endpoint": "^4.4.21",
17598
+ "@smithy/middleware-retry": "^4.4.38",
17575
17599
  "@smithy/middleware-serde": "^4.2.11",
17576
17600
  "@smithy/middleware-stack": "^4.2.10",
17577
17601
  "@smithy/node-config-provider": "^4.3.10",
17578
- "@smithy/node-http-handler": "^4.4.12",
17602
+ "@smithy/node-http-handler": "^4.4.13",
17579
17603
  "@smithy/protocol-http": "^5.3.10",
17580
- "@smithy/smithy-client": "^4.12.0",
17604
+ "@smithy/smithy-client": "^4.12.1",
17581
17605
  "@smithy/types": "^4.13.0",
17582
17606
  "@smithy/url-parser": "^4.2.10",
17583
17607
  "@smithy/util-base64": "^4.3.1",
17584
17608
  "@smithy/util-body-length-browser": "^4.2.1",
17585
17609
  "@smithy/util-body-length-node": "^4.2.2",
17586
- "@smithy/util-defaults-mode-browser": "^4.3.36",
17587
- "@smithy/util-defaults-mode-node": "^4.2.39",
17610
+ "@smithy/util-defaults-mode-browser": "^4.3.37",
17611
+ "@smithy/util-defaults-mode-node": "^4.2.40",
17588
17612
  "@smithy/util-endpoints": "^3.3.1",
17589
17613
  "@smithy/util-middleware": "^4.2.10",
17590
17614
  "@smithy/util-retry": "^4.2.10",
17591
- "@smithy/util-stream": "^4.5.15",
17615
+ "@smithy/util-stream": "^4.5.16",
17592
17616
  "@smithy/util-utf8": "^4.2.1",
17593
17617
  tslib: "^2.6.2"
17594
17618
  },
17595
17619
  devDependencies: {
17596
- "@smithy/snapshot-testing": "^1.0.7",
17620
+ "@smithy/snapshot-testing": "^1.0.8",
17597
17621
  "@tsconfig/node20": "20.1.8",
17598
17622
  "@types/node": "^20.14.8",
17599
17623
  concurrently: "7.0.0",
@@ -18309,7 +18333,7 @@ var init_package = __esm({
18309
18333
  "node_modules/@aws-sdk/nested-clients/package.json"() {
18310
18334
  package_default = {
18311
18335
  name: "@aws-sdk/nested-clients",
18312
- version: "3.996.3",
18336
+ version: "3.996.4",
18313
18337
  description: "Nested clients for AWS SDK packages.",
18314
18338
  main: "./dist-cjs/index.js",
18315
18339
  module: "./dist-es/index.js",
@@ -18338,37 +18362,37 @@ var init_package = __esm({
18338
18362
  dependencies: {
18339
18363
  "@aws-crypto/sha256-browser": "5.2.0",
18340
18364
  "@aws-crypto/sha256-js": "5.2.0",
18341
- "@aws-sdk/core": "^3.973.15",
18365
+ "@aws-sdk/core": "^3.973.16",
18342
18366
  "@aws-sdk/middleware-host-header": "^3.972.6",
18343
18367
  "@aws-sdk/middleware-logger": "^3.972.6",
18344
18368
  "@aws-sdk/middleware-recursion-detection": "^3.972.6",
18345
- "@aws-sdk/middleware-user-agent": "^3.972.15",
18369
+ "@aws-sdk/middleware-user-agent": "^3.972.16",
18346
18370
  "@aws-sdk/region-config-resolver": "^3.972.6",
18347
18371
  "@aws-sdk/types": "^3.973.4",
18348
18372
  "@aws-sdk/util-endpoints": "^3.996.3",
18349
18373
  "@aws-sdk/util-user-agent-browser": "^3.972.6",
18350
- "@aws-sdk/util-user-agent-node": "^3.973.0",
18374
+ "@aws-sdk/util-user-agent-node": "^3.973.1",
18351
18375
  "@smithy/config-resolver": "^4.4.9",
18352
- "@smithy/core": "^3.23.6",
18353
- "@smithy/fetch-http-handler": "^5.3.11",
18376
+ "@smithy/core": "^3.23.7",
18377
+ "@smithy/fetch-http-handler": "^5.3.12",
18354
18378
  "@smithy/hash-node": "^4.2.10",
18355
18379
  "@smithy/invalid-dependency": "^4.2.10",
18356
18380
  "@smithy/middleware-content-length": "^4.2.10",
18357
- "@smithy/middleware-endpoint": "^4.4.20",
18358
- "@smithy/middleware-retry": "^4.4.37",
18381
+ "@smithy/middleware-endpoint": "^4.4.21",
18382
+ "@smithy/middleware-retry": "^4.4.38",
18359
18383
  "@smithy/middleware-serde": "^4.2.11",
18360
18384
  "@smithy/middleware-stack": "^4.2.10",
18361
18385
  "@smithy/node-config-provider": "^4.3.10",
18362
- "@smithy/node-http-handler": "^4.4.12",
18386
+ "@smithy/node-http-handler": "^4.4.13",
18363
18387
  "@smithy/protocol-http": "^5.3.10",
18364
- "@smithy/smithy-client": "^4.12.0",
18388
+ "@smithy/smithy-client": "^4.12.1",
18365
18389
  "@smithy/types": "^4.13.0",
18366
18390
  "@smithy/url-parser": "^4.2.10",
18367
18391
  "@smithy/util-base64": "^4.3.1",
18368
18392
  "@smithy/util-body-length-browser": "^4.2.1",
18369
18393
  "@smithy/util-body-length-node": "^4.2.2",
18370
- "@smithy/util-defaults-mode-browser": "^4.3.36",
18371
- "@smithy/util-defaults-mode-node": "^4.2.39",
18394
+ "@smithy/util-defaults-mode-browser": "^4.3.37",
18395
+ "@smithy/util-defaults-mode-node": "^4.2.40",
18372
18396
  "@smithy/util-endpoints": "^3.3.1",
18373
18397
  "@smithy/util-middleware": "^4.2.10",
18374
18398
  "@smithy/util-retry": "^4.2.10",
@@ -18473,17 +18497,30 @@ var require_dist_cjs51 = __commonJS({
18473
18497
  }
18474
18498
  return ["md/nodejs", node_process.versions.node];
18475
18499
  };
18476
- var getTypeScriptPackageJsonPath = (dirname6 = "") => {
18477
- let nodeModulesPath;
18500
+ var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
18501
+ var getSanitizedTypeScriptVersion = (version2 = "") => {
18502
+ const match2 = version2.match(SEMVER_REGEX);
18503
+ if (!match2) {
18504
+ return void 0;
18505
+ }
18506
+ const [major, minor, patch, prerelease] = [match2[1], match2[2], match2[3], match2[4]];
18507
+ return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
18508
+ };
18509
+ var typescriptPackageJsonPath = node_path.join("node_modules", "typescript", "package.json");
18510
+ var getTypeScriptPackageJsonPaths = (dirname6) => {
18511
+ const cwdPath = node_path.join(process.cwd(), typescriptPackageJsonPath);
18512
+ if (!dirname6) {
18513
+ return [cwdPath];
18514
+ }
18478
18515
  const normalizedPath = node_path.normalize(dirname6);
18479
18516
  const parts = normalizedPath.split(node_path.sep);
18480
18517
  const nodeModulesIndex = parts.indexOf("node_modules");
18481
- if (nodeModulesIndex !== -1) {
18482
- nodeModulesPath = parts.slice(0, nodeModulesIndex).join(node_path.sep);
18483
- } else {
18484
- nodeModulesPath = dirname6;
18518
+ const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : dirname6;
18519
+ const parentDirPath = node_path.join(parentDir, typescriptPackageJsonPath);
18520
+ if (cwdPath === parentDirPath) {
18521
+ return [cwdPath];
18485
18522
  }
18486
- return node_path.join(nodeModulesPath, "node_modules", "typescript", "package.json");
18523
+ return [parentDirPath, cwdPath];
18487
18524
  };
18488
18525
  var tscVersion;
18489
18526
  var getTypeScriptUserAgentPair = async () => {
@@ -18492,18 +18529,22 @@ var require_dist_cjs51 = __commonJS({
18492
18529
  } else if (typeof tscVersion === "string") {
18493
18530
  return ["md/tsc", tscVersion];
18494
18531
  }
18495
- try {
18496
- const packageJson = await promises.readFile(getTypeScriptPackageJsonPath(__dirname), "utf-8");
18497
- const { version: version2 } = JSON.parse(packageJson);
18498
- if (typeof version2 !== "string") {
18499
- tscVersion = null;
18500
- return void 0;
18532
+ const dirname6 = typeof __dirname !== "undefined" ? __dirname : void 0;
18533
+ for (const typescriptPackageJsonPath2 of getTypeScriptPackageJsonPaths(dirname6)) {
18534
+ try {
18535
+ const packageJson = await promises.readFile(typescriptPackageJsonPath2, "utf-8");
18536
+ const { version: version2 } = JSON.parse(packageJson);
18537
+ const sanitizedVersion = getSanitizedTypeScriptVersion(version2);
18538
+ if (typeof sanitizedVersion !== "string") {
18539
+ continue;
18540
+ }
18541
+ tscVersion = sanitizedVersion;
18542
+ return ["md/tsc", tscVersion];
18543
+ } catch {
18501
18544
  }
18502
- tscVersion = version2;
18503
- return ["md/tsc", tscVersion];
18504
- } catch {
18505
- tscVersion = null;
18506
18545
  }
18546
+ tscVersion = null;
18547
+ return void 0;
18507
18548
  };
18508
18549
  var crtAvailability = {
18509
18550
  isCrtAvailable: false
@@ -19602,9 +19643,9 @@ var init_sso_oidc = __esm({
19602
19643
  }
19603
19644
  });
19604
19645
 
19605
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js
19646
+ // node_modules/@aws-sdk/token-providers/dist-cjs/index.js
19606
19647
  var require_dist_cjs56 = __commonJS({
19607
- "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
19648
+ "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
19608
19649
  "use strict";
19609
19650
  var client = (init_client(), __toCommonJS(client_exports));
19610
19651
  var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
@@ -23437,155 +23478,8 @@ var require_dist_cjs63 = __commonJS({
23437
23478
  }
23438
23479
  });
23439
23480
 
23440
- // node_modules/@aws-sdk/token-providers/dist-cjs/index.js
23441
- var require_dist_cjs64 = __commonJS({
23442
- "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
23443
- "use strict";
23444
- var client = (init_client(), __toCommonJS(client_exports));
23445
- var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
23446
- var propertyProvider = require_dist_cjs24();
23447
- var sharedIniFileLoader = require_dist_cjs42();
23448
- var node_fs = require("node:fs");
23449
- var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => {
23450
- logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
23451
- if (!signingName) {
23452
- throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger2 });
23453
- }
23454
- const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
23455
- if (!(bearerTokenKey in process.env)) {
23456
- throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger2 });
23457
- }
23458
- const token = { token: process.env[bearerTokenKey] };
23459
- client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
23460
- return token;
23461
- };
23462
- var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
23463
- var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
23464
- var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
23465
- const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_sso_oidc(), sso_oidc_exports));
23466
- const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
23467
- const ssoOidcClient = new SSOOIDCClient2(Object.assign({}, init.clientConfig ?? {}, {
23468
- region: ssoRegion ?? init.clientConfig?.region,
23469
- logger: coalesce("logger"),
23470
- userAgentAppId: coalesce("userAgentAppId")
23471
- }));
23472
- return ssoOidcClient;
23473
- };
23474
- var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
23475
- const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_sso_oidc(), sso_oidc_exports));
23476
- const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
23477
- return ssoOidcClient.send(new CreateTokenCommand2({
23478
- clientId: ssoToken.clientId,
23479
- clientSecret: ssoToken.clientSecret,
23480
- refreshToken: ssoToken.refreshToken,
23481
- grantType: "refresh_token"
23482
- }));
23483
- };
23484
- var validateTokenExpiry = (token) => {
23485
- if (token.expiration && token.expiration.getTime() < Date.now()) {
23486
- throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
23487
- }
23488
- };
23489
- var validateTokenKey = (key, value, forRefresh = false) => {
23490
- if (typeof value === "undefined") {
23491
- throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
23492
- }
23493
- };
23494
- var { writeFile: writeFile2 } = node_fs.promises;
23495
- var writeSSOTokenToFile = (id, ssoToken) => {
23496
- const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
23497
- const tokenString = JSON.stringify(ssoToken, null, 2);
23498
- return writeFile2(tokenFilepath, tokenString);
23499
- };
23500
- var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
23501
- var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
23502
- init.logger?.debug("@aws-sdk/token-providers - fromSso");
23503
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
23504
- const profileName = sharedIniFileLoader.getProfileName({
23505
- profile: init.profile ?? callerClientConfig?.profile
23506
- });
23507
- const profile = profiles[profileName];
23508
- if (!profile) {
23509
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
23510
- } else if (!profile["sso_session"]) {
23511
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
23512
- }
23513
- const ssoSessionName = profile["sso_session"];
23514
- const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
23515
- const ssoSession = ssoSessions[ssoSessionName];
23516
- if (!ssoSession) {
23517
- throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
23518
- }
23519
- for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
23520
- if (!ssoSession[ssoSessionRequiredKey]) {
23521
- throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
23522
- }
23523
- }
23524
- ssoSession["sso_start_url"];
23525
- const ssoRegion = ssoSession["sso_region"];
23526
- let ssoToken;
23527
- try {
23528
- ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName);
23529
- } catch (e5) {
23530
- throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
23531
- }
23532
- validateTokenKey("accessToken", ssoToken.accessToken);
23533
- validateTokenKey("expiresAt", ssoToken.expiresAt);
23534
- const { accessToken, expiresAt } = ssoToken;
23535
- const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
23536
- if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
23537
- return existingToken;
23538
- }
23539
- if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
23540
- validateTokenExpiry(existingToken);
23541
- return existingToken;
23542
- }
23543
- validateTokenKey("clientId", ssoToken.clientId, true);
23544
- validateTokenKey("clientSecret", ssoToken.clientSecret, true);
23545
- validateTokenKey("refreshToken", ssoToken.refreshToken, true);
23546
- try {
23547
- lastRefreshAttemptTime.setTime(Date.now());
23548
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
23549
- validateTokenKey("accessToken", newSsoOidcToken.accessToken);
23550
- validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
23551
- const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
23552
- try {
23553
- await writeSSOTokenToFile(ssoSessionName, {
23554
- ...ssoToken,
23555
- accessToken: newSsoOidcToken.accessToken,
23556
- expiresAt: newTokenExpiration.toISOString(),
23557
- refreshToken: newSsoOidcToken.refreshToken
23558
- });
23559
- } catch (error2) {
23560
- }
23561
- return {
23562
- token: newSsoOidcToken.accessToken,
23563
- expiration: newTokenExpiration
23564
- };
23565
- } catch (error2) {
23566
- validateTokenExpiry(existingToken);
23567
- return existingToken;
23568
- }
23569
- };
23570
- var fromStatic = ({ token, logger: logger2 }) => async () => {
23571
- logger2?.debug("@aws-sdk/token-providers - fromStatic");
23572
- if (!token || !token.token) {
23573
- throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
23574
- }
23575
- return token;
23576
- };
23577
- var nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => {
23578
- throw new propertyProvider.TokenProviderError("Could not load token from any providers", false);
23579
- }), (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, (token) => token.expiration !== void 0);
23580
- exports2.fromEnvSigningName = fromEnvSigningName;
23581
- exports2.fromSso = fromSso;
23582
- exports2.fromStatic = fromStatic;
23583
- exports2.nodeProvider = nodeProvider;
23584
- }
23585
- });
23586
-
23587
23481
  // node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js
23588
- var require_dist_cjs65 = __commonJS({
23482
+ var require_dist_cjs64 = __commonJS({
23589
23483
  "node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js"(exports2) {
23590
23484
  "use strict";
23591
23485
  var eventstreamSerdeUniversal = require_dist_cjs35();
@@ -26267,11 +26161,11 @@ var require_runtimeConfig = __commonJS({
26267
26161
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
26268
26162
  var credential_provider_node_1 = require_dist_cjs62();
26269
26163
  var eventstream_handler_node_1 = require_dist_cjs63();
26270
- var token_providers_1 = require_dist_cjs64();
26164
+ var token_providers_1 = require_dist_cjs56();
26271
26165
  var util_user_agent_node_1 = require_dist_cjs51();
26272
26166
  var config_resolver_1 = require_dist_cjs39();
26273
26167
  var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
26274
- var eventstream_serde_node_1 = require_dist_cjs65();
26168
+ var eventstream_serde_node_1 = require_dist_cjs64();
26275
26169
  var hash_node_1 = require_dist_cjs52();
26276
26170
  var middleware_retry_1 = require_dist_cjs47();
26277
26171
  var node_config_provider_1 = require_dist_cjs43();
@@ -26343,7 +26237,7 @@ var require_runtimeConfig = __commonJS({
26343
26237
  });
26344
26238
 
26345
26239
  // node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js
26346
- var require_dist_cjs66 = __commonJS({
26240
+ var require_dist_cjs65 = __commonJS({
26347
26241
  "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js"(exports2) {
26348
26242
  "use strict";
26349
26243
  var middlewareEventstream = require_dist_cjs3();
@@ -27188,13 +27082,13 @@ var import_client_bedrock_runtime, import_client_bedrock_runtime2, import_client
27188
27082
  var init_dist3 = __esm({
27189
27083
  "node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs"() {
27190
27084
  init_dist2();
27191
- import_client_bedrock_runtime = __toESM(require_dist_cjs66(), 1);
27085
+ import_client_bedrock_runtime = __toESM(require_dist_cjs65(), 1);
27192
27086
  init_dist();
27193
- import_client_bedrock_runtime2 = __toESM(require_dist_cjs66(), 1);
27087
+ import_client_bedrock_runtime2 = __toESM(require_dist_cjs65(), 1);
27194
27088
  init_dist();
27195
27089
  init_dist();
27196
27090
  init_dist2();
27197
- import_client_bedrock_runtime3 = __toESM(require_dist_cjs66(), 1);
27091
+ import_client_bedrock_runtime3 = __toESM(require_dist_cjs65(), 1);
27198
27092
  generateFileId = createIdGenerator({ prefix: "file", size: 16 });
27199
27093
  BedrockChatLanguageModel = class {
27200
27094
  constructor(modelId, settings, config) {
@@ -110165,7 +110059,9 @@ var init_ProbeAgent = __esm({
110165
110059
  return nativeTools;
110166
110060
  }
110167
110061
  for (const [toolName, toolImpl] of Object.entries(this.toolImplementations)) {
110168
- const { schema, description } = this._getToolSchemaAndDescription(toolName);
110062
+ const toolInfo = this._getToolSchemaAndDescription(toolName);
110063
+ if (!toolInfo) continue;
110064
+ const { schema, description } = toolInfo;
110169
110065
  if (schema && description) {
110170
110066
  nativeTools[toolName] = wrapTool(toolName, schema, description, toolImpl.execute);
110171
110067
  }