@verdocs/web-sdk 6.8.10 → 6.8.11
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/cjs/{utils-kkGeJs-8.js → utils-DsDnct9q.js} +2 -4
- package/dist/cjs/utils-DsDnct9q.js.map +1 -0
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1102 -808
- package/dist/cjs/verdocs-contact-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-signing-progress.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/collection/utils/utils.js +0 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/{p-Cj8PYi4t.js → p-B1XBGdC7.js} +4 -4
- package/dist/components/{p-Cj8PYi4t.js.map → p-B1XBGdC7.js.map} +1 -1
- package/dist/components/{p-RdlD8c2P.js → p-B6tZPSE-.js} +3 -3
- package/dist/components/{p-RdlD8c2P.js.map → p-B6tZPSE-.js.map} +1 -1
- package/dist/components/{p-zAW1BOj6.js → p-BCwx8bsK.js} +3 -3
- package/dist/components/{p-zAW1BOj6.js.map → p-BCwx8bsK.js.map} +1 -1
- package/dist/components/{p-aH_YLUuP.js → p-CaoZmlp7.js} +3 -3
- package/dist/components/{p-aH_YLUuP.js.map → p-CaoZmlp7.js.map} +1 -1
- package/dist/components/{p-Cx0Mif05.js → p-CndV_5Je.js} +2 -4
- package/dist/components/{p-Cx0Mif05.js.map → p-CndV_5Je.js.map} +1 -1
- package/dist/components/{p-BrtyCjOf.js → p-DPfgYCMd.js} +3 -3
- package/dist/components/{p-BrtyCjOf.js.map → p-DPfgYCMd.js.map} +1 -1
- package/dist/components/{p-DNYvorxL.js → p-DqlhK3CE.js} +4 -4
- package/dist/components/{p-DNYvorxL.js.map → p-DqlhK3CE.js.map} +1 -1
- package/dist/components/{p-Bzs-6uU0.js → p-EQhWyfg9.js} +1104 -810
- package/dist/components/p-EQhWyfg9.js.map +1 -0
- package/dist/components/{p---tnXjlx.js → p-uNqpODUQ.js} +3 -3
- package/dist/components/{p---tnXjlx.js.map → p-uNqpODUQ.js.map} +1 -1
- package/dist/components/verdocs-build.js +5 -5
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-quick-filter.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +3 -3
- package/dist/components/verdocs-signing-progress.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/{utils-CPSY5rft.js → utils-Bty_rQI7.js} +2 -4
- package/dist/esm/utils-Bty_rQI7.js.map +1 -0
- package/dist/esm/verdocs-contact-picker.entry.js +1102 -808
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-signing-progress.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/{utils-CPSY5rft.js → utils-Bty_rQI7.js} +1 -1
- package/dist/esm-es5/utils-Bty_rQI7.js.map +1 -0
- package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signing-progress.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-b7d907b4.system.entry.js → p-0f6aa428.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-92b4f218.entry.js → p-30ce93f4.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-4a24c445.system.entry.js +4 -0
- package/dist/verdocs-web-sdk/p-4a24c445.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-5b00dbf2.entry.js +3 -0
- package/dist/verdocs-web-sdk/p-5b00dbf2.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-3be22031.entry.js → p-64a68e39.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0b59a4a5.entry.js → p-76770d9c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2ba8c771.system.entry.js → p-7fa0abc5.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-60cfa50a.system.entry.js → p-83f10fb7.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-641dbbfa.system.entry.js → p-8b80fe24.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fc308ef0.entry.js → p-90005b19.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-Bg14ZSNR.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-a51WVEiq.system.js.map → p-BkSli2zt.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DmQa-gqf.system.js.map → p-CLSDwNJu.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-BFC8G6sY.system.js.map → p-CkFoHSeo.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DGti20Vc.system.js → p-CnF3etgg.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-CnF3etgg.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-N4-IQ3Cb.system.js.map → p-CotMN3Ey.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CVmJ8lYI.system.js.map → p-CyHGFYot.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-BJ0cUjeu.system.js.map → p-Fo42OGz9.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-H1Y4Zb4E.system.js.map → p-HR08HTpW.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-C9JdpYtM.js → p-NAwq_U8G.js} +1 -1
- package/dist/verdocs-web-sdk/p-NAwq_U8G.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6c8883ff.entry.js → p-b99e606b.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6c8883ff.entry.js.map → p-b99e606b.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-066eaea8.system.entry.js → p-e33fd901.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d4e3efdb.system.entry.js → p-e97ce39e.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-4f820bee.entry.js → p-f02af327.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-04981f9f.entry.js → p-f79ebbc1.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4424623c.system.entry.js → p-ffbf5761.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/verdocs-contact-picker.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/utils-kkGeJs-8.js.map +0 -1
- package/dist/components/p-Bzs-6uU0.js.map +0 -1
- package/dist/esm/utils-CPSY5rft.js.map +0 -1
- package/dist/esm-es5/utils-CPSY5rft.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BuHYXI2L.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-C9JdpYtM.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DGti20Vc.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-bcffad7a.system.entry.js +0 -4
- package/dist/verdocs-web-sdk/p-bcffad7a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f7f33a99.entry.js +0 -3
- package/dist/verdocs-web-sdk/p-f7f33a99.entry.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-b7d907b4.system.entry.js.map → p-0f6aa428.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-92b4f218.entry.js.map → p-30ce93f4.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-3be22031.entry.js.map → p-64a68e39.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0b59a4a5.entry.js.map → p-76770d9c.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2ba8c771.system.entry.js.map → p-7fa0abc5.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-60cfa50a.system.entry.js.map → p-83f10fb7.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-641dbbfa.system.entry.js.map → p-8b80fe24.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fc308ef0.entry.js.map → p-90005b19.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-066eaea8.system.entry.js.map → p-e33fd901.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d4e3efdb.system.entry.js.map → p-e97ce39e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4f820bee.entry.js.map → p-f02af327.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-04981f9f.entry.js.map → p-f79ebbc1.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4424623c.system.entry.js.map → p-ffbf5761.system.entry.js.map} +0 -0
|
@@ -2,11 +2,11 @@ import { r as registerInstance, c as createEvent, h, F as Fragment } from './ind
|
|
|
2
2
|
import { VerdocsEndpoint, formatFullName, getActiveEntitlements, isValidEmail } from '@verdocs/js-sdk';
|
|
3
3
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-BFTU3MAI.js';
|
|
4
4
|
import { B as BETA_ORIGINS } from './Environment-C_Xku1v2.js';
|
|
5
|
-
import { f as convertToE164 } from './utils-
|
|
5
|
+
import { f as convertToE164 } from './utils-Bty_rQI7.js';
|
|
6
6
|
import './index-dzBXqXlK.js';
|
|
7
7
|
import './Types-BqoC0yeA.js';
|
|
8
8
|
|
|
9
|
-
/*! Axios v1.
|
|
9
|
+
/*! Axios v1.15.0 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
10
10
|
|
|
11
11
|
var axios_1;
|
|
12
12
|
var hasRequiredAxios;
|
|
@@ -62,7 +62,7 @@ function requireAxios () {
|
|
|
62
62
|
*
|
|
63
63
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
64
64
|
*/
|
|
65
|
-
const isUndefined = typeOfTest(
|
|
65
|
+
const isUndefined = typeOfTest('undefined');
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Determine if a value is a Buffer
|
|
@@ -89,7 +89,7 @@ function requireAxios () {
|
|
|
89
89
|
*
|
|
90
90
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
91
91
|
*/
|
|
92
|
-
const isArrayBuffer = kindOfTest(
|
|
92
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -100,7 +100,7 @@ function requireAxios () {
|
|
|
100
100
|
*/
|
|
101
101
|
function isArrayBufferView(val) {
|
|
102
102
|
let result;
|
|
103
|
-
if (typeof ArrayBuffer !==
|
|
103
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
104
104
|
result = ArrayBuffer.isView(val);
|
|
105
105
|
} else {
|
|
106
106
|
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
@@ -115,7 +115,7 @@ function requireAxios () {
|
|
|
115
115
|
*
|
|
116
116
|
* @returns {boolean} True if value is a String, otherwise false
|
|
117
117
|
*/
|
|
118
|
-
const isString = typeOfTest(
|
|
118
|
+
const isString = typeOfTest('string');
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Determine if a value is a Function
|
|
@@ -123,7 +123,7 @@ function requireAxios () {
|
|
|
123
123
|
* @param {*} val The value to test
|
|
124
124
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
125
125
|
*/
|
|
126
|
-
const isFunction$1 = typeOfTest(
|
|
126
|
+
const isFunction$1 = typeOfTest('function');
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
* Determine if a value is a Number
|
|
@@ -132,7 +132,7 @@ function requireAxios () {
|
|
|
132
132
|
*
|
|
133
133
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
134
134
|
*/
|
|
135
|
-
const isNumber = typeOfTest(
|
|
135
|
+
const isNumber = typeOfTest('number');
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* Determine if a value is an Object
|
|
@@ -141,7 +141,7 @@ function requireAxios () {
|
|
|
141
141
|
*
|
|
142
142
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
143
143
|
*/
|
|
144
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
144
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Determine if a value is a Boolean
|
|
@@ -159,7 +159,7 @@ function requireAxios () {
|
|
|
159
159
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
160
160
|
*/
|
|
161
161
|
const isPlainObject = (val) => {
|
|
162
|
-
if (kindOf(val) !==
|
|
162
|
+
if (kindOf(val) !== 'object') {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -187,10 +187,7 @@ function requireAxios () {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
try {
|
|
190
|
-
return (
|
|
191
|
-
Object.keys(val).length === 0 &&
|
|
192
|
-
Object.getPrototypeOf(val) === Object.prototype
|
|
193
|
-
);
|
|
190
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
194
191
|
} catch (e) {
|
|
195
192
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
196
193
|
return false;
|
|
@@ -204,7 +201,7 @@ function requireAxios () {
|
|
|
204
201
|
*
|
|
205
202
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
206
203
|
*/
|
|
207
|
-
const isDate = kindOfTest(
|
|
204
|
+
const isDate = kindOfTest('Date');
|
|
208
205
|
|
|
209
206
|
/**
|
|
210
207
|
* Determine if a value is a File
|
|
@@ -213,7 +210,32 @@ function requireAxios () {
|
|
|
213
210
|
*
|
|
214
211
|
* @returns {boolean} True if value is a File, otherwise false
|
|
215
212
|
*/
|
|
216
|
-
const isFile = kindOfTest(
|
|
213
|
+
const isFile = kindOfTest('File');
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Determine if a value is a React Native Blob
|
|
217
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
218
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
219
|
+
*
|
|
220
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
221
|
+
*
|
|
222
|
+
* @param {*} value The value to test
|
|
223
|
+
*
|
|
224
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
225
|
+
*/
|
|
226
|
+
const isReactNativeBlob = (value) => {
|
|
227
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Determine if environment is React Native
|
|
232
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
233
|
+
*
|
|
234
|
+
* @param {*} formData The formData to test
|
|
235
|
+
*
|
|
236
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
237
|
+
*/
|
|
238
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
217
239
|
|
|
218
240
|
/**
|
|
219
241
|
* Determine if a value is a Blob
|
|
@@ -222,7 +244,7 @@ function requireAxios () {
|
|
|
222
244
|
*
|
|
223
245
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
224
246
|
*/
|
|
225
|
-
const isBlob = kindOfTest(
|
|
247
|
+
const isBlob = kindOfTest('Blob');
|
|
226
248
|
|
|
227
249
|
/**
|
|
228
250
|
* Determine if a value is a FileList
|
|
@@ -231,7 +253,7 @@ function requireAxios () {
|
|
|
231
253
|
*
|
|
232
254
|
* @returns {boolean} True if value is a File, otherwise false
|
|
233
255
|
*/
|
|
234
|
-
const isFileList = kindOfTest(
|
|
256
|
+
const isFileList = kindOfTest('FileList');
|
|
235
257
|
|
|
236
258
|
/**
|
|
237
259
|
* Determine if a value is a Stream
|
|
@@ -249,17 +271,27 @@ function requireAxios () {
|
|
|
249
271
|
*
|
|
250
272
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
251
273
|
*/
|
|
274
|
+
function getGlobal() {
|
|
275
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
276
|
+
if (typeof self !== 'undefined') return self;
|
|
277
|
+
if (typeof window !== 'undefined') return window;
|
|
278
|
+
if (typeof commonjsGlobal !== 'undefined') return commonjsGlobal;
|
|
279
|
+
return {};
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const G = getGlobal();
|
|
283
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
284
|
+
|
|
252
285
|
const isFormData = (thing) => {
|
|
253
286
|
let kind;
|
|
254
|
-
return (
|
|
255
|
-
thing
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
thing.toString() === "[object FormData]"))))
|
|
287
|
+
return thing && (
|
|
288
|
+
(FormDataCtor && thing instanceof FormDataCtor) || (
|
|
289
|
+
isFunction$1(thing.append) && (
|
|
290
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
291
|
+
// detect form-data instance
|
|
292
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
|
|
293
|
+
)
|
|
294
|
+
)
|
|
263
295
|
);
|
|
264
296
|
};
|
|
265
297
|
|
|
@@ -270,13 +302,13 @@ function requireAxios () {
|
|
|
270
302
|
*
|
|
271
303
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
272
304
|
*/
|
|
273
|
-
const isURLSearchParams = kindOfTest(
|
|
305
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
274
306
|
|
|
275
307
|
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
308
|
+
'ReadableStream',
|
|
309
|
+
'Request',
|
|
310
|
+
'Response',
|
|
311
|
+
'Headers',
|
|
280
312
|
].map(kindOfTest);
|
|
281
313
|
|
|
282
314
|
/**
|
|
@@ -286,9 +318,9 @@ function requireAxios () {
|
|
|
286
318
|
*
|
|
287
319
|
* @returns {String} The String freed of excess whitespace
|
|
288
320
|
*/
|
|
289
|
-
const trim = (str) =>
|
|
290
|
-
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
291
|
-
|
|
321
|
+
const trim = (str) => {
|
|
322
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
323
|
+
};
|
|
292
324
|
/**
|
|
293
325
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
294
326
|
*
|
|
@@ -307,7 +339,7 @@ function requireAxios () {
|
|
|
307
339
|
*/
|
|
308
340
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
309
341
|
// Don't bother if no value provided
|
|
310
|
-
if (obj === null || typeof obj ===
|
|
342
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
311
343
|
return;
|
|
312
344
|
}
|
|
313
345
|
|
|
@@ -315,7 +347,7 @@ function requireAxios () {
|
|
|
315
347
|
let l;
|
|
316
348
|
|
|
317
349
|
// Force an array if not already something iterable
|
|
318
|
-
if (typeof obj !==
|
|
350
|
+
if (typeof obj !== 'object') {
|
|
319
351
|
/*eslint no-param-reassign:0*/
|
|
320
352
|
obj = [obj];
|
|
321
353
|
}
|
|
@@ -332,9 +364,7 @@ function requireAxios () {
|
|
|
332
364
|
}
|
|
333
365
|
|
|
334
366
|
// Iterate over object keys
|
|
335
|
-
const keys = allOwnKeys
|
|
336
|
-
? Object.getOwnPropertyNames(obj)
|
|
337
|
-
: Object.keys(obj);
|
|
367
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
338
368
|
const len = keys.length;
|
|
339
369
|
let key;
|
|
340
370
|
|
|
@@ -345,6 +375,14 @@ function requireAxios () {
|
|
|
345
375
|
}
|
|
346
376
|
}
|
|
347
377
|
|
|
378
|
+
/**
|
|
379
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
380
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
381
|
+
*
|
|
382
|
+
* @param {Object} obj - The object to search.
|
|
383
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
384
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
385
|
+
*/
|
|
348
386
|
function findKey(obj, key) {
|
|
349
387
|
if (isBuffer(obj)) {
|
|
350
388
|
return null;
|
|
@@ -365,16 +403,11 @@ function requireAxios () {
|
|
|
365
403
|
|
|
366
404
|
const _global = (() => {
|
|
367
405
|
/*eslint no-undef:0*/
|
|
368
|
-
if (typeof globalThis !==
|
|
369
|
-
return typeof self !==
|
|
370
|
-
? self
|
|
371
|
-
: typeof window !== "undefined"
|
|
372
|
-
? window
|
|
373
|
-
: commonjsGlobal;
|
|
406
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
407
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : commonjsGlobal;
|
|
374
408
|
})();
|
|
375
409
|
|
|
376
|
-
const isContextDefined = (context) =>
|
|
377
|
-
!isUndefined(context) && context !== _global;
|
|
410
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
378
411
|
|
|
379
412
|
/**
|
|
380
413
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -399,7 +432,7 @@ function requireAxios () {
|
|
|
399
432
|
const result = {};
|
|
400
433
|
const assignValue = (val, key) => {
|
|
401
434
|
// Skip dangerous property names to prevent prototype pollution
|
|
402
|
-
if (key ===
|
|
435
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
403
436
|
return;
|
|
404
437
|
}
|
|
405
438
|
|
|
@@ -452,7 +485,7 @@ function requireAxios () {
|
|
|
452
485
|
});
|
|
453
486
|
}
|
|
454
487
|
},
|
|
455
|
-
{ allOwnKeys }
|
|
488
|
+
{ allOwnKeys }
|
|
456
489
|
);
|
|
457
490
|
return a;
|
|
458
491
|
};
|
|
@@ -481,17 +514,14 @@ function requireAxios () {
|
|
|
481
514
|
* @returns {void}
|
|
482
515
|
*/
|
|
483
516
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
484
|
-
constructor.prototype = Object.create(
|
|
485
|
-
|
|
486
|
-
descriptors,
|
|
487
|
-
);
|
|
488
|
-
Object.defineProperty(constructor.prototype, "constructor", {
|
|
517
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
518
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
489
519
|
value: constructor,
|
|
490
520
|
writable: true,
|
|
491
521
|
enumerable: false,
|
|
492
522
|
configurable: true,
|
|
493
523
|
});
|
|
494
|
-
Object.defineProperty(constructor,
|
|
524
|
+
Object.defineProperty(constructor, 'super', {
|
|
495
525
|
value: superConstructor.prototype,
|
|
496
526
|
});
|
|
497
527
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -521,20 +551,13 @@ function requireAxios () {
|
|
|
521
551
|
i = props.length;
|
|
522
552
|
while (i-- > 0) {
|
|
523
553
|
prop = props[i];
|
|
524
|
-
if (
|
|
525
|
-
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
526
|
-
!merged[prop]
|
|
527
|
-
) {
|
|
554
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
528
555
|
destObj[prop] = sourceObj[prop];
|
|
529
556
|
merged[prop] = true;
|
|
530
557
|
}
|
|
531
558
|
}
|
|
532
559
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
533
|
-
} while (
|
|
534
|
-
sourceObj &&
|
|
535
|
-
(!filter || filter(sourceObj, destObj)) &&
|
|
536
|
-
sourceObj !== Object.prototype
|
|
537
|
-
);
|
|
560
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
538
561
|
|
|
539
562
|
return destObj;
|
|
540
563
|
};
|
|
@@ -591,7 +614,7 @@ function requireAxios () {
|
|
|
591
614
|
return (thing) => {
|
|
592
615
|
return TypedArray && thing instanceof TypedArray;
|
|
593
616
|
};
|
|
594
|
-
})(typeof Uint8Array !==
|
|
617
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
595
618
|
|
|
596
619
|
/**
|
|
597
620
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -634,14 +657,12 @@ function requireAxios () {
|
|
|
634
657
|
};
|
|
635
658
|
|
|
636
659
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
637
|
-
const isHTMLForm = kindOfTest(
|
|
660
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
638
661
|
|
|
639
662
|
const toCamelCase = (str) => {
|
|
640
|
-
return str
|
|
641
|
-
.
|
|
642
|
-
|
|
643
|
-
return p1.toUpperCase() + p2;
|
|
644
|
-
});
|
|
663
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
664
|
+
return p1.toUpperCase() + p2;
|
|
665
|
+
});
|
|
645
666
|
};
|
|
646
667
|
|
|
647
668
|
/* Creating a function that will check if an object has a property. */
|
|
@@ -658,7 +679,7 @@ function requireAxios () {
|
|
|
658
679
|
*
|
|
659
680
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
660
681
|
*/
|
|
661
|
-
const isRegExp = kindOfTest(
|
|
682
|
+
const isRegExp = kindOfTest('RegExp');
|
|
662
683
|
|
|
663
684
|
const reduceDescriptors = (obj, reducer) => {
|
|
664
685
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -682,10 +703,7 @@ function requireAxios () {
|
|
|
682
703
|
const freezeMethods = (obj) => {
|
|
683
704
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
684
705
|
// skip restricted props in strict mode
|
|
685
|
-
if (
|
|
686
|
-
isFunction$1(obj) &&
|
|
687
|
-
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
688
|
-
) {
|
|
706
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
689
707
|
return false;
|
|
690
708
|
}
|
|
691
709
|
|
|
@@ -695,7 +713,7 @@ function requireAxios () {
|
|
|
695
713
|
|
|
696
714
|
descriptor.enumerable = false;
|
|
697
715
|
|
|
698
|
-
if (
|
|
716
|
+
if ('writable' in descriptor) {
|
|
699
717
|
descriptor.writable = false;
|
|
700
718
|
return;
|
|
701
719
|
}
|
|
@@ -708,6 +726,14 @@ function requireAxios () {
|
|
|
708
726
|
});
|
|
709
727
|
};
|
|
710
728
|
|
|
729
|
+
/**
|
|
730
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
731
|
+
* Useful for fast membership checks.
|
|
732
|
+
*
|
|
733
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
734
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
735
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
736
|
+
*/
|
|
711
737
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
712
738
|
const obj = {};
|
|
713
739
|
|
|
@@ -717,9 +743,7 @@ function requireAxios () {
|
|
|
717
743
|
});
|
|
718
744
|
};
|
|
719
745
|
|
|
720
|
-
isArray(arrayOrString)
|
|
721
|
-
? define(arrayOrString)
|
|
722
|
-
: define(String(arrayOrString).split(delimiter));
|
|
746
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
723
747
|
|
|
724
748
|
return obj;
|
|
725
749
|
};
|
|
@@ -727,9 +751,7 @@ function requireAxios () {
|
|
|
727
751
|
const noop = () => {};
|
|
728
752
|
|
|
729
753
|
const toFiniteNumber = (value, defaultValue) => {
|
|
730
|
-
return value != null && Number.isFinite((value = +value))
|
|
731
|
-
? value
|
|
732
|
-
: defaultValue;
|
|
754
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
733
755
|
};
|
|
734
756
|
|
|
735
757
|
/**
|
|
@@ -743,11 +765,17 @@ function requireAxios () {
|
|
|
743
765
|
return !!(
|
|
744
766
|
thing &&
|
|
745
767
|
isFunction$1(thing.append) &&
|
|
746
|
-
thing[toStringTag] ===
|
|
768
|
+
thing[toStringTag] === 'FormData' &&
|
|
747
769
|
thing[iterator]
|
|
748
770
|
);
|
|
749
771
|
}
|
|
750
772
|
|
|
773
|
+
/**
|
|
774
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
775
|
+
*
|
|
776
|
+
* @param {Object} obj - The object to convert.
|
|
777
|
+
* @returns {Object} The JSON-compatible object.
|
|
778
|
+
*/
|
|
751
779
|
const toJSONObject = (obj) => {
|
|
752
780
|
const stack = new Array(10);
|
|
753
781
|
|
|
@@ -762,7 +790,7 @@ function requireAxios () {
|
|
|
762
790
|
return source;
|
|
763
791
|
}
|
|
764
792
|
|
|
765
|
-
if (!(
|
|
793
|
+
if (!('toJSON' in source)) {
|
|
766
794
|
stack[i] = source;
|
|
767
795
|
const target = isArray(source) ? [] : {};
|
|
768
796
|
|
|
@@ -783,8 +811,20 @@ function requireAxios () {
|
|
|
783
811
|
return visit(obj, 0);
|
|
784
812
|
};
|
|
785
813
|
|
|
786
|
-
|
|
814
|
+
/**
|
|
815
|
+
* Determines if a value is an async function.
|
|
816
|
+
*
|
|
817
|
+
* @param {*} thing - The value to test.
|
|
818
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
819
|
+
*/
|
|
820
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
787
821
|
|
|
822
|
+
/**
|
|
823
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
824
|
+
*
|
|
825
|
+
* @param {*} thing - The value to test.
|
|
826
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
827
|
+
*/
|
|
788
828
|
const isThenable = (thing) =>
|
|
789
829
|
thing &&
|
|
790
830
|
(isObject(thing) || isFunction$1(thing)) &&
|
|
@@ -794,6 +834,14 @@ function requireAxios () {
|
|
|
794
834
|
// original code
|
|
795
835
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
796
836
|
|
|
837
|
+
/**
|
|
838
|
+
* Provides a cross-platform setImmediate implementation.
|
|
839
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
840
|
+
*
|
|
841
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
842
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
843
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
844
|
+
*/
|
|
797
845
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
798
846
|
if (setImmediateSupported) {
|
|
799
847
|
return setImmediate;
|
|
@@ -802,27 +850,33 @@ function requireAxios () {
|
|
|
802
850
|
return postMessageSupported
|
|
803
851
|
? ((token, callbacks) => {
|
|
804
852
|
_global.addEventListener(
|
|
805
|
-
|
|
853
|
+
'message',
|
|
806
854
|
({ source, data }) => {
|
|
807
855
|
if (source === _global && data === token) {
|
|
808
856
|
callbacks.length && callbacks.shift()();
|
|
809
857
|
}
|
|
810
858
|
},
|
|
811
|
-
false
|
|
859
|
+
false
|
|
812
860
|
);
|
|
813
861
|
|
|
814
862
|
return (cb) => {
|
|
815
863
|
callbacks.push(cb);
|
|
816
|
-
_global.postMessage(token,
|
|
864
|
+
_global.postMessage(token, '*');
|
|
817
865
|
};
|
|
818
866
|
})(`axios@${Math.random()}`, [])
|
|
819
867
|
: (cb) => setTimeout(cb);
|
|
820
|
-
})(typeof setImmediate ===
|
|
868
|
+
})(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
|
|
821
869
|
|
|
870
|
+
/**
|
|
871
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
872
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
873
|
+
*
|
|
874
|
+
* @type {Function}
|
|
875
|
+
*/
|
|
822
876
|
const asap =
|
|
823
|
-
typeof queueMicrotask !==
|
|
877
|
+
typeof queueMicrotask !== 'undefined'
|
|
824
878
|
? queueMicrotask.bind(_global)
|
|
825
|
-
: (typeof process !==
|
|
879
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
826
880
|
|
|
827
881
|
// *********************
|
|
828
882
|
|
|
@@ -847,6 +901,8 @@ function requireAxios () {
|
|
|
847
901
|
isUndefined,
|
|
848
902
|
isDate,
|
|
849
903
|
isFile,
|
|
904
|
+
isReactNativeBlob,
|
|
905
|
+
isReactNative,
|
|
850
906
|
isBlob,
|
|
851
907
|
isRegExp,
|
|
852
908
|
isFunction: isFunction$1,
|
|
@@ -889,14 +945,20 @@ function requireAxios () {
|
|
|
889
945
|
};
|
|
890
946
|
|
|
891
947
|
class AxiosError extends Error {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
948
|
+
static from(error, code, config, request, response, customProps) {
|
|
949
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
950
|
+
axiosError.cause = error;
|
|
951
|
+
axiosError.name = error.name;
|
|
952
|
+
|
|
953
|
+
// Preserve status from the original error if not already set from response
|
|
954
|
+
if (error.status != null && axiosError.status == null) {
|
|
955
|
+
axiosError.status = error.status;
|
|
898
956
|
}
|
|
899
957
|
|
|
958
|
+
customProps && Object.assign(axiosError, customProps);
|
|
959
|
+
return axiosError;
|
|
960
|
+
}
|
|
961
|
+
|
|
900
962
|
/**
|
|
901
963
|
* Create an Error with the specified message, config, error code, request and response.
|
|
902
964
|
*
|
|
@@ -909,37 +971,48 @@ function requireAxios () {
|
|
|
909
971
|
* @returns {Error} The created error.
|
|
910
972
|
*/
|
|
911
973
|
constructor(message, code, config, request, response) {
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
974
|
+
super(message);
|
|
975
|
+
|
|
976
|
+
// Make message enumerable to maintain backward compatibility
|
|
977
|
+
// The native Error constructor sets message as non-enumerable,
|
|
978
|
+
// but axios < v1.13.3 had it as enumerable
|
|
979
|
+
Object.defineProperty(this, 'message', {
|
|
980
|
+
value: message,
|
|
981
|
+
enumerable: true,
|
|
982
|
+
writable: true,
|
|
983
|
+
configurable: true
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
this.name = 'AxiosError';
|
|
987
|
+
this.isAxiosError = true;
|
|
988
|
+
code && (this.code = code);
|
|
989
|
+
config && (this.config = config);
|
|
990
|
+
request && (this.request = request);
|
|
991
|
+
if (response) {
|
|
992
|
+
this.response = response;
|
|
993
|
+
this.status = response.status;
|
|
994
|
+
}
|
|
922
995
|
}
|
|
923
996
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
997
|
+
toJSON() {
|
|
998
|
+
return {
|
|
999
|
+
// Standard
|
|
1000
|
+
message: this.message,
|
|
1001
|
+
name: this.name,
|
|
1002
|
+
// Microsoft
|
|
1003
|
+
description: this.description,
|
|
1004
|
+
number: this.number,
|
|
1005
|
+
// Mozilla
|
|
1006
|
+
fileName: this.fileName,
|
|
1007
|
+
lineNumber: this.lineNumber,
|
|
1008
|
+
columnNumber: this.columnNumber,
|
|
1009
|
+
stack: this.stack,
|
|
1010
|
+
// Axios
|
|
1011
|
+
config: utils$1.toJSONObject(this.config),
|
|
1012
|
+
code: this.code,
|
|
1013
|
+
status: this.status,
|
|
1014
|
+
};
|
|
1015
|
+
}
|
|
943
1016
|
}
|
|
944
1017
|
|
|
945
1018
|
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
@@ -956,8 +1029,6 @@ function requireAxios () {
|
|
|
956
1029
|
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
957
1030
|
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
958
1031
|
|
|
959
|
-
var AxiosError$1 = AxiosError;
|
|
960
|
-
|
|
961
1032
|
// eslint-disable-next-line strict
|
|
962
1033
|
var httpAdapter = null;
|
|
963
1034
|
|
|
@@ -994,11 +1065,14 @@ function requireAxios () {
|
|
|
994
1065
|
*/
|
|
995
1066
|
function renderKey(path, key, dots) {
|
|
996
1067
|
if (!path) return key;
|
|
997
|
-
return path
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1068
|
+
return path
|
|
1069
|
+
.concat(key)
|
|
1070
|
+
.map(function each(token, i) {
|
|
1071
|
+
// eslint-disable-next-line no-param-reassign
|
|
1072
|
+
token = removeBrackets(token);
|
|
1073
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
1074
|
+
})
|
|
1075
|
+
.join(dots ? '.' : '');
|
|
1002
1076
|
}
|
|
1003
1077
|
|
|
1004
1078
|
/**
|
|
@@ -1048,21 +1122,26 @@ function requireAxios () {
|
|
|
1048
1122
|
formData = formData || new (FormData)();
|
|
1049
1123
|
|
|
1050
1124
|
// eslint-disable-next-line no-param-reassign
|
|
1051
|
-
options = utils$1.toFlatObject(
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1125
|
+
options = utils$1.toFlatObject(
|
|
1126
|
+
options,
|
|
1127
|
+
{
|
|
1128
|
+
metaTokens: true,
|
|
1129
|
+
dots: false,
|
|
1130
|
+
indexes: false,
|
|
1131
|
+
},
|
|
1132
|
+
false,
|
|
1133
|
+
function defined(option, source) {
|
|
1134
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
1135
|
+
return !utils$1.isUndefined(source[option]);
|
|
1136
|
+
}
|
|
1137
|
+
);
|
|
1059
1138
|
|
|
1060
1139
|
const metaTokens = options.metaTokens;
|
|
1061
1140
|
// eslint-disable-next-line no-use-before-define
|
|
1062
1141
|
const visitor = options.visitor || defaultVisitor;
|
|
1063
1142
|
const dots = options.dots;
|
|
1064
1143
|
const indexes = options.indexes;
|
|
1065
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
1144
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
1066
1145
|
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
1067
1146
|
|
|
1068
1147
|
if (!utils$1.isFunction(visitor)) {
|
|
@@ -1081,7 +1160,7 @@ function requireAxios () {
|
|
|
1081
1160
|
}
|
|
1082
1161
|
|
|
1083
1162
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
1084
|
-
throw new AxiosError
|
|
1163
|
+
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
1085
1164
|
}
|
|
1086
1165
|
|
|
1087
1166
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
@@ -1104,6 +1183,11 @@ function requireAxios () {
|
|
|
1104
1183
|
function defaultVisitor(value, key, path) {
|
|
1105
1184
|
let arr = value;
|
|
1106
1185
|
|
|
1186
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
1187
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
1188
|
+
return false;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1107
1191
|
if (value && !path && typeof value === 'object') {
|
|
1108
1192
|
if (utils$1.endsWith(key, '{}')) {
|
|
1109
1193
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -1112,17 +1196,22 @@ function requireAxios () {
|
|
|
1112
1196
|
value = JSON.stringify(value);
|
|
1113
1197
|
} else if (
|
|
1114
1198
|
(utils$1.isArray(value) && isFlatArray(value)) ||
|
|
1115
|
-
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
|
1116
|
-
|
|
1199
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
|
|
1200
|
+
) {
|
|
1117
1201
|
// eslint-disable-next-line no-param-reassign
|
|
1118
1202
|
key = removeBrackets(key);
|
|
1119
1203
|
|
|
1120
1204
|
arr.forEach(function each(el, index) {
|
|
1121
|
-
!(utils$1.isUndefined(el) || el === null) &&
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1205
|
+
!(utils$1.isUndefined(el) || el === null) &&
|
|
1206
|
+
formData.append(
|
|
1207
|
+
// eslint-disable-next-line no-nested-ternary
|
|
1208
|
+
indexes === true
|
|
1209
|
+
? renderKey([key], index, dots)
|
|
1210
|
+
: indexes === null
|
|
1211
|
+
? key
|
|
1212
|
+
: key + '[]',
|
|
1213
|
+
convertValue(el)
|
|
1214
|
+
);
|
|
1126
1215
|
});
|
|
1127
1216
|
return false;
|
|
1128
1217
|
}
|
|
@@ -1142,7 +1231,7 @@ function requireAxios () {
|
|
|
1142
1231
|
const exposedHelpers = Object.assign(predicates, {
|
|
1143
1232
|
defaultVisitor,
|
|
1144
1233
|
convertValue,
|
|
1145
|
-
isVisitable
|
|
1234
|
+
isVisitable,
|
|
1146
1235
|
});
|
|
1147
1236
|
|
|
1148
1237
|
function build(value, path) {
|
|
@@ -1155,9 +1244,9 @@ function requireAxios () {
|
|
|
1155
1244
|
stack.push(value);
|
|
1156
1245
|
|
|
1157
1246
|
utils$1.forEach(value, function each(el, key) {
|
|
1158
|
-
const result =
|
|
1159
|
-
|
|
1160
|
-
|
|
1247
|
+
const result =
|
|
1248
|
+
!(utils$1.isUndefined(el) || el === null) &&
|
|
1249
|
+
visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
1161
1250
|
|
|
1162
1251
|
if (result === true) {
|
|
1163
1252
|
build(el, path ? path.concat(key) : [key]);
|
|
@@ -1192,7 +1281,7 @@ function requireAxios () {
|
|
|
1192
1281
|
')': '%29',
|
|
1193
1282
|
'~': '%7E',
|
|
1194
1283
|
'%20': '+',
|
|
1195
|
-
'%00': '\x00'
|
|
1284
|
+
'%00': '\x00',
|
|
1196
1285
|
};
|
|
1197
1286
|
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
1198
1287
|
return charMap[match];
|
|
@@ -1220,29 +1309,33 @@ function requireAxios () {
|
|
|
1220
1309
|
};
|
|
1221
1310
|
|
|
1222
1311
|
prototype.toString = function toString(encoder) {
|
|
1223
|
-
const _encode = encoder
|
|
1224
|
-
|
|
1225
|
-
|
|
1312
|
+
const _encode = encoder
|
|
1313
|
+
? function (value) {
|
|
1314
|
+
return encoder.call(this, value, encode$1);
|
|
1315
|
+
}
|
|
1316
|
+
: encode$1;
|
|
1226
1317
|
|
|
1227
|
-
return this._pairs
|
|
1228
|
-
|
|
1229
|
-
|
|
1318
|
+
return this._pairs
|
|
1319
|
+
.map(function each(pair) {
|
|
1320
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
1321
|
+
}, '')
|
|
1322
|
+
.join('&');
|
|
1230
1323
|
};
|
|
1231
1324
|
|
|
1232
1325
|
/**
|
|
1233
|
-
* It replaces
|
|
1234
|
-
*
|
|
1326
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
1327
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
1235
1328
|
*
|
|
1236
1329
|
* @param {string} val The value to be encoded.
|
|
1237
1330
|
*
|
|
1238
1331
|
* @returns {string} The encoded value.
|
|
1239
1332
|
*/
|
|
1240
1333
|
function encode(val) {
|
|
1241
|
-
return encodeURIComponent(val)
|
|
1242
|
-
replace(/%3A/gi, ':')
|
|
1243
|
-
replace(/%24/g, '$')
|
|
1244
|
-
replace(/%2C/gi, ',')
|
|
1245
|
-
replace(/%20/g, '+');
|
|
1334
|
+
return encodeURIComponent(val)
|
|
1335
|
+
.replace(/%3A/gi, ':')
|
|
1336
|
+
.replace(/%24/g, '$')
|
|
1337
|
+
.replace(/%2C/gi, ',')
|
|
1338
|
+
.replace(/%20/g, '+');
|
|
1246
1339
|
}
|
|
1247
1340
|
|
|
1248
1341
|
/**
|
|
@@ -1259,11 +1352,13 @@ function requireAxios () {
|
|
|
1259
1352
|
return url;
|
|
1260
1353
|
}
|
|
1261
1354
|
|
|
1262
|
-
const _encode = options && options.encode || encode;
|
|
1355
|
+
const _encode = (options && options.encode) || encode;
|
|
1263
1356
|
|
|
1264
|
-
const _options = utils$1.isFunction(options)
|
|
1265
|
-
|
|
1266
|
-
|
|
1357
|
+
const _options = utils$1.isFunction(options)
|
|
1358
|
+
? {
|
|
1359
|
+
serialize: options,
|
|
1360
|
+
}
|
|
1361
|
+
: options;
|
|
1267
1362
|
|
|
1268
1363
|
const serializeFn = _options && _options.serialize;
|
|
1269
1364
|
|
|
@@ -1272,13 +1367,13 @@ function requireAxios () {
|
|
|
1272
1367
|
if (serializeFn) {
|
|
1273
1368
|
serializedParams = serializeFn(params, _options);
|
|
1274
1369
|
} else {
|
|
1275
|
-
serializedParams = utils$1.isURLSearchParams(params)
|
|
1276
|
-
params.toString()
|
|
1277
|
-
new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
1370
|
+
serializedParams = utils$1.isURLSearchParams(params)
|
|
1371
|
+
? params.toString()
|
|
1372
|
+
: new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
1278
1373
|
}
|
|
1279
1374
|
|
|
1280
1375
|
if (serializedParams) {
|
|
1281
|
-
const hashmarkIndex = url.indexOf(
|
|
1376
|
+
const hashmarkIndex = url.indexOf('#');
|
|
1282
1377
|
|
|
1283
1378
|
if (hashmarkIndex !== -1) {
|
|
1284
1379
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -1308,7 +1403,7 @@ function requireAxios () {
|
|
|
1308
1403
|
fulfilled,
|
|
1309
1404
|
rejected,
|
|
1310
1405
|
synchronous: options ? options.synchronous : false,
|
|
1311
|
-
runWhen: options ? options.runWhen : null
|
|
1406
|
+
runWhen: options ? options.runWhen : null,
|
|
1312
1407
|
});
|
|
1313
1408
|
return this.handlers.length - 1;
|
|
1314
1409
|
}
|
|
@@ -1356,13 +1451,11 @@ function requireAxios () {
|
|
|
1356
1451
|
}
|
|
1357
1452
|
}
|
|
1358
1453
|
|
|
1359
|
-
var InterceptorManager$1 = InterceptorManager;
|
|
1360
|
-
|
|
1361
1454
|
var transitionalDefaults = {
|
|
1362
1455
|
silentJSONParsing: true,
|
|
1363
1456
|
forcedJSONParsing: true,
|
|
1364
1457
|
clarifyTimeoutError: false,
|
|
1365
|
-
legacyInterceptorReqResOrdering: true
|
|
1458
|
+
legacyInterceptorReqResOrdering: true,
|
|
1366
1459
|
};
|
|
1367
1460
|
|
|
1368
1461
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -1376,14 +1469,14 @@ function requireAxios () {
|
|
|
1376
1469
|
classes: {
|
|
1377
1470
|
URLSearchParams: URLSearchParams$1,
|
|
1378
1471
|
FormData: FormData$1,
|
|
1379
|
-
Blob: Blob$1
|
|
1472
|
+
Blob: Blob$1,
|
|
1380
1473
|
},
|
|
1381
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
1474
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
1382
1475
|
};
|
|
1383
1476
|
|
|
1384
1477
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1385
1478
|
|
|
1386
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
1479
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
1387
1480
|
|
|
1388
1481
|
/**
|
|
1389
1482
|
* Determine if we're running in a standard browser environment
|
|
@@ -1402,7 +1495,8 @@ function requireAxios () {
|
|
|
1402
1495
|
*
|
|
1403
1496
|
* @returns {boolean}
|
|
1404
1497
|
*/
|
|
1405
|
-
const hasStandardBrowserEnv =
|
|
1498
|
+
const hasStandardBrowserEnv =
|
|
1499
|
+
hasBrowserEnv &&
|
|
1406
1500
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
1407
1501
|
|
|
1408
1502
|
/**
|
|
@@ -1423,25 +1517,25 @@ function requireAxios () {
|
|
|
1423
1517
|
);
|
|
1424
1518
|
})();
|
|
1425
1519
|
|
|
1426
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
1520
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
1427
1521
|
|
|
1428
1522
|
var utils = /*#__PURE__*/Object.freeze({
|
|
1429
1523
|
__proto__: null,
|
|
1430
1524
|
hasBrowserEnv: hasBrowserEnv,
|
|
1431
|
-
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1432
1525
|
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
1526
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1433
1527
|
navigator: _navigator,
|
|
1434
1528
|
origin: origin
|
|
1435
1529
|
});
|
|
1436
1530
|
|
|
1437
1531
|
var platform = {
|
|
1438
1532
|
...utils,
|
|
1439
|
-
...platform$1
|
|
1533
|
+
...platform$1,
|
|
1440
1534
|
};
|
|
1441
1535
|
|
|
1442
1536
|
function toURLEncodedForm(data, options) {
|
|
1443
1537
|
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
1444
|
-
visitor: function(value, key, path, helpers) {
|
|
1538
|
+
visitor: function (value, key, path, helpers) {
|
|
1445
1539
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
1446
1540
|
this.append(key, value.toString('base64'));
|
|
1447
1541
|
return false;
|
|
@@ -1449,7 +1543,7 @@ function requireAxios () {
|
|
|
1449
1543
|
|
|
1450
1544
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
1451
1545
|
},
|
|
1452
|
-
...options
|
|
1546
|
+
...options,
|
|
1453
1547
|
});
|
|
1454
1548
|
}
|
|
1455
1549
|
|
|
@@ -1465,7 +1559,7 @@ function requireAxios () {
|
|
|
1465
1559
|
// foo.x.y.z
|
|
1466
1560
|
// foo-x-y-z
|
|
1467
1561
|
// foo x y z
|
|
1468
|
-
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
1562
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
1469
1563
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
1470
1564
|
});
|
|
1471
1565
|
}
|
|
@@ -1569,96 +1663,107 @@ function requireAxios () {
|
|
|
1569
1663
|
}
|
|
1570
1664
|
|
|
1571
1665
|
const defaults = {
|
|
1572
|
-
|
|
1573
1666
|
transitional: transitionalDefaults,
|
|
1574
1667
|
|
|
1575
1668
|
adapter: ['xhr', 'http', 'fetch'],
|
|
1576
1669
|
|
|
1577
|
-
transformRequest: [
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1670
|
+
transformRequest: [
|
|
1671
|
+
function transformRequest(data, headers) {
|
|
1672
|
+
const contentType = headers.getContentType() || '';
|
|
1673
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
1674
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
1581
1675
|
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1676
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
1677
|
+
data = new FormData(data);
|
|
1678
|
+
}
|
|
1585
1679
|
|
|
1586
|
-
|
|
1680
|
+
const isFormData = utils$1.isFormData(data);
|
|
1587
1681
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1682
|
+
if (isFormData) {
|
|
1683
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
1684
|
+
}
|
|
1591
1685
|
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1686
|
+
if (
|
|
1687
|
+
utils$1.isArrayBuffer(data) ||
|
|
1688
|
+
utils$1.isBuffer(data) ||
|
|
1689
|
+
utils$1.isStream(data) ||
|
|
1690
|
+
utils$1.isFile(data) ||
|
|
1691
|
+
utils$1.isBlob(data) ||
|
|
1692
|
+
utils$1.isReadableStream(data)
|
|
1693
|
+
) {
|
|
1694
|
+
return data;
|
|
1695
|
+
}
|
|
1696
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
1697
|
+
return data.buffer;
|
|
1698
|
+
}
|
|
1699
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
1700
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
1701
|
+
return data.toString();
|
|
1702
|
+
}
|
|
1608
1703
|
|
|
1609
|
-
|
|
1704
|
+
let isFileList;
|
|
1610
1705
|
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1706
|
+
if (isObjectPayload) {
|
|
1707
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
1708
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
1709
|
+
}
|
|
1615
1710
|
|
|
1616
|
-
|
|
1617
|
-
|
|
1711
|
+
if (
|
|
1712
|
+
(isFileList = utils$1.isFileList(data)) ||
|
|
1713
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
1714
|
+
) {
|
|
1715
|
+
const _FormData = this.env && this.env.FormData;
|
|
1618
1716
|
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1717
|
+
return toFormData(
|
|
1718
|
+
isFileList ? { 'files[]': data } : data,
|
|
1719
|
+
_FormData && new _FormData(),
|
|
1720
|
+
this.formSerializer
|
|
1721
|
+
);
|
|
1722
|
+
}
|
|
1624
1723
|
}
|
|
1625
|
-
}
|
|
1626
1724
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1725
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
1726
|
+
headers.setContentType('application/json', false);
|
|
1727
|
+
return stringifySafely(data);
|
|
1728
|
+
}
|
|
1631
1729
|
|
|
1632
|
-
|
|
1633
|
-
|
|
1730
|
+
return data;
|
|
1731
|
+
},
|
|
1732
|
+
],
|
|
1634
1733
|
|
|
1635
|
-
transformResponse: [
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1734
|
+
transformResponse: [
|
|
1735
|
+
function transformResponse(data) {
|
|
1736
|
+
const transitional = this.transitional || defaults.transitional;
|
|
1737
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1738
|
+
const JSONRequested = this.responseType === 'json';
|
|
1639
1739
|
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1740
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
1741
|
+
return data;
|
|
1742
|
+
}
|
|
1643
1743
|
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1744
|
+
if (
|
|
1745
|
+
data &&
|
|
1746
|
+
utils$1.isString(data) &&
|
|
1747
|
+
((forcedJSONParsing && !this.responseType) || JSONRequested)
|
|
1748
|
+
) {
|
|
1749
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1750
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
1647
1751
|
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1752
|
+
try {
|
|
1753
|
+
return JSON.parse(data, this.parseReviver);
|
|
1754
|
+
} catch (e) {
|
|
1755
|
+
if (strictJSONParsing) {
|
|
1756
|
+
if (e.name === 'SyntaxError') {
|
|
1757
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
1758
|
+
}
|
|
1759
|
+
throw e;
|
|
1654
1760
|
}
|
|
1655
|
-
throw e;
|
|
1656
1761
|
}
|
|
1657
1762
|
}
|
|
1658
|
-
}
|
|
1659
1763
|
|
|
1660
|
-
|
|
1661
|
-
|
|
1764
|
+
return data;
|
|
1765
|
+
},
|
|
1766
|
+
],
|
|
1662
1767
|
|
|
1663
1768
|
/**
|
|
1664
1769
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -1674,7 +1779,7 @@ function requireAxios () {
|
|
|
1674
1779
|
|
|
1675
1780
|
env: {
|
|
1676
1781
|
FormData: platform.classes.FormData,
|
|
1677
|
-
Blob: platform.classes.Blob
|
|
1782
|
+
Blob: platform.classes.Blob,
|
|
1678
1783
|
},
|
|
1679
1784
|
|
|
1680
1785
|
validateStatus: function validateStatus(status) {
|
|
@@ -1683,25 +1788,36 @@ function requireAxios () {
|
|
|
1683
1788
|
|
|
1684
1789
|
headers: {
|
|
1685
1790
|
common: {
|
|
1686
|
-
|
|
1687
|
-
'Content-Type': undefined
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1791
|
+
Accept: 'application/json, text/plain, */*',
|
|
1792
|
+
'Content-Type': undefined,
|
|
1793
|
+
},
|
|
1794
|
+
},
|
|
1690
1795
|
};
|
|
1691
1796
|
|
|
1692
1797
|
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
1693
1798
|
defaults.headers[method] = {};
|
|
1694
1799
|
});
|
|
1695
1800
|
|
|
1696
|
-
var defaults$1 = defaults;
|
|
1697
|
-
|
|
1698
1801
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
1699
1802
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
1700
1803
|
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
1701
|
-
'age',
|
|
1702
|
-
'
|
|
1703
|
-
'
|
|
1704
|
-
'
|
|
1804
|
+
'age',
|
|
1805
|
+
'authorization',
|
|
1806
|
+
'content-length',
|
|
1807
|
+
'content-type',
|
|
1808
|
+
'etag',
|
|
1809
|
+
'expires',
|
|
1810
|
+
'from',
|
|
1811
|
+
'host',
|
|
1812
|
+
'if-modified-since',
|
|
1813
|
+
'if-unmodified-since',
|
|
1814
|
+
'last-modified',
|
|
1815
|
+
'location',
|
|
1816
|
+
'max-forwards',
|
|
1817
|
+
'proxy-authorization',
|
|
1818
|
+
'referer',
|
|
1819
|
+
'retry-after',
|
|
1820
|
+
'user-agent',
|
|
1705
1821
|
]);
|
|
1706
1822
|
|
|
1707
1823
|
/**
|
|
@@ -1718,47 +1834,81 @@ function requireAxios () {
|
|
|
1718
1834
|
*
|
|
1719
1835
|
* @returns {Object} Headers parsed into an object
|
|
1720
1836
|
*/
|
|
1721
|
-
var parseHeaders = rawHeaders => {
|
|
1837
|
+
var parseHeaders = (rawHeaders) => {
|
|
1722
1838
|
const parsed = {};
|
|
1723
1839
|
let key;
|
|
1724
1840
|
let val;
|
|
1725
1841
|
let i;
|
|
1726
1842
|
|
|
1727
|
-
rawHeaders &&
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1843
|
+
rawHeaders &&
|
|
1844
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
1845
|
+
i = line.indexOf(':');
|
|
1846
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
1847
|
+
val = line.substring(i + 1).trim();
|
|
1731
1848
|
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1849
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
1850
|
+
return;
|
|
1851
|
+
}
|
|
1735
1852
|
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1853
|
+
if (key === 'set-cookie') {
|
|
1854
|
+
if (parsed[key]) {
|
|
1855
|
+
parsed[key].push(val);
|
|
1856
|
+
} else {
|
|
1857
|
+
parsed[key] = [val];
|
|
1858
|
+
}
|
|
1739
1859
|
} else {
|
|
1740
|
-
parsed[key] = [val
|
|
1860
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
1741
1861
|
}
|
|
1742
|
-
}
|
|
1743
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
1744
|
-
}
|
|
1745
|
-
});
|
|
1862
|
+
});
|
|
1746
1863
|
|
|
1747
1864
|
return parsed;
|
|
1748
1865
|
};
|
|
1749
1866
|
|
|
1750
1867
|
const $internals = Symbol('internals');
|
|
1751
1868
|
|
|
1869
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
1870
|
+
|
|
1871
|
+
function assertValidHeaderValue(value, header) {
|
|
1872
|
+
if (value === false || value == null) {
|
|
1873
|
+
return;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
if (utils$1.isArray(value)) {
|
|
1877
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
1878
|
+
return;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
if (!isValidHeaderValue(String(value))) {
|
|
1882
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1752
1886
|
function normalizeHeader(header) {
|
|
1753
1887
|
return header && String(header).trim().toLowerCase();
|
|
1754
1888
|
}
|
|
1755
1889
|
|
|
1890
|
+
function stripTrailingCRLF(str) {
|
|
1891
|
+
let end = str.length;
|
|
1892
|
+
|
|
1893
|
+
while (end > 0) {
|
|
1894
|
+
const charCode = str.charCodeAt(end - 1);
|
|
1895
|
+
|
|
1896
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
1897
|
+
break;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
end -= 1;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
return end === str.length ? str : str.slice(0, end);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1756
1906
|
function normalizeValue(value) {
|
|
1757
1907
|
if (value === false || value == null) {
|
|
1758
1908
|
return value;
|
|
1759
1909
|
}
|
|
1760
1910
|
|
|
1761
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
1911
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
1762
1912
|
}
|
|
1763
1913
|
|
|
1764
1914
|
function parseTokens(str) {
|
|
@@ -1796,8 +1946,10 @@ function requireAxios () {
|
|
|
1796
1946
|
}
|
|
1797
1947
|
|
|
1798
1948
|
function formatHeader(header) {
|
|
1799
|
-
return header
|
|
1800
|
-
.
|
|
1949
|
+
return header
|
|
1950
|
+
.trim()
|
|
1951
|
+
.toLowerCase()
|
|
1952
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
1801
1953
|
return char.toUpperCase() + str;
|
|
1802
1954
|
});
|
|
1803
1955
|
}
|
|
@@ -1805,12 +1957,12 @@ function requireAxios () {
|
|
|
1805
1957
|
function buildAccessors(obj, header) {
|
|
1806
1958
|
const accessorName = utils$1.toCamelCase(' ' + header);
|
|
1807
1959
|
|
|
1808
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
1960
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
1809
1961
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
1810
|
-
value: function(arg1, arg2, arg3) {
|
|
1962
|
+
value: function (arg1, arg2, arg3) {
|
|
1811
1963
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
1812
1964
|
},
|
|
1813
|
-
configurable: true
|
|
1965
|
+
configurable: true,
|
|
1814
1966
|
});
|
|
1815
1967
|
});
|
|
1816
1968
|
}
|
|
@@ -1832,7 +1984,13 @@ function requireAxios () {
|
|
|
1832
1984
|
|
|
1833
1985
|
const key = utils$1.findKey(self, lHeader);
|
|
1834
1986
|
|
|
1835
|
-
if
|
|
1987
|
+
if (
|
|
1988
|
+
!key ||
|
|
1989
|
+
self[key] === undefined ||
|
|
1990
|
+
_rewrite === true ||
|
|
1991
|
+
(_rewrite === undefined && self[key] !== false)
|
|
1992
|
+
) {
|
|
1993
|
+
assertValidHeaderValue(_value, _header);
|
|
1836
1994
|
self[key || _header] = normalizeValue(_value);
|
|
1837
1995
|
}
|
|
1838
1996
|
}
|
|
@@ -1842,17 +2000,22 @@ function requireAxios () {
|
|
|
1842
2000
|
|
|
1843
2001
|
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
1844
2002
|
setHeaders(header, valueOrRewrite);
|
|
1845
|
-
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
2003
|
+
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1846
2004
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
1847
2005
|
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
1848
|
-
let obj = {},
|
|
2006
|
+
let obj = {},
|
|
2007
|
+
dest,
|
|
2008
|
+
key;
|
|
1849
2009
|
for (const entry of header) {
|
|
1850
2010
|
if (!utils$1.isArray(entry)) {
|
|
1851
2011
|
throw TypeError('Object iterator must return a key-value pair');
|
|
1852
2012
|
}
|
|
1853
2013
|
|
|
1854
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
1855
|
-
|
|
2014
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
2015
|
+
? utils$1.isArray(dest)
|
|
2016
|
+
? [...dest, entry[1]]
|
|
2017
|
+
: [dest, entry[1]]
|
|
2018
|
+
: entry[1];
|
|
1856
2019
|
}
|
|
1857
2020
|
|
|
1858
2021
|
setHeaders(obj, valueOrRewrite);
|
|
@@ -1899,7 +2062,11 @@ function requireAxios () {
|
|
|
1899
2062
|
if (header) {
|
|
1900
2063
|
const key = utils$1.findKey(this, header);
|
|
1901
2064
|
|
|
1902
|
-
return !!(
|
|
2065
|
+
return !!(
|
|
2066
|
+
key &&
|
|
2067
|
+
this[key] !== undefined &&
|
|
2068
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
2069
|
+
);
|
|
1903
2070
|
}
|
|
1904
2071
|
|
|
1905
2072
|
return false;
|
|
@@ -1939,7 +2106,7 @@ function requireAxios () {
|
|
|
1939
2106
|
|
|
1940
2107
|
while (i--) {
|
|
1941
2108
|
const key = keys[i];
|
|
1942
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
2109
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
1943
2110
|
delete this[key];
|
|
1944
2111
|
deleted = true;
|
|
1945
2112
|
}
|
|
@@ -1983,7 +2150,9 @@ function requireAxios () {
|
|
|
1983
2150
|
const obj = Object.create(null);
|
|
1984
2151
|
|
|
1985
2152
|
utils$1.forEach(this, (value, header) => {
|
|
1986
|
-
value != null &&
|
|
2153
|
+
value != null &&
|
|
2154
|
+
value !== false &&
|
|
2155
|
+
(obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
|
1987
2156
|
});
|
|
1988
2157
|
|
|
1989
2158
|
return obj;
|
|
@@ -1994,11 +2163,13 @@ function requireAxios () {
|
|
|
1994
2163
|
}
|
|
1995
2164
|
|
|
1996
2165
|
toString() {
|
|
1997
|
-
return Object.entries(this.toJSON())
|
|
2166
|
+
return Object.entries(this.toJSON())
|
|
2167
|
+
.map(([header, value]) => header + ': ' + value)
|
|
2168
|
+
.join('\n');
|
|
1998
2169
|
}
|
|
1999
2170
|
|
|
2000
2171
|
getSetCookie() {
|
|
2001
|
-
return this.get(
|
|
2172
|
+
return this.get('set-cookie') || [];
|
|
2002
2173
|
}
|
|
2003
2174
|
|
|
2004
2175
|
get [Symbol.toStringTag]() {
|
|
@@ -2018,9 +2189,12 @@ function requireAxios () {
|
|
|
2018
2189
|
}
|
|
2019
2190
|
|
|
2020
2191
|
static accessor(header) {
|
|
2021
|
-
const internals =
|
|
2022
|
-
|
|
2023
|
-
|
|
2192
|
+
const internals =
|
|
2193
|
+
(this[$internals] =
|
|
2194
|
+
this[$internals] =
|
|
2195
|
+
{
|
|
2196
|
+
accessors: {},
|
|
2197
|
+
});
|
|
2024
2198
|
|
|
2025
2199
|
const accessors = internals.accessors;
|
|
2026
2200
|
const prototype = this.prototype;
|
|
@@ -2040,23 +2214,28 @@ function requireAxios () {
|
|
|
2040
2214
|
}
|
|
2041
2215
|
}
|
|
2042
2216
|
|
|
2043
|
-
AxiosHeaders.accessor([
|
|
2217
|
+
AxiosHeaders.accessor([
|
|
2218
|
+
'Content-Type',
|
|
2219
|
+
'Content-Length',
|
|
2220
|
+
'Accept',
|
|
2221
|
+
'Accept-Encoding',
|
|
2222
|
+
'User-Agent',
|
|
2223
|
+
'Authorization',
|
|
2224
|
+
]);
|
|
2044
2225
|
|
|
2045
2226
|
// reserved names hotfix
|
|
2046
|
-
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
2227
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
2047
2228
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
2048
2229
|
return {
|
|
2049
2230
|
get: () => value,
|
|
2050
2231
|
set(headerValue) {
|
|
2051
2232
|
this[mapped] = headerValue;
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2233
|
+
},
|
|
2234
|
+
};
|
|
2054
2235
|
});
|
|
2055
2236
|
|
|
2056
2237
|
utils$1.freezeMethods(AxiosHeaders);
|
|
2057
2238
|
|
|
2058
|
-
var AxiosHeaders$1 = AxiosHeaders;
|
|
2059
|
-
|
|
2060
2239
|
/**
|
|
2061
2240
|
* Transform the data for a request or a response
|
|
2062
2241
|
*
|
|
@@ -2066,9 +2245,9 @@ function requireAxios () {
|
|
|
2066
2245
|
* @returns {*} The resulting transformed data
|
|
2067
2246
|
*/
|
|
2068
2247
|
function transformData(fns, response) {
|
|
2069
|
-
const config = this || defaults
|
|
2248
|
+
const config = this || defaults;
|
|
2070
2249
|
const context = response || config;
|
|
2071
|
-
const headers = AxiosHeaders
|
|
2250
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
2072
2251
|
let data = context.data;
|
|
2073
2252
|
|
|
2074
2253
|
utils$1.forEach(fns, function transform(fn) {
|
|
@@ -2084,7 +2263,7 @@ function requireAxios () {
|
|
|
2084
2263
|
return !!(value && value.__CANCEL__);
|
|
2085
2264
|
}
|
|
2086
2265
|
|
|
2087
|
-
class CanceledError extends AxiosError
|
|
2266
|
+
class CanceledError extends AxiosError {
|
|
2088
2267
|
/**
|
|
2089
2268
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
2090
2269
|
*
|
|
@@ -2095,14 +2274,12 @@ function requireAxios () {
|
|
|
2095
2274
|
* @returns {CanceledError} The created error.
|
|
2096
2275
|
*/
|
|
2097
2276
|
constructor(message, config, request) {
|
|
2098
|
-
super(message == null ? 'canceled' : message, AxiosError
|
|
2277
|
+
super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
2099
2278
|
this.name = 'CanceledError';
|
|
2100
2279
|
this.__CANCEL__ = true;
|
|
2101
2280
|
}
|
|
2102
2281
|
}
|
|
2103
2282
|
|
|
2104
|
-
var CanceledError$1 = CanceledError;
|
|
2105
|
-
|
|
2106
2283
|
/**
|
|
2107
2284
|
* Resolve or reject a Promise based on response status.
|
|
2108
2285
|
*
|
|
@@ -2117,19 +2294,23 @@ function requireAxios () {
|
|
|
2117
2294
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
2118
2295
|
resolve(response);
|
|
2119
2296
|
} else {
|
|
2120
|
-
reject(
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2297
|
+
reject(
|
|
2298
|
+
new AxiosError(
|
|
2299
|
+
'Request failed with status code ' + response.status,
|
|
2300
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][
|
|
2301
|
+
Math.floor(response.status / 100) - 4
|
|
2302
|
+
],
|
|
2303
|
+
response.config,
|
|
2304
|
+
response.request,
|
|
2305
|
+
response
|
|
2306
|
+
)
|
|
2307
|
+
);
|
|
2127
2308
|
}
|
|
2128
2309
|
}
|
|
2129
2310
|
|
|
2130
2311
|
function parseProtocol(url) {
|
|
2131
2312
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
2132
|
-
return match && match[1] || '';
|
|
2313
|
+
return (match && match[1]) || '';
|
|
2133
2314
|
}
|
|
2134
2315
|
|
|
2135
2316
|
/**
|
|
@@ -2180,7 +2361,7 @@ function requireAxios () {
|
|
|
2180
2361
|
|
|
2181
2362
|
const passed = startedAt && now - startedAt;
|
|
2182
2363
|
|
|
2183
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
2364
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
2184
2365
|
};
|
|
2185
2366
|
}
|
|
2186
2367
|
|
|
@@ -2209,7 +2390,7 @@ function requireAxios () {
|
|
|
2209
2390
|
const throttled = (...args) => {
|
|
2210
2391
|
const now = Date.now();
|
|
2211
2392
|
const passed = now - timestamp;
|
|
2212
|
-
if (
|
|
2393
|
+
if (passed >= threshold) {
|
|
2213
2394
|
invoke(args, now);
|
|
2214
2395
|
} else {
|
|
2215
2396
|
lastArgs = args;
|
|
@@ -2231,7 +2412,7 @@ function requireAxios () {
|
|
|
2231
2412
|
let bytesNotified = 0;
|
|
2232
2413
|
const _speedometer = speedometer(50, 250);
|
|
2233
2414
|
|
|
2234
|
-
return throttle(e => {
|
|
2415
|
+
return throttle((e) => {
|
|
2235
2416
|
const loaded = e.loaded;
|
|
2236
2417
|
const total = e.lengthComputable ? e.total : undefined;
|
|
2237
2418
|
const progressBytes = loaded - bytesNotified;
|
|
@@ -2243,13 +2424,13 @@ function requireAxios () {
|
|
|
2243
2424
|
const data = {
|
|
2244
2425
|
loaded,
|
|
2245
2426
|
total,
|
|
2246
|
-
progress: total ?
|
|
2427
|
+
progress: total ? loaded / total : undefined,
|
|
2247
2428
|
bytes: progressBytes,
|
|
2248
2429
|
rate: rate ? rate : undefined,
|
|
2249
2430
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
2250
2431
|
event: e,
|
|
2251
2432
|
lengthComputable: total != null,
|
|
2252
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
2433
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
2253
2434
|
};
|
|
2254
2435
|
|
|
2255
2436
|
listener(data);
|
|
@@ -2259,77 +2440,82 @@ function requireAxios () {
|
|
|
2259
2440
|
const progressEventDecorator = (total, throttled) => {
|
|
2260
2441
|
const lengthComputable = total != null;
|
|
2261
2442
|
|
|
2262
|
-
return [
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2443
|
+
return [
|
|
2444
|
+
(loaded) =>
|
|
2445
|
+
throttled[0]({
|
|
2446
|
+
lengthComputable,
|
|
2447
|
+
total,
|
|
2448
|
+
loaded,
|
|
2449
|
+
}),
|
|
2450
|
+
throttled[1],
|
|
2451
|
+
];
|
|
2267
2452
|
};
|
|
2268
2453
|
|
|
2269
|
-
const asyncDecorator =
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
return (
|
|
2275
|
-
origin.protocol === url.protocol &&
|
|
2276
|
-
origin.host === url.host &&
|
|
2277
|
-
(isMSIE || origin.port === url.port)
|
|
2278
|
-
);
|
|
2279
|
-
})(
|
|
2280
|
-
new URL(platform.origin),
|
|
2281
|
-
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
2282
|
-
) : () => true;
|
|
2454
|
+
const asyncDecorator =
|
|
2455
|
+
(fn) =>
|
|
2456
|
+
(...args) =>
|
|
2457
|
+
utils$1.asap(() => fn(...args));
|
|
2283
2458
|
|
|
2284
|
-
var
|
|
2459
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
2460
|
+
? ((origin, isMSIE) => (url) => {
|
|
2461
|
+
url = new URL(url, platform.origin);
|
|
2285
2462
|
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
cookie
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2463
|
+
return (
|
|
2464
|
+
origin.protocol === url.protocol &&
|
|
2465
|
+
origin.host === url.host &&
|
|
2466
|
+
(isMSIE || origin.port === url.port)
|
|
2467
|
+
);
|
|
2468
|
+
})(
|
|
2469
|
+
new URL(platform.origin),
|
|
2470
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
2471
|
+
)
|
|
2472
|
+
: () => true;
|
|
2473
|
+
|
|
2474
|
+
var cookies = platform.hasStandardBrowserEnv
|
|
2475
|
+
? // Standard browser envs support document.cookie
|
|
2476
|
+
{
|
|
2477
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
2478
|
+
if (typeof document === 'undefined') return;
|
|
2479
|
+
|
|
2480
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
2481
|
+
|
|
2482
|
+
if (utils$1.isNumber(expires)) {
|
|
2483
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
2484
|
+
}
|
|
2485
|
+
if (utils$1.isString(path)) {
|
|
2486
|
+
cookie.push(`path=${path}`);
|
|
2487
|
+
}
|
|
2488
|
+
if (utils$1.isString(domain)) {
|
|
2489
|
+
cookie.push(`domain=${domain}`);
|
|
2490
|
+
}
|
|
2491
|
+
if (secure === true) {
|
|
2492
|
+
cookie.push('secure');
|
|
2493
|
+
}
|
|
2494
|
+
if (utils$1.isString(sameSite)) {
|
|
2495
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
2496
|
+
}
|
|
2308
2497
|
|
|
2309
|
-
|
|
2310
|
-
|
|
2498
|
+
document.cookie = cookie.join('; ');
|
|
2499
|
+
},
|
|
2311
2500
|
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2501
|
+
read(name) {
|
|
2502
|
+
if (typeof document === 'undefined') return null;
|
|
2503
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
2504
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
2505
|
+
},
|
|
2317
2506
|
|
|
2318
|
-
|
|
2319
|
-
|
|
2507
|
+
remove(name) {
|
|
2508
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
2509
|
+
},
|
|
2320
2510
|
}
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
return null;
|
|
2330
|
-
},
|
|
2331
|
-
remove() {}
|
|
2332
|
-
};
|
|
2511
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
2512
|
+
{
|
|
2513
|
+
write() {},
|
|
2514
|
+
read() {
|
|
2515
|
+
return null;
|
|
2516
|
+
},
|
|
2517
|
+
remove() {},
|
|
2518
|
+
};
|
|
2333
2519
|
|
|
2334
2520
|
/**
|
|
2335
2521
|
* Determines whether the specified URL is absolute
|
|
@@ -2381,8 +2567,7 @@ function requireAxios () {
|
|
|
2381
2567
|
return requestedURL;
|
|
2382
2568
|
}
|
|
2383
2569
|
|
|
2384
|
-
const headersToObject = (thing) =>
|
|
2385
|
-
thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
2570
|
+
const headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);
|
|
2386
2571
|
|
|
2387
2572
|
/**
|
|
2388
2573
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -2475,23 +2660,12 @@ function requireAxios () {
|
|
|
2475
2660
|
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
2476
2661
|
};
|
|
2477
2662
|
|
|
2478
|
-
utils$1.forEach(
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
prop === "prototype"
|
|
2485
|
-
)
|
|
2486
|
-
return;
|
|
2487
|
-
const merge = utils$1.hasOwnProp(mergeMap, prop)
|
|
2488
|
-
? mergeMap[prop]
|
|
2489
|
-
: mergeDeepProperties;
|
|
2490
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
2491
|
-
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
2492
|
-
(config[prop] = configValue);
|
|
2493
|
-
},
|
|
2494
|
-
);
|
|
2663
|
+
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
2664
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
2665
|
+
const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
2666
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
2667
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
2668
|
+
});
|
|
2495
2669
|
|
|
2496
2670
|
return config;
|
|
2497
2671
|
}
|
|
@@ -2501,14 +2675,24 @@ function requireAxios () {
|
|
|
2501
2675
|
|
|
2502
2676
|
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
2503
2677
|
|
|
2504
|
-
newConfig.headers = headers = AxiosHeaders
|
|
2678
|
+
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
2505
2679
|
|
|
2506
|
-
newConfig.url = buildURL(
|
|
2680
|
+
newConfig.url = buildURL(
|
|
2681
|
+
buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
2682
|
+
config.params,
|
|
2683
|
+
config.paramsSerializer
|
|
2684
|
+
);
|
|
2507
2685
|
|
|
2508
2686
|
// HTTP basic authentication
|
|
2509
2687
|
if (auth) {
|
|
2510
|
-
headers.set(
|
|
2511
|
-
|
|
2688
|
+
headers.set(
|
|
2689
|
+
'Authorization',
|
|
2690
|
+
'Basic ' +
|
|
2691
|
+
btoa(
|
|
2692
|
+
(auth.username || '') +
|
|
2693
|
+
':' +
|
|
2694
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
2695
|
+
)
|
|
2512
2696
|
);
|
|
2513
2697
|
}
|
|
2514
2698
|
|
|
@@ -2526,7 +2710,7 @@ function requireAxios () {
|
|
|
2526
2710
|
}
|
|
2527
2711
|
});
|
|
2528
2712
|
}
|
|
2529
|
-
}
|
|
2713
|
+
}
|
|
2530
2714
|
|
|
2531
2715
|
// Add xsrf header
|
|
2532
2716
|
// This is only done if running in a standard browser environment.
|
|
@@ -2550,196 +2734,218 @@ function requireAxios () {
|
|
|
2550
2734
|
|
|
2551
2735
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
2552
2736
|
|
|
2553
|
-
var xhrAdapter = isXHRAdapterSupported &&
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2737
|
+
var xhrAdapter = isXHRAdapterSupported &&
|
|
2738
|
+
function (config) {
|
|
2739
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
2740
|
+
const _config = resolveConfig(config);
|
|
2741
|
+
let requestData = _config.data;
|
|
2742
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
2743
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
2744
|
+
let onCanceled;
|
|
2745
|
+
let uploadThrottled, downloadThrottled;
|
|
2746
|
+
let flushUpload, flushDownload;
|
|
2562
2747
|
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2748
|
+
function done() {
|
|
2749
|
+
flushUpload && flushUpload(); // flush events
|
|
2750
|
+
flushDownload && flushDownload(); // flush events
|
|
2566
2751
|
|
|
2567
|
-
|
|
2752
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
2568
2753
|
|
|
2569
|
-
|
|
2570
|
-
|
|
2754
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
2755
|
+
}
|
|
2571
2756
|
|
|
2572
|
-
|
|
2757
|
+
let request = new XMLHttpRequest();
|
|
2573
2758
|
|
|
2574
|
-
|
|
2759
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
2575
2760
|
|
|
2576
|
-
|
|
2577
|
-
|
|
2761
|
+
// Set the request timeout in MS
|
|
2762
|
+
request.timeout = _config.timeout;
|
|
2578
2763
|
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2764
|
+
function onloadend() {
|
|
2765
|
+
if (!request) {
|
|
2766
|
+
return;
|
|
2767
|
+
}
|
|
2768
|
+
// Prepare the response
|
|
2769
|
+
const responseHeaders = AxiosHeaders.from(
|
|
2770
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
2771
|
+
);
|
|
2772
|
+
const responseData =
|
|
2773
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
2774
|
+
? request.responseText
|
|
2775
|
+
: request.response;
|
|
2776
|
+
const response = {
|
|
2777
|
+
data: responseData,
|
|
2778
|
+
status: request.status,
|
|
2779
|
+
statusText: request.statusText,
|
|
2780
|
+
headers: responseHeaders,
|
|
2781
|
+
config,
|
|
2782
|
+
request,
|
|
2783
|
+
};
|
|
2784
|
+
|
|
2785
|
+
settle(
|
|
2786
|
+
function _resolve(value) {
|
|
2787
|
+
resolve(value);
|
|
2788
|
+
done();
|
|
2789
|
+
},
|
|
2790
|
+
function _reject(err) {
|
|
2791
|
+
reject(err);
|
|
2792
|
+
done();
|
|
2793
|
+
},
|
|
2794
|
+
response
|
|
2795
|
+
);
|
|
2796
|
+
|
|
2797
|
+
// Clean up request
|
|
2798
|
+
request = null;
|
|
2582
2799
|
}
|
|
2583
|
-
// Prepare the response
|
|
2584
|
-
const responseHeaders = AxiosHeaders$1.from(
|
|
2585
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
2586
|
-
);
|
|
2587
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
2588
|
-
request.responseText : request.response;
|
|
2589
|
-
const response = {
|
|
2590
|
-
data: responseData,
|
|
2591
|
-
status: request.status,
|
|
2592
|
-
statusText: request.statusText,
|
|
2593
|
-
headers: responseHeaders,
|
|
2594
|
-
config,
|
|
2595
|
-
request
|
|
2596
|
-
};
|
|
2597
2800
|
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2801
|
+
if ('onloadend' in request) {
|
|
2802
|
+
// Use onloadend if available
|
|
2803
|
+
request.onloadend = onloadend;
|
|
2804
|
+
} else {
|
|
2805
|
+
// Listen for ready state to emulate onloadend
|
|
2806
|
+
request.onreadystatechange = function handleLoad() {
|
|
2807
|
+
if (!request || request.readyState !== 4) {
|
|
2808
|
+
return;
|
|
2809
|
+
}
|
|
2605
2810
|
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2811
|
+
// The request errored out and we didn't get a response, this will be
|
|
2812
|
+
// handled by onerror instead
|
|
2813
|
+
// With one exception: request that using file: protocol, most browsers
|
|
2814
|
+
// will return status as 0 even though it's a successful request
|
|
2815
|
+
if (
|
|
2816
|
+
request.status === 0 &&
|
|
2817
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
2818
|
+
) {
|
|
2819
|
+
return;
|
|
2820
|
+
}
|
|
2821
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
2822
|
+
// so we should call onloadend on the next 'tick'
|
|
2823
|
+
setTimeout(onloadend);
|
|
2824
|
+
};
|
|
2825
|
+
}
|
|
2609
2826
|
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
} else {
|
|
2614
|
-
// Listen for ready state to emulate onloadend
|
|
2615
|
-
request.onreadystatechange = function handleLoad() {
|
|
2616
|
-
if (!request || request.readyState !== 4) {
|
|
2827
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
2828
|
+
request.onabort = function handleAbort() {
|
|
2829
|
+
if (!request) {
|
|
2617
2830
|
return;
|
|
2618
2831
|
}
|
|
2619
2832
|
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
//
|
|
2623
|
-
|
|
2624
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
2625
|
-
return;
|
|
2626
|
-
}
|
|
2627
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
2628
|
-
// so we should call onloadend on the next 'tick'
|
|
2629
|
-
setTimeout(onloadend);
|
|
2833
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
2834
|
+
|
|
2835
|
+
// Clean up request
|
|
2836
|
+
request = null;
|
|
2630
2837
|
};
|
|
2631
|
-
}
|
|
2632
2838
|
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2839
|
+
// Handle low level network errors
|
|
2840
|
+
request.onerror = function handleError(event) {
|
|
2841
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
2842
|
+
// (message may be empty; when present, surface it)
|
|
2843
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
2844
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
2845
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
2846
|
+
// attach the underlying event for consumers who want details
|
|
2847
|
+
err.event = event || null;
|
|
2848
|
+
reject(err);
|
|
2849
|
+
request = null;
|
|
2850
|
+
};
|
|
2638
2851
|
|
|
2639
|
-
|
|
2852
|
+
// Handle timeout
|
|
2853
|
+
request.ontimeout = function handleTimeout() {
|
|
2854
|
+
let timeoutErrorMessage = _config.timeout
|
|
2855
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
2856
|
+
: 'timeout exceeded';
|
|
2857
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
2858
|
+
if (_config.timeoutErrorMessage) {
|
|
2859
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
2860
|
+
}
|
|
2861
|
+
reject(
|
|
2862
|
+
new AxiosError(
|
|
2863
|
+
timeoutErrorMessage,
|
|
2864
|
+
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
2865
|
+
config,
|
|
2866
|
+
request
|
|
2867
|
+
)
|
|
2868
|
+
);
|
|
2640
2869
|
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2870
|
+
// Clean up request
|
|
2871
|
+
request = null;
|
|
2872
|
+
};
|
|
2644
2873
|
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
// Browsers deliver a ProgressEvent in XHR onerror
|
|
2648
|
-
// (message may be empty; when present, surface it)
|
|
2649
|
-
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
2650
|
-
const msg = event && event.message ? event.message : 'Network Error';
|
|
2651
|
-
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
2652
|
-
// attach the underlying event for consumers who want details
|
|
2653
|
-
err.event = event || null;
|
|
2654
|
-
reject(err);
|
|
2655
|
-
request = null;
|
|
2656
|
-
};
|
|
2657
|
-
|
|
2658
|
-
// Handle timeout
|
|
2659
|
-
request.ontimeout = function handleTimeout() {
|
|
2660
|
-
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
2661
|
-
const transitional = _config.transitional || transitionalDefaults;
|
|
2662
|
-
if (_config.timeoutErrorMessage) {
|
|
2663
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
2664
|
-
}
|
|
2665
|
-
reject(new AxiosError$1(
|
|
2666
|
-
timeoutErrorMessage,
|
|
2667
|
-
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
2668
|
-
config,
|
|
2669
|
-
request));
|
|
2670
|
-
|
|
2671
|
-
// Clean up request
|
|
2672
|
-
request = null;
|
|
2673
|
-
};
|
|
2874
|
+
// Remove Content-Type if data is undefined
|
|
2875
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
2674
2876
|
|
|
2675
|
-
|
|
2676
|
-
|
|
2877
|
+
// Add headers to the request
|
|
2878
|
+
if ('setRequestHeader' in request) {
|
|
2879
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
2880
|
+
request.setRequestHeader(key, val);
|
|
2881
|
+
});
|
|
2882
|
+
}
|
|
2677
2883
|
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
});
|
|
2683
|
-
}
|
|
2884
|
+
// Add withCredentials to request if needed
|
|
2885
|
+
if (!utils$1.isUndefined(_config.withCredentials)) {
|
|
2886
|
+
request.withCredentials = !!_config.withCredentials;
|
|
2887
|
+
}
|
|
2684
2888
|
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2889
|
+
// Add responseType to request if needed
|
|
2890
|
+
if (responseType && responseType !== 'json') {
|
|
2891
|
+
request.responseType = _config.responseType;
|
|
2892
|
+
}
|
|
2689
2893
|
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2894
|
+
// Handle progress if needed
|
|
2895
|
+
if (onDownloadProgress) {
|
|
2896
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
2897
|
+
request.addEventListener('progress', downloadThrottled);
|
|
2898
|
+
}
|
|
2694
2899
|
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
request.addEventListener('progress', downloadThrottled);
|
|
2699
|
-
}
|
|
2900
|
+
// Not all browsers support upload events
|
|
2901
|
+
if (onUploadProgress && request.upload) {
|
|
2902
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
2700
2903
|
|
|
2701
|
-
|
|
2702
|
-
if (onUploadProgress && request.upload) {
|
|
2703
|
-
([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
|
|
2904
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
2704
2905
|
|
|
2705
|
-
|
|
2906
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
2907
|
+
}
|
|
2706
2908
|
|
|
2707
|
-
|
|
2708
|
-
|
|
2909
|
+
if (_config.cancelToken || _config.signal) {
|
|
2910
|
+
// Handle cancellation
|
|
2911
|
+
// eslint-disable-next-line func-names
|
|
2912
|
+
onCanceled = (cancel) => {
|
|
2913
|
+
if (!request) {
|
|
2914
|
+
return;
|
|
2915
|
+
}
|
|
2916
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
2917
|
+
request.abort();
|
|
2918
|
+
request = null;
|
|
2919
|
+
};
|
|
2709
2920
|
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
return;
|
|
2921
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
2922
|
+
if (_config.signal) {
|
|
2923
|
+
_config.signal.aborted
|
|
2924
|
+
? onCanceled()
|
|
2925
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
2716
2926
|
}
|
|
2717
|
-
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
2718
|
-
request.abort();
|
|
2719
|
-
request = null;
|
|
2720
|
-
};
|
|
2721
|
-
|
|
2722
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
2723
|
-
if (_config.signal) {
|
|
2724
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
2725
2927
|
}
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
const protocol = parseProtocol(_config.url);
|
|
2729
2928
|
|
|
2730
|
-
|
|
2731
|
-
reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
|
|
2732
|
-
return;
|
|
2733
|
-
}
|
|
2929
|
+
const protocol = parseProtocol(_config.url);
|
|
2734
2930
|
|
|
2931
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
2932
|
+
reject(
|
|
2933
|
+
new AxiosError(
|
|
2934
|
+
'Unsupported protocol ' + protocol + ':',
|
|
2935
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
2936
|
+
config
|
|
2937
|
+
)
|
|
2938
|
+
);
|
|
2939
|
+
return;
|
|
2940
|
+
}
|
|
2735
2941
|
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2942
|
+
// Send the request
|
|
2943
|
+
request.send(requestData || null);
|
|
2944
|
+
});
|
|
2945
|
+
};
|
|
2740
2946
|
|
|
2741
2947
|
const composeSignals = (signals, timeout) => {
|
|
2742
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
2948
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
2743
2949
|
|
|
2744
2950
|
if (timeout || length) {
|
|
2745
2951
|
let controller = new AbortController();
|
|
@@ -2751,21 +2957,29 @@ function requireAxios () {
|
|
|
2751
2957
|
aborted = true;
|
|
2752
2958
|
unsubscribe();
|
|
2753
2959
|
const err = reason instanceof Error ? reason : this.reason;
|
|
2754
|
-
controller.abort(
|
|
2960
|
+
controller.abort(
|
|
2961
|
+
err instanceof AxiosError
|
|
2962
|
+
? err
|
|
2963
|
+
: new CanceledError(err instanceof Error ? err.message : err)
|
|
2964
|
+
);
|
|
2755
2965
|
}
|
|
2756
2966
|
};
|
|
2757
2967
|
|
|
2758
|
-
let timer =
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2968
|
+
let timer =
|
|
2969
|
+
timeout &&
|
|
2970
|
+
setTimeout(() => {
|
|
2971
|
+
timer = null;
|
|
2972
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
2973
|
+
}, timeout);
|
|
2762
2974
|
|
|
2763
2975
|
const unsubscribe = () => {
|
|
2764
2976
|
if (signals) {
|
|
2765
2977
|
timer && clearTimeout(timer);
|
|
2766
2978
|
timer = null;
|
|
2767
|
-
signals.forEach(signal => {
|
|
2768
|
-
signal.unsubscribe
|
|
2979
|
+
signals.forEach((signal) => {
|
|
2980
|
+
signal.unsubscribe
|
|
2981
|
+
? signal.unsubscribe(onabort)
|
|
2982
|
+
: signal.removeEventListener('abort', onabort);
|
|
2769
2983
|
});
|
|
2770
2984
|
signals = null;
|
|
2771
2985
|
}
|
|
@@ -2773,7 +2987,7 @@ function requireAxios () {
|
|
|
2773
2987
|
|
|
2774
2988
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
2775
2989
|
|
|
2776
|
-
const {signal} = controller;
|
|
2990
|
+
const { signal } = controller;
|
|
2777
2991
|
|
|
2778
2992
|
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
2779
2993
|
|
|
@@ -2781,8 +2995,6 @@ function requireAxios () {
|
|
|
2781
2995
|
}
|
|
2782
2996
|
};
|
|
2783
2997
|
|
|
2784
|
-
var composeSignals$1 = composeSignals;
|
|
2785
|
-
|
|
2786
2998
|
const streamChunk = function* (chunk, chunkSize) {
|
|
2787
2999
|
let len = chunk.byteLength;
|
|
2788
3000
|
|
|
@@ -2816,7 +3028,7 @@ function requireAxios () {
|
|
|
2816
3028
|
const reader = stream.getReader();
|
|
2817
3029
|
try {
|
|
2818
3030
|
for (;;) {
|
|
2819
|
-
const {done, value} = await reader.read();
|
|
3031
|
+
const { done, value } = await reader.read();
|
|
2820
3032
|
if (done) {
|
|
2821
3033
|
break;
|
|
2822
3034
|
}
|
|
@@ -2839,64 +3051,69 @@ function requireAxios () {
|
|
|
2839
3051
|
}
|
|
2840
3052
|
};
|
|
2841
3053
|
|
|
2842
|
-
return new ReadableStream(
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
3054
|
+
return new ReadableStream(
|
|
3055
|
+
{
|
|
3056
|
+
async pull(controller) {
|
|
3057
|
+
try {
|
|
3058
|
+
const { done, value } = await iterator.next();
|
|
2846
3059
|
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
3060
|
+
if (done) {
|
|
3061
|
+
_onFinish();
|
|
3062
|
+
controller.close();
|
|
3063
|
+
return;
|
|
3064
|
+
}
|
|
2852
3065
|
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
3066
|
+
let len = value.byteLength;
|
|
3067
|
+
if (onProgress) {
|
|
3068
|
+
let loadedBytes = (bytes += len);
|
|
3069
|
+
onProgress(loadedBytes);
|
|
3070
|
+
}
|
|
3071
|
+
controller.enqueue(new Uint8Array(value));
|
|
3072
|
+
} catch (err) {
|
|
3073
|
+
_onFinish(err);
|
|
3074
|
+
throw err;
|
|
2857
3075
|
}
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
_onFinish(
|
|
2861
|
-
|
|
2862
|
-
}
|
|
3076
|
+
},
|
|
3077
|
+
cancel(reason) {
|
|
3078
|
+
_onFinish(reason);
|
|
3079
|
+
return iterator.return();
|
|
3080
|
+
},
|
|
2863
3081
|
},
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
return iterator.return();
|
|
3082
|
+
{
|
|
3083
|
+
highWaterMark: 2,
|
|
2867
3084
|
}
|
|
2868
|
-
|
|
2869
|
-
highWaterMark: 2
|
|
2870
|
-
})
|
|
3085
|
+
);
|
|
2871
3086
|
};
|
|
2872
3087
|
|
|
2873
3088
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
2874
3089
|
|
|
2875
|
-
const {isFunction} = utils$1;
|
|
3090
|
+
const { isFunction } = utils$1;
|
|
2876
3091
|
|
|
2877
|
-
const globalFetchAPI = (({Request, Response}) => ({
|
|
2878
|
-
Request,
|
|
3092
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
3093
|
+
Request,
|
|
3094
|
+
Response,
|
|
2879
3095
|
}))(utils$1.global);
|
|
2880
3096
|
|
|
2881
|
-
const {
|
|
2882
|
-
ReadableStream: ReadableStream$1, TextEncoder
|
|
2883
|
-
} = utils$1.global;
|
|
2884
|
-
|
|
3097
|
+
const { ReadableStream: ReadableStream$1, TextEncoder } = utils$1.global;
|
|
2885
3098
|
|
|
2886
3099
|
const test = (fn, ...args) => {
|
|
2887
3100
|
try {
|
|
2888
3101
|
return !!fn(...args);
|
|
2889
3102
|
} catch (e) {
|
|
2890
|
-
return false
|
|
3103
|
+
return false;
|
|
2891
3104
|
}
|
|
2892
3105
|
};
|
|
2893
3106
|
|
|
2894
3107
|
const factory = (env) => {
|
|
2895
|
-
env = utils$1.merge.call(
|
|
2896
|
-
|
|
2897
|
-
|
|
3108
|
+
env = utils$1.merge.call(
|
|
3109
|
+
{
|
|
3110
|
+
skipUndefined: true,
|
|
3111
|
+
},
|
|
3112
|
+
globalFetchAPI,
|
|
3113
|
+
env
|
|
3114
|
+
);
|
|
2898
3115
|
|
|
2899
|
-
const {fetch: envFetch, Request, Response} = env;
|
|
3116
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
2900
3117
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
2901
3118
|
const isRequestSupported = isFunction(Request);
|
|
2902
3119
|
const isResponseSupported = isFunction(Response);
|
|
@@ -2907,46 +3124,65 @@ function requireAxios () {
|
|
|
2907
3124
|
|
|
2908
3125
|
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
2909
3126
|
|
|
2910
|
-
const encodeText =
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
3127
|
+
const encodeText =
|
|
3128
|
+
isFetchSupported &&
|
|
3129
|
+
(typeof TextEncoder === 'function'
|
|
3130
|
+
? (
|
|
3131
|
+
(encoder) => (str) =>
|
|
3132
|
+
encoder.encode(str)
|
|
3133
|
+
)(new TextEncoder())
|
|
3134
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
2914
3135
|
|
|
2915
|
-
const supportsRequestStream =
|
|
2916
|
-
|
|
3136
|
+
const supportsRequestStream =
|
|
3137
|
+
isRequestSupported &&
|
|
3138
|
+
isReadableStreamSupported &&
|
|
3139
|
+
test(() => {
|
|
3140
|
+
let duplexAccessed = false;
|
|
2917
3141
|
|
|
2918
|
-
|
|
2919
|
-
body: new ReadableStream$1(),
|
|
2920
|
-
method: 'POST',
|
|
2921
|
-
get duplex() {
|
|
2922
|
-
duplexAccessed = true;
|
|
2923
|
-
return 'half';
|
|
2924
|
-
},
|
|
2925
|
-
}).headers.has('Content-Type');
|
|
3142
|
+
const body = new ReadableStream$1();
|
|
2926
3143
|
|
|
2927
|
-
|
|
2928
|
-
|
|
3144
|
+
const hasContentType = new Request(platform.origin, {
|
|
3145
|
+
body,
|
|
3146
|
+
method: 'POST',
|
|
3147
|
+
get duplex() {
|
|
3148
|
+
duplexAccessed = true;
|
|
3149
|
+
return 'half';
|
|
3150
|
+
},
|
|
3151
|
+
}).headers.has('Content-Type');
|
|
3152
|
+
|
|
3153
|
+
body.cancel();
|
|
3154
|
+
|
|
3155
|
+
return duplexAccessed && !hasContentType;
|
|
3156
|
+
});
|
|
2929
3157
|
|
|
2930
|
-
const supportsResponseStream =
|
|
3158
|
+
const supportsResponseStream =
|
|
3159
|
+
isResponseSupported &&
|
|
3160
|
+
isReadableStreamSupported &&
|
|
2931
3161
|
test(() => utils$1.isReadableStream(new Response('').body));
|
|
2932
3162
|
|
|
2933
3163
|
const resolvers = {
|
|
2934
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
3164
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
2935
3165
|
};
|
|
2936
3166
|
|
|
2937
|
-
isFetchSupported &&
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
3167
|
+
isFetchSupported &&
|
|
3168
|
+
(() => {
|
|
3169
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
3170
|
+
!resolvers[type] &&
|
|
3171
|
+
(resolvers[type] = (res, config) => {
|
|
3172
|
+
let method = res && res[type];
|
|
2941
3173
|
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
3174
|
+
if (method) {
|
|
3175
|
+
return method.call(res);
|
|
3176
|
+
}
|
|
2945
3177
|
|
|
2946
|
-
|
|
3178
|
+
throw new AxiosError(
|
|
3179
|
+
`Response type '${type}' is not supported`,
|
|
3180
|
+
AxiosError.ERR_NOT_SUPPORT,
|
|
3181
|
+
config
|
|
3182
|
+
);
|
|
3183
|
+
});
|
|
2947
3184
|
});
|
|
2948
|
-
});
|
|
2949
|
-
})());
|
|
3185
|
+
})();
|
|
2950
3186
|
|
|
2951
3187
|
const getBodyLength = async (body) => {
|
|
2952
3188
|
if (body == null) {
|
|
@@ -2997,32 +3233,41 @@ function requireAxios () {
|
|
|
2997
3233
|
responseType,
|
|
2998
3234
|
headers,
|
|
2999
3235
|
withCredentials = 'same-origin',
|
|
3000
|
-
fetchOptions
|
|
3236
|
+
fetchOptions,
|
|
3001
3237
|
} = resolveConfig(config);
|
|
3002
3238
|
|
|
3003
3239
|
let _fetch = envFetch || fetch;
|
|
3004
3240
|
|
|
3005
3241
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
3006
3242
|
|
|
3007
|
-
let composedSignal = composeSignals
|
|
3243
|
+
let composedSignal = composeSignals(
|
|
3244
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
3245
|
+
timeout
|
|
3246
|
+
);
|
|
3008
3247
|
|
|
3009
3248
|
let request = null;
|
|
3010
3249
|
|
|
3011
|
-
const unsubscribe =
|
|
3012
|
-
composedSignal
|
|
3013
|
-
|
|
3250
|
+
const unsubscribe =
|
|
3251
|
+
composedSignal &&
|
|
3252
|
+
composedSignal.unsubscribe &&
|
|
3253
|
+
(() => {
|
|
3254
|
+
composedSignal.unsubscribe();
|
|
3255
|
+
});
|
|
3014
3256
|
|
|
3015
3257
|
let requestContentLength;
|
|
3016
3258
|
|
|
3017
3259
|
try {
|
|
3018
3260
|
if (
|
|
3019
|
-
onUploadProgress &&
|
|
3261
|
+
onUploadProgress &&
|
|
3262
|
+
supportsRequestStream &&
|
|
3263
|
+
method !== 'get' &&
|
|
3264
|
+
method !== 'head' &&
|
|
3020
3265
|
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
3021
3266
|
) {
|
|
3022
3267
|
let _request = new Request(url, {
|
|
3023
3268
|
method: 'POST',
|
|
3024
3269
|
body: data,
|
|
3025
|
-
duplex:
|
|
3270
|
+
duplex: 'half',
|
|
3026
3271
|
});
|
|
3027
3272
|
|
|
3028
3273
|
let contentTypeHeader;
|
|
@@ -3047,7 +3292,7 @@ function requireAxios () {
|
|
|
3047
3292
|
|
|
3048
3293
|
// Cloudflare Workers throws when credentials are defined
|
|
3049
3294
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
3050
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
3295
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
3051
3296
|
|
|
3052
3297
|
const resolvedOptions = {
|
|
3053
3298
|
...fetchOptions,
|
|
@@ -3055,29 +3300,35 @@ function requireAxios () {
|
|
|
3055
3300
|
method: method.toUpperCase(),
|
|
3056
3301
|
headers: headers.normalize().toJSON(),
|
|
3057
3302
|
body: data,
|
|
3058
|
-
duplex:
|
|
3059
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
3303
|
+
duplex: 'half',
|
|
3304
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
3060
3305
|
};
|
|
3061
3306
|
|
|
3062
3307
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
3063
3308
|
|
|
3064
|
-
let response = await (isRequestSupported
|
|
3309
|
+
let response = await (isRequestSupported
|
|
3310
|
+
? _fetch(request, fetchOptions)
|
|
3311
|
+
: _fetch(url, resolvedOptions));
|
|
3065
3312
|
|
|
3066
|
-
const isStreamResponse =
|
|
3313
|
+
const isStreamResponse =
|
|
3314
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
3067
3315
|
|
|
3068
3316
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
3069
3317
|
const options = {};
|
|
3070
3318
|
|
|
3071
|
-
['status', 'statusText', 'headers'].forEach(prop => {
|
|
3319
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
3072
3320
|
options[prop] = response[prop];
|
|
3073
3321
|
});
|
|
3074
3322
|
|
|
3075
3323
|
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
3076
3324
|
|
|
3077
|
-
const [onProgress, flush] =
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3325
|
+
const [onProgress, flush] =
|
|
3326
|
+
(onDownloadProgress &&
|
|
3327
|
+
progressEventDecorator(
|
|
3328
|
+
responseContentLength,
|
|
3329
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
3330
|
+
)) ||
|
|
3331
|
+
[];
|
|
3081
3332
|
|
|
3082
3333
|
response = new Response(
|
|
3083
3334
|
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
@@ -3090,54 +3341,64 @@ function requireAxios () {
|
|
|
3090
3341
|
|
|
3091
3342
|
responseType = responseType || 'text';
|
|
3092
3343
|
|
|
3093
|
-
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
|
|
3344
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
|
|
3345
|
+
response,
|
|
3346
|
+
config
|
|
3347
|
+
);
|
|
3094
3348
|
|
|
3095
3349
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
3096
3350
|
|
|
3097
3351
|
return await new Promise((resolve, reject) => {
|
|
3098
3352
|
settle(resolve, reject, {
|
|
3099
3353
|
data: responseData,
|
|
3100
|
-
headers: AxiosHeaders
|
|
3354
|
+
headers: AxiosHeaders.from(response.headers),
|
|
3101
3355
|
status: response.status,
|
|
3102
3356
|
statusText: response.statusText,
|
|
3103
3357
|
config,
|
|
3104
|
-
request
|
|
3358
|
+
request,
|
|
3105
3359
|
});
|
|
3106
|
-
})
|
|
3360
|
+
});
|
|
3107
3361
|
} catch (err) {
|
|
3108
3362
|
unsubscribe && unsubscribe();
|
|
3109
3363
|
|
|
3110
3364
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
3111
3365
|
throw Object.assign(
|
|
3112
|
-
new AxiosError
|
|
3366
|
+
new AxiosError(
|
|
3367
|
+
'Network Error',
|
|
3368
|
+
AxiosError.ERR_NETWORK,
|
|
3369
|
+
config,
|
|
3370
|
+
request,
|
|
3371
|
+
err && err.response
|
|
3372
|
+
),
|
|
3113
3373
|
{
|
|
3114
|
-
cause: err.cause || err
|
|
3374
|
+
cause: err.cause || err,
|
|
3115
3375
|
}
|
|
3116
|
-
)
|
|
3376
|
+
);
|
|
3117
3377
|
}
|
|
3118
3378
|
|
|
3119
|
-
throw AxiosError
|
|
3379
|
+
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
3120
3380
|
}
|
|
3121
|
-
}
|
|
3381
|
+
};
|
|
3122
3382
|
};
|
|
3123
3383
|
|
|
3124
3384
|
const seedCache = new Map();
|
|
3125
3385
|
|
|
3126
3386
|
const getFetch = (config) => {
|
|
3127
3387
|
let env = (config && config.env) || {};
|
|
3128
|
-
const {fetch, Request, Response} = env;
|
|
3129
|
-
const seeds = [
|
|
3130
|
-
Request, Response, fetch
|
|
3131
|
-
];
|
|
3388
|
+
const { fetch, Request, Response } = env;
|
|
3389
|
+
const seeds = [Request, Response, fetch];
|
|
3132
3390
|
|
|
3133
|
-
let len = seeds.length,
|
|
3134
|
-
|
|
3391
|
+
let len = seeds.length,
|
|
3392
|
+
i = len,
|
|
3393
|
+
seed,
|
|
3394
|
+
target,
|
|
3395
|
+
map = seedCache;
|
|
3135
3396
|
|
|
3136
3397
|
while (i--) {
|
|
3137
3398
|
seed = seeds[i];
|
|
3138
3399
|
target = map.get(seed);
|
|
3139
3400
|
|
|
3140
|
-
target === undefined && map.set(seed, target =
|
|
3401
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
3141
3402
|
|
|
3142
3403
|
map = target;
|
|
3143
3404
|
}
|
|
@@ -3153,7 +3414,7 @@ function requireAxios () {
|
|
|
3153
3414
|
* - `http` for Node.js
|
|
3154
3415
|
* - `xhr` for browsers
|
|
3155
3416
|
* - `fetch` for fetch API-based requests
|
|
3156
|
-
*
|
|
3417
|
+
*
|
|
3157
3418
|
* @type {Object<string, Function|Object>}
|
|
3158
3419
|
*/
|
|
3159
3420
|
const knownAdapters = {
|
|
@@ -3161,7 +3422,7 @@ function requireAxios () {
|
|
|
3161
3422
|
xhr: xhrAdapter,
|
|
3162
3423
|
fetch: {
|
|
3163
3424
|
get: getFetch,
|
|
3164
|
-
}
|
|
3425
|
+
},
|
|
3165
3426
|
};
|
|
3166
3427
|
|
|
3167
3428
|
// Assign adapter names for easier debugging and identification
|
|
@@ -3178,7 +3439,7 @@ function requireAxios () {
|
|
|
3178
3439
|
|
|
3179
3440
|
/**
|
|
3180
3441
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
3181
|
-
*
|
|
3442
|
+
*
|
|
3182
3443
|
* @param {string} reason
|
|
3183
3444
|
* @returns {string}
|
|
3184
3445
|
*/
|
|
@@ -3186,17 +3447,18 @@ function requireAxios () {
|
|
|
3186
3447
|
|
|
3187
3448
|
/**
|
|
3188
3449
|
* Check if the adapter is resolved (function, null, or false)
|
|
3189
|
-
*
|
|
3450
|
+
*
|
|
3190
3451
|
* @param {Function|null|false} adapter
|
|
3191
3452
|
* @returns {boolean}
|
|
3192
3453
|
*/
|
|
3193
|
-
const isResolvedHandle = (adapter) =>
|
|
3454
|
+
const isResolvedHandle = (adapter) =>
|
|
3455
|
+
utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
3194
3456
|
|
|
3195
3457
|
/**
|
|
3196
3458
|
* Get the first suitable adapter from the provided list.
|
|
3197
3459
|
* Tries each adapter in order until a supported one is found.
|
|
3198
3460
|
* Throws an AxiosError if no adapter is suitable.
|
|
3199
|
-
*
|
|
3461
|
+
*
|
|
3200
3462
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
3201
3463
|
* @param {Object} config - Axios request configuration
|
|
3202
3464
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -3221,7 +3483,7 @@ function requireAxios () {
|
|
|
3221
3483
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
3222
3484
|
|
|
3223
3485
|
if (adapter === undefined) {
|
|
3224
|
-
throw new AxiosError
|
|
3486
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
3225
3487
|
}
|
|
3226
3488
|
}
|
|
3227
3489
|
|
|
@@ -3233,16 +3495,19 @@ function requireAxios () {
|
|
|
3233
3495
|
}
|
|
3234
3496
|
|
|
3235
3497
|
if (!adapter) {
|
|
3236
|
-
const reasons = Object.entries(rejectedReasons)
|
|
3237
|
-
|
|
3498
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
3499
|
+
([id, state]) =>
|
|
3500
|
+
`adapter ${id} ` +
|
|
3238
3501
|
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
3239
|
-
|
|
3502
|
+
);
|
|
3240
3503
|
|
|
3241
|
-
let s = length
|
|
3242
|
-
|
|
3243
|
-
|
|
3504
|
+
let s = length
|
|
3505
|
+
? reasons.length > 1
|
|
3506
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
3507
|
+
: ' ' + renderReason(reasons[0])
|
|
3508
|
+
: 'as no adapter specified';
|
|
3244
3509
|
|
|
3245
|
-
throw new AxiosError
|
|
3510
|
+
throw new AxiosError(
|
|
3246
3511
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
3247
3512
|
'ERR_NOT_SUPPORT'
|
|
3248
3513
|
);
|
|
@@ -3265,7 +3530,7 @@ function requireAxios () {
|
|
|
3265
3530
|
* Exposes all known adapters
|
|
3266
3531
|
* @type {Object<string, Function|Object>}
|
|
3267
3532
|
*/
|
|
3268
|
-
adapters: knownAdapters
|
|
3533
|
+
adapters: knownAdapters,
|
|
3269
3534
|
};
|
|
3270
3535
|
|
|
3271
3536
|
/**
|
|
@@ -3281,7 +3546,7 @@ function requireAxios () {
|
|
|
3281
3546
|
}
|
|
3282
3547
|
|
|
3283
3548
|
if (config.signal && config.signal.aborted) {
|
|
3284
|
-
throw new CanceledError
|
|
3549
|
+
throw new CanceledError(null, config);
|
|
3285
3550
|
}
|
|
3286
3551
|
}
|
|
3287
3552
|
|
|
@@ -3295,53 +3560,49 @@ function requireAxios () {
|
|
|
3295
3560
|
function dispatchRequest(config) {
|
|
3296
3561
|
throwIfCancellationRequested(config);
|
|
3297
3562
|
|
|
3298
|
-
config.headers = AxiosHeaders
|
|
3563
|
+
config.headers = AxiosHeaders.from(config.headers);
|
|
3299
3564
|
|
|
3300
3565
|
// Transform request data
|
|
3301
|
-
config.data = transformData.call(
|
|
3302
|
-
config,
|
|
3303
|
-
config.transformRequest
|
|
3304
|
-
);
|
|
3566
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
3305
3567
|
|
|
3306
3568
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
3307
3569
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
3308
3570
|
}
|
|
3309
3571
|
|
|
3310
|
-
const adapter = adapters.getAdapter(config.adapter || defaults
|
|
3572
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
3311
3573
|
|
|
3312
|
-
return adapter(config).then(
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
// Transform response data
|
|
3316
|
-
response.data = transformData.call(
|
|
3317
|
-
config,
|
|
3318
|
-
config.transformResponse,
|
|
3319
|
-
response
|
|
3320
|
-
);
|
|
3321
|
-
|
|
3322
|
-
response.headers = AxiosHeaders$1.from(response.headers);
|
|
3323
|
-
|
|
3324
|
-
return response;
|
|
3325
|
-
}, function onAdapterRejection(reason) {
|
|
3326
|
-
if (!isCancel(reason)) {
|
|
3574
|
+
return adapter(config).then(
|
|
3575
|
+
function onAdapterResolution(response) {
|
|
3327
3576
|
throwIfCancellationRequested(config);
|
|
3328
3577
|
|
|
3329
3578
|
// Transform response data
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3579
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
3580
|
+
|
|
3581
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
3582
|
+
|
|
3583
|
+
return response;
|
|
3584
|
+
},
|
|
3585
|
+
function onAdapterRejection(reason) {
|
|
3586
|
+
if (!isCancel(reason)) {
|
|
3587
|
+
throwIfCancellationRequested(config);
|
|
3588
|
+
|
|
3589
|
+
// Transform response data
|
|
3590
|
+
if (reason && reason.response) {
|
|
3591
|
+
reason.response.data = transformData.call(
|
|
3592
|
+
config,
|
|
3593
|
+
config.transformResponse,
|
|
3594
|
+
reason.response
|
|
3595
|
+
);
|
|
3596
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
3597
|
+
}
|
|
3337
3598
|
}
|
|
3338
|
-
}
|
|
3339
3599
|
|
|
3340
|
-
|
|
3341
|
-
|
|
3600
|
+
return Promise.reject(reason);
|
|
3601
|
+
}
|
|
3602
|
+
);
|
|
3342
3603
|
}
|
|
3343
3604
|
|
|
3344
|
-
const VERSION = "1.
|
|
3605
|
+
const VERSION = "1.15.0";
|
|
3345
3606
|
|
|
3346
3607
|
const validators$1 = {};
|
|
3347
3608
|
|
|
@@ -3365,15 +3626,23 @@ function requireAxios () {
|
|
|
3365
3626
|
*/
|
|
3366
3627
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
3367
3628
|
function formatMessage(opt, desc) {
|
|
3368
|
-
return
|
|
3629
|
+
return (
|
|
3630
|
+
'[Axios v' +
|
|
3631
|
+
VERSION +
|
|
3632
|
+
"] Transitional option '" +
|
|
3633
|
+
opt +
|
|
3634
|
+
"'" +
|
|
3635
|
+
desc +
|
|
3636
|
+
(message ? '. ' + message : '')
|
|
3637
|
+
);
|
|
3369
3638
|
}
|
|
3370
3639
|
|
|
3371
3640
|
// eslint-disable-next-line func-names
|
|
3372
3641
|
return (value, opt, opts) => {
|
|
3373
3642
|
if (validator === false) {
|
|
3374
|
-
throw new AxiosError
|
|
3643
|
+
throw new AxiosError(
|
|
3375
3644
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
3376
|
-
AxiosError
|
|
3645
|
+
AxiosError.ERR_DEPRECATED
|
|
3377
3646
|
);
|
|
3378
3647
|
}
|
|
3379
3648
|
|
|
@@ -3397,7 +3666,7 @@ function requireAxios () {
|
|
|
3397
3666
|
// eslint-disable-next-line no-console
|
|
3398
3667
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
3399
3668
|
return true;
|
|
3400
|
-
}
|
|
3669
|
+
};
|
|
3401
3670
|
};
|
|
3402
3671
|
|
|
3403
3672
|
/**
|
|
@@ -3412,7 +3681,7 @@ function requireAxios () {
|
|
|
3412
3681
|
|
|
3413
3682
|
function assertOptions(options, schema, allowUnknown) {
|
|
3414
3683
|
if (typeof options !== 'object') {
|
|
3415
|
-
throw new AxiosError
|
|
3684
|
+
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
3416
3685
|
}
|
|
3417
3686
|
const keys = Object.keys(options);
|
|
3418
3687
|
let i = keys.length;
|
|
@@ -3423,19 +3692,22 @@ function requireAxios () {
|
|
|
3423
3692
|
const value = options[opt];
|
|
3424
3693
|
const result = value === undefined || validator(value, opt, options);
|
|
3425
3694
|
if (result !== true) {
|
|
3426
|
-
throw new AxiosError
|
|
3695
|
+
throw new AxiosError(
|
|
3696
|
+
'option ' + opt + ' must be ' + result,
|
|
3697
|
+
AxiosError.ERR_BAD_OPTION_VALUE
|
|
3698
|
+
);
|
|
3427
3699
|
}
|
|
3428
3700
|
continue;
|
|
3429
3701
|
}
|
|
3430
3702
|
if (allowUnknown !== true) {
|
|
3431
|
-
throw new AxiosError
|
|
3703
|
+
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
3432
3704
|
}
|
|
3433
3705
|
}
|
|
3434
3706
|
}
|
|
3435
3707
|
|
|
3436
3708
|
var validator = {
|
|
3437
3709
|
assertOptions,
|
|
3438
|
-
validators: validators$1
|
|
3710
|
+
validators: validators$1,
|
|
3439
3711
|
};
|
|
3440
3712
|
|
|
3441
3713
|
const validators = validator.validators;
|
|
@@ -3451,8 +3723,8 @@ function requireAxios () {
|
|
|
3451
3723
|
constructor(instanceConfig) {
|
|
3452
3724
|
this.defaults = instanceConfig || {};
|
|
3453
3725
|
this.interceptors = {
|
|
3454
|
-
request: new InterceptorManager
|
|
3455
|
-
response: new InterceptorManager
|
|
3726
|
+
request: new InterceptorManager(),
|
|
3727
|
+
response: new InterceptorManager(),
|
|
3456
3728
|
};
|
|
3457
3729
|
}
|
|
3458
3730
|
|
|
@@ -3474,13 +3746,29 @@ function requireAxios () {
|
|
|
3474
3746
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
3475
3747
|
|
|
3476
3748
|
// slice off the Error: ... line
|
|
3477
|
-
const stack =
|
|
3749
|
+
const stack = (() => {
|
|
3750
|
+
if (!dummy.stack) {
|
|
3751
|
+
return '';
|
|
3752
|
+
}
|
|
3753
|
+
|
|
3754
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
3755
|
+
|
|
3756
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
3757
|
+
})();
|
|
3478
3758
|
try {
|
|
3479
3759
|
if (!err.stack) {
|
|
3480
3760
|
err.stack = stack;
|
|
3481
3761
|
// match without the 2 top stack lines
|
|
3482
|
-
} else if (stack
|
|
3483
|
-
|
|
3762
|
+
} else if (stack) {
|
|
3763
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
3764
|
+
const secondNewlineIndex =
|
|
3765
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
3766
|
+
const stackWithoutTwoTopLines =
|
|
3767
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
3768
|
+
|
|
3769
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
3770
|
+
err.stack += '\n' + stack;
|
|
3771
|
+
}
|
|
3484
3772
|
}
|
|
3485
3773
|
} catch (e) {
|
|
3486
3774
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -3503,27 +3791,35 @@ function requireAxios () {
|
|
|
3503
3791
|
|
|
3504
3792
|
config = mergeConfig(this.defaults, config);
|
|
3505
3793
|
|
|
3506
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
3794
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
3507
3795
|
|
|
3508
3796
|
if (transitional !== undefined) {
|
|
3509
|
-
validator.assertOptions(
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3797
|
+
validator.assertOptions(
|
|
3798
|
+
transitional,
|
|
3799
|
+
{
|
|
3800
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
3801
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
3802
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
3803
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
3804
|
+
},
|
|
3805
|
+
false
|
|
3806
|
+
);
|
|
3515
3807
|
}
|
|
3516
3808
|
|
|
3517
3809
|
if (paramsSerializer != null) {
|
|
3518
3810
|
if (utils$1.isFunction(paramsSerializer)) {
|
|
3519
3811
|
config.paramsSerializer = {
|
|
3520
|
-
serialize: paramsSerializer
|
|
3812
|
+
serialize: paramsSerializer,
|
|
3521
3813
|
};
|
|
3522
3814
|
} else {
|
|
3523
|
-
validator.assertOptions(
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3815
|
+
validator.assertOptions(
|
|
3816
|
+
paramsSerializer,
|
|
3817
|
+
{
|
|
3818
|
+
encode: validators.function,
|
|
3819
|
+
serialize: validators.function,
|
|
3820
|
+
},
|
|
3821
|
+
true
|
|
3822
|
+
);
|
|
3527
3823
|
}
|
|
3528
3824
|
}
|
|
3529
3825
|
|
|
@@ -3534,28 +3830,27 @@ function requireAxios () {
|
|
|
3534
3830
|
config.allowAbsoluteUrls = true;
|
|
3535
3831
|
}
|
|
3536
3832
|
|
|
3537
|
-
validator.assertOptions(
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3833
|
+
validator.assertOptions(
|
|
3834
|
+
config,
|
|
3835
|
+
{
|
|
3836
|
+
baseUrl: validators.spelling('baseURL'),
|
|
3837
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
3838
|
+
},
|
|
3839
|
+
true
|
|
3840
|
+
);
|
|
3541
3841
|
|
|
3542
3842
|
// Set config.method
|
|
3543
3843
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
3544
3844
|
|
|
3545
3845
|
// Flatten headers
|
|
3546
|
-
let contextHeaders = headers && utils$1.merge(
|
|
3547
|
-
headers.common,
|
|
3548
|
-
headers[config.method]
|
|
3549
|
-
);
|
|
3846
|
+
let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
3550
3847
|
|
|
3551
|
-
headers &&
|
|
3552
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
3553
|
-
(method) => {
|
|
3848
|
+
headers &&
|
|
3849
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
3554
3850
|
delete headers[method];
|
|
3555
|
-
}
|
|
3556
|
-
);
|
|
3851
|
+
});
|
|
3557
3852
|
|
|
3558
|
-
config.headers = AxiosHeaders
|
|
3853
|
+
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
3559
3854
|
|
|
3560
3855
|
// filter out skipped interceptors
|
|
3561
3856
|
const requestInterceptorChain = [];
|
|
@@ -3568,7 +3863,8 @@ function requireAxios () {
|
|
|
3568
3863
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
3569
3864
|
|
|
3570
3865
|
const transitional = config.transitional || transitionalDefaults;
|
|
3571
|
-
const legacyInterceptorReqResOrdering =
|
|
3866
|
+
const legacyInterceptorReqResOrdering =
|
|
3867
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
3572
3868
|
|
|
3573
3869
|
if (legacyInterceptorReqResOrdering) {
|
|
3574
3870
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
@@ -3642,28 +3938,32 @@ function requireAxios () {
|
|
|
3642
3938
|
// Provide aliases for supported request methods
|
|
3643
3939
|
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
3644
3940
|
/*eslint func-names:0*/
|
|
3645
|
-
Axios.prototype[method] = function(url, config) {
|
|
3646
|
-
return this.request(
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3941
|
+
Axios.prototype[method] = function (url, config) {
|
|
3942
|
+
return this.request(
|
|
3943
|
+
mergeConfig(config || {}, {
|
|
3944
|
+
method,
|
|
3945
|
+
url,
|
|
3946
|
+
data: (config || {}).data,
|
|
3947
|
+
})
|
|
3948
|
+
);
|
|
3651
3949
|
};
|
|
3652
3950
|
});
|
|
3653
3951
|
|
|
3654
3952
|
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
3655
|
-
/*eslint func-names:0*/
|
|
3656
|
-
|
|
3657
3953
|
function generateHTTPMethod(isForm) {
|
|
3658
3954
|
return function httpMethod(url, data, config) {
|
|
3659
|
-
return this.request(
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3955
|
+
return this.request(
|
|
3956
|
+
mergeConfig(config || {}, {
|
|
3957
|
+
method,
|
|
3958
|
+
headers: isForm
|
|
3959
|
+
? {
|
|
3960
|
+
'Content-Type': 'multipart/form-data',
|
|
3961
|
+
}
|
|
3962
|
+
: {},
|
|
3963
|
+
url,
|
|
3964
|
+
data,
|
|
3965
|
+
})
|
|
3966
|
+
);
|
|
3667
3967
|
};
|
|
3668
3968
|
}
|
|
3669
3969
|
|
|
@@ -3672,8 +3972,6 @@ function requireAxios () {
|
|
|
3672
3972
|
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
3673
3973
|
});
|
|
3674
3974
|
|
|
3675
|
-
var Axios$1 = Axios;
|
|
3676
|
-
|
|
3677
3975
|
/**
|
|
3678
3976
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
3679
3977
|
*
|
|
@@ -3696,7 +3994,7 @@ function requireAxios () {
|
|
|
3696
3994
|
const token = this;
|
|
3697
3995
|
|
|
3698
3996
|
// eslint-disable-next-line func-names
|
|
3699
|
-
this.promise.then(cancel => {
|
|
3997
|
+
this.promise.then((cancel) => {
|
|
3700
3998
|
if (!token._listeners) return;
|
|
3701
3999
|
|
|
3702
4000
|
let i = token._listeners.length;
|
|
@@ -3708,10 +4006,10 @@ function requireAxios () {
|
|
|
3708
4006
|
});
|
|
3709
4007
|
|
|
3710
4008
|
// eslint-disable-next-line func-names
|
|
3711
|
-
this.promise.then = onfulfilled => {
|
|
4009
|
+
this.promise.then = (onfulfilled) => {
|
|
3712
4010
|
let _resolve;
|
|
3713
4011
|
// eslint-disable-next-line func-names
|
|
3714
|
-
const promise = new Promise(resolve => {
|
|
4012
|
+
const promise = new Promise((resolve) => {
|
|
3715
4013
|
token.subscribe(resolve);
|
|
3716
4014
|
_resolve = resolve;
|
|
3717
4015
|
}).then(onfulfilled);
|
|
@@ -3729,7 +4027,7 @@ function requireAxios () {
|
|
|
3729
4027
|
return;
|
|
3730
4028
|
}
|
|
3731
4029
|
|
|
3732
|
-
token.reason = new CanceledError
|
|
4030
|
+
token.reason = new CanceledError(message, config, request);
|
|
3733
4031
|
resolvePromise(token.reason);
|
|
3734
4032
|
});
|
|
3735
4033
|
}
|
|
@@ -3799,13 +4097,11 @@ function requireAxios () {
|
|
|
3799
4097
|
});
|
|
3800
4098
|
return {
|
|
3801
4099
|
token,
|
|
3802
|
-
cancel
|
|
4100
|
+
cancel,
|
|
3803
4101
|
};
|
|
3804
4102
|
}
|
|
3805
4103
|
}
|
|
3806
4104
|
|
|
3807
|
-
var CancelToken$1 = CancelToken;
|
|
3808
|
-
|
|
3809
4105
|
/**
|
|
3810
4106
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
3811
4107
|
*
|
|
@@ -3841,7 +4137,7 @@ function requireAxios () {
|
|
|
3841
4137
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
3842
4138
|
*/
|
|
3843
4139
|
function isAxiosError(payload) {
|
|
3844
|
-
return utils$1.isObject(payload) &&
|
|
4140
|
+
return utils$1.isObject(payload) && payload.isAxiosError === true;
|
|
3845
4141
|
}
|
|
3846
4142
|
|
|
3847
4143
|
const HttpStatusCode = {
|
|
@@ -3920,8 +4216,6 @@ function requireAxios () {
|
|
|
3920
4216
|
HttpStatusCode[value] = key;
|
|
3921
4217
|
});
|
|
3922
4218
|
|
|
3923
|
-
var HttpStatusCode$1 = HttpStatusCode;
|
|
3924
|
-
|
|
3925
4219
|
/**
|
|
3926
4220
|
* Create an instance of Axios
|
|
3927
4221
|
*
|
|
@@ -3930,14 +4224,14 @@ function requireAxios () {
|
|
|
3930
4224
|
* @returns {Axios} A new instance of Axios
|
|
3931
4225
|
*/
|
|
3932
4226
|
function createInstance(defaultConfig) {
|
|
3933
|
-
const context = new Axios
|
|
3934
|
-
const instance = bind(Axios
|
|
4227
|
+
const context = new Axios(defaultConfig);
|
|
4228
|
+
const instance = bind(Axios.prototype.request, context);
|
|
3935
4229
|
|
|
3936
4230
|
// Copy axios.prototype to instance
|
|
3937
|
-
utils$1.extend(instance, Axios
|
|
4231
|
+
utils$1.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
3938
4232
|
|
|
3939
4233
|
// Copy context to instance
|
|
3940
|
-
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
|
4234
|
+
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
3941
4235
|
|
|
3942
4236
|
// Factory for creating new instances
|
|
3943
4237
|
instance.create = function create(instanceConfig) {
|
|
@@ -3948,20 +4242,20 @@ function requireAxios () {
|
|
|
3948
4242
|
}
|
|
3949
4243
|
|
|
3950
4244
|
// Create the default instance to be exported
|
|
3951
|
-
const axios = createInstance(defaults
|
|
4245
|
+
const axios = createInstance(defaults);
|
|
3952
4246
|
|
|
3953
4247
|
// Expose Axios class to allow class inheritance
|
|
3954
|
-
axios.Axios = Axios
|
|
4248
|
+
axios.Axios = Axios;
|
|
3955
4249
|
|
|
3956
4250
|
// Expose Cancel & CancelToken
|
|
3957
|
-
axios.CanceledError = CanceledError
|
|
3958
|
-
axios.CancelToken = CancelToken
|
|
4251
|
+
axios.CanceledError = CanceledError;
|
|
4252
|
+
axios.CancelToken = CancelToken;
|
|
3959
4253
|
axios.isCancel = isCancel;
|
|
3960
4254
|
axios.VERSION = VERSION;
|
|
3961
4255
|
axios.toFormData = toFormData;
|
|
3962
4256
|
|
|
3963
4257
|
// Expose AxiosError class
|
|
3964
|
-
axios.AxiosError = AxiosError
|
|
4258
|
+
axios.AxiosError = AxiosError;
|
|
3965
4259
|
|
|
3966
4260
|
// alias for CanceledError for backward compatibility
|
|
3967
4261
|
axios.Cancel = axios.CanceledError;
|
|
@@ -3979,13 +4273,13 @@ function requireAxios () {
|
|
|
3979
4273
|
// Expose mergeConfig
|
|
3980
4274
|
axios.mergeConfig = mergeConfig;
|
|
3981
4275
|
|
|
3982
|
-
axios.AxiosHeaders = AxiosHeaders
|
|
4276
|
+
axios.AxiosHeaders = AxiosHeaders;
|
|
3983
4277
|
|
|
3984
|
-
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
4278
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
3985
4279
|
|
|
3986
4280
|
axios.getAdapter = adapters.getAdapter;
|
|
3987
4281
|
|
|
3988
|
-
axios.HttpStatusCode = HttpStatusCode
|
|
4282
|
+
axios.HttpStatusCode = HttpStatusCode;
|
|
3989
4283
|
|
|
3990
4284
|
axios.default = axios;
|
|
3991
4285
|
|