@speclynx/apidom-reference 6.1.1 → 6.2.0
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/CHANGELOG.md +18 -0
- package/README.md +12 -0
- package/dist/apidom-reference.browser.js +1077 -255
- package/dist/apidom-reference.browser.min.js +1 -1
- package/package.json +30 -30
- package/src/bundle/index.cjs +6 -4
- package/src/bundle/index.mjs +6 -4
- package/src/dereference/index.cjs +8 -5
- package/src/dereference/index.mjs +8 -5
- package/src/options/index.cjs +4 -0
- package/src/options/index.mjs +4 -0
- package/src/options/util.cjs +7 -1
- package/src/options/util.mjs +8 -2
- package/src/resolve/index.cjs +6 -3
- package/src/resolve/index.mjs +6 -3
- package/src/util/url.cjs +38 -8
- package/src/util/url.mjs +35 -6
- package/types/apidom-reference.d.ts +13 -0
- package/types/util/url.d.ts +11 -0
- package/LICENSES/AFL-3.0.txt +0 -182
- package/LICENSES/BSD-3-Clause.txt +0 -26
|
@@ -213,20 +213,22 @@ const bundle = async (uri, options) => {
|
|
|
213
213
|
const {
|
|
214
214
|
refSet
|
|
215
215
|
} = options.bundle;
|
|
216
|
-
|
|
216
|
+
// strategies look up same-document references by a resolved, hence normalized, URI;
|
|
217
|
+
// the file is parsed as a whole document, so its URI has no fragment
|
|
218
|
+
const baseURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_9__.normalize(_util_url_ts__WEBPACK_IMPORTED_MODULE_9__.stripHash(uri));
|
|
217
219
|
const mergedOptions = (0,_options_util_ts__WEBPACK_IMPORTED_MODULE_8__.merge)(options, {
|
|
218
220
|
resolve: {
|
|
219
|
-
baseURI
|
|
221
|
+
baseURI
|
|
220
222
|
}
|
|
221
223
|
});
|
|
222
224
|
let parseResult;
|
|
223
225
|
|
|
224
226
|
// if refSet was provided, use it to avoid unnecessary parsing
|
|
225
|
-
if (refSet !== null && refSet.has(
|
|
227
|
+
if (refSet !== null && refSet.has(baseURI)) {
|
|
226
228
|
// @ts-ignore
|
|
227
229
|
({
|
|
228
230
|
value: parseResult
|
|
229
|
-
} = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
231
|
+
} = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURI, 'uri')));
|
|
230
232
|
} else {
|
|
231
233
|
parseResult = await (0,_parse_index_ts__WEBPACK_IMPORTED_MODULE_7__["default"])(uri, mergedOptions);
|
|
232
234
|
}
|
|
@@ -4415,8 +4417,10 @@ const dereferenceApiDOM = async (element, options) => {
|
|
|
4415
4417
|
parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"]([elementClone]);
|
|
4416
4418
|
surrogateWrapping = true;
|
|
4417
4419
|
}
|
|
4420
|
+
|
|
4421
|
+
// strategies look up same-document references by a resolved, hence normalized, URI
|
|
4418
4422
|
const file = new _File_ts__WEBPACK_IMPORTED_MODULE_5__["default"]({
|
|
4419
|
-
uri: options.resolve.baseURI,
|
|
4423
|
+
uri: _util_url_ts__WEBPACK_IMPORTED_MODULE_12__.normalize(options.resolve.baseURI),
|
|
4420
4424
|
parseResult,
|
|
4421
4425
|
mediaType: options.parse.mediaType
|
|
4422
4426
|
});
|
|
@@ -4449,21 +4453,22 @@ const dereference = async (uri, options) => {
|
|
|
4449
4453
|
const {
|
|
4450
4454
|
refSet
|
|
4451
4455
|
} = options.dereference;
|
|
4452
|
-
|
|
4456
|
+
// the file is parsed as a whole document, so its URI has no fragment
|
|
4457
|
+
const baseURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_12__.normalize(_util_url_ts__WEBPACK_IMPORTED_MODULE_12__.stripHash(uri));
|
|
4453
4458
|
let parseResult;
|
|
4454
4459
|
|
|
4455
4460
|
// if refSet was provided, use it to avoid unnecessary parsing
|
|
4456
|
-
if (refSet !== null && refSet.has(
|
|
4461
|
+
if (refSet !== null && refSet.has(baseURI)) {
|
|
4457
4462
|
// @ts-ignore
|
|
4458
4463
|
({
|
|
4459
4464
|
value: parseResult
|
|
4460
|
-
} = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
4465
|
+
} = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURI, 'uri')));
|
|
4461
4466
|
} else {
|
|
4462
4467
|
parseResult = await (0,_parse_index_ts__WEBPACK_IMPORTED_MODULE_10__["default"])(uri, options);
|
|
4463
4468
|
}
|
|
4464
4469
|
const mergedOptions = (0,_options_util_ts__WEBPACK_IMPORTED_MODULE_11__.merge)(options, {
|
|
4465
4470
|
resolve: {
|
|
4466
|
-
baseURI
|
|
4471
|
+
baseURI
|
|
4467
4472
|
},
|
|
4468
4473
|
dereference: {
|
|
4469
4474
|
// if refSet was not provided, then we can work in mutable mode
|
|
@@ -11167,6 +11172,10 @@ const defaultOptions = {
|
|
|
11167
11172
|
resolve: {
|
|
11168
11173
|
/**
|
|
11169
11174
|
* baseURI serves as a base for all relative URL found in ApiDOM references.
|
|
11175
|
+
* It must be absolute: a file system path, a file:// URL or an HTTP(S) URL.
|
|
11176
|
+
* Defaults to the current working directory (the page URL in browsers).
|
|
11177
|
+
* A fragment marks where the ApiDOM fragment is located in its document;
|
|
11178
|
+
* leave it out when passing a whole document.
|
|
11170
11179
|
*/
|
|
11171
11180
|
baseURI: '',
|
|
11172
11181
|
/**
|
|
@@ -11387,7 +11396,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11387
11396
|
*/
|
|
11388
11397
|
|
|
11389
11398
|
const baseURILens = (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])((0,ramda__WEBPACK_IMPORTED_MODULE_4__["default"])(['resolve', 'baseURI']), (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(['resolve', 'baseURI']));
|
|
11390
|
-
|
|
11399
|
+
// in Node cwd() is a raw file system path; encode it, so that it reads as a URI
|
|
11400
|
+
// (in browsers it is the page URL, which may be an already encoded file:// URL)
|
|
11401
|
+
const cwdURI = () => {
|
|
11402
|
+
const dir = (0,_util_url_ts__WEBPACK_IMPORTED_MODULE_6__.cwd)();
|
|
11403
|
+
return (0,_util_url_ts__WEBPACK_IMPORTED_MODULE_6__.isFileSystemPath)(dir) && (0,_util_url_ts__WEBPACK_IMPORTED_MODULE_6__.getProtocol)(dir) !== 'file' ? (0,_util_url_ts__WEBPACK_IMPORTED_MODULE_6__.fromFileSystemPath)(dir) : dir;
|
|
11404
|
+
};
|
|
11405
|
+
const baseURIDefault = baseURI => (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_5__["default"])(baseURI) ? cwdURI() : baseURI;
|
|
11391
11406
|
|
|
11392
11407
|
/**
|
|
11393
11408
|
* @public
|
|
@@ -13098,9 +13113,10 @@ const resolveApiDOM = async (element, options) => {
|
|
|
13098
13113
|
elementClone.classes.push('result');
|
|
13099
13114
|
parseResult = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"]([elementClone]);
|
|
13100
13115
|
}
|
|
13101
|
-
|
|
13116
|
+
|
|
13117
|
+
// strategies look up same-document references by a resolved, hence normalized, URI
|
|
13102
13118
|
const file = new _File_ts__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
13103
|
-
uri:
|
|
13119
|
+
uri: _util_url_ts__WEBPACK_IMPORTED_MODULE_10__.normalize(options.resolve.baseURI),
|
|
13104
13120
|
parseResult,
|
|
13105
13121
|
mediaType: options.parse.mediaType
|
|
13106
13122
|
});
|
|
@@ -13127,9 +13143,11 @@ const resolveApiDOM = async (element, options) => {
|
|
|
13127
13143
|
*/
|
|
13128
13144
|
const resolve = async (uri, options) => {
|
|
13129
13145
|
const parseResult = await (0,_parse_index_ts__WEBPACK_IMPORTED_MODULE_5__["default"])(uri, options);
|
|
13146
|
+
// the file is parsed as a whole document, so its URI has no fragment
|
|
13147
|
+
const baseURI = _util_url_ts__WEBPACK_IMPORTED_MODULE_10__.normalize(_util_url_ts__WEBPACK_IMPORTED_MODULE_10__.stripHash(uri));
|
|
13130
13148
|
const mergedOptions = (0,_options_util_ts__WEBPACK_IMPORTED_MODULE_4__.merge)(options, {
|
|
13131
13149
|
resolve: {
|
|
13132
|
-
baseURI
|
|
13150
|
+
baseURI
|
|
13133
13151
|
}
|
|
13134
13152
|
});
|
|
13135
13153
|
return resolveApiDOM(parseResult, mergedOptions);
|
|
@@ -14108,21 +14126,23 @@ const isURI = uri => {
|
|
|
14108
14126
|
*/
|
|
14109
14127
|
const toFileSystemPath = (uri, options) => {
|
|
14110
14128
|
// RegExp patterns to URL-decode special characters for local filesystem paths
|
|
14111
|
-
const urlDecodePatterns = [/%23/g, '#', /%24/g, '$', /%26/g, '&', /%2C/g, ',', /%40/g, '@'];
|
|
14129
|
+
const urlDecodePatterns = [/%23/g, '#', /%24/g, '$', /%26/g, '&', /%2C/g, ',', /%3F/g, '?', /%40/g, '@'];
|
|
14112
14130
|
const keepFileProtocol = (0,ramda__WEBPACK_IMPORTED_MODULE_3__["default"])(false, 'keepFileProtocol', options);
|
|
14113
14131
|
const isWindowsPredicate = (0,ramda__WEBPACK_IMPORTED_MODULE_3__["default"])(isWindows, 'isWindows', options);
|
|
14114
14132
|
|
|
14115
|
-
// Step 1:
|
|
14116
|
-
let path = decodeURI(uri);
|
|
14117
|
-
|
|
14118
|
-
// Step 2: Manually decode characters that are not decoded by `decodeURI`.
|
|
14133
|
+
// Step 1: Manually decode characters that are not decoded by `decodeURI`.
|
|
14119
14134
|
// This includes characters such as "#" and "?", which have special meaning in URLs,
|
|
14120
|
-
// but are just normal characters in a filesystem path.
|
|
14135
|
+
// but are just normal characters in a filesystem path. It runs before `decodeURI`,
|
|
14136
|
+
// so that an encoded "%" (e.g. "%253F") isn't decoded twice.
|
|
14137
|
+
let path = uri;
|
|
14121
14138
|
for (let i = 0; i < urlDecodePatterns.length; i += 2) {
|
|
14122
14139
|
// @ts-ignore
|
|
14123
14140
|
path = path.replace(urlDecodePatterns[i], urlDecodePatterns[i + 1]);
|
|
14124
14141
|
}
|
|
14125
14142
|
|
|
14143
|
+
// Step 2: `decodeURI` will decode characters such as Cyrillic characters, spaces, etc.
|
|
14144
|
+
path = decodeURI(path);
|
|
14145
|
+
|
|
14126
14146
|
// Step 3: If it's a "file://" URL, then format it consistently
|
|
14127
14147
|
// or convert it to a local filesystem path
|
|
14128
14148
|
let isFileUrl = path.substring(0, 7).toLowerCase() === 'file://';
|
|
@@ -14263,6 +14283,33 @@ const resolve = (from, to) => {
|
|
|
14263
14283
|
return resolvedUrl.toString();
|
|
14264
14284
|
};
|
|
14265
14285
|
|
|
14286
|
+
/**
|
|
14287
|
+
* Normalizes a URI the way `resolve` normalizes its result (WHATWG URL normalization):
|
|
14288
|
+
* lowercases the scheme and the host of an absolute URL, drops a default port and
|
|
14289
|
+
* removes dot segments. This is not RFC 3986 syntax-based normalization: existing
|
|
14290
|
+
* percent-encoding is left as is. A file system path is sanitized first, so characters
|
|
14291
|
+
* not allowed in URLs (e.g. spaces, `[`, `?`) are percent-encoded; a `file://` URL has
|
|
14292
|
+
* its path sanitized the same way and stays a URL. The fragment is kept as given.
|
|
14293
|
+
* A URI that can't be normalized is returned unchanged.
|
|
14294
|
+
* @public
|
|
14295
|
+
*/
|
|
14296
|
+
const normalize = uri => {
|
|
14297
|
+
// getHash returns the root hash ('#') for a URI without fragment
|
|
14298
|
+
const fragment = uri.includes('#') ? getHash(uri) : '';
|
|
14299
|
+
const documentURI = stripHash(uri);
|
|
14300
|
+
try {
|
|
14301
|
+
let sanitizedURI = sanitize(documentURI);
|
|
14302
|
+
// sanitize turns a file:// URL into a path; keep it a URL, as references
|
|
14303
|
+
// resolved against it are, e.g. file:///C:/x.json rather than file://C:/x.json
|
|
14304
|
+
if (getProtocol(documentURI) === 'file') {
|
|
14305
|
+
sanitizedURI = `file://${sanitizedURI.startsWith('/') ? '' : '/'}${sanitizedURI}`;
|
|
14306
|
+
}
|
|
14307
|
+
return resolve('', sanitizedURI) + fragment;
|
|
14308
|
+
} catch {
|
|
14309
|
+
return uri;
|
|
14310
|
+
}
|
|
14311
|
+
};
|
|
14312
|
+
|
|
14266
14313
|
/**
|
|
14267
14314
|
* Computes the URI reference that resolves to `to` against `from` — the inverse
|
|
14268
14315
|
* of `resolve`: `resolve(from, relative(from, to)) === to`. The reference is
|
|
@@ -14340,6 +14387,7 @@ const unsanitize = uri => {
|
|
|
14340
14387
|
/* harmony export */ "isFileSystemPath", 0, /* binding */ isFileSystemPath,
|
|
14341
14388
|
/* harmony export */ "isHttpUrl", 0, /* binding */ isHttpUrl,
|
|
14342
14389
|
/* harmony export */ "isURI", 0, /* binding */ isURI,
|
|
14390
|
+
/* harmony export */ "normalize", 0, /* binding */ normalize,
|
|
14343
14391
|
/* harmony export */ "relative", 0, /* binding */ relative,
|
|
14344
14392
|
/* harmony export */ "resolve", 0, /* binding */ resolve,
|
|
14345
14393
|
/* harmony export */ "sanitize", 0, /* binding */ sanitize,
|
|
@@ -27154,13 +27202,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27154
27202
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19011);
|
|
27155
27203
|
/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35144);
|
|
27156
27204
|
/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24426);
|
|
27157
|
-
/* harmony import */ var
|
|
27158
|
-
/* harmony import */ var
|
|
27159
|
-
/* harmony import */ var
|
|
27160
|
-
/* harmony import */ var
|
|
27161
|
-
/* harmony import */ var
|
|
27162
|
-
/* harmony import */ var
|
|
27163
|
-
/* harmony import */ var
|
|
27205
|
+
/* harmony import */ var _core_createMultipartBody_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(82531);
|
|
27206
|
+
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76487);
|
|
27207
|
+
/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79194);
|
|
27208
|
+
/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(28451);
|
|
27209
|
+
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(40788);
|
|
27210
|
+
/* harmony import */ var _helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(879);
|
|
27211
|
+
/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18679);
|
|
27212
|
+
/* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(51306);
|
|
27213
|
+
|
|
27164
27214
|
|
|
27165
27215
|
|
|
27166
27216
|
|
|
@@ -27248,11 +27298,13 @@ const factory = (env) => {
|
|
|
27248
27298
|
{
|
|
27249
27299
|
Request: globalObject.Request,
|
|
27250
27300
|
Response: globalObject.Response,
|
|
27301
|
+
Blob: globalObject.Blob,
|
|
27251
27302
|
},
|
|
27252
27303
|
env
|
|
27253
27304
|
);
|
|
27254
27305
|
|
|
27255
|
-
const
|
|
27306
|
+
const envFetch = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(env, 'fetch') ? env.fetch : undefined;
|
|
27307
|
+
const { Request, Response, Blob } = env;
|
|
27256
27308
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
27257
27309
|
const isRequestSupported = isFunction(Request);
|
|
27258
27310
|
const isResponseSupported = isFunction(Response);
|
|
@@ -27301,6 +27353,20 @@ const factory = (env) => {
|
|
|
27301
27353
|
isReadableStreamSupported &&
|
|
27302
27354
|
test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body));
|
|
27303
27355
|
|
|
27356
|
+
// Some runtimes reject every explicit cache mode. Use own defaults for both
|
|
27357
|
+
// probes so unrelated polluted options cannot affect cache-mode detection.
|
|
27358
|
+
const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS);
|
|
27359
|
+
|
|
27360
|
+
if (isRequestSupported && !test(() => new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, requestDefaults))) {
|
|
27361
|
+
delete requestDefaults.cache;
|
|
27362
|
+
|
|
27363
|
+
// Only omit cache when that makes Request construction succeed. Otherwise
|
|
27364
|
+
// retain the explicit default that protects supporting runtimes from pollution.
|
|
27365
|
+
if (!test(() => new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, requestDefaults))) {
|
|
27366
|
+
requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;
|
|
27367
|
+
}
|
|
27368
|
+
}
|
|
27369
|
+
|
|
27304
27370
|
const resolvers = {
|
|
27305
27371
|
stream: supportsResponseStream && ((res) => res.body),
|
|
27306
27372
|
};
|
|
@@ -27334,14 +27400,6 @@ const factory = (env) => {
|
|
|
27334
27400
|
return body.size;
|
|
27335
27401
|
}
|
|
27336
27402
|
|
|
27337
|
-
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) {
|
|
27338
|
-
const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
|
|
27339
|
-
method: 'POST',
|
|
27340
|
-
body,
|
|
27341
|
-
});
|
|
27342
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
27343
|
-
}
|
|
27344
|
-
|
|
27345
27403
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) {
|
|
27346
27404
|
return body.byteLength;
|
|
27347
27405
|
}
|
|
@@ -27378,7 +27436,7 @@ const factory = (env) => {
|
|
|
27378
27436
|
maxContentLength,
|
|
27379
27437
|
maxBodyLength,
|
|
27380
27438
|
maxRedirects,
|
|
27381
|
-
} = (0,
|
|
27439
|
+
} = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_8__["default"])(config);
|
|
27382
27440
|
|
|
27383
27441
|
const hasMaxContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxContentLength) && maxContentLength > -1;
|
|
27384
27442
|
const hasMaxBodyLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
@@ -27404,11 +27462,12 @@ const factory = (env) => {
|
|
|
27404
27462
|
|
|
27405
27463
|
let requestContentLength;
|
|
27406
27464
|
|
|
27407
|
-
//
|
|
27465
|
+
// AxiosErrors we raise while request or response bodies are being streamed. Captured
|
|
27408
27466
|
// by identity so the catch block can surface it directly, regardless of
|
|
27409
27467
|
// how the runtime wraps the resulting fetch rejection (undici exposes it
|
|
27410
27468
|
// as `err.cause`; some browsers drop the original error entirely).
|
|
27411
27469
|
let pendingBodyError = null;
|
|
27470
|
+
let pendingResponseError = null;
|
|
27412
27471
|
|
|
27413
27472
|
const maxBodyLengthError = () =>
|
|
27414
27473
|
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
@@ -27432,8 +27491,9 @@ const factory = (env) => {
|
|
|
27432
27491
|
};
|
|
27433
27492
|
}
|
|
27434
27493
|
|
|
27494
|
+
let parsedURL;
|
|
27435
27495
|
if (maybeWithAuthCredentials(url)) {
|
|
27436
|
-
|
|
27496
|
+
parsedURL = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
|
|
27437
27497
|
|
|
27438
27498
|
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
27439
27499
|
const urlUsername = decodeURIComponentSafe(parsedURL.username);
|
|
@@ -27462,8 +27522,8 @@ const factory = (env) => {
|
|
|
27462
27522
|
// Enforce maxContentLength for data: URLs up-front so we never materialize
|
|
27463
27523
|
// an oversized payload. The HTTP adapter applies the same check (see http.js
|
|
27464
27524
|
// "if (protocol === 'data:')" branch).
|
|
27465
|
-
if (hasMaxContentLength &&
|
|
27466
|
-
const estimated = (0,
|
|
27525
|
+
if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') {
|
|
27526
|
+
const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_10__["default"])(parsedURL.href);
|
|
27467
27527
|
if (estimated > maxContentLength) {
|
|
27468
27528
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
27469
27529
|
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
@@ -27474,6 +27534,38 @@ const factory = (env) => {
|
|
|
27474
27534
|
}
|
|
27475
27535
|
}
|
|
27476
27536
|
|
|
27537
|
+
const formContentType =
|
|
27538
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(data) && _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(own('headers')).getContentType();
|
|
27539
|
+
let formBoundary;
|
|
27540
|
+
if (
|
|
27541
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(formContentType) &&
|
|
27542
|
+
/^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())
|
|
27543
|
+
) {
|
|
27544
|
+
const parameters = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].parseParameters(formContentType);
|
|
27545
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary;
|
|
27546
|
+
}
|
|
27547
|
+
|
|
27548
|
+
if (
|
|
27549
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(data) &&
|
|
27550
|
+
method !== 'get' &&
|
|
27551
|
+
method !== 'head' &&
|
|
27552
|
+
(hasMaxBodyLength ||
|
|
27553
|
+
(onUploadProgress && supportsRequestStream) ||
|
|
27554
|
+
formBoundary !== undefined)
|
|
27555
|
+
) {
|
|
27556
|
+
data = (0,_core_createMultipartBody_js__WEBPACK_IMPORTED_MODULE_5__["default"])(
|
|
27557
|
+
data,
|
|
27558
|
+
Blob,
|
|
27559
|
+
hasMaxBodyLength ? maxBodyLength : Infinity,
|
|
27560
|
+
maxBodyLengthError,
|
|
27561
|
+
formBoundary
|
|
27562
|
+
);
|
|
27563
|
+
// Blob.type lowercases its value, including a case-sensitive boundary.
|
|
27564
|
+
// Retain the caller's header when an explicit boundary was serialized.
|
|
27565
|
+
headers.setContentType(formBoundary === undefined ? data.type : formContentType);
|
|
27566
|
+
requestContentLength = data.size;
|
|
27567
|
+
}
|
|
27568
|
+
|
|
27477
27569
|
// Enforce maxBodyLength against known-size bodies before dispatch using
|
|
27478
27570
|
// the body's *actual* size — never a caller-declared Content-Length,
|
|
27479
27571
|
// which could under-report to slip an oversized body past the check.
|
|
@@ -27539,9 +27631,9 @@ const factory = (env) => {
|
|
|
27539
27631
|
if (_request.body) {
|
|
27540
27632
|
const [onProgress, flush] =
|
|
27541
27633
|
(onUploadProgress &&
|
|
27542
|
-
(0,
|
|
27634
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventDecorator)(
|
|
27543
27635
|
requestContentLength,
|
|
27544
|
-
(0,
|
|
27636
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.asyncDecorator)(onUploadProgress))
|
|
27545
27637
|
)) ||
|
|
27546
27638
|
[];
|
|
27547
27639
|
|
|
@@ -27593,7 +27685,7 @@ const factory = (env) => {
|
|
|
27593
27685
|
}
|
|
27594
27686
|
|
|
27595
27687
|
// Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
|
|
27596
|
-
headers.set('User-Agent', 'axios/' +
|
|
27688
|
+
headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_11__.VERSION, false);
|
|
27597
27689
|
|
|
27598
27690
|
const safeFetchOptions =
|
|
27599
27691
|
fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
|
|
@@ -27612,14 +27704,14 @@ const factory = (env) => {
|
|
|
27612
27704
|
const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
|
|
27613
27705
|
signal: composedSignal,
|
|
27614
27706
|
method: method.toUpperCase(),
|
|
27615
|
-
headers: (0,
|
|
27707
|
+
headers: (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__.toByteStringHeaderObject)(headers.normalize()),
|
|
27616
27708
|
body: data,
|
|
27617
27709
|
duplex: 'half',
|
|
27618
27710
|
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
27619
27711
|
});
|
|
27620
27712
|
|
|
27621
27713
|
if (isRequestSupported) {
|
|
27622
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(
|
|
27714
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(requestDefaults, (value, key) => {
|
|
27623
27715
|
if (resolvedOptions[key] === undefined) {
|
|
27624
27716
|
resolvedOptions[key] = value;
|
|
27625
27717
|
}
|
|
@@ -27648,7 +27740,7 @@ const factory = (env) => {
|
|
|
27648
27740
|
? _fetch(request, safeFetchOptions)
|
|
27649
27741
|
: _fetch(url, resolvedOptions));
|
|
27650
27742
|
|
|
27651
|
-
const responseHeaders =
|
|
27743
|
+
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(response.headers);
|
|
27652
27744
|
|
|
27653
27745
|
// Cheap pre-check: if the server honestly declares a content-length that
|
|
27654
27746
|
// already exceeds the cap, reject before we start streaming.
|
|
@@ -27682,9 +27774,9 @@ const factory = (env) => {
|
|
|
27682
27774
|
|
|
27683
27775
|
const [onProgress, flush] =
|
|
27684
27776
|
(onDownloadProgress &&
|
|
27685
|
-
(0,
|
|
27777
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventDecorator)(
|
|
27686
27778
|
responseContentLength,
|
|
27687
|
-
(0,
|
|
27779
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_7__.asyncDecorator)(onDownloadProgress), true)
|
|
27688
27780
|
)) ||
|
|
27689
27781
|
[];
|
|
27690
27782
|
|
|
@@ -27693,12 +27785,12 @@ const factory = (env) => {
|
|
|
27693
27785
|
if (hasMaxContentLength) {
|
|
27694
27786
|
bytesRead = loadedBytes;
|
|
27695
27787
|
if (bytesRead > maxContentLength) {
|
|
27696
|
-
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
27788
|
+
throw (pendingResponseError = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
27697
27789
|
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
27698
27790
|
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
|
|
27699
27791
|
config,
|
|
27700
27792
|
request
|
|
27701
|
-
);
|
|
27793
|
+
));
|
|
27702
27794
|
}
|
|
27703
27795
|
}
|
|
27704
27796
|
onProgress && onProgress(loadedBytes);
|
|
@@ -27750,9 +27842,9 @@ const factory = (env) => {
|
|
|
27750
27842
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
27751
27843
|
|
|
27752
27844
|
return await new Promise((resolve, reject) => {
|
|
27753
|
-
(0,
|
|
27845
|
+
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_9__["default"])(resolve, reject, {
|
|
27754
27846
|
data: responseData,
|
|
27755
|
-
headers:
|
|
27847
|
+
headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(response.headers),
|
|
27756
27848
|
status: response.status,
|
|
27757
27849
|
statusText: response.statusText,
|
|
27758
27850
|
config,
|
|
@@ -27784,7 +27876,7 @@ const factory = (env) => {
|
|
|
27784
27876
|
}
|
|
27785
27877
|
|
|
27786
27878
|
// Surface a maxBodyLength violation we raised while the request body was
|
|
27787
|
-
// being streamed.
|
|
27879
|
+
// being streamed. Keeping the original error (rather than reading
|
|
27788
27880
|
// `err.cause.isAxiosError`) keeps the error deterministic across runtimes
|
|
27789
27881
|
// and avoids both prototype-pollution reads and mis-attributing a foreign
|
|
27790
27882
|
// AxiosError that merely happened to land in `err.cause`.
|
|
@@ -27793,6 +27885,10 @@ const factory = (env) => {
|
|
|
27793
27885
|
throw pendingBodyError;
|
|
27794
27886
|
}
|
|
27795
27887
|
|
|
27888
|
+
if (pendingResponseError) {
|
|
27889
|
+
throw pendingResponseError;
|
|
27890
|
+
}
|
|
27891
|
+
|
|
27796
27892
|
// Re-throw AxiosErrors we raised synchronously (data: URL / content-length
|
|
27797
27893
|
// pre-checks, response size enforcement) without re-wrapping them.
|
|
27798
27894
|
if (err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
@@ -27828,9 +27924,15 @@ const factory = (env) => {
|
|
|
27828
27924
|
const seedCache = new Map();
|
|
27829
27925
|
|
|
27830
27926
|
const getFetch = (config) => {
|
|
27831
|
-
|
|
27832
|
-
const
|
|
27833
|
-
|
|
27927
|
+
const env = Object.create(null);
|
|
27928
|
+
const configuredEnv = config && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(config, 'env') && config.env;
|
|
27929
|
+
['fetch', 'Request', 'Response', 'Blob'].forEach((key) => {
|
|
27930
|
+
if (configuredEnv && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(configuredEnv, key)) {
|
|
27931
|
+
env[key] = configuredEnv[key];
|
|
27932
|
+
}
|
|
27933
|
+
});
|
|
27934
|
+
const { fetch, Request, Response, Blob } = env;
|
|
27935
|
+
const seeds = [Request, Response, fetch, Blob];
|
|
27834
27936
|
|
|
27835
27937
|
let len = seeds.length,
|
|
27836
27938
|
i = len,
|
|
@@ -27876,9 +27978,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27876
27978
|
/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43406);
|
|
27877
27979
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79455);
|
|
27878
27980
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
|
|
27879
|
-
/* harmony import */ var
|
|
27880
|
-
/* harmony import */ var
|
|
27881
|
-
/* harmony import */ var
|
|
27981
|
+
/* harmony import */ var _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(65986);
|
|
27982
|
+
/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(79194);
|
|
27983
|
+
/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28451);
|
|
27984
|
+
/* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(51306);
|
|
27985
|
+
|
|
27882
27986
|
|
|
27883
27987
|
|
|
27884
27988
|
|
|
@@ -27897,17 +28001,60 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
27897
28001
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
|
|
27898
28002
|
function (config) {
|
|
27899
28003
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
27900
|
-
|
|
28004
|
+
let useAsyncXsrf;
|
|
28005
|
+
try {
|
|
28006
|
+
const store =
|
|
28007
|
+
_platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore;
|
|
28008
|
+
useAsyncXsrf = store && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(store.get);
|
|
28009
|
+
} catch (e) {
|
|
28010
|
+
// A restricted Cookie Store getter must retain the synchronous fallback.
|
|
28011
|
+
}
|
|
28012
|
+
let xsrfCookieName;
|
|
28013
|
+
const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_11__["default"])(
|
|
28014
|
+
config,
|
|
28015
|
+
useAsyncXsrf
|
|
28016
|
+
? (name) => {
|
|
28017
|
+
xsrfCookieName = name;
|
|
28018
|
+
return null;
|
|
28019
|
+
}
|
|
28020
|
+
: undefined
|
|
28021
|
+
);
|
|
27901
28022
|
let requestData = _config.data;
|
|
27902
28023
|
const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(_config.headers).normalize();
|
|
27903
28024
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
27904
28025
|
let onCanceled;
|
|
28026
|
+
let timeoutId;
|
|
27905
28027
|
let uploadThrottled, downloadThrottled;
|
|
27906
28028
|
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
27907
28029
|
|
|
27908
28030
|
function done() {
|
|
27909
|
-
|
|
27910
|
-
|
|
28031
|
+
clearTimeout(timeoutId);
|
|
28032
|
+
// A final progress callback must not prevent the remaining cleanup.
|
|
28033
|
+
// Report errors asynchronously, as onloadend and the throttle timer do.
|
|
28034
|
+
try {
|
|
28035
|
+
flushUpload && flushUpload(); // flush events
|
|
28036
|
+
} catch (err) {
|
|
28037
|
+
setTimeout(() => {
|
|
28038
|
+
throw err;
|
|
28039
|
+
});
|
|
28040
|
+
}
|
|
28041
|
+
try {
|
|
28042
|
+
flushDownload && flushDownload(); // flush events
|
|
28043
|
+
} catch (err) {
|
|
28044
|
+
setTimeout(() => {
|
|
28045
|
+
throw err;
|
|
28046
|
+
});
|
|
28047
|
+
}
|
|
28048
|
+
|
|
28049
|
+
// A flush can synchronously cancel the request and reenter done().
|
|
28050
|
+
// In that case the inner call has already detached these listeners.
|
|
28051
|
+
if (request) {
|
|
28052
|
+
downloadThrottled && request.removeEventListener('progress', downloadThrottled);
|
|
28053
|
+
if (request.upload) {
|
|
28054
|
+
uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled);
|
|
28055
|
+
flushUpload && request.upload.removeEventListener('loadend', flushUpload);
|
|
28056
|
+
}
|
|
28057
|
+
}
|
|
27911
28058
|
|
|
27912
28059
|
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
27913
28060
|
|
|
@@ -28058,6 +28205,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
28058
28205
|
|
|
28059
28206
|
// Handle timeout
|
|
28060
28207
|
request.ontimeout = function handleTimeout() {
|
|
28208
|
+
if (!request) return;
|
|
28061
28209
|
let timeoutErrorMessage = _config.timeout
|
|
28062
28210
|
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
28063
28211
|
: 'timeout exceeded';
|
|
@@ -28082,13 +28230,6 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
28082
28230
|
// Remove Content-Type if data is undefined
|
|
28083
28231
|
requestData === undefined && requestHeaders.setContentType(null);
|
|
28084
28232
|
|
|
28085
|
-
// Add headers to the request
|
|
28086
|
-
if ('setRequestHeader' in request) {
|
|
28087
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
|
|
28088
|
-
request.setRequestHeader(key, val);
|
|
28089
|
-
});
|
|
28090
|
-
}
|
|
28091
|
-
|
|
28092
28233
|
// Add withCredentials to request if needed
|
|
28093
28234
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(_config.withCredentials)) {
|
|
28094
28235
|
request.withCredentials = !!_config.withCredentials;
|
|
@@ -28101,7 +28242,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
28101
28242
|
|
|
28102
28243
|
// Handle progress if needed
|
|
28103
28244
|
if (onDownloadProgress) {
|
|
28104
|
-
[downloadThrottled, flushDownload, flushDownloadWithEvent] = (0,
|
|
28245
|
+
[downloadThrottled, flushDownload, flushDownloadWithEvent] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_10__.progressEventReducer)(
|
|
28105
28246
|
onDownloadProgress,
|
|
28106
28247
|
true
|
|
28107
28248
|
);
|
|
@@ -28110,7 +28251,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
28110
28251
|
|
|
28111
28252
|
// Not all browsers support upload events
|
|
28112
28253
|
if (onUploadProgress && request.upload) {
|
|
28113
|
-
[uploadThrottled, flushUpload] = (0,
|
|
28254
|
+
[uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_10__.progressEventReducer)(onUploadProgress);
|
|
28114
28255
|
|
|
28115
28256
|
request.upload.addEventListener('progress', uploadThrottled);
|
|
28116
28257
|
|
|
@@ -28125,12 +28266,14 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
28125
28266
|
return;
|
|
28126
28267
|
}
|
|
28127
28268
|
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
28128
|
-
request
|
|
28269
|
+
const xhr = request;
|
|
28129
28270
|
done();
|
|
28130
28271
|
request = null;
|
|
28272
|
+
xhr.abort();
|
|
28131
28273
|
};
|
|
28132
28274
|
|
|
28133
28275
|
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
28276
|
+
if (!request) return;
|
|
28134
28277
|
if (_config.signal) {
|
|
28135
28278
|
_config.signal.aborted
|
|
28136
28279
|
? onCanceled()
|
|
@@ -28138,6 +28281,8 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
28138
28281
|
}
|
|
28139
28282
|
}
|
|
28140
28283
|
|
|
28284
|
+
if (!request) return;
|
|
28285
|
+
|
|
28141
28286
|
const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_config.url);
|
|
28142
28287
|
|
|
28143
28288
|
if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].protocols.includes(protocol)) {
|
|
@@ -28152,8 +28297,73 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
28152
28297
|
return;
|
|
28153
28298
|
}
|
|
28154
28299
|
|
|
28155
|
-
|
|
28156
|
-
|
|
28300
|
+
const sendRequest = () => {
|
|
28301
|
+
if (!request) return;
|
|
28302
|
+
// Apply headers after an asynchronous XSRF read so existing headers are
|
|
28303
|
+
// replaced through AxiosHeaders rather than appended by the native XHR.
|
|
28304
|
+
if ('setRequestHeader' in request) {
|
|
28305
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(
|
|
28306
|
+
(0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_12__.toByteStringHeaderObject)(requestHeaders),
|
|
28307
|
+
function setRequestHeader(val, key) {
|
|
28308
|
+
request.setRequestHeader(key, val);
|
|
28309
|
+
}
|
|
28310
|
+
);
|
|
28311
|
+
}
|
|
28312
|
+
request.send(requestData || null);
|
|
28313
|
+
};
|
|
28314
|
+
|
|
28315
|
+
if (xsrfCookieName) {
|
|
28316
|
+
// Native XHR timeout starts at send(). Cover cookie preparation and the
|
|
28317
|
+
// subsequent request with the same budget and existing timeout handler.
|
|
28318
|
+
const now =
|
|
28319
|
+
typeof performance !== 'undefined' && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(performance.now)
|
|
28320
|
+
? () => performance.now()
|
|
28321
|
+
: Date.now;
|
|
28322
|
+
const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined;
|
|
28323
|
+
const abortOnTimeout = () => {
|
|
28324
|
+
if (!request) return;
|
|
28325
|
+
const xhr = request;
|
|
28326
|
+
xhr.ontimeout();
|
|
28327
|
+
xhr.abort();
|
|
28328
|
+
};
|
|
28329
|
+
if (deadline !== undefined) {
|
|
28330
|
+
const scheduleTimeout = () => {
|
|
28331
|
+
const remaining = deadline - now();
|
|
28332
|
+
if (remaining > 0) {
|
|
28333
|
+
// Browser timers overflow above the signed 32-bit delay limit.
|
|
28334
|
+
timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff));
|
|
28335
|
+
} else {
|
|
28336
|
+
abortOnTimeout();
|
|
28337
|
+
}
|
|
28338
|
+
};
|
|
28339
|
+
scheduleTimeout();
|
|
28340
|
+
}
|
|
28341
|
+
|
|
28342
|
+
_helpers_cookies_js__WEBPACK_IMPORTED_MODULE_9__["default"]
|
|
28343
|
+
.readAsync(xsrfCookieName)
|
|
28344
|
+
.then((value) => {
|
|
28345
|
+
if (!request) return;
|
|
28346
|
+
// Promise callbacks may run before an overdue timer after a busy task.
|
|
28347
|
+
if (deadline !== undefined && now() >= deadline) {
|
|
28348
|
+
abortOnTimeout();
|
|
28349
|
+
return;
|
|
28350
|
+
}
|
|
28351
|
+
if (value) {
|
|
28352
|
+
const headerName =
|
|
28353
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName;
|
|
28354
|
+
requestHeaders.set(headerName, value);
|
|
28355
|
+
}
|
|
28356
|
+
sendRequest();
|
|
28357
|
+
})
|
|
28358
|
+
.catch((error) => {
|
|
28359
|
+
if (!request) return;
|
|
28360
|
+
reject(_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].from(error, null, config, request));
|
|
28361
|
+
done();
|
|
28362
|
+
request = null;
|
|
28363
|
+
});
|
|
28364
|
+
} else {
|
|
28365
|
+
sendRequest();
|
|
28366
|
+
}
|
|
28157
28367
|
});
|
|
28158
28368
|
});
|
|
28159
28369
|
|
|
@@ -28500,6 +28710,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28500
28710
|
/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(62215);
|
|
28501
28711
|
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
|
|
28502
28712
|
/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(69006);
|
|
28713
|
+
/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(19011);
|
|
28714
|
+
|
|
28503
28715
|
|
|
28504
28716
|
|
|
28505
28717
|
|
|
@@ -28515,6 +28727,37 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28515
28727
|
|
|
28516
28728
|
const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].validators;
|
|
28517
28729
|
|
|
28730
|
+
// Recognize header maps without consuming objects intended as literal values.
|
|
28731
|
+
// AxiosHeaders from other builds share a brand and header-container interface,
|
|
28732
|
+
// but not constructor identity. A tag and toJSON alone can describe a literal.
|
|
28733
|
+
const isHeadersBucket = (value) => {
|
|
28734
|
+
if (value == null || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value) || value instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"]) {
|
|
28735
|
+
return true;
|
|
28736
|
+
}
|
|
28737
|
+
|
|
28738
|
+
try {
|
|
28739
|
+
return (
|
|
28740
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(value) &&
|
|
28741
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' &&
|
|
28742
|
+
[
|
|
28743
|
+
'toJSON',
|
|
28744
|
+
'set',
|
|
28745
|
+
'get',
|
|
28746
|
+
'has',
|
|
28747
|
+
'delete',
|
|
28748
|
+
'clear',
|
|
28749
|
+
'normalize',
|
|
28750
|
+
'concat',
|
|
28751
|
+
'toString',
|
|
28752
|
+
Symbol.iterator,
|
|
28753
|
+
].every((method) => _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(value, method)))
|
|
28754
|
+
);
|
|
28755
|
+
} catch (e) {
|
|
28756
|
+
// A failed optional brand probe must not prevent literal header serialization.
|
|
28757
|
+
return false;
|
|
28758
|
+
}
|
|
28759
|
+
};
|
|
28760
|
+
|
|
28518
28761
|
/**
|
|
28519
28762
|
* Create a new instance of Axios
|
|
28520
28763
|
*
|
|
@@ -28561,16 +28804,26 @@ class Axios {
|
|
|
28561
28804
|
|
|
28562
28805
|
if (!err.stack) {
|
|
28563
28806
|
err.stack = stack;
|
|
28564
|
-
// match without the 2 top stack lines
|
|
28565
28807
|
} else if (stack) {
|
|
28808
|
+
// Match a common suffix after the 2 top frames when available,
|
|
28809
|
+
// otherwise compare the full reconstructed stack.
|
|
28566
28810
|
const firstNewlineIndex = stack.indexOf('\n');
|
|
28567
28811
|
const secondNewlineIndex =
|
|
28568
28812
|
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
28569
|
-
const
|
|
28570
|
-
secondNewlineIndex === -1 ?
|
|
28571
|
-
|
|
28572
|
-
|
|
28573
|
-
|
|
28813
|
+
const duplicateCheckSuffix =
|
|
28814
|
+
secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);
|
|
28815
|
+
|
|
28816
|
+
// `AxiosError.from()` may have already inlined the wrapped error's
|
|
28817
|
+
// stack under a `Caused by:` marker. Keep the reconstructed caller
|
|
28818
|
+
// frames ahead of that marker so stack-only reporters do not read
|
|
28819
|
+
// them as part of the low-level cause.
|
|
28820
|
+
const currentStack = String(err.stack);
|
|
28821
|
+
const causeIndex = (0,_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__.getCauseStackIndex)(err, currentStack);
|
|
28822
|
+
const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);
|
|
28823
|
+
const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex);
|
|
28824
|
+
|
|
28825
|
+
if (!stackHead.endsWith(duplicateCheckSuffix)) {
|
|
28826
|
+
err.stack = stackHead + '\n' + stack + causeSection;
|
|
28574
28827
|
}
|
|
28575
28828
|
}
|
|
28576
28829
|
} catch (e) {
|
|
@@ -28606,6 +28859,7 @@ class Axios {
|
|
|
28606
28859
|
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
28607
28860
|
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
|
|
28608
28861
|
validateStatusUndefinedResolves: validators.transitional(validators.boolean),
|
|
28862
|
+
encodeBasicAuthUsername: validators.transitional(validators.boolean),
|
|
28609
28863
|
},
|
|
28610
28864
|
false
|
|
28611
28865
|
);
|
|
@@ -28631,7 +28885,10 @@ class Axios {
|
|
|
28631
28885
|
// Set config.allowAbsoluteUrls
|
|
28632
28886
|
if (config.allowAbsoluteUrls !== undefined) {
|
|
28633
28887
|
// do nothing
|
|
28634
|
-
} else if (
|
|
28888
|
+
} else if (
|
|
28889
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(this.defaults, 'allowAbsoluteUrls') &&
|
|
28890
|
+
this.defaults.allowAbsoluteUrls !== undefined
|
|
28891
|
+
) {
|
|
28635
28892
|
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
28636
28893
|
} else {
|
|
28637
28894
|
config.allowAbsoluteUrls = true;
|
|
@@ -28653,12 +28910,21 @@ class Axios {
|
|
|
28653
28910
|
'get'
|
|
28654
28911
|
).toLowerCase();
|
|
28655
28912
|
|
|
28656
|
-
// Flatten headers
|
|
28657
|
-
|
|
28913
|
+
// Flatten header defaults without consuming literal method-named headers.
|
|
28914
|
+
const commonHeaders = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(headers, 'common');
|
|
28915
|
+
const methodHeaders = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(headers, config.method);
|
|
28916
|
+
const contextHeaders =
|
|
28917
|
+
headers &&
|
|
28918
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(
|
|
28919
|
+
isHeadersBucket(commonHeaders) ? commonHeaders : undefined,
|
|
28920
|
+
isHeadersBucket(methodHeaders) ? methodHeaders : undefined
|
|
28921
|
+
);
|
|
28658
28922
|
|
|
28659
28923
|
headers &&
|
|
28660
28924
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(_methodList_js__WEBPACK_IMPORTED_MODULE_6__["default"].concat('common'), (method) => {
|
|
28661
|
-
|
|
28925
|
+
if (isHeadersBucket(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(headers, method))) {
|
|
28926
|
+
delete headers[method];
|
|
28927
|
+
}
|
|
28662
28928
|
});
|
|
28663
28929
|
|
|
28664
28930
|
config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].concat(contextHeaders, headers);
|
|
@@ -28767,7 +29033,7 @@ class Axios {
|
|
|
28767
29033
|
// Provide aliases for supported request methods
|
|
28768
29034
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
28769
29035
|
/*eslint func-names:0*/
|
|
28770
|
-
Axios.prototype[method] = function (url, config) {
|
|
29036
|
+
Axios.prototype[method] = async function (url, config) {
|
|
28771
29037
|
return this.request(
|
|
28772
29038
|
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
28773
29039
|
method,
|
|
@@ -28780,7 +29046,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'hea
|
|
|
28780
29046
|
|
|
28781
29047
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
|
|
28782
29048
|
function generateHTTPMethod(isForm) {
|
|
28783
|
-
return function httpMethod(url, data, config) {
|
|
29049
|
+
return async function httpMethod(url, data, config) {
|
|
28784
29050
|
return this.request(
|
|
28785
29051
|
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
28786
29052
|
method,
|
|
@@ -28819,6 +29085,9 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch
|
|
|
28819
29085
|
|
|
28820
29086
|
"use strict";
|
|
28821
29087
|
__webpack_require__.r(__webpack_exports__);
|
|
29088
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29089
|
+
/* harmony export */ getCauseStackIndex: () => (/* binding */ getCauseStackIndex)
|
|
29090
|
+
/* harmony export */ });
|
|
28822
29091
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
28823
29092
|
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76487);
|
|
28824
29093
|
|
|
@@ -28918,6 +29187,61 @@ function aggregateErrorMessage(error) {
|
|
|
28918
29187
|
return message || error.name || 'AggregateError';
|
|
28919
29188
|
}
|
|
28920
29189
|
|
|
29190
|
+
// Shared with `Axios.prototype.request`, which splices the reconstructed
|
|
29191
|
+
// caller frames in ahead of this marker.
|
|
29192
|
+
const CAUSED_BY_SEPARATOR = '\nCaused by: ';
|
|
29193
|
+
const $causeStack = Symbol('causeStack');
|
|
29194
|
+
|
|
29195
|
+
// Match the section we appended, not marker-like text in an error message or
|
|
29196
|
+
// a replacement stack supplied by the caller. Do not re-read the cause's stack.
|
|
29197
|
+
function getCauseStackIndex(error, stack) {
|
|
29198
|
+
const causeStack = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(error, $causeStack) && error[$causeStack];
|
|
29199
|
+
|
|
29200
|
+
return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;
|
|
29201
|
+
}
|
|
29202
|
+
|
|
29203
|
+
/**
|
|
29204
|
+
* Append the stack of a wrapped error to `target.stack`.
|
|
29205
|
+
*
|
|
29206
|
+
* `cause` already exposes the original error for tooling that walks the standard
|
|
29207
|
+
* cause chain, but many error reporters read `stack` and nothing else. Inlining
|
|
29208
|
+
* the wrapped stack there means those reporters surface the underlying failure
|
|
29209
|
+
* instead of the axios frames that normalized it (see #6670).
|
|
29210
|
+
*
|
|
29211
|
+
* Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime
|
|
29212
|
+
* without stack support, or a replaced `stack` property can leave the value
|
|
29213
|
+
* missing, non-string, or read-only, and normalizing an error must not throw
|
|
29214
|
+
* because of that.
|
|
29215
|
+
*
|
|
29216
|
+
* @param {Error} target The AxiosError being built.
|
|
29217
|
+
* @param {Error} source The error being wrapped.
|
|
29218
|
+
*
|
|
29219
|
+
* @returns {void}
|
|
29220
|
+
*/
|
|
29221
|
+
function appendCauseStack(target, source) {
|
|
29222
|
+
try {
|
|
29223
|
+
const sourceStack = source && source.stack;
|
|
29224
|
+
|
|
29225
|
+
if (typeof sourceStack !== 'string' || !sourceStack) {
|
|
29226
|
+
return;
|
|
29227
|
+
}
|
|
29228
|
+
|
|
29229
|
+
const targetStack = target.stack;
|
|
29230
|
+
|
|
29231
|
+
if (typeof targetStack !== 'string' || !targetStack) {
|
|
29232
|
+
return;
|
|
29233
|
+
}
|
|
29234
|
+
|
|
29235
|
+
// Each call to `from()` creates a fresh target. Re-wrapping includes the
|
|
29236
|
+
// previous stack verbatim, adding one cause section per wrap.
|
|
29237
|
+
const causeStack = CAUSED_BY_SEPARATOR + sourceStack;
|
|
29238
|
+
target.stack = targetStack + causeStack;
|
|
29239
|
+
Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });
|
|
29240
|
+
} catch (e) {
|
|
29241
|
+
// Ignore failures from custom stack hooks or un-writable stack properties.
|
|
29242
|
+
}
|
|
29243
|
+
}
|
|
29244
|
+
|
|
28921
29245
|
class AxiosError extends Error {
|
|
28922
29246
|
static from(error, code, config, request, response, customProps) {
|
|
28923
29247
|
// `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection
|
|
@@ -28944,6 +29268,10 @@ class AxiosError extends Error {
|
|
|
28944
29268
|
});
|
|
28945
29269
|
axiosError.name = error.name;
|
|
28946
29270
|
|
|
29271
|
+
// Inline the wrapped stack for reporters that read only `stack`; the `cause`
|
|
29272
|
+
// property above already covers cause-aware tooling.
|
|
29273
|
+
appendCauseStack(axiosError, error);
|
|
29274
|
+
|
|
28947
29275
|
// Preserve status from the original error if not already set from response
|
|
28948
29276
|
if (error.status != null && axiosError.status == null) {
|
|
28949
29277
|
axiosError.status = error.status;
|
|
@@ -29042,6 +29370,7 @@ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
|
29042
29370
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
|
|
29043
29371
|
|
|
29044
29372
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
29373
|
+
/* harmony export */ "CAUSED_BY_SEPARATOR", 0, /* binding */ CAUSED_BY_SEPARATOR,
|
|
29045
29374
|
/* harmony export */ "REDACTED", 0, /* binding */ REDACTED,
|
|
29046
29375
|
/* harmony export */ "default", 0, __WEBPACK_DEFAULT_EXPORT__
|
|
29047
29376
|
/* harmony export */ ]);
|
|
@@ -29209,9 +29538,22 @@ function parseParameters(value) {
|
|
|
29209
29538
|
|
|
29210
29539
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
29211
29540
|
|
|
29541
|
+
// `__proto__` is a valid field name, and the one name the uppercase mapping at
|
|
29542
|
+
// the bottom of this file cannot reach: it is inherited from Object.prototype
|
|
29543
|
+
// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v`
|
|
29544
|
+
// runs the inherited setter. That silently discards the header, and an array
|
|
29545
|
+
// value replaces the instance prototype, taking every method with it.
|
|
29546
|
+
// Store it under the same kind of case variant that mapping uses for `set` and
|
|
29547
|
+
// `constructor`. Header lookup is caseless, so it reads back under either
|
|
29548
|
+
// spelling, and no own `__proto__` slot is ever created for a later
|
|
29549
|
+
// `Object.assign` to copy onto a plain object through the same setter.
|
|
29550
|
+
const PROTO_HEADER_SLOT = '__Proto__';
|
|
29551
|
+
|
|
29552
|
+
const headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name);
|
|
29553
|
+
|
|
29212
29554
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
29213
29555
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) {
|
|
29214
|
-
return filter.call(
|
|
29556
|
+
return filter.call(context, value, header);
|
|
29215
29557
|
}
|
|
29216
29558
|
|
|
29217
29559
|
if (isHeaderNameFilter) {
|
|
@@ -29277,7 +29619,7 @@ class AxiosHeaders {
|
|
|
29277
29619
|
_rewrite === true ||
|
|
29278
29620
|
(_rewrite === undefined && self[key] !== false)
|
|
29279
29621
|
) {
|
|
29280
|
-
self[key || _header] = normalizeValue(_value);
|
|
29622
|
+
self[headerSlot(key || _header)] = normalizeValue(_value);
|
|
29281
29623
|
}
|
|
29282
29624
|
}
|
|
29283
29625
|
|
|
@@ -29406,7 +29748,7 @@ class AxiosHeaders {
|
|
|
29406
29748
|
|
|
29407
29749
|
normalize(format) {
|
|
29408
29750
|
const self = this;
|
|
29409
|
-
const headers =
|
|
29751
|
+
const headers = Object.create(null);
|
|
29410
29752
|
|
|
29411
29753
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
|
|
29412
29754
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header);
|
|
@@ -29417,7 +29759,7 @@ class AxiosHeaders {
|
|
|
29417
29759
|
return;
|
|
29418
29760
|
}
|
|
29419
29761
|
|
|
29420
|
-
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
29762
|
+
const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());
|
|
29421
29763
|
|
|
29422
29764
|
if (normalized !== header) {
|
|
29423
29765
|
delete self[header];
|
|
@@ -29568,6 +29910,16 @@ function trimHandlers(handlers) {
|
|
|
29568
29910
|
}
|
|
29569
29911
|
}
|
|
29570
29912
|
|
|
29913
|
+
// Preserve the array-key coercion used before IDs were stored in a Map, without
|
|
29914
|
+
// treating null, empty strings, or noncanonical numeric strings as ID zero.
|
|
29915
|
+
function normalizeHandlerId(id) {
|
|
29916
|
+
if (typeof id === 'string' && id !== '' && String(Number(id)) === id) {
|
|
29917
|
+
return Number(id);
|
|
29918
|
+
}
|
|
29919
|
+
|
|
29920
|
+
return id;
|
|
29921
|
+
}
|
|
29922
|
+
|
|
29571
29923
|
function syncHandlerEntries(manager, internals) {
|
|
29572
29924
|
const handlers = manager.handlers;
|
|
29573
29925
|
const length = countHandlers(handlers);
|
|
@@ -29650,10 +30002,11 @@ class InterceptorManager {
|
|
|
29650
30002
|
|
|
29651
30003
|
syncHandlerEntries(this, internals);
|
|
29652
30004
|
|
|
29653
|
-
const
|
|
30005
|
+
const handlerId = normalizeHandlerId(id);
|
|
30006
|
+
const entry = internals.handlerEntries.get(handlerId);
|
|
29654
30007
|
|
|
29655
30008
|
if (entry) {
|
|
29656
|
-
internals.handlerEntries.delete(
|
|
30009
|
+
internals.handlerEntries.delete(handlerId);
|
|
29657
30010
|
|
|
29658
30011
|
// Ignore IDs invalidated by clear or direct replacement of handlers.
|
|
29659
30012
|
if (this.handlers[entry.index] !== entry.handler) {
|
|
@@ -29722,6 +30075,69 @@ class InterceptorManager {
|
|
|
29722
30075
|
/* harmony export */ ]);
|
|
29723
30076
|
|
|
29724
30077
|
|
|
30078
|
+
/***/ },
|
|
30079
|
+
|
|
30080
|
+
/***/ 30035
|
|
30081
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
30082
|
+
|
|
30083
|
+
"use strict";
|
|
30084
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30085
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30086
|
+
/* harmony export */ "default": () => (/* binding */ assertParamsAcyclic)
|
|
30087
|
+
/* harmony export */ });
|
|
30088
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
30089
|
+
/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19011);
|
|
30090
|
+
|
|
30091
|
+
|
|
30092
|
+
|
|
30093
|
+
|
|
30094
|
+
|
|
30095
|
+
function assertParamsAcyclic(params) {
|
|
30096
|
+
const pending = [{ value: params }];
|
|
30097
|
+
const active = new WeakSet();
|
|
30098
|
+
const visited = new WeakSet();
|
|
30099
|
+
|
|
30100
|
+
while (pending.length) {
|
|
30101
|
+
const { value, done } = pending.pop();
|
|
30102
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value) && !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) continue;
|
|
30103
|
+
if (done) {
|
|
30104
|
+
active.delete(value);
|
|
30105
|
+
continue;
|
|
30106
|
+
}
|
|
30107
|
+
if (active.has(value)) {
|
|
30108
|
+
throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
30109
|
+
'Circular reference detected in params',
|
|
30110
|
+
_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE
|
|
30111
|
+
);
|
|
30112
|
+
}
|
|
30113
|
+
if (visited.has(value)) continue;
|
|
30114
|
+
visited.add(value);
|
|
30115
|
+
active.add(value);
|
|
30116
|
+
pending.push({ value, done: true });
|
|
30117
|
+
|
|
30118
|
+
const keys = Object.keys(value);
|
|
30119
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
30120
|
+
Object.getOwnPropertySymbols(value).forEach((key) => {
|
|
30121
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
30122
|
+
if (descriptor && descriptor.enumerable) keys.push(key);
|
|
30123
|
+
});
|
|
30124
|
+
}
|
|
30125
|
+
// Shallow array elements retain fields filtered during plain-object merges.
|
|
30126
|
+
// Inspect reserved data properties without evaluating their accessors.
|
|
30127
|
+
keys.forEach((key) => {
|
|
30128
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
30129
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
30130
|
+
if (descriptor && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(descriptor, 'value')) {
|
|
30131
|
+
pending.push({ value: descriptor.value });
|
|
30132
|
+
}
|
|
30133
|
+
} else {
|
|
30134
|
+
pending.push({ value: value[key] });
|
|
30135
|
+
}
|
|
30136
|
+
});
|
|
30137
|
+
}
|
|
30138
|
+
}
|
|
30139
|
+
|
|
30140
|
+
|
|
29725
30141
|
/***/ },
|
|
29726
30142
|
|
|
29727
30143
|
/***/ 22921
|
|
@@ -29814,6 +30230,59 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
|
29814
30230
|
}
|
|
29815
30231
|
|
|
29816
30232
|
|
|
30233
|
+
/***/ },
|
|
30234
|
+
|
|
30235
|
+
/***/ 82531
|
|
30236
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
30237
|
+
|
|
30238
|
+
"use strict";
|
|
30239
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30240
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30241
|
+
/* harmony export */ "default": () => (/* binding */ createMultipartBody)
|
|
30242
|
+
/* harmony export */ });
|
|
30243
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
30244
|
+
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79455);
|
|
30245
|
+
/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19011);
|
|
30246
|
+
/* harmony import */ var _helpers_formDataToBlob_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59893);
|
|
30247
|
+
|
|
30248
|
+
|
|
30249
|
+
|
|
30250
|
+
|
|
30251
|
+
|
|
30252
|
+
function createMultipartBody(form, Blob, limit, limitError, boundary) {
|
|
30253
|
+
// Report missing Blob support before trying to select a random source.
|
|
30254
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(Blob)) {
|
|
30255
|
+
throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported', _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT);
|
|
30256
|
+
}
|
|
30257
|
+
|
|
30258
|
+
if (boundary === undefined) {
|
|
30259
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].generateString)) {
|
|
30260
|
+
boundary = 'axios-' + _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].generateString(36, '0123456789abcdef');
|
|
30261
|
+
} else {
|
|
30262
|
+
const crypto = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global.crypto;
|
|
30263
|
+
if (!crypto || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(crypto.getRandomValues)) {
|
|
30264
|
+
throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Random byte generation is not supported', _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT);
|
|
30265
|
+
}
|
|
30266
|
+
const random = new Uint8Array(18);
|
|
30267
|
+
crypto.getRandomValues(random);
|
|
30268
|
+
boundary =
|
|
30269
|
+
'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join('');
|
|
30270
|
+
}
|
|
30271
|
+
}
|
|
30272
|
+
|
|
30273
|
+
try {
|
|
30274
|
+
return (0,_helpers_formDataToBlob_js__WEBPACK_IMPORTED_MODULE_3__["default"])(form, Blob, limit, limitError, boundary);
|
|
30275
|
+
} catch (error) {
|
|
30276
|
+
if (error instanceof _helpers_formDataToBlob_js__WEBPACK_IMPORTED_MODULE_3__.FormDataError) {
|
|
30277
|
+
const code =
|
|
30278
|
+
error.reason === 'boundary' ? _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_OPTION_VALUE : _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST;
|
|
30279
|
+
throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](error.message, code);
|
|
30280
|
+
}
|
|
30281
|
+
throw error;
|
|
30282
|
+
}
|
|
30283
|
+
}
|
|
30284
|
+
|
|
30285
|
+
|
|
29817
30286
|
/***/ },
|
|
29818
30287
|
|
|
29819
30288
|
/***/ 97844
|
|
@@ -29858,6 +30327,21 @@ function throwIfCancellationRequested(config) {
|
|
|
29858
30327
|
}
|
|
29859
30328
|
}
|
|
29860
30329
|
|
|
30330
|
+
/**
|
|
30331
|
+
* Milliseconds elapsed since `start`, floored at zero.
|
|
30332
|
+
*
|
|
30333
|
+
* Wall-clock, to match the rest of the codebase (speedometer, throttle,
|
|
30334
|
+
* AxiosTransformStream). A backwards clock adjustment mid-request would
|
|
30335
|
+
* otherwise produce a negative duration, so the result is clamped.
|
|
30336
|
+
*
|
|
30337
|
+
* @param {number} start Timestamp from `Date.now()`
|
|
30338
|
+
*
|
|
30339
|
+
* @returns {number} Non-negative elapsed milliseconds
|
|
30340
|
+
*/
|
|
30341
|
+
function elapsedSince(start) {
|
|
30342
|
+
return Math.max(0, Date.now() - start);
|
|
30343
|
+
}
|
|
30344
|
+
|
|
29861
30345
|
/**
|
|
29862
30346
|
* Dispatch a request to the server using the configured adapter.
|
|
29863
30347
|
*
|
|
@@ -29884,10 +30368,14 @@ function dispatchRequest(_config) {
|
|
|
29884
30368
|
|
|
29885
30369
|
const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].adapter, config);
|
|
29886
30370
|
|
|
30371
|
+
const start = Date.now();
|
|
30372
|
+
|
|
29887
30373
|
return adapter(config).then(
|
|
29888
30374
|
function onAdapterResolution(response) {
|
|
29889
30375
|
throwIfCancellationRequested(config);
|
|
29890
30376
|
|
|
30377
|
+
response.duration = elapsedSince(start);
|
|
30378
|
+
|
|
29891
30379
|
// Expose the current response on config so that transformResponse can
|
|
29892
30380
|
// attach it to any AxiosError it throws (e.g. on JSON parse failure).
|
|
29893
30381
|
// We clean it up afterwards to avoid polluting the config object.
|
|
@@ -29908,6 +30396,7 @@ function dispatchRequest(_config) {
|
|
|
29908
30396
|
|
|
29909
30397
|
// Transform response data
|
|
29910
30398
|
if (reason && reason.response) {
|
|
30399
|
+
reason.response.duration = elapsedSince(start);
|
|
29911
30400
|
config.response = reason.response;
|
|
29912
30401
|
try {
|
|
29913
30402
|
reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
@@ -29940,6 +30429,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29940
30429
|
/* harmony export */ });
|
|
29941
30430
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
29942
30431
|
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76487);
|
|
30432
|
+
/* harmony import */ var _assertParamsAcyclic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30035);
|
|
30433
|
+
|
|
29943
30434
|
|
|
29944
30435
|
|
|
29945
30436
|
|
|
@@ -29950,14 +30441,184 @@ const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_I
|
|
|
29950
30441
|
const ownEnumerableKeys = (thing) => {
|
|
29951
30442
|
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
29952
30443
|
return Object.keys(thing).concat(
|
|
29953
|
-
Object.getOwnPropertySymbols(thing).filter(
|
|
29954
|
-
|
|
29955
|
-
|
|
30444
|
+
Object.getOwnPropertySymbols(thing).filter((symbol) => {
|
|
30445
|
+
const descriptor = Object.getOwnPropertyDescriptor(thing, symbol);
|
|
30446
|
+
return descriptor && descriptor.enumerable;
|
|
30447
|
+
})
|
|
29956
30448
|
);
|
|
29957
30449
|
}
|
|
29958
30450
|
return Object.keys(thing);
|
|
29959
30451
|
};
|
|
29960
30452
|
|
|
30453
|
+
// Copy params without recursive merges so the serializer remains responsible
|
|
30454
|
+
// for its depth policy. Only visit defaults that contribute to the result.
|
|
30455
|
+
function mergeParams(a, b) {
|
|
30456
|
+
const pending = [];
|
|
30457
|
+
const copies = new WeakMap();
|
|
30458
|
+
const empty = {};
|
|
30459
|
+
|
|
30460
|
+
function copy(target, source) {
|
|
30461
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
30462
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source) ? source.slice() : source;
|
|
30463
|
+
}
|
|
30464
|
+
|
|
30465
|
+
const base = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) ? target : empty;
|
|
30466
|
+
let bases = copies.get(source);
|
|
30467
|
+
if (!bases) {
|
|
30468
|
+
bases = new WeakMap();
|
|
30469
|
+
copies.set(source, bases);
|
|
30470
|
+
}
|
|
30471
|
+
if (bases.has(base)) return bases.get(base);
|
|
30472
|
+
|
|
30473
|
+
const result = {};
|
|
30474
|
+
bases.set(base, result);
|
|
30475
|
+
pending.push({ base, source, result });
|
|
30476
|
+
return result;
|
|
30477
|
+
}
|
|
30478
|
+
|
|
30479
|
+
const result = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b) ? copy(undefined, a) : copy(a, b);
|
|
30480
|
+
while (pending.length) {
|
|
30481
|
+
const { base, source, result: target } = pending.pop();
|
|
30482
|
+
const baseKeys = new Set(ownEnumerableKeys(base));
|
|
30483
|
+
const sourceKeys = new Set(ownEnumerableKeys(source));
|
|
30484
|
+
const keys = new Set([...baseKeys, ...sourceKeys]);
|
|
30485
|
+
|
|
30486
|
+
keys.forEach((key) => {
|
|
30487
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') return;
|
|
30488
|
+
const hasSource = sourceKeys.has(key);
|
|
30489
|
+
const value = hasSource ? source[key] : undefined;
|
|
30490
|
+
const previous =
|
|
30491
|
+
(!hasSource || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined;
|
|
30492
|
+
target[key] = hasSource ? copy(previous, value) : copy(undefined, previous);
|
|
30493
|
+
});
|
|
30494
|
+
}
|
|
30495
|
+
|
|
30496
|
+
;(0,_assertParamsAcyclic_js__WEBPACK_IMPORTED_MODULE_2__["default"])(result);
|
|
30497
|
+
return result;
|
|
30498
|
+
}
|
|
30499
|
+
|
|
30500
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
30501
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
30502
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({ caseless }, target, source);
|
|
30503
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
30504
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge({}, source);
|
|
30505
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
|
|
30506
|
+
return source.slice();
|
|
30507
|
+
}
|
|
30508
|
+
return source;
|
|
30509
|
+
}
|
|
30510
|
+
|
|
30511
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
30512
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
|
|
30513
|
+
return getMergedValue(a, b, prop, caseless);
|
|
30514
|
+
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
|
|
30515
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
30516
|
+
}
|
|
30517
|
+
}
|
|
30518
|
+
|
|
30519
|
+
// eslint-disable-next-line consistent-return
|
|
30520
|
+
function valueFromConfig2(a, b) {
|
|
30521
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
|
|
30522
|
+
return getMergedValue(undefined, b);
|
|
30523
|
+
}
|
|
30524
|
+
}
|
|
30525
|
+
|
|
30526
|
+
// eslint-disable-next-line consistent-return
|
|
30527
|
+
function defaultToConfig2(a, b) {
|
|
30528
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
|
|
30529
|
+
return getMergedValue(undefined, b);
|
|
30530
|
+
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
|
|
30531
|
+
return getMergedValue(undefined, a);
|
|
30532
|
+
}
|
|
30533
|
+
}
|
|
30534
|
+
|
|
30535
|
+
function getMergedTransitionalOption(config1, config2, prop) {
|
|
30536
|
+
const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional')
|
|
30537
|
+
? config2.transitional
|
|
30538
|
+
: undefined;
|
|
30539
|
+
|
|
30540
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
|
|
30541
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
|
|
30542
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional2, prop)) {
|
|
30543
|
+
return transitional2[prop];
|
|
30544
|
+
}
|
|
30545
|
+
} else {
|
|
30546
|
+
return undefined;
|
|
30547
|
+
}
|
|
30548
|
+
}
|
|
30549
|
+
|
|
30550
|
+
const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional')
|
|
30551
|
+
? config1.transitional
|
|
30552
|
+
: undefined;
|
|
30553
|
+
|
|
30554
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional1) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional1, prop)) {
|
|
30555
|
+
return transitional1[prop];
|
|
30556
|
+
}
|
|
30557
|
+
|
|
30558
|
+
return undefined;
|
|
30559
|
+
}
|
|
30560
|
+
|
|
30561
|
+
// eslint-disable-next-line consistent-return
|
|
30562
|
+
function mergeDirectKeys(a, b, prop, config1, config2) {
|
|
30563
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
|
|
30564
|
+
return getMergedValue(a, b);
|
|
30565
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop)) {
|
|
30566
|
+
return getMergedValue(undefined, a);
|
|
30567
|
+
}
|
|
30568
|
+
}
|
|
30569
|
+
|
|
30570
|
+
function mergeHeaders(a, b, prop) {
|
|
30571
|
+
return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
|
|
30572
|
+
}
|
|
30573
|
+
|
|
30574
|
+
// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn
|
|
30575
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
30576
|
+
// defineProperty only reads it, so one shared instance serves every call.
|
|
30577
|
+
const hasOwnPropertyDescriptor = Object.freeze({
|
|
30578
|
+
__proto__: null,
|
|
30579
|
+
value: Object.prototype.hasOwnProperty,
|
|
30580
|
+
enumerable: false,
|
|
30581
|
+
writable: true,
|
|
30582
|
+
configurable: true,
|
|
30583
|
+
});
|
|
30584
|
+
|
|
30585
|
+
// The strategy table and the strategies above are stateless, so they are
|
|
30586
|
+
// built once at module load instead of on every call: mergeConfig runs at
|
|
30587
|
+
// most twice per request (once from a method alias, once from `_request`).
|
|
30588
|
+
const mergeMap = {
|
|
30589
|
+
url: valueFromConfig2,
|
|
30590
|
+
method: valueFromConfig2,
|
|
30591
|
+
data: valueFromConfig2,
|
|
30592
|
+
baseURL: defaultToConfig2,
|
|
30593
|
+
transformRequest: defaultToConfig2,
|
|
30594
|
+
transformResponse: defaultToConfig2,
|
|
30595
|
+
params: mergeParams,
|
|
30596
|
+
paramsSerializer: defaultToConfig2,
|
|
30597
|
+
timeout: defaultToConfig2,
|
|
30598
|
+
timeoutErrorMessage: defaultToConfig2,
|
|
30599
|
+
withCredentials: defaultToConfig2,
|
|
30600
|
+
withXSRFToken: defaultToConfig2,
|
|
30601
|
+
adapter: defaultToConfig2,
|
|
30602
|
+
responseType: defaultToConfig2,
|
|
30603
|
+
xsrfCookieName: defaultToConfig2,
|
|
30604
|
+
xsrfHeaderName: defaultToConfig2,
|
|
30605
|
+
onUploadProgress: defaultToConfig2,
|
|
30606
|
+
onDownloadProgress: defaultToConfig2,
|
|
30607
|
+
decompress: defaultToConfig2,
|
|
30608
|
+
maxContentLength: defaultToConfig2,
|
|
30609
|
+
maxBodyLength: defaultToConfig2,
|
|
30610
|
+
beforeRedirect: defaultToConfig2,
|
|
30611
|
+
transport: defaultToConfig2,
|
|
30612
|
+
httpAgent: defaultToConfig2,
|
|
30613
|
+
httpsAgent: defaultToConfig2,
|
|
30614
|
+
cancelToken: defaultToConfig2,
|
|
30615
|
+
socketPath: defaultToConfig2,
|
|
30616
|
+
allowedSocketPaths: defaultToConfig2,
|
|
30617
|
+
responseEncoding: defaultToConfig2,
|
|
30618
|
+
validateStatus: mergeDirectKeys,
|
|
30619
|
+
headers: mergeHeaders,
|
|
30620
|
+
};
|
|
30621
|
+
|
|
29961
30622
|
/**
|
|
29962
30623
|
* Config-specific merge-function which creates a new config-object
|
|
29963
30624
|
* by merging two configuration objects together.
|
|
@@ -29977,133 +30638,25 @@ function mergeConfig(config1, config2) {
|
|
|
29977
30638
|
// `hasOwnProperty` is restored as a non-enumerable own slot to preserve
|
|
29978
30639
|
// ergonomics for user code that relies on it.
|
|
29979
30640
|
const config = Object.create(null);
|
|
29980
|
-
Object.defineProperty(config, 'hasOwnProperty',
|
|
29981
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
29982
|
-
// this data descriptor into an accessor descriptor on the way in.
|
|
29983
|
-
__proto__: null,
|
|
29984
|
-
value: Object.prototype.hasOwnProperty,
|
|
29985
|
-
enumerable: false,
|
|
29986
|
-
writable: true,
|
|
29987
|
-
configurable: true,
|
|
29988
|
-
});
|
|
29989
|
-
|
|
29990
|
-
function getMergedValue(target, source, prop, caseless) {
|
|
29991
|
-
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
29992
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({ caseless }, target, source);
|
|
29993
|
-
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
29994
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge({}, source);
|
|
29995
|
-
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
|
|
29996
|
-
return source.slice();
|
|
29997
|
-
}
|
|
29998
|
-
return source;
|
|
29999
|
-
}
|
|
30000
|
-
|
|
30001
|
-
function mergeDeepProperties(a, b, prop, caseless) {
|
|
30002
|
-
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
|
|
30003
|
-
return getMergedValue(a, b, prop, caseless);
|
|
30004
|
-
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
|
|
30005
|
-
return getMergedValue(undefined, a, prop, caseless);
|
|
30006
|
-
}
|
|
30007
|
-
}
|
|
30008
|
-
|
|
30009
|
-
// eslint-disable-next-line consistent-return
|
|
30010
|
-
function valueFromConfig2(a, b) {
|
|
30011
|
-
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
|
|
30012
|
-
return getMergedValue(undefined, b);
|
|
30013
|
-
}
|
|
30014
|
-
}
|
|
30015
|
-
|
|
30016
|
-
// eslint-disable-next-line consistent-return
|
|
30017
|
-
function defaultToConfig2(a, b) {
|
|
30018
|
-
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
|
|
30019
|
-
return getMergedValue(undefined, b);
|
|
30020
|
-
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(a)) {
|
|
30021
|
-
return getMergedValue(undefined, a);
|
|
30022
|
-
}
|
|
30023
|
-
}
|
|
30024
|
-
|
|
30025
|
-
function getMergedTransitionalOption(prop) {
|
|
30026
|
-
const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional')
|
|
30027
|
-
? config2.transitional
|
|
30028
|
-
: undefined;
|
|
30029
|
-
|
|
30030
|
-
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
|
|
30031
|
-
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
|
|
30032
|
-
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional2, prop)) {
|
|
30033
|
-
return transitional2[prop];
|
|
30034
|
-
}
|
|
30035
|
-
} else {
|
|
30036
|
-
return undefined;
|
|
30037
|
-
}
|
|
30038
|
-
}
|
|
30641
|
+
Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor);
|
|
30039
30642
|
|
|
30040
|
-
|
|
30041
|
-
? config1.transitional
|
|
30042
|
-
: undefined;
|
|
30643
|
+
const keys = ownEnumerableKeys({ ...config1, ...config2 });
|
|
30043
30644
|
|
|
30044
|
-
|
|
30045
|
-
|
|
30046
|
-
|
|
30047
|
-
|
|
30048
|
-
return undefined;
|
|
30049
|
-
}
|
|
30050
|
-
|
|
30051
|
-
// eslint-disable-next-line consistent-return
|
|
30052
|
-
function mergeDirectKeys(a, b, prop) {
|
|
30053
|
-
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
|
|
30054
|
-
return getMergedValue(a, b);
|
|
30055
|
-
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop)) {
|
|
30056
|
-
return getMergedValue(undefined, a);
|
|
30057
|
-
}
|
|
30058
|
-
}
|
|
30059
|
-
|
|
30060
|
-
const mergeMap = {
|
|
30061
|
-
url: valueFromConfig2,
|
|
30062
|
-
method: valueFromConfig2,
|
|
30063
|
-
data: valueFromConfig2,
|
|
30064
|
-
baseURL: defaultToConfig2,
|
|
30065
|
-
transformRequest: defaultToConfig2,
|
|
30066
|
-
transformResponse: defaultToConfig2,
|
|
30067
|
-
paramsSerializer: defaultToConfig2,
|
|
30068
|
-
timeout: defaultToConfig2,
|
|
30069
|
-
timeoutErrorMessage: defaultToConfig2,
|
|
30070
|
-
withCredentials: defaultToConfig2,
|
|
30071
|
-
withXSRFToken: defaultToConfig2,
|
|
30072
|
-
adapter: defaultToConfig2,
|
|
30073
|
-
responseType: defaultToConfig2,
|
|
30074
|
-
xsrfCookieName: defaultToConfig2,
|
|
30075
|
-
xsrfHeaderName: defaultToConfig2,
|
|
30076
|
-
onUploadProgress: defaultToConfig2,
|
|
30077
|
-
onDownloadProgress: defaultToConfig2,
|
|
30078
|
-
decompress: defaultToConfig2,
|
|
30079
|
-
maxContentLength: defaultToConfig2,
|
|
30080
|
-
maxBodyLength: defaultToConfig2,
|
|
30081
|
-
beforeRedirect: defaultToConfig2,
|
|
30082
|
-
transport: defaultToConfig2,
|
|
30083
|
-
httpAgent: defaultToConfig2,
|
|
30084
|
-
httpsAgent: defaultToConfig2,
|
|
30085
|
-
cancelToken: defaultToConfig2,
|
|
30086
|
-
socketPath: defaultToConfig2,
|
|
30087
|
-
allowedSocketPaths: defaultToConfig2,
|
|
30088
|
-
responseEncoding: defaultToConfig2,
|
|
30089
|
-
validateStatus: mergeDirectKeys,
|
|
30090
|
-
headers: (a, b, prop) =>
|
|
30091
|
-
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
30092
|
-
};
|
|
30093
|
-
|
|
30094
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
30095
|
-
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
30645
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
30646
|
+
const prop = keys[i];
|
|
30647
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue;
|
|
30096
30648
|
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
30097
30649
|
const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
30098
30650
|
const b = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
30099
|
-
const configValue =
|
|
30651
|
+
const configValue =
|
|
30652
|
+
merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop);
|
|
30100
30653
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
30101
|
-
}
|
|
30654
|
+
}
|
|
30102
30655
|
|
|
30103
30656
|
if (
|
|
30104
30657
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'validateStatus') &&
|
|
30105
30658
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(config2.validateStatus) &&
|
|
30106
|
-
getMergedTransitionalOption('validateStatusUndefinedResolves') === false
|
|
30659
|
+
getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false
|
|
30107
30660
|
) {
|
|
30108
30661
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'validateStatus')) {
|
|
30109
30662
|
config.validateStatus = getMergedValue(undefined, config1.validateStatus);
|
|
@@ -30483,6 +31036,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30483
31036
|
legacyInterceptorReqResOrdering: true,
|
|
30484
31037
|
advertiseZstdAcceptEncoding: false,
|
|
30485
31038
|
validateStatusUndefinedResolves: true,
|
|
31039
|
+
encodeBasicAuthUsername: false,
|
|
30486
31040
|
});
|
|
30487
31041
|
|
|
30488
31042
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
@@ -30497,7 +31051,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30497
31051
|
|
|
30498
31052
|
"use strict";
|
|
30499
31053
|
__webpack_require__.r(__webpack_exports__);
|
|
30500
|
-
const VERSION = "1.
|
|
31054
|
+
const VERSION = "1.21.0";
|
|
30501
31055
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
30502
31056
|
/* harmony export */ "VERSION", 0, /* binding */ VERSION
|
|
30503
31057
|
/* harmony export */ ]);
|
|
@@ -30868,12 +31422,15 @@ const composeSignals = (signals, timeout) => {
|
|
|
30868
31422
|
}, timeout);
|
|
30869
31423
|
|
|
30870
31424
|
const unsubscribe = () => {
|
|
30871
|
-
if (!signals) {
|
|
31425
|
+
if (!signals) {
|
|
31426
|
+
return;
|
|
31427
|
+
}
|
|
30872
31428
|
timer && clearTimeout(timer);
|
|
30873
31429
|
timer = null;
|
|
30874
31430
|
signals.forEach((signal) => {
|
|
30875
|
-
signal
|
|
30876
|
-
|
|
31431
|
+
const unsubscribeSignal = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].getSafeProp(signal, 'unsubscribe');
|
|
31432
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(unsubscribeSignal)
|
|
31433
|
+
? unsubscribeSignal.call(signal, onabort)
|
|
30877
31434
|
: signal.removeEventListener('abort', onabort);
|
|
30878
31435
|
});
|
|
30879
31436
|
signals = null;
|
|
@@ -30918,6 +31475,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30918
31475
|
|
|
30919
31476
|
|
|
30920
31477
|
|
|
31478
|
+
const decodeCookieValue = (value) => {
|
|
31479
|
+
try {
|
|
31480
|
+
return decodeURIComponent(value);
|
|
31481
|
+
} catch (e) {
|
|
31482
|
+
return value;
|
|
31483
|
+
}
|
|
31484
|
+
};
|
|
31485
|
+
|
|
30921
31486
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
|
|
30922
31487
|
? // Standard browser envs support document.cookie
|
|
30923
31488
|
{
|
|
@@ -30947,26 +31512,39 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30947
31512
|
|
|
30948
31513
|
read(name) {
|
|
30949
31514
|
if (typeof document === 'undefined') return null;
|
|
31515
|
+
const cookieString = document.cookie;
|
|
31516
|
+
if (!cookieString) return null;
|
|
30950
31517
|
// Match name=value by splitting on the semicolon separator instead of building a
|
|
30951
31518
|
// RegExp from `name` — interpolating an unescaped string into a RegExp would let
|
|
30952
31519
|
// metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
|
|
30953
31520
|
// match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
|
|
30954
31521
|
// "; ", so ignore optional whitespace before each cookie name.
|
|
30955
|
-
const cookies =
|
|
31522
|
+
const cookies = cookieString.split(';');
|
|
30956
31523
|
for (let i = 0; i < cookies.length; i++) {
|
|
30957
31524
|
const cookie = cookies[i].replace(/^\s+/, '');
|
|
30958
31525
|
const eq = cookie.indexOf('=');
|
|
30959
31526
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
30960
|
-
|
|
30961
|
-
return decodeURIComponent(cookie.slice(eq + 1));
|
|
30962
|
-
} catch (e) {
|
|
30963
|
-
return cookie.slice(eq + 1);
|
|
30964
|
-
}
|
|
31527
|
+
return decodeCookieValue(cookie.slice(eq + 1));
|
|
30965
31528
|
}
|
|
30966
31529
|
}
|
|
30967
31530
|
return null;
|
|
30968
31531
|
},
|
|
30969
31532
|
|
|
31533
|
+
async readAsync(name) {
|
|
31534
|
+
try {
|
|
31535
|
+
const store = typeof window !== 'undefined' && window.cookieStore;
|
|
31536
|
+
if (store && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(store.get)) {
|
|
31537
|
+
const cookie = await store.get(name);
|
|
31538
|
+
// Both APIs expose stored bytes; preserve Axios's existing URI decoding.
|
|
31539
|
+
return cookie ? decodeCookieValue(cookie.value) : null;
|
|
31540
|
+
}
|
|
31541
|
+
} catch (e) {
|
|
31542
|
+
// Restricted or unavailable storage retains the synchronous fallback.
|
|
31543
|
+
}
|
|
31544
|
+
|
|
31545
|
+
return this.read(name);
|
|
31546
|
+
},
|
|
31547
|
+
|
|
30970
31548
|
remove(name) {
|
|
30971
31549
|
this.write(name, '', Date.now() - 86400000, '/');
|
|
30972
31550
|
},
|
|
@@ -30977,6 +31555,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30977
31555
|
read() {
|
|
30978
31556
|
return null;
|
|
30979
31557
|
},
|
|
31558
|
+
async readAsync() {
|
|
31559
|
+
return null;
|
|
31560
|
+
},
|
|
30980
31561
|
remove() {},
|
|
30981
31562
|
});
|
|
30982
31563
|
|
|
@@ -31000,7 +31581,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
31000
31581
|
* Estimate data: URL byte lengths *without* allocating large buffers.
|
|
31001
31582
|
* - Fetch percent-decodes a base64 body before decoding it.
|
|
31002
31583
|
* - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
|
|
31003
|
-
*
|
|
31584
|
+
* percent-decoded body, including ignored characters and content after padding.
|
|
31004
31585
|
* - Non-base64 data is percent-decoded and then encoded as UTF-8.
|
|
31005
31586
|
*/
|
|
31006
31587
|
const isHexDigit = (charCode) =>
|
|
@@ -31048,6 +31629,31 @@ const estimateBase64BufferAllocation = (body) => {
|
|
|
31048
31629
|
return Math.floor(((len - padding) * 3) / 4);
|
|
31049
31630
|
};
|
|
31050
31631
|
|
|
31632
|
+
const estimatePercentDecodedBase64BufferAllocation = (body) => {
|
|
31633
|
+
// Ordinary Base64 needs only its length and trailing padding.
|
|
31634
|
+
if (body.indexOf('%') === -1) {
|
|
31635
|
+
return estimateBase64BufferAllocation(body);
|
|
31636
|
+
}
|
|
31637
|
+
|
|
31638
|
+
let length = 0;
|
|
31639
|
+
let previous = 0;
|
|
31640
|
+
let last = 0;
|
|
31641
|
+
|
|
31642
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
31643
|
+
let code = body.charCodeAt(i);
|
|
31644
|
+
if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
|
|
31645
|
+
code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
|
|
31646
|
+
i += 2;
|
|
31647
|
+
}
|
|
31648
|
+
length++;
|
|
31649
|
+
previous = last;
|
|
31650
|
+
last = code;
|
|
31651
|
+
}
|
|
31652
|
+
|
|
31653
|
+
const padding = last === 61 ? (previous === 61 ? 2 : 1) : 0;
|
|
31654
|
+
return Math.floor(((length - padding) * 3) / 4);
|
|
31655
|
+
};
|
|
31656
|
+
|
|
31051
31657
|
const estimatePercentDecodedBase64Bytes = (body) => {
|
|
31052
31658
|
const len = body.length;
|
|
31053
31659
|
let significant = 0;
|
|
@@ -31093,16 +31699,16 @@ const estimatePercentDecodedBase64Bytes = (body) => {
|
|
|
31093
31699
|
return base64Bytes(significant);
|
|
31094
31700
|
};
|
|
31095
31701
|
|
|
31096
|
-
const estimateDataURLBytes = (url, estimateBase64) => {
|
|
31702
|
+
const estimateDataURLBytes = (url, estimateBase64, base64Pattern) => {
|
|
31097
31703
|
if (!url || typeof url !== 'string') return 0;
|
|
31098
|
-
if (
|
|
31704
|
+
if (!/^data:/i.test(url)) return 0;
|
|
31099
31705
|
|
|
31100
31706
|
const comma = url.indexOf(',');
|
|
31101
31707
|
if (comma < 0) return 0;
|
|
31102
31708
|
|
|
31103
31709
|
const meta = url.slice(5, comma);
|
|
31104
31710
|
const body = url.slice(comma + 1);
|
|
31105
|
-
const isBase64 =
|
|
31711
|
+
const isBase64 = base64Pattern.test(meta);
|
|
31106
31712
|
|
|
31107
31713
|
if (isBase64) {
|
|
31108
31714
|
return estimateBase64(body);
|
|
@@ -31149,18 +31755,147 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
31149
31755
|
|
|
31150
31756
|
return estimateDataURLBytes(
|
|
31151
31757
|
fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
|
|
31152
|
-
estimatePercentDecodedBase64Bytes
|
|
31758
|
+
estimatePercentDecodedBase64Bytes,
|
|
31759
|
+
/; *base64[\t\n\f\r ]*$/i
|
|
31153
31760
|
);
|
|
31154
31761
|
}
|
|
31155
31762
|
|
|
31156
31763
|
/**
|
|
31157
|
-
* Estimate the Buffer backing allocation used
|
|
31764
|
+
* Estimate the Buffer backing allocation used after Node's percent-decoding step.
|
|
31158
31765
|
*
|
|
31159
31766
|
* @param {string} url
|
|
31160
31767
|
* @returns {number}
|
|
31161
31768
|
*/
|
|
31162
31769
|
function estimateDataURLBufferAllocation(url) {
|
|
31163
|
-
|
|
31770
|
+
// Match fromDataURI's case-insensitive protocol and encoding suffix.
|
|
31771
|
+
return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);
|
|
31772
|
+
}
|
|
31773
|
+
|
|
31774
|
+
|
|
31775
|
+
/***/ },
|
|
31776
|
+
|
|
31777
|
+
/***/ 59893
|
|
31778
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
31779
|
+
|
|
31780
|
+
"use strict";
|
|
31781
|
+
__webpack_require__.r(__webpack_exports__);
|
|
31782
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
31783
|
+
/* harmony export */ FormDataError: () => (/* binding */ FormDataError),
|
|
31784
|
+
/* harmony export */ "default": () => (/* binding */ formDataToBlob)
|
|
31785
|
+
/* harmony export */ });
|
|
31786
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
31787
|
+
|
|
31788
|
+
|
|
31789
|
+
const CRLF = '\r\n';
|
|
31790
|
+
const normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF);
|
|
31791
|
+
const escapeName = (value) =>
|
|
31792
|
+
String(value).replace(/[\r\n"]/g, (char) =>
|
|
31793
|
+
char === '\r' ? '%0D' : char === '\n' ? '%0A' : '%22'
|
|
31794
|
+
);
|
|
31795
|
+
|
|
31796
|
+
// Count UTF-8 bytes without allocating an encoded copy of a field. FormData
|
|
31797
|
+
// string values normalize line endings; Blob/File contents remain unchanged.
|
|
31798
|
+
const stringBytes = (value, normalize) => {
|
|
31799
|
+
let length = 0;
|
|
31800
|
+
for (let i = 0; i < value.length; i++) {
|
|
31801
|
+
const code = value.charCodeAt(i);
|
|
31802
|
+
if (normalize && (code === 13 || code === 10)) {
|
|
31803
|
+
if (code === 13 && value.charCodeAt(i + 1) === 10) i++;
|
|
31804
|
+
length += 2;
|
|
31805
|
+
} else if (code < 0x80) {
|
|
31806
|
+
length++;
|
|
31807
|
+
} else if (code < 0x800) {
|
|
31808
|
+
length += 2;
|
|
31809
|
+
} else if (
|
|
31810
|
+
code >= 0xd800 &&
|
|
31811
|
+
code <= 0xdbff &&
|
|
31812
|
+
value.charCodeAt(i + 1) >= 0xdc00 &&
|
|
31813
|
+
value.charCodeAt(i + 1) <= 0xdfff
|
|
31814
|
+
) {
|
|
31815
|
+
length += 4;
|
|
31816
|
+
i++;
|
|
31817
|
+
} else {
|
|
31818
|
+
length += 3;
|
|
31819
|
+
}
|
|
31820
|
+
}
|
|
31821
|
+
return length;
|
|
31822
|
+
};
|
|
31823
|
+
|
|
31824
|
+
// Describe serialization failures independently of any request library.
|
|
31825
|
+
class FormDataError extends TypeError {
|
|
31826
|
+
constructor(message, reason) {
|
|
31827
|
+
super(message);
|
|
31828
|
+
this.name = 'FormDataError';
|
|
31829
|
+
this.reason = reason;
|
|
31830
|
+
}
|
|
31831
|
+
}
|
|
31832
|
+
|
|
31833
|
+
// The caller supplies the boundary, Blob implementation, and limit error.
|
|
31834
|
+
function formDataToBlob(form, Blob, limit, limitError, boundary) {
|
|
31835
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(Blob)) {
|
|
31836
|
+
throw new FormDataError('Blob is not supported', 'blob');
|
|
31837
|
+
}
|
|
31838
|
+
|
|
31839
|
+
if (
|
|
31840
|
+
!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(boundary) ||
|
|
31841
|
+
!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) ||
|
|
31842
|
+
/ $/.test(boundary)
|
|
31843
|
+
) {
|
|
31844
|
+
throw new FormDataError('Invalid multipart boundary', 'boundary');
|
|
31845
|
+
}
|
|
31846
|
+
const footer = '--' + boundary + '--' + CRLF;
|
|
31847
|
+
let length = footer.length;
|
|
31848
|
+
const parts = [];
|
|
31849
|
+
const checkLength = (extra) => {
|
|
31850
|
+
if (length + extra > limit) throw limitError();
|
|
31851
|
+
};
|
|
31852
|
+
checkLength(0);
|
|
31853
|
+
|
|
31854
|
+
for (const [name, value] of form) {
|
|
31855
|
+
const isString = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value);
|
|
31856
|
+
const valueLength = isString ? stringBytes(value, true) : value.size;
|
|
31857
|
+
if (!Number.isFinite(valueLength) || valueLength < 0) {
|
|
31858
|
+
throw new FormDataError('Unsupported FormData part size', 'part');
|
|
31859
|
+
}
|
|
31860
|
+
// Reject large values and names before building normalized header strings.
|
|
31861
|
+
checkLength(
|
|
31862
|
+
valueLength +
|
|
31863
|
+
stringBytes(name, true) +
|
|
31864
|
+
(!isString && value.name ? stringBytes(value.name, false) : 0) +
|
|
31865
|
+
(!isString && value.type ? stringBytes(value.type, false) : 0)
|
|
31866
|
+
);
|
|
31867
|
+
|
|
31868
|
+
let header =
|
|
31869
|
+
'--' +
|
|
31870
|
+
boundary +
|
|
31871
|
+
CRLF +
|
|
31872
|
+
'Content-Disposition: form-data; name="' +
|
|
31873
|
+
escapeName(normalizeLines(name)) +
|
|
31874
|
+
'"';
|
|
31875
|
+
if (!isString) {
|
|
31876
|
+
header +=
|
|
31877
|
+
'; filename="' +
|
|
31878
|
+
escapeName(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value.name) ? value.name : 'blob') +
|
|
31879
|
+
'"' +
|
|
31880
|
+
CRLF +
|
|
31881
|
+
'Content-Type: ' +
|
|
31882
|
+
String(value.type || 'application/octet-stream').replace(/[\r\n]/g, '');
|
|
31883
|
+
}
|
|
31884
|
+
header += CRLF + CRLF;
|
|
31885
|
+
const partLength = stringBytes(header, false) + valueLength + CRLF.length;
|
|
31886
|
+
checkLength(partLength);
|
|
31887
|
+
length += partLength;
|
|
31888
|
+
parts.push({ header, value, isString });
|
|
31889
|
+
}
|
|
31890
|
+
|
|
31891
|
+
// Native Blob composition retains existing Blob/File data. No file is read
|
|
31892
|
+
// and no complete multipart ArrayBuffer is created to determine its length.
|
|
31893
|
+
const blobParts = [];
|
|
31894
|
+
for (const part of parts) {
|
|
31895
|
+
blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF);
|
|
31896
|
+
}
|
|
31897
|
+
blobParts.push(footer);
|
|
31898
|
+
return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary });
|
|
31164
31899
|
}
|
|
31165
31900
|
|
|
31166
31901
|
|
|
@@ -31241,6 +31976,29 @@ function arrayToObject(arr) {
|
|
|
31241
31976
|
return obj;
|
|
31242
31977
|
}
|
|
31243
31978
|
|
|
31979
|
+
function normalizeArray(value) {
|
|
31980
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) return value;
|
|
31981
|
+
|
|
31982
|
+
const keys = Object.keys(value);
|
|
31983
|
+
return keys.length !== value.length || keys.some((key, index) => key !== String(index))
|
|
31984
|
+
? arrayToObject(value)
|
|
31985
|
+
: value;
|
|
31986
|
+
}
|
|
31987
|
+
|
|
31988
|
+
function normalizeArrays(obj) {
|
|
31989
|
+
const pending = [obj];
|
|
31990
|
+
while (pending.length) {
|
|
31991
|
+
const target = pending.pop();
|
|
31992
|
+
Object.keys(target).forEach((key) => {
|
|
31993
|
+
const value = (target[key] = normalizeArray(target[key]));
|
|
31994
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(value)) {
|
|
31995
|
+
pending.push(value);
|
|
31996
|
+
}
|
|
31997
|
+
});
|
|
31998
|
+
}
|
|
31999
|
+
return obj;
|
|
32000
|
+
}
|
|
32001
|
+
|
|
31244
32002
|
/**
|
|
31245
32003
|
* It takes a FormData object and returns a JavaScript object
|
|
31246
32004
|
*
|
|
@@ -31262,6 +32020,7 @@ function formDataToJSON(formData) {
|
|
|
31262
32020
|
|
|
31263
32021
|
if (isLast) {
|
|
31264
32022
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) {
|
|
32023
|
+
target[name] = normalizeArray(target[name]);
|
|
31265
32024
|
target[name] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])
|
|
31266
32025
|
? target[name].concat(value)
|
|
31267
32026
|
: [target[name], value];
|
|
@@ -31292,7 +32051,7 @@ function formDataToJSON(formData) {
|
|
|
31292
32051
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
31293
32052
|
});
|
|
31294
32053
|
|
|
31295
|
-
return obj;
|
|
32054
|
+
return normalizeArrays(obj);
|
|
31296
32055
|
}
|
|
31297
32056
|
|
|
31298
32057
|
return null;
|
|
@@ -31374,18 +32133,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
31374
32133
|
|
|
31375
32134
|
|
|
31376
32135
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
|
|
31377
|
-
? ((origin
|
|
31378
|
-
url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
|
|
32136
|
+
? ((origin) => (url) => {
|
|
32137
|
+
url = new URL(url, document.baseURI || _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
|
|
31379
32138
|
|
|
31380
32139
|
return (
|
|
31381
|
-
origin.protocol === url.protocol &&
|
|
31382
|
-
origin.host === url.host &&
|
|
31383
|
-
(isMSIE || origin.port === url.port)
|
|
32140
|
+
origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port
|
|
31384
32141
|
);
|
|
31385
|
-
})(
|
|
31386
|
-
new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
|
|
31387
|
-
_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
|
|
31388
|
-
)
|
|
32142
|
+
})(new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin))
|
|
31389
32143
|
: () => true);
|
|
31390
32144
|
|
|
31391
32145
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
@@ -31493,7 +32247,8 @@ const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toOb
|
|
|
31493
32247
|
* @returns {Object} Headers parsed into an object
|
|
31494
32248
|
*/
|
|
31495
32249
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((rawHeaders) => {
|
|
31496
|
-
|
|
32250
|
+
// Header names are data, including __proto__; avoid inherited setters.
|
|
32251
|
+
const parsed = Object.create(null);
|
|
31497
32252
|
let key;
|
|
31498
32253
|
let val;
|
|
31499
32254
|
let i;
|
|
@@ -31543,7 +32298,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
31543
32298
|
|
|
31544
32299
|
function parseProtocol(url) {
|
|
31545
32300
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
|
|
31546
|
-
return (match && match[1]) || '';
|
|
32301
|
+
return (match && match[1].toLowerCase()) || '';
|
|
31547
32302
|
}
|
|
31548
32303
|
|
|
31549
32304
|
|
|
@@ -31660,7 +32415,9 @@ const encodeUTF8 = (str) =>
|
|
|
31660
32415
|
String.fromCharCode(parseInt(hex, 16))
|
|
31661
32416
|
);
|
|
31662
32417
|
|
|
31663
|
-
|
|
32418
|
+
const readCookie = (name) => _cookies_js__WEBPACK_IMPORTED_MODULE_4__["default"].read(name);
|
|
32419
|
+
|
|
32420
|
+
function resolveConfig(config, readXsrfCookie = readCookie) {
|
|
31664
32421
|
const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_6__["default"])({}, config);
|
|
31665
32422
|
|
|
31666
32423
|
// Read only own properties to prevent prototype pollution gadgets
|
|
@@ -31689,11 +32446,22 @@ function resolveConfig(config) {
|
|
|
31689
32446
|
if (auth) {
|
|
31690
32447
|
const username = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'username') || '';
|
|
31691
32448
|
const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'password') || '';
|
|
32449
|
+
const transitional = own('transitional');
|
|
32450
|
+
const encodeUsername =
|
|
32451
|
+
transitional &&
|
|
32452
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(transitional, 'encodeBasicAuthUsername') &&
|
|
32453
|
+
transitional.encodeBasicAuthUsername === true;
|
|
31692
32454
|
|
|
31693
32455
|
try {
|
|
31694
32456
|
headers.set(
|
|
31695
32457
|
'Authorization',
|
|
31696
|
-
|
|
32458
|
+
// Preserve legacy username bytes unless the caller opts in to UTF-8.
|
|
32459
|
+
'Basic ' +
|
|
32460
|
+
btoa(
|
|
32461
|
+
(encodeUsername ? encodeUTF8(username) : username) +
|
|
32462
|
+
':' +
|
|
32463
|
+
(password ? encodeUTF8(password) : '')
|
|
32464
|
+
)
|
|
31697
32465
|
);
|
|
31698
32466
|
} catch (e) {
|
|
31699
32467
|
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_OPTION_VALUE, config);
|
|
@@ -31731,7 +32499,7 @@ function resolveConfig(config) {
|
|
|
31731
32499
|
withXSRFToken === true || (withXSRFToken == null && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.url));
|
|
31732
32500
|
|
|
31733
32501
|
if (shouldSendXSRF) {
|
|
31734
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName &&
|
|
32502
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);
|
|
31735
32503
|
|
|
31736
32504
|
if (xsrfValue) {
|
|
31737
32505
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
@@ -33041,11 +33809,17 @@ const isPlainObject = (val) => {
|
|
|
33041
33809
|
const prototype = getPrototypeOf(val);
|
|
33042
33810
|
return (
|
|
33043
33811
|
(prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
|
|
33044
|
-
// Treat
|
|
33045
|
-
//
|
|
33046
|
-
//
|
|
33047
|
-
|
|
33048
|
-
|
|
33812
|
+
// Treat own Symbol.toStringTag or Symbol.iterator members as evidence the
|
|
33813
|
+
// value is tagged/iterable, ignoring members reachable only through shared
|
|
33814
|
+
// or terminal prototype boundaries. This is exactly what
|
|
33815
|
+
// hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted
|
|
33816
|
+
// above (null, Object.prototype, or a terminal null-prototype template) is
|
|
33817
|
+
// a boundary, so the walk never inspects anything but `val`'s own members,
|
|
33818
|
+
// and stops before even those when `val` is itself the boundary
|
|
33819
|
+
// Object.prototype. Checking that inline avoids allocating the walker's
|
|
33820
|
+
// `seen` list twice per call on the mergeConfig / merge hot path.
|
|
33821
|
+
(isPrototypeBoundary(val, prototype, true) ||
|
|
33822
|
+
(!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)))
|
|
33049
33823
|
);
|
|
33050
33824
|
};
|
|
33051
33825
|
|
|
@@ -33309,15 +34083,30 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
33309
34083
|
function merge(...objs) {
|
|
33310
34084
|
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
33311
34085
|
const result = {};
|
|
34086
|
+
// Caseless lookup only applies to string keys — symbol keys are
|
|
34087
|
+
// identity-matched. Every string key that reaches `result` passes through
|
|
34088
|
+
// this index first, so it can never hold two case variants of one key and a
|
|
34089
|
+
// lowercase -> key map is exactly what findKey(result, key) would rescan
|
|
34090
|
+
// Object.keys(result) for on each assignment.
|
|
34091
|
+
const lowerCaseKeys = caseless ? Object.create(null) : null;
|
|
33312
34092
|
const assignValue = (val, key) => {
|
|
33313
34093
|
// Skip dangerous property names to prevent prototype pollution
|
|
33314
34094
|
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
33315
34095
|
return;
|
|
33316
34096
|
}
|
|
33317
34097
|
|
|
33318
|
-
|
|
33319
|
-
|
|
33320
|
-
|
|
34098
|
+
let targetKey = key;
|
|
34099
|
+
if (lowerCaseKeys && typeof key === 'string') {
|
|
34100
|
+
const lowerKey = key.toLowerCase();
|
|
34101
|
+
const knownKey = lowerCaseKeys[lowerKey];
|
|
34102
|
+
// A key recorded but absent from `result` was skipped by skipUndefined;
|
|
34103
|
+
// the later spelling wins then, as it does for findKey.
|
|
34104
|
+
if (knownKey !== undefined && hasOwnProperty(result, knownKey)) {
|
|
34105
|
+
targetKey = knownKey;
|
|
34106
|
+
} else {
|
|
34107
|
+
lowerCaseKeys[lowerKey] = key;
|
|
34108
|
+
}
|
|
34109
|
+
}
|
|
33321
34110
|
// Read via own-prop only — a bare `result[targetKey]` walks the prototype
|
|
33322
34111
|
// chain, so a polluted Object.prototype value could surface here and get
|
|
33323
34112
|
// copied into the merged result.
|
|
@@ -33341,7 +34130,7 @@ function merge(...objs) {
|
|
|
33341
34130
|
|
|
33342
34131
|
forEach(source, assignValue);
|
|
33343
34132
|
|
|
33344
|
-
if (typeof source !== 'object' || isArray(source)) {
|
|
34133
|
+
if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) {
|
|
33345
34134
|
continue;
|
|
33346
34135
|
}
|
|
33347
34136
|
|
|
@@ -33500,7 +34289,37 @@ const toArray = (thing) => {
|
|
|
33500
34289
|
if (!thing) return null;
|
|
33501
34290
|
if (isArray(thing)) return thing;
|
|
33502
34291
|
let i = thing.length;
|
|
33503
|
-
if (!
|
|
34292
|
+
if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null;
|
|
34293
|
+
|
|
34294
|
+
// Bound the copy by actual indexed properties, including hidden and inherited
|
|
34295
|
+
// members of array-like collections, rather than by the declared length alone.
|
|
34296
|
+
const indexes = new Set();
|
|
34297
|
+
const seen = new Set();
|
|
34298
|
+
let source = thing;
|
|
34299
|
+
|
|
34300
|
+
while (source != null && indexes.size < i) {
|
|
34301
|
+
if (seen.has(source)) return null;
|
|
34302
|
+
seen.add(source);
|
|
34303
|
+
|
|
34304
|
+
const prototype = getPrototypeOf(source);
|
|
34305
|
+
if (isPrototypeBoundary(source, prototype, source === thing)) break;
|
|
34306
|
+
|
|
34307
|
+
Object.getOwnPropertyNames(source).forEach((key) => {
|
|
34308
|
+
const index = +key;
|
|
34309
|
+
if (
|
|
34310
|
+
Number.isInteger(index) &&
|
|
34311
|
+
index >= 0 &&
|
|
34312
|
+
index < i &&
|
|
34313
|
+
String(index) === key &&
|
|
34314
|
+
hasOwnProperty(source, key)
|
|
34315
|
+
) {
|
|
34316
|
+
indexes.add(index);
|
|
34317
|
+
}
|
|
34318
|
+
});
|
|
34319
|
+
source = prototype;
|
|
34320
|
+
}
|
|
34321
|
+
|
|
34322
|
+
if (indexes.size !== i) return null;
|
|
33504
34323
|
const arr = new Array(i);
|
|
33505
34324
|
while (i-- > 0) {
|
|
33506
34325
|
arr[i] = thing[i];
|
|
@@ -56488,7 +57307,10 @@ const toYAMLNode = (element, context) => {
|
|
|
56488
57307
|
}
|
|
56489
57308
|
}
|
|
56490
57309
|
if ((style.scalarStyle === 'Literal' || style.scalarStyle === 'Folded') && typeof style.rawContent === 'string' && typeof scalar.value === 'string') {
|
|
56491
|
-
const
|
|
57310
|
+
const raw = style.rawContent.replace(/\r\n/g, '\n');
|
|
57311
|
+
// the empty lines after a clip or strip block aren't part of its value, but separate it from
|
|
57312
|
+
// what follows in its source, so they're dropped; a keep block's are part of its value
|
|
57313
|
+
const text = raw.replace(/^[|>][1-9]?\+/.test(raw) ? /\n$/ : /\n+$/, '');
|
|
56492
57314
|
scalar.value = new RawBlockScalar(scalar.value, text);
|
|
56493
57315
|
}
|
|
56494
57316
|
if (style.styleGroup === 'Flow' && typeof style.rawContent === 'string' && typeof scalar.value === 'string' && scalar.value !== '') {
|