@ohif/app 3.13.0-beta.87 → 3.13.0-beta.88
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/{2516.bundle.f62228e9a800de8d4b31.js → 2516.bundle.6b52ced19754035768ae.js} +2 -2
- package/dist/{3617.bundle.502defead09bde277a49.js → 3617.bundle.f408991512372e52c6cf.js} +2 -2
- package/dist/{5830.bundle.791019deddd536980a11.js → 5830.bundle.d026ec38980fb12f2518.js} +2 -2
- package/dist/{7190.bundle.479332d662ffe08d1f92.js → 6125.bundle.2c6f2ba3bd8e1493e54b.js} +1722 -1205
- package/dist/{6376.bundle.527820a5cb1eece2a8d2.js → 6376.bundle.f5ef0f5465d575d0dbb0.js} +5 -5
- package/dist/{app.bundle.50519318a7e0e4d2f0b1.js → app.bundle.3b116829d23059e8d9d8.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.829844ff3f72f5645f29.js → interpolation.bundle.35be9e5cf473c6ebd3da.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +20 -20
- /package/dist/{1459.bundle.39220d7120bd7df8dd23.js → 1459.bundle.23ea55eeadd13d26d6b5.js} +0 -0
- /package/dist/{1933.bundle.33d48af9ebcc4d7649c5.js → 1933.bundle.5713711c4a8f6518803b.js} +0 -0
- /package/dist/{2018.bundle.24c380747f172d7143ae.js → 2018.bundle.fee6699868f9e280861c.js} +0 -0
- /package/dist/{213.bundle.e9ea6c402317dc346091.js → 213.bundle.3c0a19cba715a9a87151.js} +0 -0
- /package/dist/{2424.bundle.f926b3128bb41763b849.js → 2424.bundle.1d615d02f985abbbc633.js} +0 -0
- /package/dist/{3138.bundle.133e4884969b006957f1.js → 3138.bundle.451e4105dda240465e6d.js} +0 -0
- /package/dist/{3461.bundle.bb85e473a5de0d8a5fcd.js → 3461.bundle.9bc7ca0f93d754014c23.js} +0 -0
- /package/dist/{4507.bundle.4d7e7016f2f64adfb1ae.js → 4507.bundle.51470574cbf11549ff72.js} +0 -0
- /package/dist/{4819.bundle.4e047ba806033d9bba23.js → 4819.bundle.c5e695cd51065d2a1a88.js} +0 -0
- /package/dist/{5015.bundle.c96918ea054c4b2b4200.js → 5015.bundle.647c560efcc9942bb42c.js} +0 -0
- /package/dist/{5028.bundle.7ad439186bb8b60b0536.js → 5028.bundle.4960393948811673d99b.js} +0 -0
- /package/dist/{5457.bundle.482ba0f5ce9ff033e2fb.js → 5457.bundle.45b43e0e56637108f8f1.js} +0 -0
- /package/dist/{5485.bundle.b9c59ca9409c3e907524.js → 5485.bundle.3d2d3a7f37f948da2269.js} +0 -0
- /package/dist/{6027.bundle.11f3dfa6d991d343bc16.js → 6027.bundle.ea7a56c1ebde501ce02d.js} +0 -0
- /package/dist/{7166.bundle.557612f8ac4507000ee3.js → 7166.bundle.0a84efe4f3e6d0ddcbec.js} +0 -0
- /package/dist/{7639.bundle.6bbfb22054fb7f0f9de8.js → 7639.bundle.2b4ae693bddf15fb9641.js} +0 -0
- /package/dist/{8305.bundle.b6d3a2931f0edcc6652d.js → 8305.bundle.8088b210631f2b22899d.js} +0 -0
- /package/dist/{8499.bundle.64a3161ef7d9c8fc6791.js → 8499.bundle.f94b5427bb2889634aeb.js} +0 -0
- /package/dist/{85.bundle.38ef0a2e90a30dce91ae.js → 85.bundle.f7cb4cf8432ca6a815c0.js} +0 -0
- /package/dist/{8558.bundle.52ae379622062062207e.js → 8558.bundle.79c567857e04df2694cc.js} +0 -0
- /package/dist/{8583.bundle.2debff754409dca6d074.js → 8583.bundle.e36ff2fc6ee67e4e4232.js} +0 -0
- /package/dist/{9927.bundle.550253549cb2ae31ba95.js → 9927.bundle.5cf09e95f0253210d431.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
1
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[6125],{
|
|
2
2
|
|
|
3
3
|
/***/ 54028
|
|
4
4
|
(__unused_webpack_module, exports) {
|
|
@@ -2076,7 +2076,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
2076
2076
|
|
|
2077
2077
|
/***/ },
|
|
2078
2078
|
|
|
2079
|
-
/***/
|
|
2079
|
+
/***/ 5626
|
|
2080
2080
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2081
2081
|
|
|
2082
2082
|
"use strict";
|
|
@@ -2086,7 +2086,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2086
2086
|
Ay: () => (/* reexport */ lib_axios)
|
|
2087
2087
|
});
|
|
2088
2088
|
|
|
2089
|
-
// UNUSED EXPORTS: Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData
|
|
2089
|
+
// UNUSED EXPORTS: Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, create, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData
|
|
2090
2090
|
|
|
2091
2091
|
// NAMESPACE OBJECT: ../../../node_modules/axios/lib/platform/common/utils.js
|
|
2092
2092
|
var common_utils_namespaceObject = {};
|
|
@@ -2310,21 +2310,21 @@ const isFile = kindOfTest('File');
|
|
|
2310
2310
|
* also have a `name` and `type` attribute to specify filename and content type
|
|
2311
2311
|
*
|
|
2312
2312
|
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
2313
|
-
*
|
|
2313
|
+
*
|
|
2314
2314
|
* @param {*} value The value to test
|
|
2315
|
-
*
|
|
2315
|
+
*
|
|
2316
2316
|
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
2317
2317
|
*/
|
|
2318
2318
|
const isReactNativeBlob = (value) => {
|
|
2319
2319
|
return !!(value && typeof value.uri !== 'undefined');
|
|
2320
|
-
}
|
|
2320
|
+
};
|
|
2321
2321
|
|
|
2322
2322
|
/**
|
|
2323
2323
|
* Determine if environment is React Native
|
|
2324
2324
|
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
2325
|
-
*
|
|
2325
|
+
*
|
|
2326
2326
|
* @param {*} formData The formData to test
|
|
2327
|
-
*
|
|
2327
|
+
*
|
|
2328
2328
|
* @returns {boolean} True if environment is React Native, otherwise false
|
|
2329
2329
|
*/
|
|
2330
2330
|
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
@@ -2343,7 +2343,7 @@ const isBlob = kindOfTest('Blob');
|
|
|
2343
2343
|
*
|
|
2344
2344
|
* @param {*} val The value to test
|
|
2345
2345
|
*
|
|
2346
|
-
* @returns {boolean} True if value is a
|
|
2346
|
+
* @returns {boolean} True if value is a FileList, otherwise false
|
|
2347
2347
|
*/
|
|
2348
2348
|
const isFileList = kindOfTest('FileList');
|
|
2349
2349
|
|
|
@@ -2377,14 +2377,16 @@ const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
|
2377
2377
|
const isFormData = (thing) => {
|
|
2378
2378
|
if (!thing) return false;
|
|
2379
2379
|
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
2380
|
-
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData
|
|
2380
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
|
|
2381
2381
|
const proto = getPrototypeOf(thing);
|
|
2382
2382
|
if (!proto || proto === Object.prototype) return false;
|
|
2383
2383
|
if (!isFunction(thing.append)) return false;
|
|
2384
2384
|
const kind = kindOf(thing);
|
|
2385
|
-
return
|
|
2385
|
+
return (
|
|
2386
|
+
kind === 'formdata' ||
|
|
2386
2387
|
// detect form-data instance
|
|
2387
|
-
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
2388
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
2389
|
+
);
|
|
2388
2390
|
};
|
|
2389
2391
|
|
|
2390
2392
|
/**
|
|
@@ -2519,7 +2521,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
2519
2521
|
*
|
|
2520
2522
|
* @returns {Object} Result of all merge properties
|
|
2521
2523
|
*/
|
|
2522
|
-
function merge(
|
|
2524
|
+
function merge(...objs) {
|
|
2523
2525
|
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
2524
2526
|
const result = {};
|
|
2525
2527
|
const assignValue = (val, key) => {
|
|
@@ -2528,9 +2530,15 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
2528
2530
|
return;
|
|
2529
2531
|
}
|
|
2530
2532
|
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2533
|
+
// findKey lowercases the key, so caseless lookup only applies to strings —
|
|
2534
|
+
// symbol keys are identity-matched.
|
|
2535
|
+
const targetKey = (caseless && typeof key === 'string' && findKey(result, key)) || key;
|
|
2536
|
+
// Read via own-prop only — a bare `result[targetKey]` walks the prototype
|
|
2537
|
+
// chain, so a polluted Object.prototype value could surface here and get
|
|
2538
|
+
// copied into the merged result.
|
|
2539
|
+
const existing = utils_hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
|
|
2540
|
+
if (isPlainObject(existing) && isPlainObject(val)) {
|
|
2541
|
+
result[targetKey] = merge(existing, val);
|
|
2534
2542
|
} else if (isPlainObject(val)) {
|
|
2535
2543
|
result[targetKey] = merge({}, val);
|
|
2536
2544
|
} else if (isArray(val)) {
|
|
@@ -2540,8 +2548,25 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
2540
2548
|
}
|
|
2541
2549
|
};
|
|
2542
2550
|
|
|
2543
|
-
for (let i = 0, l =
|
|
2544
|
-
|
|
2551
|
+
for (let i = 0, l = objs.length; i < l; i++) {
|
|
2552
|
+
const source = objs[i];
|
|
2553
|
+
if (!source || isBuffer(source)) {
|
|
2554
|
+
continue;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
forEach(source, assignValue);
|
|
2558
|
+
|
|
2559
|
+
if (typeof source !== 'object' || isArray(source)) {
|
|
2560
|
+
continue;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
const symbols = Object.getOwnPropertySymbols(source);
|
|
2564
|
+
for (let j = 0; j < symbols.length; j++) {
|
|
2565
|
+
const symbol = symbols[j];
|
|
2566
|
+
if (propertyIsEnumerable.call(source, symbol)) {
|
|
2567
|
+
assignValue(source[symbol], symbol);
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2545
2570
|
}
|
|
2546
2571
|
return result;
|
|
2547
2572
|
}
|
|
@@ -2563,6 +2588,9 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
2563
2588
|
(val, key) => {
|
|
2564
2589
|
if (thisArg && isFunction(val)) {
|
|
2565
2590
|
Object.defineProperty(a, key, {
|
|
2591
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
2592
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
2593
|
+
__proto__: null,
|
|
2566
2594
|
value: bind(val, thisArg),
|
|
2567
2595
|
writable: true,
|
|
2568
2596
|
enumerable: true,
|
|
@@ -2570,6 +2598,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
2570
2598
|
});
|
|
2571
2599
|
} else {
|
|
2572
2600
|
Object.defineProperty(a, key, {
|
|
2601
|
+
__proto__: null,
|
|
2573
2602
|
value: val,
|
|
2574
2603
|
writable: true,
|
|
2575
2604
|
enumerable: true,
|
|
@@ -2608,12 +2637,14 @@ const stripBOM = (content) => {
|
|
|
2608
2637
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
2609
2638
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
2610
2639
|
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
2640
|
+
__proto__: null,
|
|
2611
2641
|
value: constructor,
|
|
2612
2642
|
writable: true,
|
|
2613
2643
|
enumerable: false,
|
|
2614
2644
|
configurable: true,
|
|
2615
2645
|
});
|
|
2616
2646
|
Object.defineProperty(constructor, 'super', {
|
|
2647
|
+
__proto__: null,
|
|
2617
2648
|
value: superConstructor.prototype,
|
|
2618
2649
|
});
|
|
2619
2650
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -2764,6 +2795,8 @@ const utils_hasOwnProperty = (
|
|
|
2764
2795
|
hasOwnProperty.call(obj, prop)
|
|
2765
2796
|
)(Object.prototype);
|
|
2766
2797
|
|
|
2798
|
+
const { propertyIsEnumerable } = Object.prototype;
|
|
2799
|
+
|
|
2767
2800
|
/**
|
|
2768
2801
|
* Determine if a value is a RegExp object
|
|
2769
2802
|
*
|
|
@@ -2795,7 +2828,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
2795
2828
|
const freezeMethods = (obj) => {
|
|
2796
2829
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
2797
2830
|
// skip restricted props in strict mode
|
|
2798
|
-
if (isFunction(obj) && ['arguments', 'caller', 'callee'].
|
|
2831
|
+
if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {
|
|
2799
2832
|
return false;
|
|
2800
2833
|
}
|
|
2801
2834
|
|
|
@@ -2869,11 +2902,11 @@ function isSpecCompliantForm(thing) {
|
|
|
2869
2902
|
* @returns {Object} The JSON-compatible object.
|
|
2870
2903
|
*/
|
|
2871
2904
|
const toJSONObject = (obj) => {
|
|
2872
|
-
const
|
|
2905
|
+
const visited = new WeakSet();
|
|
2873
2906
|
|
|
2874
|
-
const visit = (source
|
|
2907
|
+
const visit = (source) => {
|
|
2875
2908
|
if (isObject(source)) {
|
|
2876
|
-
if (
|
|
2909
|
+
if (visited.has(source)) {
|
|
2877
2910
|
return;
|
|
2878
2911
|
}
|
|
2879
2912
|
|
|
@@ -2883,15 +2916,16 @@ const toJSONObject = (obj) => {
|
|
|
2883
2916
|
}
|
|
2884
2917
|
|
|
2885
2918
|
if (!('toJSON' in source)) {
|
|
2886
|
-
|
|
2919
|
+
// add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
|
|
2920
|
+
visited.add(source);
|
|
2887
2921
|
const target = isArray(source) ? [] : {};
|
|
2888
2922
|
|
|
2889
2923
|
forEach(source, (value, key) => {
|
|
2890
|
-
const reducedValue = visit(value
|
|
2924
|
+
const reducedValue = visit(value);
|
|
2891
2925
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
2892
2926
|
});
|
|
2893
2927
|
|
|
2894
|
-
|
|
2928
|
+
visited.delete(source);
|
|
2895
2929
|
|
|
2896
2930
|
return target;
|
|
2897
2931
|
}
|
|
@@ -2900,7 +2934,7 @@ const toJSONObject = (obj) => {
|
|
|
2900
2934
|
return source;
|
|
2901
2935
|
};
|
|
2902
2936
|
|
|
2903
|
-
return visit(obj
|
|
2937
|
+
return visit(obj);
|
|
2904
2938
|
};
|
|
2905
2939
|
|
|
2906
2940
|
/**
|
|
@@ -3036,1406 +3070,1525 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
3036
3070
|
isIterable,
|
|
3037
3071
|
});
|
|
3038
3072
|
|
|
3039
|
-
;// ../../../node_modules/axios/lib/
|
|
3073
|
+
;// ../../../node_modules/axios/lib/helpers/parseHeaders.js
|
|
3040
3074
|
|
|
3041
3075
|
|
|
3042
3076
|
|
|
3043
3077
|
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3078
|
+
// RawAxiosHeaders whose duplicates are ignored by node
|
|
3079
|
+
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
3080
|
+
const ignoreDuplicateOf = utils.toObjectSet([
|
|
3081
|
+
'age',
|
|
3082
|
+
'authorization',
|
|
3083
|
+
'content-length',
|
|
3084
|
+
'content-type',
|
|
3085
|
+
'etag',
|
|
3086
|
+
'expires',
|
|
3087
|
+
'from',
|
|
3088
|
+
'host',
|
|
3089
|
+
'if-modified-since',
|
|
3090
|
+
'if-unmodified-since',
|
|
3091
|
+
'last-modified',
|
|
3092
|
+
'location',
|
|
3093
|
+
'max-forwards',
|
|
3094
|
+
'proxy-authorization',
|
|
3095
|
+
'referer',
|
|
3096
|
+
'retry-after',
|
|
3097
|
+
'user-agent',
|
|
3098
|
+
]);
|
|
3049
3099
|
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3100
|
+
/**
|
|
3101
|
+
* Parse headers into an object
|
|
3102
|
+
*
|
|
3103
|
+
* ```
|
|
3104
|
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
3105
|
+
* Content-Type: application/json
|
|
3106
|
+
* Connection: keep-alive
|
|
3107
|
+
* Transfer-Encoding: chunked
|
|
3108
|
+
* ```
|
|
3109
|
+
*
|
|
3110
|
+
* @param {String} rawHeaders Headers needing to be parsed
|
|
3111
|
+
*
|
|
3112
|
+
* @returns {Object} Headers parsed into an object
|
|
3113
|
+
*/
|
|
3114
|
+
/* harmony default export */ const parseHeaders = ((rawHeaders) => {
|
|
3115
|
+
const parsed = {};
|
|
3116
|
+
let key;
|
|
3117
|
+
let val;
|
|
3118
|
+
let i;
|
|
3054
3119
|
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3120
|
+
rawHeaders &&
|
|
3121
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
3122
|
+
i = line.indexOf(':');
|
|
3123
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
3124
|
+
val = line.substring(i + 1).trim();
|
|
3058
3125
|
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
* @param {string} message The error message.
|
|
3063
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
3064
|
-
* @param {Object} [config] The config.
|
|
3065
|
-
* @param {Object} [request] The request.
|
|
3066
|
-
* @param {Object} [response] The response.
|
|
3067
|
-
*
|
|
3068
|
-
* @returns {Error} The created error.
|
|
3069
|
-
*/
|
|
3070
|
-
constructor(message, code, config, request, response) {
|
|
3071
|
-
super(message);
|
|
3126
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
3127
|
+
return;
|
|
3128
|
+
}
|
|
3072
3129
|
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3130
|
+
if (key === 'set-cookie') {
|
|
3131
|
+
if (parsed[key]) {
|
|
3132
|
+
parsed[key].push(val);
|
|
3133
|
+
} else {
|
|
3134
|
+
parsed[key] = [val];
|
|
3135
|
+
}
|
|
3136
|
+
} else {
|
|
3137
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
3138
|
+
}
|
|
3081
3139
|
});
|
|
3082
3140
|
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3141
|
+
return parsed;
|
|
3142
|
+
});
|
|
3143
|
+
|
|
3144
|
+
;// ../../../node_modules/axios/lib/helpers/sanitizeHeaderValue.js
|
|
3145
|
+
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
|
|
3149
|
+
function trimSPorHTAB(str) {
|
|
3150
|
+
let start = 0;
|
|
3151
|
+
let end = str.length;
|
|
3152
|
+
|
|
3153
|
+
while (start < end) {
|
|
3154
|
+
const code = str.charCodeAt(start);
|
|
3155
|
+
|
|
3156
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
3157
|
+
break;
|
|
3091
3158
|
}
|
|
3159
|
+
|
|
3160
|
+
start += 1;
|
|
3092
3161
|
}
|
|
3093
3162
|
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
// Mozilla
|
|
3103
|
-
fileName: this.fileName,
|
|
3104
|
-
lineNumber: this.lineNumber,
|
|
3105
|
-
columnNumber: this.columnNumber,
|
|
3106
|
-
stack: this.stack,
|
|
3107
|
-
// Axios
|
|
3108
|
-
config: utils.toJSONObject(this.config),
|
|
3109
|
-
code: this.code,
|
|
3110
|
-
status: this.status,
|
|
3111
|
-
};
|
|
3163
|
+
while (end > start) {
|
|
3164
|
+
const code = str.charCodeAt(end - 1);
|
|
3165
|
+
|
|
3166
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
3167
|
+
break;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
end -= 1;
|
|
3112
3171
|
}
|
|
3172
|
+
|
|
3173
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
3113
3174
|
}
|
|
3114
3175
|
|
|
3115
|
-
//
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
3121
|
-
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
3122
|
-
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
3123
|
-
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
3124
|
-
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
3125
|
-
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
3126
|
-
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
3127
|
-
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
3128
|
-
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
3176
|
+
// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.
|
|
3177
|
+
// eslint-disable-next-line no-control-regex
|
|
3178
|
+
const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g');
|
|
3179
|
+
// eslint-disable-next-line no-control-regex
|
|
3180
|
+
const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g');
|
|
3129
3181
|
|
|
3130
|
-
|
|
3182
|
+
function sanitizeValue(value, invalidChars) {
|
|
3183
|
+
if (utils.isArray(value)) {
|
|
3184
|
+
return value.map((item) => sanitizeValue(item, invalidChars));
|
|
3185
|
+
}
|
|
3131
3186
|
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
/* harmony default export */ const helpers_null = (null);
|
|
3187
|
+
return trimSPorHTAB(String(value).replace(invalidChars, ''));
|
|
3188
|
+
}
|
|
3135
3189
|
|
|
3136
|
-
|
|
3137
|
-
|
|
3190
|
+
const sanitizeHeaderValue = (value) =>
|
|
3191
|
+
sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
|
|
3138
3192
|
|
|
3193
|
+
const sanitizeByteStringHeaderValue = (value) =>
|
|
3194
|
+
sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
|
|
3139
3195
|
|
|
3196
|
+
function toByteStringHeaderObject(headers) {
|
|
3197
|
+
const byteStringHeaders = Object.create(null);
|
|
3140
3198
|
|
|
3199
|
+
utils.forEach(headers.toJSON(), (value, header) => {
|
|
3200
|
+
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
|
|
3201
|
+
});
|
|
3141
3202
|
|
|
3142
|
-
|
|
3203
|
+
return byteStringHeaders;
|
|
3204
|
+
}
|
|
3143
3205
|
|
|
3206
|
+
;// ../../../node_modules/axios/lib/core/AxiosHeaders.js
|
|
3144
3207
|
|
|
3145
|
-
/**
|
|
3146
|
-
* Determines if the given thing is a array or js object.
|
|
3147
|
-
*
|
|
3148
|
-
* @param {string} thing - The object or array to be visited.
|
|
3149
|
-
*
|
|
3150
|
-
* @returns {boolean}
|
|
3151
|
-
*/
|
|
3152
|
-
function isVisitable(thing) {
|
|
3153
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
3154
|
-
}
|
|
3155
3208
|
|
|
3156
|
-
/**
|
|
3157
|
-
* It removes the brackets from the end of a string
|
|
3158
|
-
*
|
|
3159
|
-
* @param {string} key - The key of the parameter.
|
|
3160
|
-
*
|
|
3161
|
-
* @returns {string} the key without the brackets.
|
|
3162
|
-
*/
|
|
3163
|
-
function removeBrackets(key) {
|
|
3164
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
3165
|
-
}
|
|
3166
3209
|
|
|
3167
|
-
/**
|
|
3168
|
-
* It takes a path, a key, and a boolean, and returns a string
|
|
3169
|
-
*
|
|
3170
|
-
* @param {string} path - The path to the current key.
|
|
3171
|
-
* @param {string} key - The key of the current object being iterated over.
|
|
3172
|
-
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
3173
|
-
*
|
|
3174
|
-
* @returns {string} The path to the current key.
|
|
3175
|
-
*/
|
|
3176
|
-
function renderKey(path, key, dots) {
|
|
3177
|
-
if (!path) return key;
|
|
3178
|
-
return path
|
|
3179
|
-
.concat(key)
|
|
3180
|
-
.map(function each(token, i) {
|
|
3181
|
-
// eslint-disable-next-line no-param-reassign
|
|
3182
|
-
token = removeBrackets(token);
|
|
3183
|
-
return !dots && i ? '[' + token + ']' : token;
|
|
3184
|
-
})
|
|
3185
|
-
.join(dots ? '.' : '');
|
|
3186
|
-
}
|
|
3187
3210
|
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
*/
|
|
3195
|
-
function isFlatArray(arr) {
|
|
3196
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
3211
|
+
|
|
3212
|
+
|
|
3213
|
+
const $internals = Symbol('internals');
|
|
3214
|
+
|
|
3215
|
+
function normalizeHeader(header) {
|
|
3216
|
+
return header && String(header).trim().toLowerCase();
|
|
3197
3217
|
}
|
|
3198
3218
|
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3219
|
+
function normalizeValue(value) {
|
|
3220
|
+
if (value === false || value == null) {
|
|
3221
|
+
return value;
|
|
3222
|
+
}
|
|
3202
3223
|
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
*
|
|
3206
|
-
* @param {Object} obj
|
|
3207
|
-
* @param {?Object} [formData]
|
|
3208
|
-
* @param {?Object} [options]
|
|
3209
|
-
* @param {Function} [options.visitor]
|
|
3210
|
-
* @param {Boolean} [options.metaTokens = true]
|
|
3211
|
-
* @param {Boolean} [options.dots = false]
|
|
3212
|
-
* @param {?Boolean} [options.indexes = false]
|
|
3213
|
-
*
|
|
3214
|
-
* @returns {Object}
|
|
3215
|
-
**/
|
|
3216
|
-
|
|
3217
|
-
/**
|
|
3218
|
-
* It converts an object into a FormData object
|
|
3219
|
-
*
|
|
3220
|
-
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
3221
|
-
* @param {string} formData - The FormData object to append to.
|
|
3222
|
-
* @param {Object<string, any>} options
|
|
3223
|
-
*
|
|
3224
|
-
* @returns
|
|
3225
|
-
*/
|
|
3226
|
-
function toFormData(obj, formData, options) {
|
|
3227
|
-
if (!utils.isObject(obj)) {
|
|
3228
|
-
throw new TypeError('target must be an object');
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
|
-
// eslint-disable-next-line no-param-reassign
|
|
3232
|
-
formData = formData || new (helpers_null || FormData)();
|
|
3233
|
-
|
|
3234
|
-
// eslint-disable-next-line no-param-reassign
|
|
3235
|
-
options = utils.toFlatObject(
|
|
3236
|
-
options,
|
|
3237
|
-
{
|
|
3238
|
-
metaTokens: true,
|
|
3239
|
-
dots: false,
|
|
3240
|
-
indexes: false,
|
|
3241
|
-
},
|
|
3242
|
-
false,
|
|
3243
|
-
function defined(option, source) {
|
|
3244
|
-
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
3245
|
-
return !utils.isUndefined(source[option]);
|
|
3246
|
-
}
|
|
3247
|
-
);
|
|
3224
|
+
return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
3225
|
+
}
|
|
3248
3226
|
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
const
|
|
3252
|
-
|
|
3253
|
-
const indexes = options.indexes;
|
|
3254
|
-
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
3255
|
-
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
3256
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
3227
|
+
function parseTokens(str) {
|
|
3228
|
+
const tokens = Object.create(null);
|
|
3229
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
3230
|
+
let match;
|
|
3257
3231
|
|
|
3258
|
-
|
|
3259
|
-
|
|
3232
|
+
while ((match = tokensRE.exec(str))) {
|
|
3233
|
+
tokens[match[1]] = match[2];
|
|
3260
3234
|
}
|
|
3261
3235
|
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
if (utils.isDate(value)) {
|
|
3266
|
-
return value.toISOString();
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
if (utils.isBoolean(value)) {
|
|
3270
|
-
return value.toString();
|
|
3271
|
-
}
|
|
3236
|
+
return tokens;
|
|
3237
|
+
}
|
|
3272
3238
|
|
|
3273
|
-
|
|
3274
|
-
throw new core_AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
3275
|
-
}
|
|
3239
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
3276
3240
|
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3241
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
3242
|
+
if (utils.isFunction(filter)) {
|
|
3243
|
+
return filter.call(this, value, header);
|
|
3244
|
+
}
|
|
3280
3245
|
|
|
3281
|
-
|
|
3246
|
+
if (isHeaderNameFilter) {
|
|
3247
|
+
value = header;
|
|
3282
3248
|
}
|
|
3283
3249
|
|
|
3284
|
-
|
|
3285
|
-
* Default visitor.
|
|
3286
|
-
*
|
|
3287
|
-
* @param {*} value
|
|
3288
|
-
* @param {String|Number} key
|
|
3289
|
-
* @param {Array<String|Number>} path
|
|
3290
|
-
* @this {FormData}
|
|
3291
|
-
*
|
|
3292
|
-
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
3293
|
-
*/
|
|
3294
|
-
function defaultVisitor(value, key, path) {
|
|
3295
|
-
let arr = value;
|
|
3250
|
+
if (!utils.isString(value)) return;
|
|
3296
3251
|
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
}
|
|
3252
|
+
if (utils.isString(filter)) {
|
|
3253
|
+
return value.indexOf(filter) !== -1;
|
|
3254
|
+
}
|
|
3301
3255
|
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
// eslint-disable-next-line no-param-reassign
|
|
3307
|
-
value = JSON.stringify(value);
|
|
3308
|
-
} else if (
|
|
3309
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
|
3310
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))
|
|
3311
|
-
) {
|
|
3312
|
-
// eslint-disable-next-line no-param-reassign
|
|
3313
|
-
key = removeBrackets(key);
|
|
3256
|
+
if (utils.isRegExp(filter)) {
|
|
3257
|
+
return filter.test(value);
|
|
3258
|
+
}
|
|
3259
|
+
}
|
|
3314
3260
|
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
: key + '[]',
|
|
3324
|
-
convertValue(el)
|
|
3325
|
-
);
|
|
3326
|
-
});
|
|
3327
|
-
return false;
|
|
3328
|
-
}
|
|
3329
|
-
}
|
|
3261
|
+
function formatHeader(header) {
|
|
3262
|
+
return header
|
|
3263
|
+
.trim()
|
|
3264
|
+
.toLowerCase()
|
|
3265
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
3266
|
+
return char.toUpperCase() + str;
|
|
3267
|
+
});
|
|
3268
|
+
}
|
|
3330
3269
|
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
}
|
|
3270
|
+
function buildAccessors(obj, header) {
|
|
3271
|
+
const accessorName = utils.toCamelCase(' ' + header);
|
|
3334
3272
|
|
|
3335
|
-
|
|
3273
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
3274
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
3275
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
3276
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
3277
|
+
__proto__: null,
|
|
3278
|
+
value: function (arg1, arg2, arg3) {
|
|
3279
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
3280
|
+
},
|
|
3281
|
+
configurable: true,
|
|
3282
|
+
});
|
|
3283
|
+
});
|
|
3284
|
+
}
|
|
3336
3285
|
|
|
3337
|
-
|
|
3286
|
+
class AxiosHeaders {
|
|
3287
|
+
constructor(headers) {
|
|
3288
|
+
headers && this.set(headers);
|
|
3338
3289
|
}
|
|
3339
3290
|
|
|
3340
|
-
|
|
3291
|
+
set(header, valueOrRewrite, rewrite) {
|
|
3292
|
+
const self = this;
|
|
3341
3293
|
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
convertValue,
|
|
3345
|
-
isVisitable,
|
|
3346
|
-
});
|
|
3294
|
+
function setHeader(_value, _header, _rewrite) {
|
|
3295
|
+
const lHeader = normalizeHeader(_header);
|
|
3347
3296
|
|
|
3348
|
-
|
|
3349
|
-
|
|
3297
|
+
if (!lHeader) {
|
|
3298
|
+
return;
|
|
3299
|
+
}
|
|
3350
3300
|
|
|
3351
|
-
|
|
3352
|
-
throw new core_AxiosError(
|
|
3353
|
-
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
3354
|
-
core_AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
3355
|
-
);
|
|
3356
|
-
}
|
|
3301
|
+
const key = utils.findKey(self, lHeader);
|
|
3357
3302
|
|
|
3358
|
-
|
|
3359
|
-
|
|
3303
|
+
if (
|
|
3304
|
+
!key ||
|
|
3305
|
+
self[key] === undefined ||
|
|
3306
|
+
_rewrite === true ||
|
|
3307
|
+
(_rewrite === undefined && self[key] !== false)
|
|
3308
|
+
) {
|
|
3309
|
+
self[key || _header] = normalizeValue(_value);
|
|
3310
|
+
}
|
|
3360
3311
|
}
|
|
3361
3312
|
|
|
3362
|
-
|
|
3313
|
+
const setHeaders = (headers, _rewrite) =>
|
|
3314
|
+
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
3363
3315
|
|
|
3364
|
-
utils.
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3316
|
+
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
3317
|
+
setHeaders(header, valueOrRewrite);
|
|
3318
|
+
} else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
3319
|
+
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
3320
|
+
} else if (utils.isObject(header) && utils.isIterable(header)) {
|
|
3321
|
+
let obj = {},
|
|
3322
|
+
dest,
|
|
3323
|
+
key;
|
|
3324
|
+
for (const entry of header) {
|
|
3325
|
+
if (!utils.isArray(entry)) {
|
|
3326
|
+
throw new TypeError('Object iterator must return a key-value pair');
|
|
3327
|
+
}
|
|
3368
3328
|
|
|
3369
|
-
|
|
3370
|
-
|
|
3329
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
3330
|
+
? utils.isArray(dest)
|
|
3331
|
+
? [...dest, entry[1]]
|
|
3332
|
+
: [dest, entry[1]]
|
|
3333
|
+
: entry[1];
|
|
3371
3334
|
}
|
|
3372
|
-
});
|
|
3373
3335
|
|
|
3374
|
-
|
|
3375
|
-
|
|
3336
|
+
setHeaders(obj, valueOrRewrite);
|
|
3337
|
+
} else {
|
|
3338
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
3339
|
+
}
|
|
3376
3340
|
|
|
3377
|
-
|
|
3378
|
-
throw new TypeError('data must be an object');
|
|
3341
|
+
return this;
|
|
3379
3342
|
}
|
|
3380
3343
|
|
|
3381
|
-
|
|
3344
|
+
get(header, parser) {
|
|
3345
|
+
header = normalizeHeader(header);
|
|
3382
3346
|
|
|
3383
|
-
|
|
3384
|
-
|
|
3347
|
+
if (header) {
|
|
3348
|
+
const key = utils.findKey(this, header);
|
|
3385
3349
|
|
|
3386
|
-
|
|
3350
|
+
if (key) {
|
|
3351
|
+
const value = this[key];
|
|
3387
3352
|
|
|
3388
|
-
|
|
3353
|
+
if (!parser) {
|
|
3354
|
+
return value;
|
|
3355
|
+
}
|
|
3389
3356
|
|
|
3357
|
+
if (parser === true) {
|
|
3358
|
+
return parseTokens(value);
|
|
3359
|
+
}
|
|
3390
3360
|
|
|
3361
|
+
if (utils.isFunction(parser)) {
|
|
3362
|
+
return parser.call(this, value, key);
|
|
3363
|
+
}
|
|
3391
3364
|
|
|
3365
|
+
if (utils.isRegExp(parser)) {
|
|
3366
|
+
return parser.exec(value);
|
|
3367
|
+
}
|
|
3392
3368
|
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
* @param {string} str - The string to encode.
|
|
3398
|
-
*
|
|
3399
|
-
* @returns {string} The encoded string.
|
|
3400
|
-
*/
|
|
3401
|
-
function encode(str) {
|
|
3402
|
-
const charMap = {
|
|
3403
|
-
'!': '%21',
|
|
3404
|
-
"'": '%27',
|
|
3405
|
-
'(': '%28',
|
|
3406
|
-
')': '%29',
|
|
3407
|
-
'~': '%7E',
|
|
3408
|
-
'%20': '+',
|
|
3409
|
-
};
|
|
3410
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
3411
|
-
return charMap[match];
|
|
3412
|
-
});
|
|
3413
|
-
}
|
|
3369
|
+
throw new TypeError('parser must be boolean|regexp|function');
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3414
3373
|
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
*
|
|
3418
|
-
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
|
|
3419
|
-
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
3420
|
-
*
|
|
3421
|
-
* @returns {void}
|
|
3422
|
-
*/
|
|
3423
|
-
function AxiosURLSearchParams(params, options) {
|
|
3424
|
-
this._pairs = [];
|
|
3374
|
+
has(header, matcher) {
|
|
3375
|
+
header = normalizeHeader(header);
|
|
3425
3376
|
|
|
3426
|
-
|
|
3427
|
-
|
|
3377
|
+
if (header) {
|
|
3378
|
+
const key = utils.findKey(this, header);
|
|
3428
3379
|
|
|
3429
|
-
|
|
3380
|
+
return !!(
|
|
3381
|
+
key &&
|
|
3382
|
+
this[key] !== undefined &&
|
|
3383
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
3384
|
+
);
|
|
3385
|
+
}
|
|
3430
3386
|
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
};
|
|
3387
|
+
return false;
|
|
3388
|
+
}
|
|
3434
3389
|
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
return encoder.call(this, value, encode);
|
|
3439
|
-
}
|
|
3440
|
-
: encode;
|
|
3390
|
+
delete(header, matcher) {
|
|
3391
|
+
const self = this;
|
|
3392
|
+
let deleted = false;
|
|
3441
3393
|
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
3445
|
-
}, '')
|
|
3446
|
-
.join('&');
|
|
3447
|
-
};
|
|
3394
|
+
function deleteHeader(_header) {
|
|
3395
|
+
_header = normalizeHeader(_header);
|
|
3448
3396
|
|
|
3449
|
-
|
|
3397
|
+
if (_header) {
|
|
3398
|
+
const key = utils.findKey(self, _header);
|
|
3450
3399
|
|
|
3451
|
-
|
|
3400
|
+
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
3401
|
+
delete self[key];
|
|
3452
3402
|
|
|
3403
|
+
deleted = true;
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3453
3407
|
|
|
3408
|
+
if (utils.isArray(header)) {
|
|
3409
|
+
header.forEach(deleteHeader);
|
|
3410
|
+
} else {
|
|
3411
|
+
deleteHeader(header);
|
|
3412
|
+
}
|
|
3454
3413
|
|
|
3414
|
+
return deleted;
|
|
3415
|
+
}
|
|
3455
3416
|
|
|
3417
|
+
clear(matcher) {
|
|
3418
|
+
const keys = Object.keys(this);
|
|
3419
|
+
let i = keys.length;
|
|
3420
|
+
let deleted = false;
|
|
3456
3421
|
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
*/
|
|
3465
|
-
function buildURL_encode(val) {
|
|
3466
|
-
return encodeURIComponent(val)
|
|
3467
|
-
.replace(/%3A/gi, ':')
|
|
3468
|
-
.replace(/%24/g, '$')
|
|
3469
|
-
.replace(/%2C/gi, ',')
|
|
3470
|
-
.replace(/%20/g, '+');
|
|
3471
|
-
}
|
|
3422
|
+
while (i--) {
|
|
3423
|
+
const key = keys[i];
|
|
3424
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
3425
|
+
delete this[key];
|
|
3426
|
+
deleted = true;
|
|
3427
|
+
}
|
|
3428
|
+
}
|
|
3472
3429
|
|
|
3473
|
-
|
|
3474
|
-
* Build a URL by appending params to the end
|
|
3475
|
-
*
|
|
3476
|
-
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
3477
|
-
* @param {object} [params] The params to be appended
|
|
3478
|
-
* @param {?(object|Function)} options
|
|
3479
|
-
*
|
|
3480
|
-
* @returns {string} The formatted url
|
|
3481
|
-
*/
|
|
3482
|
-
function buildURL(url, params, options) {
|
|
3483
|
-
if (!params) {
|
|
3484
|
-
return url;
|
|
3430
|
+
return deleted;
|
|
3485
3431
|
}
|
|
3486
3432
|
|
|
3487
|
-
|
|
3433
|
+
normalize(format) {
|
|
3434
|
+
const self = this;
|
|
3435
|
+
const headers = {};
|
|
3488
3436
|
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3437
|
+
utils.forEach(this, (value, header) => {
|
|
3438
|
+
const key = utils.findKey(headers, header);
|
|
3439
|
+
|
|
3440
|
+
if (key) {
|
|
3441
|
+
self[key] = normalizeValue(value);
|
|
3442
|
+
delete self[header];
|
|
3443
|
+
return;
|
|
3492
3444
|
}
|
|
3493
|
-
: options;
|
|
3494
3445
|
|
|
3495
|
-
|
|
3446
|
+
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
3496
3447
|
|
|
3497
|
-
|
|
3448
|
+
if (normalized !== header) {
|
|
3449
|
+
delete self[header];
|
|
3450
|
+
}
|
|
3498
3451
|
|
|
3499
|
-
|
|
3500
|
-
serializedParams = serializeFn(params, _options);
|
|
3501
|
-
} else {
|
|
3502
|
-
serializedParams = utils.isURLSearchParams(params)
|
|
3503
|
-
? params.toString()
|
|
3504
|
-
: new helpers_AxiosURLSearchParams(params, _options).toString(_encode);
|
|
3505
|
-
}
|
|
3452
|
+
self[normalized] = normalizeValue(value);
|
|
3506
3453
|
|
|
3507
|
-
|
|
3508
|
-
|
|
3454
|
+
headers[normalized] = true;
|
|
3455
|
+
});
|
|
3509
3456
|
|
|
3510
|
-
|
|
3511
|
-
url = url.slice(0, hashmarkIndex);
|
|
3512
|
-
}
|
|
3513
|
-
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
3457
|
+
return this;
|
|
3514
3458
|
}
|
|
3515
3459
|
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
;// ../../../node_modules/axios/lib/core/InterceptorManager.js
|
|
3460
|
+
concat(...targets) {
|
|
3461
|
+
return this.constructor.concat(this, ...targets);
|
|
3462
|
+
}
|
|
3520
3463
|
|
|
3464
|
+
toJSON(asStrings) {
|
|
3465
|
+
const obj = Object.create(null);
|
|
3521
3466
|
|
|
3467
|
+
utils.forEach(this, (value, header) => {
|
|
3468
|
+
value != null &&
|
|
3469
|
+
value !== false &&
|
|
3470
|
+
(obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
3471
|
+
});
|
|
3522
3472
|
|
|
3473
|
+
return obj;
|
|
3474
|
+
}
|
|
3523
3475
|
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
this.handlers = [];
|
|
3476
|
+
[Symbol.iterator]() {
|
|
3477
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
3527
3478
|
}
|
|
3528
3479
|
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
3534
|
-
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
3535
|
-
*
|
|
3536
|
-
* @return {Number} An ID used to remove interceptor later
|
|
3537
|
-
*/
|
|
3538
|
-
use(fulfilled, rejected, options) {
|
|
3539
|
-
this.handlers.push({
|
|
3540
|
-
fulfilled,
|
|
3541
|
-
rejected,
|
|
3542
|
-
synchronous: options ? options.synchronous : false,
|
|
3543
|
-
runWhen: options ? options.runWhen : null,
|
|
3544
|
-
});
|
|
3545
|
-
return this.handlers.length - 1;
|
|
3480
|
+
toString() {
|
|
3481
|
+
return Object.entries(this.toJSON())
|
|
3482
|
+
.map(([header, value]) => header + ': ' + value)
|
|
3483
|
+
.join('\n');
|
|
3546
3484
|
}
|
|
3547
3485
|
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
*
|
|
3551
|
-
* @param {Number} id The ID that was returned by `use`
|
|
3552
|
-
*
|
|
3553
|
-
* @returns {void}
|
|
3554
|
-
*/
|
|
3555
|
-
eject(id) {
|
|
3556
|
-
if (this.handlers[id]) {
|
|
3557
|
-
this.handlers[id] = null;
|
|
3558
|
-
}
|
|
3486
|
+
getSetCookie() {
|
|
3487
|
+
return this.get('set-cookie') || [];
|
|
3559
3488
|
}
|
|
3560
3489
|
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
*
|
|
3564
|
-
* @returns {void}
|
|
3565
|
-
*/
|
|
3566
|
-
clear() {
|
|
3567
|
-
if (this.handlers) {
|
|
3568
|
-
this.handlers = [];
|
|
3569
|
-
}
|
|
3490
|
+
get [Symbol.toStringTag]() {
|
|
3491
|
+
return 'AxiosHeaders';
|
|
3570
3492
|
}
|
|
3571
3493
|
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
*
|
|
3575
|
-
* This method is particularly useful for skipping over any
|
|
3576
|
-
* interceptors that may have become `null` calling `eject`.
|
|
3577
|
-
*
|
|
3578
|
-
* @param {Function} fn The function to call for each interceptor
|
|
3579
|
-
*
|
|
3580
|
-
* @returns {void}
|
|
3581
|
-
*/
|
|
3582
|
-
forEach(fn) {
|
|
3583
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
3584
|
-
if (h !== null) {
|
|
3585
|
-
fn(h);
|
|
3586
|
-
}
|
|
3587
|
-
});
|
|
3494
|
+
static from(thing) {
|
|
3495
|
+
return thing instanceof this ? thing : new this(thing);
|
|
3588
3496
|
}
|
|
3589
|
-
}
|
|
3590
3497
|
|
|
3591
|
-
|
|
3498
|
+
static concat(first, ...targets) {
|
|
3499
|
+
const computed = new this(first);
|
|
3592
3500
|
|
|
3593
|
-
|
|
3501
|
+
targets.forEach((target) => computed.set(target));
|
|
3594
3502
|
|
|
3503
|
+
return computed;
|
|
3504
|
+
}
|
|
3595
3505
|
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
}
|
|
3506
|
+
static accessor(header) {
|
|
3507
|
+
const internals =
|
|
3508
|
+
(this[$internals] =
|
|
3509
|
+
this[$internals] =
|
|
3510
|
+
{
|
|
3511
|
+
accessors: {},
|
|
3512
|
+
});
|
|
3602
3513
|
|
|
3603
|
-
|
|
3514
|
+
const accessors = internals.accessors;
|
|
3515
|
+
const prototype = this.prototype;
|
|
3604
3516
|
|
|
3517
|
+
function defineAccessor(_header) {
|
|
3518
|
+
const lHeader = normalizeHeader(_header);
|
|
3605
3519
|
|
|
3520
|
+
if (!accessors[lHeader]) {
|
|
3521
|
+
buildAccessors(prototype, _header);
|
|
3522
|
+
accessors[lHeader] = true;
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3606
3525
|
|
|
3607
|
-
|
|
3526
|
+
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
3608
3527
|
|
|
3609
|
-
|
|
3528
|
+
return this;
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3610
3531
|
|
|
3532
|
+
AxiosHeaders.accessor([
|
|
3533
|
+
'Content-Type',
|
|
3534
|
+
'Content-Length',
|
|
3535
|
+
'Accept',
|
|
3536
|
+
'Accept-Encoding',
|
|
3537
|
+
'User-Agent',
|
|
3538
|
+
'Authorization',
|
|
3539
|
+
]);
|
|
3611
3540
|
|
|
3612
|
-
|
|
3541
|
+
// reserved names hotfix
|
|
3542
|
+
utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
3543
|
+
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
3544
|
+
return {
|
|
3545
|
+
get: () => value,
|
|
3546
|
+
set(headerValue) {
|
|
3547
|
+
this[mapped] = headerValue;
|
|
3548
|
+
},
|
|
3549
|
+
};
|
|
3550
|
+
});
|
|
3613
3551
|
|
|
3614
|
-
|
|
3552
|
+
utils.freezeMethods(AxiosHeaders);
|
|
3615
3553
|
|
|
3554
|
+
/* harmony default export */ const core_AxiosHeaders = (AxiosHeaders);
|
|
3616
3555
|
|
|
3617
|
-
|
|
3556
|
+
;// ../../../node_modules/axios/lib/core/AxiosError.js
|
|
3618
3557
|
|
|
3619
|
-
;// ../../../node_modules/axios/lib/platform/browser/index.js
|
|
3620
3558
|
|
|
3621
3559
|
|
|
3622
3560
|
|
|
3623
3561
|
|
|
3624
|
-
|
|
3625
|
-
isBrowser: true,
|
|
3626
|
-
classes: {
|
|
3627
|
-
URLSearchParams: classes_URLSearchParams,
|
|
3628
|
-
FormData: classes_FormData,
|
|
3629
|
-
Blob: classes_Blob,
|
|
3630
|
-
},
|
|
3631
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
3632
|
-
});
|
|
3562
|
+
const REDACTED = '[REDACTED ****]';
|
|
3633
3563
|
|
|
3634
|
-
|
|
3635
|
-
|
|
3564
|
+
function hasOwnOrPrototypeToJSON(source) {
|
|
3565
|
+
if (utils.hasOwnProp(source, 'toJSON')) {
|
|
3566
|
+
return true;
|
|
3567
|
+
}
|
|
3636
3568
|
|
|
3637
|
-
|
|
3569
|
+
let prototype = Object.getPrototypeOf(source);
|
|
3638
3570
|
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
3644
|
-
*
|
|
3645
|
-
* web workers:
|
|
3646
|
-
* typeof window -> undefined
|
|
3647
|
-
* typeof document -> undefined
|
|
3648
|
-
*
|
|
3649
|
-
* react-native:
|
|
3650
|
-
* navigator.product -> 'ReactNative'
|
|
3651
|
-
* nativescript
|
|
3652
|
-
* navigator.product -> 'NativeScript' or 'NS'
|
|
3653
|
-
*
|
|
3654
|
-
* @returns {boolean}
|
|
3655
|
-
*/
|
|
3656
|
-
const hasStandardBrowserEnv =
|
|
3657
|
-
hasBrowserEnv &&
|
|
3658
|
-
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
3571
|
+
while (prototype && prototype !== Object.prototype) {
|
|
3572
|
+
if (utils.hasOwnProp(prototype, 'toJSON')) {
|
|
3573
|
+
return true;
|
|
3574
|
+
}
|
|
3659
3575
|
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
*
|
|
3663
|
-
* Although the `isStandardBrowserEnv` method indicates that
|
|
3664
|
-
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
3665
|
-
* filtered out due to its judgment standard
|
|
3666
|
-
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
3667
|
-
* This leads to a problem when axios post `FormData` in webWorker
|
|
3668
|
-
*/
|
|
3669
|
-
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
3670
|
-
return (
|
|
3671
|
-
typeof WorkerGlobalScope !== 'undefined' &&
|
|
3672
|
-
// eslint-disable-next-line no-undef
|
|
3673
|
-
self instanceof WorkerGlobalScope &&
|
|
3674
|
-
typeof self.importScripts === 'function'
|
|
3675
|
-
);
|
|
3676
|
-
})();
|
|
3576
|
+
prototype = Object.getPrototypeOf(prototype);
|
|
3577
|
+
}
|
|
3677
3578
|
|
|
3678
|
-
|
|
3579
|
+
return false;
|
|
3580
|
+
}
|
|
3679
3581
|
|
|
3582
|
+
// Build a plain-object snapshot of `config` and replace the value of any key
|
|
3583
|
+
// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays
|
|
3584
|
+
// and AxiosHeaders, and short-circuits on circular references.
|
|
3585
|
+
function redactConfig(config, redactKeys) {
|
|
3586
|
+
const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
|
|
3587
|
+
const seen = [];
|
|
3680
3588
|
|
|
3589
|
+
const visit = (source) => {
|
|
3590
|
+
if (source === null || typeof source !== 'object') return source;
|
|
3591
|
+
if (utils.isBuffer(source)) return source;
|
|
3592
|
+
if (seen.indexOf(source) !== -1) return undefined;
|
|
3681
3593
|
|
|
3682
|
-
|
|
3594
|
+
if (source instanceof core_AxiosHeaders) {
|
|
3595
|
+
source = source.toJSON();
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3598
|
+
seen.push(source);
|
|
3599
|
+
|
|
3600
|
+
let result;
|
|
3601
|
+
if (utils.isArray(source)) {
|
|
3602
|
+
result = [];
|
|
3603
|
+
source.forEach((v, i) => {
|
|
3604
|
+
const reducedValue = visit(v);
|
|
3605
|
+
if (!utils.isUndefined(reducedValue)) {
|
|
3606
|
+
result[i] = reducedValue;
|
|
3607
|
+
}
|
|
3608
|
+
});
|
|
3609
|
+
} else {
|
|
3610
|
+
if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
3611
|
+
seen.pop();
|
|
3612
|
+
return source;
|
|
3613
|
+
}
|
|
3683
3614
|
|
|
3615
|
+
result = Object.create(null);
|
|
3616
|
+
for (const [key, value] of Object.entries(source)) {
|
|
3617
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
|
|
3618
|
+
if (!utils.isUndefined(reducedValue)) {
|
|
3619
|
+
result[key] = reducedValue;
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3684
3623
|
|
|
3624
|
+
seen.pop();
|
|
3625
|
+
return result;
|
|
3626
|
+
};
|
|
3685
3627
|
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
...browser,
|
|
3689
|
-
});
|
|
3628
|
+
return visit(config);
|
|
3629
|
+
}
|
|
3690
3630
|
|
|
3691
|
-
|
|
3631
|
+
class AxiosError extends Error {
|
|
3632
|
+
static from(error, code, config, request, response, customProps) {
|
|
3633
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
3634
|
+
axiosError.cause = error;
|
|
3635
|
+
axiosError.name = error.name;
|
|
3692
3636
|
|
|
3637
|
+
// Preserve status from the original error if not already set from response
|
|
3638
|
+
if (error.status != null && axiosError.status == null) {
|
|
3639
|
+
axiosError.status = error.status;
|
|
3640
|
+
}
|
|
3693
3641
|
|
|
3642
|
+
customProps && Object.assign(axiosError, customProps);
|
|
3643
|
+
return axiosError;
|
|
3644
|
+
}
|
|
3694
3645
|
|
|
3646
|
+
/**
|
|
3647
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
3648
|
+
*
|
|
3649
|
+
* @param {string} message The error message.
|
|
3650
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
3651
|
+
* @param {Object} [config] The config.
|
|
3652
|
+
* @param {Object} [request] The request.
|
|
3653
|
+
* @param {Object} [response] The response.
|
|
3654
|
+
*
|
|
3655
|
+
* @returns {Error} The created error.
|
|
3656
|
+
*/
|
|
3657
|
+
constructor(message, code, config, request, response) {
|
|
3658
|
+
super(message);
|
|
3695
3659
|
|
|
3660
|
+
// Make message enumerable to maintain backward compatibility
|
|
3661
|
+
// The native Error constructor sets message as non-enumerable,
|
|
3662
|
+
// but axios < v1.13.3 had it as enumerable
|
|
3663
|
+
Object.defineProperty(this, 'message', {
|
|
3664
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
3665
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
3666
|
+
__proto__: null,
|
|
3667
|
+
value: message,
|
|
3668
|
+
enumerable: true,
|
|
3669
|
+
writable: true,
|
|
3670
|
+
configurable: true,
|
|
3671
|
+
});
|
|
3696
3672
|
|
|
3673
|
+
this.name = 'AxiosError';
|
|
3674
|
+
this.isAxiosError = true;
|
|
3675
|
+
code && (this.code = code);
|
|
3676
|
+
config && (this.config = config);
|
|
3677
|
+
request && (this.request = request);
|
|
3678
|
+
if (response) {
|
|
3679
|
+
this.response = response;
|
|
3680
|
+
this.status = response.status;
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3697
3683
|
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3684
|
+
toJSON() {
|
|
3685
|
+
// Opt-in redaction: when the request config carries a `redact` array, the
|
|
3686
|
+
// value of any matching key (case-insensitive, at any depth) is replaced
|
|
3687
|
+
// with REDACTED in the serialized snapshot. Undefined or empty leaves the
|
|
3688
|
+
// existing serialization behavior unchanged.
|
|
3689
|
+
const config = this.config;
|
|
3690
|
+
const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined;
|
|
3691
|
+
const serializedConfig =
|
|
3692
|
+
utils.isArray(redactKeys) && redactKeys.length > 0
|
|
3693
|
+
? redactConfig(config, redactKeys)
|
|
3694
|
+
: utils.toJSONObject(config);
|
|
3705
3695
|
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3696
|
+
return {
|
|
3697
|
+
// Standard
|
|
3698
|
+
message: this.message,
|
|
3699
|
+
name: this.name,
|
|
3700
|
+
// Microsoft
|
|
3701
|
+
description: this.description,
|
|
3702
|
+
number: this.number,
|
|
3703
|
+
// Mozilla
|
|
3704
|
+
fileName: this.fileName,
|
|
3705
|
+
lineNumber: this.lineNumber,
|
|
3706
|
+
columnNumber: this.columnNumber,
|
|
3707
|
+
stack: this.stack,
|
|
3708
|
+
// Axios
|
|
3709
|
+
config: serializedConfig,
|
|
3710
|
+
code: this.code,
|
|
3711
|
+
status: this.status,
|
|
3712
|
+
};
|
|
3713
|
+
}
|
|
3710
3714
|
}
|
|
3711
3715
|
|
|
3712
|
-
|
|
3716
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
3717
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
3718
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
3719
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
3720
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
3721
|
+
AxiosError.ECONNREFUSED = 'ECONNREFUSED';
|
|
3722
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
3723
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
3724
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
3725
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
3726
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
3727
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
3728
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
3729
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
3730
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
3731
|
+
|
|
3732
|
+
/* harmony default export */ const core_AxiosError = (AxiosError);
|
|
3733
|
+
|
|
3734
|
+
;// ../../../node_modules/axios/lib/helpers/null.js
|
|
3735
|
+
// eslint-disable-next-line strict
|
|
3736
|
+
/* harmony default export */ const helpers_null = (null);
|
|
3737
|
+
|
|
3738
|
+
;// ../../../node_modules/axios/lib/helpers/toFormData.js
|
|
3739
|
+
/* provided dependency */ var Buffer = __webpack_require__(81429)["hp"];
|
|
3740
|
+
|
|
3741
|
+
|
|
3713
3742
|
|
|
3714
3743
|
|
|
3744
|
+
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
3715
3745
|
|
|
3716
3746
|
|
|
3717
3747
|
/**
|
|
3718
|
-
*
|
|
3748
|
+
* Determines if the given thing is a array or js object.
|
|
3719
3749
|
*
|
|
3720
|
-
* @param {string}
|
|
3750
|
+
* @param {string} thing - The object or array to be visited.
|
|
3721
3751
|
*
|
|
3722
|
-
* @returns
|
|
3752
|
+
* @returns {boolean}
|
|
3723
3753
|
*/
|
|
3724
|
-
function
|
|
3725
|
-
|
|
3726
|
-
// foo.x.y.z
|
|
3727
|
-
// foo-x-y-z
|
|
3728
|
-
// foo x y z
|
|
3729
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
3730
|
-
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
3731
|
-
});
|
|
3754
|
+
function isVisitable(thing) {
|
|
3755
|
+
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
3732
3756
|
}
|
|
3733
3757
|
|
|
3734
3758
|
/**
|
|
3735
|
-
*
|
|
3759
|
+
* It removes the brackets from the end of a string
|
|
3736
3760
|
*
|
|
3737
|
-
* @param {
|
|
3761
|
+
* @param {string} key - The key of the parameter.
|
|
3738
3762
|
*
|
|
3739
|
-
* @returns
|
|
3763
|
+
* @returns {string} the key without the brackets.
|
|
3740
3764
|
*/
|
|
3741
|
-
function
|
|
3742
|
-
|
|
3743
|
-
const keys = Object.keys(arr);
|
|
3744
|
-
let i;
|
|
3745
|
-
const len = keys.length;
|
|
3746
|
-
let key;
|
|
3747
|
-
for (i = 0; i < len; i++) {
|
|
3748
|
-
key = keys[i];
|
|
3749
|
-
obj[key] = arr[key];
|
|
3750
|
-
}
|
|
3751
|
-
return obj;
|
|
3765
|
+
function removeBrackets(key) {
|
|
3766
|
+
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
3752
3767
|
}
|
|
3753
3768
|
|
|
3754
3769
|
/**
|
|
3755
|
-
* It takes a
|
|
3770
|
+
* It takes a path, a key, and a boolean, and returns a string
|
|
3756
3771
|
*
|
|
3757
|
-
* @param {string}
|
|
3772
|
+
* @param {string} path - The path to the current key.
|
|
3773
|
+
* @param {string} key - The key of the current object being iterated over.
|
|
3774
|
+
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
3758
3775
|
*
|
|
3759
|
-
* @returns {
|
|
3776
|
+
* @returns {string} The path to the current key.
|
|
3760
3777
|
*/
|
|
3761
|
-
function
|
|
3762
|
-
|
|
3763
|
-
|
|
3778
|
+
function renderKey(path, key, dots) {
|
|
3779
|
+
if (!path) return key;
|
|
3780
|
+
return path
|
|
3781
|
+
.concat(key)
|
|
3782
|
+
.map(function each(token, i) {
|
|
3783
|
+
// eslint-disable-next-line no-param-reassign
|
|
3784
|
+
token = removeBrackets(token);
|
|
3785
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
3786
|
+
})
|
|
3787
|
+
.join(dots ? '.' : '');
|
|
3788
|
+
}
|
|
3764
3789
|
|
|
3765
|
-
|
|
3790
|
+
/**
|
|
3791
|
+
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
3792
|
+
*
|
|
3793
|
+
* @param {Array<any>} arr - The array to check
|
|
3794
|
+
*
|
|
3795
|
+
* @returns {boolean}
|
|
3796
|
+
*/
|
|
3797
|
+
function isFlatArray(arr) {
|
|
3798
|
+
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
3799
|
+
}
|
|
3766
3800
|
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3801
|
+
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
3802
|
+
return /^is[A-Z]/.test(prop);
|
|
3803
|
+
});
|
|
3770
3804
|
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3805
|
+
/**
|
|
3806
|
+
* Convert a data object to FormData
|
|
3807
|
+
*
|
|
3808
|
+
* @param {Object} obj
|
|
3809
|
+
* @param {?Object} [formData]
|
|
3810
|
+
* @param {?Object} [options]
|
|
3811
|
+
* @param {Function} [options.visitor]
|
|
3812
|
+
* @param {Boolean} [options.metaTokens = true]
|
|
3813
|
+
* @param {Boolean} [options.dots = false]
|
|
3814
|
+
* @param {?Boolean} [options.indexes = false]
|
|
3815
|
+
*
|
|
3816
|
+
* @returns {Object}
|
|
3817
|
+
**/
|
|
3779
3818
|
|
|
3780
|
-
|
|
3781
|
-
|
|
3819
|
+
/**
|
|
3820
|
+
* It converts an object into a FormData object
|
|
3821
|
+
*
|
|
3822
|
+
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
3823
|
+
* @param {string} formData - The FormData object to append to.
|
|
3824
|
+
* @param {Object<string, any>} options
|
|
3825
|
+
*
|
|
3826
|
+
* @returns
|
|
3827
|
+
*/
|
|
3828
|
+
function toFormData(obj, formData, options) {
|
|
3829
|
+
if (!utils.isObject(obj)) {
|
|
3830
|
+
throw new TypeError('target must be an object');
|
|
3831
|
+
}
|
|
3782
3832
|
|
|
3783
|
-
|
|
3784
|
-
|
|
3833
|
+
// eslint-disable-next-line no-param-reassign
|
|
3834
|
+
formData = formData || new (helpers_null || FormData)();
|
|
3835
|
+
|
|
3836
|
+
// eslint-disable-next-line no-param-reassign
|
|
3837
|
+
options = utils.toFlatObject(
|
|
3838
|
+
options,
|
|
3839
|
+
{
|
|
3840
|
+
metaTokens: true,
|
|
3841
|
+
dots: false,
|
|
3842
|
+
indexes: false,
|
|
3843
|
+
},
|
|
3844
|
+
false,
|
|
3845
|
+
function defined(option, source) {
|
|
3846
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
3847
|
+
return !utils.isUndefined(source[option]);
|
|
3785
3848
|
}
|
|
3849
|
+
);
|
|
3786
3850
|
|
|
3787
|
-
|
|
3851
|
+
const metaTokens = options.metaTokens;
|
|
3852
|
+
// eslint-disable-next-line no-use-before-define
|
|
3853
|
+
const visitor = options.visitor || defaultVisitor;
|
|
3854
|
+
const dots = options.dots;
|
|
3855
|
+
const indexes = options.indexes;
|
|
3856
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
3857
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
3858
|
+
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
3788
3859
|
|
|
3789
|
-
|
|
3790
|
-
|
|
3860
|
+
if (!utils.isFunction(visitor)) {
|
|
3861
|
+
throw new TypeError('visitor must be a function');
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
function convertValue(value) {
|
|
3865
|
+
if (value === null) return '';
|
|
3866
|
+
|
|
3867
|
+
if (utils.isDate(value)) {
|
|
3868
|
+
return value.toISOString();
|
|
3791
3869
|
}
|
|
3792
3870
|
|
|
3793
|
-
|
|
3794
|
-
|
|
3871
|
+
if (utils.isBoolean(value)) {
|
|
3872
|
+
return value.toString();
|
|
3873
|
+
}
|
|
3795
3874
|
|
|
3796
|
-
|
|
3797
|
-
|
|
3875
|
+
if (!useBlob && utils.isBlob(value)) {
|
|
3876
|
+
throw new core_AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
3877
|
+
}
|
|
3798
3878
|
|
|
3799
|
-
utils.
|
|
3800
|
-
|
|
3801
|
-
}
|
|
3879
|
+
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
3880
|
+
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
3881
|
+
}
|
|
3802
3882
|
|
|
3803
|
-
return
|
|
3883
|
+
return value;
|
|
3804
3884
|
}
|
|
3805
3885
|
|
|
3806
|
-
|
|
3807
|
-
|
|
3886
|
+
/**
|
|
3887
|
+
* Default visitor.
|
|
3888
|
+
*
|
|
3889
|
+
* @param {*} value
|
|
3890
|
+
* @param {String|Number} key
|
|
3891
|
+
* @param {Array<String|Number>} path
|
|
3892
|
+
* @this {FormData}
|
|
3893
|
+
*
|
|
3894
|
+
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
3895
|
+
*/
|
|
3896
|
+
function defaultVisitor(value, key, path) {
|
|
3897
|
+
let arr = value;
|
|
3808
3898
|
|
|
3809
|
-
|
|
3899
|
+
if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {
|
|
3900
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
3901
|
+
return false;
|
|
3902
|
+
}
|
|
3810
3903
|
|
|
3811
|
-
|
|
3904
|
+
if (value && !path && typeof value === 'object') {
|
|
3905
|
+
if (utils.endsWith(key, '{}')) {
|
|
3906
|
+
// eslint-disable-next-line no-param-reassign
|
|
3907
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
3908
|
+
// eslint-disable-next-line no-param-reassign
|
|
3909
|
+
value = JSON.stringify(value);
|
|
3910
|
+
} else if (
|
|
3911
|
+
(utils.isArray(value) && isFlatArray(value)) ||
|
|
3912
|
+
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))
|
|
3913
|
+
) {
|
|
3914
|
+
// eslint-disable-next-line no-param-reassign
|
|
3915
|
+
key = removeBrackets(key);
|
|
3916
|
+
|
|
3917
|
+
arr.forEach(function each(el, index) {
|
|
3918
|
+
!(utils.isUndefined(el) || el === null) &&
|
|
3919
|
+
formData.append(
|
|
3920
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3921
|
+
indexes === true
|
|
3922
|
+
? renderKey([key], index, dots)
|
|
3923
|
+
: indexes === null
|
|
3924
|
+
? key
|
|
3925
|
+
: key + '[]',
|
|
3926
|
+
convertValue(el)
|
|
3927
|
+
);
|
|
3928
|
+
});
|
|
3929
|
+
return false;
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3812
3932
|
|
|
3933
|
+
if (isVisitable(value)) {
|
|
3934
|
+
return true;
|
|
3935
|
+
}
|
|
3813
3936
|
|
|
3937
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
3814
3938
|
|
|
3939
|
+
return false;
|
|
3940
|
+
}
|
|
3815
3941
|
|
|
3942
|
+
const stack = [];
|
|
3816
3943
|
|
|
3944
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
3945
|
+
defaultVisitor,
|
|
3946
|
+
convertValue,
|
|
3947
|
+
isVisitable,
|
|
3948
|
+
});
|
|
3817
3949
|
|
|
3950
|
+
function build(value, path, depth = 0) {
|
|
3951
|
+
if (utils.isUndefined(value)) return;
|
|
3818
3952
|
|
|
3953
|
+
if (depth > maxDepth) {
|
|
3954
|
+
throw new core_AxiosError(
|
|
3955
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
3956
|
+
core_AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
3957
|
+
);
|
|
3958
|
+
}
|
|
3819
3959
|
|
|
3960
|
+
if (stack.indexOf(value) !== -1) {
|
|
3961
|
+
throw new Error('Circular reference detected in ' + path.join('.'));
|
|
3962
|
+
}
|
|
3820
3963
|
|
|
3964
|
+
stack.push(value);
|
|
3821
3965
|
|
|
3822
|
-
|
|
3966
|
+
utils.forEach(value, function each(el, key) {
|
|
3967
|
+
const result =
|
|
3968
|
+
!(utils.isUndefined(el) || el === null) &&
|
|
3969
|
+
visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
3823
3970
|
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
* of the input
|
|
3827
|
-
*
|
|
3828
|
-
* @param {any} rawValue - The value to be stringified.
|
|
3829
|
-
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
3830
|
-
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
3831
|
-
*
|
|
3832
|
-
* @returns {string} A stringified version of the rawValue.
|
|
3833
|
-
*/
|
|
3834
|
-
function stringifySafely(rawValue, parser, encoder) {
|
|
3835
|
-
if (utils.isString(rawValue)) {
|
|
3836
|
-
try {
|
|
3837
|
-
(parser || JSON.parse)(rawValue);
|
|
3838
|
-
return utils.trim(rawValue);
|
|
3839
|
-
} catch (e) {
|
|
3840
|
-
if (e.name !== 'SyntaxError') {
|
|
3841
|
-
throw e;
|
|
3971
|
+
if (result === true) {
|
|
3972
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
3842
3973
|
}
|
|
3843
|
-
}
|
|
3974
|
+
});
|
|
3975
|
+
|
|
3976
|
+
stack.pop();
|
|
3844
3977
|
}
|
|
3845
3978
|
|
|
3846
|
-
|
|
3979
|
+
if (!utils.isObject(obj)) {
|
|
3980
|
+
throw new TypeError('data must be an object');
|
|
3981
|
+
}
|
|
3982
|
+
|
|
3983
|
+
build(obj);
|
|
3984
|
+
|
|
3985
|
+
return formData;
|
|
3847
3986
|
}
|
|
3848
3987
|
|
|
3849
|
-
const
|
|
3850
|
-
transitional: defaults_transitional,
|
|
3988
|
+
/* harmony default export */ const helpers_toFormData = (toFormData);
|
|
3851
3989
|
|
|
3852
|
-
|
|
3990
|
+
;// ../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
3853
3991
|
|
|
3854
|
-
transformRequest: [
|
|
3855
|
-
function transformRequest(data, headers) {
|
|
3856
|
-
const contentType = headers.getContentType() || '';
|
|
3857
|
-
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
3858
|
-
const isObjectPayload = utils.isObject(data);
|
|
3859
3992
|
|
|
3860
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
3861
|
-
data = new FormData(data);
|
|
3862
|
-
}
|
|
3863
3993
|
|
|
3864
|
-
const isFormData = utils.isFormData(data);
|
|
3865
3994
|
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3995
|
+
/**
|
|
3996
|
+
* It encodes a string by replacing all characters that are not in the unreserved set with
|
|
3997
|
+
* their percent-encoded equivalents
|
|
3998
|
+
*
|
|
3999
|
+
* @param {string} str - The string to encode.
|
|
4000
|
+
*
|
|
4001
|
+
* @returns {string} The encoded string.
|
|
4002
|
+
*/
|
|
4003
|
+
function encode(str) {
|
|
4004
|
+
const charMap = {
|
|
4005
|
+
'!': '%21',
|
|
4006
|
+
"'": '%27',
|
|
4007
|
+
'(': '%28',
|
|
4008
|
+
')': '%29',
|
|
4009
|
+
'~': '%7E',
|
|
4010
|
+
'%20': '+',
|
|
4011
|
+
};
|
|
4012
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
4013
|
+
return charMap[match];
|
|
4014
|
+
});
|
|
4015
|
+
}
|
|
3869
4016
|
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
if (utils.isArrayBufferView(data)) {
|
|
3881
|
-
return data.buffer;
|
|
3882
|
-
}
|
|
3883
|
-
if (utils.isURLSearchParams(data)) {
|
|
3884
|
-
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
3885
|
-
return data.toString();
|
|
3886
|
-
}
|
|
4017
|
+
/**
|
|
4018
|
+
* It takes a params object and converts it to a FormData object
|
|
4019
|
+
*
|
|
4020
|
+
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
|
|
4021
|
+
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
4022
|
+
*
|
|
4023
|
+
* @returns {void}
|
|
4024
|
+
*/
|
|
4025
|
+
function AxiosURLSearchParams(params, options) {
|
|
4026
|
+
this._pairs = [];
|
|
3887
4027
|
|
|
3888
|
-
|
|
4028
|
+
params && helpers_toFormData(params, this, options);
|
|
4029
|
+
}
|
|
3889
4030
|
|
|
3890
|
-
|
|
3891
|
-
const formSerializer = own(this, 'formSerializer');
|
|
3892
|
-
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
3893
|
-
return toURLEncodedForm(data, formSerializer).toString();
|
|
3894
|
-
}
|
|
4031
|
+
const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
|
|
3895
4032
|
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
) {
|
|
3900
|
-
const env = own(this, 'env');
|
|
3901
|
-
const _FormData = env && env.FormData;
|
|
4033
|
+
AxiosURLSearchParams_prototype.append = function append(name, value) {
|
|
4034
|
+
this._pairs.push([name, value]);
|
|
4035
|
+
};
|
|
3902
4036
|
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
);
|
|
3908
|
-
}
|
|
4037
|
+
AxiosURLSearchParams_prototype.toString = function toString(encoder) {
|
|
4038
|
+
const _encode = encoder
|
|
4039
|
+
? function (value) {
|
|
4040
|
+
return encoder.call(this, value, encode);
|
|
3909
4041
|
}
|
|
4042
|
+
: encode;
|
|
3910
4043
|
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
4044
|
+
return this._pairs
|
|
4045
|
+
.map(function each(pair) {
|
|
4046
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
4047
|
+
}, '')
|
|
4048
|
+
.join('&');
|
|
4049
|
+
};
|
|
3915
4050
|
|
|
3916
|
-
|
|
3917
|
-
},
|
|
3918
|
-
],
|
|
4051
|
+
/* harmony default export */ const helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
|
|
3919
4052
|
|
|
3920
|
-
|
|
3921
|
-
function transformResponse(data) {
|
|
3922
|
-
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
3923
|
-
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
3924
|
-
const responseType = own(this, 'responseType');
|
|
3925
|
-
const JSONRequested = responseType === 'json';
|
|
4053
|
+
;// ../../../node_modules/axios/lib/helpers/buildURL.js
|
|
3926
4054
|
|
|
3927
|
-
if (utils.isResponse(data) || utils.isReadableStream(data)) {
|
|
3928
|
-
return data;
|
|
3929
|
-
}
|
|
3930
4055
|
|
|
3931
|
-
if (
|
|
3932
|
-
data &&
|
|
3933
|
-
utils.isString(data) &&
|
|
3934
|
-
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
3935
|
-
) {
|
|
3936
|
-
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
3937
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
3938
4056
|
|
|
3939
|
-
try {
|
|
3940
|
-
return JSON.parse(data, own(this, 'parseReviver'));
|
|
3941
|
-
} catch (e) {
|
|
3942
|
-
if (strictJSONParsing) {
|
|
3943
|
-
if (e.name === 'SyntaxError') {
|
|
3944
|
-
throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
3945
|
-
}
|
|
3946
|
-
throw e;
|
|
3947
|
-
}
|
|
3948
|
-
}
|
|
3949
|
-
}
|
|
3950
4057
|
|
|
3951
|
-
return data;
|
|
3952
|
-
},
|
|
3953
|
-
],
|
|
3954
4058
|
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
4059
|
+
/**
|
|
4060
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
4061
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
4062
|
+
*
|
|
4063
|
+
* @param {string} val The value to be encoded.
|
|
4064
|
+
*
|
|
4065
|
+
* @returns {string} The encoded value.
|
|
4066
|
+
*/
|
|
4067
|
+
function buildURL_encode(val) {
|
|
4068
|
+
return encodeURIComponent(val)
|
|
4069
|
+
.replace(/%3A/gi, ':')
|
|
4070
|
+
.replace(/%24/g, '$')
|
|
4071
|
+
.replace(/%2C/gi, ',')
|
|
4072
|
+
.replace(/%20/g, '+');
|
|
4073
|
+
}
|
|
3960
4074
|
|
|
3961
|
-
|
|
3962
|
-
|
|
4075
|
+
/**
|
|
4076
|
+
* Build a URL by appending params to the end
|
|
4077
|
+
*
|
|
4078
|
+
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
4079
|
+
* @param {object} [params] The params to be appended
|
|
4080
|
+
* @param {?(object|Function)} options
|
|
4081
|
+
*
|
|
4082
|
+
* @returns {string} The formatted url
|
|
4083
|
+
*/
|
|
4084
|
+
function buildURL(url, params, options) {
|
|
4085
|
+
if (!params) {
|
|
4086
|
+
return url;
|
|
4087
|
+
}
|
|
3963
4088
|
|
|
3964
|
-
|
|
3965
|
-
maxBodyLength: -1,
|
|
4089
|
+
const _encode = (options && options.encode) || buildURL_encode;
|
|
3966
4090
|
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
4091
|
+
const _options = utils.isFunction(options)
|
|
4092
|
+
? {
|
|
4093
|
+
serialize: options,
|
|
4094
|
+
}
|
|
4095
|
+
: options;
|
|
3971
4096
|
|
|
3972
|
-
|
|
3973
|
-
return status >= 200 && status < 300;
|
|
3974
|
-
},
|
|
4097
|
+
const serializeFn = _options && _options.serialize;
|
|
3975
4098
|
|
|
3976
|
-
|
|
3977
|
-
common: {
|
|
3978
|
-
Accept: 'application/json, text/plain, */*',
|
|
3979
|
-
'Content-Type': undefined,
|
|
3980
|
-
},
|
|
3981
|
-
},
|
|
3982
|
-
};
|
|
4099
|
+
let serializedParams;
|
|
3983
4100
|
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
}
|
|
4101
|
+
if (serializeFn) {
|
|
4102
|
+
serializedParams = serializeFn(params, _options);
|
|
4103
|
+
} else {
|
|
4104
|
+
serializedParams = utils.isURLSearchParams(params)
|
|
4105
|
+
? params.toString()
|
|
4106
|
+
: new helpers_AxiosURLSearchParams(params, _options).toString(_encode);
|
|
4107
|
+
}
|
|
3987
4108
|
|
|
3988
|
-
|
|
4109
|
+
if (serializedParams) {
|
|
4110
|
+
const hashmarkIndex = url.indexOf('#');
|
|
3989
4111
|
|
|
3990
|
-
|
|
4112
|
+
if (hashmarkIndex !== -1) {
|
|
4113
|
+
url = url.slice(0, hashmarkIndex);
|
|
4114
|
+
}
|
|
4115
|
+
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
4116
|
+
}
|
|
3991
4117
|
|
|
4118
|
+
return url;
|
|
4119
|
+
}
|
|
3992
4120
|
|
|
4121
|
+
;// ../../../node_modules/axios/lib/core/InterceptorManager.js
|
|
3993
4122
|
|
|
3994
4123
|
|
|
3995
|
-
// RawAxiosHeaders whose duplicates are ignored by node
|
|
3996
|
-
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
3997
|
-
const ignoreDuplicateOf = utils.toObjectSet([
|
|
3998
|
-
'age',
|
|
3999
|
-
'authorization',
|
|
4000
|
-
'content-length',
|
|
4001
|
-
'content-type',
|
|
4002
|
-
'etag',
|
|
4003
|
-
'expires',
|
|
4004
|
-
'from',
|
|
4005
|
-
'host',
|
|
4006
|
-
'if-modified-since',
|
|
4007
|
-
'if-unmodified-since',
|
|
4008
|
-
'last-modified',
|
|
4009
|
-
'location',
|
|
4010
|
-
'max-forwards',
|
|
4011
|
-
'proxy-authorization',
|
|
4012
|
-
'referer',
|
|
4013
|
-
'retry-after',
|
|
4014
|
-
'user-agent',
|
|
4015
|
-
]);
|
|
4016
4124
|
|
|
4017
|
-
/**
|
|
4018
|
-
* Parse headers into an object
|
|
4019
|
-
*
|
|
4020
|
-
* ```
|
|
4021
|
-
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
4022
|
-
* Content-Type: application/json
|
|
4023
|
-
* Connection: keep-alive
|
|
4024
|
-
* Transfer-Encoding: chunked
|
|
4025
|
-
* ```
|
|
4026
|
-
*
|
|
4027
|
-
* @param {String} rawHeaders Headers needing to be parsed
|
|
4028
|
-
*
|
|
4029
|
-
* @returns {Object} Headers parsed into an object
|
|
4030
|
-
*/
|
|
4031
|
-
/* harmony default export */ const parseHeaders = ((rawHeaders) => {
|
|
4032
|
-
const parsed = {};
|
|
4033
|
-
let key;
|
|
4034
|
-
let val;
|
|
4035
|
-
let i;
|
|
4036
4125
|
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4126
|
+
class InterceptorManager {
|
|
4127
|
+
constructor() {
|
|
4128
|
+
this.handlers = [];
|
|
4129
|
+
}
|
|
4130
|
+
|
|
4131
|
+
/**
|
|
4132
|
+
* Add a new interceptor to the stack
|
|
4133
|
+
*
|
|
4134
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
4135
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
4136
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
4137
|
+
*
|
|
4138
|
+
* @return {Number} An ID used to remove interceptor later
|
|
4139
|
+
*/
|
|
4140
|
+
use(fulfilled, rejected, options) {
|
|
4141
|
+
this.handlers.push({
|
|
4142
|
+
fulfilled,
|
|
4143
|
+
rejected,
|
|
4144
|
+
synchronous: options ? options.synchronous : false,
|
|
4145
|
+
runWhen: options ? options.runWhen : null,
|
|
4146
|
+
});
|
|
4147
|
+
return this.handlers.length - 1;
|
|
4148
|
+
}
|
|
4149
|
+
|
|
4150
|
+
/**
|
|
4151
|
+
* Remove an interceptor from the stack
|
|
4152
|
+
*
|
|
4153
|
+
* @param {Number} id The ID that was returned by `use`
|
|
4154
|
+
*
|
|
4155
|
+
* @returns {void}
|
|
4156
|
+
*/
|
|
4157
|
+
eject(id) {
|
|
4158
|
+
if (this.handlers[id]) {
|
|
4159
|
+
this.handlers[id] = null;
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4042
4162
|
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4163
|
+
/**
|
|
4164
|
+
* Clear all interceptors from the stack
|
|
4165
|
+
*
|
|
4166
|
+
* @returns {void}
|
|
4167
|
+
*/
|
|
4168
|
+
clear() {
|
|
4169
|
+
if (this.handlers) {
|
|
4170
|
+
this.handlers = [];
|
|
4171
|
+
}
|
|
4172
|
+
}
|
|
4046
4173
|
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4174
|
+
/**
|
|
4175
|
+
* Iterate over all the registered interceptors
|
|
4176
|
+
*
|
|
4177
|
+
* This method is particularly useful for skipping over any
|
|
4178
|
+
* interceptors that may have become `null` calling `eject`.
|
|
4179
|
+
*
|
|
4180
|
+
* @param {Function} fn The function to call for each interceptor
|
|
4181
|
+
*
|
|
4182
|
+
* @returns {void}
|
|
4183
|
+
*/
|
|
4184
|
+
forEach(fn) {
|
|
4185
|
+
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
4186
|
+
if (h !== null) {
|
|
4187
|
+
fn(h);
|
|
4055
4188
|
}
|
|
4056
4189
|
});
|
|
4190
|
+
}
|
|
4191
|
+
}
|
|
4057
4192
|
|
|
4058
|
-
|
|
4193
|
+
/* harmony default export */ const core_InterceptorManager = (InterceptorManager);
|
|
4194
|
+
|
|
4195
|
+
;// ../../../node_modules/axios/lib/defaults/transitional.js
|
|
4196
|
+
|
|
4197
|
+
|
|
4198
|
+
/* harmony default export */ const defaults_transitional = ({
|
|
4199
|
+
silentJSONParsing: true,
|
|
4200
|
+
forcedJSONParsing: true,
|
|
4201
|
+
clarifyTimeoutError: false,
|
|
4202
|
+
legacyInterceptorReqResOrdering: true,
|
|
4203
|
+
advertiseZstdAcceptEncoding: false,
|
|
4059
4204
|
});
|
|
4060
4205
|
|
|
4061
|
-
;// ../../../node_modules/axios/lib/
|
|
4206
|
+
;// ../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
|
|
4062
4207
|
|
|
4063
4208
|
|
|
4064
4209
|
|
|
4210
|
+
/* harmony default export */ const classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams);
|
|
4065
4211
|
|
|
4212
|
+
;// ../../../node_modules/axios/lib/platform/browser/classes/FormData.js
|
|
4066
4213
|
|
|
4067
|
-
const $internals = Symbol('internals');
|
|
4068
4214
|
|
|
4069
|
-
const
|
|
4215
|
+
/* harmony default export */ const classes_FormData = (typeof FormData !== 'undefined' ? FormData : null);
|
|
4070
4216
|
|
|
4071
|
-
|
|
4072
|
-
let start = 0;
|
|
4073
|
-
let end = str.length;
|
|
4217
|
+
;// ../../../node_modules/axios/lib/platform/browser/classes/Blob.js
|
|
4074
4218
|
|
|
4075
|
-
while (start < end) {
|
|
4076
|
-
const code = str.charCodeAt(start);
|
|
4077
4219
|
|
|
4078
|
-
|
|
4079
|
-
break;
|
|
4080
|
-
}
|
|
4220
|
+
/* harmony default export */ const classes_Blob = (typeof Blob !== 'undefined' ? Blob : null);
|
|
4081
4221
|
|
|
4082
|
-
|
|
4083
|
-
}
|
|
4222
|
+
;// ../../../node_modules/axios/lib/platform/browser/index.js
|
|
4084
4223
|
|
|
4085
|
-
while (end > start) {
|
|
4086
|
-
const code = str.charCodeAt(end - 1);
|
|
4087
4224
|
|
|
4088
|
-
if (code !== 0x09 && code !== 0x20) {
|
|
4089
|
-
break;
|
|
4090
|
-
}
|
|
4091
4225
|
|
|
4092
|
-
end -= 1;
|
|
4093
|
-
}
|
|
4094
4226
|
|
|
4095
|
-
|
|
4096
|
-
|
|
4227
|
+
/* harmony default export */ const browser = ({
|
|
4228
|
+
isBrowser: true,
|
|
4229
|
+
classes: {
|
|
4230
|
+
URLSearchParams: classes_URLSearchParams,
|
|
4231
|
+
FormData: classes_FormData,
|
|
4232
|
+
Blob: classes_Blob,
|
|
4233
|
+
},
|
|
4234
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
4235
|
+
});
|
|
4097
4236
|
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
}
|
|
4237
|
+
;// ../../../node_modules/axios/lib/platform/common/utils.js
|
|
4238
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
4101
4239
|
|
|
4102
|
-
|
|
4103
|
-
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
4104
|
-
}
|
|
4240
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
4105
4241
|
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4242
|
+
/**
|
|
4243
|
+
* Determine if we're running in a standard browser environment
|
|
4244
|
+
*
|
|
4245
|
+
* This allows axios to run in a web worker, and react-native.
|
|
4246
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
4247
|
+
*
|
|
4248
|
+
* web workers:
|
|
4249
|
+
* typeof window -> undefined
|
|
4250
|
+
* typeof document -> undefined
|
|
4251
|
+
*
|
|
4252
|
+
* react-native:
|
|
4253
|
+
* navigator.product -> 'ReactNative'
|
|
4254
|
+
* nativescript
|
|
4255
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
4256
|
+
*
|
|
4257
|
+
* @returns {boolean}
|
|
4258
|
+
*/
|
|
4259
|
+
const hasStandardBrowserEnv =
|
|
4260
|
+
hasBrowserEnv &&
|
|
4261
|
+
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
4110
4262
|
|
|
4111
|
-
|
|
4112
|
-
|
|
4263
|
+
/**
|
|
4264
|
+
* Determine if we're running in a standard browser webWorker environment
|
|
4265
|
+
*
|
|
4266
|
+
* Although the `isStandardBrowserEnv` method indicates that
|
|
4267
|
+
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
4268
|
+
* filtered out due to its judgment standard
|
|
4269
|
+
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
4270
|
+
* This leads to a problem when axios post `FormData` in webWorker
|
|
4271
|
+
*/
|
|
4272
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
4273
|
+
return (
|
|
4274
|
+
typeof WorkerGlobalScope !== 'undefined' &&
|
|
4275
|
+
// eslint-disable-next-line no-undef
|
|
4276
|
+
self instanceof WorkerGlobalScope &&
|
|
4277
|
+
typeof self.importScripts === 'function'
|
|
4278
|
+
);
|
|
4279
|
+
})();
|
|
4113
4280
|
|
|
4114
|
-
|
|
4115
|
-
const tokens = Object.create(null);
|
|
4116
|
-
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
4117
|
-
let match;
|
|
4281
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
4118
4282
|
|
|
4119
|
-
while ((match = tokensRE.exec(str))) {
|
|
4120
|
-
tokens[match[1]] = match[2];
|
|
4121
|
-
}
|
|
4122
4283
|
|
|
4123
|
-
return tokens;
|
|
4124
|
-
}
|
|
4125
4284
|
|
|
4126
|
-
|
|
4285
|
+
;// ../../../node_modules/axios/lib/platform/index.js
|
|
4127
4286
|
|
|
4128
|
-
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
4129
|
-
if (utils.isFunction(filter)) {
|
|
4130
|
-
return filter.call(this, value, header);
|
|
4131
|
-
}
|
|
4132
4287
|
|
|
4133
|
-
if (isHeaderNameFilter) {
|
|
4134
|
-
value = header;
|
|
4135
|
-
}
|
|
4136
4288
|
|
|
4137
|
-
|
|
4289
|
+
/* harmony default export */ const platform = ({
|
|
4290
|
+
...common_utils_namespaceObject,
|
|
4291
|
+
...browser,
|
|
4292
|
+
});
|
|
4138
4293
|
|
|
4139
|
-
|
|
4140
|
-
return value.indexOf(filter) !== -1;
|
|
4141
|
-
}
|
|
4294
|
+
;// ../../../node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
4142
4295
|
|
|
4143
|
-
if (utils.isRegExp(filter)) {
|
|
4144
|
-
return filter.test(value);
|
|
4145
|
-
}
|
|
4146
|
-
}
|
|
4147
4296
|
|
|
4148
|
-
function formatHeader(header) {
|
|
4149
|
-
return header
|
|
4150
|
-
.trim()
|
|
4151
|
-
.toLowerCase()
|
|
4152
|
-
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
4153
|
-
return char.toUpperCase() + str;
|
|
4154
|
-
});
|
|
4155
|
-
}
|
|
4156
4297
|
|
|
4157
|
-
function buildAccessors(obj, header) {
|
|
4158
|
-
const accessorName = utils.toCamelCase(' ' + header);
|
|
4159
4298
|
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4299
|
+
|
|
4300
|
+
|
|
4301
|
+
function toURLEncodedForm(data, options) {
|
|
4302
|
+
return helpers_toFormData(data, new platform.classes.URLSearchParams(), {
|
|
4303
|
+
visitor: function (value, key, path, helpers) {
|
|
4304
|
+
if (platform.isNode && utils.isBuffer(value)) {
|
|
4305
|
+
this.append(key, value.toString('base64'));
|
|
4306
|
+
return false;
|
|
4307
|
+
}
|
|
4308
|
+
|
|
4309
|
+
return helpers.defaultVisitor.apply(this, arguments);
|
|
4310
|
+
},
|
|
4311
|
+
...options,
|
|
4167
4312
|
});
|
|
4168
4313
|
}
|
|
4169
4314
|
|
|
4170
|
-
|
|
4171
|
-
constructor(headers) {
|
|
4172
|
-
headers && this.set(headers);
|
|
4173
|
-
}
|
|
4315
|
+
;// ../../../node_modules/axios/lib/helpers/formDataToJSON.js
|
|
4174
4316
|
|
|
4175
|
-
set(header, valueOrRewrite, rewrite) {
|
|
4176
|
-
const self = this;
|
|
4177
4317
|
|
|
4178
|
-
function setHeader(_value, _header, _rewrite) {
|
|
4179
|
-
const lHeader = normalizeHeader(_header);
|
|
4180
4318
|
|
|
4181
|
-
if (!lHeader) {
|
|
4182
|
-
throw new Error('header name must be a non-empty string');
|
|
4183
|
-
}
|
|
4184
4319
|
|
|
4185
|
-
|
|
4320
|
+
/**
|
|
4321
|
+
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
4322
|
+
*
|
|
4323
|
+
* @param {string} name - The name of the property to get.
|
|
4324
|
+
*
|
|
4325
|
+
* @returns An array of strings.
|
|
4326
|
+
*/
|
|
4327
|
+
function parsePropPath(name) {
|
|
4328
|
+
// foo[x][y][z]
|
|
4329
|
+
// foo.x.y.z
|
|
4330
|
+
// foo-x-y-z
|
|
4331
|
+
// foo x y z
|
|
4332
|
+
return utils.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
4333
|
+
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
4334
|
+
});
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
/**
|
|
4338
|
+
* Convert an array to an object.
|
|
4339
|
+
*
|
|
4340
|
+
* @param {Array<any>} arr - The array to convert to an object.
|
|
4341
|
+
*
|
|
4342
|
+
* @returns An object with the same keys and values as the array.
|
|
4343
|
+
*/
|
|
4344
|
+
function arrayToObject(arr) {
|
|
4345
|
+
const obj = {};
|
|
4346
|
+
const keys = Object.keys(arr);
|
|
4347
|
+
let i;
|
|
4348
|
+
const len = keys.length;
|
|
4349
|
+
let key;
|
|
4350
|
+
for (i = 0; i < len; i++) {
|
|
4351
|
+
key = keys[i];
|
|
4352
|
+
obj[key] = arr[key];
|
|
4353
|
+
}
|
|
4354
|
+
return obj;
|
|
4355
|
+
}
|
|
4356
|
+
|
|
4357
|
+
/**
|
|
4358
|
+
* It takes a FormData object and returns a JavaScript object
|
|
4359
|
+
*
|
|
4360
|
+
* @param {string} formData The FormData object to convert to JSON.
|
|
4361
|
+
*
|
|
4362
|
+
* @returns {Object<string, any> | null} The converted object.
|
|
4363
|
+
*/
|
|
4364
|
+
function formDataToJSON(formData) {
|
|
4365
|
+
function buildPath(path, value, target, index) {
|
|
4366
|
+
let name = path[index++];
|
|
4367
|
+
|
|
4368
|
+
if (name === '__proto__') return true;
|
|
4186
4369
|
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
) {
|
|
4193
|
-
|
|
4370
|
+
const isNumericKey = Number.isFinite(+name);
|
|
4371
|
+
const isLast = index >= path.length;
|
|
4372
|
+
name = !name && utils.isArray(target) ? target.length : name;
|
|
4373
|
+
|
|
4374
|
+
if (isLast) {
|
|
4375
|
+
if (utils.hasOwnProp(target, name)) {
|
|
4376
|
+
target[name] = utils.isArray(target[name])
|
|
4377
|
+
? target[name].concat(value)
|
|
4378
|
+
: [target[name], value];
|
|
4379
|
+
} else {
|
|
4380
|
+
target[name] = value;
|
|
4194
4381
|
}
|
|
4195
|
-
}
|
|
4196
4382
|
|
|
4197
|
-
|
|
4198
|
-
|
|
4383
|
+
return !isNumericKey;
|
|
4384
|
+
}
|
|
4199
4385
|
|
|
4200
|
-
if (utils.
|
|
4201
|
-
|
|
4202
|
-
}
|
|
4203
|
-
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
4204
|
-
} else if (utils.isObject(header) && utils.isIterable(header)) {
|
|
4205
|
-
let obj = {},
|
|
4206
|
-
dest,
|
|
4207
|
-
key;
|
|
4208
|
-
for (const entry of header) {
|
|
4209
|
-
if (!utils.isArray(entry)) {
|
|
4210
|
-
throw TypeError('Object iterator must return a key-value pair');
|
|
4211
|
-
}
|
|
4386
|
+
if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) {
|
|
4387
|
+
target[name] = [];
|
|
4388
|
+
}
|
|
4212
4389
|
|
|
4213
|
-
|
|
4214
|
-
? utils.isArray(dest)
|
|
4215
|
-
? [...dest, entry[1]]
|
|
4216
|
-
: [dest, entry[1]]
|
|
4217
|
-
: entry[1];
|
|
4218
|
-
}
|
|
4390
|
+
const result = buildPath(path, value, target[name], index);
|
|
4219
4391
|
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
4392
|
+
if (result && utils.isArray(target[name])) {
|
|
4393
|
+
target[name] = arrayToObject(target[name]);
|
|
4223
4394
|
}
|
|
4224
4395
|
|
|
4225
|
-
return
|
|
4396
|
+
return !isNumericKey;
|
|
4226
4397
|
}
|
|
4227
4398
|
|
|
4228
|
-
|
|
4229
|
-
|
|
4399
|
+
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
4400
|
+
const obj = {};
|
|
4230
4401
|
|
|
4231
|
-
|
|
4232
|
-
|
|
4402
|
+
utils.forEachEntry(formData, (name, value) => {
|
|
4403
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
4404
|
+
});
|
|
4233
4405
|
|
|
4234
|
-
|
|
4235
|
-
|
|
4406
|
+
return obj;
|
|
4407
|
+
}
|
|
4236
4408
|
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
}
|
|
4409
|
+
return null;
|
|
4410
|
+
}
|
|
4240
4411
|
|
|
4241
|
-
|
|
4242
|
-
return parseTokens(value);
|
|
4243
|
-
}
|
|
4412
|
+
/* harmony default export */ const helpers_formDataToJSON = (formDataToJSON);
|
|
4244
4413
|
|
|
4245
|
-
|
|
4246
|
-
return parser.call(this, value, key);
|
|
4247
|
-
}
|
|
4414
|
+
;// ../../../node_modules/axios/lib/defaults/index.js
|
|
4248
4415
|
|
|
4249
|
-
if (utils.isRegExp(parser)) {
|
|
4250
|
-
return parser.exec(value);
|
|
4251
|
-
}
|
|
4252
4416
|
|
|
4253
|
-
throw new TypeError('parser must be boolean|regexp|function');
|
|
4254
|
-
}
|
|
4255
|
-
}
|
|
4256
|
-
}
|
|
4257
4417
|
|
|
4258
|
-
has(header, matcher) {
|
|
4259
|
-
header = normalizeHeader(header);
|
|
4260
4418
|
|
|
4261
|
-
if (header) {
|
|
4262
|
-
const key = utils.findKey(this, header);
|
|
4263
4419
|
|
|
4264
|
-
return !!(
|
|
4265
|
-
key &&
|
|
4266
|
-
this[key] !== undefined &&
|
|
4267
|
-
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
4268
|
-
);
|
|
4269
|
-
}
|
|
4270
4420
|
|
|
4271
|
-
return false;
|
|
4272
|
-
}
|
|
4273
4421
|
|
|
4274
|
-
delete(header, matcher) {
|
|
4275
|
-
const self = this;
|
|
4276
|
-
let deleted = false;
|
|
4277
4422
|
|
|
4278
|
-
function deleteHeader(_header) {
|
|
4279
|
-
_header = normalizeHeader(_header);
|
|
4280
4423
|
|
|
4281
|
-
if (_header) {
|
|
4282
|
-
const key = utils.findKey(self, _header);
|
|
4283
4424
|
|
|
4284
|
-
|
|
4285
|
-
delete self[key];
|
|
4425
|
+
const own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
4286
4426
|
|
|
4287
|
-
|
|
4288
|
-
|
|
4427
|
+
/**
|
|
4428
|
+
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
4429
|
+
* of the input
|
|
4430
|
+
*
|
|
4431
|
+
* @param {any} rawValue - The value to be stringified.
|
|
4432
|
+
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
4433
|
+
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
4434
|
+
*
|
|
4435
|
+
* @returns {string} A stringified version of the rawValue.
|
|
4436
|
+
*/
|
|
4437
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
4438
|
+
if (utils.isString(rawValue)) {
|
|
4439
|
+
try {
|
|
4440
|
+
(parser || JSON.parse)(rawValue);
|
|
4441
|
+
return utils.trim(rawValue);
|
|
4442
|
+
} catch (e) {
|
|
4443
|
+
if (e.name !== 'SyntaxError') {
|
|
4444
|
+
throw e;
|
|
4289
4445
|
}
|
|
4290
4446
|
}
|
|
4291
|
-
|
|
4292
|
-
if (utils.isArray(header)) {
|
|
4293
|
-
header.forEach(deleteHeader);
|
|
4294
|
-
} else {
|
|
4295
|
-
deleteHeader(header);
|
|
4296
|
-
}
|
|
4297
|
-
|
|
4298
|
-
return deleted;
|
|
4299
4447
|
}
|
|
4300
4448
|
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
let i = keys.length;
|
|
4304
|
-
let deleted = false;
|
|
4305
|
-
|
|
4306
|
-
while (i--) {
|
|
4307
|
-
const key = keys[i];
|
|
4308
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
4309
|
-
delete this[key];
|
|
4310
|
-
deleted = true;
|
|
4311
|
-
}
|
|
4312
|
-
}
|
|
4449
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
4450
|
+
}
|
|
4313
4451
|
|
|
4314
|
-
|
|
4315
|
-
|
|
4452
|
+
const defaults = {
|
|
4453
|
+
transitional: defaults_transitional,
|
|
4316
4454
|
|
|
4317
|
-
|
|
4318
|
-
const self = this;
|
|
4319
|
-
const headers = {};
|
|
4455
|
+
adapter: ['xhr', 'http', 'fetch'],
|
|
4320
4456
|
|
|
4321
|
-
|
|
4322
|
-
|
|
4457
|
+
transformRequest: [
|
|
4458
|
+
function transformRequest(data, headers) {
|
|
4459
|
+
const contentType = headers.getContentType() || '';
|
|
4460
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
4461
|
+
const isObjectPayload = utils.isObject(data);
|
|
4323
4462
|
|
|
4324
|
-
if (
|
|
4325
|
-
|
|
4326
|
-
delete self[header];
|
|
4327
|
-
return;
|
|
4463
|
+
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
4464
|
+
data = new FormData(data);
|
|
4328
4465
|
}
|
|
4329
4466
|
|
|
4330
|
-
const
|
|
4467
|
+
const isFormData = utils.isFormData(data);
|
|
4331
4468
|
|
|
4332
|
-
if (
|
|
4333
|
-
|
|
4469
|
+
if (isFormData) {
|
|
4470
|
+
return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
|
|
4334
4471
|
}
|
|
4335
4472
|
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
value !== false &&
|
|
4354
|
-
(obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
4355
|
-
});
|
|
4473
|
+
if (
|
|
4474
|
+
utils.isArrayBuffer(data) ||
|
|
4475
|
+
utils.isBuffer(data) ||
|
|
4476
|
+
utils.isStream(data) ||
|
|
4477
|
+
utils.isFile(data) ||
|
|
4478
|
+
utils.isBlob(data) ||
|
|
4479
|
+
utils.isReadableStream(data)
|
|
4480
|
+
) {
|
|
4481
|
+
return data;
|
|
4482
|
+
}
|
|
4483
|
+
if (utils.isArrayBufferView(data)) {
|
|
4484
|
+
return data.buffer;
|
|
4485
|
+
}
|
|
4486
|
+
if (utils.isURLSearchParams(data)) {
|
|
4487
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
4488
|
+
return data.toString();
|
|
4489
|
+
}
|
|
4356
4490
|
|
|
4357
|
-
|
|
4358
|
-
}
|
|
4491
|
+
let isFileList;
|
|
4359
4492
|
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4493
|
+
if (isObjectPayload) {
|
|
4494
|
+
const formSerializer = own(this, 'formSerializer');
|
|
4495
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
4496
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
4497
|
+
}
|
|
4363
4498
|
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4499
|
+
if (
|
|
4500
|
+
(isFileList = utils.isFileList(data)) ||
|
|
4501
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
4502
|
+
) {
|
|
4503
|
+
const env = own(this, 'env');
|
|
4504
|
+
const _FormData = env && env.FormData;
|
|
4369
4505
|
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4506
|
+
return helpers_toFormData(
|
|
4507
|
+
isFileList ? { 'files[]': data } : data,
|
|
4508
|
+
_FormData && new _FormData(),
|
|
4509
|
+
formSerializer
|
|
4510
|
+
);
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4373
4513
|
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4514
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
4515
|
+
headers.setContentType('application/json', false);
|
|
4516
|
+
return stringifySafely(data);
|
|
4517
|
+
}
|
|
4377
4518
|
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4519
|
+
return data;
|
|
4520
|
+
},
|
|
4521
|
+
],
|
|
4381
4522
|
|
|
4382
|
-
|
|
4383
|
-
|
|
4523
|
+
transformResponse: [
|
|
4524
|
+
function transformResponse(data) {
|
|
4525
|
+
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
4526
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
4527
|
+
const responseType = own(this, 'responseType');
|
|
4528
|
+
const JSONRequested = responseType === 'json';
|
|
4384
4529
|
|
|
4385
|
-
|
|
4530
|
+
if (utils.isResponse(data) || utils.isReadableStream(data)) {
|
|
4531
|
+
return data;
|
|
4532
|
+
}
|
|
4386
4533
|
|
|
4387
|
-
|
|
4388
|
-
|
|
4534
|
+
if (
|
|
4535
|
+
data &&
|
|
4536
|
+
utils.isString(data) &&
|
|
4537
|
+
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
4538
|
+
) {
|
|
4539
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
4540
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
4389
4541
|
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4542
|
+
try {
|
|
4543
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
4544
|
+
} catch (e) {
|
|
4545
|
+
if (strictJSONParsing) {
|
|
4546
|
+
if (e.name === 'SyntaxError') {
|
|
4547
|
+
throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
4548
|
+
}
|
|
4549
|
+
throw e;
|
|
4550
|
+
}
|
|
4551
|
+
}
|
|
4552
|
+
}
|
|
4397
4553
|
|
|
4398
|
-
|
|
4399
|
-
|
|
4554
|
+
return data;
|
|
4555
|
+
},
|
|
4556
|
+
],
|
|
4400
4557
|
|
|
4401
|
-
|
|
4402
|
-
|
|
4558
|
+
/**
|
|
4559
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
4560
|
+
* timeout is not created.
|
|
4561
|
+
*/
|
|
4562
|
+
timeout: 0,
|
|
4403
4563
|
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
accessors[lHeader] = true;
|
|
4407
|
-
}
|
|
4408
|
-
}
|
|
4564
|
+
xsrfCookieName: 'XSRF-TOKEN',
|
|
4565
|
+
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
4409
4566
|
|
|
4410
|
-
|
|
4567
|
+
maxContentLength: -1,
|
|
4568
|
+
maxBodyLength: -1,
|
|
4411
4569
|
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4570
|
+
env: {
|
|
4571
|
+
FormData: platform.classes.FormData,
|
|
4572
|
+
Blob: platform.classes.Blob,
|
|
4573
|
+
},
|
|
4415
4574
|
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
'Accept',
|
|
4420
|
-
'Accept-Encoding',
|
|
4421
|
-
'User-Agent',
|
|
4422
|
-
'Authorization',
|
|
4423
|
-
]);
|
|
4575
|
+
validateStatus: function validateStatus(status) {
|
|
4576
|
+
return status >= 200 && status < 300;
|
|
4577
|
+
},
|
|
4424
4578
|
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
get: () => value,
|
|
4430
|
-
set(headerValue) {
|
|
4431
|
-
this[mapped] = headerValue;
|
|
4579
|
+
headers: {
|
|
4580
|
+
common: {
|
|
4581
|
+
Accept: 'application/json, text/plain, */*',
|
|
4582
|
+
'Content-Type': undefined,
|
|
4432
4583
|
},
|
|
4433
|
-
}
|
|
4434
|
-
}
|
|
4584
|
+
},
|
|
4585
|
+
};
|
|
4435
4586
|
|
|
4436
|
-
utils.
|
|
4587
|
+
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
|
|
4588
|
+
defaults.headers[method] = {};
|
|
4589
|
+
});
|
|
4437
4590
|
|
|
4438
|
-
/* harmony default export */ const
|
|
4591
|
+
/* harmony default export */ const lib_defaults = (defaults);
|
|
4439
4592
|
|
|
4440
4593
|
;// ../../../node_modules/axios/lib/core/transformData.js
|
|
4441
4594
|
|
|
@@ -4517,17 +4670,13 @@ function settle(resolve, reject, response) {
|
|
|
4517
4670
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
4518
4671
|
resolve(response);
|
|
4519
4672
|
} else {
|
|
4520
|
-
reject(
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
response.request,
|
|
4528
|
-
response
|
|
4529
|
-
)
|
|
4530
|
-
);
|
|
4673
|
+
reject(new core_AxiosError(
|
|
4674
|
+
'Request failed with status code ' + response.status,
|
|
4675
|
+
response.status >= 400 && response.status < 500 ? core_AxiosError.ERR_BAD_REQUEST : core_AxiosError.ERR_BAD_RESPONSE,
|
|
4676
|
+
response.config,
|
|
4677
|
+
response.request,
|
|
4678
|
+
response
|
|
4679
|
+
));
|
|
4531
4680
|
}
|
|
4532
4681
|
}
|
|
4533
4682
|
|
|
@@ -4535,7 +4684,7 @@ function settle(resolve, reject, response) {
|
|
|
4535
4684
|
|
|
4536
4685
|
|
|
4537
4686
|
function parseProtocol(url) {
|
|
4538
|
-
const match = /^([-+\w]{1,25})(
|
|
4687
|
+
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
|
|
4539
4688
|
return (match && match[1]) || '';
|
|
4540
4689
|
}
|
|
4541
4690
|
|
|
@@ -4652,6 +4801,9 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
4652
4801
|
const _speedometer = helpers_speedometer(50, 250);
|
|
4653
4802
|
|
|
4654
4803
|
return helpers_throttle((e) => {
|
|
4804
|
+
if (!e || typeof e.loaded !== 'number') {
|
|
4805
|
+
return;
|
|
4806
|
+
}
|
|
4655
4807
|
const rawLoaded = e.loaded;
|
|
4656
4808
|
const total = e.lengthComputable ? e.total : undefined;
|
|
4657
4809
|
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
@@ -4746,8 +4898,20 @@ const asyncDecorator =
|
|
|
4746
4898
|
|
|
4747
4899
|
read(name) {
|
|
4748
4900
|
if (typeof document === 'undefined') return null;
|
|
4749
|
-
|
|
4750
|
-
|
|
4901
|
+
// Match name=value by splitting on the semicolon separator instead of building a
|
|
4902
|
+
// RegExp from `name` — interpolating an unescaped string into a RegExp would let
|
|
4903
|
+
// metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
|
|
4904
|
+
// match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
|
|
4905
|
+
// "; ", so ignore optional whitespace before each cookie name.
|
|
4906
|
+
const cookies = document.cookie.split(';');
|
|
4907
|
+
for (let i = 0; i < cookies.length; i++) {
|
|
4908
|
+
const cookie = cookies[i].replace(/^\s+/, '');
|
|
4909
|
+
const eq = cookie.indexOf('=');
|
|
4910
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
4911
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
4912
|
+
}
|
|
4913
|
+
}
|
|
4914
|
+
return null;
|
|
4751
4915
|
},
|
|
4752
4916
|
|
|
4753
4917
|
remove(name) {
|
|
@@ -4847,11 +5011,14 @@ function mergeConfig(config1, config2) {
|
|
|
4847
5011
|
config2 = config2 || {};
|
|
4848
5012
|
|
|
4849
5013
|
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
4850
|
-
// or `config.baseURL` cannot inherit polluted values from Object.prototype
|
|
4851
|
-
//
|
|
4852
|
-
//
|
|
5014
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype.
|
|
5015
|
+
// `hasOwnProperty` is restored as a non-enumerable own slot to preserve
|
|
5016
|
+
// ergonomics for user code that relies on it.
|
|
4853
5017
|
const config = Object.create(null);
|
|
4854
5018
|
Object.defineProperty(config, 'hasOwnProperty', {
|
|
5019
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
5020
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
5021
|
+
__proto__: null,
|
|
4855
5022
|
value: Object.prototype.hasOwnProperty,
|
|
4856
5023
|
enumerable: false,
|
|
4857
5024
|
writable: true,
|
|
@@ -4958,11 +5125,39 @@ function mergeConfig(config1, config2) {
|
|
|
4958
5125
|
|
|
4959
5126
|
|
|
4960
5127
|
|
|
4961
|
-
|
|
5128
|
+
const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
|
|
5129
|
+
|
|
5130
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
5131
|
+
if (policy !== 'content-only') {
|
|
5132
|
+
headers.set(formHeaders);
|
|
5133
|
+
return;
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
5137
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
5138
|
+
headers.set(key, val);
|
|
5139
|
+
}
|
|
5140
|
+
});
|
|
5141
|
+
}
|
|
5142
|
+
|
|
5143
|
+
/**
|
|
5144
|
+
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
5145
|
+
* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
|
|
5146
|
+
*
|
|
5147
|
+
* @param {string} str The string to encode
|
|
5148
|
+
*
|
|
5149
|
+
* @returns {string} UTF-8 bytes as a Latin-1 string
|
|
5150
|
+
*/
|
|
5151
|
+
const encodeUTF8 = (str) =>
|
|
5152
|
+
encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
|
|
5153
|
+
String.fromCharCode(parseInt(hex, 16))
|
|
5154
|
+
);
|
|
5155
|
+
|
|
5156
|
+
function resolveConfig(config) {
|
|
4962
5157
|
const newConfig = mergeConfig({}, config);
|
|
4963
5158
|
|
|
4964
5159
|
// Read only own properties to prevent prototype pollution gadgets
|
|
4965
|
-
// (e.g. Object.prototype.baseURL = 'https://evil.com').
|
|
5160
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com').
|
|
4966
5161
|
const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
4967
5162
|
|
|
4968
5163
|
const data = own('data');
|
|
@@ -4979,8 +5174,8 @@ function mergeConfig(config1, config2) {
|
|
|
4979
5174
|
|
|
4980
5175
|
newConfig.url = buildURL(
|
|
4981
5176
|
buildFullPath(baseURL, url, allowAbsoluteUrls),
|
|
4982
|
-
|
|
4983
|
-
|
|
5177
|
+
own('params'),
|
|
5178
|
+
own('paramsSerializer')
|
|
4984
5179
|
);
|
|
4985
5180
|
|
|
4986
5181
|
// HTTP basic authentication
|
|
@@ -4988,27 +5183,20 @@ function mergeConfig(config1, config2) {
|
|
|
4988
5183
|
headers.set(
|
|
4989
5184
|
'Authorization',
|
|
4990
5185
|
'Basic ' +
|
|
4991
|
-
btoa(
|
|
4992
|
-
(auth.username || '') +
|
|
4993
|
-
':' +
|
|
4994
|
-
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
4995
|
-
)
|
|
5186
|
+
btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
|
|
4996
5187
|
);
|
|
4997
5188
|
}
|
|
4998
5189
|
|
|
4999
5190
|
if (utils.isFormData(data)) {
|
|
5000
|
-
if (
|
|
5001
|
-
|
|
5191
|
+
if (
|
|
5192
|
+
platform.hasStandardBrowserEnv ||
|
|
5193
|
+
platform.hasStandardBrowserWebWorkerEnv ||
|
|
5194
|
+
utils.isReactNative(data)
|
|
5195
|
+
) {
|
|
5196
|
+
headers.setContentType(undefined); // browser/web worker/RN handles it
|
|
5002
5197
|
} else if (utils.isFunction(data.getHeaders)) {
|
|
5003
5198
|
// Node.js FormData (like form-data package)
|
|
5004
|
-
|
|
5005
|
-
// Only set safe headers to avoid overwriting security headers
|
|
5006
|
-
const allowedHeaders = ['content-type', 'content-length'];
|
|
5007
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
5008
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
5009
|
-
headers.set(key, val);
|
|
5010
|
-
}
|
|
5011
|
-
});
|
|
5199
|
+
setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
|
|
5012
5200
|
}
|
|
5013
5201
|
}
|
|
5014
5202
|
|
|
@@ -5023,10 +5211,9 @@ function mergeConfig(config1, config2) {
|
|
|
5023
5211
|
|
|
5024
5212
|
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
5025
5213
|
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
5026
|
-
// the XSRF token cross-origin.
|
|
5214
|
+
// the XSRF token cross-origin.
|
|
5027
5215
|
const shouldSendXSRF =
|
|
5028
|
-
withXSRFToken === true ||
|
|
5029
|
-
(withXSRFToken == null && isURLSameOrigin(newConfig.url));
|
|
5216
|
+
withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));
|
|
5030
5217
|
|
|
5031
5218
|
if (shouldSendXSRF) {
|
|
5032
5219
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
@@ -5038,7 +5225,9 @@ function mergeConfig(config1, config2) {
|
|
|
5038
5225
|
}
|
|
5039
5226
|
|
|
5040
5227
|
return newConfig;
|
|
5041
|
-
}
|
|
5228
|
+
}
|
|
5229
|
+
|
|
5230
|
+
/* harmony default export */ const helpers_resolveConfig = (resolveConfig);
|
|
5042
5231
|
|
|
5043
5232
|
;// ../../../node_modules/axios/lib/adapters/xhr.js
|
|
5044
5233
|
|
|
@@ -5052,12 +5241,13 @@ function mergeConfig(config1, config2) {
|
|
|
5052
5241
|
|
|
5053
5242
|
|
|
5054
5243
|
|
|
5244
|
+
|
|
5055
5245
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
5056
5246
|
|
|
5057
5247
|
/* harmony default export */ const xhr = (isXHRAdapterSupported &&
|
|
5058
5248
|
function (config) {
|
|
5059
5249
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
5060
|
-
const _config =
|
|
5250
|
+
const _config = helpers_resolveConfig(config);
|
|
5061
5251
|
let requestData = _config.data;
|
|
5062
5252
|
const requestHeaders = core_AxiosHeaders.from(_config.headers).normalize();
|
|
5063
5253
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
@@ -5134,7 +5324,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5134
5324
|
// will return status as 0 even though it's a successful request
|
|
5135
5325
|
if (
|
|
5136
5326
|
request.status === 0 &&
|
|
5137
|
-
!(request.responseURL && request.responseURL.
|
|
5327
|
+
!(request.responseURL && request.responseURL.startsWith('file:'))
|
|
5138
5328
|
) {
|
|
5139
5329
|
return;
|
|
5140
5330
|
}
|
|
@@ -5151,6 +5341,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5151
5341
|
}
|
|
5152
5342
|
|
|
5153
5343
|
reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
|
|
5344
|
+
done();
|
|
5154
5345
|
|
|
5155
5346
|
// Clean up request
|
|
5156
5347
|
request = null;
|
|
@@ -5166,6 +5357,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5166
5357
|
// attach the underlying event for consumers who want details
|
|
5167
5358
|
err.event = event || null;
|
|
5168
5359
|
reject(err);
|
|
5360
|
+
done();
|
|
5169
5361
|
request = null;
|
|
5170
5362
|
};
|
|
5171
5363
|
|
|
@@ -5186,6 +5378,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5186
5378
|
request
|
|
5187
5379
|
)
|
|
5188
5380
|
);
|
|
5381
|
+
done();
|
|
5189
5382
|
|
|
5190
5383
|
// Clean up request
|
|
5191
5384
|
request = null;
|
|
@@ -5196,7 +5389,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5196
5389
|
|
|
5197
5390
|
// Add headers to the request
|
|
5198
5391
|
if ('setRequestHeader' in request) {
|
|
5199
|
-
utils.forEach(requestHeaders
|
|
5392
|
+
utils.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
5200
5393
|
request.setRequestHeader(key, val);
|
|
5201
5394
|
});
|
|
5202
5395
|
}
|
|
@@ -5235,6 +5428,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5235
5428
|
}
|
|
5236
5429
|
reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
|
|
5237
5430
|
request.abort();
|
|
5431
|
+
done();
|
|
5238
5432
|
request = null;
|
|
5239
5433
|
};
|
|
5240
5434
|
|
|
@@ -5248,7 +5442,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5248
5442
|
|
|
5249
5443
|
const protocol = parseProtocol(_config.url);
|
|
5250
5444
|
|
|
5251
|
-
if (protocol && platform.protocols.
|
|
5445
|
+
if (protocol && !platform.protocols.includes(protocol)) {
|
|
5252
5446
|
reject(
|
|
5253
5447
|
new core_AxiosError(
|
|
5254
5448
|
'Unsupported protocol ' + protocol + ':',
|
|
@@ -5270,54 +5464,55 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
5270
5464
|
|
|
5271
5465
|
|
|
5272
5466
|
const composeSignals = (signals, timeout) => {
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
if (timeout || length) {
|
|
5276
|
-
let controller = new AbortController();
|
|
5277
|
-
|
|
5278
|
-
let aborted;
|
|
5279
|
-
|
|
5280
|
-
const onabort = function (reason) {
|
|
5281
|
-
if (!aborted) {
|
|
5282
|
-
aborted = true;
|
|
5283
|
-
unsubscribe();
|
|
5284
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
5285
|
-
controller.abort(
|
|
5286
|
-
err instanceof core_AxiosError
|
|
5287
|
-
? err
|
|
5288
|
-
: new cancel_CanceledError(err instanceof Error ? err.message : err)
|
|
5289
|
-
);
|
|
5290
|
-
}
|
|
5291
|
-
};
|
|
5467
|
+
signals = signals ? signals.filter(Boolean) : [];
|
|
5292
5468
|
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
timer = null;
|
|
5297
|
-
onabort(new core_AxiosError(`timeout of ${timeout}ms exceeded`, core_AxiosError.ETIMEDOUT));
|
|
5298
|
-
}, timeout);
|
|
5299
|
-
|
|
5300
|
-
const unsubscribe = () => {
|
|
5301
|
-
if (signals) {
|
|
5302
|
-
timer && clearTimeout(timer);
|
|
5303
|
-
timer = null;
|
|
5304
|
-
signals.forEach((signal) => {
|
|
5305
|
-
signal.unsubscribe
|
|
5306
|
-
? signal.unsubscribe(onabort)
|
|
5307
|
-
: signal.removeEventListener('abort', onabort);
|
|
5308
|
-
});
|
|
5309
|
-
signals = null;
|
|
5310
|
-
}
|
|
5311
|
-
};
|
|
5469
|
+
if (!timeout && !signals.length) {
|
|
5470
|
+
return;
|
|
5471
|
+
}
|
|
5312
5472
|
|
|
5313
|
-
|
|
5473
|
+
const controller = new AbortController();
|
|
5314
5474
|
|
|
5315
|
-
|
|
5475
|
+
let aborted = false;
|
|
5316
5476
|
|
|
5317
|
-
|
|
5477
|
+
const onabort = function (reason) {
|
|
5478
|
+
if (!aborted) {
|
|
5479
|
+
aborted = true;
|
|
5480
|
+
unsubscribe();
|
|
5481
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
5482
|
+
controller.abort(
|
|
5483
|
+
err instanceof core_AxiosError
|
|
5484
|
+
? err
|
|
5485
|
+
: new cancel_CanceledError(err instanceof Error ? err.message : err)
|
|
5486
|
+
);
|
|
5487
|
+
}
|
|
5488
|
+
};
|
|
5318
5489
|
|
|
5319
|
-
|
|
5320
|
-
|
|
5490
|
+
let timer =
|
|
5491
|
+
timeout &&
|
|
5492
|
+
setTimeout(() => {
|
|
5493
|
+
timer = null;
|
|
5494
|
+
onabort(new core_AxiosError(`timeout of ${timeout}ms exceeded`, core_AxiosError.ETIMEDOUT));
|
|
5495
|
+
}, timeout);
|
|
5496
|
+
|
|
5497
|
+
const unsubscribe = () => {
|
|
5498
|
+
if (!signals) { return; }
|
|
5499
|
+
timer && clearTimeout(timer);
|
|
5500
|
+
timer = null;
|
|
5501
|
+
signals.forEach((signal) => {
|
|
5502
|
+
signal.unsubscribe
|
|
5503
|
+
? signal.unsubscribe(onabort)
|
|
5504
|
+
: signal.removeEventListener('abort', onabort);
|
|
5505
|
+
});
|
|
5506
|
+
signals = null;
|
|
5507
|
+
};
|
|
5508
|
+
|
|
5509
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
5510
|
+
|
|
5511
|
+
const { signal } = controller;
|
|
5512
|
+
|
|
5513
|
+
signal.unsubscribe = () => utils.asap(unsubscribe);
|
|
5514
|
+
|
|
5515
|
+
return signal;
|
|
5321
5516
|
};
|
|
5322
5517
|
|
|
5323
5518
|
/* harmony default export */ const helpers_composeSignals = (composeSignals);
|
|
@@ -5413,6 +5608,111 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
5413
5608
|
);
|
|
5414
5609
|
};
|
|
5415
5610
|
|
|
5611
|
+
;// ../../../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
5612
|
+
/* provided dependency */ var estimateDataURLDecodedBytes_Buffer = __webpack_require__(81429)["hp"];
|
|
5613
|
+
/**
|
|
5614
|
+
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
5615
|
+
* - For base64: compute exact decoded size using length and padding;
|
|
5616
|
+
* handle %XX at the character-count level (no string allocation).
|
|
5617
|
+
* - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
|
|
5618
|
+
*
|
|
5619
|
+
* @param {string} url
|
|
5620
|
+
* @returns {number}
|
|
5621
|
+
*/
|
|
5622
|
+
function estimateDataURLDecodedBytes(url) {
|
|
5623
|
+
if (!url || typeof url !== 'string') return 0;
|
|
5624
|
+
if (!url.startsWith('data:')) return 0;
|
|
5625
|
+
|
|
5626
|
+
const comma = url.indexOf(',');
|
|
5627
|
+
if (comma < 0) return 0;
|
|
5628
|
+
|
|
5629
|
+
const meta = url.slice(5, comma);
|
|
5630
|
+
const body = url.slice(comma + 1);
|
|
5631
|
+
const isBase64 = /;base64/i.test(meta);
|
|
5632
|
+
|
|
5633
|
+
if (isBase64) {
|
|
5634
|
+
let effectiveLen = body.length;
|
|
5635
|
+
const len = body.length; // cache length
|
|
5636
|
+
|
|
5637
|
+
for (let i = 0; i < len; i++) {
|
|
5638
|
+
if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
|
|
5639
|
+
const a = body.charCodeAt(i + 1);
|
|
5640
|
+
const b = body.charCodeAt(i + 2);
|
|
5641
|
+
const isHex =
|
|
5642
|
+
((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
|
|
5643
|
+
((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
|
|
5644
|
+
|
|
5645
|
+
if (isHex) {
|
|
5646
|
+
effectiveLen -= 2;
|
|
5647
|
+
i += 2;
|
|
5648
|
+
}
|
|
5649
|
+
}
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5652
|
+
let pad = 0;
|
|
5653
|
+
let idx = len - 1;
|
|
5654
|
+
|
|
5655
|
+
const tailIsPct3D = (j) =>
|
|
5656
|
+
j >= 2 &&
|
|
5657
|
+
body.charCodeAt(j - 2) === 37 && // '%'
|
|
5658
|
+
body.charCodeAt(j - 1) === 51 && // '3'
|
|
5659
|
+
(body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
|
|
5660
|
+
|
|
5661
|
+
if (idx >= 0) {
|
|
5662
|
+
if (body.charCodeAt(idx) === 61 /* '=' */) {
|
|
5663
|
+
pad++;
|
|
5664
|
+
idx--;
|
|
5665
|
+
} else if (tailIsPct3D(idx)) {
|
|
5666
|
+
pad++;
|
|
5667
|
+
idx -= 3;
|
|
5668
|
+
}
|
|
5669
|
+
}
|
|
5670
|
+
|
|
5671
|
+
if (pad === 1 && idx >= 0) {
|
|
5672
|
+
if (body.charCodeAt(idx) === 61 /* '=' */) {
|
|
5673
|
+
pad++;
|
|
5674
|
+
} else if (tailIsPct3D(idx)) {
|
|
5675
|
+
pad++;
|
|
5676
|
+
}
|
|
5677
|
+
}
|
|
5678
|
+
|
|
5679
|
+
const groups = Math.floor(effectiveLen / 4);
|
|
5680
|
+
const bytes = groups * 3 - (pad || 0);
|
|
5681
|
+
return bytes > 0 ? bytes : 0;
|
|
5682
|
+
}
|
|
5683
|
+
|
|
5684
|
+
if (typeof estimateDataURLDecodedBytes_Buffer !== 'undefined' && typeof estimateDataURLDecodedBytes_Buffer.byteLength === 'function') {
|
|
5685
|
+
return estimateDataURLDecodedBytes_Buffer.byteLength(body, 'utf8');
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5688
|
+
// Compute UTF-8 byte length directly from UTF-16 code units without allocating
|
|
5689
|
+
// a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
|
|
5690
|
+
// Using body.length here would undercount non-ASCII (e.g. '€' is 1 code unit
|
|
5691
|
+
// but 3 UTF-8 bytes).
|
|
5692
|
+
let bytes = 0;
|
|
5693
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
5694
|
+
const c = body.charCodeAt(i);
|
|
5695
|
+
if (c < 0x80) {
|
|
5696
|
+
bytes += 1;
|
|
5697
|
+
} else if (c < 0x800) {
|
|
5698
|
+
bytes += 2;
|
|
5699
|
+
} else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {
|
|
5700
|
+
const next = body.charCodeAt(i + 1);
|
|
5701
|
+
if (next >= 0xdc00 && next <= 0xdfff) {
|
|
5702
|
+
bytes += 4;
|
|
5703
|
+
i++;
|
|
5704
|
+
} else {
|
|
5705
|
+
bytes += 3;
|
|
5706
|
+
}
|
|
5707
|
+
} else {
|
|
5708
|
+
bytes += 3;
|
|
5709
|
+
}
|
|
5710
|
+
}
|
|
5711
|
+
return bytes;
|
|
5712
|
+
}
|
|
5713
|
+
|
|
5714
|
+
;// ../../../node_modules/axios/lib/env/data.js
|
|
5715
|
+
const VERSION = "1.17.0";
|
|
5416
5716
|
;// ../../../node_modules/axios/lib/adapters/fetch.js
|
|
5417
5717
|
|
|
5418
5718
|
|
|
@@ -5424,16 +5724,41 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
5424
5724
|
|
|
5425
5725
|
|
|
5426
5726
|
|
|
5727
|
+
|
|
5728
|
+
|
|
5729
|
+
|
|
5427
5730
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
5428
5731
|
|
|
5429
5732
|
const { isFunction: fetch_isFunction } = utils;
|
|
5430
5733
|
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5734
|
+
/**
|
|
5735
|
+
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
5736
|
+
* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
|
|
5737
|
+
*
|
|
5738
|
+
* @param {string} str The string to encode
|
|
5739
|
+
*
|
|
5740
|
+
* @returns {string} UTF-8 bytes as a Latin-1 string
|
|
5741
|
+
*/
|
|
5742
|
+
const fetch_encodeUTF8 = (str) =>
|
|
5743
|
+
encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
|
|
5744
|
+
String.fromCharCode(parseInt(hex, 16))
|
|
5745
|
+
);
|
|
5746
|
+
|
|
5747
|
+
// Node's WHATWG URL parser returns `username` and `password` percent-encoded.
|
|
5748
|
+
// Decode before composing the `auth` option so credentials such as
|
|
5749
|
+
// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
|
|
5750
|
+
// original value for malformed input so a bad encoding never throws.
|
|
5751
|
+
const decodeURIComponentSafe = (value) => {
|
|
5752
|
+
if (!utils.isString(value)) {
|
|
5753
|
+
return value;
|
|
5754
|
+
}
|
|
5435
5755
|
|
|
5436
|
-
|
|
5756
|
+
try {
|
|
5757
|
+
return decodeURIComponent(value);
|
|
5758
|
+
} catch (error) {
|
|
5759
|
+
return value;
|
|
5760
|
+
}
|
|
5761
|
+
};
|
|
5437
5762
|
|
|
5438
5763
|
const test = (fn, ...args) => {
|
|
5439
5764
|
try {
|
|
@@ -5443,12 +5768,30 @@ const test = (fn, ...args) => {
|
|
|
5443
5768
|
}
|
|
5444
5769
|
};
|
|
5445
5770
|
|
|
5771
|
+
const maybeWithAuthCredentials = (url) => {
|
|
5772
|
+
const protocolIndex = url.indexOf('://');
|
|
5773
|
+
let urlToCheck = url;
|
|
5774
|
+
if (protocolIndex !== -1) {
|
|
5775
|
+
urlToCheck = urlToCheck.slice(protocolIndex + 3);
|
|
5776
|
+
}
|
|
5777
|
+
return urlToCheck.includes('@') || urlToCheck.includes(':');
|
|
5778
|
+
};
|
|
5779
|
+
|
|
5446
5780
|
const factory = (env) => {
|
|
5781
|
+
const globalObject =
|
|
5782
|
+
utils.global !== undefined && utils.global !== null
|
|
5783
|
+
? utils.global
|
|
5784
|
+
: globalThis;
|
|
5785
|
+
const { ReadableStream, TextEncoder } = globalObject;
|
|
5786
|
+
|
|
5447
5787
|
env = utils.merge.call(
|
|
5448
5788
|
{
|
|
5449
5789
|
skipUndefined: true,
|
|
5450
5790
|
},
|
|
5451
|
-
|
|
5791
|
+
{
|
|
5792
|
+
Request: globalObject.Request,
|
|
5793
|
+
Response: globalObject.Response,
|
|
5794
|
+
},
|
|
5452
5795
|
env
|
|
5453
5796
|
);
|
|
5454
5797
|
|
|
@@ -5461,7 +5804,7 @@ const factory = (env) => {
|
|
|
5461
5804
|
return false;
|
|
5462
5805
|
}
|
|
5463
5806
|
|
|
5464
|
-
const isReadableStreamSupported = isFetchSupported && fetch_isFunction(
|
|
5807
|
+
const isReadableStreamSupported = isFetchSupported && fetch_isFunction(ReadableStream);
|
|
5465
5808
|
|
|
5466
5809
|
const encodeText =
|
|
5467
5810
|
isFetchSupported &&
|
|
@@ -5479,7 +5822,7 @@ const factory = (env) => {
|
|
|
5479
5822
|
let duplexAccessed = false;
|
|
5480
5823
|
|
|
5481
5824
|
const request = new Request(platform.origin, {
|
|
5482
|
-
body: new
|
|
5825
|
+
body: new ReadableStream(),
|
|
5483
5826
|
method: 'POST',
|
|
5484
5827
|
get duplex() {
|
|
5485
5828
|
duplexAccessed = true;
|
|
@@ -5575,7 +5918,13 @@ const factory = (env) => {
|
|
|
5575
5918
|
headers,
|
|
5576
5919
|
withCredentials = 'same-origin',
|
|
5577
5920
|
fetchOptions,
|
|
5578
|
-
|
|
5921
|
+
maxContentLength,
|
|
5922
|
+
maxBodyLength,
|
|
5923
|
+
} = helpers_resolveConfig(config);
|
|
5924
|
+
|
|
5925
|
+
const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;
|
|
5926
|
+
const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
5927
|
+
const own = (key) => (utils.hasOwnProp(config, key) ? config[key] : undefined);
|
|
5579
5928
|
|
|
5580
5929
|
let _fetch = envFetch || fetch;
|
|
5581
5930
|
|
|
@@ -5598,6 +5947,81 @@ const factory = (env) => {
|
|
|
5598
5947
|
let requestContentLength;
|
|
5599
5948
|
|
|
5600
5949
|
try {
|
|
5950
|
+
// HTTP basic authentication
|
|
5951
|
+
let auth = undefined;
|
|
5952
|
+
const configAuth = own('auth');
|
|
5953
|
+
|
|
5954
|
+
if (configAuth) {
|
|
5955
|
+
const username = configAuth.username || '';
|
|
5956
|
+
const password = configAuth.password || '';
|
|
5957
|
+
auth = {
|
|
5958
|
+
username,
|
|
5959
|
+
password
|
|
5960
|
+
};
|
|
5961
|
+
}
|
|
5962
|
+
|
|
5963
|
+
if (maybeWithAuthCredentials(url)) {
|
|
5964
|
+
const parsedURL = new URL(url, platform.origin);
|
|
5965
|
+
|
|
5966
|
+
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
5967
|
+
const urlUsername = decodeURIComponentSafe(parsedURL.username);
|
|
5968
|
+
const urlPassword = decodeURIComponentSafe(parsedURL.password);
|
|
5969
|
+
auth = {
|
|
5970
|
+
username: urlUsername,
|
|
5971
|
+
password: urlPassword
|
|
5972
|
+
};
|
|
5973
|
+
}
|
|
5974
|
+
|
|
5975
|
+
if (parsedURL.username || parsedURL.password) {
|
|
5976
|
+
parsedURL.username = '';
|
|
5977
|
+
parsedURL.password = '';
|
|
5978
|
+
url = parsedURL.href;
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
|
|
5982
|
+
if (auth) {
|
|
5983
|
+
headers.delete('authorization');
|
|
5984
|
+
headers.set(
|
|
5985
|
+
'Authorization',
|
|
5986
|
+
'Basic ' + btoa(fetch_encodeUTF8((auth.username || '') + ':' + (auth.password || '')))
|
|
5987
|
+
);
|
|
5988
|
+
}
|
|
5989
|
+
|
|
5990
|
+
// Enforce maxContentLength for data: URLs up-front so we never materialize
|
|
5991
|
+
// an oversized payload. The HTTP adapter applies the same check (see http.js
|
|
5992
|
+
// "if (protocol === 'data:')" branch).
|
|
5993
|
+
if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {
|
|
5994
|
+
const estimated = estimateDataURLDecodedBytes(url);
|
|
5995
|
+
if (estimated > maxContentLength) {
|
|
5996
|
+
throw new core_AxiosError(
|
|
5997
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
5998
|
+
core_AxiosError.ERR_BAD_RESPONSE,
|
|
5999
|
+
config,
|
|
6000
|
+
request
|
|
6001
|
+
);
|
|
6002
|
+
}
|
|
6003
|
+
}
|
|
6004
|
+
|
|
6005
|
+
// Enforce maxBodyLength against the outbound request body before dispatch.
|
|
6006
|
+
// Mirrors http.js behavior (ERR_BAD_REQUEST / 'Request body larger than
|
|
6007
|
+
// maxBodyLength limit'). Skip when the body length cannot be determined
|
|
6008
|
+
// (e.g. a live ReadableStream supplied by the caller).
|
|
6009
|
+
if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
|
|
6010
|
+
const outboundLength = await resolveBodyLength(headers, data);
|
|
6011
|
+
if (
|
|
6012
|
+
typeof outboundLength === 'number' &&
|
|
6013
|
+
isFinite(outboundLength) &&
|
|
6014
|
+
outboundLength > maxBodyLength
|
|
6015
|
+
) {
|
|
6016
|
+
throw new core_AxiosError(
|
|
6017
|
+
'Request body larger than maxBodyLength limit',
|
|
6018
|
+
core_AxiosError.ERR_BAD_REQUEST,
|
|
6019
|
+
config,
|
|
6020
|
+
request
|
|
6021
|
+
);
|
|
6022
|
+
}
|
|
6023
|
+
}
|
|
6024
|
+
|
|
5601
6025
|
if (
|
|
5602
6026
|
onUploadProgress &&
|
|
5603
6027
|
supportsRequestStream &&
|
|
@@ -5648,11 +6072,14 @@ const factory = (env) => {
|
|
|
5648
6072
|
}
|
|
5649
6073
|
}
|
|
5650
6074
|
|
|
6075
|
+
// Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
|
|
6076
|
+
headers.set('User-Agent', 'axios/' + VERSION, false);
|
|
6077
|
+
|
|
5651
6078
|
const resolvedOptions = {
|
|
5652
6079
|
...fetchOptions,
|
|
5653
6080
|
signal: composedSignal,
|
|
5654
6081
|
method: method.toUpperCase(),
|
|
5655
|
-
headers: headers.normalize()
|
|
6082
|
+
headers: toByteStringHeaderObject(headers.normalize()),
|
|
5656
6083
|
body: data,
|
|
5657
6084
|
duplex: 'half',
|
|
5658
6085
|
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
@@ -5664,10 +6091,28 @@ const factory = (env) => {
|
|
|
5664
6091
|
? _fetch(request, fetchOptions)
|
|
5665
6092
|
: _fetch(url, resolvedOptions));
|
|
5666
6093
|
|
|
6094
|
+
// Cheap pre-check: if the server honestly declares a content-length that
|
|
6095
|
+
// already exceeds the cap, reject before we start streaming.
|
|
6096
|
+
if (hasMaxContentLength) {
|
|
6097
|
+
const declaredLength = utils.toFiniteNumber(response.headers.get('content-length'));
|
|
6098
|
+
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
6099
|
+
throw new core_AxiosError(
|
|
6100
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
6101
|
+
core_AxiosError.ERR_BAD_RESPONSE,
|
|
6102
|
+
config,
|
|
6103
|
+
request
|
|
6104
|
+
);
|
|
6105
|
+
}
|
|
6106
|
+
}
|
|
6107
|
+
|
|
5667
6108
|
const isStreamResponse =
|
|
5668
6109
|
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
5669
6110
|
|
|
5670
|
-
if (
|
|
6111
|
+
if (
|
|
6112
|
+
supportsResponseStream &&
|
|
6113
|
+
response.body &&
|
|
6114
|
+
(onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))
|
|
6115
|
+
) {
|
|
5671
6116
|
const options = {};
|
|
5672
6117
|
|
|
5673
6118
|
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
@@ -5684,8 +6129,24 @@ const factory = (env) => {
|
|
|
5684
6129
|
)) ||
|
|
5685
6130
|
[];
|
|
5686
6131
|
|
|
6132
|
+
let bytesRead = 0;
|
|
6133
|
+
const onChunkProgress = (loadedBytes) => {
|
|
6134
|
+
if (hasMaxContentLength) {
|
|
6135
|
+
bytesRead = loadedBytes;
|
|
6136
|
+
if (bytesRead > maxContentLength) {
|
|
6137
|
+
throw new core_AxiosError(
|
|
6138
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
6139
|
+
core_AxiosError.ERR_BAD_RESPONSE,
|
|
6140
|
+
config,
|
|
6141
|
+
request
|
|
6142
|
+
);
|
|
6143
|
+
}
|
|
6144
|
+
}
|
|
6145
|
+
onProgress && onProgress(loadedBytes);
|
|
6146
|
+
};
|
|
6147
|
+
|
|
5687
6148
|
response = new Response(
|
|
5688
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE,
|
|
6149
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
5689
6150
|
flush && flush();
|
|
5690
6151
|
unsubscribe && unsubscribe();
|
|
5691
6152
|
}),
|
|
@@ -5700,6 +6161,33 @@ const factory = (env) => {
|
|
|
5700
6161
|
config
|
|
5701
6162
|
);
|
|
5702
6163
|
|
|
6164
|
+
// Fallback enforcement for environments without ReadableStream support
|
|
6165
|
+
// (legacy runtimes). Detect materialized size from typed output; skip
|
|
6166
|
+
// streams/Response passthrough since the user will read those themselves.
|
|
6167
|
+
if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
|
|
6168
|
+
let materializedSize;
|
|
6169
|
+
if (responseData != null) {
|
|
6170
|
+
if (typeof responseData.byteLength === 'number') {
|
|
6171
|
+
materializedSize = responseData.byteLength;
|
|
6172
|
+
} else if (typeof responseData.size === 'number') {
|
|
6173
|
+
materializedSize = responseData.size;
|
|
6174
|
+
} else if (typeof responseData === 'string') {
|
|
6175
|
+
materializedSize =
|
|
6176
|
+
typeof TextEncoder === 'function'
|
|
6177
|
+
? new TextEncoder().encode(responseData).byteLength
|
|
6178
|
+
: responseData.length;
|
|
6179
|
+
}
|
|
6180
|
+
}
|
|
6181
|
+
if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {
|
|
6182
|
+
throw new core_AxiosError(
|
|
6183
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
6184
|
+
core_AxiosError.ERR_BAD_RESPONSE,
|
|
6185
|
+
config,
|
|
6186
|
+
request
|
|
6187
|
+
);
|
|
6188
|
+
}
|
|
6189
|
+
}
|
|
6190
|
+
|
|
5703
6191
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
5704
6192
|
|
|
5705
6193
|
return await new Promise((resolve, reject) => {
|
|
@@ -5715,6 +6203,17 @@ const factory = (env) => {
|
|
|
5715
6203
|
} catch (err) {
|
|
5716
6204
|
unsubscribe && unsubscribe();
|
|
5717
6205
|
|
|
6206
|
+
// Safari can surface fetch aborts as a DOMException-like object whose
|
|
6207
|
+
// branded getters throw. Prefer our composed signal reason before reading
|
|
6208
|
+
// the caught error, preserving timeout vs cancellation semantics.
|
|
6209
|
+
if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof core_AxiosError) {
|
|
6210
|
+
const canceledError = composedSignal.reason;
|
|
6211
|
+
canceledError.config = config;
|
|
6212
|
+
request && (canceledError.request = request);
|
|
6213
|
+
err !== canceledError && (canceledError.cause = err);
|
|
6214
|
+
throw canceledError;
|
|
6215
|
+
}
|
|
6216
|
+
|
|
5718
6217
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
5719
6218
|
throw Object.assign(
|
|
5720
6219
|
new core_AxiosError(
|
|
@@ -5792,11 +6291,13 @@ const knownAdapters = {
|
|
|
5792
6291
|
utils.forEach(knownAdapters, (fn, value) => {
|
|
5793
6292
|
if (fn) {
|
|
5794
6293
|
try {
|
|
5795
|
-
Object.
|
|
6294
|
+
// Null-proto descriptors so a polluted Object.prototype.get cannot turn
|
|
6295
|
+
// these data descriptors into accessor descriptors on the way in.
|
|
6296
|
+
Object.defineProperty(fn, 'name', { __proto__: null, value });
|
|
5796
6297
|
} catch (e) {
|
|
5797
6298
|
// eslint-disable-next-line no-empty
|
|
5798
6299
|
}
|
|
5799
|
-
Object.defineProperty(fn, 'adapterName', { value });
|
|
6300
|
+
Object.defineProperty(fn, 'adapterName', { __proto__: null, value });
|
|
5800
6301
|
}
|
|
5801
6302
|
});
|
|
5802
6303
|
|
|
@@ -5948,8 +6449,15 @@ function dispatchRequest(config) {
|
|
|
5948
6449
|
function onAdapterResolution(response) {
|
|
5949
6450
|
throwIfCancellationRequested(config);
|
|
5950
6451
|
|
|
5951
|
-
//
|
|
5952
|
-
|
|
6452
|
+
// Expose the current response on config so that transformResponse can
|
|
6453
|
+
// attach it to any AxiosError it throws (e.g. on JSON parse failure).
|
|
6454
|
+
// We clean it up afterwards to avoid polluting the config object.
|
|
6455
|
+
config.response = response;
|
|
6456
|
+
try {
|
|
6457
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
6458
|
+
} finally {
|
|
6459
|
+
delete config.response;
|
|
6460
|
+
}
|
|
5953
6461
|
|
|
5954
6462
|
response.headers = core_AxiosHeaders.from(response.headers);
|
|
5955
6463
|
|
|
@@ -5961,11 +6469,16 @@ function dispatchRequest(config) {
|
|
|
5961
6469
|
|
|
5962
6470
|
// Transform response data
|
|
5963
6471
|
if (reason && reason.response) {
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
6472
|
+
config.response = reason.response;
|
|
6473
|
+
try {
|
|
6474
|
+
reason.response.data = transformData.call(
|
|
6475
|
+
config,
|
|
6476
|
+
config.transformResponse,
|
|
6477
|
+
reason.response
|
|
6478
|
+
);
|
|
6479
|
+
} finally {
|
|
6480
|
+
delete config.response;
|
|
6481
|
+
}
|
|
5969
6482
|
reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
|
|
5970
6483
|
}
|
|
5971
6484
|
}
|
|
@@ -5975,8 +6488,6 @@ function dispatchRequest(config) {
|
|
|
5975
6488
|
);
|
|
5976
6489
|
}
|
|
5977
6490
|
|
|
5978
|
-
;// ../../../node_modules/axios/lib/env/data.js
|
|
5979
|
-
const VERSION = "1.15.2";
|
|
5980
6491
|
;// ../../../node_modules/axios/lib/helpers/validator.js
|
|
5981
6492
|
|
|
5982
6493
|
|
|
@@ -6067,7 +6578,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
6067
6578
|
while (i-- > 0) {
|
|
6068
6579
|
const opt = keys[i];
|
|
6069
6580
|
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
6070
|
-
// a non-function validator and cause a TypeError.
|
|
6581
|
+
// a non-function validator and cause a TypeError.
|
|
6071
6582
|
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
6072
6583
|
if (validator) {
|
|
6073
6584
|
const value = options[opt];
|
|
@@ -6195,6 +6706,7 @@ class Axios {
|
|
|
6195
6706
|
forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
6196
6707
|
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean),
|
|
6197
6708
|
legacyInterceptorReqResOrdering: Axios_validators.transitional(Axios_validators.boolean),
|
|
6709
|
+
advertiseZstdAcceptEncoding: Axios_validators.transitional(Axios_validators.boolean),
|
|
6198
6710
|
},
|
|
6199
6711
|
false
|
|
6200
6712
|
);
|
|
@@ -6242,7 +6754,7 @@ class Axios {
|
|
|
6242
6754
|
let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
|
|
6243
6755
|
|
|
6244
6756
|
headers &&
|
|
6245
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
6757
|
+
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
|
|
6246
6758
|
delete headers[method];
|
|
6247
6759
|
});
|
|
6248
6760
|
|
|
@@ -6345,7 +6857,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
6345
6857
|
};
|
|
6346
6858
|
});
|
|
6347
6859
|
|
|
6348
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
6860
|
+
utils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
|
|
6349
6861
|
function generateHTTPMethod(isForm) {
|
|
6350
6862
|
return function httpMethod(url, data, config) {
|
|
6351
6863
|
return this.request(
|
|
@@ -6365,7 +6877,11 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
|
6365
6877
|
|
|
6366
6878
|
Axios.prototype[method] = generateHTTPMethod();
|
|
6367
6879
|
|
|
6368
|
-
|
|
6880
|
+
// QUERY is a safe/idempotent read method; multipart form bodies don't fit
|
|
6881
|
+
// its semantics, so no queryForm shorthand is generated.
|
|
6882
|
+
if (method !== 'query') {
|
|
6883
|
+
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
6884
|
+
}
|
|
6369
6885
|
});
|
|
6370
6886
|
|
|
6371
6887
|
/* harmony default export */ const core_Axios = (Axios);
|
|
@@ -6746,6 +7262,7 @@ const {
|
|
|
6746
7262
|
formToJSON,
|
|
6747
7263
|
getAdapter: axios_getAdapter,
|
|
6748
7264
|
mergeConfig: axios_mergeConfig,
|
|
7265
|
+
create,
|
|
6749
7266
|
} = lib_axios;
|
|
6750
7267
|
|
|
6751
7268
|
|