@kontent-ai/delivery-sdk 16.4.1 → 16.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/kontent-delivery.umd.js +1090 -782
- package/dist/bundles/kontent-delivery.umd.js.map +1 -1
- package/dist/bundles/kontent-delivery.umd.min.js +1 -1
- package/dist/bundles/kontent-delivery.umd.min.js.map +1 -1
- package/dist/bundles/report.json +1 -1
- package/dist/bundles/report.min.json +1 -1
- package/dist/bundles/stats.json +5880 -5796
- package/dist/bundles/stats.min.json +7694 -7568
- package/dist/cjs/sdk-info.generated.js +1 -1
- package/dist/es6/sdk-info.generated.js +1 -1
- package/dist/esnext/sdk-info.generated.js +1 -1
- package/lib/sdk-info.generated.ts +7 -7
- package/package.json +2 -2
|
@@ -3501,7 +3501,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
3501
3501
|
exports.sdkInfo = void 0;
|
|
3502
3502
|
exports.sdkInfo = {
|
|
3503
3503
|
host: 'npmjs.com',
|
|
3504
|
-
version: '16.4.
|
|
3504
|
+
version: '16.4.2',
|
|
3505
3505
|
name: '@kontent-ai/delivery-sdk'
|
|
3506
3506
|
};
|
|
3507
3507
|
|
|
@@ -5255,7 +5255,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5255
5255
|
* - `http` for Node.js
|
|
5256
5256
|
* - `xhr` for browsers
|
|
5257
5257
|
* - `fetch` for fetch API-based requests
|
|
5258
|
-
*
|
|
5258
|
+
*
|
|
5259
5259
|
* @type {Object<string, Function|Object>}
|
|
5260
5260
|
*/
|
|
5261
5261
|
const knownAdapters = {
|
|
@@ -5263,7 +5263,7 @@ const knownAdapters = {
|
|
|
5263
5263
|
xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
5264
5264
|
fetch: {
|
|
5265
5265
|
get: _fetch_js__WEBPACK_IMPORTED_MODULE_3__.getFetch,
|
|
5266
|
-
}
|
|
5266
|
+
},
|
|
5267
5267
|
};
|
|
5268
5268
|
|
|
5269
5269
|
// Assign adapter names for easier debugging and identification
|
|
@@ -5280,7 +5280,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(knownAdapters, (fn, va
|
|
|
5280
5280
|
|
|
5281
5281
|
/**
|
|
5282
5282
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
5283
|
-
*
|
|
5283
|
+
*
|
|
5284
5284
|
* @param {string} reason
|
|
5285
5285
|
* @returns {string}
|
|
5286
5286
|
*/
|
|
@@ -5288,17 +5288,18 @@ const renderReason = (reason) => `- ${reason}`;
|
|
|
5288
5288
|
|
|
5289
5289
|
/**
|
|
5290
5290
|
* Check if the adapter is resolved (function, null, or false)
|
|
5291
|
-
*
|
|
5291
|
+
*
|
|
5292
5292
|
* @param {Function|null|false} adapter
|
|
5293
5293
|
* @returns {boolean}
|
|
5294
5294
|
*/
|
|
5295
|
-
const isResolvedHandle = (adapter) =>
|
|
5295
|
+
const isResolvedHandle = (adapter) =>
|
|
5296
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(adapter) || adapter === null || adapter === false;
|
|
5296
5297
|
|
|
5297
5298
|
/**
|
|
5298
5299
|
* Get the first suitable adapter from the provided list.
|
|
5299
5300
|
* Tries each adapter in order until a supported one is found.
|
|
5300
5301
|
* Throws an AxiosError if no adapter is suitable.
|
|
5301
|
-
*
|
|
5302
|
+
*
|
|
5302
5303
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
5303
5304
|
* @param {Object} config - Axios request configuration
|
|
5304
5305
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -5335,14 +5336,17 @@ function getAdapter(adapters, config) {
|
|
|
5335
5336
|
}
|
|
5336
5337
|
|
|
5337
5338
|
if (!adapter) {
|
|
5338
|
-
const reasons = Object.entries(rejectedReasons)
|
|
5339
|
-
|
|
5339
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
5340
|
+
([id, state]) =>
|
|
5341
|
+
`adapter ${id} ` +
|
|
5340
5342
|
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
5341
|
-
|
|
5343
|
+
);
|
|
5342
5344
|
|
|
5343
|
-
let s = length
|
|
5344
|
-
|
|
5345
|
-
|
|
5345
|
+
let s = length
|
|
5346
|
+
? reasons.length > 1
|
|
5347
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
5348
|
+
: ' ' + renderReason(reasons[0])
|
|
5349
|
+
: 'as no adapter specified';
|
|
5346
5350
|
|
|
5347
5351
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](
|
|
5348
5352
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
@@ -5367,7 +5371,7 @@ function getAdapter(adapters, config) {
|
|
|
5367
5371
|
* Exposes all known adapters
|
|
5368
5372
|
* @type {Object<string, Function|Object>}
|
|
5369
5373
|
*/
|
|
5370
|
-
adapters: knownAdapters
|
|
5374
|
+
adapters: knownAdapters,
|
|
5371
5375
|
});
|
|
5372
5376
|
|
|
5373
5377
|
|
|
@@ -5405,31 +5409,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5405
5409
|
|
|
5406
5410
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
5407
5411
|
|
|
5408
|
-
const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
5412
|
+
const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
5409
5413
|
|
|
5410
|
-
const globalFetchAPI = (({Request, Response}) => ({
|
|
5411
|
-
Request,
|
|
5414
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
5415
|
+
Request,
|
|
5416
|
+
Response,
|
|
5412
5417
|
}))(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global);
|
|
5413
5418
|
|
|
5414
|
-
const {
|
|
5415
|
-
ReadableStream, TextEncoder
|
|
5416
|
-
} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
|
|
5417
|
-
|
|
5419
|
+
const { ReadableStream, TextEncoder } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
|
|
5418
5420
|
|
|
5419
5421
|
const test = (fn, ...args) => {
|
|
5420
5422
|
try {
|
|
5421
5423
|
return !!fn(...args);
|
|
5422
5424
|
} catch (e) {
|
|
5423
|
-
return false
|
|
5425
|
+
return false;
|
|
5424
5426
|
}
|
|
5425
|
-
}
|
|
5427
|
+
};
|
|
5426
5428
|
|
|
5427
5429
|
const factory = (env) => {
|
|
5428
|
-
env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
|
|
5429
|
-
|
|
5430
|
-
|
|
5430
|
+
env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
|
|
5431
|
+
{
|
|
5432
|
+
skipUndefined: true,
|
|
5433
|
+
},
|
|
5434
|
+
globalFetchAPI,
|
|
5435
|
+
env
|
|
5436
|
+
);
|
|
5431
5437
|
|
|
5432
|
-
const {fetch: envFetch, Request, Response} = env;
|
|
5438
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
5433
5439
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
5434
5440
|
const isRequestSupported = isFunction(Request);
|
|
5435
5441
|
const isResponseSupported = isFunction(Response);
|
|
@@ -5440,46 +5446,65 @@ const factory = (env) => {
|
|
|
5440
5446
|
|
|
5441
5447
|
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
|
|
5442
5448
|
|
|
5443
|
-
const encodeText =
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5449
|
+
const encodeText =
|
|
5450
|
+
isFetchSupported &&
|
|
5451
|
+
(typeof TextEncoder === 'function'
|
|
5452
|
+
? (
|
|
5453
|
+
(encoder) => (str) =>
|
|
5454
|
+
encoder.encode(str)
|
|
5455
|
+
)(new TextEncoder())
|
|
5456
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
5447
5457
|
|
|
5448
|
-
const supportsRequestStream =
|
|
5449
|
-
|
|
5458
|
+
const supportsRequestStream =
|
|
5459
|
+
isRequestSupported &&
|
|
5460
|
+
isReadableStreamSupported &&
|
|
5461
|
+
test(() => {
|
|
5462
|
+
let duplexAccessed = false;
|
|
5450
5463
|
|
|
5451
|
-
|
|
5452
|
-
body: new ReadableStream(),
|
|
5453
|
-
method: 'POST',
|
|
5454
|
-
get duplex() {
|
|
5455
|
-
duplexAccessed = true;
|
|
5456
|
-
return 'half';
|
|
5457
|
-
},
|
|
5458
|
-
}).headers.has('Content-Type');
|
|
5464
|
+
const body = new ReadableStream();
|
|
5459
5465
|
|
|
5460
|
-
|
|
5461
|
-
|
|
5466
|
+
const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
|
|
5467
|
+
body,
|
|
5468
|
+
method: 'POST',
|
|
5469
|
+
get duplex() {
|
|
5470
|
+
duplexAccessed = true;
|
|
5471
|
+
return 'half';
|
|
5472
|
+
},
|
|
5473
|
+
}).headers.has('Content-Type');
|
|
5474
|
+
|
|
5475
|
+
body.cancel();
|
|
5476
|
+
|
|
5477
|
+
return duplexAccessed && !hasContentType;
|
|
5478
|
+
});
|
|
5462
5479
|
|
|
5463
|
-
const supportsResponseStream =
|
|
5480
|
+
const supportsResponseStream =
|
|
5481
|
+
isResponseSupported &&
|
|
5482
|
+
isReadableStreamSupported &&
|
|
5464
5483
|
test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body));
|
|
5465
5484
|
|
|
5466
5485
|
const resolvers = {
|
|
5467
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
5486
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
5468
5487
|
};
|
|
5469
5488
|
|
|
5470
|
-
isFetchSupported &&
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5489
|
+
isFetchSupported &&
|
|
5490
|
+
(() => {
|
|
5491
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
5492
|
+
!resolvers[type] &&
|
|
5493
|
+
(resolvers[type] = (res, config) => {
|
|
5494
|
+
let method = res && res[type];
|
|
5474
5495
|
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5496
|
+
if (method) {
|
|
5497
|
+
return method.call(res);
|
|
5498
|
+
}
|
|
5478
5499
|
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5500
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
5501
|
+
`Response type '${type}' is not supported`,
|
|
5502
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT,
|
|
5503
|
+
config
|
|
5504
|
+
);
|
|
5505
|
+
});
|
|
5506
|
+
});
|
|
5507
|
+
})();
|
|
5483
5508
|
|
|
5484
5509
|
const getBodyLength = async (body) => {
|
|
5485
5510
|
if (body == null) {
|
|
@@ -5509,13 +5534,13 @@ const factory = (env) => {
|
|
|
5509
5534
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) {
|
|
5510
5535
|
return (await encodeText(body)).byteLength;
|
|
5511
5536
|
}
|
|
5512
|
-
}
|
|
5537
|
+
};
|
|
5513
5538
|
|
|
5514
5539
|
const resolveBodyLength = async (headers, body) => {
|
|
5515
5540
|
const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength());
|
|
5516
5541
|
|
|
5517
5542
|
return length == null ? getBodyLength(body) : length;
|
|
5518
|
-
}
|
|
5543
|
+
};
|
|
5519
5544
|
|
|
5520
5545
|
return async (config) => {
|
|
5521
5546
|
let {
|
|
@@ -5530,38 +5555,47 @@ const factory = (env) => {
|
|
|
5530
5555
|
responseType,
|
|
5531
5556
|
headers,
|
|
5532
5557
|
withCredentials = 'same-origin',
|
|
5533
|
-
fetchOptions
|
|
5558
|
+
fetchOptions,
|
|
5534
5559
|
} = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
|
|
5535
5560
|
|
|
5536
5561
|
let _fetch = envFetch || fetch;
|
|
5537
5562
|
|
|
5538
5563
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
5539
5564
|
|
|
5540
|
-
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
5565
|
+
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
5566
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
5567
|
+
timeout
|
|
5568
|
+
);
|
|
5541
5569
|
|
|
5542
5570
|
let request = null;
|
|
5543
5571
|
|
|
5544
|
-
const unsubscribe =
|
|
5545
|
-
composedSignal
|
|
5546
|
-
|
|
5572
|
+
const unsubscribe =
|
|
5573
|
+
composedSignal &&
|
|
5574
|
+
composedSignal.unsubscribe &&
|
|
5575
|
+
(() => {
|
|
5576
|
+
composedSignal.unsubscribe();
|
|
5577
|
+
});
|
|
5547
5578
|
|
|
5548
5579
|
let requestContentLength;
|
|
5549
5580
|
|
|
5550
5581
|
try {
|
|
5551
5582
|
if (
|
|
5552
|
-
onUploadProgress &&
|
|
5583
|
+
onUploadProgress &&
|
|
5584
|
+
supportsRequestStream &&
|
|
5585
|
+
method !== 'get' &&
|
|
5586
|
+
method !== 'head' &&
|
|
5553
5587
|
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
5554
5588
|
) {
|
|
5555
5589
|
let _request = new Request(url, {
|
|
5556
5590
|
method: 'POST',
|
|
5557
5591
|
body: data,
|
|
5558
|
-
duplex:
|
|
5592
|
+
duplex: 'half',
|
|
5559
5593
|
});
|
|
5560
5594
|
|
|
5561
5595
|
let contentTypeHeader;
|
|
5562
5596
|
|
|
5563
5597
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
5564
|
-
headers.setContentType(contentTypeHeader)
|
|
5598
|
+
headers.setContentType(contentTypeHeader);
|
|
5565
5599
|
}
|
|
5566
5600
|
|
|
5567
5601
|
if (_request.body) {
|
|
@@ -5580,7 +5614,7 @@ const factory = (env) => {
|
|
|
5580
5614
|
|
|
5581
5615
|
// Cloudflare Workers throws when credentials are defined
|
|
5582
5616
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
5583
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
5617
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
5584
5618
|
|
|
5585
5619
|
const resolvedOptions = {
|
|
5586
5620
|
...fetchOptions,
|
|
@@ -5588,29 +5622,35 @@ const factory = (env) => {
|
|
|
5588
5622
|
method: method.toUpperCase(),
|
|
5589
5623
|
headers: headers.normalize().toJSON(),
|
|
5590
5624
|
body: data,
|
|
5591
|
-
duplex:
|
|
5592
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
5625
|
+
duplex: 'half',
|
|
5626
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
5593
5627
|
};
|
|
5594
5628
|
|
|
5595
5629
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
5596
5630
|
|
|
5597
|
-
let response = await (isRequestSupported
|
|
5631
|
+
let response = await (isRequestSupported
|
|
5632
|
+
? _fetch(request, fetchOptions)
|
|
5633
|
+
: _fetch(url, resolvedOptions));
|
|
5598
5634
|
|
|
5599
|
-
const isStreamResponse =
|
|
5635
|
+
const isStreamResponse =
|
|
5636
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
5600
5637
|
|
|
5601
5638
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
5602
5639
|
const options = {};
|
|
5603
5640
|
|
|
5604
|
-
['status', 'statusText', 'headers'].forEach(prop => {
|
|
5641
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
5605
5642
|
options[prop] = response[prop];
|
|
5606
5643
|
});
|
|
5607
5644
|
|
|
5608
5645
|
const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
|
|
5609
5646
|
|
|
5610
|
-
const [onProgress, flush] =
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5647
|
+
const [onProgress, flush] =
|
|
5648
|
+
(onDownloadProgress &&
|
|
5649
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
|
|
5650
|
+
responseContentLength,
|
|
5651
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onDownloadProgress), true)
|
|
5652
|
+
)) ||
|
|
5653
|
+
[];
|
|
5614
5654
|
|
|
5615
5655
|
response = new Response(
|
|
5616
5656
|
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
@@ -5623,7 +5663,10 @@ const factory = (env) => {
|
|
|
5623
5663
|
|
|
5624
5664
|
responseType = responseType || 'text';
|
|
5625
5665
|
|
|
5626
|
-
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](
|
|
5666
|
+
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](
|
|
5667
|
+
response,
|
|
5668
|
+
config
|
|
5669
|
+
);
|
|
5627
5670
|
|
|
5628
5671
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
5629
5672
|
|
|
@@ -5634,43 +5677,50 @@ const factory = (env) => {
|
|
|
5634
5677
|
status: response.status,
|
|
5635
5678
|
statusText: response.statusText,
|
|
5636
5679
|
config,
|
|
5637
|
-
request
|
|
5638
|
-
})
|
|
5639
|
-
})
|
|
5680
|
+
request,
|
|
5681
|
+
});
|
|
5682
|
+
});
|
|
5640
5683
|
} catch (err) {
|
|
5641
5684
|
unsubscribe && unsubscribe();
|
|
5642
5685
|
|
|
5643
5686
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
5644
5687
|
throw Object.assign(
|
|
5645
|
-
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
5688
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
5689
|
+
'Network Error',
|
|
5690
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK,
|
|
5691
|
+
config,
|
|
5692
|
+
request,
|
|
5693
|
+
err && err.response
|
|
5694
|
+
),
|
|
5646
5695
|
{
|
|
5647
|
-
cause: err.cause || err
|
|
5696
|
+
cause: err.cause || err,
|
|
5648
5697
|
}
|
|
5649
|
-
)
|
|
5698
|
+
);
|
|
5650
5699
|
}
|
|
5651
5700
|
|
|
5652
5701
|
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request, err && err.response);
|
|
5653
5702
|
}
|
|
5654
|
-
}
|
|
5655
|
-
}
|
|
5703
|
+
};
|
|
5704
|
+
};
|
|
5656
5705
|
|
|
5657
5706
|
const seedCache = new Map();
|
|
5658
5707
|
|
|
5659
5708
|
const getFetch = (config) => {
|
|
5660
5709
|
let env = (config && config.env) || {};
|
|
5661
|
-
const {fetch, Request, Response} = env;
|
|
5662
|
-
const seeds = [
|
|
5663
|
-
Request, Response, fetch
|
|
5664
|
-
];
|
|
5710
|
+
const { fetch, Request, Response } = env;
|
|
5711
|
+
const seeds = [Request, Response, fetch];
|
|
5665
5712
|
|
|
5666
|
-
let len = seeds.length,
|
|
5667
|
-
|
|
5713
|
+
let len = seeds.length,
|
|
5714
|
+
i = len,
|
|
5715
|
+
seed,
|
|
5716
|
+
target,
|
|
5717
|
+
map = seedCache;
|
|
5668
5718
|
|
|
5669
5719
|
while (i--) {
|
|
5670
5720
|
seed = seeds[i];
|
|
5671
5721
|
target = map.get(seed);
|
|
5672
5722
|
|
|
5673
|
-
target === undefined && map.set(seed, target =
|
|
5723
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
5674
5724
|
|
|
5675
5725
|
map = target;
|
|
5676
5726
|
}
|
|
@@ -5718,193 +5768,215 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5718
5768
|
|
|
5719
5769
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
5720
5770
|
|
|
5721
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5771
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
|
|
5772
|
+
function (config) {
|
|
5773
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
5774
|
+
const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__["default"])(config);
|
|
5775
|
+
let requestData = _config.data;
|
|
5776
|
+
const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(_config.headers).normalize();
|
|
5777
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
5778
|
+
let onCanceled;
|
|
5779
|
+
let uploadThrottled, downloadThrottled;
|
|
5780
|
+
let flushUpload, flushDownload;
|
|
5730
5781
|
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5782
|
+
function done() {
|
|
5783
|
+
flushUpload && flushUpload(); // flush events
|
|
5784
|
+
flushDownload && flushDownload(); // flush events
|
|
5734
5785
|
|
|
5735
|
-
|
|
5786
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
5736
5787
|
|
|
5737
|
-
|
|
5738
|
-
|
|
5788
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
5789
|
+
}
|
|
5739
5790
|
|
|
5740
|
-
|
|
5791
|
+
let request = new XMLHttpRequest();
|
|
5741
5792
|
|
|
5742
|
-
|
|
5793
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
5743
5794
|
|
|
5744
|
-
|
|
5745
|
-
|
|
5795
|
+
// Set the request timeout in MS
|
|
5796
|
+
request.timeout = _config.timeout;
|
|
5746
5797
|
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5798
|
+
function onloadend() {
|
|
5799
|
+
if (!request) {
|
|
5800
|
+
return;
|
|
5801
|
+
}
|
|
5802
|
+
// Prepare the response
|
|
5803
|
+
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
|
|
5804
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
5805
|
+
);
|
|
5806
|
+
const responseData =
|
|
5807
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
5808
|
+
? request.responseText
|
|
5809
|
+
: request.response;
|
|
5810
|
+
const response = {
|
|
5811
|
+
data: responseData,
|
|
5812
|
+
status: request.status,
|
|
5813
|
+
statusText: request.statusText,
|
|
5814
|
+
headers: responseHeaders,
|
|
5815
|
+
config,
|
|
5816
|
+
request,
|
|
5817
|
+
};
|
|
5818
|
+
|
|
5819
|
+
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
5820
|
+
function _resolve(value) {
|
|
5821
|
+
resolve(value);
|
|
5822
|
+
done();
|
|
5823
|
+
},
|
|
5824
|
+
function _reject(err) {
|
|
5825
|
+
reject(err);
|
|
5826
|
+
done();
|
|
5827
|
+
},
|
|
5828
|
+
response
|
|
5829
|
+
);
|
|
5830
|
+
|
|
5831
|
+
// Clean up request
|
|
5832
|
+
request = null;
|
|
5750
5833
|
}
|
|
5751
|
-
// Prepare the response
|
|
5752
|
-
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
|
|
5753
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
5754
|
-
);
|
|
5755
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
5756
|
-
request.responseText : request.response;
|
|
5757
|
-
const response = {
|
|
5758
|
-
data: responseData,
|
|
5759
|
-
status: request.status,
|
|
5760
|
-
statusText: request.statusText,
|
|
5761
|
-
headers: responseHeaders,
|
|
5762
|
-
config,
|
|
5763
|
-
request
|
|
5764
|
-
};
|
|
5765
5834
|
|
|
5766
|
-
(
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
}
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5835
|
+
if ('onloadend' in request) {
|
|
5836
|
+
// Use onloadend if available
|
|
5837
|
+
request.onloadend = onloadend;
|
|
5838
|
+
} else {
|
|
5839
|
+
// Listen for ready state to emulate onloadend
|
|
5840
|
+
request.onreadystatechange = function handleLoad() {
|
|
5841
|
+
if (!request || request.readyState !== 4) {
|
|
5842
|
+
return;
|
|
5843
|
+
}
|
|
5773
5844
|
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5845
|
+
// The request errored out and we didn't get a response, this will be
|
|
5846
|
+
// handled by onerror instead
|
|
5847
|
+
// With one exception: request that using file: protocol, most browsers
|
|
5848
|
+
// will return status as 0 even though it's a successful request
|
|
5849
|
+
if (
|
|
5850
|
+
request.status === 0 &&
|
|
5851
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
5852
|
+
) {
|
|
5853
|
+
return;
|
|
5854
|
+
}
|
|
5855
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
5856
|
+
// so we should call onloadend on the next 'tick'
|
|
5857
|
+
setTimeout(onloadend);
|
|
5858
|
+
};
|
|
5859
|
+
}
|
|
5777
5860
|
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
} else {
|
|
5782
|
-
// Listen for ready state to emulate onloadend
|
|
5783
|
-
request.onreadystatechange = function handleLoad() {
|
|
5784
|
-
if (!request || request.readyState !== 4) {
|
|
5861
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
5862
|
+
request.onabort = function handleAbort() {
|
|
5863
|
+
if (!request) {
|
|
5785
5864
|
return;
|
|
5786
5865
|
}
|
|
5787
5866
|
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
//
|
|
5791
|
-
|
|
5792
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
5793
|
-
return;
|
|
5794
|
-
}
|
|
5795
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
5796
|
-
// so we should call onloadend on the next 'tick'
|
|
5797
|
-
setTimeout(onloadend);
|
|
5867
|
+
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
|
|
5868
|
+
|
|
5869
|
+
// Clean up request
|
|
5870
|
+
request = null;
|
|
5798
5871
|
};
|
|
5799
|
-
}
|
|
5800
5872
|
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5873
|
+
// Handle low level network errors
|
|
5874
|
+
request.onerror = function handleError(event) {
|
|
5875
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
5876
|
+
// (message may be empty; when present, surface it)
|
|
5877
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
5878
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
5879
|
+
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
|
|
5880
|
+
// attach the underlying event for consumers who want details
|
|
5881
|
+
err.event = event || null;
|
|
5882
|
+
reject(err);
|
|
5883
|
+
request = null;
|
|
5884
|
+
};
|
|
5806
5885
|
|
|
5807
|
-
|
|
5886
|
+
// Handle timeout
|
|
5887
|
+
request.ontimeout = function handleTimeout() {
|
|
5888
|
+
let timeoutErrorMessage = _config.timeout
|
|
5889
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
5890
|
+
: 'timeout exceeded';
|
|
5891
|
+
const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
5892
|
+
if (_config.timeoutErrorMessage) {
|
|
5893
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
5894
|
+
}
|
|
5895
|
+
reject(
|
|
5896
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
5897
|
+
timeoutErrorMessage,
|
|
5898
|
+
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED,
|
|
5899
|
+
config,
|
|
5900
|
+
request
|
|
5901
|
+
)
|
|
5902
|
+
);
|
|
5808
5903
|
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5904
|
+
// Clean up request
|
|
5905
|
+
request = null;
|
|
5906
|
+
};
|
|
5812
5907
|
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
err.event = event || null;
|
|
5822
|
-
reject(err);
|
|
5823
|
-
request = null;
|
|
5824
|
-
};
|
|
5825
|
-
|
|
5826
|
-
// Handle timeout
|
|
5827
|
-
request.ontimeout = function handleTimeout() {
|
|
5828
|
-
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
5829
|
-
const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
5830
|
-
if (_config.timeoutErrorMessage) {
|
|
5831
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
5908
|
+
// Remove Content-Type if data is undefined
|
|
5909
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
5910
|
+
|
|
5911
|
+
// Add headers to the request
|
|
5912
|
+
if ('setRequestHeader' in request) {
|
|
5913
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
5914
|
+
request.setRequestHeader(key, val);
|
|
5915
|
+
});
|
|
5832
5916
|
}
|
|
5833
|
-
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
5834
|
-
timeoutErrorMessage,
|
|
5835
|
-
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED,
|
|
5836
|
-
config,
|
|
5837
|
-
request));
|
|
5838
|
-
|
|
5839
|
-
// Clean up request
|
|
5840
|
-
request = null;
|
|
5841
|
-
};
|
|
5842
5917
|
|
|
5843
|
-
|
|
5844
|
-
|
|
5918
|
+
// Add withCredentials to request if needed
|
|
5919
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(_config.withCredentials)) {
|
|
5920
|
+
request.withCredentials = !!_config.withCredentials;
|
|
5921
|
+
}
|
|
5845
5922
|
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
});
|
|
5851
|
-
}
|
|
5923
|
+
// Add responseType to request if needed
|
|
5924
|
+
if (responseType && responseType !== 'json') {
|
|
5925
|
+
request.responseType = _config.responseType;
|
|
5926
|
+
}
|
|
5852
5927
|
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5928
|
+
// Handle progress if needed
|
|
5929
|
+
if (onDownloadProgress) {
|
|
5930
|
+
[downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onDownloadProgress, true);
|
|
5931
|
+
request.addEventListener('progress', downloadThrottled);
|
|
5932
|
+
}
|
|
5857
5933
|
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
}
|
|
5934
|
+
// Not all browsers support upload events
|
|
5935
|
+
if (onUploadProgress && request.upload) {
|
|
5936
|
+
[uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress);
|
|
5862
5937
|
|
|
5863
|
-
|
|
5864
|
-
if (onDownloadProgress) {
|
|
5865
|
-
([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onDownloadProgress, true));
|
|
5866
|
-
request.addEventListener('progress', downloadThrottled);
|
|
5867
|
-
}
|
|
5938
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
5868
5939
|
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress));
|
|
5872
|
-
|
|
5873
|
-
request.upload.addEventListener('progress', uploadThrottled);
|
|
5940
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
5941
|
+
}
|
|
5874
5942
|
|
|
5875
|
-
|
|
5876
|
-
|
|
5943
|
+
if (_config.cancelToken || _config.signal) {
|
|
5944
|
+
// Handle cancellation
|
|
5945
|
+
// eslint-disable-next-line func-names
|
|
5946
|
+
onCanceled = (cancel) => {
|
|
5947
|
+
if (!request) {
|
|
5948
|
+
return;
|
|
5949
|
+
}
|
|
5950
|
+
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
5951
|
+
request.abort();
|
|
5952
|
+
request = null;
|
|
5953
|
+
};
|
|
5877
5954
|
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
return;
|
|
5955
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
5956
|
+
if (_config.signal) {
|
|
5957
|
+
_config.signal.aborted
|
|
5958
|
+
? onCanceled()
|
|
5959
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
5884
5960
|
}
|
|
5885
|
-
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
5886
|
-
request.abort();
|
|
5887
|
-
request = null;
|
|
5888
|
-
};
|
|
5889
|
-
|
|
5890
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
5891
|
-
if (_config.signal) {
|
|
5892
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
5893
5961
|
}
|
|
5894
|
-
}
|
|
5895
|
-
|
|
5896
|
-
const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
|
|
5897
5962
|
|
|
5898
|
-
|
|
5899
|
-
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config));
|
|
5900
|
-
return;
|
|
5901
|
-
}
|
|
5963
|
+
const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
|
|
5902
5964
|
|
|
5965
|
+
if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
|
|
5966
|
+
reject(
|
|
5967
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
5968
|
+
'Unsupported protocol ' + protocol + ':',
|
|
5969
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST,
|
|
5970
|
+
config
|
|
5971
|
+
)
|
|
5972
|
+
);
|
|
5973
|
+
return;
|
|
5974
|
+
}
|
|
5903
5975
|
|
|
5904
|
-
|
|
5905
|
-
|
|
5976
|
+
// Send the request
|
|
5977
|
+
request.send(requestData || null);
|
|
5978
|
+
});
|
|
5906
5979
|
});
|
|
5907
|
-
});
|
|
5908
5980
|
|
|
5909
5981
|
|
|
5910
5982
|
/***/ }),
|
|
@@ -5968,10 +6040,10 @@ function createInstance(defaultConfig) {
|
|
|
5968
6040
|
const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.request, context);
|
|
5969
6041
|
|
|
5970
6042
|
// Copy axios.prototype to instance
|
|
5971
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, context, {allOwnKeys: true});
|
|
6043
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, context, { allOwnKeys: true });
|
|
5972
6044
|
|
|
5973
6045
|
// Copy context to instance
|
|
5974
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, context, null, {allOwnKeys: true});
|
|
6046
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, context, null, { allOwnKeys: true });
|
|
5975
6047
|
|
|
5976
6048
|
// Factory for creating new instances
|
|
5977
6049
|
instance.create = function create(instanceConfig) {
|
|
@@ -6015,7 +6087,7 @@ axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]
|
|
|
6015
6087
|
|
|
6016
6088
|
axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_14__["default"];
|
|
6017
6089
|
|
|
6018
|
-
axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
6090
|
+
axios.formToJSON = (thing) => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
6019
6091
|
|
|
6020
6092
|
axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter;
|
|
6021
6093
|
|
|
@@ -6066,7 +6138,7 @@ class CancelToken {
|
|
|
6066
6138
|
const token = this;
|
|
6067
6139
|
|
|
6068
6140
|
// eslint-disable-next-line func-names
|
|
6069
|
-
this.promise.then(cancel => {
|
|
6141
|
+
this.promise.then((cancel) => {
|
|
6070
6142
|
if (!token._listeners) return;
|
|
6071
6143
|
|
|
6072
6144
|
let i = token._listeners.length;
|
|
@@ -6078,10 +6150,10 @@ class CancelToken {
|
|
|
6078
6150
|
});
|
|
6079
6151
|
|
|
6080
6152
|
// eslint-disable-next-line func-names
|
|
6081
|
-
this.promise.then = onfulfilled => {
|
|
6153
|
+
this.promise.then = (onfulfilled) => {
|
|
6082
6154
|
let _resolve;
|
|
6083
6155
|
// eslint-disable-next-line func-names
|
|
6084
|
-
const promise = new Promise(resolve => {
|
|
6156
|
+
const promise = new Promise((resolve) => {
|
|
6085
6157
|
token.subscribe(resolve);
|
|
6086
6158
|
_resolve = resolve;
|
|
6087
6159
|
}).then(onfulfilled);
|
|
@@ -6169,7 +6241,7 @@ class CancelToken {
|
|
|
6169
6241
|
});
|
|
6170
6242
|
return {
|
|
6171
6243
|
token,
|
|
6172
|
-
cancel
|
|
6244
|
+
cancel,
|
|
6173
6245
|
};
|
|
6174
6246
|
}
|
|
6175
6247
|
}
|
|
@@ -6280,7 +6352,7 @@ class Axios {
|
|
|
6280
6352
|
this.defaults = instanceConfig || {};
|
|
6281
6353
|
this.interceptors = {
|
|
6282
6354
|
request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"](),
|
|
6283
|
-
response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"]()
|
|
6355
|
+
response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"](),
|
|
6284
6356
|
};
|
|
6285
6357
|
}
|
|
6286
6358
|
|
|
@@ -6302,13 +6374,29 @@ class Axios {
|
|
|
6302
6374
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
6303
6375
|
|
|
6304
6376
|
// slice off the Error: ... line
|
|
6305
|
-
const stack =
|
|
6377
|
+
const stack = (() => {
|
|
6378
|
+
if (!dummy.stack) {
|
|
6379
|
+
return '';
|
|
6380
|
+
}
|
|
6381
|
+
|
|
6382
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
6383
|
+
|
|
6384
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
6385
|
+
})();
|
|
6306
6386
|
try {
|
|
6307
6387
|
if (!err.stack) {
|
|
6308
6388
|
err.stack = stack;
|
|
6309
6389
|
// match without the 2 top stack lines
|
|
6310
|
-
} else if (stack
|
|
6311
|
-
|
|
6390
|
+
} else if (stack) {
|
|
6391
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
6392
|
+
const secondNewlineIndex =
|
|
6393
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
6394
|
+
const stackWithoutTwoTopLines =
|
|
6395
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
6396
|
+
|
|
6397
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
6398
|
+
err.stack += '\n' + stack;
|
|
6399
|
+
}
|
|
6312
6400
|
}
|
|
6313
6401
|
} catch (e) {
|
|
6314
6402
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -6331,27 +6419,35 @@ class Axios {
|
|
|
6331
6419
|
|
|
6332
6420
|
config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(this.defaults, config);
|
|
6333
6421
|
|
|
6334
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
6422
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
6335
6423
|
|
|
6336
6424
|
if (transitional !== undefined) {
|
|
6337
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6425
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6426
|
+
transitional,
|
|
6427
|
+
{
|
|
6428
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
6429
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
6430
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
6431
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
6432
|
+
},
|
|
6433
|
+
false
|
|
6434
|
+
);
|
|
6343
6435
|
}
|
|
6344
6436
|
|
|
6345
6437
|
if (paramsSerializer != null) {
|
|
6346
6438
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(paramsSerializer)) {
|
|
6347
6439
|
config.paramsSerializer = {
|
|
6348
|
-
serialize: paramsSerializer
|
|
6349
|
-
}
|
|
6440
|
+
serialize: paramsSerializer,
|
|
6441
|
+
};
|
|
6350
6442
|
} else {
|
|
6351
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6443
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6444
|
+
paramsSerializer,
|
|
6445
|
+
{
|
|
6446
|
+
encode: validators.function,
|
|
6447
|
+
serialize: validators.function,
|
|
6448
|
+
},
|
|
6449
|
+
true
|
|
6450
|
+
);
|
|
6355
6451
|
}
|
|
6356
6452
|
}
|
|
6357
6453
|
|
|
@@ -6364,26 +6460,25 @@ class Axios {
|
|
|
6364
6460
|
config.allowAbsoluteUrls = true;
|
|
6365
6461
|
}
|
|
6366
6462
|
|
|
6367
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6463
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6464
|
+
config,
|
|
6465
|
+
{
|
|
6466
|
+
baseUrl: validators.spelling('baseURL'),
|
|
6467
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
6468
|
+
},
|
|
6469
|
+
true
|
|
6470
|
+
);
|
|
6371
6471
|
|
|
6372
6472
|
// Set config.method
|
|
6373
6473
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
6374
6474
|
|
|
6375
6475
|
// Flatten headers
|
|
6376
|
-
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(
|
|
6377
|
-
headers.common,
|
|
6378
|
-
headers[config.method]
|
|
6379
|
-
);
|
|
6476
|
+
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
|
|
6380
6477
|
|
|
6381
|
-
headers &&
|
|
6382
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
6383
|
-
(method) => {
|
|
6478
|
+
headers &&
|
|
6479
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
6384
6480
|
delete headers[method];
|
|
6385
|
-
}
|
|
6386
|
-
);
|
|
6481
|
+
});
|
|
6387
6482
|
|
|
6388
6483
|
config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].concat(contextHeaders, headers);
|
|
6389
6484
|
|
|
@@ -6398,7 +6493,8 @@ class Axios {
|
|
|
6398
6493
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
6399
6494
|
|
|
6400
6495
|
const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__["default"];
|
|
6401
|
-
const legacyInterceptorReqResOrdering =
|
|
6496
|
+
const legacyInterceptorReqResOrdering =
|
|
6497
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
6402
6498
|
|
|
6403
6499
|
if (legacyInterceptorReqResOrdering) {
|
|
6404
6500
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
@@ -6472,28 +6568,32 @@ class Axios {
|
|
|
6472
6568
|
// Provide aliases for supported request methods
|
|
6473
6569
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
6474
6570
|
/*eslint func-names:0*/
|
|
6475
|
-
Axios.prototype[method] = function(url, config) {
|
|
6476
|
-
return this.request(
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6571
|
+
Axios.prototype[method] = function (url, config) {
|
|
6572
|
+
return this.request(
|
|
6573
|
+
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
6574
|
+
method,
|
|
6575
|
+
url,
|
|
6576
|
+
data: (config || {}).data,
|
|
6577
|
+
})
|
|
6578
|
+
);
|
|
6481
6579
|
};
|
|
6482
6580
|
});
|
|
6483
6581
|
|
|
6484
6582
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
6485
|
-
/*eslint func-names:0*/
|
|
6486
|
-
|
|
6487
6583
|
function generateHTTPMethod(isForm) {
|
|
6488
6584
|
return function httpMethod(url, data, config) {
|
|
6489
|
-
return this.request(
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6585
|
+
return this.request(
|
|
6586
|
+
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
6587
|
+
method,
|
|
6588
|
+
headers: isForm
|
|
6589
|
+
? {
|
|
6590
|
+
'Content-Type': 'multipart/form-data',
|
|
6591
|
+
}
|
|
6592
|
+
: {},
|
|
6593
|
+
url,
|
|
6594
|
+
data,
|
|
6595
|
+
})
|
|
6596
|
+
);
|
|
6497
6597
|
};
|
|
6498
6598
|
}
|
|
6499
6599
|
|
|
@@ -6523,14 +6623,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6523
6623
|
|
|
6524
6624
|
|
|
6525
6625
|
class AxiosError extends Error {
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6626
|
+
static from(error, code, config, request, response, customProps) {
|
|
6627
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
6628
|
+
axiosError.cause = error;
|
|
6629
|
+
axiosError.name = error.name;
|
|
6630
|
+
|
|
6631
|
+
// Preserve status from the original error if not already set from response
|
|
6632
|
+
if (error.status != null && axiosError.status == null) {
|
|
6633
|
+
axiosError.status = error.status;
|
|
6532
6634
|
}
|
|
6533
6635
|
|
|
6636
|
+
customProps && Object.assign(axiosError, customProps);
|
|
6637
|
+
return axiosError;
|
|
6638
|
+
}
|
|
6639
|
+
|
|
6534
6640
|
/**
|
|
6535
6641
|
* Create an Error with the specified message, config, error code, request and response.
|
|
6536
6642
|
*
|
|
@@ -6543,37 +6649,48 @@ class AxiosError extends Error {
|
|
|
6543
6649
|
* @returns {Error} The created error.
|
|
6544
6650
|
*/
|
|
6545
6651
|
constructor(message, code, config, request, response) {
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6652
|
+
super(message);
|
|
6653
|
+
|
|
6654
|
+
// Make message enumerable to maintain backward compatibility
|
|
6655
|
+
// The native Error constructor sets message as non-enumerable,
|
|
6656
|
+
// but axios < v1.13.3 had it as enumerable
|
|
6657
|
+
Object.defineProperty(this, 'message', {
|
|
6658
|
+
value: message,
|
|
6659
|
+
enumerable: true,
|
|
6660
|
+
writable: true,
|
|
6661
|
+
configurable: true
|
|
6662
|
+
});
|
|
6663
|
+
|
|
6664
|
+
this.name = 'AxiosError';
|
|
6665
|
+
this.isAxiosError = true;
|
|
6666
|
+
code && (this.code = code);
|
|
6667
|
+
config && (this.config = config);
|
|
6668
|
+
request && (this.request = request);
|
|
6669
|
+
if (response) {
|
|
6670
|
+
this.response = response;
|
|
6671
|
+
this.status = response.status;
|
|
6672
|
+
}
|
|
6556
6673
|
}
|
|
6557
6674
|
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6675
|
+
toJSON() {
|
|
6676
|
+
return {
|
|
6677
|
+
// Standard
|
|
6678
|
+
message: this.message,
|
|
6679
|
+
name: this.name,
|
|
6680
|
+
// Microsoft
|
|
6681
|
+
description: this.description,
|
|
6682
|
+
number: this.number,
|
|
6683
|
+
// Mozilla
|
|
6684
|
+
fileName: this.fileName,
|
|
6685
|
+
lineNumber: this.lineNumber,
|
|
6686
|
+
columnNumber: this.columnNumber,
|
|
6687
|
+
stack: this.stack,
|
|
6688
|
+
// Axios
|
|
6689
|
+
config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
|
|
6690
|
+
code: this.code,
|
|
6691
|
+
status: this.status,
|
|
6692
|
+
};
|
|
6693
|
+
}
|
|
6577
6694
|
}
|
|
6578
6695
|
|
|
6579
6696
|
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
@@ -6614,16 +6731,49 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6614
6731
|
|
|
6615
6732
|
const $internals = Symbol('internals');
|
|
6616
6733
|
|
|
6734
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
6735
|
+
|
|
6736
|
+
function assertValidHeaderValue(value, header) {
|
|
6737
|
+
if (value === false || value == null) {
|
|
6738
|
+
return;
|
|
6739
|
+
}
|
|
6740
|
+
|
|
6741
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) {
|
|
6742
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
6743
|
+
return;
|
|
6744
|
+
}
|
|
6745
|
+
|
|
6746
|
+
if (!isValidHeaderValue(String(value))) {
|
|
6747
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
|
|
6617
6751
|
function normalizeHeader(header) {
|
|
6618
6752
|
return header && String(header).trim().toLowerCase();
|
|
6619
6753
|
}
|
|
6620
6754
|
|
|
6755
|
+
function stripTrailingCRLF(str) {
|
|
6756
|
+
let end = str.length;
|
|
6757
|
+
|
|
6758
|
+
while (end > 0) {
|
|
6759
|
+
const charCode = str.charCodeAt(end - 1);
|
|
6760
|
+
|
|
6761
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
6762
|
+
break;
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6765
|
+
end -= 1;
|
|
6766
|
+
}
|
|
6767
|
+
|
|
6768
|
+
return end === str.length ? str : str.slice(0, end);
|
|
6769
|
+
}
|
|
6770
|
+
|
|
6621
6771
|
function normalizeValue(value) {
|
|
6622
6772
|
if (value === false || value == null) {
|
|
6623
6773
|
return value;
|
|
6624
6774
|
}
|
|
6625
6775
|
|
|
6626
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value);
|
|
6776
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
6627
6777
|
}
|
|
6628
6778
|
|
|
6629
6779
|
function parseTokens(str) {
|
|
@@ -6661,8 +6811,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
6661
6811
|
}
|
|
6662
6812
|
|
|
6663
6813
|
function formatHeader(header) {
|
|
6664
|
-
return header
|
|
6665
|
-
.
|
|
6814
|
+
return header
|
|
6815
|
+
.trim()
|
|
6816
|
+
.toLowerCase()
|
|
6817
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
6666
6818
|
return char.toUpperCase() + str;
|
|
6667
6819
|
});
|
|
6668
6820
|
}
|
|
@@ -6670,12 +6822,12 @@ function formatHeader(header) {
|
|
|
6670
6822
|
function buildAccessors(obj, header) {
|
|
6671
6823
|
const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header);
|
|
6672
6824
|
|
|
6673
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
6825
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
6674
6826
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
6675
|
-
value: function(arg1, arg2, arg3) {
|
|
6827
|
+
value: function (arg1, arg2, arg3) {
|
|
6676
6828
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
6677
6829
|
},
|
|
6678
|
-
configurable: true
|
|
6830
|
+
configurable: true,
|
|
6679
6831
|
});
|
|
6680
6832
|
});
|
|
6681
6833
|
}
|
|
@@ -6697,7 +6849,13 @@ class AxiosHeaders {
|
|
|
6697
6849
|
|
|
6698
6850
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader);
|
|
6699
6851
|
|
|
6700
|
-
if
|
|
6852
|
+
if (
|
|
6853
|
+
!key ||
|
|
6854
|
+
self[key] === undefined ||
|
|
6855
|
+
_rewrite === true ||
|
|
6856
|
+
(_rewrite === undefined && self[key] !== false)
|
|
6857
|
+
) {
|
|
6858
|
+
assertValidHeaderValue(_value, _header);
|
|
6701
6859
|
self[key || _header] = normalizeValue(_value);
|
|
6702
6860
|
}
|
|
6703
6861
|
}
|
|
@@ -6706,21 +6864,26 @@ class AxiosHeaders {
|
|
|
6706
6864
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
6707
6865
|
|
|
6708
6866
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) {
|
|
6709
|
-
setHeaders(header, valueOrRewrite)
|
|
6710
|
-
} else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
6867
|
+
setHeaders(header, valueOrRewrite);
|
|
6868
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
6711
6869
|
setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
|
|
6712
6870
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isIterable(header)) {
|
|
6713
|
-
let obj = {},
|
|
6871
|
+
let obj = {},
|
|
6872
|
+
dest,
|
|
6873
|
+
key;
|
|
6714
6874
|
for (const entry of header) {
|
|
6715
6875
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(entry)) {
|
|
6716
6876
|
throw TypeError('Object iterator must return a key-value pair');
|
|
6717
6877
|
}
|
|
6718
6878
|
|
|
6719
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
6720
|
-
|
|
6879
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
6880
|
+
? _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest)
|
|
6881
|
+
? [...dest, entry[1]]
|
|
6882
|
+
: [dest, entry[1]]
|
|
6883
|
+
: entry[1];
|
|
6721
6884
|
}
|
|
6722
6885
|
|
|
6723
|
-
setHeaders(obj, valueOrRewrite)
|
|
6886
|
+
setHeaders(obj, valueOrRewrite);
|
|
6724
6887
|
} else {
|
|
6725
6888
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
6726
6889
|
}
|
|
@@ -6764,7 +6927,11 @@ class AxiosHeaders {
|
|
|
6764
6927
|
if (header) {
|
|
6765
6928
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header);
|
|
6766
6929
|
|
|
6767
|
-
return !!(
|
|
6930
|
+
return !!(
|
|
6931
|
+
key &&
|
|
6932
|
+
this[key] !== undefined &&
|
|
6933
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
6934
|
+
);
|
|
6768
6935
|
}
|
|
6769
6936
|
|
|
6770
6937
|
return false;
|
|
@@ -6804,7 +6971,7 @@ class AxiosHeaders {
|
|
|
6804
6971
|
|
|
6805
6972
|
while (i--) {
|
|
6806
6973
|
const key = keys[i];
|
|
6807
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
6974
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
6808
6975
|
delete this[key];
|
|
6809
6976
|
deleted = true;
|
|
6810
6977
|
}
|
|
@@ -6848,7 +7015,9 @@ class AxiosHeaders {
|
|
|
6848
7015
|
const obj = Object.create(null);
|
|
6849
7016
|
|
|
6850
7017
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
|
|
6851
|
-
value != null &&
|
|
7018
|
+
value != null &&
|
|
7019
|
+
value !== false &&
|
|
7020
|
+
(obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value);
|
|
6852
7021
|
});
|
|
6853
7022
|
|
|
6854
7023
|
return obj;
|
|
@@ -6859,11 +7028,13 @@ class AxiosHeaders {
|
|
|
6859
7028
|
}
|
|
6860
7029
|
|
|
6861
7030
|
toString() {
|
|
6862
|
-
return Object.entries(this.toJSON())
|
|
7031
|
+
return Object.entries(this.toJSON())
|
|
7032
|
+
.map(([header, value]) => header + ': ' + value)
|
|
7033
|
+
.join('\n');
|
|
6863
7034
|
}
|
|
6864
7035
|
|
|
6865
7036
|
getSetCookie() {
|
|
6866
|
-
return this.get(
|
|
7037
|
+
return this.get('set-cookie') || [];
|
|
6867
7038
|
}
|
|
6868
7039
|
|
|
6869
7040
|
get [Symbol.toStringTag]() {
|
|
@@ -6883,9 +7054,12 @@ class AxiosHeaders {
|
|
|
6883
7054
|
}
|
|
6884
7055
|
|
|
6885
7056
|
static accessor(header) {
|
|
6886
|
-
const internals =
|
|
6887
|
-
|
|
6888
|
-
|
|
7057
|
+
const internals =
|
|
7058
|
+
(this[$internals] =
|
|
7059
|
+
this[$internals] =
|
|
7060
|
+
{
|
|
7061
|
+
accessors: {},
|
|
7062
|
+
});
|
|
6889
7063
|
|
|
6890
7064
|
const accessors = internals.accessors;
|
|
6891
7065
|
const prototype = this.prototype;
|
|
@@ -6905,17 +7079,24 @@ class AxiosHeaders {
|
|
|
6905
7079
|
}
|
|
6906
7080
|
}
|
|
6907
7081
|
|
|
6908
|
-
AxiosHeaders.accessor([
|
|
7082
|
+
AxiosHeaders.accessor([
|
|
7083
|
+
'Content-Type',
|
|
7084
|
+
'Content-Length',
|
|
7085
|
+
'Accept',
|
|
7086
|
+
'Accept-Encoding',
|
|
7087
|
+
'User-Agent',
|
|
7088
|
+
'Authorization',
|
|
7089
|
+
]);
|
|
6909
7090
|
|
|
6910
7091
|
// reserved names hotfix
|
|
6911
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
7092
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
6912
7093
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
6913
7094
|
return {
|
|
6914
7095
|
get: () => value,
|
|
6915
7096
|
set(headerValue) {
|
|
6916
7097
|
this[mapped] = headerValue;
|
|
6917
|
-
}
|
|
6918
|
-
}
|
|
7098
|
+
},
|
|
7099
|
+
};
|
|
6919
7100
|
});
|
|
6920
7101
|
|
|
6921
7102
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders);
|
|
@@ -6959,7 +7140,7 @@ class InterceptorManager {
|
|
|
6959
7140
|
fulfilled,
|
|
6960
7141
|
rejected,
|
|
6961
7142
|
synchronous: options ? options.synchronous : false,
|
|
6962
|
-
runWhen: options ? options.runWhen : null
|
|
7143
|
+
runWhen: options ? options.runWhen : null,
|
|
6963
7144
|
});
|
|
6964
7145
|
return this.handlers.length - 1;
|
|
6965
7146
|
}
|
|
@@ -7105,10 +7286,7 @@ function dispatchRequest(config) {
|
|
|
7105
7286
|
config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(config.headers);
|
|
7106
7287
|
|
|
7107
7288
|
// Transform request data
|
|
7108
|
-
config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
7109
|
-
config,
|
|
7110
|
-
config.transformRequest
|
|
7111
|
-
);
|
|
7289
|
+
config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformRequest);
|
|
7112
7290
|
|
|
7113
7291
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
7114
7292
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
@@ -7116,36 +7294,35 @@ function dispatchRequest(config) {
|
|
|
7116
7294
|
|
|
7117
7295
|
const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].adapter, config);
|
|
7118
7296
|
|
|
7119
|
-
return adapter(config).then(
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
// Transform response data
|
|
7123
|
-
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
7124
|
-
config,
|
|
7125
|
-
config.transformResponse,
|
|
7126
|
-
response
|
|
7127
|
-
);
|
|
7128
|
-
|
|
7129
|
-
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
|
|
7130
|
-
|
|
7131
|
-
return response;
|
|
7132
|
-
}, function onAdapterRejection(reason) {
|
|
7133
|
-
if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reason)) {
|
|
7297
|
+
return adapter(config).then(
|
|
7298
|
+
function onAdapterResolution(response) {
|
|
7134
7299
|
throwIfCancellationRequested(config);
|
|
7135
7300
|
|
|
7136
7301
|
// Transform response data
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7302
|
+
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
|
|
7303
|
+
|
|
7304
|
+
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
|
|
7305
|
+
|
|
7306
|
+
return response;
|
|
7307
|
+
},
|
|
7308
|
+
function onAdapterRejection(reason) {
|
|
7309
|
+
if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reason)) {
|
|
7310
|
+
throwIfCancellationRequested(config);
|
|
7311
|
+
|
|
7312
|
+
// Transform response data
|
|
7313
|
+
if (reason && reason.response) {
|
|
7314
|
+
reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
7315
|
+
config,
|
|
7316
|
+
config.transformResponse,
|
|
7317
|
+
reason.response
|
|
7318
|
+
);
|
|
7319
|
+
reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(reason.response.headers);
|
|
7320
|
+
}
|
|
7144
7321
|
}
|
|
7145
|
-
}
|
|
7146
7322
|
|
|
7147
|
-
|
|
7148
|
-
|
|
7323
|
+
return Promise.reject(reason);
|
|
7324
|
+
}
|
|
7325
|
+
);
|
|
7149
7326
|
}
|
|
7150
7327
|
|
|
7151
7328
|
|
|
@@ -7168,8 +7345,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7168
7345
|
|
|
7169
7346
|
|
|
7170
7347
|
|
|
7171
|
-
const headersToObject = (thing) =>
|
|
7172
|
-
thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing;
|
|
7348
|
+
const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing);
|
|
7173
7349
|
|
|
7174
7350
|
/**
|
|
7175
7351
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -7262,23 +7438,12 @@ function mergeConfig(config1, config2) {
|
|
|
7262
7438
|
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
7263
7439
|
};
|
|
7264
7440
|
|
|
7265
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
prop === "prototype"
|
|
7272
|
-
)
|
|
7273
|
-
return;
|
|
7274
|
-
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop)
|
|
7275
|
-
? mergeMap[prop]
|
|
7276
|
-
: mergeDeepProperties;
|
|
7277
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
7278
|
-
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
7279
|
-
(config[prop] = configValue);
|
|
7280
|
-
},
|
|
7281
|
-
);
|
|
7441
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
7442
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
7443
|
+
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
7444
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
7445
|
+
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
7446
|
+
});
|
|
7282
7447
|
|
|
7283
7448
|
return config;
|
|
7284
7449
|
}
|
|
@@ -7315,13 +7480,17 @@ function settle(resolve, reject, response) {
|
|
|
7315
7480
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
7316
7481
|
resolve(response);
|
|
7317
7482
|
} else {
|
|
7318
|
-
reject(
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7483
|
+
reject(
|
|
7484
|
+
new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
|
|
7485
|
+
'Request failed with status code ' + response.status,
|
|
7486
|
+
[_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][
|
|
7487
|
+
Math.floor(response.status / 100) - 4
|
|
7488
|
+
],
|
|
7489
|
+
response.config,
|
|
7490
|
+
response.request,
|
|
7491
|
+
response
|
|
7492
|
+
)
|
|
7493
|
+
);
|
|
7325
7494
|
}
|
|
7326
7495
|
}
|
|
7327
7496
|
|
|
@@ -7426,96 +7595,107 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
7426
7595
|
}
|
|
7427
7596
|
|
|
7428
7597
|
const defaults = {
|
|
7429
|
-
|
|
7430
7598
|
transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
7431
7599
|
|
|
7432
7600
|
adapter: ['xhr', 'http', 'fetch'],
|
|
7433
7601
|
|
|
7434
|
-
transformRequest: [
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7602
|
+
transformRequest: [
|
|
7603
|
+
function transformRequest(data, headers) {
|
|
7604
|
+
const contentType = headers.getContentType() || '';
|
|
7605
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
7606
|
+
const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data);
|
|
7438
7607
|
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7608
|
+
if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) {
|
|
7609
|
+
data = new FormData(data);
|
|
7610
|
+
}
|
|
7442
7611
|
|
|
7443
|
-
|
|
7612
|
+
const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data);
|
|
7444
7613
|
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7614
|
+
if (isFormData) {
|
|
7615
|
+
return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_6__["default"])(data)) : data;
|
|
7616
|
+
}
|
|
7448
7617
|
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7618
|
+
if (
|
|
7619
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) ||
|
|
7620
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) ||
|
|
7621
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) ||
|
|
7622
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) ||
|
|
7623
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) ||
|
|
7624
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)
|
|
7625
|
+
) {
|
|
7626
|
+
return data;
|
|
7627
|
+
}
|
|
7628
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) {
|
|
7629
|
+
return data.buffer;
|
|
7630
|
+
}
|
|
7631
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) {
|
|
7632
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
7633
|
+
return data.toString();
|
|
7634
|
+
}
|
|
7465
7635
|
|
|
7466
|
-
|
|
7636
|
+
let isFileList;
|
|
7467
7637
|
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7638
|
+
if (isObjectPayload) {
|
|
7639
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
7640
|
+
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, this.formSerializer).toString();
|
|
7641
|
+
}
|
|
7472
7642
|
|
|
7473
|
-
|
|
7474
|
-
|
|
7643
|
+
if (
|
|
7644
|
+
(isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) ||
|
|
7645
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
7646
|
+
) {
|
|
7647
|
+
const _FormData = this.env && this.env.FormData;
|
|
7475
7648
|
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7649
|
+
return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
7650
|
+
isFileList ? { 'files[]': data } : data,
|
|
7651
|
+
_FormData && new _FormData(),
|
|
7652
|
+
this.formSerializer
|
|
7653
|
+
);
|
|
7654
|
+
}
|
|
7481
7655
|
}
|
|
7482
|
-
}
|
|
7483
7656
|
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7657
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
7658
|
+
headers.setContentType('application/json', false);
|
|
7659
|
+
return stringifySafely(data);
|
|
7660
|
+
}
|
|
7488
7661
|
|
|
7489
|
-
|
|
7490
|
-
|
|
7662
|
+
return data;
|
|
7663
|
+
},
|
|
7664
|
+
],
|
|
7491
7665
|
|
|
7492
|
-
transformResponse: [
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7666
|
+
transformResponse: [
|
|
7667
|
+
function transformResponse(data) {
|
|
7668
|
+
const transitional = this.transitional || defaults.transitional;
|
|
7669
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
7670
|
+
const JSONRequested = this.responseType === 'json';
|
|
7496
7671
|
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7672
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) {
|
|
7673
|
+
return data;
|
|
7674
|
+
}
|
|
7500
7675
|
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7676
|
+
if (
|
|
7677
|
+
data &&
|
|
7678
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) &&
|
|
7679
|
+
((forcedJSONParsing && !this.responseType) || JSONRequested)
|
|
7680
|
+
) {
|
|
7681
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
7682
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
7504
7683
|
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7684
|
+
try {
|
|
7685
|
+
return JSON.parse(data, this.parseReviver);
|
|
7686
|
+
} catch (e) {
|
|
7687
|
+
if (strictJSONParsing) {
|
|
7688
|
+
if (e.name === 'SyntaxError') {
|
|
7689
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, this.response);
|
|
7690
|
+
}
|
|
7691
|
+
throw e;
|
|
7511
7692
|
}
|
|
7512
|
-
throw e;
|
|
7513
7693
|
}
|
|
7514
7694
|
}
|
|
7515
|
-
}
|
|
7516
7695
|
|
|
7517
|
-
|
|
7518
|
-
|
|
7696
|
+
return data;
|
|
7697
|
+
},
|
|
7698
|
+
],
|
|
7519
7699
|
|
|
7520
7700
|
/**
|
|
7521
7701
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -7531,7 +7711,7 @@ const defaults = {
|
|
|
7531
7711
|
|
|
7532
7712
|
env: {
|
|
7533
7713
|
FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.FormData,
|
|
7534
|
-
Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.Blob
|
|
7714
|
+
Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.Blob,
|
|
7535
7715
|
},
|
|
7536
7716
|
|
|
7537
7717
|
validateStatus: function validateStatus(status) {
|
|
@@ -7540,10 +7720,10 @@ const defaults = {
|
|
|
7540
7720
|
|
|
7541
7721
|
headers: {
|
|
7542
7722
|
common: {
|
|
7543
|
-
|
|
7544
|
-
'Content-Type': undefined
|
|
7545
|
-
}
|
|
7546
|
-
}
|
|
7723
|
+
Accept: 'application/json, text/plain, */*',
|
|
7724
|
+
'Content-Type': undefined,
|
|
7725
|
+
},
|
|
7726
|
+
},
|
|
7547
7727
|
};
|
|
7548
7728
|
|
|
7549
7729
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
@@ -7571,7 +7751,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7571
7751
|
silentJSONParsing: true,
|
|
7572
7752
|
forcedJSONParsing: true,
|
|
7573
7753
|
clarifyTimeoutError: false,
|
|
7574
|
-
legacyInterceptorReqResOrdering: true
|
|
7754
|
+
legacyInterceptorReqResOrdering: true,
|
|
7575
7755
|
});
|
|
7576
7756
|
|
|
7577
7757
|
|
|
@@ -7587,7 +7767,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7587
7767
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7588
7768
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
7589
7769
|
/* harmony export */ });
|
|
7590
|
-
const VERSION = "1.
|
|
7770
|
+
const VERSION = "1.15.0";
|
|
7591
7771
|
|
|
7592
7772
|
/***/ }),
|
|
7593
7773
|
|
|
@@ -7622,7 +7802,7 @@ function encode(str) {
|
|
|
7622
7802
|
')': '%29',
|
|
7623
7803
|
'~': '%7E',
|
|
7624
7804
|
'%20': '+',
|
|
7625
|
-
'%00': '\x00'
|
|
7805
|
+
'%00': '\x00',
|
|
7626
7806
|
};
|
|
7627
7807
|
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
7628
7808
|
return charMap[match];
|
|
@@ -7650,13 +7830,17 @@ prototype.append = function append(name, value) {
|
|
|
7650
7830
|
};
|
|
7651
7831
|
|
|
7652
7832
|
prototype.toString = function toString(encoder) {
|
|
7653
|
-
const _encode = encoder
|
|
7654
|
-
|
|
7655
|
-
|
|
7833
|
+
const _encode = encoder
|
|
7834
|
+
? function (value) {
|
|
7835
|
+
return encoder.call(this, value, encode);
|
|
7836
|
+
}
|
|
7837
|
+
: encode;
|
|
7656
7838
|
|
|
7657
|
-
return this._pairs
|
|
7658
|
-
|
|
7659
|
-
|
|
7839
|
+
return this._pairs
|
|
7840
|
+
.map(function each(pair) {
|
|
7841
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
7842
|
+
}, '')
|
|
7843
|
+
.join('&');
|
|
7660
7844
|
};
|
|
7661
7845
|
|
|
7662
7846
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams);
|
|
@@ -7801,19 +7985,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7801
7985
|
|
|
7802
7986
|
|
|
7803
7987
|
/**
|
|
7804
|
-
* It replaces
|
|
7805
|
-
*
|
|
7988
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
7989
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
7806
7990
|
*
|
|
7807
7991
|
* @param {string} val The value to be encoded.
|
|
7808
7992
|
*
|
|
7809
7993
|
* @returns {string} The encoded value.
|
|
7810
7994
|
*/
|
|
7811
7995
|
function encode(val) {
|
|
7812
|
-
return encodeURIComponent(val)
|
|
7813
|
-
replace(/%3A/gi, ':')
|
|
7814
|
-
replace(/%24/g, '$')
|
|
7815
|
-
replace(/%2C/gi, ',')
|
|
7816
|
-
replace(/%20/g, '+');
|
|
7996
|
+
return encodeURIComponent(val)
|
|
7997
|
+
.replace(/%3A/gi, ':')
|
|
7998
|
+
.replace(/%24/g, '$')
|
|
7999
|
+
.replace(/%2C/gi, ',')
|
|
8000
|
+
.replace(/%20/g, '+');
|
|
7817
8001
|
}
|
|
7818
8002
|
|
|
7819
8003
|
/**
|
|
@@ -7830,11 +8014,13 @@ function buildURL(url, params, options) {
|
|
|
7830
8014
|
return url;
|
|
7831
8015
|
}
|
|
7832
8016
|
|
|
7833
|
-
const _encode = options && options.encode || encode;
|
|
8017
|
+
const _encode = (options && options.encode) || encode;
|
|
7834
8018
|
|
|
7835
|
-
const _options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)
|
|
7836
|
-
|
|
7837
|
-
|
|
8019
|
+
const _options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)
|
|
8020
|
+
? {
|
|
8021
|
+
serialize: options,
|
|
8022
|
+
}
|
|
8023
|
+
: options;
|
|
7838
8024
|
|
|
7839
8025
|
const serializeFn = _options && _options.serialize;
|
|
7840
8026
|
|
|
@@ -7843,13 +8029,13 @@ function buildURL(url, params, options) {
|
|
|
7843
8029
|
if (serializeFn) {
|
|
7844
8030
|
serializedParams = serializeFn(params, _options);
|
|
7845
8031
|
} else {
|
|
7846
|
-
serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params)
|
|
7847
|
-
params.toString()
|
|
7848
|
-
new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, _options).toString(_encode);
|
|
8032
|
+
serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params)
|
|
8033
|
+
? params.toString()
|
|
8034
|
+
: new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, _options).toString(_encode);
|
|
7849
8035
|
}
|
|
7850
8036
|
|
|
7851
8037
|
if (serializedParams) {
|
|
7852
|
-
const hashmarkIndex = url.indexOf(
|
|
8038
|
+
const hashmarkIndex = url.indexOf('#');
|
|
7853
8039
|
|
|
7854
8040
|
if (hashmarkIndex !== -1) {
|
|
7855
8041
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -7910,7 +8096,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7910
8096
|
|
|
7911
8097
|
|
|
7912
8098
|
const composeSignals = (signals, timeout) => {
|
|
7913
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
8099
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
7914
8100
|
|
|
7915
8101
|
if (timeout || length) {
|
|
7916
8102
|
let controller = new AbortController();
|
|
@@ -7922,35 +8108,43 @@ const composeSignals = (signals, timeout) => {
|
|
|
7922
8108
|
aborted = true;
|
|
7923
8109
|
unsubscribe();
|
|
7924
8110
|
const err = reason instanceof Error ? reason : this.reason;
|
|
7925
|
-
controller.abort(
|
|
8111
|
+
controller.abort(
|
|
8112
|
+
err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
8113
|
+
? err
|
|
8114
|
+
: new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err)
|
|
8115
|
+
);
|
|
7926
8116
|
}
|
|
7927
|
-
}
|
|
8117
|
+
};
|
|
7928
8118
|
|
|
7929
|
-
let timer =
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
8119
|
+
let timer =
|
|
8120
|
+
timeout &&
|
|
8121
|
+
setTimeout(() => {
|
|
8122
|
+
timer = null;
|
|
8123
|
+
onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout of ${timeout}ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT));
|
|
8124
|
+
}, timeout);
|
|
7933
8125
|
|
|
7934
8126
|
const unsubscribe = () => {
|
|
7935
8127
|
if (signals) {
|
|
7936
8128
|
timer && clearTimeout(timer);
|
|
7937
8129
|
timer = null;
|
|
7938
|
-
signals.forEach(signal => {
|
|
7939
|
-
signal.unsubscribe
|
|
8130
|
+
signals.forEach((signal) => {
|
|
8131
|
+
signal.unsubscribe
|
|
8132
|
+
? signal.unsubscribe(onabort)
|
|
8133
|
+
: signal.removeEventListener('abort', onabort);
|
|
7940
8134
|
});
|
|
7941
8135
|
signals = null;
|
|
7942
8136
|
}
|
|
7943
|
-
}
|
|
8137
|
+
};
|
|
7944
8138
|
|
|
7945
8139
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
7946
8140
|
|
|
7947
|
-
const {signal} = controller;
|
|
8141
|
+
const { signal } = controller;
|
|
7948
8142
|
|
|
7949
8143
|
signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);
|
|
7950
8144
|
|
|
7951
8145
|
return signal;
|
|
7952
8146
|
}
|
|
7953
|
-
}
|
|
8147
|
+
};
|
|
7954
8148
|
|
|
7955
8149
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals);
|
|
7956
8150
|
|
|
@@ -7972,56 +8166,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7972
8166
|
|
|
7973
8167
|
|
|
7974
8168
|
|
|
7975
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
|
|
8169
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
|
|
8170
|
+
? // Standard browser envs support document.cookie
|
|
8171
|
+
{
|
|
8172
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
8173
|
+
if (typeof document === 'undefined') return;
|
|
7976
8174
|
|
|
7977
|
-
|
|
7978
|
-
{
|
|
7979
|
-
write(name, value, expires, path, domain, secure, sameSite) {
|
|
7980
|
-
if (typeof document === 'undefined') return;
|
|
8175
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
7981
8176
|
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
cookie.push(`SameSite=${sameSite}`);
|
|
7998
|
-
}
|
|
8177
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isNumber(expires)) {
|
|
8178
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
8179
|
+
}
|
|
8180
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(path)) {
|
|
8181
|
+
cookie.push(`path=${path}`);
|
|
8182
|
+
}
|
|
8183
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(domain)) {
|
|
8184
|
+
cookie.push(`domain=${domain}`);
|
|
8185
|
+
}
|
|
8186
|
+
if (secure === true) {
|
|
8187
|
+
cookie.push('secure');
|
|
8188
|
+
}
|
|
8189
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(sameSite)) {
|
|
8190
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
8191
|
+
}
|
|
7999
8192
|
|
|
8000
|
-
|
|
8001
|
-
|
|
8193
|
+
document.cookie = cookie.join('; ');
|
|
8194
|
+
},
|
|
8002
8195
|
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8196
|
+
read(name) {
|
|
8197
|
+
if (typeof document === 'undefined') return null;
|
|
8198
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
8199
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
8200
|
+
},
|
|
8008
8201
|
|
|
8009
|
-
|
|
8010
|
-
|
|
8202
|
+
remove(name) {
|
|
8203
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
8204
|
+
},
|
|
8011
8205
|
}
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
return null;
|
|
8021
|
-
},
|
|
8022
|
-
remove() {}
|
|
8023
|
-
});
|
|
8024
|
-
|
|
8206
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
8207
|
+
{
|
|
8208
|
+
write() {},
|
|
8209
|
+
read() {
|
|
8210
|
+
return null;
|
|
8211
|
+
},
|
|
8212
|
+
remove() {},
|
|
8213
|
+
});
|
|
8025
8214
|
|
|
8026
8215
|
|
|
8027
8216
|
/***/ }),
|
|
@@ -8053,7 +8242,7 @@ function parsePropPath(name) {
|
|
|
8053
8242
|
// foo.x.y.z
|
|
8054
8243
|
// foo-x-y-z
|
|
8055
8244
|
// foo x y z
|
|
8056
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
8245
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
8057
8246
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
8058
8247
|
});
|
|
8059
8248
|
}
|
|
@@ -8167,7 +8356,6 @@ function isAbsoluteURL(url) {
|
|
|
8167
8356
|
}
|
|
8168
8357
|
|
|
8169
8358
|
|
|
8170
|
-
|
|
8171
8359
|
/***/ }),
|
|
8172
8360
|
|
|
8173
8361
|
/***/ "./node_modules/axios/lib/helpers/isAxiosError.js":
|
|
@@ -8193,7 +8381,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8193
8381
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
8194
8382
|
*/
|
|
8195
8383
|
function isAxiosError(payload) {
|
|
8196
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) &&
|
|
8384
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && payload.isAxiosError === true;
|
|
8197
8385
|
}
|
|
8198
8386
|
|
|
8199
8387
|
|
|
@@ -8212,18 +8400,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8212
8400
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
8213
8401
|
|
|
8214
8402
|
|
|
8215
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
|
|
8216
|
-
|
|
8403
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
|
|
8404
|
+
? ((origin, isMSIE) => (url) => {
|
|
8405
|
+
url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
|
|
8217
8406
|
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
})(
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
)
|
|
8407
|
+
return (
|
|
8408
|
+
origin.protocol === url.protocol &&
|
|
8409
|
+
origin.host === url.host &&
|
|
8410
|
+
(isMSIE || origin.port === url.port)
|
|
8411
|
+
);
|
|
8412
|
+
})(
|
|
8413
|
+
new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
|
|
8414
|
+
_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
|
|
8415
|
+
)
|
|
8416
|
+
: () => true);
|
|
8227
8417
|
|
|
8228
8418
|
|
|
8229
8419
|
/***/ }),
|
|
@@ -8262,10 +8452,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8262
8452
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
8263
8453
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
8264
8454
|
const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([
|
|
8265
|
-
'age',
|
|
8266
|
-
'
|
|
8267
|
-
'
|
|
8268
|
-
'
|
|
8455
|
+
'age',
|
|
8456
|
+
'authorization',
|
|
8457
|
+
'content-length',
|
|
8458
|
+
'content-type',
|
|
8459
|
+
'etag',
|
|
8460
|
+
'expires',
|
|
8461
|
+
'from',
|
|
8462
|
+
'host',
|
|
8463
|
+
'if-modified-since',
|
|
8464
|
+
'if-unmodified-since',
|
|
8465
|
+
'last-modified',
|
|
8466
|
+
'location',
|
|
8467
|
+
'max-forwards',
|
|
8468
|
+
'proxy-authorization',
|
|
8469
|
+
'referer',
|
|
8470
|
+
'retry-after',
|
|
8471
|
+
'user-agent',
|
|
8269
8472
|
]);
|
|
8270
8473
|
|
|
8271
8474
|
/**
|
|
@@ -8282,31 +8485,32 @@ const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toOb
|
|
|
8282
8485
|
*
|
|
8283
8486
|
* @returns {Object} Headers parsed into an object
|
|
8284
8487
|
*/
|
|
8285
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => {
|
|
8488
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((rawHeaders) => {
|
|
8286
8489
|
const parsed = {};
|
|
8287
8490
|
let key;
|
|
8288
8491
|
let val;
|
|
8289
8492
|
let i;
|
|
8290
8493
|
|
|
8291
|
-
rawHeaders &&
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8494
|
+
rawHeaders &&
|
|
8495
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
8496
|
+
i = line.indexOf(':');
|
|
8497
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
8498
|
+
val = line.substring(i + 1).trim();
|
|
8295
8499
|
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8500
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
8501
|
+
return;
|
|
8502
|
+
}
|
|
8299
8503
|
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8504
|
+
if (key === 'set-cookie') {
|
|
8505
|
+
if (parsed[key]) {
|
|
8506
|
+
parsed[key].push(val);
|
|
8507
|
+
} else {
|
|
8508
|
+
parsed[key] = [val];
|
|
8509
|
+
}
|
|
8303
8510
|
} else {
|
|
8304
|
-
parsed[key] = [val
|
|
8511
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
8305
8512
|
}
|
|
8306
|
-
}
|
|
8307
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
8308
|
-
}
|
|
8309
|
-
});
|
|
8513
|
+
});
|
|
8310
8514
|
|
|
8311
8515
|
return parsed;
|
|
8312
8516
|
});
|
|
@@ -8328,7 +8532,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8328
8532
|
|
|
8329
8533
|
function parseProtocol(url) {
|
|
8330
8534
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
8331
|
-
return match && match[1] || '';
|
|
8535
|
+
return (match && match[1]) || '';
|
|
8332
8536
|
}
|
|
8333
8537
|
|
|
8334
8538
|
|
|
@@ -8357,7 +8561,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
8357
8561
|
let bytesNotified = 0;
|
|
8358
8562
|
const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
|
|
8359
8563
|
|
|
8360
|
-
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => {
|
|
8564
|
+
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
|
|
8361
8565
|
const loaded = e.loaded;
|
|
8362
8566
|
const total = e.lengthComputable ? e.total : undefined;
|
|
8363
8567
|
const progressBytes = loaded - bytesNotified;
|
|
@@ -8369,30 +8573,37 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
8369
8573
|
const data = {
|
|
8370
8574
|
loaded,
|
|
8371
8575
|
total,
|
|
8372
|
-
progress: total ?
|
|
8576
|
+
progress: total ? loaded / total : undefined,
|
|
8373
8577
|
bytes: progressBytes,
|
|
8374
8578
|
rate: rate ? rate : undefined,
|
|
8375
8579
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
8376
8580
|
event: e,
|
|
8377
8581
|
lengthComputable: total != null,
|
|
8378
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
8582
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
8379
8583
|
};
|
|
8380
8584
|
|
|
8381
8585
|
listener(data);
|
|
8382
8586
|
}, freq);
|
|
8383
|
-
}
|
|
8587
|
+
};
|
|
8384
8588
|
|
|
8385
8589
|
const progressEventDecorator = (total, throttled) => {
|
|
8386
8590
|
const lengthComputable = total != null;
|
|
8387
8591
|
|
|
8388
|
-
return [
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8592
|
+
return [
|
|
8593
|
+
(loaded) =>
|
|
8594
|
+
throttled[0]({
|
|
8595
|
+
lengthComputable,
|
|
8596
|
+
total,
|
|
8597
|
+
loaded,
|
|
8598
|
+
}),
|
|
8599
|
+
throttled[1],
|
|
8600
|
+
];
|
|
8601
|
+
};
|
|
8394
8602
|
|
|
8395
|
-
const asyncDecorator =
|
|
8603
|
+
const asyncDecorator =
|
|
8604
|
+
(fn) =>
|
|
8605
|
+
(...args) =>
|
|
8606
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args));
|
|
8396
8607
|
|
|
8397
8608
|
|
|
8398
8609
|
/***/ }),
|
|
@@ -8431,12 +8642,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8431
8642
|
|
|
8432
8643
|
newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
|
|
8433
8644
|
|
|
8434
|
-
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
8645
|
+
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
8646
|
+
(0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
8647
|
+
config.params,
|
|
8648
|
+
config.paramsSerializer
|
|
8649
|
+
);
|
|
8435
8650
|
|
|
8436
8651
|
// HTTP basic authentication
|
|
8437
8652
|
if (auth) {
|
|
8438
|
-
headers.set(
|
|
8439
|
-
|
|
8653
|
+
headers.set(
|
|
8654
|
+
'Authorization',
|
|
8655
|
+
'Basic ' +
|
|
8656
|
+
btoa(
|
|
8657
|
+
(auth.username || '') +
|
|
8658
|
+
':' +
|
|
8659
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
8660
|
+
)
|
|
8440
8661
|
);
|
|
8441
8662
|
}
|
|
8442
8663
|
|
|
@@ -8454,7 +8675,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8454
8675
|
}
|
|
8455
8676
|
});
|
|
8456
8677
|
}
|
|
8457
|
-
}
|
|
8678
|
+
}
|
|
8458
8679
|
|
|
8459
8680
|
// Add xsrf header
|
|
8460
8681
|
// This is only done if running in a standard browser environment.
|
|
@@ -8477,7 +8698,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8477
8698
|
});
|
|
8478
8699
|
|
|
8479
8700
|
|
|
8480
|
-
|
|
8481
8701
|
/***/ }),
|
|
8482
8702
|
|
|
8483
8703
|
/***/ "./node_modules/axios/lib/helpers/speedometer.js":
|
|
@@ -8540,7 +8760,7 @@ function speedometer(samplesCount, min) {
|
|
|
8540
8760
|
|
|
8541
8761
|
const passed = startedAt && now - startedAt;
|
|
8542
8762
|
|
|
8543
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
8763
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
8544
8764
|
};
|
|
8545
8765
|
}
|
|
8546
8766
|
|
|
@@ -8621,23 +8841,23 @@ function throttle(fn, freq) {
|
|
|
8621
8841
|
timer = null;
|
|
8622
8842
|
}
|
|
8623
8843
|
fn(...args);
|
|
8624
|
-
}
|
|
8844
|
+
};
|
|
8625
8845
|
|
|
8626
8846
|
const throttled = (...args) => {
|
|
8627
8847
|
const now = Date.now();
|
|
8628
8848
|
const passed = now - timestamp;
|
|
8629
|
-
if (
|
|
8849
|
+
if (passed >= threshold) {
|
|
8630
8850
|
invoke(args, now);
|
|
8631
8851
|
} else {
|
|
8632
8852
|
lastArgs = args;
|
|
8633
8853
|
if (!timer) {
|
|
8634
8854
|
timer = setTimeout(() => {
|
|
8635
8855
|
timer = null;
|
|
8636
|
-
invoke(lastArgs)
|
|
8856
|
+
invoke(lastArgs);
|
|
8637
8857
|
}, threshold - passed);
|
|
8638
8858
|
}
|
|
8639
8859
|
}
|
|
8640
|
-
}
|
|
8860
|
+
};
|
|
8641
8861
|
|
|
8642
8862
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
8643
8863
|
|
|
@@ -8702,11 +8922,14 @@ function removeBrackets(key) {
|
|
|
8702
8922
|
*/
|
|
8703
8923
|
function renderKey(path, key, dots) {
|
|
8704
8924
|
if (!path) return key;
|
|
8705
|
-
return path
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8925
|
+
return path
|
|
8926
|
+
.concat(key)
|
|
8927
|
+
.map(function each(token, i) {
|
|
8928
|
+
// eslint-disable-next-line no-param-reassign
|
|
8929
|
+
token = removeBrackets(token);
|
|
8930
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
8931
|
+
})
|
|
8932
|
+
.join(dots ? '.' : '');
|
|
8710
8933
|
}
|
|
8711
8934
|
|
|
8712
8935
|
/**
|
|
@@ -8756,21 +8979,26 @@ function toFormData(obj, formData, options) {
|
|
|
8756
8979
|
formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] || FormData)();
|
|
8757
8980
|
|
|
8758
8981
|
// eslint-disable-next-line no-param-reassign
|
|
8759
|
-
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8982
|
+
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
|
|
8983
|
+
options,
|
|
8984
|
+
{
|
|
8985
|
+
metaTokens: true,
|
|
8986
|
+
dots: false,
|
|
8987
|
+
indexes: false,
|
|
8988
|
+
},
|
|
8989
|
+
false,
|
|
8990
|
+
function defined(option, source) {
|
|
8991
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
8992
|
+
return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]);
|
|
8993
|
+
}
|
|
8994
|
+
);
|
|
8767
8995
|
|
|
8768
8996
|
const metaTokens = options.metaTokens;
|
|
8769
8997
|
// eslint-disable-next-line no-use-before-define
|
|
8770
8998
|
const visitor = options.visitor || defaultVisitor;
|
|
8771
8999
|
const dots = options.dots;
|
|
8772
9000
|
const indexes = options.indexes;
|
|
8773
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
9001
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
8774
9002
|
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
|
|
8775
9003
|
|
|
8776
9004
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
|
|
@@ -8812,6 +9040,11 @@ function toFormData(obj, formData, options) {
|
|
|
8812
9040
|
function defaultVisitor(value, key, path) {
|
|
8813
9041
|
let arr = value;
|
|
8814
9042
|
|
|
9043
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReactNative(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReactNativeBlob(value)) {
|
|
9044
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
9045
|
+
return false;
|
|
9046
|
+
}
|
|
9047
|
+
|
|
8815
9048
|
if (value && !path && typeof value === 'object') {
|
|
8816
9049
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) {
|
|
8817
9050
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -8820,17 +9053,22 @@ function toFormData(obj, formData, options) {
|
|
|
8820
9053
|
value = JSON.stringify(value);
|
|
8821
9054
|
} else if (
|
|
8822
9055
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) ||
|
|
8823
|
-
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value))
|
|
8824
|
-
|
|
9056
|
+
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)))
|
|
9057
|
+
) {
|
|
8825
9058
|
// eslint-disable-next-line no-param-reassign
|
|
8826
9059
|
key = removeBrackets(key);
|
|
8827
9060
|
|
|
8828
9061
|
arr.forEach(function each(el, index) {
|
|
8829
|
-
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
9062
|
+
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
9063
|
+
formData.append(
|
|
9064
|
+
// eslint-disable-next-line no-nested-ternary
|
|
9065
|
+
indexes === true
|
|
9066
|
+
? renderKey([key], index, dots)
|
|
9067
|
+
: indexes === null
|
|
9068
|
+
? key
|
|
9069
|
+
: key + '[]',
|
|
9070
|
+
convertValue(el)
|
|
9071
|
+
);
|
|
8834
9072
|
});
|
|
8835
9073
|
return false;
|
|
8836
9074
|
}
|
|
@@ -8850,7 +9088,7 @@ function toFormData(obj, formData, options) {
|
|
|
8850
9088
|
const exposedHelpers = Object.assign(predicates, {
|
|
8851
9089
|
defaultVisitor,
|
|
8852
9090
|
convertValue,
|
|
8853
|
-
isVisitable
|
|
9091
|
+
isVisitable,
|
|
8854
9092
|
});
|
|
8855
9093
|
|
|
8856
9094
|
function build(value, path) {
|
|
@@ -8863,9 +9101,9 @@ function toFormData(obj, formData, options) {
|
|
|
8863
9101
|
stack.push(value);
|
|
8864
9102
|
|
|
8865
9103
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) {
|
|
8866
|
-
const result =
|
|
8867
|
-
|
|
8868
|
-
|
|
9104
|
+
const result =
|
|
9105
|
+
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
9106
|
+
visitor.call(formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
8869
9107
|
|
|
8870
9108
|
if (result === true) {
|
|
8871
9109
|
build(el, path ? path.concat(key) : [key]);
|
|
@@ -8910,7 +9148,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8910
9148
|
|
|
8911
9149
|
function toURLEncodedForm(data, options) {
|
|
8912
9150
|
return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].classes.URLSearchParams(), {
|
|
8913
|
-
visitor: function(value, key, path, helpers) {
|
|
9151
|
+
visitor: function (value, key, path, helpers) {
|
|
8914
9152
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(value)) {
|
|
8915
9153
|
this.append(key, value.toString('base64'));
|
|
8916
9154
|
return false;
|
|
@@ -8918,7 +9156,7 @@ function toURLEncodedForm(data, options) {
|
|
|
8918
9156
|
|
|
8919
9157
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
8920
9158
|
},
|
|
8921
|
-
...options
|
|
9159
|
+
...options,
|
|
8922
9160
|
});
|
|
8923
9161
|
}
|
|
8924
9162
|
|
|
@@ -8937,7 +9175,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8937
9175
|
/* harmony export */ streamChunk: () => (/* binding */ streamChunk),
|
|
8938
9176
|
/* harmony export */ trackStream: () => (/* binding */ trackStream)
|
|
8939
9177
|
/* harmony export */ });
|
|
8940
|
-
|
|
8941
9178
|
const streamChunk = function* (chunk, chunkSize) {
|
|
8942
9179
|
let len = chunk.byteLength;
|
|
8943
9180
|
|
|
@@ -8954,13 +9191,13 @@ const streamChunk = function* (chunk, chunkSize) {
|
|
|
8954
9191
|
yield chunk.slice(pos, end);
|
|
8955
9192
|
pos = end;
|
|
8956
9193
|
}
|
|
8957
|
-
}
|
|
9194
|
+
};
|
|
8958
9195
|
|
|
8959
9196
|
const readBytes = async function* (iterable, chunkSize) {
|
|
8960
9197
|
for await (const chunk of readStream(iterable)) {
|
|
8961
9198
|
yield* streamChunk(chunk, chunkSize);
|
|
8962
9199
|
}
|
|
8963
|
-
}
|
|
9200
|
+
};
|
|
8964
9201
|
|
|
8965
9202
|
const readStream = async function* (stream) {
|
|
8966
9203
|
if (stream[Symbol.asyncIterator]) {
|
|
@@ -8971,7 +9208,7 @@ const readStream = async function* (stream) {
|
|
|
8971
9208
|
const reader = stream.getReader();
|
|
8972
9209
|
try {
|
|
8973
9210
|
for (;;) {
|
|
8974
|
-
const {done, value} = await reader.read();
|
|
9211
|
+
const { done, value } = await reader.read();
|
|
8975
9212
|
if (done) {
|
|
8976
9213
|
break;
|
|
8977
9214
|
}
|
|
@@ -8980,7 +9217,7 @@ const readStream = async function* (stream) {
|
|
|
8980
9217
|
} finally {
|
|
8981
9218
|
await reader.cancel();
|
|
8982
9219
|
}
|
|
8983
|
-
}
|
|
9220
|
+
};
|
|
8984
9221
|
|
|
8985
9222
|
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
8986
9223
|
const iterator = readBytes(stream, chunkSize);
|
|
@@ -8992,38 +9229,41 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
8992
9229
|
done = true;
|
|
8993
9230
|
onFinish && onFinish(e);
|
|
8994
9231
|
}
|
|
8995
|
-
}
|
|
9232
|
+
};
|
|
8996
9233
|
|
|
8997
|
-
return new ReadableStream(
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9234
|
+
return new ReadableStream(
|
|
9235
|
+
{
|
|
9236
|
+
async pull(controller) {
|
|
9237
|
+
try {
|
|
9238
|
+
const { done, value } = await iterator.next();
|
|
9001
9239
|
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9240
|
+
if (done) {
|
|
9241
|
+
_onFinish();
|
|
9242
|
+
controller.close();
|
|
9243
|
+
return;
|
|
9244
|
+
}
|
|
9007
9245
|
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9246
|
+
let len = value.byteLength;
|
|
9247
|
+
if (onProgress) {
|
|
9248
|
+
let loadedBytes = (bytes += len);
|
|
9249
|
+
onProgress(loadedBytes);
|
|
9250
|
+
}
|
|
9251
|
+
controller.enqueue(new Uint8Array(value));
|
|
9252
|
+
} catch (err) {
|
|
9253
|
+
_onFinish(err);
|
|
9254
|
+
throw err;
|
|
9012
9255
|
}
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
_onFinish(
|
|
9016
|
-
|
|
9017
|
-
}
|
|
9256
|
+
},
|
|
9257
|
+
cancel(reason) {
|
|
9258
|
+
_onFinish(reason);
|
|
9259
|
+
return iterator.return();
|
|
9260
|
+
},
|
|
9018
9261
|
},
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
return iterator.return();
|
|
9262
|
+
{
|
|
9263
|
+
highWaterMark: 2,
|
|
9022
9264
|
}
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
})
|
|
9026
|
-
}
|
|
9265
|
+
);
|
|
9266
|
+
};
|
|
9027
9267
|
|
|
9028
9268
|
|
|
9029
9269
|
/***/ }),
|
|
@@ -9067,7 +9307,15 @@ const deprecatedWarnings = {};
|
|
|
9067
9307
|
*/
|
|
9068
9308
|
validators.transitional = function transitional(validator, version, message) {
|
|
9069
9309
|
function formatMessage(opt, desc) {
|
|
9070
|
-
return
|
|
9310
|
+
return (
|
|
9311
|
+
'[Axios v' +
|
|
9312
|
+
_env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION +
|
|
9313
|
+
"] Transitional option '" +
|
|
9314
|
+
opt +
|
|
9315
|
+
"'" +
|
|
9316
|
+
desc +
|
|
9317
|
+
(message ? '. ' + message : '')
|
|
9318
|
+
);
|
|
9071
9319
|
}
|
|
9072
9320
|
|
|
9073
9321
|
// eslint-disable-next-line func-names
|
|
@@ -9099,7 +9347,7 @@ validators.spelling = function spelling(correctSpelling) {
|
|
|
9099
9347
|
// eslint-disable-next-line no-console
|
|
9100
9348
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
9101
9349
|
return true;
|
|
9102
|
-
}
|
|
9350
|
+
};
|
|
9103
9351
|
};
|
|
9104
9352
|
|
|
9105
9353
|
/**
|
|
@@ -9125,7 +9373,10 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
9125
9373
|
const value = options[opt];
|
|
9126
9374
|
const result = value === undefined || validator(value, opt, options);
|
|
9127
9375
|
if (result !== true) {
|
|
9128
|
-
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
9376
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
9377
|
+
'option ' + opt + ' must be ' + result,
|
|
9378
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE
|
|
9379
|
+
);
|
|
9129
9380
|
}
|
|
9130
9381
|
continue;
|
|
9131
9382
|
}
|
|
@@ -9137,7 +9388,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
9137
9388
|
|
|
9138
9389
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
9139
9390
|
assertOptions,
|
|
9140
|
-
validators
|
|
9391
|
+
validators,
|
|
9141
9392
|
});
|
|
9142
9393
|
|
|
9143
9394
|
|
|
@@ -9218,9 +9469,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9218
9469
|
classes: {
|
|
9219
9470
|
URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
9220
9471
|
FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
9221
|
-
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
9472
|
+
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
9222
9473
|
},
|
|
9223
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
9474
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
9224
9475
|
});
|
|
9225
9476
|
|
|
9226
9477
|
|
|
@@ -9242,7 +9493,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9242
9493
|
/* harmony export */ });
|
|
9243
9494
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
9244
9495
|
|
|
9245
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
9496
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
9246
9497
|
|
|
9247
9498
|
/**
|
|
9248
9499
|
* Determine if we're running in a standard browser environment
|
|
@@ -9261,7 +9512,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
|
9261
9512
|
*
|
|
9262
9513
|
* @returns {boolean}
|
|
9263
9514
|
*/
|
|
9264
|
-
const hasStandardBrowserEnv =
|
|
9515
|
+
const hasStandardBrowserEnv =
|
|
9516
|
+
hasBrowserEnv &&
|
|
9265
9517
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
9266
9518
|
|
|
9267
9519
|
/**
|
|
@@ -9282,7 +9534,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
9282
9534
|
);
|
|
9283
9535
|
})();
|
|
9284
9536
|
|
|
9285
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
9537
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
9286
9538
|
|
|
9287
9539
|
|
|
9288
9540
|
|
|
@@ -9306,7 +9558,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9306
9558
|
|
|
9307
9559
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
9308
9560
|
..._common_utils_js__WEBPACK_IMPORTED_MODULE_1__,
|
|
9309
|
-
..._node_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
9561
|
+
..._node_index_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
9310
9562
|
});
|
|
9311
9563
|
|
|
9312
9564
|
|
|
@@ -9361,7 +9613,7 @@ const { isArray } = Array;
|
|
|
9361
9613
|
*
|
|
9362
9614
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
9363
9615
|
*/
|
|
9364
|
-
const isUndefined = typeOfTest(
|
|
9616
|
+
const isUndefined = typeOfTest('undefined');
|
|
9365
9617
|
|
|
9366
9618
|
/**
|
|
9367
9619
|
* Determine if a value is a Buffer
|
|
@@ -9388,7 +9640,7 @@ function isBuffer(val) {
|
|
|
9388
9640
|
*
|
|
9389
9641
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
9390
9642
|
*/
|
|
9391
|
-
const isArrayBuffer = kindOfTest(
|
|
9643
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
9392
9644
|
|
|
9393
9645
|
/**
|
|
9394
9646
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -9399,7 +9651,7 @@ const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
|
9399
9651
|
*/
|
|
9400
9652
|
function isArrayBufferView(val) {
|
|
9401
9653
|
let result;
|
|
9402
|
-
if (typeof ArrayBuffer !==
|
|
9654
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
9403
9655
|
result = ArrayBuffer.isView(val);
|
|
9404
9656
|
} else {
|
|
9405
9657
|
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
@@ -9414,7 +9666,7 @@ function isArrayBufferView(val) {
|
|
|
9414
9666
|
*
|
|
9415
9667
|
* @returns {boolean} True if value is a String, otherwise false
|
|
9416
9668
|
*/
|
|
9417
|
-
const isString = typeOfTest(
|
|
9669
|
+
const isString = typeOfTest('string');
|
|
9418
9670
|
|
|
9419
9671
|
/**
|
|
9420
9672
|
* Determine if a value is a Function
|
|
@@ -9422,7 +9674,7 @@ const isString = typeOfTest("string");
|
|
|
9422
9674
|
* @param {*} val The value to test
|
|
9423
9675
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
9424
9676
|
*/
|
|
9425
|
-
const isFunction = typeOfTest(
|
|
9677
|
+
const isFunction = typeOfTest('function');
|
|
9426
9678
|
|
|
9427
9679
|
/**
|
|
9428
9680
|
* Determine if a value is a Number
|
|
@@ -9431,7 +9683,7 @@ const isFunction = typeOfTest("function");
|
|
|
9431
9683
|
*
|
|
9432
9684
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
9433
9685
|
*/
|
|
9434
|
-
const isNumber = typeOfTest(
|
|
9686
|
+
const isNumber = typeOfTest('number');
|
|
9435
9687
|
|
|
9436
9688
|
/**
|
|
9437
9689
|
* Determine if a value is an Object
|
|
@@ -9440,7 +9692,7 @@ const isNumber = typeOfTest("number");
|
|
|
9440
9692
|
*
|
|
9441
9693
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
9442
9694
|
*/
|
|
9443
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
9695
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
9444
9696
|
|
|
9445
9697
|
/**
|
|
9446
9698
|
* Determine if a value is a Boolean
|
|
@@ -9458,7 +9710,7 @@ const isBoolean = (thing) => thing === true || thing === false;
|
|
|
9458
9710
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
9459
9711
|
*/
|
|
9460
9712
|
const isPlainObject = (val) => {
|
|
9461
|
-
if (kindOf(val) !==
|
|
9713
|
+
if (kindOf(val) !== 'object') {
|
|
9462
9714
|
return false;
|
|
9463
9715
|
}
|
|
9464
9716
|
|
|
@@ -9486,10 +9738,7 @@ const isEmptyObject = (val) => {
|
|
|
9486
9738
|
}
|
|
9487
9739
|
|
|
9488
9740
|
try {
|
|
9489
|
-
return (
|
|
9490
|
-
Object.keys(val).length === 0 &&
|
|
9491
|
-
Object.getPrototypeOf(val) === Object.prototype
|
|
9492
|
-
);
|
|
9741
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
9493
9742
|
} catch (e) {
|
|
9494
9743
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
9495
9744
|
return false;
|
|
@@ -9503,7 +9752,7 @@ const isEmptyObject = (val) => {
|
|
|
9503
9752
|
*
|
|
9504
9753
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
9505
9754
|
*/
|
|
9506
|
-
const isDate = kindOfTest(
|
|
9755
|
+
const isDate = kindOfTest('Date');
|
|
9507
9756
|
|
|
9508
9757
|
/**
|
|
9509
9758
|
* Determine if a value is a File
|
|
@@ -9512,7 +9761,32 @@ const isDate = kindOfTest("Date");
|
|
|
9512
9761
|
*
|
|
9513
9762
|
* @returns {boolean} True if value is a File, otherwise false
|
|
9514
9763
|
*/
|
|
9515
|
-
const isFile = kindOfTest(
|
|
9764
|
+
const isFile = kindOfTest('File');
|
|
9765
|
+
|
|
9766
|
+
/**
|
|
9767
|
+
* Determine if a value is a React Native Blob
|
|
9768
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
9769
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
9770
|
+
*
|
|
9771
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
9772
|
+
*
|
|
9773
|
+
* @param {*} value The value to test
|
|
9774
|
+
*
|
|
9775
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
9776
|
+
*/
|
|
9777
|
+
const isReactNativeBlob = (value) => {
|
|
9778
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
9779
|
+
}
|
|
9780
|
+
|
|
9781
|
+
/**
|
|
9782
|
+
* Determine if environment is React Native
|
|
9783
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
9784
|
+
*
|
|
9785
|
+
* @param {*} formData The formData to test
|
|
9786
|
+
*
|
|
9787
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
9788
|
+
*/
|
|
9789
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
9516
9790
|
|
|
9517
9791
|
/**
|
|
9518
9792
|
* Determine if a value is a Blob
|
|
@@ -9521,7 +9795,7 @@ const isFile = kindOfTest("File");
|
|
|
9521
9795
|
*
|
|
9522
9796
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
9523
9797
|
*/
|
|
9524
|
-
const isBlob = kindOfTest(
|
|
9798
|
+
const isBlob = kindOfTest('Blob');
|
|
9525
9799
|
|
|
9526
9800
|
/**
|
|
9527
9801
|
* Determine if a value is a FileList
|
|
@@ -9530,7 +9804,7 @@ const isBlob = kindOfTest("Blob");
|
|
|
9530
9804
|
*
|
|
9531
9805
|
* @returns {boolean} True if value is a File, otherwise false
|
|
9532
9806
|
*/
|
|
9533
|
-
const isFileList = kindOfTest(
|
|
9807
|
+
const isFileList = kindOfTest('FileList');
|
|
9534
9808
|
|
|
9535
9809
|
/**
|
|
9536
9810
|
* Determine if a value is a Stream
|
|
@@ -9548,17 +9822,27 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
|
9548
9822
|
*
|
|
9549
9823
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
9550
9824
|
*/
|
|
9825
|
+
function getGlobal() {
|
|
9826
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
9827
|
+
if (typeof self !== 'undefined') return self;
|
|
9828
|
+
if (typeof window !== 'undefined') return window;
|
|
9829
|
+
if (typeof global !== 'undefined') return global;
|
|
9830
|
+
return {};
|
|
9831
|
+
}
|
|
9832
|
+
|
|
9833
|
+
const G = getGlobal();
|
|
9834
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
9835
|
+
|
|
9551
9836
|
const isFormData = (thing) => {
|
|
9552
9837
|
let kind;
|
|
9553
|
-
return (
|
|
9554
|
-
thing
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
thing.toString() === "[object FormData]"))))
|
|
9838
|
+
return thing && (
|
|
9839
|
+
(FormDataCtor && thing instanceof FormDataCtor) || (
|
|
9840
|
+
isFunction(thing.append) && (
|
|
9841
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
9842
|
+
// detect form-data instance
|
|
9843
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
9844
|
+
)
|
|
9845
|
+
)
|
|
9562
9846
|
);
|
|
9563
9847
|
};
|
|
9564
9848
|
|
|
@@ -9569,13 +9853,13 @@ const isFormData = (thing) => {
|
|
|
9569
9853
|
*
|
|
9570
9854
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
9571
9855
|
*/
|
|
9572
|
-
const isURLSearchParams = kindOfTest(
|
|
9856
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
9573
9857
|
|
|
9574
9858
|
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9859
|
+
'ReadableStream',
|
|
9860
|
+
'Request',
|
|
9861
|
+
'Response',
|
|
9862
|
+
'Headers',
|
|
9579
9863
|
].map(kindOfTest);
|
|
9580
9864
|
|
|
9581
9865
|
/**
|
|
@@ -9585,9 +9869,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
|
9585
9869
|
*
|
|
9586
9870
|
* @returns {String} The String freed of excess whitespace
|
|
9587
9871
|
*/
|
|
9588
|
-
const trim = (str) =>
|
|
9589
|
-
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
9590
|
-
|
|
9872
|
+
const trim = (str) => {
|
|
9873
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
9874
|
+
};
|
|
9591
9875
|
/**
|
|
9592
9876
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
9593
9877
|
*
|
|
@@ -9606,7 +9890,7 @@ const trim = (str) =>
|
|
|
9606
9890
|
*/
|
|
9607
9891
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
9608
9892
|
// Don't bother if no value provided
|
|
9609
|
-
if (obj === null || typeof obj ===
|
|
9893
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
9610
9894
|
return;
|
|
9611
9895
|
}
|
|
9612
9896
|
|
|
@@ -9614,7 +9898,7 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
9614
9898
|
let l;
|
|
9615
9899
|
|
|
9616
9900
|
// Force an array if not already something iterable
|
|
9617
|
-
if (typeof obj !==
|
|
9901
|
+
if (typeof obj !== 'object') {
|
|
9618
9902
|
/*eslint no-param-reassign:0*/
|
|
9619
9903
|
obj = [obj];
|
|
9620
9904
|
}
|
|
@@ -9631,9 +9915,7 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
9631
9915
|
}
|
|
9632
9916
|
|
|
9633
9917
|
// Iterate over object keys
|
|
9634
|
-
const keys = allOwnKeys
|
|
9635
|
-
? Object.getOwnPropertyNames(obj)
|
|
9636
|
-
: Object.keys(obj);
|
|
9918
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
9637
9919
|
const len = keys.length;
|
|
9638
9920
|
let key;
|
|
9639
9921
|
|
|
@@ -9644,6 +9926,14 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
9644
9926
|
}
|
|
9645
9927
|
}
|
|
9646
9928
|
|
|
9929
|
+
/**
|
|
9930
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
9931
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
9932
|
+
*
|
|
9933
|
+
* @param {Object} obj - The object to search.
|
|
9934
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
9935
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
9936
|
+
*/
|
|
9647
9937
|
function findKey(obj, key) {
|
|
9648
9938
|
if (isBuffer(obj)) {
|
|
9649
9939
|
return null;
|
|
@@ -9664,16 +9954,11 @@ function findKey(obj, key) {
|
|
|
9664
9954
|
|
|
9665
9955
|
const _global = (() => {
|
|
9666
9956
|
/*eslint no-undef:0*/
|
|
9667
|
-
if (typeof globalThis !==
|
|
9668
|
-
return typeof self !==
|
|
9669
|
-
? self
|
|
9670
|
-
: typeof window !== "undefined"
|
|
9671
|
-
? window
|
|
9672
|
-
: global;
|
|
9957
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
9958
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
|
|
9673
9959
|
})();
|
|
9674
9960
|
|
|
9675
|
-
const isContextDefined = (context) =>
|
|
9676
|
-
!isUndefined(context) && context !== _global;
|
|
9961
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
9677
9962
|
|
|
9678
9963
|
/**
|
|
9679
9964
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -9698,7 +9983,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
9698
9983
|
const result = {};
|
|
9699
9984
|
const assignValue = (val, key) => {
|
|
9700
9985
|
// Skip dangerous property names to prevent prototype pollution
|
|
9701
|
-
if (key ===
|
|
9986
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
9702
9987
|
return;
|
|
9703
9988
|
}
|
|
9704
9989
|
|
|
@@ -9751,7 +10036,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
9751
10036
|
});
|
|
9752
10037
|
}
|
|
9753
10038
|
},
|
|
9754
|
-
{ allOwnKeys }
|
|
10039
|
+
{ allOwnKeys }
|
|
9755
10040
|
);
|
|
9756
10041
|
return a;
|
|
9757
10042
|
};
|
|
@@ -9780,17 +10065,14 @@ const stripBOM = (content) => {
|
|
|
9780
10065
|
* @returns {void}
|
|
9781
10066
|
*/
|
|
9782
10067
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
9783
|
-
constructor.prototype = Object.create(
|
|
9784
|
-
|
|
9785
|
-
descriptors,
|
|
9786
|
-
);
|
|
9787
|
-
Object.defineProperty(constructor.prototype, "constructor", {
|
|
10068
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
10069
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
9788
10070
|
value: constructor,
|
|
9789
10071
|
writable: true,
|
|
9790
10072
|
enumerable: false,
|
|
9791
10073
|
configurable: true,
|
|
9792
10074
|
});
|
|
9793
|
-
Object.defineProperty(constructor,
|
|
10075
|
+
Object.defineProperty(constructor, 'super', {
|
|
9794
10076
|
value: superConstructor.prototype,
|
|
9795
10077
|
});
|
|
9796
10078
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -9820,20 +10102,13 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
|
9820
10102
|
i = props.length;
|
|
9821
10103
|
while (i-- > 0) {
|
|
9822
10104
|
prop = props[i];
|
|
9823
|
-
if (
|
|
9824
|
-
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
9825
|
-
!merged[prop]
|
|
9826
|
-
) {
|
|
10105
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
9827
10106
|
destObj[prop] = sourceObj[prop];
|
|
9828
10107
|
merged[prop] = true;
|
|
9829
10108
|
}
|
|
9830
10109
|
}
|
|
9831
10110
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
9832
|
-
} while (
|
|
9833
|
-
sourceObj &&
|
|
9834
|
-
(!filter || filter(sourceObj, destObj)) &&
|
|
9835
|
-
sourceObj !== Object.prototype
|
|
9836
|
-
);
|
|
10111
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
9837
10112
|
|
|
9838
10113
|
return destObj;
|
|
9839
10114
|
};
|
|
@@ -9890,7 +10165,7 @@ const isTypedArray = ((TypedArray) => {
|
|
|
9890
10165
|
return (thing) => {
|
|
9891
10166
|
return TypedArray && thing instanceof TypedArray;
|
|
9892
10167
|
};
|
|
9893
|
-
})(typeof Uint8Array !==
|
|
10168
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
9894
10169
|
|
|
9895
10170
|
/**
|
|
9896
10171
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -9933,14 +10208,12 @@ const matchAll = (regExp, str) => {
|
|
|
9933
10208
|
};
|
|
9934
10209
|
|
|
9935
10210
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
9936
|
-
const isHTMLForm = kindOfTest(
|
|
10211
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
9937
10212
|
|
|
9938
10213
|
const toCamelCase = (str) => {
|
|
9939
|
-
return str
|
|
9940
|
-
.
|
|
9941
|
-
|
|
9942
|
-
return p1.toUpperCase() + p2;
|
|
9943
|
-
});
|
|
10214
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
10215
|
+
return p1.toUpperCase() + p2;
|
|
10216
|
+
});
|
|
9944
10217
|
};
|
|
9945
10218
|
|
|
9946
10219
|
/* Creating a function that will check if an object has a property. */
|
|
@@ -9957,7 +10230,7 @@ const hasOwnProperty = (
|
|
|
9957
10230
|
*
|
|
9958
10231
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
9959
10232
|
*/
|
|
9960
|
-
const isRegExp = kindOfTest(
|
|
10233
|
+
const isRegExp = kindOfTest('RegExp');
|
|
9961
10234
|
|
|
9962
10235
|
const reduceDescriptors = (obj, reducer) => {
|
|
9963
10236
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -9981,10 +10254,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
9981
10254
|
const freezeMethods = (obj) => {
|
|
9982
10255
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
9983
10256
|
// skip restricted props in strict mode
|
|
9984
|
-
if (
|
|
9985
|
-
isFunction(obj) &&
|
|
9986
|
-
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
9987
|
-
) {
|
|
10257
|
+
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
9988
10258
|
return false;
|
|
9989
10259
|
}
|
|
9990
10260
|
|
|
@@ -9994,7 +10264,7 @@ const freezeMethods = (obj) => {
|
|
|
9994
10264
|
|
|
9995
10265
|
descriptor.enumerable = false;
|
|
9996
10266
|
|
|
9997
|
-
if (
|
|
10267
|
+
if ('writable' in descriptor) {
|
|
9998
10268
|
descriptor.writable = false;
|
|
9999
10269
|
return;
|
|
10000
10270
|
}
|
|
@@ -10007,6 +10277,14 @@ const freezeMethods = (obj) => {
|
|
|
10007
10277
|
});
|
|
10008
10278
|
};
|
|
10009
10279
|
|
|
10280
|
+
/**
|
|
10281
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
10282
|
+
* Useful for fast membership checks.
|
|
10283
|
+
*
|
|
10284
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
10285
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
10286
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
10287
|
+
*/
|
|
10010
10288
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
10011
10289
|
const obj = {};
|
|
10012
10290
|
|
|
@@ -10016,9 +10294,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
10016
10294
|
});
|
|
10017
10295
|
};
|
|
10018
10296
|
|
|
10019
|
-
isArray(arrayOrString)
|
|
10020
|
-
? define(arrayOrString)
|
|
10021
|
-
: define(String(arrayOrString).split(delimiter));
|
|
10297
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
10022
10298
|
|
|
10023
10299
|
return obj;
|
|
10024
10300
|
};
|
|
@@ -10026,9 +10302,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
10026
10302
|
const noop = () => {};
|
|
10027
10303
|
|
|
10028
10304
|
const toFiniteNumber = (value, defaultValue) => {
|
|
10029
|
-
return value != null && Number.isFinite((value = +value))
|
|
10030
|
-
? value
|
|
10031
|
-
: defaultValue;
|
|
10305
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
10032
10306
|
};
|
|
10033
10307
|
|
|
10034
10308
|
/**
|
|
@@ -10042,11 +10316,17 @@ function isSpecCompliantForm(thing) {
|
|
|
10042
10316
|
return !!(
|
|
10043
10317
|
thing &&
|
|
10044
10318
|
isFunction(thing.append) &&
|
|
10045
|
-
thing[toStringTag] ===
|
|
10319
|
+
thing[toStringTag] === 'FormData' &&
|
|
10046
10320
|
thing[iterator]
|
|
10047
10321
|
);
|
|
10048
10322
|
}
|
|
10049
10323
|
|
|
10324
|
+
/**
|
|
10325
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
10326
|
+
*
|
|
10327
|
+
* @param {Object} obj - The object to convert.
|
|
10328
|
+
* @returns {Object} The JSON-compatible object.
|
|
10329
|
+
*/
|
|
10050
10330
|
const toJSONObject = (obj) => {
|
|
10051
10331
|
const stack = new Array(10);
|
|
10052
10332
|
|
|
@@ -10061,7 +10341,7 @@ const toJSONObject = (obj) => {
|
|
|
10061
10341
|
return source;
|
|
10062
10342
|
}
|
|
10063
10343
|
|
|
10064
|
-
if (!(
|
|
10344
|
+
if (!('toJSON' in source)) {
|
|
10065
10345
|
stack[i] = source;
|
|
10066
10346
|
const target = isArray(source) ? [] : {};
|
|
10067
10347
|
|
|
@@ -10082,8 +10362,20 @@ const toJSONObject = (obj) => {
|
|
|
10082
10362
|
return visit(obj, 0);
|
|
10083
10363
|
};
|
|
10084
10364
|
|
|
10085
|
-
|
|
10365
|
+
/**
|
|
10366
|
+
* Determines if a value is an async function.
|
|
10367
|
+
*
|
|
10368
|
+
* @param {*} thing - The value to test.
|
|
10369
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
10370
|
+
*/
|
|
10371
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
10086
10372
|
|
|
10373
|
+
/**
|
|
10374
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
10375
|
+
*
|
|
10376
|
+
* @param {*} thing - The value to test.
|
|
10377
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
10378
|
+
*/
|
|
10087
10379
|
const isThenable = (thing) =>
|
|
10088
10380
|
thing &&
|
|
10089
10381
|
(isObject(thing) || isFunction(thing)) &&
|
|
@@ -10093,6 +10385,14 @@ const isThenable = (thing) =>
|
|
|
10093
10385
|
// original code
|
|
10094
10386
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
10095
10387
|
|
|
10388
|
+
/**
|
|
10389
|
+
* Provides a cross-platform setImmediate implementation.
|
|
10390
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
10391
|
+
*
|
|
10392
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
10393
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
10394
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
10395
|
+
*/
|
|
10096
10396
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
10097
10397
|
if (setImmediateSupported) {
|
|
10098
10398
|
return setImmediate;
|
|
@@ -10101,27 +10401,33 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
10101
10401
|
return postMessageSupported
|
|
10102
10402
|
? ((token, callbacks) => {
|
|
10103
10403
|
_global.addEventListener(
|
|
10104
|
-
|
|
10404
|
+
'message',
|
|
10105
10405
|
({ source, data }) => {
|
|
10106
10406
|
if (source === _global && data === token) {
|
|
10107
10407
|
callbacks.length && callbacks.shift()();
|
|
10108
10408
|
}
|
|
10109
10409
|
},
|
|
10110
|
-
false
|
|
10410
|
+
false
|
|
10111
10411
|
);
|
|
10112
10412
|
|
|
10113
10413
|
return (cb) => {
|
|
10114
10414
|
callbacks.push(cb);
|
|
10115
|
-
_global.postMessage(token,
|
|
10415
|
+
_global.postMessage(token, '*');
|
|
10116
10416
|
};
|
|
10117
10417
|
})(`axios@${Math.random()}`, [])
|
|
10118
10418
|
: (cb) => setTimeout(cb);
|
|
10119
|
-
})(typeof setImmediate ===
|
|
10419
|
+
})(typeof setImmediate === 'function', isFunction(_global.postMessage));
|
|
10120
10420
|
|
|
10421
|
+
/**
|
|
10422
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
10423
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
10424
|
+
*
|
|
10425
|
+
* @type {Function}
|
|
10426
|
+
*/
|
|
10121
10427
|
const asap =
|
|
10122
|
-
typeof queueMicrotask !==
|
|
10428
|
+
typeof queueMicrotask !== 'undefined'
|
|
10123
10429
|
? queueMicrotask.bind(_global)
|
|
10124
|
-
: (typeof process !==
|
|
10430
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
10125
10431
|
|
|
10126
10432
|
// *********************
|
|
10127
10433
|
|
|
@@ -10146,6 +10452,8 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
10146
10452
|
isUndefined,
|
|
10147
10453
|
isDate,
|
|
10148
10454
|
isFile,
|
|
10455
|
+
isReactNativeBlob,
|
|
10456
|
+
isReactNative,
|
|
10149
10457
|
isBlob,
|
|
10150
10458
|
isRegExp,
|
|
10151
10459
|
isFunction,
|