@nsshunt/stsuxvue 1.0.126 → 1.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stsuxvue.cjs CHANGED
@@ -6,7 +6,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
+ var __esmMin = (fn, res, err) => () => {
10
+ if (err) throw err[0];
11
+ try {
12
+ return fn && (res = fn(fn = 0)), res;
13
+ } catch (e) {
14
+ throw err = [e], e;
15
+ }
16
+ };
10
17
  var __commonJSMin$1 = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
18
  var __exportAll = (all, no_symbols) => {
12
19
  let target = {};
@@ -6036,7 +6043,7 @@ var import_ansi_to_html = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin
6036
6043
  return Filter;
6037
6044
  }();
6038
6045
  })))(), 1);
6039
- /*! @license DOMPurify 3.4.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.9/LICENSE */
6046
+ /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */
6040
6047
  function _arrayLikeToArray(r, a) {
6041
6048
  (null == a || a > r.length) && (a = r.length);
6042
6049
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
@@ -6077,9 +6084,17 @@ function _unsupportedIterableToArray(r, a) {
6077
6084
  return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
6078
6085
  }
6079
6086
  }
6080
- var entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf$1 = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
6081
- var freeze = Object.freeze, seal = Object.seal, create = Object.create;
6082
- var _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
6087
+ var entries = Object.entries;
6088
+ var setPrototypeOf = Object.setPrototypeOf;
6089
+ var isFrozen = Object.isFrozen;
6090
+ var getPrototypeOf$1 = Object.getPrototypeOf;
6091
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
6092
+ var freeze = Object.freeze;
6093
+ var seal = Object.seal;
6094
+ var create = Object.create;
6095
+ var _ref = typeof Reflect !== "undefined" && Reflect;
6096
+ var apply = _ref.apply;
6097
+ var construct = _ref.construct;
6083
6098
  if (!freeze) freeze = function freeze(x) {
6084
6099
  return x;
6085
6100
  };
@@ -6675,6 +6690,7 @@ var svg = freeze([
6675
6690
  "direction",
6676
6691
  "display",
6677
6692
  "divisor",
6693
+ "dominant-baseline",
6678
6694
  "dur",
6679
6695
  "edgemode",
6680
6696
  "elevation",
@@ -6802,6 +6818,7 @@ var svg = freeze([
6802
6818
  "transform-origin",
6803
6819
  "text-anchor",
6804
6820
  "text-decoration",
6821
+ "text-orientation",
6805
6822
  "text-rendering",
6806
6823
  "textlength",
6807
6824
  "type",
@@ -6904,6 +6921,10 @@ var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
6904
6921
  var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
6905
6922
  var DOCTYPE_NAME = seal(/^html$/i);
6906
6923
  var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
6924
+ var ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
6925
+ var COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
6926
+ var FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
6927
+ var SELF_CLOSING_TAG = seal(/\/>/i);
6907
6928
  var NODE_TYPE = {
6908
6929
  element: 1,
6909
6930
  attribute: 2,
@@ -6911,7 +6932,7 @@ var NODE_TYPE = {
6911
6932
  cdataSection: 4,
6912
6933
  entityReference: 5,
6913
6934
  entityNode: 6,
6914
- progressingInstruction: 7,
6935
+ processingInstruction: 7,
6915
6936
  comment: 8,
6916
6937
  document: 9,
6917
6938
  documentType: 10,
@@ -6962,10 +6983,25 @@ var _createHooksMap = function _createHooksMap() {
6962
6983
  uponSanitizeShadowNode: []
6963
6984
  };
6964
6985
  };
6986
+ /**
6987
+ * Resolve a set-valued configuration option: a fresh set built from
6988
+ * cfg[key] when it is an own array property (seeded with a clone of
6989
+ * options.base when given, case-normalized via options.transform),
6990
+ * the fallback set otherwise.
6991
+ *
6992
+ * @param cfg the cloned, prototype-free configuration object
6993
+ * @param key the configuration property to read
6994
+ * @param fallback the set to use when the option is absent or not an array
6995
+ * @param options transform and optional base set to merge into
6996
+ * @returns the resolved set
6997
+ */
6998
+ var _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {
6999
+ return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;
7000
+ };
6965
7001
  function createDOMPurify() {
6966
7002
  let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal$1();
6967
7003
  const DOMPurify = (root) => createDOMPurify(root);
6968
- DOMPurify.version = "3.4.9";
7004
+ DOMPurify.version = "3.4.12";
6969
7005
  DOMPurify.removed = [];
6970
7006
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
6971
7007
  DOMPurify.isSupported = false;
@@ -7098,6 +7134,8 @@ function createDOMPurify() {
7098
7134
  let SAFE_FOR_XML = true;
7099
7135
  let WHOLE_DOCUMENT = false;
7100
7136
  let SET_CONFIG = false;
7137
+ let SET_CONFIG_ALLOWED_TAGS = null;
7138
+ let SET_CONFIG_ALLOWED_ATTR = null;
7101
7139
  let FORCE_BODY = false;
7102
7140
  let RETURN_DOM = false;
7103
7141
  let RETURN_DOM_FRAGMENT = false;
@@ -7174,14 +7212,16 @@ function createDOMPurify() {
7174
7212
  SVG_NAMESPACE,
7175
7213
  HTML_NAMESPACE
7176
7214
  ], stringToString);
7177
- let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [
7215
+ const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([
7178
7216
  "mi",
7179
7217
  "mo",
7180
7218
  "mn",
7181
7219
  "ms",
7182
7220
  "mtext"
7183
7221
  ]);
7184
- let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
7222
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
7223
+ const DEFAULT_HTML_INTEGRATION_POINTS = freeze(["annotation-xml"]);
7224
+ let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
7185
7225
  const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [
7186
7226
  "title",
7187
7227
  "style",
@@ -7210,14 +7250,20 @@ function createDOMPurify() {
7210
7250
  cfg = clone(cfg);
7211
7251
  PARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
7212
7252
  transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
7213
- ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
7214
- ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
7215
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
7216
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
7217
- DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
7218
- FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
7219
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
7220
- FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
7253
+ ALLOWED_TAGS = _resolveSetOption(cfg, "ALLOWED_TAGS", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });
7254
+ ALLOWED_ATTR = _resolveSetOption(cfg, "ALLOWED_ATTR", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });
7255
+ ALLOWED_NAMESPACES = _resolveSetOption(cfg, "ALLOWED_NAMESPACES", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });
7256
+ URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, "ADD_URI_SAFE_ATTR", DEFAULT_URI_SAFE_ATTRIBUTES, {
7257
+ transform: transformCaseFunc,
7258
+ base: DEFAULT_URI_SAFE_ATTRIBUTES
7259
+ });
7260
+ DATA_URI_TAGS = _resolveSetOption(cfg, "ADD_DATA_URI_TAGS", DEFAULT_DATA_URI_TAGS, {
7261
+ transform: transformCaseFunc,
7262
+ base: DEFAULT_DATA_URI_TAGS
7263
+ });
7264
+ FORBID_CONTENTS = _resolveSetOption(cfg, "FORBID_CONTENTS", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });
7265
+ FORBID_TAGS = _resolveSetOption(cfg, "FORBID_TAGS", clone({}), { transform: transformCaseFunc });
7266
+ FORBID_ATTR = _resolveSetOption(cfg, "FORBID_ATTR", clone({}), { transform: transformCaseFunc });
7221
7267
  USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
7222
7268
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
7223
7269
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
@@ -7236,19 +7282,14 @@ function createDOMPurify() {
7236
7282
  IN_PLACE = cfg.IN_PLACE || false;
7237
7283
  IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
7238
7284
  NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
7239
- MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, [
7240
- "mi",
7241
- "mo",
7242
- "mn",
7243
- "ms",
7244
- "mtext"
7245
- ]);
7246
- HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
7285
+ MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
7286
+ HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
7247
7287
  const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
7248
7288
  CUSTOM_ELEMENT_HANDLING = create(null);
7249
7289
  if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
7250
7290
  if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
7251
7291
  if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
7292
+ seal(CUSTOM_ELEMENT_HANDLING);
7252
7293
  if (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;
7253
7294
  if (RETURN_DOM_FRAGMENT) RETURN_DOM = true;
7254
7295
  if (USE_PROFILES) {
@@ -7327,8 +7368,6 @@ function createDOMPurify() {
7327
7368
  if (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
7328
7369
  if (trustedTypesPolicy && typeof emptyHTML === "string") emptyHTML = _createTrustedHTML("");
7329
7370
  }
7330
- if ((hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) && ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);
7331
- if (hooks.uponSanitizeAttribute.length > 0 && ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);
7332
7371
  if (freeze) freeze(cfg);
7333
7372
  CONFIG = cfg;
7334
7373
  };
@@ -7339,6 +7378,45 @@ function createDOMPurify() {
7339
7378
  ]);
7340
7379
  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
7341
7380
  /**
7381
+ * Namespace rules for an element in the SVG namespace.
7382
+ *
7383
+ * @param tagName the element's lowercase tag name
7384
+ * @param parent the (possibly simulated) parent node
7385
+ * @param parentTagName the parent's lowercase tag name
7386
+ * @returns true if a spec-compliant parser could produce this element
7387
+ */
7388
+ const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {
7389
+ if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "svg";
7390
+ if (parent.namespaceURI === MATHML_NAMESPACE) return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
7391
+ return Boolean(ALL_SVG_TAGS[tagName]);
7392
+ };
7393
+ /**
7394
+ * Namespace rules for an element in the MathML namespace.
7395
+ *
7396
+ * @param tagName the element's lowercase tag name
7397
+ * @param parent the (possibly simulated) parent node
7398
+ * @param parentTagName the parent's lowercase tag name
7399
+ * @returns true if a spec-compliant parser could produce this element
7400
+ */
7401
+ const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {
7402
+ if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "math";
7403
+ if (parent.namespaceURI === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
7404
+ return Boolean(ALL_MATHML_TAGS[tagName]);
7405
+ };
7406
+ /**
7407
+ * Namespace rules for an element in the HTML namespace.
7408
+ *
7409
+ * @param tagName the element's lowercase tag name
7410
+ * @param parent the (possibly simulated) parent node
7411
+ * @param parentTagName the parent's lowercase tag name
7412
+ * @returns true if a spec-compliant parser could produce this element
7413
+ */
7414
+ const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {
7415
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
7416
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
7417
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
7418
+ };
7419
+ /**
7342
7420
  * @param element a DOM element whose namespace is being checked
7343
7421
  * @returns Return false if the element has a
7344
7422
  * namespace that a spec-compliant parser would never
@@ -7353,21 +7431,9 @@ function createDOMPurify() {
7353
7431
  const tagName = stringToLowerCase(element.tagName);
7354
7432
  const parentTagName = stringToLowerCase(parent.tagName);
7355
7433
  if (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;
7356
- if (element.namespaceURI === SVG_NAMESPACE) {
7357
- if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "svg";
7358
- if (parent.namespaceURI === MATHML_NAMESPACE) return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
7359
- return Boolean(ALL_SVG_TAGS[tagName]);
7360
- }
7361
- if (element.namespaceURI === MATHML_NAMESPACE) {
7362
- if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "math";
7363
- if (parent.namespaceURI === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
7364
- return Boolean(ALL_MATHML_TAGS[tagName]);
7365
- }
7366
- if (element.namespaceURI === HTML_NAMESPACE) {
7367
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
7368
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
7369
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
7370
- }
7434
+ if (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
7435
+ if (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
7436
+ if (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
7371
7437
  if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;
7372
7438
  return false;
7373
7439
  };
@@ -7402,7 +7468,8 @@ function createDOMPurify() {
7402
7468
  * @param root the in-place root to empty
7403
7469
  */
7404
7470
  const _neutralizeRoot = function _neutralizeRoot(root) {
7405
- const childNodes = getChildNodes ? getChildNodes(root) : root.childNodes;
7471
+ _neutralizeSubtree(root);
7472
+ const childNodes = getChildNodes(root);
7406
7473
  if (childNodes) {
7407
7474
  const snapshot = [];
7408
7475
  arrayForEach(childNodes, (child) => {
@@ -7414,7 +7481,7 @@ function createDOMPurify() {
7414
7481
  } catch (_) {}
7415
7482
  });
7416
7483
  }
7417
- const attributes = getAttributes ? getAttributes(root) : null;
7484
+ const attributes = getAttributes(root);
7418
7485
  if (attributes) for (let i = attributes.length - 1; i >= 0; --i) {
7419
7486
  const attribute = attributes[i];
7420
7487
  const name = attribute && attribute.name;
@@ -7460,7 +7527,7 @@ function createDOMPurify() {
7460
7527
  * @param element the element to strip
7461
7528
  */
7462
7529
  const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {
7463
- const attributes = getAttributes ? getAttributes(element) : element.attributes;
7530
+ const attributes = getAttributes(element);
7464
7531
  if (!attributes) return;
7465
7532
  for (let i = attributes.length - 1; i >= 0; --i) {
7466
7533
  const attribute = attributes[i];
@@ -7498,7 +7565,66 @@ function createDOMPurify() {
7498
7565
  while (stack.length > 0) {
7499
7566
  const node = stack.pop();
7500
7567
  if ((getNodeType ? getNodeType(node) : node.nodeType) === NODE_TYPE.element) _stripDisallowedAttributes(node);
7501
- const childNodes = getChildNodes ? getChildNodes(node) : node.childNodes;
7568
+ const childNodes = getChildNodes(node);
7569
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
7570
+ }
7571
+ };
7572
+ /**
7573
+ * _neutralizePatchLinkage
7574
+ *
7575
+ * IN_PLACE entry pre-pass (declarative-partial-updates / streaming
7576
+ * hardening, https://github.com/WICG/declarative-partial-updates).
7577
+ *
7578
+ * The main walk strips patch linkage (`for`/`patchsrc`) and removes range
7579
+ * markers (PIs / markup comments) node-by-node, in document order, AS it
7580
+ * reaches each node. On a live in-place root that leaves a window: from the
7581
+ * moment the root is connected until the walk arrives at a given node, that
7582
+ * node's linkage is live. A patch applied on connection/stream can fire as
7583
+ * a microtask during the walk and inject or teleport an unsanitized DOM
7584
+ * range into a region the iterator has already passed and will not revisit,
7585
+ * so the post-return "tree is sanitized" contract is violated. Sweep the
7586
+ * whole tree once up front and sever every linkage before the walk begins,
7587
+ * closing that window.
7588
+ *
7589
+ * This CANNOT undo a patch that already fired before sanitize ran — that is
7590
+ * the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
7591
+ * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
7592
+ * to group with the rest of the declarative-partial-updates handling and
7593
+ * stay overridable, consistent with the codebase.
7594
+ *
7595
+ * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
7596
+ * clobbered root cannot defeat the sweep of its non-clobbered descendants.
7597
+ *
7598
+ * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
7599
+ * .html Q1): this mirrors the existing policy of keeping `for` on
7600
+ * <label>/<output>. If the shipping feature can drive a patch through a
7601
+ * surviving `for`-on-label/output + `id` pair, this pre-pass and the
7602
+ * attribute check at _isBasicCustomElement's caller must additionally drop
7603
+ * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
7604
+ *
7605
+ * @param root the in-place root to sweep
7606
+ */
7607
+ const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
7608
+ if (!SAFE_FOR_XML) return;
7609
+ const stack = [root];
7610
+ while (stack.length > 0) {
7611
+ const node = stack.pop();
7612
+ const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
7613
+ if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
7614
+ try {
7615
+ remove(node);
7616
+ } catch (_) {}
7617
+ continue;
7618
+ }
7619
+ if (nodeType === NODE_TYPE.element) {
7620
+ const element = node;
7621
+ const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);
7622
+ try {
7623
+ if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
7624
+ if (element.hasAttribute && element.hasAttribute("for") && lcTag !== "label" && lcTag !== "output") element.removeAttribute("for");
7625
+ } catch (_) {}
7626
+ }
7627
+ const childNodes = getChildNodes(node);
7502
7628
  if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
7503
7629
  }
7504
7630
  };
@@ -7542,6 +7668,20 @@ function createDOMPurify() {
7542
7668
  return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
7543
7669
  };
7544
7670
  /**
7671
+ * Replace template expression syntax (mustache, ERB, template
7672
+ * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub
7673
+ * sites. Order matters: mustache, then ERB, then template literal.
7674
+ *
7675
+ * @param value the string to scrub
7676
+ * @returns the scrubbed string
7677
+ */
7678
+ const _stripTemplateExpressions = function _stripTemplateExpressions(value) {
7679
+ value = stringReplace(value, MUSTACHE_EXPR$1, " ");
7680
+ value = stringReplace(value, ERB_EXPR$1, " ");
7681
+ value = stringReplace(value, TMPLIT_EXPR$1, " ");
7682
+ return value;
7683
+ };
7684
+ /**
7545
7685
  * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the
7546
7686
  * character data of an element subtree. Used as the final safety net for
7547
7687
  * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions
@@ -7561,24 +7701,16 @@ function createDOMPurify() {
7561
7701
  * @param node The root element whose character data should be scrubbed.
7562
7702
  */
7563
7703
  const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
7564
- var _node$querySelectorAl, _node$querySelectorAl2;
7704
+ var _node$querySelectorAl;
7565
7705
  node.normalize();
7566
7706
  const walker = createNodeIterator.call(node.ownerDocument || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
7567
7707
  let currentNode = walker.nextNode();
7568
7708
  while (currentNode) {
7569
- let data = currentNode.data;
7570
- arrayForEach([
7571
- MUSTACHE_EXPR$1,
7572
- ERB_EXPR$1,
7573
- TMPLIT_EXPR$1
7574
- ], (expr) => {
7575
- data = stringReplace(data, expr, " ");
7576
- });
7577
- currentNode.data = data;
7709
+ currentNode.data = _stripTemplateExpressions(currentNode.data);
7578
7710
  currentNode = walker.nextNode();
7579
7711
  }
7580
- const templates = (_node$querySelectorAl = (_node$querySelectorAl2 = node.querySelectorAll) === null || _node$querySelectorAl2 === void 0 ? void 0 : _node$querySelectorAl2.call(node, "template")) !== null && _node$querySelectorAl !== void 0 ? _node$querySelectorAl : [];
7581
- arrayForEach(Array.from(templates), (tmpl) => {
7712
+ const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
7713
+ if (templates) arrayForEach(templates, (tmpl) => {
7582
7714
  if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
7583
7715
  });
7584
7716
  };
@@ -7639,11 +7771,65 @@ function createDOMPurify() {
7639
7771
  }
7640
7772
  };
7641
7773
  function _executeHooks(hooks, currentNode, data) {
7774
+ if (hooks.length === 0) return;
7642
7775
  arrayForEach(hooks, (hook) => {
7643
7776
  hook.call(DOMPurify, currentNode, data, CONFIG);
7644
7777
  });
7645
7778
  }
7646
7779
  /**
7780
+ * Structural-threat checks that condemn a node regardless of the
7781
+ * allowlists: mXSS via namespace confusion, risky CSS construction,
7782
+ * processing instructions, markup-bearing comments. Pure predicate;
7783
+ * the caller removes. Check order is load-bearing.
7784
+ *
7785
+ * @param currentNode the node to inspect
7786
+ * @param tagName the node's transformCaseFunc'd tag name
7787
+ * @return true if the node must be removed
7788
+ */
7789
+ const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
7790
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
7791
+ if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) return true;
7792
+ if (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;
7793
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
7794
+ return false;
7795
+ };
7796
+ /**
7797
+ * Handle a node whose tag is forbidden or not allowlisted: keep
7798
+ * allowed custom elements (false return exits _sanitizeElements
7799
+ * early - the namespace and fallback-tag removal checks are
7800
+ * intentionally skipped for kept custom elements), else hoist
7801
+ * content per KEEP_CONTENT and remove.
7802
+ *
7803
+ * A kept custom element is the ONLY case in which this function
7804
+ * returns false, so the caller uses that return value to run the
7805
+ * afterSanitizeElements hook on the kept element and keep the
7806
+ * element-hook lifecycle consistent with normal allowlisted
7807
+ * elements (GHSA-c2j3-45gr-mqc4).
7808
+ *
7809
+ * @param currentNode the disallowed node
7810
+ * @param tagName the node's transformCaseFunc'd tag name
7811
+ * @return true if the node was removed, false if kept
7812
+ */
7813
+ const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName) {
7814
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
7815
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
7816
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
7817
+ }
7818
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
7819
+ const parentNode = getParentNode(currentNode);
7820
+ const childNodes = getChildNodes(currentNode);
7821
+ if (childNodes && parentNode) {
7822
+ const childCount = childNodes.length;
7823
+ for (let i = childCount - 1; i >= 0; --i) {
7824
+ const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);
7825
+ parentNode.insertBefore(hoisted, getNextSibling(currentNode));
7826
+ }
7827
+ }
7828
+ }
7829
+ _forceRemove(currentNode);
7830
+ return true;
7831
+ };
7832
+ /**
7647
7833
  * _sanitizeElements
7648
7834
  *
7649
7835
  * @protect nodeName
@@ -7652,9 +7838,9 @@ function createDOMPurify() {
7652
7838
  * @param currentNode to check for permission to exist
7653
7839
  * @return true if node was killed, false if left alive
7654
7840
  */
7655
- const _sanitizeElements = function _sanitizeElements(currentNode) {
7656
- let content = null;
7841
+ const _sanitizeElements = function _sanitizeElements(currentNode, root) {
7657
7842
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
7843
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
7658
7844
  if (_isClobbered(currentNode)) {
7659
7845
  _forceRemove(currentNode);
7660
7846
  return true;
@@ -7664,58 +7850,26 @@ function createDOMPurify() {
7664
7850
  tagName,
7665
7851
  allowedTags: ALLOWED_TAGS
7666
7852
  });
7667
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
7668
- _forceRemove(currentNode);
7669
- return true;
7670
- }
7671
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
7672
- _forceRemove(currentNode);
7673
- return true;
7674
- }
7675
- if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
7676
- _forceRemove(currentNode);
7677
- return true;
7678
- }
7679
- if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
7853
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
7854
+ if (_isUnsafeNode(currentNode, tagName)) {
7680
7855
  _forceRemove(currentNode);
7681
7856
  return true;
7682
7857
  }
7683
7858
  if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
7684
- if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
7685
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
7686
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
7687
- }
7688
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
7689
- const parentNode = getParentNode(currentNode);
7690
- const childNodes = getChildNodes(currentNode);
7691
- if (childNodes && parentNode) {
7692
- const childCount = childNodes.length;
7693
- for (let i = childCount - 1; i >= 0; --i) {
7694
- const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);
7695
- parentNode.insertBefore(hoisted, getNextSibling(currentNode));
7696
- }
7697
- }
7698
- }
7699
- _forceRemove(currentNode);
7700
- return true;
7859
+ const removed = _sanitizeDisallowedNode(currentNode, tagName);
7860
+ if (removed === false) _executeHooks(hooks.afterSanitizeElements, currentNode, null);
7861
+ return removed;
7701
7862
  }
7702
7863
  if ((getNodeType ? getNodeType(currentNode) : currentNode.nodeType) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
7703
7864
  _forceRemove(currentNode);
7704
7865
  return true;
7705
7866
  }
7706
- if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
7867
+ if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
7707
7868
  _forceRemove(currentNode);
7708
7869
  return true;
7709
7870
  }
7710
7871
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
7711
- content = currentNode.textContent;
7712
- arrayForEach([
7713
- MUSTACHE_EXPR$1,
7714
- ERB_EXPR$1,
7715
- TMPLIT_EXPR$1
7716
- ], (expr) => {
7717
- content = stringReplace(content, expr, " ");
7718
- });
7872
+ const content = _stripTemplateExpressions(currentNode.textContent);
7719
7873
  if (currentNode.textContent !== content) {
7720
7874
  arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
7721
7875
  currentNode.textContent = content;
@@ -7734,11 +7888,13 @@ function createDOMPurify() {
7734
7888
  */
7735
7889
  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
7736
7890
  if (FORBID_ATTR[lcName]) return false;
7891
+ if (SAFE_FOR_XML && lcName === "patchsrc") return false;
7892
+ if (SAFE_FOR_XML && lcName === "for" && lcTag !== "label" && lcTag !== "output") return false;
7737
7893
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
7738
7894
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
7739
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName));
7895
+ if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName));
7740
7896
  else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName));
7741
- else if (!nameIsPermitted || FORBID_ATTR[lcName]) if (_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value)));
7897
+ else if (!nameIsPermitted) if (_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value)));
7742
7898
  else return false;
7743
7899
  else if (URI_SAFE_ATTRIBUTES[lcName]);
7744
7900
  else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, "")));
@@ -7769,6 +7925,48 @@ function createDOMPurify() {
7769
7925
  return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
7770
7926
  };
7771
7927
  /**
7928
+ * Wrap an attribute value in the matching Trusted Types object when
7929
+ * the active policy requires it. Namespaced attributes pass through
7930
+ * unchanged (no TT support yet, see
7931
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).
7932
+ *
7933
+ * @param lcTag lowercase tag name of the containing element
7934
+ * @param lcName lowercase attribute name
7935
+ * @param namespaceURI the attribute's namespace, if any
7936
+ * @param value the attribute value to wrap
7937
+ * @return the value, wrapped when Trusted Types demand it
7938
+ */
7939
+ const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {
7940
+ if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {
7941
+ case "TrustedHTML": return _createTrustedHTML(value);
7942
+ case "TrustedScriptURL": return _createTrustedScriptURL(value);
7943
+ }
7944
+ return value;
7945
+ };
7946
+ /**
7947
+ * Write a modified attribute value back onto the element. On
7948
+ * success, re-probe for clobbering introduced by the new value and
7949
+ * remove the element when found; otherwise pop the removal entry
7950
+ * recorded by the earlier _removeAttribute (long-standing pairing
7951
+ * with the SANITIZE_NAMED_PROPS path - do not "fix" casually). On
7952
+ * failure, remove the attribute instead.
7953
+ *
7954
+ * @param currentNode the element carrying the attribute
7955
+ * @param name the attribute name as present on the element
7956
+ * @param namespaceURI the attribute's namespace, if any
7957
+ * @param value the new attribute value
7958
+ */
7959
+ const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {
7960
+ try {
7961
+ if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
7962
+ else currentNode.setAttribute(name, value);
7963
+ if (_isClobbered(currentNode)) _forceRemove(currentNode);
7964
+ else arrayPop(DOMPurify.removed);
7965
+ } catch (_) {
7966
+ _removeAttribute(name, currentNode);
7967
+ }
7968
+ };
7969
+ /**
7772
7970
  * _sanitizeAttributes
7773
7971
  *
7774
7972
  * @protect attributes
@@ -7790,6 +7988,7 @@ function createDOMPurify() {
7790
7988
  forceKeepAttr: void 0
7791
7989
  };
7792
7990
  let l = attributes.length;
7991
+ const lcTag = transformCaseFunc(currentNode.nodeName);
7793
7992
  while (l--) {
7794
7993
  const attr = attributes[l];
7795
7994
  const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
@@ -7819,39 +8018,17 @@ function createDOMPurify() {
7819
8018
  _removeAttribute(name, currentNode);
7820
8019
  continue;
7821
8020
  }
7822
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
8021
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
7823
8022
  _removeAttribute(name, currentNode);
7824
8023
  continue;
7825
8024
  }
7826
- if (SAFE_FOR_TEMPLATES) arrayForEach([
7827
- MUSTACHE_EXPR$1,
7828
- ERB_EXPR$1,
7829
- TMPLIT_EXPR$1
7830
- ], (expr) => {
7831
- value = stringReplace(value, expr, " ");
7832
- });
7833
- const lcTag = transformCaseFunc(currentNode.nodeName);
8025
+ if (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);
7834
8026
  if (!_isValidAttribute(lcTag, lcName, value)) {
7835
8027
  _removeAttribute(name, currentNode);
7836
8028
  continue;
7837
8029
  }
7838
- if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") if (namespaceURI);
7839
- else switch (trustedTypes.getAttributeType(lcTag, lcName)) {
7840
- case "TrustedHTML":
7841
- value = _createTrustedHTML(value);
7842
- break;
7843
- case "TrustedScriptURL":
7844
- value = _createTrustedScriptURL(value);
7845
- break;
7846
- }
7847
- if (value !== initValue) try {
7848
- if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
7849
- else currentNode.setAttribute(name, value);
7850
- if (_isClobbered(currentNode)) _forceRemove(currentNode);
7851
- else arrayPop(DOMPurify.removed);
7852
- } catch (_) {
7853
- _removeAttribute(name, currentNode);
7854
- }
8030
+ value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
8031
+ if (value !== initValue) _setAttributeValue(currentNode, name, namespaceURI, value);
7855
8032
  }
7856
8033
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
7857
8034
  };
@@ -7866,11 +8043,11 @@ function createDOMPurify() {
7866
8043
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
7867
8044
  while (shadowNode = shadowIterator.nextNode()) {
7868
8045
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
7869
- _sanitizeElements(shadowNode);
8046
+ _sanitizeElements(shadowNode, fragment);
7870
8047
  _sanitizeAttributes(shadowNode);
7871
8048
  if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
7872
8049
  if ((getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType) === NODE_TYPE.element) {
7873
- const innerSr = getShadowRoot ? getShadowRoot(shadowNode) : shadowNode.shadowRoot;
8050
+ const innerSr = getShadowRoot(shadowNode);
7874
8051
  if (_isDocumentFragment(innerSr)) {
7875
8052
  _sanitizeAttachedShadowRoots(innerSr);
7876
8053
  _sanitizeShadowDOM2(innerSr);
@@ -7911,7 +8088,7 @@ function createDOMPurify() {
7911
8088
  }
7912
8089
  const node = item.node;
7913
8090
  const isElement = (getNodeType ? getNodeType(node) : node.nodeType) === NODE_TYPE.element;
7914
- const childNodes = getChildNodes ? getChildNodes(node) : node.childNodes;
8091
+ const childNodes = getChildNodes(node);
7915
8092
  if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({
7916
8093
  node: childNodes[i],
7917
8094
  shadow: null
@@ -7927,7 +8104,7 @@ function createDOMPurify() {
7927
8104
  }
7928
8105
  }
7929
8106
  if (isElement) {
7930
- const sr = getShadowRoot ? getShadowRoot(node) : node.shadowRoot;
8107
+ const sr = getShadowRoot(node);
7931
8108
  if (_isDocumentFragment(sr)) stack.push({
7932
8109
  node: null,
7933
8110
  shadow: sr
@@ -7951,16 +8128,28 @@ function createDOMPurify() {
7951
8128
  if (typeof dirty !== "string") throw typeErrorCreate("dirty is not a string, aborting");
7952
8129
  }
7953
8130
  if (!DOMPurify.isSupported) return dirty;
7954
- if (!SET_CONFIG) _parseConfig(cfg);
8131
+ if (SET_CONFIG) {
8132
+ ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
8133
+ ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
8134
+ } else _parseConfig(cfg);
8135
+ if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);
8136
+ if (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);
7955
8137
  DOMPurify.removed = [];
7956
8138
  const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
7957
8139
  if (inPlace) {
8140
+ _neutralizePatchLinkage(dirty);
7958
8141
  const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
7959
8142
  if (typeof nn === "string") {
7960
8143
  const tagName = transformCaseFunc(nn);
7961
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
8144
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
8145
+ _neutralizeRoot(dirty);
8146
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
8147
+ }
8148
+ }
8149
+ if (_isClobbered(dirty)) {
8150
+ _neutralizeRoot(dirty);
8151
+ throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
7962
8152
  }
7963
- if (_isClobbered(dirty)) throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
7964
8153
  try {
7965
8154
  _sanitizeAttachedShadowRoots(dirty);
7966
8155
  } catch (error) {
@@ -7980,15 +8169,21 @@ function createDOMPurify() {
7980
8169
  if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
7981
8170
  }
7982
8171
  if (body && FORCE_BODY) _forceRemove(body.firstChild);
7983
- const nodeIterator = _createNodeIterator(inPlace ? dirty : body);
8172
+ const walkRoot = inPlace ? dirty : body;
8173
+ const nodeIterator = _createNodeIterator(walkRoot);
7984
8174
  try {
7985
8175
  while (currentNode = nodeIterator.nextNode()) {
7986
- _sanitizeElements(currentNode);
8176
+ _sanitizeElements(currentNode, walkRoot);
7987
8177
  _sanitizeAttributes(currentNode);
7988
8178
  if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
7989
8179
  }
7990
8180
  } catch (error) {
7991
- if (inPlace) _neutralizeRoot(dirty);
8181
+ if (inPlace) {
8182
+ _neutralizeRoot(dirty);
8183
+ arrayForEach(DOMPurify.removed, (entry) => {
8184
+ if (entry.element) _neutralizeSubtree(entry.element);
8185
+ });
8186
+ }
7992
8187
  throw error;
7993
8188
  }
7994
8189
  if (inPlace) {
@@ -8009,34 +8204,37 @@ function createDOMPurify() {
8009
8204
  }
8010
8205
  let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
8011
8206
  if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
8012
- if (SAFE_FOR_TEMPLATES) arrayForEach([
8013
- MUSTACHE_EXPR$1,
8014
- ERB_EXPR$1,
8015
- TMPLIT_EXPR$1
8016
- ], (expr) => {
8017
- serializedHTML = stringReplace(serializedHTML, expr, " ");
8018
- });
8207
+ if (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);
8019
8208
  return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;
8020
8209
  };
8021
8210
  DOMPurify.setConfig = function() {
8022
- _parseConfig(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {});
8211
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
8212
+ _parseConfig(cfg);
8023
8213
  SET_CONFIG = true;
8214
+ SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
8215
+ SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
8024
8216
  };
8025
8217
  DOMPurify.clearConfig = function() {
8026
8218
  CONFIG = null;
8027
8219
  SET_CONFIG = false;
8220
+ SET_CONFIG_ALLOWED_TAGS = null;
8221
+ SET_CONFIG_ALLOWED_ATTR = null;
8028
8222
  trustedTypesPolicy = defaultTrustedTypesPolicy;
8029
8223
  emptyHTML = "";
8030
8224
  };
8031
8225
  DOMPurify.isValidAttribute = function(tag, attr, value) {
8032
8226
  if (!CONFIG) _parseConfig({});
8033
- return _isValidAttribute(transformCaseFunc(tag), transformCaseFunc(attr), value);
8227
+ const lcTag = transformCaseFunc(tag);
8228
+ const lcName = transformCaseFunc(attr);
8229
+ return _isValidAttribute(lcTag, lcName, value);
8034
8230
  };
8035
8231
  DOMPurify.addHook = function(entryPoint, hookFunction) {
8036
8232
  if (typeof hookFunction !== "function") return;
8233
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
8037
8234
  arrayPush(hooks[entryPoint], hookFunction);
8038
8235
  };
8039
8236
  DOMPurify.removeHook = function(entryPoint, hookFunction) {
8237
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
8040
8238
  if (hookFunction !== void 0) {
8041
8239
  const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
8042
8240
  return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
@@ -8044,6 +8242,7 @@ function createDOMPurify() {
8044
8242
  return arrayPop(hooks[entryPoint]);
8045
8243
  };
8046
8244
  DOMPurify.removeHooks = function(entryPoint) {
8245
+ if (!objectHasOwnProperty(hooks, entryPoint)) return;
8047
8246
  hooks[entryPoint] = [];
8048
8247
  };
8049
8248
  DOMPurify.removeAllHooks = function() {
@@ -9877,6 +10076,42 @@ function bind(fn, thisArg) {
9877
10076
  var { toString } = Object.prototype;
9878
10077
  var { getPrototypeOf } = Object;
9879
10078
  var { iterator, toStringTag } = Symbol;
10079
+ var hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
10080
+ /**
10081
+ * Walk the prototype chain (excluding the shared Object.prototype) looking for
10082
+ * an own `prop`. This distinguishes genuine own/inherited members — including
10083
+ * class accessors and template prototypes — from members injected via
10084
+ * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
10085
+ * live on Object.prototype itself and are therefore never matched.
10086
+ *
10087
+ * @param {*} thing The value whose chain to inspect
10088
+ * @param {string|symbol} prop The property key to look for
10089
+ *
10090
+ * @returns {boolean} True when `prop` is owned below Object.prototype
10091
+ */
10092
+ var hasOwnInPrototypeChain = (thing, prop) => {
10093
+ let obj = thing;
10094
+ const seen = [];
10095
+ while (obj != null && obj !== Object.prototype) {
10096
+ if (seen.indexOf(obj) !== -1) return false;
10097
+ seen.push(obj);
10098
+ if (hasOwnProperty(obj, prop)) return true;
10099
+ obj = getPrototypeOf(obj);
10100
+ }
10101
+ return false;
10102
+ };
10103
+ /**
10104
+ * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
10105
+ * properties and members inherited from a non-Object.prototype source (a class
10106
+ * instance or template object) are honored; a value reachable only through a
10107
+ * polluted Object.prototype is ignored and `undefined` is returned.
10108
+ *
10109
+ * @param {*} obj The source object
10110
+ * @param {string|symbol} prop The property key to read
10111
+ *
10112
+ * @returns {*} The resolved value, or undefined when unsafe/absent
10113
+ */
10114
+ var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
9880
10115
  var kindOf = ((cache) => (thing) => {
9881
10116
  const str = toString.call(thing);
9882
10117
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -9979,9 +10214,9 @@ var isBoolean = (thing) => thing === true || thing === false;
9979
10214
  * @returns {boolean} True if value is a plain Object, otherwise false
9980
10215
  */
9981
10216
  var isPlainObject = (val) => {
9982
- if (kindOf(val) !== "object") return false;
10217
+ if (!isObject(val)) return false;
9983
10218
  const prototype = getPrototypeOf(val);
9984
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
10219
+ return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
9985
10220
  };
9986
10221
  /**
9987
10222
  * Determine if a value is an empty object (safely handles Buffers)
@@ -10387,7 +10622,6 @@ var toCamelCase = (str) => {
10387
10622
  return p1.toUpperCase() + p2;
10388
10623
  });
10389
10624
  };
10390
- var hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
10391
10625
  var { propertyIsEnumerable } = Object.prototype;
10392
10626
  /**
10393
10627
  * Determine if a value is a RegExp object
@@ -10530,6 +10764,18 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
10530
10764
  */
10531
10765
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
10532
10766
  var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
10767
+ /**
10768
+ * Determine if a value is iterable via an iterator that is NOT sourced solely
10769
+ * from a polluted Object.prototype. Use this instead of `isIterable` whenever
10770
+ * the iterable comes from untrusted input (e.g. user-supplied header sources),
10771
+ * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
10772
+ * into an attacker-controlled entries iterator.
10773
+ *
10774
+ * @param {*} thing The value to test
10775
+ *
10776
+ * @returns {boolean} True if value has a non-polluted iterator
10777
+ */
10778
+ var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
10533
10779
  var utils_default = {
10534
10780
  isArray,
10535
10781
  isArrayBuffer,
@@ -10574,6 +10820,8 @@ var utils_default = {
10574
10820
  isHTMLForm,
10575
10821
  hasOwnProperty,
10576
10822
  hasOwnProp: hasOwnProperty,
10823
+ hasOwnInPrototypeChain,
10824
+ getSafeProp,
10577
10825
  reduceDescriptors,
10578
10826
  freezeMethods,
10579
10827
  toObjectSet,
@@ -10589,7 +10837,8 @@ var utils_default = {
10589
10837
  isThenable,
10590
10838
  setImmediate: _setImmediate,
10591
10839
  asap,
10592
- isIterable
10840
+ isIterable,
10841
+ isSafeIterable
10593
10842
  };
10594
10843
  //#endregion
10595
10844
  //#region node_modules/axios/lib/helpers/parseHeaders.js
@@ -10735,11 +10984,15 @@ var AxiosHeaders = class {
10735
10984
  const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
10736
10985
  if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
10737
10986
  else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite);
10738
- else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
10739
- let obj = {}, dest, key;
10987
+ else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
10988
+ let obj = Object.create(null), dest, key;
10740
10989
  for (const entry of header) {
10741
10990
  if (!utils_default.isArray(entry)) throw new TypeError("Object iterator must return a key-value pair");
10742
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
10991
+ key = entry[0];
10992
+ if (utils_default.hasOwnProp(obj, key)) {
10993
+ dest = obj[key];
10994
+ obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
10995
+ } else obj[key] = entry[1];
10743
10996
  }
10744
10997
  setHeaders(obj, valueOrRewrite);
10745
10998
  } else header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -10923,7 +11176,13 @@ function redactConfig(config, redactKeys) {
10923
11176
  var AxiosError = class AxiosError extends Error {
10924
11177
  static from(error, code, config, request, response, customProps) {
10925
11178
  const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
10926
- axiosError.cause = error;
11179
+ Object.defineProperty(axiosError, "cause", {
11180
+ __proto__: null,
11181
+ value: error,
11182
+ writable: true,
11183
+ enumerable: false,
11184
+ configurable: true
11185
+ });
10927
11186
  axiosError.name = error.name;
10928
11187
  if (error.status != null && axiosError.status == null) axiosError.status = error.status;
10929
11188
  customProps && Object.assign(axiosError, customProps);
@@ -10992,8 +11251,6 @@ AxiosError.ERR_CANCELED = "ERR_CANCELED";
10992
11251
  AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
10993
11252
  AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
10994
11253
  AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
10995
- //#endregion
10996
- //#region node_modules/axios/lib/helpers/toFormData.js
10997
11254
  /**
10998
11255
  * Determines if the given thing is a array or js object.
10999
11256
  *
@@ -11082,15 +11339,34 @@ function toFormData(obj, formData, options) {
11082
11339
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
11083
11340
  const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
11084
11341
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
11342
+ const stack = [];
11085
11343
  if (!utils_default.isFunction(visitor)) throw new TypeError("visitor must be a function");
11086
11344
  function convertValue(value) {
11087
11345
  if (value === null) return "";
11088
11346
  if (utils_default.isDate(value)) return value.toISOString();
11089
11347
  if (utils_default.isBoolean(value)) return value.toString();
11090
11348
  if (!useBlob && utils_default.isBlob(value)) throw new AxiosError("Blob is not supported. Use a Buffer instead.");
11091
- if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
11349
+ if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
11350
+ if (useBlob && typeof _Blob === "function") return new _Blob([value]);
11351
+ if (typeof Buffer !== "undefined") return Buffer.from(value);
11352
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
11353
+ }
11092
11354
  return value;
11093
11355
  }
11356
+ function throwIfMaxDepthExceeded(depth) {
11357
+ if (depth > maxDepth) throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
11358
+ }
11359
+ function stringifyWithDepthLimit(value, depth) {
11360
+ if (maxDepth === Infinity) return JSON.stringify(value);
11361
+ const ancestors = [];
11362
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
11363
+ if (!utils_default.isObject(currentValue)) return currentValue;
11364
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) ancestors.pop();
11365
+ ancestors.push(currentValue);
11366
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
11367
+ return currentValue;
11368
+ });
11369
+ }
11094
11370
  /**
11095
11371
  * Default visitor.
11096
11372
  *
@@ -11110,7 +11386,7 @@ function toFormData(obj, formData, options) {
11110
11386
  if (value && !path && typeof value === "object") {
11111
11387
  if (utils_default.endsWith(key, "{}")) {
11112
11388
  key = metaTokens ? key : key.slice(0, -2);
11113
- value = JSON.stringify(value);
11389
+ value = stringifyWithDepthLimit(value, 1);
11114
11390
  } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
11115
11391
  key = removeBrackets(key);
11116
11392
  arr.forEach(function each(el, index) {
@@ -11123,7 +11399,6 @@ function toFormData(obj, formData, options) {
11123
11399
  formData.append(renderKey(path, key, dots), convertValue(value));
11124
11400
  return false;
11125
11401
  }
11126
- const stack = [];
11127
11402
  const exposedHelpers = Object.assign(predicates, {
11128
11403
  defaultVisitor,
11129
11404
  convertValue,
@@ -11131,7 +11406,7 @@ function toFormData(obj, formData, options) {
11131
11406
  });
11132
11407
  function build(value, path, depth = 0) {
11133
11408
  if (utils_default.isUndefined(value)) return;
11134
- if (depth > maxDepth) throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
11409
+ throwIfMaxDepthExceeded(depth);
11135
11410
  if (stack.indexOf(value) !== -1) throw new Error("Circular reference detected in " + path.join("."));
11136
11411
  stack.push(value);
11137
11412
  utils_default.forEach(value, function each(el, key) {
@@ -11183,9 +11458,7 @@ prototype.append = function append(name, value) {
11183
11458
  this._pairs.push([name, value]);
11184
11459
  };
11185
11460
  prototype.toString = function toString(encoder) {
11186
- const _encode = encoder ? function(value) {
11187
- return encoder.call(this, value, encode$1);
11188
- } : encode$1;
11461
+ const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
11189
11462
  return this._pairs.map(function each(pair) {
11190
11463
  return _encode(pair[0]) + "=" + _encode(pair[1]);
11191
11464
  }, "").join("&");
@@ -11214,9 +11487,10 @@ function encode(val) {
11214
11487
  */
11215
11488
  function buildURL(url, params, options) {
11216
11489
  if (!params) return url;
11217
- const _encode = options && options.encode || encode;
11490
+ url = url || "";
11218
11491
  const _options = utils_default.isFunction(options) ? { serialize: options } : options;
11219
- const serializeFn = _options && _options.serialize;
11492
+ const _encode = utils_default.getSafeProp(_options, "encode") || encode;
11493
+ const serializeFn = utils_default.getSafeProp(_options, "serialize");
11220
11494
  let serializedParams;
11221
11495
  if (serializeFn) serializedParams = serializeFn(params, _options);
11222
11496
  else serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
@@ -11292,7 +11566,8 @@ var transitional_default = {
11292
11566
  forcedJSONParsing: true,
11293
11567
  clarifyTimeoutError: false,
11294
11568
  legacyInterceptorReqResOrdering: true,
11295
- advertiseZstdAcceptEncoding: false
11569
+ advertiseZstdAcceptEncoding: false,
11570
+ validateStatusUndefinedResolves: true
11296
11571
  };
11297
11572
  //#endregion
11298
11573
  //#region node_modules/axios/lib/platform/browser/index.js
@@ -11380,6 +11655,10 @@ function toURLEncodedForm(data, options) {
11380
11655
  }
11381
11656
  //#endregion
11382
11657
  //#region node_modules/axios/lib/helpers/formDataToJSON.js
11658
+ var MAX_DEPTH = 100;
11659
+ function throwIfDepthExceeded(index) {
11660
+ if (index > MAX_DEPTH) throw new AxiosError("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
11661
+ }
11383
11662
  /**
11384
11663
  * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
11385
11664
  *
@@ -11388,9 +11667,14 @@ function toURLEncodedForm(data, options) {
11388
11667
  * @returns An array of strings.
11389
11668
  */
11390
11669
  function parsePropPath(name) {
11391
- return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
11392
- return match[0] === "[]" ? "" : match[1] || match[0];
11393
- });
11670
+ const path = [];
11671
+ const pattern = /\w+|\[(\w*)]/g;
11672
+ let match;
11673
+ while ((match = pattern.exec(name)) !== null) {
11674
+ throwIfDepthExceeded(path.length);
11675
+ path.push(match[0] === "[]" ? "" : match[1] || match[0]);
11676
+ }
11677
+ return path;
11394
11678
  }
11395
11679
  /**
11396
11680
  * Convert an array to an object.
@@ -11420,6 +11704,7 @@ function arrayToObject(arr) {
11420
11704
  */
11421
11705
  function formDataToJSON(formData) {
11422
11706
  function buildPath(path, value, target, index) {
11707
+ throwIfDepthExceeded(index);
11423
11708
  let name = path[index++];
11424
11709
  if (name === "__proto__") return true;
11425
11710
  const isNumericKey = Number.isFinite(+name);
@@ -11749,7 +12034,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
11749
12034
  for (let i = 0; i < cookies.length; i++) {
11750
12035
  const cookie = cookies[i].replace(/^\s+/, "");
11751
12036
  const eq = cookie.indexOf("=");
11752
- if (eq !== -1 && cookie.slice(0, eq) === name) return decodeURIComponent(cookie.slice(eq + 1));
12037
+ if (eq !== -1 && cookie.slice(0, eq) === name) try {
12038
+ return decodeURIComponent(cookie.slice(eq + 1));
12039
+ } catch (e) {
12040
+ return cookie.slice(eq + 1);
12041
+ }
11753
12042
  }
11754
12043
  return null;
11755
12044
  },
@@ -11791,6 +12080,19 @@ function combineURLs(baseURL, relativeURL) {
11791
12080
  }
11792
12081
  //#endregion
11793
12082
  //#region node_modules/axios/lib/core/buildFullPath.js
12083
+ var malformedHttpProtocol = /^https?:(?!\/\/)/i;
12084
+ var httpProtocolControlCharacters = /[\t\n\r]/g;
12085
+ function stripLeadingC0ControlOrSpace(url) {
12086
+ let i = 0;
12087
+ while (i < url.length && url.charCodeAt(i) <= 32) i++;
12088
+ return url.slice(i);
12089
+ }
12090
+ function normalizeURLForProtocolCheck(url) {
12091
+ return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, "");
12092
+ }
12093
+ function assertValidHttpProtocolURL(url, config) {
12094
+ if (typeof url === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) throw new AxiosError("Invalid URL: missing \"//\" after protocol", AxiosError.ERR_INVALID_URL, config);
12095
+ }
11794
12096
  /**
11795
12097
  * Creates a new URL by combining the baseURL with the requestedURL,
11796
12098
  * only when the requestedURL is not already an absolute URL.
@@ -11801,9 +12103,13 @@ function combineURLs(baseURL, relativeURL) {
11801
12103
  *
11802
12104
  * @returns {string} The combined full path
11803
12105
  */
11804
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
12106
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
12107
+ assertValidHttpProtocolURL(requestedURL, config);
11805
12108
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
11806
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) return combineURLs(baseURL, requestedURL);
12109
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
12110
+ assertValidHttpProtocolURL(baseURL, config);
12111
+ return combineURLs(baseURL, requestedURL);
12112
+ }
11807
12113
  return requestedURL;
11808
12114
  }
11809
12115
  //#endregion
@@ -11819,6 +12125,7 @@ var headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } :
11819
12125
  * @returns {Object} New object resulting from merging config2 to config1
11820
12126
  */
11821
12127
  function mergeConfig(config1, config2) {
12128
+ config1 = config1 || {};
11822
12129
  config2 = config2 || {};
11823
12130
  const config = Object.create(null);
11824
12131
  Object.defineProperty(config, "hasOwnProperty", {
@@ -11845,6 +12152,14 @@ function mergeConfig(config1, config2) {
11845
12152
  if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
11846
12153
  else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a);
11847
12154
  }
12155
+ function getMergedTransitionalOption(prop) {
12156
+ const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
12157
+ if (!utils_default.isUndefined(transitional2)) if (utils_default.isPlainObject(transitional2)) {
12158
+ if (utils_default.hasOwnProp(transitional2, prop)) return transitional2[prop];
12159
+ } else return;
12160
+ const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
12161
+ if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) return transitional1[prop];
12162
+ }
11848
12163
  function mergeDirectKeys(a, b, prop) {
11849
12164
  if (utils_default.hasOwnProp(config2, prop)) return getMergedValue(a, b);
11850
12165
  else if (utils_default.hasOwnProp(config1, prop)) return getMergedValue(void 0, a);
@@ -11890,6 +12205,8 @@ function mergeConfig(config1, config2) {
11890
12205
  const configValue = merge(utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0, utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0, prop);
11891
12206
  utils_default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
11892
12207
  });
12208
+ if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) if (utils_default.hasOwnProp(config1, "validateStatus")) config.validateStatus = getMergedValue(void 0, config1.validateStatus);
12209
+ else delete config.validateStatus;
11893
12210
  return config;
11894
12211
  }
11895
12212
  //#endregion
@@ -11900,7 +12217,7 @@ function setFormDataHeaders(headers, formHeaders, policy) {
11900
12217
  headers.set(formHeaders);
11901
12218
  return;
11902
12219
  }
11903
- Object.entries(formHeaders).forEach(([key, val]) => {
12220
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
11904
12221
  if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) headers.set(key, val);
11905
12222
  });
11906
12223
  }
@@ -11926,8 +12243,16 @@ function resolveConfig(config) {
11926
12243
  const allowAbsoluteUrls = own("allowAbsoluteUrls");
11927
12244
  const url = own("url");
11928
12245
  newConfig.headers = headers = AxiosHeaders.from(headers);
11929
- newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), own("params"), own("paramsSerializer"));
11930
- if (auth) headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8$1(auth.password) : "")));
12246
+ newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own("params"), own("paramsSerializer"));
12247
+ if (auth) {
12248
+ const username = utils_default.getSafeProp(auth, "username") || "";
12249
+ const password = utils_default.getSafeProp(auth, "password") || "";
12250
+ try {
12251
+ headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
12252
+ } catch (e) {
12253
+ throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
12254
+ }
12255
+ }
11931
12256
  if (utils_default.isFormData(data)) {
11932
12257
  if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) headers.setContentType(void 0);
11933
12258
  else if (utils_default.isFunction(data.getHeaders)) setFormDataHeaders(headers, data.getHeaders(), own("formDataHeaderPolicy"));
@@ -12034,6 +12359,7 @@ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
12034
12359
  const protocol = parseProtocol(_config.url);
12035
12360
  if (protocol && !platform_default.protocols.includes(protocol)) {
12036
12361
  reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
12362
+ done();
12037
12363
  return;
12038
12364
  }
12039
12365
  request.send(requestData || null);
@@ -12067,7 +12393,7 @@ var composeSignals = (signals, timeout) => {
12067
12393
  });
12068
12394
  signals = null;
12069
12395
  };
12070
- signals.forEach((signal) => signal.addEventListener("abort", onabort));
12396
+ signals.forEach((signal) => signal.addEventListener("abort", onabort, { once: true }));
12071
12397
  const { signal } = controller;
12072
12398
  signal.unsubscribe = () => utils_default.asap(unsubscribe);
12073
12399
  return signal;
@@ -12146,11 +12472,13 @@ var trackStream = (stream, chunkSize, onProgress, onFinish) => {
12146
12472
  * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
12147
12473
  * - For base64: compute exact decoded size using length and padding;
12148
12474
  * handle %XX at the character-count level (no string allocation).
12149
- * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
12475
+ * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
12150
12476
  *
12151
12477
  * @param {string} url
12152
12478
  * @returns {number}
12153
12479
  */
12480
+ var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
12481
+ var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
12154
12482
  function estimateDataURLDecodedBytes(url) {
12155
12483
  if (!url || typeof url !== "string") return 0;
12156
12484
  if (!url.startsWith("data:")) return 0;
@@ -12164,7 +12492,7 @@ function estimateDataURLDecodedBytes(url) {
12164
12492
  for (let i = 0; i < len; i++) if (body.charCodeAt(i) === 37 && i + 2 < len) {
12165
12493
  const a = body.charCodeAt(i + 1);
12166
12494
  const b = body.charCodeAt(i + 2);
12167
- if ((a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102)) {
12495
+ if (isHexDigit(a) && isHexDigit(b)) {
12168
12496
  effectiveLen -= 2;
12169
12497
  i += 2;
12170
12498
  }
@@ -12188,11 +12516,13 @@ function estimateDataURLDecodedBytes(url) {
12188
12516
  const bytes = Math.floor(effectiveLen / 4) * 3 - (pad || 0);
12189
12517
  return bytes > 0 ? bytes : 0;
12190
12518
  }
12191
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") return Buffer.byteLength(body, "utf8");
12192
12519
  let bytes = 0;
12193
12520
  for (let i = 0, len = body.length; i < len; i++) {
12194
12521
  const c = body.charCodeAt(i);
12195
- if (c < 128) bytes += 1;
12522
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
12523
+ bytes += 1;
12524
+ i += 2;
12525
+ } else if (c < 128) bytes += 1;
12196
12526
  else if (c < 2048) bytes += 2;
12197
12527
  else if (c >= 55296 && c <= 56319 && i + 1 < len) {
12198
12528
  const next = body.charCodeAt(i + 1);
@@ -12206,7 +12536,7 @@ function estimateDataURLDecodedBytes(url) {
12206
12536
  }
12207
12537
  //#endregion
12208
12538
  //#region node_modules/axios/lib/env/data.js
12209
- var VERSION = "1.17.0";
12539
+ var VERSION = "1.18.1";
12210
12540
  //#endregion
12211
12541
  //#region node_modules/axios/lib/adapters/fetch.js
12212
12542
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
@@ -12314,12 +12644,14 @@ var factory = (env) => {
12314
12644
  composedSignal.unsubscribe();
12315
12645
  });
12316
12646
  let requestContentLength;
12647
+ let pendingBodyError = null;
12648
+ const maxBodyLengthError = () => new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
12317
12649
  try {
12318
12650
  let auth = void 0;
12319
12651
  const configAuth = own("auth");
12320
12652
  if (configAuth) auth = {
12321
- username: configAuth.username || "",
12322
- password: configAuth.password || ""
12653
+ username: utils_default.getSafeProp(configAuth, "username") || "",
12654
+ password: utils_default.getSafeProp(configAuth, "password") || ""
12323
12655
  };
12324
12656
  if (maybeWithAuthCredentials(url)) {
12325
12657
  const parsedURL = new URL(url, platform_default.origin);
@@ -12341,22 +12673,34 @@ var factory = (env) => {
12341
12673
  if (estimateDataURLDecodedBytes(url) > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
12342
12674
  }
12343
12675
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
12344
- const outboundLength = await resolveBodyLength(headers, data);
12345
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
12346
- }
12347
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
12348
- let _request = new Request(url, {
12349
- method: "POST",
12350
- body: data,
12351
- duplex: "half"
12352
- });
12353
- let contentTypeHeader;
12354
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
12355
- if (_request.body) {
12356
- const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
12357
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
12676
+ const outboundLength = await getBodyLength(data);
12677
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
12678
+ requestContentLength = outboundLength;
12679
+ if (outboundLength > maxBodyLength) throw maxBodyLengthError();
12358
12680
  }
12359
12681
  }
12682
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
12683
+ const trackRequestStream = (stream, onProgress, flush) => trackStream(stream, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
12684
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) throw pendingBodyError = maxBodyLengthError();
12685
+ onProgress && onProgress(loadedBytes);
12686
+ }, flush);
12687
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
12688
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
12689
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
12690
+ let _request = new Request(url, {
12691
+ method: "POST",
12692
+ body: data,
12693
+ duplex: "half"
12694
+ });
12695
+ let contentTypeHeader;
12696
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
12697
+ if (_request.body) {
12698
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
12699
+ data = trackRequestStream(_request.body, onProgress, flush);
12700
+ }
12701
+ }
12702
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") data = trackRequestStream(data);
12703
+ else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") throw new AxiosError("Stream request bodies are not supported by the current fetch implementation", AxiosError.ERR_NOT_SUPPORT, config, request);
12360
12704
  if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
12361
12705
  const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
12362
12706
  if (utils_default.isFormData(data)) {
@@ -12375,8 +12719,9 @@ var factory = (env) => {
12375
12719
  };
12376
12720
  request = isRequestSupported && new Request(url, resolvedOptions);
12377
12721
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
12722
+ const responseHeaders = AxiosHeaders.from(response.headers);
12378
12723
  if (hasMaxContentLength) {
12379
- const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
12724
+ const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
12380
12725
  if (declaredLength != null && declaredLength > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
12381
12726
  }
12382
12727
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
@@ -12389,7 +12734,7 @@ var factory = (env) => {
12389
12734
  ].forEach((prop) => {
12390
12735
  options[prop] = response[prop];
12391
12736
  });
12392
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
12737
+ const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
12393
12738
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
12394
12739
  let bytesRead = 0;
12395
12740
  const onChunkProgress = (loadedBytes) => {
@@ -12432,10 +12777,34 @@ var factory = (env) => {
12432
12777
  const canceledError = composedSignal.reason;
12433
12778
  canceledError.config = config;
12434
12779
  request && (canceledError.request = request);
12435
- err !== canceledError && (canceledError.cause = err);
12780
+ if (err !== canceledError) Object.defineProperty(canceledError, "cause", {
12781
+ __proto__: null,
12782
+ value: err,
12783
+ writable: true,
12784
+ enumerable: false,
12785
+ configurable: true
12786
+ });
12436
12787
  throw canceledError;
12437
12788
  }
12438
- if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), { cause: err.cause || err });
12789
+ if (pendingBodyError) {
12790
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
12791
+ throw pendingBodyError;
12792
+ }
12793
+ if (err instanceof AxiosError) {
12794
+ request && !err.request && (err.request = request);
12795
+ throw err;
12796
+ }
12797
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
12798
+ const networkError = new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response);
12799
+ Object.defineProperty(networkError, "cause", {
12800
+ __proto__: null,
12801
+ value: err.cause || err,
12802
+ writable: true,
12803
+ enumerable: false,
12804
+ configurable: true
12805
+ });
12806
+ throw networkError;
12807
+ }
12439
12808
  throw AxiosError.from(err, err && err.code, config, request, err && err.response);
12440
12809
  }
12441
12810
  };
@@ -12532,7 +12901,7 @@ function getAdapter(adapters, config) {
12532
12901
  }
12533
12902
  if (!adapter) {
12534
12903
  const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
12535
- throw new AxiosError(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
12904
+ throw new AxiosError(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), AxiosError.ERR_NOT_SUPPORT);
12536
12905
  }
12537
12906
  return adapter;
12538
12907
  }
@@ -12660,7 +13029,7 @@ validators$1.spelling = function spelling(correctSpelling) {
12660
13029
  * @returns {object}
12661
13030
  */
12662
13031
  function assertOptions(options, schema, allowUnknown) {
12663
- if (typeof options !== "object") throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
13032
+ if (typeof options !== "object" || options === null) throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
12664
13033
  const keys = Object.keys(options);
12665
13034
  let i = keys.length;
12666
13035
  while (i-- > 0) {
@@ -12742,7 +13111,8 @@ var Axios = class {
12742
13111
  forcedJSONParsing: validators.transitional(validators.boolean),
12743
13112
  clarifyTimeoutError: validators.transitional(validators.boolean),
12744
13113
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
12745
- advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
13114
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
13115
+ validateStatusUndefinedResolves: validators.transitional(validators.boolean)
12746
13116
  }, false);
12747
13117
  if (paramsSerializer != null) if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
12748
13118
  else validator_default.assertOptions(paramsSerializer, {
@@ -12819,7 +13189,7 @@ var Axios = class {
12819
13189
  }
12820
13190
  getUri(config) {
12821
13191
  config = mergeConfig(this.defaults, config);
12822
- return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls), config.params, config.paramsSerializer);
13192
+ return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config), config.params, config.paramsSerializer);
12823
13193
  }
12824
13194
  };
12825
13195
  utils_default.forEach([
@@ -12832,7 +13202,7 @@ utils_default.forEach([
12832
13202
  return this.request(mergeConfig(config || {}, {
12833
13203
  method,
12834
13204
  url,
12835
- data: (config || {}).data
13205
+ data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0
12836
13206
  }));
12837
13207
  };
12838
13208
  });
@@ -13724,20 +14094,20 @@ var TIMESTAMP32_MAX_SEC = 4294967295;
13724
14094
  var TIMESTAMP64_MAX_SEC = 17179869183;
13725
14095
  function encodeTimeSpecToTimestamp({ sec, nsec }) {
13726
14096
  if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {
13727
- const rv = new Uint8Array(4);
14097
+ const rv = /* @__PURE__ */ new Uint8Array(4);
13728
14098
  new DataView(rv.buffer).setUint32(0, sec);
13729
14099
  return rv;
13730
14100
  } else {
13731
14101
  const secHigh = sec / 4294967296;
13732
14102
  const secLow = sec & 4294967295;
13733
- const rv = new Uint8Array(8);
14103
+ const rv = /* @__PURE__ */ new Uint8Array(8);
13734
14104
  const view = new DataView(rv.buffer);
13735
14105
  view.setUint32(0, nsec << 2 | secHigh & 3);
13736
14106
  view.setUint32(4, secLow);
13737
14107
  return rv;
13738
14108
  }
13739
14109
  else {
13740
- const rv = new Uint8Array(12);
14110
+ const rv = /* @__PURE__ */ new Uint8Array(12);
13741
14111
  const view = new DataView(rv.buffer);
13742
14112
  view.setUint32(0, nsec);
13743
14113
  setInt64(view, 4, sec);