axios 0.20.0 → 0.21.3

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/axios.js CHANGED
@@ -1,4 +1,4 @@
1
- /* axios v0.20.0 | (c) 2020 by Matt Zabriskie */
1
+ /* axios v0.21.3 | (c) 2021 by Matt Zabriskie */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory();
@@ -8,7 +8,7 @@
8
8
  exports["axios"] = factory();
9
9
  else
10
10
  root["axios"] = factory();
11
- })(this, function() {
11
+ })(window, function() {
12
12
  return /******/ (function(modules) { // webpackBootstrap
13
13
  /******/ // The module cache
14
14
  /******/ var installedModules = {};
@@ -17,21 +17,21 @@ return /******/ (function(modules) { // webpackBootstrap
17
17
  /******/ function __webpack_require__(moduleId) {
18
18
  /******/
19
19
  /******/ // Check if module is in cache
20
- /******/ if(installedModules[moduleId])
20
+ /******/ if(installedModules[moduleId]) {
21
21
  /******/ return installedModules[moduleId].exports;
22
- /******/
22
+ /******/ }
23
23
  /******/ // Create a new module (and put it into the cache)
24
24
  /******/ var module = installedModules[moduleId] = {
25
- /******/ exports: {},
26
- /******/ id: moduleId,
27
- /******/ loaded: false
25
+ /******/ i: moduleId,
26
+ /******/ l: false,
27
+ /******/ exports: {}
28
28
  /******/ };
29
29
  /******/
30
30
  /******/ // Execute the module function
31
31
  /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
32
32
  /******/
33
33
  /******/ // Flag the module as loaded
34
- /******/ module.loaded = true;
34
+ /******/ module.l = true;
35
35
  /******/
36
36
  /******/ // Return the exports of the module
37
37
  /******/ return module.exports;
@@ -44,1699 +44,2135 @@ return /******/ (function(modules) { // webpackBootstrap
44
44
  /******/ // expose the module cache
45
45
  /******/ __webpack_require__.c = installedModules;
46
46
  /******/
47
+ /******/ // define getter function for harmony exports
48
+ /******/ __webpack_require__.d = function(exports, name, getter) {
49
+ /******/ if(!__webpack_require__.o(exports, name)) {
50
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
51
+ /******/ }
52
+ /******/ };
53
+ /******/
54
+ /******/ // define __esModule on exports
55
+ /******/ __webpack_require__.r = function(exports) {
56
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
57
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
58
+ /******/ }
59
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
60
+ /******/ };
61
+ /******/
62
+ /******/ // create a fake namespace object
63
+ /******/ // mode & 1: value is a module id, require it
64
+ /******/ // mode & 2: merge all properties of value into the ns
65
+ /******/ // mode & 4: return value when already ns object
66
+ /******/ // mode & 8|1: behave like require
67
+ /******/ __webpack_require__.t = function(value, mode) {
68
+ /******/ if(mode & 1) value = __webpack_require__(value);
69
+ /******/ if(mode & 8) return value;
70
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
71
+ /******/ var ns = Object.create(null);
72
+ /******/ __webpack_require__.r(ns);
73
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
74
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
75
+ /******/ return ns;
76
+ /******/ };
77
+ /******/
78
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
79
+ /******/ __webpack_require__.n = function(module) {
80
+ /******/ var getter = module && module.__esModule ?
81
+ /******/ function getDefault() { return module['default']; } :
82
+ /******/ function getModuleExports() { return module; };
83
+ /******/ __webpack_require__.d(getter, 'a', getter);
84
+ /******/ return getter;
85
+ /******/ };
86
+ /******/
87
+ /******/ // Object.prototype.hasOwnProperty.call
88
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
89
+ /******/
47
90
  /******/ // __webpack_public_path__
48
91
  /******/ __webpack_require__.p = "";
49
92
  /******/
93
+ /******/
50
94
  /******/ // Load entry module and return exports
51
- /******/ return __webpack_require__(0);
95
+ /******/ return __webpack_require__(__webpack_require__.s = "./index.js");
52
96
  /******/ })
53
97
  /************************************************************************/
54
- /******/ ([
55
- /* 0 */
98
+ /******/ ({
99
+
100
+ /***/ "./index.js":
101
+ /*!******************!*\
102
+ !*** ./index.js ***!
103
+ \******************/
104
+ /*! no static exports found */
56
105
  /***/ (function(module, exports, __webpack_require__) {
57
106
 
58
- module.exports = __webpack_require__(1);
107
+ module.exports = __webpack_require__(/*! ./lib/axios */ "./lib/axios.js");
59
108
 
60
109
  /***/ }),
61
- /* 1 */
110
+
111
+ /***/ "./lib/adapters/xhr.js":
112
+ /*!*****************************!*\
113
+ !*** ./lib/adapters/xhr.js ***!
114
+ \*****************************/
115
+ /*! no static exports found */
62
116
  /***/ (function(module, exports, __webpack_require__) {
63
117
 
64
- 'use strict';
65
-
66
- var utils = __webpack_require__(2);
67
- var bind = __webpack_require__(3);
68
- var Axios = __webpack_require__(4);
69
- var mergeConfig = __webpack_require__(22);
70
- var defaults = __webpack_require__(10);
71
-
72
- /**
73
- * Create an instance of Axios
74
- *
75
- * @param {Object} defaultConfig The default config for the instance
76
- * @return {Axios} A new instance of Axios
77
- */
78
- function createInstance(defaultConfig) {
79
- var context = new Axios(defaultConfig);
80
- var instance = bind(Axios.prototype.request, context);
81
-
82
- // Copy axios.prototype to instance
83
- utils.extend(instance, Axios.prototype, context);
84
-
85
- // Copy context to instance
86
- utils.extend(instance, context);
87
-
88
- return instance;
89
- }
90
-
91
- // Create the default instance to be exported
92
- var axios = createInstance(defaults);
93
-
94
- // Expose Axios class to allow class inheritance
95
- axios.Axios = Axios;
96
-
97
- // Factory for creating new instances
98
- axios.create = function create(instanceConfig) {
99
- return createInstance(mergeConfig(axios.defaults, instanceConfig));
100
- };
101
-
102
- // Expose Cancel & CancelToken
103
- axios.Cancel = __webpack_require__(23);
104
- axios.CancelToken = __webpack_require__(24);
105
- axios.isCancel = __webpack_require__(9);
106
-
107
- // Expose all/spread
108
- axios.all = function all(promises) {
109
- return Promise.all(promises);
110
- };
111
- axios.spread = __webpack_require__(25);
112
-
113
- module.exports = axios;
114
-
115
- // Allow use of default import syntax in TypeScript
116
- module.exports.default = axios;
118
+ "use strict";
119
+
120
+
121
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
122
+ var settle = __webpack_require__(/*! ./../core/settle */ "./lib/core/settle.js");
123
+ var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./lib/helpers/cookies.js");
124
+ var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./lib/helpers/buildURL.js");
125
+ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./lib/core/buildFullPath.js");
126
+ var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./lib/helpers/parseHeaders.js");
127
+ var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./lib/helpers/isURLSameOrigin.js");
128
+ var createError = __webpack_require__(/*! ../core/createError */ "./lib/core/createError.js");
129
+
130
+ module.exports = function xhrAdapter(config) {
131
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
132
+ var requestData = config.data;
133
+ var requestHeaders = config.headers;
134
+ var responseType = config.responseType;
135
+
136
+ if (utils.isFormData(requestData)) {
137
+ delete requestHeaders['Content-Type']; // Let the browser set it
138
+ }
139
+
140
+ var request = new XMLHttpRequest();
141
+
142
+ // HTTP basic authentication
143
+ if (config.auth) {
144
+ var username = config.auth.username || '';
145
+ var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
146
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
147
+ }
148
+
149
+ var fullPath = buildFullPath(config.baseURL, config.url);
150
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
151
+
152
+ // Set the request timeout in MS
153
+ request.timeout = config.timeout;
154
+
155
+ function onloadend() {
156
+ if (!request) {
157
+ return;
158
+ }
159
+ // Prepare the response
160
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
161
+ var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
162
+ request.responseText : request.response;
163
+ var response = {
164
+ data: responseData,
165
+ status: request.status,
166
+ statusText: request.statusText,
167
+ headers: responseHeaders,
168
+ config: config,
169
+ request: request
170
+ };
171
+
172
+ settle(resolve, reject, response);
173
+
174
+ // Clean up request
175
+ request = null;
176
+ }
177
+
178
+ if ('onloadend' in request) {
179
+ // Use onloadend if available
180
+ request.onloadend = onloadend;
181
+ } else {
182
+ // Listen for ready state to emulate onloadend
183
+ request.onreadystatechange = function handleLoad() {
184
+ if (!request || request.readyState !== 4) {
185
+ return;
186
+ }
187
+
188
+ // The request errored out and we didn't get a response, this will be
189
+ // handled by onerror instead
190
+ // With one exception: request that using file: protocol, most browsers
191
+ // will return status as 0 even though it's a successful request
192
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
193
+ return;
194
+ }
195
+ // readystate handler is calling before onerror or ontimeout handlers,
196
+ // so we should call onloadend on the next 'tick'
197
+ setTimeout(onloadend);
198
+ };
199
+ }
200
+
201
+ // Handle browser request cancellation (as opposed to a manual cancellation)
202
+ request.onabort = function handleAbort() {
203
+ if (!request) {
204
+ return;
205
+ }
206
+
207
+ reject(createError('Request aborted', config, 'ECONNABORTED', request));
208
+
209
+ // Clean up request
210
+ request = null;
211
+ };
212
+
213
+ // Handle low level network errors
214
+ request.onerror = function handleError() {
215
+ // Real errors are hidden from us by the browser
216
+ // onerror should only fire if it's a network error
217
+ reject(createError('Network Error', config, null, request));
218
+
219
+ // Clean up request
220
+ request = null;
221
+ };
222
+
223
+ // Handle timeout
224
+ request.ontimeout = function handleTimeout() {
225
+ var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
226
+ if (config.timeoutErrorMessage) {
227
+ timeoutErrorMessage = config.timeoutErrorMessage;
228
+ }
229
+ reject(createError(
230
+ timeoutErrorMessage,
231
+ config,
232
+ config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
233
+ request));
234
+
235
+ // Clean up request
236
+ request = null;
237
+ };
238
+
239
+ // Add xsrf header
240
+ // This is only done if running in a standard browser environment.
241
+ // Specifically not if we're in a web worker, or react-native.
242
+ if (utils.isStandardBrowserEnv()) {
243
+ // Add xsrf header
244
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
245
+ cookies.read(config.xsrfCookieName) :
246
+ undefined;
247
+
248
+ if (xsrfValue) {
249
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
250
+ }
251
+ }
252
+
253
+ // Add headers to the request
254
+ if ('setRequestHeader' in request) {
255
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
256
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
257
+ // Remove Content-Type if data is undefined
258
+ delete requestHeaders[key];
259
+ } else {
260
+ // Otherwise add header to the request
261
+ request.setRequestHeader(key, val);
262
+ }
263
+ });
264
+ }
265
+
266
+ // Add withCredentials to request if needed
267
+ if (!utils.isUndefined(config.withCredentials)) {
268
+ request.withCredentials = !!config.withCredentials;
269
+ }
270
+
271
+ // Add responseType to request if needed
272
+ if (responseType && responseType !== 'json') {
273
+ request.responseType = config.responseType;
274
+ }
275
+
276
+ // Handle progress if needed
277
+ if (typeof config.onDownloadProgress === 'function') {
278
+ request.addEventListener('progress', config.onDownloadProgress);
279
+ }
280
+
281
+ // Not all browsers support upload events
282
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
283
+ request.upload.addEventListener('progress', config.onUploadProgress);
284
+ }
285
+
286
+ if (config.cancelToken) {
287
+ // Handle cancellation
288
+ config.cancelToken.promise.then(function onCanceled(cancel) {
289
+ if (!request) {
290
+ return;
291
+ }
292
+
293
+ request.abort();
294
+ reject(cancel);
295
+ // Clean up request
296
+ request = null;
297
+ });
298
+ }
299
+
300
+ if (!requestData) {
301
+ requestData = null;
302
+ }
303
+
304
+ // Send the request
305
+ request.send(requestData);
306
+ });
307
+ };
117
308
 
118
309
 
119
310
  /***/ }),
120
- /* 2 */
311
+
312
+ /***/ "./lib/axios.js":
313
+ /*!**********************!*\
314
+ !*** ./lib/axios.js ***!
315
+ \**********************/
316
+ /*! no static exports found */
121
317
  /***/ (function(module, exports, __webpack_require__) {
122
318
 
123
- 'use strict';
124
-
125
- var bind = __webpack_require__(3);
126
-
127
- /*global toString:true*/
128
-
129
- // utils is a library of generic helper functions non-specific to axios
130
-
131
- var toString = Object.prototype.toString;
132
-
133
- /**
134
- * Determine if a value is an Array
135
- *
136
- * @param {Object} val The value to test
137
- * @returns {boolean} True if value is an Array, otherwise false
138
- */
139
- function isArray(val) {
140
- return toString.call(val) === '[object Array]';
141
- }
142
-
143
- /**
144
- * Determine if a value is undefined
145
- *
146
- * @param {Object} val The value to test
147
- * @returns {boolean} True if the value is undefined, otherwise false
148
- */
149
- function isUndefined(val) {
150
- return typeof val === 'undefined';
151
- }
152
-
153
- /**
154
- * Determine if a value is a Buffer
155
- *
156
- * @param {Object} val The value to test
157
- * @returns {boolean} True if value is a Buffer, otherwise false
158
- */
159
- function isBuffer(val) {
160
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
161
- && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
162
- }
163
-
164
- /**
165
- * Determine if a value is an ArrayBuffer
166
- *
167
- * @param {Object} val The value to test
168
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
169
- */
170
- function isArrayBuffer(val) {
171
- return toString.call(val) === '[object ArrayBuffer]';
172
- }
173
-
174
- /**
175
- * Determine if a value is a FormData
176
- *
177
- * @param {Object} val The value to test
178
- * @returns {boolean} True if value is an FormData, otherwise false
179
- */
180
- function isFormData(val) {
181
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
182
- }
183
-
184
- /**
185
- * Determine if a value is a view on an ArrayBuffer
186
- *
187
- * @param {Object} val The value to test
188
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
189
- */
190
- function isArrayBufferView(val) {
191
- var result;
192
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
193
- result = ArrayBuffer.isView(val);
194
- } else {
195
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
196
- }
197
- return result;
198
- }
199
-
200
- /**
201
- * Determine if a value is a String
202
- *
203
- * @param {Object} val The value to test
204
- * @returns {boolean} True if value is a String, otherwise false
205
- */
206
- function isString(val) {
207
- return typeof val === 'string';
208
- }
209
-
210
- /**
211
- * Determine if a value is a Number
212
- *
213
- * @param {Object} val The value to test
214
- * @returns {boolean} True if value is a Number, otherwise false
215
- */
216
- function isNumber(val) {
217
- return typeof val === 'number';
218
- }
219
-
220
- /**
221
- * Determine if a value is an Object
222
- *
223
- * @param {Object} val The value to test
224
- * @returns {boolean} True if value is an Object, otherwise false
225
- */
226
- function isObject(val) {
227
- return val !== null && typeof val === 'object';
228
- }
229
-
230
- /**
231
- * Determine if a value is a plain Object
232
- *
233
- * @param {Object} val The value to test
234
- * @return {boolean} True if value is a plain Object, otherwise false
235
- */
236
- function isPlainObject(val) {
237
- if (toString.call(val) !== '[object Object]') {
238
- return false;
239
- }
240
-
241
- var prototype = Object.getPrototypeOf(val);
242
- return prototype === null || prototype === Object.prototype;
243
- }
244
-
245
- /**
246
- * Determine if a value is a Date
247
- *
248
- * @param {Object} val The value to test
249
- * @returns {boolean} True if value is a Date, otherwise false
250
- */
251
- function isDate(val) {
252
- return toString.call(val) === '[object Date]';
253
- }
254
-
255
- /**
256
- * Determine if a value is a File
257
- *
258
- * @param {Object} val The value to test
259
- * @returns {boolean} True if value is a File, otherwise false
260
- */
261
- function isFile(val) {
262
- return toString.call(val) === '[object File]';
263
- }
264
-
265
- /**
266
- * Determine if a value is a Blob
267
- *
268
- * @param {Object} val The value to test
269
- * @returns {boolean} True if value is a Blob, otherwise false
270
- */
271
- function isBlob(val) {
272
- return toString.call(val) === '[object Blob]';
273
- }
274
-
275
- /**
276
- * Determine if a value is a Function
277
- *
278
- * @param {Object} val The value to test
279
- * @returns {boolean} True if value is a Function, otherwise false
280
- */
281
- function isFunction(val) {
282
- return toString.call(val) === '[object Function]';
283
- }
284
-
285
- /**
286
- * Determine if a value is a Stream
287
- *
288
- * @param {Object} val The value to test
289
- * @returns {boolean} True if value is a Stream, otherwise false
290
- */
291
- function isStream(val) {
292
- return isObject(val) && isFunction(val.pipe);
293
- }
294
-
295
- /**
296
- * Determine if a value is a URLSearchParams object
297
- *
298
- * @param {Object} val The value to test
299
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
300
- */
301
- function isURLSearchParams(val) {
302
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
303
- }
304
-
305
- /**
306
- * Trim excess whitespace off the beginning and end of a string
307
- *
308
- * @param {String} str The String to trim
309
- * @returns {String} The String freed of excess whitespace
310
- */
311
- function trim(str) {
312
- return str.replace(/^\s*/, '').replace(/\s*$/, '');
313
- }
314
-
315
- /**
316
- * Determine if we're running in a standard browser environment
317
- *
318
- * This allows axios to run in a web worker, and react-native.
319
- * Both environments support XMLHttpRequest, but not fully standard globals.
320
- *
321
- * web workers:
322
- * typeof window -> undefined
323
- * typeof document -> undefined
324
- *
325
- * react-native:
326
- * navigator.product -> 'ReactNative'
327
- * nativescript
328
- * navigator.product -> 'NativeScript' or 'NS'
329
- */
330
- function isStandardBrowserEnv() {
331
- if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
332
- navigator.product === 'NativeScript' ||
333
- navigator.product === 'NS')) {
334
- return false;
335
- }
336
- return (
337
- typeof window !== 'undefined' &&
338
- typeof document !== 'undefined'
339
- );
340
- }
341
-
342
- /**
343
- * Iterate over an Array or an Object invoking a function for each item.
344
- *
345
- * If `obj` is an Array callback will be called passing
346
- * the value, index, and complete array for each item.
347
- *
348
- * If 'obj' is an Object callback will be called passing
349
- * the value, key, and complete object for each property.
350
- *
351
- * @param {Object|Array} obj The object to iterate
352
- * @param {Function} fn The callback to invoke for each item
353
- */
354
- function forEach(obj, fn) {
355
- // Don't bother if no value provided
356
- if (obj === null || typeof obj === 'undefined') {
357
- return;
358
- }
359
-
360
- // Force an array if not already something iterable
361
- if (typeof obj !== 'object') {
362
- /*eslint no-param-reassign:0*/
363
- obj = [obj];
364
- }
365
-
366
- if (isArray(obj)) {
367
- // Iterate over array values
368
- for (var i = 0, l = obj.length; i < l; i++) {
369
- fn.call(null, obj[i], i, obj);
370
- }
371
- } else {
372
- // Iterate over object keys
373
- for (var key in obj) {
374
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
375
- fn.call(null, obj[key], key, obj);
376
- }
377
- }
378
- }
379
- }
380
-
381
- /**
382
- * Accepts varargs expecting each argument to be an object, then
383
- * immutably merges the properties of each object and returns result.
384
- *
385
- * When multiple objects contain the same key the later object in
386
- * the arguments list will take precedence.
387
- *
388
- * Example:
389
- *
390
- * ```js
391
- * var result = merge({foo: 123}, {foo: 456});
392
- * console.log(result.foo); // outputs 456
393
- * ```
394
- *
395
- * @param {Object} obj1 Object to merge
396
- * @returns {Object} Result of all merge properties
397
- */
398
- function merge(/* obj1, obj2, obj3, ... */) {
399
- var result = {};
400
- function assignValue(val, key) {
401
- if (isPlainObject(result[key]) && isPlainObject(val)) {
402
- result[key] = merge(result[key], val);
403
- } else if (isPlainObject(val)) {
404
- result[key] = merge({}, val);
405
- } else if (isArray(val)) {
406
- result[key] = val.slice();
407
- } else {
408
- result[key] = val;
409
- }
410
- }
411
-
412
- for (var i = 0, l = arguments.length; i < l; i++) {
413
- forEach(arguments[i], assignValue);
414
- }
415
- return result;
416
- }
417
-
418
- /**
419
- * Extends object a by mutably adding to it the properties of object b.
420
- *
421
- * @param {Object} a The object to be extended
422
- * @param {Object} b The object to copy properties from
423
- * @param {Object} thisArg The object to bind function to
424
- * @return {Object} The resulting value of object a
425
- */
426
- function extend(a, b, thisArg) {
427
- forEach(b, function assignValue(val, key) {
428
- if (thisArg && typeof val === 'function') {
429
- a[key] = bind(val, thisArg);
430
- } else {
431
- a[key] = val;
432
- }
433
- });
434
- return a;
435
- }
436
-
437
- /**
438
- * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
439
- *
440
- * @param {string} content with BOM
441
- * @return {string} content value without BOM
442
- */
443
- function stripBOM(content) {
444
- if (content.charCodeAt(0) === 0xFEFF) {
445
- content = content.slice(1);
446
- }
447
- return content;
448
- }
449
-
450
- module.exports = {
451
- isArray: isArray,
452
- isArrayBuffer: isArrayBuffer,
453
- isBuffer: isBuffer,
454
- isFormData: isFormData,
455
- isArrayBufferView: isArrayBufferView,
456
- isString: isString,
457
- isNumber: isNumber,
458
- isObject: isObject,
459
- isPlainObject: isPlainObject,
460
- isUndefined: isUndefined,
461
- isDate: isDate,
462
- isFile: isFile,
463
- isBlob: isBlob,
464
- isFunction: isFunction,
465
- isStream: isStream,
466
- isURLSearchParams: isURLSearchParams,
467
- isStandardBrowserEnv: isStandardBrowserEnv,
468
- forEach: forEach,
469
- merge: merge,
470
- extend: extend,
471
- trim: trim,
472
- stripBOM: stripBOM
473
- };
319
+ "use strict";
320
+
321
+
322
+ var utils = __webpack_require__(/*! ./utils */ "./lib/utils.js");
323
+ var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js");
324
+ var Axios = __webpack_require__(/*! ./core/Axios */ "./lib/core/Axios.js");
325
+ var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./lib/core/mergeConfig.js");
326
+ var defaults = __webpack_require__(/*! ./defaults */ "./lib/defaults.js");
327
+
328
+ /**
329
+ * Create an instance of Axios
330
+ *
331
+ * @param {Object} defaultConfig The default config for the instance
332
+ * @return {Axios} A new instance of Axios
333
+ */
334
+ function createInstance(defaultConfig) {
335
+ var context = new Axios(defaultConfig);
336
+ var instance = bind(Axios.prototype.request, context);
337
+
338
+ // Copy axios.prototype to instance
339
+ utils.extend(instance, Axios.prototype, context);
340
+
341
+ // Copy context to instance
342
+ utils.extend(instance, context);
343
+
344
+ return instance;
345
+ }
346
+
347
+ // Create the default instance to be exported
348
+ var axios = createInstance(defaults);
349
+
350
+ // Expose Axios class to allow class inheritance
351
+ axios.Axios = Axios;
352
+
353
+ // Factory for creating new instances
354
+ axios.create = function create(instanceConfig) {
355
+ return createInstance(mergeConfig(axios.defaults, instanceConfig));
356
+ };
357
+
358
+ // Expose Cancel & CancelToken
359
+ axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./lib/cancel/Cancel.js");
360
+ axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./lib/cancel/CancelToken.js");
361
+ axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./lib/cancel/isCancel.js");
362
+
363
+ // Expose all/spread
364
+ axios.all = function all(promises) {
365
+ return Promise.all(promises);
366
+ };
367
+ axios.spread = __webpack_require__(/*! ./helpers/spread */ "./lib/helpers/spread.js");
368
+
369
+ // Expose isAxiosError
370
+ axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./lib/helpers/isAxiosError.js");
371
+
372
+ module.exports = axios;
373
+
374
+ // Allow use of default import syntax in TypeScript
375
+ module.exports.default = axios;
474
376
 
475
377
 
476
378
  /***/ }),
477
- /* 3 */
478
- /***/ (function(module, exports) {
479
-
480
- 'use strict';
481
-
482
- module.exports = function bind(fn, thisArg) {
483
- return function wrap() {
484
- var args = new Array(arguments.length);
485
- for (var i = 0; i < args.length; i++) {
486
- args[i] = arguments[i];
487
- }
488
- return fn.apply(thisArg, args);
489
- };
490
- };
379
+
380
+ /***/ "./lib/cancel/Cancel.js":
381
+ /*!******************************!*\
382
+ !*** ./lib/cancel/Cancel.js ***!
383
+ \******************************/
384
+ /*! no static exports found */
385
+ /***/ (function(module, exports, __webpack_require__) {
386
+
387
+ "use strict";
388
+
389
+
390
+ /**
391
+ * A `Cancel` is an object that is thrown when an operation is canceled.
392
+ *
393
+ * @class
394
+ * @param {string=} message The message.
395
+ */
396
+ function Cancel(message) {
397
+ this.message = message;
398
+ }
399
+
400
+ Cancel.prototype.toString = function toString() {
401
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
402
+ };
403
+
404
+ Cancel.prototype.__CANCEL__ = true;
405
+
406
+ module.exports = Cancel;
491
407
 
492
408
 
493
409
  /***/ }),
494
- /* 4 */
410
+
411
+ /***/ "./lib/cancel/CancelToken.js":
412
+ /*!***********************************!*\
413
+ !*** ./lib/cancel/CancelToken.js ***!
414
+ \***********************************/
415
+ /*! no static exports found */
495
416
  /***/ (function(module, exports, __webpack_require__) {
496
417
 
497
- 'use strict';
498
-
499
- var utils = __webpack_require__(2);
500
- var buildURL = __webpack_require__(5);
501
- var InterceptorManager = __webpack_require__(6);
502
- var dispatchRequest = __webpack_require__(7);
503
- var mergeConfig = __webpack_require__(22);
504
-
505
- /**
506
- * Create a new instance of Axios
507
- *
508
- * @param {Object} instanceConfig The default config for the instance
509
- */
510
- function Axios(instanceConfig) {
511
- this.defaults = instanceConfig;
512
- this.interceptors = {
513
- request: new InterceptorManager(),
514
- response: new InterceptorManager()
515
- };
516
- }
517
-
518
- /**
519
- * Dispatch a request
520
- *
521
- * @param {Object} config The config specific for this request (merged with this.defaults)
522
- */
523
- Axios.prototype.request = function request(config) {
524
- /*eslint no-param-reassign:0*/
525
- // Allow for axios('example/url'[, config]) a la fetch API
526
- if (typeof config === 'string') {
527
- config = arguments[1] || {};
528
- config.url = arguments[0];
529
- } else {
530
- config = config || {};
531
- }
532
-
533
- config = mergeConfig(this.defaults, config);
534
-
535
- // Set config.method
536
- if (config.method) {
537
- config.method = config.method.toLowerCase();
538
- } else if (this.defaults.method) {
539
- config.method = this.defaults.method.toLowerCase();
540
- } else {
541
- config.method = 'get';
542
- }
543
-
544
- // Hook up interceptors middleware
545
- var chain = [dispatchRequest, undefined];
546
- var promise = Promise.resolve(config);
547
-
548
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
549
- chain.unshift(interceptor.fulfilled, interceptor.rejected);
550
- });
551
-
552
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
553
- chain.push(interceptor.fulfilled, interceptor.rejected);
554
- });
555
-
556
- while (chain.length) {
557
- promise = promise.then(chain.shift(), chain.shift());
558
- }
559
-
560
- return promise;
561
- };
562
-
563
- Axios.prototype.getUri = function getUri(config) {
564
- config = mergeConfig(this.defaults, config);
565
- return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
566
- };
567
-
568
- // Provide aliases for supported request methods
569
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
570
- /*eslint func-names:0*/
571
- Axios.prototype[method] = function(url, config) {
572
- return this.request(mergeConfig(config || {}, {
573
- method: method,
574
- url: url
575
- }));
576
- };
577
- });
578
-
579
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
580
- /*eslint func-names:0*/
581
- Axios.prototype[method] = function(url, data, config) {
582
- return this.request(mergeConfig(config || {}, {
583
- method: method,
584
- url: url,
585
- data: data
586
- }));
587
- };
588
- });
589
-
590
- module.exports = Axios;
418
+ "use strict";
419
+
420
+
421
+ var Cancel = __webpack_require__(/*! ./Cancel */ "./lib/cancel/Cancel.js");
422
+
423
+ /**
424
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
425
+ *
426
+ * @class
427
+ * @param {Function} executor The executor function.
428
+ */
429
+ function CancelToken(executor) {
430
+ if (typeof executor !== 'function') {
431
+ throw new TypeError('executor must be a function.');
432
+ }
433
+
434
+ var resolvePromise;
435
+ this.promise = new Promise(function promiseExecutor(resolve) {
436
+ resolvePromise = resolve;
437
+ });
438
+
439
+ var token = this;
440
+ executor(function cancel(message) {
441
+ if (token.reason) {
442
+ // Cancellation has already been requested
443
+ return;
444
+ }
445
+
446
+ token.reason = new Cancel(message);
447
+ resolvePromise(token.reason);
448
+ });
449
+ }
450
+
451
+ /**
452
+ * Throws a `Cancel` if cancellation has been requested.
453
+ */
454
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
455
+ if (this.reason) {
456
+ throw this.reason;
457
+ }
458
+ };
459
+
460
+ /**
461
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
462
+ * cancels the `CancelToken`.
463
+ */
464
+ CancelToken.source = function source() {
465
+ var cancel;
466
+ var token = new CancelToken(function executor(c) {
467
+ cancel = c;
468
+ });
469
+ return {
470
+ token: token,
471
+ cancel: cancel
472
+ };
473
+ };
474
+
475
+ module.exports = CancelToken;
591
476
 
592
477
 
593
478
  /***/ }),
594
- /* 5 */
479
+
480
+ /***/ "./lib/cancel/isCancel.js":
481
+ /*!********************************!*\
482
+ !*** ./lib/cancel/isCancel.js ***!
483
+ \********************************/
484
+ /*! no static exports found */
595
485
  /***/ (function(module, exports, __webpack_require__) {
596
486
 
597
- 'use strict';
598
-
599
- var utils = __webpack_require__(2);
600
-
601
- function encode(val) {
602
- return encodeURIComponent(val).
603
- replace(/%3A/gi, ':').
604
- replace(/%24/g, '$').
605
- replace(/%2C/gi, ',').
606
- replace(/%20/g, '+').
607
- replace(/%5B/gi, '[').
608
- replace(/%5D/gi, ']');
609
- }
610
-
611
- /**
612
- * Build a URL by appending params to the end
613
- *
614
- * @param {string} url The base of the url (e.g., http://www.google.com)
615
- * @param {object} [params] The params to be appended
616
- * @returns {string} The formatted url
617
- */
618
- module.exports = function buildURL(url, params, paramsSerializer) {
619
- /*eslint no-param-reassign:0*/
620
- if (!params) {
621
- return url;
622
- }
623
-
624
- var serializedParams;
625
- if (paramsSerializer) {
626
- serializedParams = paramsSerializer(params);
627
- } else if (utils.isURLSearchParams(params)) {
628
- serializedParams = params.toString();
629
- } else {
630
- var parts = [];
631
-
632
- utils.forEach(params, function serialize(val, key) {
633
- if (val === null || typeof val === 'undefined') {
634
- return;
635
- }
636
-
637
- if (utils.isArray(val)) {
638
- key = key + '[]';
639
- } else {
640
- val = [val];
641
- }
642
-
643
- utils.forEach(val, function parseValue(v) {
644
- if (utils.isDate(v)) {
645
- v = v.toISOString();
646
- } else if (utils.isObject(v)) {
647
- v = JSON.stringify(v);
648
- }
649
- parts.push(encode(key) + '=' + encode(v));
650
- });
651
- });
652
-
653
- serializedParams = parts.join('&');
654
- }
655
-
656
- if (serializedParams) {
657
- var hashmarkIndex = url.indexOf('#');
658
- if (hashmarkIndex !== -1) {
659
- url = url.slice(0, hashmarkIndex);
660
- }
661
-
662
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
663
- }
664
-
665
- return url;
666
- };
487
+ "use strict";
488
+
489
+
490
+ module.exports = function isCancel(value) {
491
+ return !!(value && value.__CANCEL__);
492
+ };
667
493
 
668
494
 
669
495
  /***/ }),
670
- /* 6 */
496
+
497
+ /***/ "./lib/core/Axios.js":
498
+ /*!***************************!*\
499
+ !*** ./lib/core/Axios.js ***!
500
+ \***************************/
501
+ /*! no static exports found */
671
502
  /***/ (function(module, exports, __webpack_require__) {
672
503
 
673
- 'use strict';
674
-
675
- var utils = __webpack_require__(2);
676
-
677
- function InterceptorManager() {
678
- this.handlers = [];
679
- }
680
-
681
- /**
682
- * Add a new interceptor to the stack
683
- *
684
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
685
- * @param {Function} rejected The function to handle `reject` for a `Promise`
686
- *
687
- * @return {Number} An ID used to remove interceptor later
688
- */
689
- InterceptorManager.prototype.use = function use(fulfilled, rejected) {
690
- this.handlers.push({
691
- fulfilled: fulfilled,
692
- rejected: rejected
693
- });
694
- return this.handlers.length - 1;
695
- };
696
-
697
- /**
698
- * Remove an interceptor from the stack
699
- *
700
- * @param {Number} id The ID that was returned by `use`
701
- */
702
- InterceptorManager.prototype.eject = function eject(id) {
703
- if (this.handlers[id]) {
704
- this.handlers[id] = null;
705
- }
706
- };
707
-
708
- /**
709
- * Iterate over all the registered interceptors
710
- *
711
- * This method is particularly useful for skipping over any
712
- * interceptors that may have become `null` calling `eject`.
713
- *
714
- * @param {Function} fn The function to call for each interceptor
715
- */
716
- InterceptorManager.prototype.forEach = function forEach(fn) {
717
- utils.forEach(this.handlers, function forEachHandler(h) {
718
- if (h !== null) {
719
- fn(h);
720
- }
721
- });
722
- };
723
-
724
- module.exports = InterceptorManager;
504
+ "use strict";
505
+
506
+
507
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
508
+ var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./lib/helpers/buildURL.js");
509
+ var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./lib/core/InterceptorManager.js");
510
+ var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./lib/core/dispatchRequest.js");
511
+ var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./lib/core/mergeConfig.js");
512
+ var validator = __webpack_require__(/*! ../helpers/validator */ "./lib/helpers/validator.js");
513
+
514
+ var validators = validator.validators;
515
+ /**
516
+ * Create a new instance of Axios
517
+ *
518
+ * @param {Object} instanceConfig The default config for the instance
519
+ */
520
+ function Axios(instanceConfig) {
521
+ this.defaults = instanceConfig;
522
+ this.interceptors = {
523
+ request: new InterceptorManager(),
524
+ response: new InterceptorManager()
525
+ };
526
+ }
527
+
528
+ /**
529
+ * Dispatch a request
530
+ *
531
+ * @param {Object} config The config specific for this request (merged with this.defaults)
532
+ */
533
+ Axios.prototype.request = function request(config) {
534
+ /*eslint no-param-reassign:0*/
535
+ // Allow for axios('example/url'[, config]) a la fetch API
536
+ if (typeof config === 'string') {
537
+ config = arguments[1] || {};
538
+ config.url = arguments[0];
539
+ } else {
540
+ config = config || {};
541
+ }
542
+
543
+ config = mergeConfig(this.defaults, config);
544
+
545
+ // Set config.method
546
+ if (config.method) {
547
+ config.method = config.method.toLowerCase();
548
+ } else if (this.defaults.method) {
549
+ config.method = this.defaults.method.toLowerCase();
550
+ } else {
551
+ config.method = 'get';
552
+ }
553
+
554
+ var transitional = config.transitional;
555
+
556
+ if (transitional !== undefined) {
557
+ validator.assertOptions(transitional, {
558
+ silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
559
+ forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
560
+ clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
561
+ }, false);
562
+ }
563
+
564
+ // filter out skipped interceptors
565
+ var requestInterceptorChain = [];
566
+ var synchronousRequestInterceptors = true;
567
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
568
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
569
+ return;
570
+ }
571
+
572
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
573
+
574
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
575
+ });
576
+
577
+ var responseInterceptorChain = [];
578
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
579
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
580
+ });
581
+
582
+ var promise;
583
+
584
+ if (!synchronousRequestInterceptors) {
585
+ var chain = [dispatchRequest, undefined];
586
+
587
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
588
+ chain = chain.concat(responseInterceptorChain);
589
+
590
+ promise = Promise.resolve(config);
591
+ while (chain.length) {
592
+ promise = promise.then(chain.shift(), chain.shift());
593
+ }
594
+
595
+ return promise;
596
+ }
597
+
598
+
599
+ var newConfig = config;
600
+ while (requestInterceptorChain.length) {
601
+ var onFulfilled = requestInterceptorChain.shift();
602
+ var onRejected = requestInterceptorChain.shift();
603
+ try {
604
+ newConfig = onFulfilled(newConfig);
605
+ } catch (error) {
606
+ onRejected(error);
607
+ break;
608
+ }
609
+ }
610
+
611
+ try {
612
+ promise = dispatchRequest(newConfig);
613
+ } catch (error) {
614
+ return Promise.reject(error);
615
+ }
616
+
617
+ while (responseInterceptorChain.length) {
618
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
619
+ }
620
+
621
+ return promise;
622
+ };
623
+
624
+ Axios.prototype.getUri = function getUri(config) {
625
+ config = mergeConfig(this.defaults, config);
626
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
627
+ };
628
+
629
+ // Provide aliases for supported request methods
630
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
631
+ /*eslint func-names:0*/
632
+ Axios.prototype[method] = function(url, config) {
633
+ return this.request(mergeConfig(config || {}, {
634
+ method: method,
635
+ url: url,
636
+ data: (config || {}).data
637
+ }));
638
+ };
639
+ });
640
+
641
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
642
+ /*eslint func-names:0*/
643
+ Axios.prototype[method] = function(url, data, config) {
644
+ return this.request(mergeConfig(config || {}, {
645
+ method: method,
646
+ url: url,
647
+ data: data
648
+ }));
649
+ };
650
+ });
651
+
652
+ module.exports = Axios;
725
653
 
726
654
 
727
655
  /***/ }),
728
- /* 7 */
656
+
657
+ /***/ "./lib/core/InterceptorManager.js":
658
+ /*!****************************************!*\
659
+ !*** ./lib/core/InterceptorManager.js ***!
660
+ \****************************************/
661
+ /*! no static exports found */
729
662
  /***/ (function(module, exports, __webpack_require__) {
730
663
 
731
- 'use strict';
732
-
733
- var utils = __webpack_require__(2);
734
- var transformData = __webpack_require__(8);
735
- var isCancel = __webpack_require__(9);
736
- var defaults = __webpack_require__(10);
737
-
738
- /**
739
- * Throws a `Cancel` if cancellation has been requested.
740
- */
741
- function throwIfCancellationRequested(config) {
742
- if (config.cancelToken) {
743
- config.cancelToken.throwIfRequested();
744
- }
745
- }
746
-
747
- /**
748
- * Dispatch a request to the server using the configured adapter.
749
- *
750
- * @param {object} config The config that is to be used for the request
751
- * @returns {Promise} The Promise to be fulfilled
752
- */
753
- module.exports = function dispatchRequest(config) {
754
- throwIfCancellationRequested(config);
755
-
756
- // Ensure headers exist
757
- config.headers = config.headers || {};
758
-
759
- // Transform request data
760
- config.data = transformData(
761
- config.data,
762
- config.headers,
763
- config.transformRequest
764
- );
765
-
766
- // Flatten headers
767
- config.headers = utils.merge(
768
- config.headers.common || {},
769
- config.headers[config.method] || {},
770
- config.headers
771
- );
772
-
773
- utils.forEach(
774
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
775
- function cleanHeaderConfig(method) {
776
- delete config.headers[method];
777
- }
778
- );
779
-
780
- var adapter = config.adapter || defaults.adapter;
781
-
782
- return adapter(config).then(function onAdapterResolution(response) {
783
- throwIfCancellationRequested(config);
784
-
785
- // Transform response data
786
- response.data = transformData(
787
- response.data,
788
- response.headers,
789
- config.transformResponse
790
- );
791
-
792
- return response;
793
- }, function onAdapterRejection(reason) {
794
- if (!isCancel(reason)) {
795
- throwIfCancellationRequested(config);
796
-
797
- // Transform response data
798
- if (reason && reason.response) {
799
- reason.response.data = transformData(
800
- reason.response.data,
801
- reason.response.headers,
802
- config.transformResponse
803
- );
804
- }
805
- }
806
-
807
- return Promise.reject(reason);
808
- });
809
- };
664
+ "use strict";
665
+
666
+
667
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
668
+
669
+ function InterceptorManager() {
670
+ this.handlers = [];
671
+ }
672
+
673
+ /**
674
+ * Add a new interceptor to the stack
675
+ *
676
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
677
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
678
+ *
679
+ * @return {Number} An ID used to remove interceptor later
680
+ */
681
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
682
+ this.handlers.push({
683
+ fulfilled: fulfilled,
684
+ rejected: rejected,
685
+ synchronous: options ? options.synchronous : false,
686
+ runWhen: options ? options.runWhen : null
687
+ });
688
+ return this.handlers.length - 1;
689
+ };
690
+
691
+ /**
692
+ * Remove an interceptor from the stack
693
+ *
694
+ * @param {Number} id The ID that was returned by `use`
695
+ */
696
+ InterceptorManager.prototype.eject = function eject(id) {
697
+ if (this.handlers[id]) {
698
+ this.handlers[id] = null;
699
+ }
700
+ };
701
+
702
+ /**
703
+ * Iterate over all the registered interceptors
704
+ *
705
+ * This method is particularly useful for skipping over any
706
+ * interceptors that may have become `null` calling `eject`.
707
+ *
708
+ * @param {Function} fn The function to call for each interceptor
709
+ */
710
+ InterceptorManager.prototype.forEach = function forEach(fn) {
711
+ utils.forEach(this.handlers, function forEachHandler(h) {
712
+ if (h !== null) {
713
+ fn(h);
714
+ }
715
+ });
716
+ };
717
+
718
+ module.exports = InterceptorManager;
810
719
 
811
720
 
812
721
  /***/ }),
813
- /* 8 */
722
+
723
+ /***/ "./lib/core/buildFullPath.js":
724
+ /*!***********************************!*\
725
+ !*** ./lib/core/buildFullPath.js ***!
726
+ \***********************************/
727
+ /*! no static exports found */
814
728
  /***/ (function(module, exports, __webpack_require__) {
815
729
 
816
- 'use strict';
817
-
818
- var utils = __webpack_require__(2);
819
-
820
- /**
821
- * Transform the data for a request or a response
822
- *
823
- * @param {Object|String} data The data to be transformed
824
- * @param {Array} headers The headers for the request or response
825
- * @param {Array|Function} fns A single function or Array of functions
826
- * @returns {*} The resulting transformed data
827
- */
828
- module.exports = function transformData(data, headers, fns) {
829
- /*eslint no-param-reassign:0*/
830
- utils.forEach(fns, function transform(fn) {
831
- data = fn(data, headers);
832
- });
833
-
834
- return data;
835
- };
730
+ "use strict";
731
+
732
+
733
+ var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./lib/helpers/isAbsoluteURL.js");
734
+ var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./lib/helpers/combineURLs.js");
735
+
736
+ /**
737
+ * Creates a new URL by combining the baseURL with the requestedURL,
738
+ * only when the requestedURL is not already an absolute URL.
739
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
740
+ *
741
+ * @param {string} baseURL The base URL
742
+ * @param {string} requestedURL Absolute or relative URL to combine
743
+ * @returns {string} The combined full path
744
+ */
745
+ module.exports = function buildFullPath(baseURL, requestedURL) {
746
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
747
+ return combineURLs(baseURL, requestedURL);
748
+ }
749
+ return requestedURL;
750
+ };
836
751
 
837
752
 
838
753
  /***/ }),
839
- /* 9 */
840
- /***/ (function(module, exports) {
841
754
 
842
- 'use strict';
843
-
844
- module.exports = function isCancel(value) {
845
- return !!(value && value.__CANCEL__);
846
- };
755
+ /***/ "./lib/core/createError.js":
756
+ /*!*********************************!*\
757
+ !*** ./lib/core/createError.js ***!
758
+ \*********************************/
759
+ /*! no static exports found */
760
+ /***/ (function(module, exports, __webpack_require__) {
761
+
762
+ "use strict";
763
+
764
+
765
+ var enhanceError = __webpack_require__(/*! ./enhanceError */ "./lib/core/enhanceError.js");
766
+
767
+ /**
768
+ * Create an Error with the specified message, config, error code, request and response.
769
+ *
770
+ * @param {string} message The error message.
771
+ * @param {Object} config The config.
772
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
773
+ * @param {Object} [request] The request.
774
+ * @param {Object} [response] The response.
775
+ * @returns {Error} The created error.
776
+ */
777
+ module.exports = function createError(message, config, code, request, response) {
778
+ var error = new Error(message);
779
+ return enhanceError(error, config, code, request, response);
780
+ };
847
781
 
848
782
 
849
783
  /***/ }),
850
- /* 10 */
784
+
785
+ /***/ "./lib/core/dispatchRequest.js":
786
+ /*!*************************************!*\
787
+ !*** ./lib/core/dispatchRequest.js ***!
788
+ \*************************************/
789
+ /*! no static exports found */
851
790
  /***/ (function(module, exports, __webpack_require__) {
852
791
 
853
- 'use strict';
854
-
855
- var utils = __webpack_require__(2);
856
- var normalizeHeaderName = __webpack_require__(11);
857
-
858
- var DEFAULT_CONTENT_TYPE = {
859
- 'Content-Type': 'application/x-www-form-urlencoded'
860
- };
861
-
862
- function setContentTypeIfUnset(headers, value) {
863
- if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
864
- headers['Content-Type'] = value;
865
- }
866
- }
867
-
868
- function getDefaultAdapter() {
869
- var adapter;
870
- if (typeof XMLHttpRequest !== 'undefined') {
871
- // For browsers use XHR adapter
872
- adapter = __webpack_require__(12);
873
- } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
874
- // For node use HTTP adapter
875
- adapter = __webpack_require__(12);
876
- }
877
- return adapter;
878
- }
879
-
880
- var defaults = {
881
- adapter: getDefaultAdapter(),
882
-
883
- transformRequest: [function transformRequest(data, headers) {
884
- normalizeHeaderName(headers, 'Accept');
885
- normalizeHeaderName(headers, 'Content-Type');
886
- if (utils.isFormData(data) ||
887
- utils.isArrayBuffer(data) ||
888
- utils.isBuffer(data) ||
889
- utils.isStream(data) ||
890
- utils.isFile(data) ||
891
- utils.isBlob(data)
892
- ) {
893
- return data;
894
- }
895
- if (utils.isArrayBufferView(data)) {
896
- return data.buffer;
897
- }
898
- if (utils.isURLSearchParams(data)) {
899
- setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
900
- return data.toString();
901
- }
902
- if (utils.isObject(data)) {
903
- setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
904
- return JSON.stringify(data);
905
- }
906
- return data;
907
- }],
908
-
909
- transformResponse: [function transformResponse(data) {
910
- /*eslint no-param-reassign:0*/
911
- if (typeof data === 'string') {
912
- try {
913
- data = JSON.parse(data);
914
- } catch (e) { /* Ignore */ }
915
- }
916
- return data;
917
- }],
918
-
919
- /**
920
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
921
- * timeout is not created.
922
- */
923
- timeout: 0,
924
-
925
- xsrfCookieName: 'XSRF-TOKEN',
926
- xsrfHeaderName: 'X-XSRF-TOKEN',
927
-
928
- maxContentLength: -1,
929
- maxBodyLength: -1,
930
-
931
- validateStatus: function validateStatus(status) {
932
- return status >= 200 && status < 300;
933
- }
934
- };
935
-
936
- defaults.headers = {
937
- common: {
938
- 'Accept': 'application/json, text/plain, */*'
939
- }
940
- };
941
-
942
- utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
943
- defaults.headers[method] = {};
944
- });
945
-
946
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
947
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
948
- });
949
-
950
- module.exports = defaults;
792
+ "use strict";
793
+
794
+
795
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
796
+ var transformData = __webpack_require__(/*! ./transformData */ "./lib/core/transformData.js");
797
+ var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./lib/cancel/isCancel.js");
798
+ var defaults = __webpack_require__(/*! ../defaults */ "./lib/defaults.js");
799
+
800
+ /**
801
+ * Throws a `Cancel` if cancellation has been requested.
802
+ */
803
+ function throwIfCancellationRequested(config) {
804
+ if (config.cancelToken) {
805
+ config.cancelToken.throwIfRequested();
806
+ }
807
+ }
808
+
809
+ /**
810
+ * Dispatch a request to the server using the configured adapter.
811
+ *
812
+ * @param {object} config The config that is to be used for the request
813
+ * @returns {Promise} The Promise to be fulfilled
814
+ */
815
+ module.exports = function dispatchRequest(config) {
816
+ throwIfCancellationRequested(config);
817
+
818
+ // Ensure headers exist
819
+ config.headers = config.headers || {};
820
+
821
+ // Transform request data
822
+ config.data = transformData.call(
823
+ config,
824
+ config.data,
825
+ config.headers,
826
+ config.transformRequest
827
+ );
828
+
829
+ // Flatten headers
830
+ config.headers = utils.merge(
831
+ config.headers.common || {},
832
+ config.headers[config.method] || {},
833
+ config.headers
834
+ );
835
+
836
+ utils.forEach(
837
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
838
+ function cleanHeaderConfig(method) {
839
+ delete config.headers[method];
840
+ }
841
+ );
842
+
843
+ var adapter = config.adapter || defaults.adapter;
844
+
845
+ return adapter(config).then(function onAdapterResolution(response) {
846
+ throwIfCancellationRequested(config);
847
+
848
+ // Transform response data
849
+ response.data = transformData.call(
850
+ config,
851
+ response.data,
852
+ response.headers,
853
+ config.transformResponse
854
+ );
855
+
856
+ return response;
857
+ }, function onAdapterRejection(reason) {
858
+ if (!isCancel(reason)) {
859
+ throwIfCancellationRequested(config);
860
+
861
+ // Transform response data
862
+ if (reason && reason.response) {
863
+ reason.response.data = transformData.call(
864
+ config,
865
+ reason.response.data,
866
+ reason.response.headers,
867
+ config.transformResponse
868
+ );
869
+ }
870
+ }
871
+
872
+ return Promise.reject(reason);
873
+ });
874
+ };
951
875
 
952
876
 
953
877
  /***/ }),
954
- /* 11 */
878
+
879
+ /***/ "./lib/core/enhanceError.js":
880
+ /*!**********************************!*\
881
+ !*** ./lib/core/enhanceError.js ***!
882
+ \**********************************/
883
+ /*! no static exports found */
955
884
  /***/ (function(module, exports, __webpack_require__) {
956
885
 
957
- 'use strict';
958
-
959
- var utils = __webpack_require__(2);
960
-
961
- module.exports = function normalizeHeaderName(headers, normalizedName) {
962
- utils.forEach(headers, function processHeader(value, name) {
963
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
964
- headers[normalizedName] = value;
965
- delete headers[name];
966
- }
967
- });
968
- };
886
+ "use strict";
887
+
888
+
889
+ /**
890
+ * Update an Error with the specified config, error code, and response.
891
+ *
892
+ * @param {Error} error The error to update.
893
+ * @param {Object} config The config.
894
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
895
+ * @param {Object} [request] The request.
896
+ * @param {Object} [response] The response.
897
+ * @returns {Error} The error.
898
+ */
899
+ module.exports = function enhanceError(error, config, code, request, response) {
900
+ error.config = config;
901
+ if (code) {
902
+ error.code = code;
903
+ }
904
+
905
+ error.request = request;
906
+ error.response = response;
907
+ error.isAxiosError = true;
908
+
909
+ error.toJSON = function toJSON() {
910
+ return {
911
+ // Standard
912
+ message: this.message,
913
+ name: this.name,
914
+ // Microsoft
915
+ description: this.description,
916
+ number: this.number,
917
+ // Mozilla
918
+ fileName: this.fileName,
919
+ lineNumber: this.lineNumber,
920
+ columnNumber: this.columnNumber,
921
+ stack: this.stack,
922
+ // Axios
923
+ config: this.config,
924
+ code: this.code
925
+ };
926
+ };
927
+ return error;
928
+ };
969
929
 
970
930
 
971
931
  /***/ }),
972
- /* 12 */
932
+
933
+ /***/ "./lib/core/mergeConfig.js":
934
+ /*!*********************************!*\
935
+ !*** ./lib/core/mergeConfig.js ***!
936
+ \*********************************/
937
+ /*! no static exports found */
973
938
  /***/ (function(module, exports, __webpack_require__) {
974
939
 
975
- 'use strict';
976
-
977
- var utils = __webpack_require__(2);
978
- var settle = __webpack_require__(13);
979
- var cookies = __webpack_require__(16);
980
- var buildURL = __webpack_require__(5);
981
- var buildFullPath = __webpack_require__(17);
982
- var parseHeaders = __webpack_require__(20);
983
- var isURLSameOrigin = __webpack_require__(21);
984
- var createError = __webpack_require__(14);
985
-
986
- module.exports = function xhrAdapter(config) {
987
- return new Promise(function dispatchXhrRequest(resolve, reject) {
988
- var requestData = config.data;
989
- var requestHeaders = config.headers;
990
-
991
- if (utils.isFormData(requestData)) {
992
- delete requestHeaders['Content-Type']; // Let the browser set it
993
- }
994
-
995
- if (
996
- (utils.isBlob(requestData) || utils.isFile(requestData)) &&
997
- requestData.type
998
- ) {
999
- delete requestHeaders['Content-Type']; // Let the browser set it
1000
- }
1001
-
1002
- var request = new XMLHttpRequest();
1003
-
1004
- // HTTP basic authentication
1005
- if (config.auth) {
1006
- var username = config.auth.username || '';
1007
- var password = unescape(encodeURIComponent(config.auth.password)) || '';
1008
- requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
1009
- }
1010
-
1011
- var fullPath = buildFullPath(config.baseURL, config.url);
1012
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
1013
-
1014
- // Set the request timeout in MS
1015
- request.timeout = config.timeout;
1016
-
1017
- // Listen for ready state
1018
- request.onreadystatechange = function handleLoad() {
1019
- if (!request || request.readyState !== 4) {
1020
- return;
1021
- }
1022
-
1023
- // The request errored out and we didn't get a response, this will be
1024
- // handled by onerror instead
1025
- // With one exception: request that using file: protocol, most browsers
1026
- // will return status as 0 even though it's a successful request
1027
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
1028
- return;
1029
- }
1030
-
1031
- // Prepare the response
1032
- var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
1033
- var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
1034
- var response = {
1035
- data: responseData,
1036
- status: request.status,
1037
- statusText: request.statusText,
1038
- headers: responseHeaders,
1039
- config: config,
1040
- request: request
1041
- };
1042
-
1043
- settle(resolve, reject, response);
1044
-
1045
- // Clean up request
1046
- request = null;
1047
- };
1048
-
1049
- // Handle browser request cancellation (as opposed to a manual cancellation)
1050
- request.onabort = function handleAbort() {
1051
- if (!request) {
1052
- return;
1053
- }
1054
-
1055
- reject(createError('Request aborted', config, 'ECONNABORTED', request));
1056
-
1057
- // Clean up request
1058
- request = null;
1059
- };
1060
-
1061
- // Handle low level network errors
1062
- request.onerror = function handleError() {
1063
- // Real errors are hidden from us by the browser
1064
- // onerror should only fire if it's a network error
1065
- reject(createError('Network Error', config, null, request));
1066
-
1067
- // Clean up request
1068
- request = null;
1069
- };
1070
-
1071
- // Handle timeout
1072
- request.ontimeout = function handleTimeout() {
1073
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
1074
- if (config.timeoutErrorMessage) {
1075
- timeoutErrorMessage = config.timeoutErrorMessage;
1076
- }
1077
- reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
1078
- request));
1079
-
1080
- // Clean up request
1081
- request = null;
1082
- };
1083
-
1084
- // Add xsrf header
1085
- // This is only done if running in a standard browser environment.
1086
- // Specifically not if we're in a web worker, or react-native.
1087
- if (utils.isStandardBrowserEnv()) {
1088
- // Add xsrf header
1089
- var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1090
- cookies.read(config.xsrfCookieName) :
1091
- undefined;
1092
-
1093
- if (xsrfValue) {
1094
- requestHeaders[config.xsrfHeaderName] = xsrfValue;
1095
- }
1096
- }
1097
-
1098
- // Add headers to the request
1099
- if ('setRequestHeader' in request) {
1100
- utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1101
- if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1102
- // Remove Content-Type if data is undefined
1103
- delete requestHeaders[key];
1104
- } else {
1105
- // Otherwise add header to the request
1106
- request.setRequestHeader(key, val);
1107
- }
1108
- });
1109
- }
1110
-
1111
- // Add withCredentials to request if needed
1112
- if (!utils.isUndefined(config.withCredentials)) {
1113
- request.withCredentials = !!config.withCredentials;
1114
- }
1115
-
1116
- // Add responseType to request if needed
1117
- if (config.responseType) {
1118
- try {
1119
- request.responseType = config.responseType;
1120
- } catch (e) {
1121
- // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
1122
- // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
1123
- if (config.responseType !== 'json') {
1124
- throw e;
1125
- }
1126
- }
1127
- }
1128
-
1129
- // Handle progress if needed
1130
- if (typeof config.onDownloadProgress === 'function') {
1131
- request.addEventListener('progress', config.onDownloadProgress);
1132
- }
1133
-
1134
- // Not all browsers support upload events
1135
- if (typeof config.onUploadProgress === 'function' && request.upload) {
1136
- request.upload.addEventListener('progress', config.onUploadProgress);
1137
- }
1138
-
1139
- if (config.cancelToken) {
1140
- // Handle cancellation
1141
- config.cancelToken.promise.then(function onCanceled(cancel) {
1142
- if (!request) {
1143
- return;
1144
- }
1145
-
1146
- request.abort();
1147
- reject(cancel);
1148
- // Clean up request
1149
- request = null;
1150
- });
1151
- }
1152
-
1153
- if (!requestData) {
1154
- requestData = null;
1155
- }
1156
-
1157
- // Send the request
1158
- request.send(requestData);
1159
- });
1160
- };
940
+ "use strict";
941
+
942
+
943
+ var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
944
+
945
+ /**
946
+ * Config-specific merge-function which creates a new config-object
947
+ * by merging two configuration objects together.
948
+ *
949
+ * @param {Object} config1
950
+ * @param {Object} config2
951
+ * @returns {Object} New object resulting from merging config2 to config1
952
+ */
953
+ module.exports = function mergeConfig(config1, config2) {
954
+ // eslint-disable-next-line no-param-reassign
955
+ config2 = config2 || {};
956
+ var config = {};
957
+
958
+ var valueFromConfig2Keys = ['url', 'method', 'data'];
959
+ var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
960
+ var defaultToConfig2Keys = [
961
+ 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
962
+ 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
963
+ 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
964
+ 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
965
+ 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
966
+ ];
967
+ var directMergeKeys = ['validateStatus'];
968
+
969
+ function getMergedValue(target, source) {
970
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
971
+ return utils.merge(target, source);
972
+ } else if (utils.isPlainObject(source)) {
973
+ return utils.merge({}, source);
974
+ } else if (utils.isArray(source)) {
975
+ return source.slice();
976
+ }
977
+ return source;
978
+ }
979
+
980
+ function mergeDeepProperties(prop) {
981
+ if (!utils.isUndefined(config2[prop])) {
982
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
983
+ } else if (!utils.isUndefined(config1[prop])) {
984
+ config[prop] = getMergedValue(undefined, config1[prop]);
985
+ }
986
+ }
987
+
988
+ utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
989
+ if (!utils.isUndefined(config2[prop])) {
990
+ config[prop] = getMergedValue(undefined, config2[prop]);
991
+ }
992
+ });
993
+
994
+ utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
995
+
996
+ utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
997
+ if (!utils.isUndefined(config2[prop])) {
998
+ config[prop] = getMergedValue(undefined, config2[prop]);
999
+ } else if (!utils.isUndefined(config1[prop])) {
1000
+ config[prop] = getMergedValue(undefined, config1[prop]);
1001
+ }
1002
+ });
1003
+
1004
+ utils.forEach(directMergeKeys, function merge(prop) {
1005
+ if (prop in config2) {
1006
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
1007
+ } else if (prop in config1) {
1008
+ config[prop] = getMergedValue(undefined, config1[prop]);
1009
+ }
1010
+ });
1011
+
1012
+ var axiosKeys = valueFromConfig2Keys
1013
+ .concat(mergeDeepPropertiesKeys)
1014
+ .concat(defaultToConfig2Keys)
1015
+ .concat(directMergeKeys);
1016
+
1017
+ var otherKeys = Object
1018
+ .keys(config1)
1019
+ .concat(Object.keys(config2))
1020
+ .filter(function filterAxiosKeys(key) {
1021
+ return axiosKeys.indexOf(key) === -1;
1022
+ });
1023
+
1024
+ utils.forEach(otherKeys, mergeDeepProperties);
1025
+
1026
+ return config;
1027
+ };
1161
1028
 
1162
1029
 
1163
1030
  /***/ }),
1164
- /* 13 */
1031
+
1032
+ /***/ "./lib/core/settle.js":
1033
+ /*!****************************!*\
1034
+ !*** ./lib/core/settle.js ***!
1035
+ \****************************/
1036
+ /*! no static exports found */
1165
1037
  /***/ (function(module, exports, __webpack_require__) {
1166
1038
 
1167
- 'use strict';
1168
-
1169
- var createError = __webpack_require__(14);
1170
-
1171
- /**
1172
- * Resolve or reject a Promise based on response status.
1173
- *
1174
- * @param {Function} resolve A function that resolves the promise.
1175
- * @param {Function} reject A function that rejects the promise.
1176
- * @param {object} response The response.
1177
- */
1178
- module.exports = function settle(resolve, reject, response) {
1179
- var validateStatus = response.config.validateStatus;
1180
- if (!response.status || !validateStatus || validateStatus(response.status)) {
1181
- resolve(response);
1182
- } else {
1183
- reject(createError(
1184
- 'Request failed with status code ' + response.status,
1185
- response.config,
1186
- null,
1187
- response.request,
1188
- response
1189
- ));
1190
- }
1191
- };
1039
+ "use strict";
1040
+
1041
+
1042
+ var createError = __webpack_require__(/*! ./createError */ "./lib/core/createError.js");
1043
+
1044
+ /**
1045
+ * Resolve or reject a Promise based on response status.
1046
+ *
1047
+ * @param {Function} resolve A function that resolves the promise.
1048
+ * @param {Function} reject A function that rejects the promise.
1049
+ * @param {object} response The response.
1050
+ */
1051
+ module.exports = function settle(resolve, reject, response) {
1052
+ var validateStatus = response.config.validateStatus;
1053
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
1054
+ resolve(response);
1055
+ } else {
1056
+ reject(createError(
1057
+ 'Request failed with status code ' + response.status,
1058
+ response.config,
1059
+ null,
1060
+ response.request,
1061
+ response
1062
+ ));
1063
+ }
1064
+ };
1192
1065
 
1193
1066
 
1194
1067
  /***/ }),
1195
- /* 14 */
1068
+
1069
+ /***/ "./lib/core/transformData.js":
1070
+ /*!***********************************!*\
1071
+ !*** ./lib/core/transformData.js ***!
1072
+ \***********************************/
1073
+ /*! no static exports found */
1196
1074
  /***/ (function(module, exports, __webpack_require__) {
1197
1075
 
1198
- 'use strict';
1199
-
1200
- var enhanceError = __webpack_require__(15);
1201
-
1202
- /**
1203
- * Create an Error with the specified message, config, error code, request and response.
1204
- *
1205
- * @param {string} message The error message.
1206
- * @param {Object} config The config.
1207
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
1208
- * @param {Object} [request] The request.
1209
- * @param {Object} [response] The response.
1210
- * @returns {Error} The created error.
1211
- */
1212
- module.exports = function createError(message, config, code, request, response) {
1213
- var error = new Error(message);
1214
- return enhanceError(error, config, code, request, response);
1215
- };
1076
+ "use strict";
1077
+
1078
+
1079
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
1080
+ var defaults = __webpack_require__(/*! ./../defaults */ "./lib/defaults.js");
1081
+
1082
+ /**
1083
+ * Transform the data for a request or a response
1084
+ *
1085
+ * @param {Object|String} data The data to be transformed
1086
+ * @param {Array} headers The headers for the request or response
1087
+ * @param {Array|Function} fns A single function or Array of functions
1088
+ * @returns {*} The resulting transformed data
1089
+ */
1090
+ module.exports = function transformData(data, headers, fns) {
1091
+ var context = this || defaults;
1092
+ /*eslint no-param-reassign:0*/
1093
+ utils.forEach(fns, function transform(fn) {
1094
+ data = fn.call(context, data, headers);
1095
+ });
1096
+
1097
+ return data;
1098
+ };
1216
1099
 
1217
1100
 
1218
1101
  /***/ }),
1219
- /* 15 */
1220
- /***/ (function(module, exports) {
1221
-
1222
- 'use strict';
1223
-
1224
- /**
1225
- * Update an Error with the specified config, error code, and response.
1226
- *
1227
- * @param {Error} error The error to update.
1228
- * @param {Object} config The config.
1229
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
1230
- * @param {Object} [request] The request.
1231
- * @param {Object} [response] The response.
1232
- * @returns {Error} The error.
1233
- */
1234
- module.exports = function enhanceError(error, config, code, request, response) {
1235
- error.config = config;
1236
- if (code) {
1237
- error.code = code;
1238
- }
1239
-
1240
- error.request = request;
1241
- error.response = response;
1242
- error.isAxiosError = true;
1243
-
1244
- error.toJSON = function toJSON() {
1245
- return {
1246
- // Standard
1247
- message: this.message,
1248
- name: this.name,
1249
- // Microsoft
1250
- description: this.description,
1251
- number: this.number,
1252
- // Mozilla
1253
- fileName: this.fileName,
1254
- lineNumber: this.lineNumber,
1255
- columnNumber: this.columnNumber,
1256
- stack: this.stack,
1257
- // Axios
1258
- config: this.config,
1259
- code: this.code
1260
- };
1261
- };
1262
- return error;
1263
- };
1102
+
1103
+ /***/ "./lib/defaults.js":
1104
+ /*!*************************!*\
1105
+ !*** ./lib/defaults.js ***!
1106
+ \*************************/
1107
+ /*! no static exports found */
1108
+ /***/ (function(module, exports, __webpack_require__) {
1109
+
1110
+ "use strict";
1111
+
1112
+
1113
+ var utils = __webpack_require__(/*! ./utils */ "./lib/utils.js");
1114
+ var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./lib/helpers/normalizeHeaderName.js");
1115
+ var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "./lib/core/enhanceError.js");
1116
+
1117
+ var DEFAULT_CONTENT_TYPE = {
1118
+ 'Content-Type': 'application/x-www-form-urlencoded'
1119
+ };
1120
+
1121
+ function setContentTypeIfUnset(headers, value) {
1122
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
1123
+ headers['Content-Type'] = value;
1124
+ }
1125
+ }
1126
+
1127
+ function getDefaultAdapter() {
1128
+ var adapter;
1129
+ if (typeof XMLHttpRequest !== 'undefined') {
1130
+ // For browsers use XHR adapter
1131
+ adapter = __webpack_require__(/*! ./adapters/xhr */ "./lib/adapters/xhr.js");
1132
+ } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
1133
+ // For node use HTTP adapter
1134
+ adapter = __webpack_require__(/*! ./adapters/http */ "./lib/adapters/xhr.js");
1135
+ }
1136
+ return adapter;
1137
+ }
1138
+
1139
+ var defaults = {
1140
+
1141
+ transitional: {
1142
+ silentJSONParsing: true,
1143
+ forcedJSONParsing: true,
1144
+ clarifyTimeoutError: false
1145
+ },
1146
+
1147
+ adapter: getDefaultAdapter(),
1148
+
1149
+ transformRequest: [function transformRequest(data, headers) {
1150
+ normalizeHeaderName(headers, 'Accept');
1151
+ normalizeHeaderName(headers, 'Content-Type');
1152
+
1153
+ if (utils.isFormData(data) ||
1154
+ utils.isArrayBuffer(data) ||
1155
+ utils.isBuffer(data) ||
1156
+ utils.isStream(data) ||
1157
+ utils.isFile(data) ||
1158
+ utils.isBlob(data)
1159
+ ) {
1160
+ return data;
1161
+ }
1162
+ if (utils.isArrayBufferView(data)) {
1163
+ return data.buffer;
1164
+ }
1165
+ if (utils.isURLSearchParams(data)) {
1166
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
1167
+ return data.toString();
1168
+ }
1169
+ if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
1170
+ setContentTypeIfUnset(headers, 'application/json');
1171
+ return JSON.stringify(data);
1172
+ }
1173
+ return data;
1174
+ }],
1175
+
1176
+ transformResponse: [function transformResponse(data) {
1177
+ var transitional = this.transitional;
1178
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
1179
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1180
+ var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
1181
+
1182
+ if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
1183
+ try {
1184
+ return JSON.parse(data);
1185
+ } catch (e) {
1186
+ if (strictJSONParsing) {
1187
+ if (e.name === 'SyntaxError') {
1188
+ throw enhanceError(e, this, 'E_JSON_PARSE');
1189
+ }
1190
+ throw e;
1191
+ }
1192
+ }
1193
+ }
1194
+
1195
+ return data;
1196
+ }],
1197
+
1198
+ /**
1199
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1200
+ * timeout is not created.
1201
+ */
1202
+ timeout: 0,
1203
+
1204
+ xsrfCookieName: 'XSRF-TOKEN',
1205
+ xsrfHeaderName: 'X-XSRF-TOKEN',
1206
+
1207
+ maxContentLength: -1,
1208
+ maxBodyLength: -1,
1209
+
1210
+ validateStatus: function validateStatus(status) {
1211
+ return status >= 200 && status < 300;
1212
+ }
1213
+ };
1214
+
1215
+ defaults.headers = {
1216
+ common: {
1217
+ 'Accept': 'application/json, text/plain, */*'
1218
+ }
1219
+ };
1220
+
1221
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1222
+ defaults.headers[method] = {};
1223
+ });
1224
+
1225
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1226
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1227
+ });
1228
+
1229
+ module.exports = defaults;
1264
1230
 
1265
1231
 
1266
1232
  /***/ }),
1267
- /* 16 */
1233
+
1234
+ /***/ "./lib/helpers/bind.js":
1235
+ /*!*****************************!*\
1236
+ !*** ./lib/helpers/bind.js ***!
1237
+ \*****************************/
1238
+ /*! no static exports found */
1268
1239
  /***/ (function(module, exports, __webpack_require__) {
1269
1240
 
1270
- 'use strict';
1271
-
1272
- var utils = __webpack_require__(2);
1273
-
1274
- module.exports = (
1275
- utils.isStandardBrowserEnv() ?
1276
-
1277
- // Standard browser envs support document.cookie
1278
- (function standardBrowserEnv() {
1279
- return {
1280
- write: function write(name, value, expires, path, domain, secure) {
1281
- var cookie = [];
1282
- cookie.push(name + '=' + encodeURIComponent(value));
1283
-
1284
- if (utils.isNumber(expires)) {
1285
- cookie.push('expires=' + new Date(expires).toGMTString());
1286
- }
1287
-
1288
- if (utils.isString(path)) {
1289
- cookie.push('path=' + path);
1290
- }
1291
-
1292
- if (utils.isString(domain)) {
1293
- cookie.push('domain=' + domain);
1294
- }
1295
-
1296
- if (secure === true) {
1297
- cookie.push('secure');
1298
- }
1299
-
1300
- document.cookie = cookie.join('; ');
1301
- },
1302
-
1303
- read: function read(name) {
1304
- var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1305
- return (match ? decodeURIComponent(match[3]) : null);
1306
- },
1307
-
1308
- remove: function remove(name) {
1309
- this.write(name, '', Date.now() - 86400000);
1310
- }
1311
- };
1312
- })() :
1313
-
1314
- // Non standard browser env (web workers, react-native) lack needed support.
1315
- (function nonStandardBrowserEnv() {
1316
- return {
1317
- write: function write() {},
1318
- read: function read() { return null; },
1319
- remove: function remove() {}
1320
- };
1321
- })()
1322
- );
1241
+ "use strict";
1242
+
1243
+
1244
+ module.exports = function bind(fn, thisArg) {
1245
+ return function wrap() {
1246
+ var args = new Array(arguments.length);
1247
+ for (var i = 0; i < args.length; i++) {
1248
+ args[i] = arguments[i];
1249
+ }
1250
+ return fn.apply(thisArg, args);
1251
+ };
1252
+ };
1323
1253
 
1324
1254
 
1325
1255
  /***/ }),
1326
- /* 17 */
1256
+
1257
+ /***/ "./lib/helpers/buildURL.js":
1258
+ /*!*********************************!*\
1259
+ !*** ./lib/helpers/buildURL.js ***!
1260
+ \*********************************/
1261
+ /*! no static exports found */
1327
1262
  /***/ (function(module, exports, __webpack_require__) {
1328
1263
 
1329
- 'use strict';
1330
-
1331
- var isAbsoluteURL = __webpack_require__(18);
1332
- var combineURLs = __webpack_require__(19);
1333
-
1334
- /**
1335
- * Creates a new URL by combining the baseURL with the requestedURL,
1336
- * only when the requestedURL is not already an absolute URL.
1337
- * If the requestURL is absolute, this function returns the requestedURL untouched.
1338
- *
1339
- * @param {string} baseURL The base URL
1340
- * @param {string} requestedURL Absolute or relative URL to combine
1341
- * @returns {string} The combined full path
1342
- */
1343
- module.exports = function buildFullPath(baseURL, requestedURL) {
1344
- if (baseURL && !isAbsoluteURL(requestedURL)) {
1345
- return combineURLs(baseURL, requestedURL);
1346
- }
1347
- return requestedURL;
1348
- };
1264
+ "use strict";
1265
+
1266
+
1267
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
1268
+
1269
+ function encode(val) {
1270
+ return encodeURIComponent(val).
1271
+ replace(/%3A/gi, ':').
1272
+ replace(/%24/g, '$').
1273
+ replace(/%2C/gi, ',').
1274
+ replace(/%20/g, '+').
1275
+ replace(/%5B/gi, '[').
1276
+ replace(/%5D/gi, ']');
1277
+ }
1278
+
1279
+ /**
1280
+ * Build a URL by appending params to the end
1281
+ *
1282
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1283
+ * @param {object} [params] The params to be appended
1284
+ * @returns {string} The formatted url
1285
+ */
1286
+ module.exports = function buildURL(url, params, paramsSerializer) {
1287
+ /*eslint no-param-reassign:0*/
1288
+ if (!params) {
1289
+ return url;
1290
+ }
1291
+
1292
+ var serializedParams;
1293
+ if (paramsSerializer) {
1294
+ serializedParams = paramsSerializer(params);
1295
+ } else if (utils.isURLSearchParams(params)) {
1296
+ serializedParams = params.toString();
1297
+ } else {
1298
+ var parts = [];
1299
+
1300
+ utils.forEach(params, function serialize(val, key) {
1301
+ if (val === null || typeof val === 'undefined') {
1302
+ return;
1303
+ }
1304
+
1305
+ if (utils.isArray(val)) {
1306
+ key = key + '[]';
1307
+ } else {
1308
+ val = [val];
1309
+ }
1310
+
1311
+ utils.forEach(val, function parseValue(v) {
1312
+ if (utils.isDate(v)) {
1313
+ v = v.toISOString();
1314
+ } else if (utils.isObject(v)) {
1315
+ v = JSON.stringify(v);
1316
+ }
1317
+ parts.push(encode(key) + '=' + encode(v));
1318
+ });
1319
+ });
1320
+
1321
+ serializedParams = parts.join('&');
1322
+ }
1323
+
1324
+ if (serializedParams) {
1325
+ var hashmarkIndex = url.indexOf('#');
1326
+ if (hashmarkIndex !== -1) {
1327
+ url = url.slice(0, hashmarkIndex);
1328
+ }
1329
+
1330
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1331
+ }
1332
+
1333
+ return url;
1334
+ };
1349
1335
 
1350
1336
 
1351
1337
  /***/ }),
1352
- /* 18 */
1353
- /***/ (function(module, exports) {
1354
-
1355
- 'use strict';
1356
-
1357
- /**
1358
- * Determines whether the specified URL is absolute
1359
- *
1360
- * @param {string} url The URL to test
1361
- * @returns {boolean} True if the specified URL is absolute, otherwise false
1362
- */
1363
- module.exports = function isAbsoluteURL(url) {
1364
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1365
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1366
- // by any combination of letters, digits, plus, period, or hyphen.
1367
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1368
- };
1338
+
1339
+ /***/ "./lib/helpers/combineURLs.js":
1340
+ /*!************************************!*\
1341
+ !*** ./lib/helpers/combineURLs.js ***!
1342
+ \************************************/
1343
+ /*! no static exports found */
1344
+ /***/ (function(module, exports, __webpack_require__) {
1345
+
1346
+ "use strict";
1347
+
1348
+
1349
+ /**
1350
+ * Creates a new URL by combining the specified URLs
1351
+ *
1352
+ * @param {string} baseURL The base URL
1353
+ * @param {string} relativeURL The relative URL
1354
+ * @returns {string} The combined URL
1355
+ */
1356
+ module.exports = function combineURLs(baseURL, relativeURL) {
1357
+ return relativeURL
1358
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1359
+ : baseURL;
1360
+ };
1369
1361
 
1370
1362
 
1371
1363
  /***/ }),
1372
- /* 19 */
1373
- /***/ (function(module, exports) {
1374
-
1375
- 'use strict';
1376
-
1377
- /**
1378
- * Creates a new URL by combining the specified URLs
1379
- *
1380
- * @param {string} baseURL The base URL
1381
- * @param {string} relativeURL The relative URL
1382
- * @returns {string} The combined URL
1383
- */
1384
- module.exports = function combineURLs(baseURL, relativeURL) {
1385
- return relativeURL
1386
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1387
- : baseURL;
1388
- };
1364
+
1365
+ /***/ "./lib/helpers/cookies.js":
1366
+ /*!********************************!*\
1367
+ !*** ./lib/helpers/cookies.js ***!
1368
+ \********************************/
1369
+ /*! no static exports found */
1370
+ /***/ (function(module, exports, __webpack_require__) {
1371
+
1372
+ "use strict";
1373
+
1374
+
1375
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
1376
+
1377
+ module.exports = (
1378
+ utils.isStandardBrowserEnv() ?
1379
+
1380
+ // Standard browser envs support document.cookie
1381
+ (function standardBrowserEnv() {
1382
+ return {
1383
+ write: function write(name, value, expires, path, domain, secure) {
1384
+ var cookie = [];
1385
+ cookie.push(name + '=' + encodeURIComponent(value));
1386
+
1387
+ if (utils.isNumber(expires)) {
1388
+ cookie.push('expires=' + new Date(expires).toGMTString());
1389
+ }
1390
+
1391
+ if (utils.isString(path)) {
1392
+ cookie.push('path=' + path);
1393
+ }
1394
+
1395
+ if (utils.isString(domain)) {
1396
+ cookie.push('domain=' + domain);
1397
+ }
1398
+
1399
+ if (secure === true) {
1400
+ cookie.push('secure');
1401
+ }
1402
+
1403
+ document.cookie = cookie.join('; ');
1404
+ },
1405
+
1406
+ read: function read(name) {
1407
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1408
+ return (match ? decodeURIComponent(match[3]) : null);
1409
+ },
1410
+
1411
+ remove: function remove(name) {
1412
+ this.write(name, '', Date.now() - 86400000);
1413
+ }
1414
+ };
1415
+ })() :
1416
+
1417
+ // Non standard browser env (web workers, react-native) lack needed support.
1418
+ (function nonStandardBrowserEnv() {
1419
+ return {
1420
+ write: function write() {},
1421
+ read: function read() { return null; },
1422
+ remove: function remove() {}
1423
+ };
1424
+ })()
1425
+ );
1389
1426
 
1390
1427
 
1391
1428
  /***/ }),
1392
- /* 20 */
1429
+
1430
+ /***/ "./lib/helpers/isAbsoluteURL.js":
1431
+ /*!**************************************!*\
1432
+ !*** ./lib/helpers/isAbsoluteURL.js ***!
1433
+ \**************************************/
1434
+ /*! no static exports found */
1393
1435
  /***/ (function(module, exports, __webpack_require__) {
1394
1436
 
1395
- 'use strict';
1396
-
1397
- var utils = __webpack_require__(2);
1398
-
1399
- // Headers whose duplicates are ignored by node
1400
- // c.f. https://nodejs.org/api/http.html#http_message_headers
1401
- var ignoreDuplicateOf = [
1402
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
1403
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1404
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1405
- 'referer', 'retry-after', 'user-agent'
1406
- ];
1407
-
1408
- /**
1409
- * Parse headers into an object
1410
- *
1411
- * ```
1412
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
1413
- * Content-Type: application/json
1414
- * Connection: keep-alive
1415
- * Transfer-Encoding: chunked
1416
- * ```
1417
- *
1418
- * @param {String} headers Headers needing to be parsed
1419
- * @returns {Object} Headers parsed into an object
1420
- */
1421
- module.exports = function parseHeaders(headers) {
1422
- var parsed = {};
1423
- var key;
1424
- var val;
1425
- var i;
1426
-
1427
- if (!headers) { return parsed; }
1428
-
1429
- utils.forEach(headers.split('\n'), function parser(line) {
1430
- i = line.indexOf(':');
1431
- key = utils.trim(line.substr(0, i)).toLowerCase();
1432
- val = utils.trim(line.substr(i + 1));
1433
-
1434
- if (key) {
1435
- if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
1436
- return;
1437
- }
1438
- if (key === 'set-cookie') {
1439
- parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
1440
- } else {
1441
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1442
- }
1443
- }
1444
- });
1445
-
1446
- return parsed;
1447
- };
1437
+ "use strict";
1438
+
1439
+
1440
+ /**
1441
+ * Determines whether the specified URL is absolute
1442
+ *
1443
+ * @param {string} url The URL to test
1444
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
1445
+ */
1446
+ module.exports = function isAbsoluteURL(url) {
1447
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1448
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1449
+ // by any combination of letters, digits, plus, period, or hyphen.
1450
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1451
+ };
1448
1452
 
1449
1453
 
1450
1454
  /***/ }),
1451
- /* 21 */
1455
+
1456
+ /***/ "./lib/helpers/isAxiosError.js":
1457
+ /*!*************************************!*\
1458
+ !*** ./lib/helpers/isAxiosError.js ***!
1459
+ \*************************************/
1460
+ /*! no static exports found */
1452
1461
  /***/ (function(module, exports, __webpack_require__) {
1453
1462
 
1454
- 'use strict';
1455
-
1456
- var utils = __webpack_require__(2);
1457
-
1458
- module.exports = (
1459
- utils.isStandardBrowserEnv() ?
1460
-
1461
- // Standard browser envs have full support of the APIs needed to test
1462
- // whether the request URL is of the same origin as current location.
1463
- (function standardBrowserEnv() {
1464
- var msie = /(msie|trident)/i.test(navigator.userAgent);
1465
- var urlParsingNode = document.createElement('a');
1466
- var originURL;
1467
-
1468
- /**
1469
- * Parse a URL to discover it's components
1470
- *
1471
- * @param {String} url The URL to be parsed
1472
- * @returns {Object}
1473
- */
1474
- function resolveURL(url) {
1475
- var href = url;
1476
-
1477
- if (msie) {
1478
- // IE needs attribute set twice to normalize properties
1479
- urlParsingNode.setAttribute('href', href);
1480
- href = urlParsingNode.href;
1481
- }
1482
-
1483
- urlParsingNode.setAttribute('href', href);
1484
-
1485
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
1486
- return {
1487
- href: urlParsingNode.href,
1488
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
1489
- host: urlParsingNode.host,
1490
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
1491
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
1492
- hostname: urlParsingNode.hostname,
1493
- port: urlParsingNode.port,
1494
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
1495
- urlParsingNode.pathname :
1496
- '/' + urlParsingNode.pathname
1497
- };
1498
- }
1499
-
1500
- originURL = resolveURL(window.location.href);
1501
-
1502
- /**
1503
- * Determine if a URL shares the same origin as the current location
1504
- *
1505
- * @param {String} requestURL The URL to test
1506
- * @returns {boolean} True if URL shares the same origin, otherwise false
1507
- */
1508
- return function isURLSameOrigin(requestURL) {
1509
- var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
1510
- return (parsed.protocol === originURL.protocol &&
1511
- parsed.host === originURL.host);
1512
- };
1513
- })() :
1514
-
1515
- // Non standard browser envs (web workers, react-native) lack needed support.
1516
- (function nonStandardBrowserEnv() {
1517
- return function isURLSameOrigin() {
1518
- return true;
1519
- };
1520
- })()
1521
- );
1463
+ "use strict";
1464
+
1465
+
1466
+ /**
1467
+ * Determines whether the payload is an error thrown by Axios
1468
+ *
1469
+ * @param {*} payload The value to test
1470
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
1471
+ */
1472
+ module.exports = function isAxiosError(payload) {
1473
+ return (typeof payload === 'object') && (payload.isAxiosError === true);
1474
+ };
1522
1475
 
1523
1476
 
1524
1477
  /***/ }),
1525
- /* 22 */
1478
+
1479
+ /***/ "./lib/helpers/isURLSameOrigin.js":
1480
+ /*!****************************************!*\
1481
+ !*** ./lib/helpers/isURLSameOrigin.js ***!
1482
+ \****************************************/
1483
+ /*! no static exports found */
1526
1484
  /***/ (function(module, exports, __webpack_require__) {
1527
1485
 
1528
- 'use strict';
1529
-
1530
- var utils = __webpack_require__(2);
1531
-
1532
- /**
1533
- * Config-specific merge-function which creates a new config-object
1534
- * by merging two configuration objects together.
1535
- *
1536
- * @param {Object} config1
1537
- * @param {Object} config2
1538
- * @returns {Object} New object resulting from merging config2 to config1
1539
- */
1540
- module.exports = function mergeConfig(config1, config2) {
1541
- // eslint-disable-next-line no-param-reassign
1542
- config2 = config2 || {};
1543
- var config = {};
1544
-
1545
- var valueFromConfig2Keys = ['url', 'method', 'data'];
1546
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
1547
- var defaultToConfig2Keys = [
1548
- 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
1549
- 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
1550
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
1551
- 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
1552
- 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
1553
- ];
1554
- var directMergeKeys = ['validateStatus'];
1555
-
1556
- function getMergedValue(target, source) {
1557
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
1558
- return utils.merge(target, source);
1559
- } else if (utils.isPlainObject(source)) {
1560
- return utils.merge({}, source);
1561
- } else if (utils.isArray(source)) {
1562
- return source.slice();
1563
- }
1564
- return source;
1565
- }
1566
-
1567
- function mergeDeepProperties(prop) {
1568
- if (!utils.isUndefined(config2[prop])) {
1569
- config[prop] = getMergedValue(config1[prop], config2[prop]);
1570
- } else if (!utils.isUndefined(config1[prop])) {
1571
- config[prop] = getMergedValue(undefined, config1[prop]);
1572
- }
1573
- }
1574
-
1575
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
1576
- if (!utils.isUndefined(config2[prop])) {
1577
- config[prop] = getMergedValue(undefined, config2[prop]);
1578
- }
1579
- });
1580
-
1581
- utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
1582
-
1583
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
1584
- if (!utils.isUndefined(config2[prop])) {
1585
- config[prop] = getMergedValue(undefined, config2[prop]);
1586
- } else if (!utils.isUndefined(config1[prop])) {
1587
- config[prop] = getMergedValue(undefined, config1[prop]);
1588
- }
1589
- });
1590
-
1591
- utils.forEach(directMergeKeys, function merge(prop) {
1592
- if (prop in config2) {
1593
- config[prop] = getMergedValue(config1[prop], config2[prop]);
1594
- } else if (prop in config1) {
1595
- config[prop] = getMergedValue(undefined, config1[prop]);
1596
- }
1597
- });
1598
-
1599
- var axiosKeys = valueFromConfig2Keys
1600
- .concat(mergeDeepPropertiesKeys)
1601
- .concat(defaultToConfig2Keys)
1602
- .concat(directMergeKeys);
1603
-
1604
- var otherKeys = Object
1605
- .keys(config1)
1606
- .concat(Object.keys(config2))
1607
- .filter(function filterAxiosKeys(key) {
1608
- return axiosKeys.indexOf(key) === -1;
1609
- });
1610
-
1611
- utils.forEach(otherKeys, mergeDeepProperties);
1612
-
1613
- return config;
1614
- };
1486
+ "use strict";
1487
+
1488
+
1489
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
1490
+
1491
+ module.exports = (
1492
+ utils.isStandardBrowserEnv() ?
1493
+
1494
+ // Standard browser envs have full support of the APIs needed to test
1495
+ // whether the request URL is of the same origin as current location.
1496
+ (function standardBrowserEnv() {
1497
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
1498
+ var urlParsingNode = document.createElement('a');
1499
+ var originURL;
1500
+
1501
+ /**
1502
+ * Parse a URL to discover it's components
1503
+ *
1504
+ * @param {String} url The URL to be parsed
1505
+ * @returns {Object}
1506
+ */
1507
+ function resolveURL(url) {
1508
+ var href = url;
1509
+
1510
+ if (msie) {
1511
+ // IE needs attribute set twice to normalize properties
1512
+ urlParsingNode.setAttribute('href', href);
1513
+ href = urlParsingNode.href;
1514
+ }
1515
+
1516
+ urlParsingNode.setAttribute('href', href);
1517
+
1518
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
1519
+ return {
1520
+ href: urlParsingNode.href,
1521
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
1522
+ host: urlParsingNode.host,
1523
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
1524
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
1525
+ hostname: urlParsingNode.hostname,
1526
+ port: urlParsingNode.port,
1527
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
1528
+ urlParsingNode.pathname :
1529
+ '/' + urlParsingNode.pathname
1530
+ };
1531
+ }
1532
+
1533
+ originURL = resolveURL(window.location.href);
1534
+
1535
+ /**
1536
+ * Determine if a URL shares the same origin as the current location
1537
+ *
1538
+ * @param {String} requestURL The URL to test
1539
+ * @returns {boolean} True if URL shares the same origin, otherwise false
1540
+ */
1541
+ return function isURLSameOrigin(requestURL) {
1542
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
1543
+ return (parsed.protocol === originURL.protocol &&
1544
+ parsed.host === originURL.host);
1545
+ };
1546
+ })() :
1547
+
1548
+ // Non standard browser envs (web workers, react-native) lack needed support.
1549
+ (function nonStandardBrowserEnv() {
1550
+ return function isURLSameOrigin() {
1551
+ return true;
1552
+ };
1553
+ })()
1554
+ );
1615
1555
 
1616
1556
 
1617
1557
  /***/ }),
1618
- /* 23 */
1619
- /***/ (function(module, exports) {
1620
-
1621
- 'use strict';
1622
-
1623
- /**
1624
- * A `Cancel` is an object that is thrown when an operation is canceled.
1625
- *
1626
- * @class
1627
- * @param {string=} message The message.
1628
- */
1629
- function Cancel(message) {
1630
- this.message = message;
1631
- }
1632
-
1633
- Cancel.prototype.toString = function toString() {
1634
- return 'Cancel' + (this.message ? ': ' + this.message : '');
1635
- };
1636
-
1637
- Cancel.prototype.__CANCEL__ = true;
1638
-
1639
- module.exports = Cancel;
1558
+
1559
+ /***/ "./lib/helpers/normalizeHeaderName.js":
1560
+ /*!********************************************!*\
1561
+ !*** ./lib/helpers/normalizeHeaderName.js ***!
1562
+ \********************************************/
1563
+ /*! no static exports found */
1564
+ /***/ (function(module, exports, __webpack_require__) {
1565
+
1566
+ "use strict";
1567
+
1568
+
1569
+ var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js");
1570
+
1571
+ module.exports = function normalizeHeaderName(headers, normalizedName) {
1572
+ utils.forEach(headers, function processHeader(value, name) {
1573
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
1574
+ headers[normalizedName] = value;
1575
+ delete headers[name];
1576
+ }
1577
+ });
1578
+ };
1579
+
1580
+
1581
+ /***/ }),
1582
+
1583
+ /***/ "./lib/helpers/parseHeaders.js":
1584
+ /*!*************************************!*\
1585
+ !*** ./lib/helpers/parseHeaders.js ***!
1586
+ \*************************************/
1587
+ /*! no static exports found */
1588
+ /***/ (function(module, exports, __webpack_require__) {
1589
+
1590
+ "use strict";
1591
+
1592
+
1593
+ var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js");
1594
+
1595
+ // Headers whose duplicates are ignored by node
1596
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1597
+ var ignoreDuplicateOf = [
1598
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
1599
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1600
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1601
+ 'referer', 'retry-after', 'user-agent'
1602
+ ];
1603
+
1604
+ /**
1605
+ * Parse headers into an object
1606
+ *
1607
+ * ```
1608
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1609
+ * Content-Type: application/json
1610
+ * Connection: keep-alive
1611
+ * Transfer-Encoding: chunked
1612
+ * ```
1613
+ *
1614
+ * @param {String} headers Headers needing to be parsed
1615
+ * @returns {Object} Headers parsed into an object
1616
+ */
1617
+ module.exports = function parseHeaders(headers) {
1618
+ var parsed = {};
1619
+ var key;
1620
+ var val;
1621
+ var i;
1622
+
1623
+ if (!headers) { return parsed; }
1624
+
1625
+ utils.forEach(headers.split('\n'), function parser(line) {
1626
+ i = line.indexOf(':');
1627
+ key = utils.trim(line.substr(0, i)).toLowerCase();
1628
+ val = utils.trim(line.substr(i + 1));
1629
+
1630
+ if (key) {
1631
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
1632
+ return;
1633
+ }
1634
+ if (key === 'set-cookie') {
1635
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
1636
+ } else {
1637
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1638
+ }
1639
+ }
1640
+ });
1641
+
1642
+ return parsed;
1643
+ };
1644
+
1645
+
1646
+ /***/ }),
1647
+
1648
+ /***/ "./lib/helpers/spread.js":
1649
+ /*!*******************************!*\
1650
+ !*** ./lib/helpers/spread.js ***!
1651
+ \*******************************/
1652
+ /*! no static exports found */
1653
+ /***/ (function(module, exports, __webpack_require__) {
1654
+
1655
+ "use strict";
1656
+
1657
+
1658
+ /**
1659
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
1660
+ *
1661
+ * Common use case would be to use `Function.prototype.apply`.
1662
+ *
1663
+ * ```js
1664
+ * function f(x, y, z) {}
1665
+ * var args = [1, 2, 3];
1666
+ * f.apply(null, args);
1667
+ * ```
1668
+ *
1669
+ * With `spread` this example can be re-written.
1670
+ *
1671
+ * ```js
1672
+ * spread(function(x, y, z) {})([1, 2, 3]);
1673
+ * ```
1674
+ *
1675
+ * @param {Function} callback
1676
+ * @returns {Function}
1677
+ */
1678
+ module.exports = function spread(callback) {
1679
+ return function wrap(arr) {
1680
+ return callback.apply(null, arr);
1681
+ };
1682
+ };
1683
+
1684
+
1685
+ /***/ }),
1686
+
1687
+ /***/ "./lib/helpers/validator.js":
1688
+ /*!**********************************!*\
1689
+ !*** ./lib/helpers/validator.js ***!
1690
+ \**********************************/
1691
+ /*! no static exports found */
1692
+ /***/ (function(module, exports, __webpack_require__) {
1693
+
1694
+ "use strict";
1695
+
1696
+
1697
+ var pkg = __webpack_require__(/*! ./../../package.json */ "./package.json");
1698
+
1699
+ var validators = {};
1700
+
1701
+ // eslint-disable-next-line func-names
1702
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
1703
+ validators[type] = function validator(thing) {
1704
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
1705
+ };
1706
+ });
1707
+
1708
+ var deprecatedWarnings = {};
1709
+ var currentVerArr = pkg.version.split('.');
1710
+
1711
+ /**
1712
+ * Compare package versions
1713
+ * @param {string} version
1714
+ * @param {string?} thanVersion
1715
+ * @returns {boolean}
1716
+ */
1717
+ function isOlderVersion(version, thanVersion) {
1718
+ var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
1719
+ var destVer = version.split('.');
1720
+ for (var i = 0; i < 3; i++) {
1721
+ if (pkgVersionArr[i] > destVer[i]) {
1722
+ return true;
1723
+ } else if (pkgVersionArr[i] < destVer[i]) {
1724
+ return false;
1725
+ }
1726
+ }
1727
+ return false;
1728
+ }
1729
+
1730
+ /**
1731
+ * Transitional option validator
1732
+ * @param {function|boolean?} validator
1733
+ * @param {string?} version
1734
+ * @param {string} message
1735
+ * @returns {function}
1736
+ */
1737
+ validators.transitional = function transitional(validator, version, message) {
1738
+ var isDeprecated = version && isOlderVersion(version);
1739
+
1740
+ function formatMessage(opt, desc) {
1741
+ return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
1742
+ }
1743
+
1744
+ // eslint-disable-next-line func-names
1745
+ return function(value, opt, opts) {
1746
+ if (validator === false) {
1747
+ throw new Error(formatMessage(opt, ' has been removed in ' + version));
1748
+ }
1749
+
1750
+ if (isDeprecated && !deprecatedWarnings[opt]) {
1751
+ deprecatedWarnings[opt] = true;
1752
+ // eslint-disable-next-line no-console
1753
+ console.warn(
1754
+ formatMessage(
1755
+ opt,
1756
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
1757
+ )
1758
+ );
1759
+ }
1760
+
1761
+ return validator ? validator(value, opt, opts) : true;
1762
+ };
1763
+ };
1764
+
1765
+ /**
1766
+ * Assert object's properties type
1767
+ * @param {object} options
1768
+ * @param {object} schema
1769
+ * @param {boolean?} allowUnknown
1770
+ */
1771
+
1772
+ function assertOptions(options, schema, allowUnknown) {
1773
+ if (typeof options !== 'object') {
1774
+ throw new TypeError('options must be an object');
1775
+ }
1776
+ var keys = Object.keys(options);
1777
+ var i = keys.length;
1778
+ while (i-- > 0) {
1779
+ var opt = keys[i];
1780
+ var validator = schema[opt];
1781
+ if (validator) {
1782
+ var value = options[opt];
1783
+ var result = value === undefined || validator(value, opt, options);
1784
+ if (result !== true) {
1785
+ throw new TypeError('option ' + opt + ' must be ' + result);
1786
+ }
1787
+ continue;
1788
+ }
1789
+ if (allowUnknown !== true) {
1790
+ throw Error('Unknown option ' + opt);
1791
+ }
1792
+ }
1793
+ }
1794
+
1795
+ module.exports = {
1796
+ isOlderVersion: isOlderVersion,
1797
+ assertOptions: assertOptions,
1798
+ validators: validators
1799
+ };
1640
1800
 
1641
1801
 
1642
1802
  /***/ }),
1643
- /* 24 */
1803
+
1804
+ /***/ "./lib/utils.js":
1805
+ /*!**********************!*\
1806
+ !*** ./lib/utils.js ***!
1807
+ \**********************/
1808
+ /*! no static exports found */
1644
1809
  /***/ (function(module, exports, __webpack_require__) {
1645
1810
 
1646
- 'use strict';
1647
-
1648
- var Cancel = __webpack_require__(23);
1649
-
1650
- /**
1651
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
1652
- *
1653
- * @class
1654
- * @param {Function} executor The executor function.
1655
- */
1656
- function CancelToken(executor) {
1657
- if (typeof executor !== 'function') {
1658
- throw new TypeError('executor must be a function.');
1659
- }
1660
-
1661
- var resolvePromise;
1662
- this.promise = new Promise(function promiseExecutor(resolve) {
1663
- resolvePromise = resolve;
1664
- });
1665
-
1666
- var token = this;
1667
- executor(function cancel(message) {
1668
- if (token.reason) {
1669
- // Cancellation has already been requested
1670
- return;
1671
- }
1672
-
1673
- token.reason = new Cancel(message);
1674
- resolvePromise(token.reason);
1675
- });
1676
- }
1677
-
1678
- /**
1679
- * Throws a `Cancel` if cancellation has been requested.
1680
- */
1681
- CancelToken.prototype.throwIfRequested = function throwIfRequested() {
1682
- if (this.reason) {
1683
- throw this.reason;
1684
- }
1685
- };
1686
-
1687
- /**
1688
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1689
- * cancels the `CancelToken`.
1690
- */
1691
- CancelToken.source = function source() {
1692
- var cancel;
1693
- var token = new CancelToken(function executor(c) {
1694
- cancel = c;
1695
- });
1696
- return {
1697
- token: token,
1698
- cancel: cancel
1699
- };
1700
- };
1701
-
1702
- module.exports = CancelToken;
1811
+ "use strict";
1812
+
1813
+
1814
+ var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js");
1815
+
1816
+ // utils is a library of generic helper functions non-specific to axios
1817
+
1818
+ var toString = Object.prototype.toString;
1819
+
1820
+ /**
1821
+ * Determine if a value is an Array
1822
+ *
1823
+ * @param {Object} val The value to test
1824
+ * @returns {boolean} True if value is an Array, otherwise false
1825
+ */
1826
+ function isArray(val) {
1827
+ return toString.call(val) === '[object Array]';
1828
+ }
1829
+
1830
+ /**
1831
+ * Determine if a value is undefined
1832
+ *
1833
+ * @param {Object} val The value to test
1834
+ * @returns {boolean} True if the value is undefined, otherwise false
1835
+ */
1836
+ function isUndefined(val) {
1837
+ return typeof val === 'undefined';
1838
+ }
1839
+
1840
+ /**
1841
+ * Determine if a value is a Buffer
1842
+ *
1843
+ * @param {Object} val The value to test
1844
+ * @returns {boolean} True if value is a Buffer, otherwise false
1845
+ */
1846
+ function isBuffer(val) {
1847
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
1848
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
1849
+ }
1850
+
1851
+ /**
1852
+ * Determine if a value is an ArrayBuffer
1853
+ *
1854
+ * @param {Object} val The value to test
1855
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
1856
+ */
1857
+ function isArrayBuffer(val) {
1858
+ return toString.call(val) === '[object ArrayBuffer]';
1859
+ }
1860
+
1861
+ /**
1862
+ * Determine if a value is a FormData
1863
+ *
1864
+ * @param {Object} val The value to test
1865
+ * @returns {boolean} True if value is an FormData, otherwise false
1866
+ */
1867
+ function isFormData(val) {
1868
+ return (typeof FormData !== 'undefined') && (val instanceof FormData);
1869
+ }
1870
+
1871
+ /**
1872
+ * Determine if a value is a view on an ArrayBuffer
1873
+ *
1874
+ * @param {Object} val The value to test
1875
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
1876
+ */
1877
+ function isArrayBufferView(val) {
1878
+ var result;
1879
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
1880
+ result = ArrayBuffer.isView(val);
1881
+ } else {
1882
+ result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
1883
+ }
1884
+ return result;
1885
+ }
1886
+
1887
+ /**
1888
+ * Determine if a value is a String
1889
+ *
1890
+ * @param {Object} val The value to test
1891
+ * @returns {boolean} True if value is a String, otherwise false
1892
+ */
1893
+ function isString(val) {
1894
+ return typeof val === 'string';
1895
+ }
1896
+
1897
+ /**
1898
+ * Determine if a value is a Number
1899
+ *
1900
+ * @param {Object} val The value to test
1901
+ * @returns {boolean} True if value is a Number, otherwise false
1902
+ */
1903
+ function isNumber(val) {
1904
+ return typeof val === 'number';
1905
+ }
1906
+
1907
+ /**
1908
+ * Determine if a value is an Object
1909
+ *
1910
+ * @param {Object} val The value to test
1911
+ * @returns {boolean} True if value is an Object, otherwise false
1912
+ */
1913
+ function isObject(val) {
1914
+ return val !== null && typeof val === 'object';
1915
+ }
1916
+
1917
+ /**
1918
+ * Determine if a value is a plain Object
1919
+ *
1920
+ * @param {Object} val The value to test
1921
+ * @return {boolean} True if value is a plain Object, otherwise false
1922
+ */
1923
+ function isPlainObject(val) {
1924
+ if (toString.call(val) !== '[object Object]') {
1925
+ return false;
1926
+ }
1927
+
1928
+ var prototype = Object.getPrototypeOf(val);
1929
+ return prototype === null || prototype === Object.prototype;
1930
+ }
1931
+
1932
+ /**
1933
+ * Determine if a value is a Date
1934
+ *
1935
+ * @param {Object} val The value to test
1936
+ * @returns {boolean} True if value is a Date, otherwise false
1937
+ */
1938
+ function isDate(val) {
1939
+ return toString.call(val) === '[object Date]';
1940
+ }
1941
+
1942
+ /**
1943
+ * Determine if a value is a File
1944
+ *
1945
+ * @param {Object} val The value to test
1946
+ * @returns {boolean} True if value is a File, otherwise false
1947
+ */
1948
+ function isFile(val) {
1949
+ return toString.call(val) === '[object File]';
1950
+ }
1951
+
1952
+ /**
1953
+ * Determine if a value is a Blob
1954
+ *
1955
+ * @param {Object} val The value to test
1956
+ * @returns {boolean} True if value is a Blob, otherwise false
1957
+ */
1958
+ function isBlob(val) {
1959
+ return toString.call(val) === '[object Blob]';
1960
+ }
1961
+
1962
+ /**
1963
+ * Determine if a value is a Function
1964
+ *
1965
+ * @param {Object} val The value to test
1966
+ * @returns {boolean} True if value is a Function, otherwise false
1967
+ */
1968
+ function isFunction(val) {
1969
+ return toString.call(val) === '[object Function]';
1970
+ }
1971
+
1972
+ /**
1973
+ * Determine if a value is a Stream
1974
+ *
1975
+ * @param {Object} val The value to test
1976
+ * @returns {boolean} True if value is a Stream, otherwise false
1977
+ */
1978
+ function isStream(val) {
1979
+ return isObject(val) && isFunction(val.pipe);
1980
+ }
1981
+
1982
+ /**
1983
+ * Determine if a value is a URLSearchParams object
1984
+ *
1985
+ * @param {Object} val The value to test
1986
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
1987
+ */
1988
+ function isURLSearchParams(val) {
1989
+ return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
1990
+ }
1991
+
1992
+ /**
1993
+ * Trim excess whitespace off the beginning and end of a string
1994
+ *
1995
+ * @param {String} str The String to trim
1996
+ * @returns {String} The String freed of excess whitespace
1997
+ */
1998
+ function trim(str) {
1999
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
2000
+ }
2001
+
2002
+ /**
2003
+ * Determine if we're running in a standard browser environment
2004
+ *
2005
+ * This allows axios to run in a web worker, and react-native.
2006
+ * Both environments support XMLHttpRequest, but not fully standard globals.
2007
+ *
2008
+ * web workers:
2009
+ * typeof window -> undefined
2010
+ * typeof document -> undefined
2011
+ *
2012
+ * react-native:
2013
+ * navigator.product -> 'ReactNative'
2014
+ * nativescript
2015
+ * navigator.product -> 'NativeScript' or 'NS'
2016
+ */
2017
+ function isStandardBrowserEnv() {
2018
+ if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
2019
+ navigator.product === 'NativeScript' ||
2020
+ navigator.product === 'NS')) {
2021
+ return false;
2022
+ }
2023
+ return (
2024
+ typeof window !== 'undefined' &&
2025
+ typeof document !== 'undefined'
2026
+ );
2027
+ }
2028
+
2029
+ /**
2030
+ * Iterate over an Array or an Object invoking a function for each item.
2031
+ *
2032
+ * If `obj` is an Array callback will be called passing
2033
+ * the value, index, and complete array for each item.
2034
+ *
2035
+ * If 'obj' is an Object callback will be called passing
2036
+ * the value, key, and complete object for each property.
2037
+ *
2038
+ * @param {Object|Array} obj The object to iterate
2039
+ * @param {Function} fn The callback to invoke for each item
2040
+ */
2041
+ function forEach(obj, fn) {
2042
+ // Don't bother if no value provided
2043
+ if (obj === null || typeof obj === 'undefined') {
2044
+ return;
2045
+ }
2046
+
2047
+ // Force an array if not already something iterable
2048
+ if (typeof obj !== 'object') {
2049
+ /*eslint no-param-reassign:0*/
2050
+ obj = [obj];
2051
+ }
2052
+
2053
+ if (isArray(obj)) {
2054
+ // Iterate over array values
2055
+ for (var i = 0, l = obj.length; i < l; i++) {
2056
+ fn.call(null, obj[i], i, obj);
2057
+ }
2058
+ } else {
2059
+ // Iterate over object keys
2060
+ for (var key in obj) {
2061
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
2062
+ fn.call(null, obj[key], key, obj);
2063
+ }
2064
+ }
2065
+ }
2066
+ }
2067
+
2068
+ /**
2069
+ * Accepts varargs expecting each argument to be an object, then
2070
+ * immutably merges the properties of each object and returns result.
2071
+ *
2072
+ * When multiple objects contain the same key the later object in
2073
+ * the arguments list will take precedence.
2074
+ *
2075
+ * Example:
2076
+ *
2077
+ * ```js
2078
+ * var result = merge({foo: 123}, {foo: 456});
2079
+ * console.log(result.foo); // outputs 456
2080
+ * ```
2081
+ *
2082
+ * @param {Object} obj1 Object to merge
2083
+ * @returns {Object} Result of all merge properties
2084
+ */
2085
+ function merge(/* obj1, obj2, obj3, ... */) {
2086
+ var result = {};
2087
+ function assignValue(val, key) {
2088
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
2089
+ result[key] = merge(result[key], val);
2090
+ } else if (isPlainObject(val)) {
2091
+ result[key] = merge({}, val);
2092
+ } else if (isArray(val)) {
2093
+ result[key] = val.slice();
2094
+ } else {
2095
+ result[key] = val;
2096
+ }
2097
+ }
2098
+
2099
+ for (var i = 0, l = arguments.length; i < l; i++) {
2100
+ forEach(arguments[i], assignValue);
2101
+ }
2102
+ return result;
2103
+ }
2104
+
2105
+ /**
2106
+ * Extends object a by mutably adding to it the properties of object b.
2107
+ *
2108
+ * @param {Object} a The object to be extended
2109
+ * @param {Object} b The object to copy properties from
2110
+ * @param {Object} thisArg The object to bind function to
2111
+ * @return {Object} The resulting value of object a
2112
+ */
2113
+ function extend(a, b, thisArg) {
2114
+ forEach(b, function assignValue(val, key) {
2115
+ if (thisArg && typeof val === 'function') {
2116
+ a[key] = bind(val, thisArg);
2117
+ } else {
2118
+ a[key] = val;
2119
+ }
2120
+ });
2121
+ return a;
2122
+ }
2123
+
2124
+ /**
2125
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
2126
+ *
2127
+ * @param {string} content with BOM
2128
+ * @return {string} content value without BOM
2129
+ */
2130
+ function stripBOM(content) {
2131
+ if (content.charCodeAt(0) === 0xFEFF) {
2132
+ content = content.slice(1);
2133
+ }
2134
+ return content;
2135
+ }
2136
+
2137
+ module.exports = {
2138
+ isArray: isArray,
2139
+ isArrayBuffer: isArrayBuffer,
2140
+ isBuffer: isBuffer,
2141
+ isFormData: isFormData,
2142
+ isArrayBufferView: isArrayBufferView,
2143
+ isString: isString,
2144
+ isNumber: isNumber,
2145
+ isObject: isObject,
2146
+ isPlainObject: isPlainObject,
2147
+ isUndefined: isUndefined,
2148
+ isDate: isDate,
2149
+ isFile: isFile,
2150
+ isBlob: isBlob,
2151
+ isFunction: isFunction,
2152
+ isStream: isStream,
2153
+ isURLSearchParams: isURLSearchParams,
2154
+ isStandardBrowserEnv: isStandardBrowserEnv,
2155
+ forEach: forEach,
2156
+ merge: merge,
2157
+ extend: extend,
2158
+ trim: trim,
2159
+ stripBOM: stripBOM
2160
+ };
1703
2161
 
1704
2162
 
1705
2163
  /***/ }),
1706
- /* 25 */
1707
- /***/ (function(module, exports) {
1708
-
1709
- 'use strict';
1710
-
1711
- /**
1712
- * Syntactic sugar for invoking a function and expanding an array for arguments.
1713
- *
1714
- * Common use case would be to use `Function.prototype.apply`.
1715
- *
1716
- * ```js
1717
- * function f(x, y, z) {}
1718
- * var args = [1, 2, 3];
1719
- * f.apply(null, args);
1720
- * ```
1721
- *
1722
- * With `spread` this example can be re-written.
1723
- *
1724
- * ```js
1725
- * spread(function(x, y, z) {})([1, 2, 3]);
1726
- * ```
1727
- *
1728
- * @param {Function} callback
1729
- * @returns {Function}
1730
- */
1731
- module.exports = function spread(callback) {
1732
- return function wrap(arr) {
1733
- return callback.apply(null, arr);
1734
- };
1735
- };
1736
2164
 
2165
+ /***/ "./package.json":
2166
+ /*!**********************!*\
2167
+ !*** ./package.json ***!
2168
+ \**********************/
2169
+ /*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */
2170
+ /***/ (function(module) {
2171
+
2172
+ module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.21.3\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://axios-http.com\",\"devDependencies\":{\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.3.0\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^23.0.0\",\"grunt-karma\":\"^4.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^4.0.2\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^6.3.2\",\"karma-chrome-launcher\":\"^3.1.0\",\"karma-firefox-launcher\":\"^2.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^4.3.6\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.8\",\"karma-webpack\":\"^4.0.2\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^8.2.1\",\"sinon\":\"^4.5.0\",\"terser-webpack-plugin\":\"^4.2.3\",\"typescript\":\"^4.0.5\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^4.44.2\",\"webpack-dev-server\":\"^3.11.0\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"jsdelivr\":\"dist/axios.min.js\",\"unpkg\":\"dist/axios.min.js\",\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"^1.14.0\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}");
1737
2173
 
1738
2174
  /***/ })
1739
- /******/ ])
2175
+
2176
+ /******/ });
1740
2177
  });
1741
- ;
1742
2178
  //# sourceMappingURL=axios.map