hc-basic 1.5.1 → 1.5.4

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.
Files changed (39) hide show
  1. package/lib/hc-basic.common.js +85193 -55
  2. package/lib/hc-basic.umd.js +85204 -56
  3. package/lib/hc-basic.umd.min.js +41 -1
  4. package/package.json +10 -9
  5. package/lib/css/hc-basic.umd.596515ce.css +0 -1
  6. package/lib/css/hc-basic.umd.min.596515ce.css +0 -1
  7. package/lib/hc-basic.common.async-validator1680231905970.js +0 -984
  8. package/lib/hc-basic.common.axios1680231905971.js +0 -1644
  9. package/lib/hc-basic.common.babel-runtime1680231905970.js +0 -1242
  10. package/lib/hc-basic.common.crypto-js1680231905971.js +0 -6194
  11. package/lib/hc-basic.common.element-ui1680231905967.js +0 -43880
  12. package/lib/hc-basic.common.element-ui1680231905968.js +0 -5784
  13. package/lib/hc-basic.common.element-ui1680231905969.js +0 -14978
  14. package/lib/hc-basic.common.element-ui1680231905970.js +0 -3453
  15. package/lib/hc-basic.common.hc-basic.common.js +0 -3812
  16. package/lib/hc-basic.common.resize-observer-polyfill1680231905969.js +0 -941
  17. package/lib/hc-basic.common.vendors~hc-basic.common.js +0 -2203
  18. package/lib/hc-basic.umd.axios1680231905278.js +0 -1712
  19. package/lib/hc-basic.umd.babel-runtime1680231905277.js +0 -1411
  20. package/lib/hc-basic.umd.crypto-js1680231905278.js +0 -6194
  21. package/lib/hc-basic.umd.element-ui1680231905273.js +0 -43880
  22. package/lib/hc-basic.umd.element-ui1680231905274.js +0 -695
  23. package/lib/hc-basic.umd.element-ui1680231905275.js +0 -5158
  24. package/lib/hc-basic.umd.element-ui1680231905276.js +0 -14912
  25. package/lib/hc-basic.umd.element-ui1680231905278.js +0 -3453
  26. package/lib/hc-basic.umd.hc-basic.umd.js +0 -3822
  27. package/lib/hc-basic.umd.min.async-validator1680231905116.js +0 -1
  28. package/lib/hc-basic.umd.min.axios1680231905116.js +0 -1
  29. package/lib/hc-basic.umd.min.babel-runtime1680231905115.js +0 -1
  30. package/lib/hc-basic.umd.min.crypto-js1680231905116.js +0 -18
  31. package/lib/hc-basic.umd.min.element-ui1680231905113.js +0 -1
  32. package/lib/hc-basic.umd.min.element-ui1680231905114.js +0 -9
  33. package/lib/hc-basic.umd.min.element-ui1680231905116.js +0 -1
  34. package/lib/hc-basic.umd.min.hc-basic.umd.min.js +0 -1
  35. package/lib/hc-basic.umd.min.resize-observer-polyfill1680231905114.js +0 -1
  36. package/lib/hc-basic.umd.min.vendors~hc-basic.umd.min.js +0 -16
  37. package/lib/hc-basic.umd.resize-observer-polyfill1680231905275.js +0 -941
  38. package/lib/hc-basic.umd.vendors~hc-basic.umd.js +0 -2911
  39. /package/lib/{css/hc-basic.common.596515ce.css → hc-basic.css} +0 -0
@@ -1,1712 +0,0 @@
1
- ((typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] = (typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] || []).push([[0],{
2
-
3
- /***/ "0a06":
4
- /***/ (function(module, exports, __webpack_require__) {
5
-
6
- "use strict";
7
-
8
-
9
- var utils = __webpack_require__("c532");
10
- var buildURL = __webpack_require__("30b5");
11
- var InterceptorManager = __webpack_require__("f6b4");
12
- var dispatchRequest = __webpack_require__("5270");
13
- var mergeConfig = __webpack_require__("4a7b");
14
-
15
- /**
16
- * Create a new instance of Axios
17
- *
18
- * @param {Object} instanceConfig The default config for the instance
19
- */
20
- function Axios(instanceConfig) {
21
- this.defaults = instanceConfig;
22
- this.interceptors = {
23
- request: new InterceptorManager(),
24
- response: new InterceptorManager()
25
- };
26
- }
27
-
28
- /**
29
- * Dispatch a request
30
- *
31
- * @param {Object} config The config specific for this request (merged with this.defaults)
32
- */
33
- Axios.prototype.request = function request(config) {
34
- /*eslint no-param-reassign:0*/
35
- // Allow for axios('example/url'[, config]) a la fetch API
36
- if (typeof config === 'string') {
37
- config = arguments[1] || {};
38
- config.url = arguments[0];
39
- } else {
40
- config = config || {};
41
- }
42
-
43
- config = mergeConfig(this.defaults, config);
44
-
45
- // Set config.method
46
- if (config.method) {
47
- config.method = config.method.toLowerCase();
48
- } else if (this.defaults.method) {
49
- config.method = this.defaults.method.toLowerCase();
50
- } else {
51
- config.method = 'get';
52
- }
53
-
54
- // Hook up interceptors middleware
55
- var chain = [dispatchRequest, undefined];
56
- var promise = Promise.resolve(config);
57
-
58
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
59
- chain.unshift(interceptor.fulfilled, interceptor.rejected);
60
- });
61
-
62
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
63
- chain.push(interceptor.fulfilled, interceptor.rejected);
64
- });
65
-
66
- while (chain.length) {
67
- promise = promise.then(chain.shift(), chain.shift());
68
- }
69
-
70
- return promise;
71
- };
72
-
73
- Axios.prototype.getUri = function getUri(config) {
74
- config = mergeConfig(this.defaults, config);
75
- return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
76
- };
77
-
78
- // Provide aliases for supported request methods
79
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
80
- /*eslint func-names:0*/
81
- Axios.prototype[method] = function(url, config) {
82
- return this.request(utils.merge(config || {}, {
83
- method: method,
84
- url: url
85
- }));
86
- };
87
- });
88
-
89
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
90
- /*eslint func-names:0*/
91
- Axios.prototype[method] = function(url, data, config) {
92
- return this.request(utils.merge(config || {}, {
93
- method: method,
94
- url: url,
95
- data: data
96
- }));
97
- };
98
- });
99
-
100
- module.exports = Axios;
101
-
102
-
103
- /***/ }),
104
-
105
- /***/ "0df6":
106
- /***/ (function(module, exports, __webpack_require__) {
107
-
108
- "use strict";
109
-
110
-
111
- /**
112
- * Syntactic sugar for invoking a function and expanding an array for arguments.
113
- *
114
- * Common use case would be to use `Function.prototype.apply`.
115
- *
116
- * ```js
117
- * function f(x, y, z) {}
118
- * var args = [1, 2, 3];
119
- * f.apply(null, args);
120
- * ```
121
- *
122
- * With `spread` this example can be re-written.
123
- *
124
- * ```js
125
- * spread(function(x, y, z) {})([1, 2, 3]);
126
- * ```
127
- *
128
- * @param {Function} callback
129
- * @returns {Function}
130
- */
131
- module.exports = function spread(callback) {
132
- return function wrap(arr) {
133
- return callback.apply(null, arr);
134
- };
135
- };
136
-
137
-
138
- /***/ }),
139
-
140
- /***/ "1d2b":
141
- /***/ (function(module, exports, __webpack_require__) {
142
-
143
- "use strict";
144
-
145
-
146
- module.exports = function bind(fn, thisArg) {
147
- return function wrap() {
148
- var args = new Array(arguments.length);
149
- for (var i = 0; i < args.length; i++) {
150
- args[i] = arguments[i];
151
- }
152
- return fn.apply(thisArg, args);
153
- };
154
- };
155
-
156
-
157
- /***/ }),
158
-
159
- /***/ "2444":
160
- /***/ (function(module, exports, __webpack_require__) {
161
-
162
- "use strict";
163
- /* WEBPACK VAR INJECTION */(function(process) {
164
-
165
- var utils = __webpack_require__("c532");
166
- var normalizeHeaderName = __webpack_require__("c8af");
167
-
168
- var DEFAULT_CONTENT_TYPE = {
169
- 'Content-Type': 'application/x-www-form-urlencoded'
170
- };
171
-
172
- function setContentTypeIfUnset(headers, value) {
173
- if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
174
- headers['Content-Type'] = value;
175
- }
176
- }
177
-
178
- function getDefaultAdapter() {
179
- var adapter;
180
- if (typeof XMLHttpRequest !== 'undefined') {
181
- // For browsers use XHR adapter
182
- adapter = __webpack_require__("b50d");
183
- } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
184
- // For node use HTTP adapter
185
- adapter = __webpack_require__("b50d");
186
- }
187
- return adapter;
188
- }
189
-
190
- var defaults = {
191
- adapter: getDefaultAdapter(),
192
-
193
- transformRequest: [function transformRequest(data, headers) {
194
- normalizeHeaderName(headers, 'Accept');
195
- normalizeHeaderName(headers, 'Content-Type');
196
- if (utils.isFormData(data) ||
197
- utils.isArrayBuffer(data) ||
198
- utils.isBuffer(data) ||
199
- utils.isStream(data) ||
200
- utils.isFile(data) ||
201
- utils.isBlob(data)
202
- ) {
203
- return data;
204
- }
205
- if (utils.isArrayBufferView(data)) {
206
- return data.buffer;
207
- }
208
- if (utils.isURLSearchParams(data)) {
209
- setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
210
- return data.toString();
211
- }
212
- if (utils.isObject(data)) {
213
- setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
214
- return JSON.stringify(data);
215
- }
216
- return data;
217
- }],
218
-
219
- transformResponse: [function transformResponse(data) {
220
- /*eslint no-param-reassign:0*/
221
- if (typeof data === 'string') {
222
- try {
223
- data = JSON.parse(data);
224
- } catch (e) { /* Ignore */ }
225
- }
226
- return data;
227
- }],
228
-
229
- /**
230
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
231
- * timeout is not created.
232
- */
233
- timeout: 0,
234
-
235
- xsrfCookieName: 'XSRF-TOKEN',
236
- xsrfHeaderName: 'X-XSRF-TOKEN',
237
-
238
- maxContentLength: -1,
239
-
240
- validateStatus: function validateStatus(status) {
241
- return status >= 200 && status < 300;
242
- }
243
- };
244
-
245
- defaults.headers = {
246
- common: {
247
- 'Accept': 'application/json, text/plain, */*'
248
- }
249
- };
250
-
251
- utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
252
- defaults.headers[method] = {};
253
- });
254
-
255
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
256
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
257
- });
258
-
259
- module.exports = defaults;
260
-
261
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
262
-
263
- /***/ }),
264
-
265
- /***/ "2d83":
266
- /***/ (function(module, exports, __webpack_require__) {
267
-
268
- "use strict";
269
-
270
-
271
- var enhanceError = __webpack_require__("387f");
272
-
273
- /**
274
- * Create an Error with the specified message, config, error code, request and response.
275
- *
276
- * @param {string} message The error message.
277
- * @param {Object} config The config.
278
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
279
- * @param {Object} [request] The request.
280
- * @param {Object} [response] The response.
281
- * @returns {Error} The created error.
282
- */
283
- module.exports = function createError(message, config, code, request, response) {
284
- var error = new Error(message);
285
- return enhanceError(error, config, code, request, response);
286
- };
287
-
288
-
289
- /***/ }),
290
-
291
- /***/ "2e67":
292
- /***/ (function(module, exports, __webpack_require__) {
293
-
294
- "use strict";
295
-
296
-
297
- module.exports = function isCancel(value) {
298
- return !!(value && value.__CANCEL__);
299
- };
300
-
301
-
302
- /***/ }),
303
-
304
- /***/ "30b5":
305
- /***/ (function(module, exports, __webpack_require__) {
306
-
307
- "use strict";
308
-
309
-
310
- var utils = __webpack_require__("c532");
311
-
312
- function encode(val) {
313
- return encodeURIComponent(val).
314
- replace(/%40/gi, '@').
315
- replace(/%3A/gi, ':').
316
- replace(/%24/g, '$').
317
- replace(/%2C/gi, ',').
318
- replace(/%20/g, '+').
319
- replace(/%5B/gi, '[').
320
- replace(/%5D/gi, ']');
321
- }
322
-
323
- /**
324
- * Build a URL by appending params to the end
325
- *
326
- * @param {string} url The base of the url (e.g., http://www.google.com)
327
- * @param {object} [params] The params to be appended
328
- * @returns {string} The formatted url
329
- */
330
- module.exports = function buildURL(url, params, paramsSerializer) {
331
- /*eslint no-param-reassign:0*/
332
- if (!params) {
333
- return url;
334
- }
335
-
336
- var serializedParams;
337
- if (paramsSerializer) {
338
- serializedParams = paramsSerializer(params);
339
- } else if (utils.isURLSearchParams(params)) {
340
- serializedParams = params.toString();
341
- } else {
342
- var parts = [];
343
-
344
- utils.forEach(params, function serialize(val, key) {
345
- if (val === null || typeof val === 'undefined') {
346
- return;
347
- }
348
-
349
- if (utils.isArray(val)) {
350
- key = key + '[]';
351
- } else {
352
- val = [val];
353
- }
354
-
355
- utils.forEach(val, function parseValue(v) {
356
- if (utils.isDate(v)) {
357
- v = v.toISOString();
358
- } else if (utils.isObject(v)) {
359
- v = JSON.stringify(v);
360
- }
361
- parts.push(encode(key) + '=' + encode(v));
362
- });
363
- });
364
-
365
- serializedParams = parts.join('&');
366
- }
367
-
368
- if (serializedParams) {
369
- var hashmarkIndex = url.indexOf('#');
370
- if (hashmarkIndex !== -1) {
371
- url = url.slice(0, hashmarkIndex);
372
- }
373
-
374
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
375
- }
376
-
377
- return url;
378
- };
379
-
380
-
381
- /***/ }),
382
-
383
- /***/ "387f":
384
- /***/ (function(module, exports, __webpack_require__) {
385
-
386
- "use strict";
387
-
388
-
389
- /**
390
- * Update an Error with the specified config, error code, and response.
391
- *
392
- * @param {Error} error The error to update.
393
- * @param {Object} config The config.
394
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
395
- * @param {Object} [request] The request.
396
- * @param {Object} [response] The response.
397
- * @returns {Error} The error.
398
- */
399
- module.exports = function enhanceError(error, config, code, request, response) {
400
- error.config = config;
401
- if (code) {
402
- error.code = code;
403
- }
404
-
405
- error.request = request;
406
- error.response = response;
407
- error.isAxiosError = true;
408
-
409
- error.toJSON = function() {
410
- return {
411
- // Standard
412
- message: this.message,
413
- name: this.name,
414
- // Microsoft
415
- description: this.description,
416
- number: this.number,
417
- // Mozilla
418
- fileName: this.fileName,
419
- lineNumber: this.lineNumber,
420
- columnNumber: this.columnNumber,
421
- stack: this.stack,
422
- // Axios
423
- config: this.config,
424
- code: this.code
425
- };
426
- };
427
- return error;
428
- };
429
-
430
-
431
- /***/ }),
432
-
433
- /***/ "3934":
434
- /***/ (function(module, exports, __webpack_require__) {
435
-
436
- "use strict";
437
-
438
-
439
- var utils = __webpack_require__("c532");
440
-
441
- module.exports = (
442
- utils.isStandardBrowserEnv() ?
443
-
444
- // Standard browser envs have full support of the APIs needed to test
445
- // whether the request URL is of the same origin as current location.
446
- (function standardBrowserEnv() {
447
- var msie = /(msie|trident)/i.test(navigator.userAgent);
448
- var urlParsingNode = document.createElement('a');
449
- var originURL;
450
-
451
- /**
452
- * Parse a URL to discover it's components
453
- *
454
- * @param {String} url The URL to be parsed
455
- * @returns {Object}
456
- */
457
- function resolveURL(url) {
458
- var href = url;
459
-
460
- if (msie) {
461
- // IE needs attribute set twice to normalize properties
462
- urlParsingNode.setAttribute('href', href);
463
- href = urlParsingNode.href;
464
- }
465
-
466
- urlParsingNode.setAttribute('href', href);
467
-
468
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
469
- return {
470
- href: urlParsingNode.href,
471
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
472
- host: urlParsingNode.host,
473
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
474
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
475
- hostname: urlParsingNode.hostname,
476
- port: urlParsingNode.port,
477
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
478
- urlParsingNode.pathname :
479
- '/' + urlParsingNode.pathname
480
- };
481
- }
482
-
483
- originURL = resolveURL(window.location.href);
484
-
485
- /**
486
- * Determine if a URL shares the same origin as the current location
487
- *
488
- * @param {String} requestURL The URL to test
489
- * @returns {boolean} True if URL shares the same origin, otherwise false
490
- */
491
- return function isURLSameOrigin(requestURL) {
492
- var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
493
- return (parsed.protocol === originURL.protocol &&
494
- parsed.host === originURL.host);
495
- };
496
- })() :
497
-
498
- // Non standard browser envs (web workers, react-native) lack needed support.
499
- (function nonStandardBrowserEnv() {
500
- return function isURLSameOrigin() {
501
- return true;
502
- };
503
- })()
504
- );
505
-
506
-
507
- /***/ }),
508
-
509
- /***/ "467f":
510
- /***/ (function(module, exports, __webpack_require__) {
511
-
512
- "use strict";
513
-
514
-
515
- var createError = __webpack_require__("2d83");
516
-
517
- /**
518
- * Resolve or reject a Promise based on response status.
519
- *
520
- * @param {Function} resolve A function that resolves the promise.
521
- * @param {Function} reject A function that rejects the promise.
522
- * @param {object} response The response.
523
- */
524
- module.exports = function settle(resolve, reject, response) {
525
- var validateStatus = response.config.validateStatus;
526
- if (!validateStatus || validateStatus(response.status)) {
527
- resolve(response);
528
- } else {
529
- reject(createError(
530
- 'Request failed with status code ' + response.status,
531
- response.config,
532
- null,
533
- response.request,
534
- response
535
- ));
536
- }
537
- };
538
-
539
-
540
- /***/ }),
541
-
542
- /***/ "4a7b":
543
- /***/ (function(module, exports, __webpack_require__) {
544
-
545
- "use strict";
546
-
547
-
548
- var utils = __webpack_require__("c532");
549
-
550
- /**
551
- * Config-specific merge-function which creates a new config-object
552
- * by merging two configuration objects together.
553
- *
554
- * @param {Object} config1
555
- * @param {Object} config2
556
- * @returns {Object} New object resulting from merging config2 to config1
557
- */
558
- module.exports = function mergeConfig(config1, config2) {
559
- // eslint-disable-next-line no-param-reassign
560
- config2 = config2 || {};
561
- var config = {};
562
-
563
- var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];
564
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];
565
- var defaultToConfig2Keys = [
566
- 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',
567
- 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
568
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',
569
- 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',
570
- 'httpsAgent', 'cancelToken', 'socketPath'
571
- ];
572
-
573
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
574
- if (typeof config2[prop] !== 'undefined') {
575
- config[prop] = config2[prop];
576
- }
577
- });
578
-
579
- utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {
580
- if (utils.isObject(config2[prop])) {
581
- config[prop] = utils.deepMerge(config1[prop], config2[prop]);
582
- } else if (typeof config2[prop] !== 'undefined') {
583
- config[prop] = config2[prop];
584
- } else if (utils.isObject(config1[prop])) {
585
- config[prop] = utils.deepMerge(config1[prop]);
586
- } else if (typeof config1[prop] !== 'undefined') {
587
- config[prop] = config1[prop];
588
- }
589
- });
590
-
591
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
592
- if (typeof config2[prop] !== 'undefined') {
593
- config[prop] = config2[prop];
594
- } else if (typeof config1[prop] !== 'undefined') {
595
- config[prop] = config1[prop];
596
- }
597
- });
598
-
599
- var axiosKeys = valueFromConfig2Keys
600
- .concat(mergeDeepPropertiesKeys)
601
- .concat(defaultToConfig2Keys);
602
-
603
- var otherKeys = Object
604
- .keys(config2)
605
- .filter(function filterAxiosKeys(key) {
606
- return axiosKeys.indexOf(key) === -1;
607
- });
608
-
609
- utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {
610
- if (typeof config2[prop] !== 'undefined') {
611
- config[prop] = config2[prop];
612
- } else if (typeof config1[prop] !== 'undefined') {
613
- config[prop] = config1[prop];
614
- }
615
- });
616
-
617
- return config;
618
- };
619
-
620
-
621
- /***/ }),
622
-
623
- /***/ "5270":
624
- /***/ (function(module, exports, __webpack_require__) {
625
-
626
- "use strict";
627
-
628
-
629
- var utils = __webpack_require__("c532");
630
- var transformData = __webpack_require__("c401");
631
- var isCancel = __webpack_require__("2e67");
632
- var defaults = __webpack_require__("2444");
633
-
634
- /**
635
- * Throws a `Cancel` if cancellation has been requested.
636
- */
637
- function throwIfCancellationRequested(config) {
638
- if (config.cancelToken) {
639
- config.cancelToken.throwIfRequested();
640
- }
641
- }
642
-
643
- /**
644
- * Dispatch a request to the server using the configured adapter.
645
- *
646
- * @param {object} config The config that is to be used for the request
647
- * @returns {Promise} The Promise to be fulfilled
648
- */
649
- module.exports = function dispatchRequest(config) {
650
- throwIfCancellationRequested(config);
651
-
652
- // Ensure headers exist
653
- config.headers = config.headers || {};
654
-
655
- // Transform request data
656
- config.data = transformData(
657
- config.data,
658
- config.headers,
659
- config.transformRequest
660
- );
661
-
662
- // Flatten headers
663
- config.headers = utils.merge(
664
- config.headers.common || {},
665
- config.headers[config.method] || {},
666
- config.headers
667
- );
668
-
669
- utils.forEach(
670
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
671
- function cleanHeaderConfig(method) {
672
- delete config.headers[method];
673
- }
674
- );
675
-
676
- var adapter = config.adapter || defaults.adapter;
677
-
678
- return adapter(config).then(function onAdapterResolution(response) {
679
- throwIfCancellationRequested(config);
680
-
681
- // Transform response data
682
- response.data = transformData(
683
- response.data,
684
- response.headers,
685
- config.transformResponse
686
- );
687
-
688
- return response;
689
- }, function onAdapterRejection(reason) {
690
- if (!isCancel(reason)) {
691
- throwIfCancellationRequested(config);
692
-
693
- // Transform response data
694
- if (reason && reason.response) {
695
- reason.response.data = transformData(
696
- reason.response.data,
697
- reason.response.headers,
698
- config.transformResponse
699
- );
700
- }
701
- }
702
-
703
- return Promise.reject(reason);
704
- });
705
- };
706
-
707
-
708
- /***/ }),
709
-
710
- /***/ "7a77":
711
- /***/ (function(module, exports, __webpack_require__) {
712
-
713
- "use strict";
714
-
715
-
716
- /**
717
- * A `Cancel` is an object that is thrown when an operation is canceled.
718
- *
719
- * @class
720
- * @param {string=} message The message.
721
- */
722
- function Cancel(message) {
723
- this.message = message;
724
- }
725
-
726
- Cancel.prototype.toString = function toString() {
727
- return 'Cancel' + (this.message ? ': ' + this.message : '');
728
- };
729
-
730
- Cancel.prototype.__CANCEL__ = true;
731
-
732
- module.exports = Cancel;
733
-
734
-
735
- /***/ }),
736
-
737
- /***/ "7aac":
738
- /***/ (function(module, exports, __webpack_require__) {
739
-
740
- "use strict";
741
-
742
-
743
- var utils = __webpack_require__("c532");
744
-
745
- module.exports = (
746
- utils.isStandardBrowserEnv() ?
747
-
748
- // Standard browser envs support document.cookie
749
- (function standardBrowserEnv() {
750
- return {
751
- write: function write(name, value, expires, path, domain, secure) {
752
- var cookie = [];
753
- cookie.push(name + '=' + encodeURIComponent(value));
754
-
755
- if (utils.isNumber(expires)) {
756
- cookie.push('expires=' + new Date(expires).toGMTString());
757
- }
758
-
759
- if (utils.isString(path)) {
760
- cookie.push('path=' + path);
761
- }
762
-
763
- if (utils.isString(domain)) {
764
- cookie.push('domain=' + domain);
765
- }
766
-
767
- if (secure === true) {
768
- cookie.push('secure');
769
- }
770
-
771
- document.cookie = cookie.join('; ');
772
- },
773
-
774
- read: function read(name) {
775
- var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
776
- return (match ? decodeURIComponent(match[3]) : null);
777
- },
778
-
779
- remove: function remove(name) {
780
- this.write(name, '', Date.now() - 86400000);
781
- }
782
- };
783
- })() :
784
-
785
- // Non standard browser env (web workers, react-native) lack needed support.
786
- (function nonStandardBrowserEnv() {
787
- return {
788
- write: function write() {},
789
- read: function read() { return null; },
790
- remove: function remove() {}
791
- };
792
- })()
793
- );
794
-
795
-
796
- /***/ }),
797
-
798
- /***/ "83b9":
799
- /***/ (function(module, exports, __webpack_require__) {
800
-
801
- "use strict";
802
-
803
-
804
- var isAbsoluteURL = __webpack_require__("d925");
805
- var combineURLs = __webpack_require__("e683");
806
-
807
- /**
808
- * Creates a new URL by combining the baseURL with the requestedURL,
809
- * only when the requestedURL is not already an absolute URL.
810
- * If the requestURL is absolute, this function returns the requestedURL untouched.
811
- *
812
- * @param {string} baseURL The base URL
813
- * @param {string} requestedURL Absolute or relative URL to combine
814
- * @returns {string} The combined full path
815
- */
816
- module.exports = function buildFullPath(baseURL, requestedURL) {
817
- if (baseURL && !isAbsoluteURL(requestedURL)) {
818
- return combineURLs(baseURL, requestedURL);
819
- }
820
- return requestedURL;
821
- };
822
-
823
-
824
- /***/ }),
825
-
826
- /***/ "8df4":
827
- /***/ (function(module, exports, __webpack_require__) {
828
-
829
- "use strict";
830
-
831
-
832
- var Cancel = __webpack_require__("7a77");
833
-
834
- /**
835
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
836
- *
837
- * @class
838
- * @param {Function} executor The executor function.
839
- */
840
- function CancelToken(executor) {
841
- if (typeof executor !== 'function') {
842
- throw new TypeError('executor must be a function.');
843
- }
844
-
845
- var resolvePromise;
846
- this.promise = new Promise(function promiseExecutor(resolve) {
847
- resolvePromise = resolve;
848
- });
849
-
850
- var token = this;
851
- executor(function cancel(message) {
852
- if (token.reason) {
853
- // Cancellation has already been requested
854
- return;
855
- }
856
-
857
- token.reason = new Cancel(message);
858
- resolvePromise(token.reason);
859
- });
860
- }
861
-
862
- /**
863
- * Throws a `Cancel` if cancellation has been requested.
864
- */
865
- CancelToken.prototype.throwIfRequested = function throwIfRequested() {
866
- if (this.reason) {
867
- throw this.reason;
868
- }
869
- };
870
-
871
- /**
872
- * Returns an object that contains a new `CancelToken` and a function that, when called,
873
- * cancels the `CancelToken`.
874
- */
875
- CancelToken.source = function source() {
876
- var cancel;
877
- var token = new CancelToken(function executor(c) {
878
- cancel = c;
879
- });
880
- return {
881
- token: token,
882
- cancel: cancel
883
- };
884
- };
885
-
886
- module.exports = CancelToken;
887
-
888
-
889
- /***/ }),
890
-
891
- /***/ "b50d":
892
- /***/ (function(module, exports, __webpack_require__) {
893
-
894
- "use strict";
895
-
896
-
897
- var utils = __webpack_require__("c532");
898
- var settle = __webpack_require__("467f");
899
- var buildURL = __webpack_require__("30b5");
900
- var buildFullPath = __webpack_require__("83b9");
901
- var parseHeaders = __webpack_require__("c345");
902
- var isURLSameOrigin = __webpack_require__("3934");
903
- var createError = __webpack_require__("2d83");
904
-
905
- module.exports = function xhrAdapter(config) {
906
- return new Promise(function dispatchXhrRequest(resolve, reject) {
907
- var requestData = config.data;
908
- var requestHeaders = config.headers;
909
-
910
- if (utils.isFormData(requestData)) {
911
- delete requestHeaders['Content-Type']; // Let the browser set it
912
- }
913
-
914
- var request = new XMLHttpRequest();
915
-
916
- // HTTP basic authentication
917
- if (config.auth) {
918
- var username = config.auth.username || '';
919
- var password = config.auth.password || '';
920
- requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
921
- }
922
-
923
- var fullPath = buildFullPath(config.baseURL, config.url);
924
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
925
-
926
- // Set the request timeout in MS
927
- request.timeout = config.timeout;
928
-
929
- // Listen for ready state
930
- request.onreadystatechange = function handleLoad() {
931
- if (!request || request.readyState !== 4) {
932
- return;
933
- }
934
-
935
- // The request errored out and we didn't get a response, this will be
936
- // handled by onerror instead
937
- // With one exception: request that using file: protocol, most browsers
938
- // will return status as 0 even though it's a successful request
939
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
940
- return;
941
- }
942
-
943
- // Prepare the response
944
- var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
945
- var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
946
- var response = {
947
- data: responseData,
948
- status: request.status,
949
- statusText: request.statusText,
950
- headers: responseHeaders,
951
- config: config,
952
- request: request
953
- };
954
-
955
- settle(resolve, reject, response);
956
-
957
- // Clean up request
958
- request = null;
959
- };
960
-
961
- // Handle browser request cancellation (as opposed to a manual cancellation)
962
- request.onabort = function handleAbort() {
963
- if (!request) {
964
- return;
965
- }
966
-
967
- reject(createError('Request aborted', config, 'ECONNABORTED', request));
968
-
969
- // Clean up request
970
- request = null;
971
- };
972
-
973
- // Handle low level network errors
974
- request.onerror = function handleError() {
975
- // Real errors are hidden from us by the browser
976
- // onerror should only fire if it's a network error
977
- reject(createError('Network Error', config, null, request));
978
-
979
- // Clean up request
980
- request = null;
981
- };
982
-
983
- // Handle timeout
984
- request.ontimeout = function handleTimeout() {
985
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
986
- if (config.timeoutErrorMessage) {
987
- timeoutErrorMessage = config.timeoutErrorMessage;
988
- }
989
- reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
990
- request));
991
-
992
- // Clean up request
993
- request = null;
994
- };
995
-
996
- // Add xsrf header
997
- // This is only done if running in a standard browser environment.
998
- // Specifically not if we're in a web worker, or react-native.
999
- if (utils.isStandardBrowserEnv()) {
1000
- var cookies = __webpack_require__("7aac");
1001
-
1002
- // Add xsrf header
1003
- var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1004
- cookies.read(config.xsrfCookieName) :
1005
- undefined;
1006
-
1007
- if (xsrfValue) {
1008
- requestHeaders[config.xsrfHeaderName] = xsrfValue;
1009
- }
1010
- }
1011
-
1012
- // Add headers to the request
1013
- if ('setRequestHeader' in request) {
1014
- utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1015
- if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1016
- // Remove Content-Type if data is undefined
1017
- delete requestHeaders[key];
1018
- } else {
1019
- // Otherwise add header to the request
1020
- request.setRequestHeader(key, val);
1021
- }
1022
- });
1023
- }
1024
-
1025
- // Add withCredentials to request if needed
1026
- if (!utils.isUndefined(config.withCredentials)) {
1027
- request.withCredentials = !!config.withCredentials;
1028
- }
1029
-
1030
- // Add responseType to request if needed
1031
- if (config.responseType) {
1032
- try {
1033
- request.responseType = config.responseType;
1034
- } catch (e) {
1035
- // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
1036
- // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
1037
- if (config.responseType !== 'json') {
1038
- throw e;
1039
- }
1040
- }
1041
- }
1042
-
1043
- // Handle progress if needed
1044
- if (typeof config.onDownloadProgress === 'function') {
1045
- request.addEventListener('progress', config.onDownloadProgress);
1046
- }
1047
-
1048
- // Not all browsers support upload events
1049
- if (typeof config.onUploadProgress === 'function' && request.upload) {
1050
- request.upload.addEventListener('progress', config.onUploadProgress);
1051
- }
1052
-
1053
- if (config.cancelToken) {
1054
- // Handle cancellation
1055
- config.cancelToken.promise.then(function onCanceled(cancel) {
1056
- if (!request) {
1057
- return;
1058
- }
1059
-
1060
- request.abort();
1061
- reject(cancel);
1062
- // Clean up request
1063
- request = null;
1064
- });
1065
- }
1066
-
1067
- if (requestData === undefined) {
1068
- requestData = null;
1069
- }
1070
-
1071
- // Send the request
1072
- request.send(requestData);
1073
- });
1074
- };
1075
-
1076
-
1077
- /***/ }),
1078
-
1079
- /***/ "bc3a":
1080
- /***/ (function(module, exports, __webpack_require__) {
1081
-
1082
- module.exports = __webpack_require__("cee4");
1083
-
1084
- /***/ }),
1085
-
1086
- /***/ "c345":
1087
- /***/ (function(module, exports, __webpack_require__) {
1088
-
1089
- "use strict";
1090
-
1091
-
1092
- var utils = __webpack_require__("c532");
1093
-
1094
- // Headers whose duplicates are ignored by node
1095
- // c.f. https://nodejs.org/api/http.html#http_message_headers
1096
- var ignoreDuplicateOf = [
1097
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
1098
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1099
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1100
- 'referer', 'retry-after', 'user-agent'
1101
- ];
1102
-
1103
- /**
1104
- * Parse headers into an object
1105
- *
1106
- * ```
1107
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
1108
- * Content-Type: application/json
1109
- * Connection: keep-alive
1110
- * Transfer-Encoding: chunked
1111
- * ```
1112
- *
1113
- * @param {String} headers Headers needing to be parsed
1114
- * @returns {Object} Headers parsed into an object
1115
- */
1116
- module.exports = function parseHeaders(headers) {
1117
- var parsed = {};
1118
- var key;
1119
- var val;
1120
- var i;
1121
-
1122
- if (!headers) { return parsed; }
1123
-
1124
- utils.forEach(headers.split('\n'), function parser(line) {
1125
- i = line.indexOf(':');
1126
- key = utils.trim(line.substr(0, i)).toLowerCase();
1127
- val = utils.trim(line.substr(i + 1));
1128
-
1129
- if (key) {
1130
- if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
1131
- return;
1132
- }
1133
- if (key === 'set-cookie') {
1134
- parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
1135
- } else {
1136
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1137
- }
1138
- }
1139
- });
1140
-
1141
- return parsed;
1142
- };
1143
-
1144
-
1145
- /***/ }),
1146
-
1147
- /***/ "c401":
1148
- /***/ (function(module, exports, __webpack_require__) {
1149
-
1150
- "use strict";
1151
-
1152
-
1153
- var utils = __webpack_require__("c532");
1154
-
1155
- /**
1156
- * Transform the data for a request or a response
1157
- *
1158
- * @param {Object|String} data The data to be transformed
1159
- * @param {Array} headers The headers for the request or response
1160
- * @param {Array|Function} fns A single function or Array of functions
1161
- * @returns {*} The resulting transformed data
1162
- */
1163
- module.exports = function transformData(data, headers, fns) {
1164
- /*eslint no-param-reassign:0*/
1165
- utils.forEach(fns, function transform(fn) {
1166
- data = fn(data, headers);
1167
- });
1168
-
1169
- return data;
1170
- };
1171
-
1172
-
1173
- /***/ }),
1174
-
1175
- /***/ "c532":
1176
- /***/ (function(module, exports, __webpack_require__) {
1177
-
1178
- "use strict";
1179
-
1180
-
1181
- var bind = __webpack_require__("1d2b");
1182
-
1183
- /*global toString:true*/
1184
-
1185
- // utils is a library of generic helper functions non-specific to axios
1186
-
1187
- var toString = Object.prototype.toString;
1188
-
1189
- /**
1190
- * Determine if a value is an Array
1191
- *
1192
- * @param {Object} val The value to test
1193
- * @returns {boolean} True if value is an Array, otherwise false
1194
- */
1195
- function isArray(val) {
1196
- return toString.call(val) === '[object Array]';
1197
- }
1198
-
1199
- /**
1200
- * Determine if a value is undefined
1201
- *
1202
- * @param {Object} val The value to test
1203
- * @returns {boolean} True if the value is undefined, otherwise false
1204
- */
1205
- function isUndefined(val) {
1206
- return typeof val === 'undefined';
1207
- }
1208
-
1209
- /**
1210
- * Determine if a value is a Buffer
1211
- *
1212
- * @param {Object} val The value to test
1213
- * @returns {boolean} True if value is a Buffer, otherwise false
1214
- */
1215
- function isBuffer(val) {
1216
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
1217
- && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
1218
- }
1219
-
1220
- /**
1221
- * Determine if a value is an ArrayBuffer
1222
- *
1223
- * @param {Object} val The value to test
1224
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
1225
- */
1226
- function isArrayBuffer(val) {
1227
- return toString.call(val) === '[object ArrayBuffer]';
1228
- }
1229
-
1230
- /**
1231
- * Determine if a value is a FormData
1232
- *
1233
- * @param {Object} val The value to test
1234
- * @returns {boolean} True if value is an FormData, otherwise false
1235
- */
1236
- function isFormData(val) {
1237
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
1238
- }
1239
-
1240
- /**
1241
- * Determine if a value is a view on an ArrayBuffer
1242
- *
1243
- * @param {Object} val The value to test
1244
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
1245
- */
1246
- function isArrayBufferView(val) {
1247
- var result;
1248
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
1249
- result = ArrayBuffer.isView(val);
1250
- } else {
1251
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
1252
- }
1253
- return result;
1254
- }
1255
-
1256
- /**
1257
- * Determine if a value is a String
1258
- *
1259
- * @param {Object} val The value to test
1260
- * @returns {boolean} True if value is a String, otherwise false
1261
- */
1262
- function isString(val) {
1263
- return typeof val === 'string';
1264
- }
1265
-
1266
- /**
1267
- * Determine if a value is a Number
1268
- *
1269
- * @param {Object} val The value to test
1270
- * @returns {boolean} True if value is a Number, otherwise false
1271
- */
1272
- function isNumber(val) {
1273
- return typeof val === 'number';
1274
- }
1275
-
1276
- /**
1277
- * Determine if a value is an Object
1278
- *
1279
- * @param {Object} val The value to test
1280
- * @returns {boolean} True if value is an Object, otherwise false
1281
- */
1282
- function isObject(val) {
1283
- return val !== null && typeof val === 'object';
1284
- }
1285
-
1286
- /**
1287
- * Determine if a value is a Date
1288
- *
1289
- * @param {Object} val The value to test
1290
- * @returns {boolean} True if value is a Date, otherwise false
1291
- */
1292
- function isDate(val) {
1293
- return toString.call(val) === '[object Date]';
1294
- }
1295
-
1296
- /**
1297
- * Determine if a value is a File
1298
- *
1299
- * @param {Object} val The value to test
1300
- * @returns {boolean} True if value is a File, otherwise false
1301
- */
1302
- function isFile(val) {
1303
- return toString.call(val) === '[object File]';
1304
- }
1305
-
1306
- /**
1307
- * Determine if a value is a Blob
1308
- *
1309
- * @param {Object} val The value to test
1310
- * @returns {boolean} True if value is a Blob, otherwise false
1311
- */
1312
- function isBlob(val) {
1313
- return toString.call(val) === '[object Blob]';
1314
- }
1315
-
1316
- /**
1317
- * Determine if a value is a Function
1318
- *
1319
- * @param {Object} val The value to test
1320
- * @returns {boolean} True if value is a Function, otherwise false
1321
- */
1322
- function isFunction(val) {
1323
- return toString.call(val) === '[object Function]';
1324
- }
1325
-
1326
- /**
1327
- * Determine if a value is a Stream
1328
- *
1329
- * @param {Object} val The value to test
1330
- * @returns {boolean} True if value is a Stream, otherwise false
1331
- */
1332
- function isStream(val) {
1333
- return isObject(val) && isFunction(val.pipe);
1334
- }
1335
-
1336
- /**
1337
- * Determine if a value is a URLSearchParams object
1338
- *
1339
- * @param {Object} val The value to test
1340
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
1341
- */
1342
- function isURLSearchParams(val) {
1343
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
1344
- }
1345
-
1346
- /**
1347
- * Trim excess whitespace off the beginning and end of a string
1348
- *
1349
- * @param {String} str The String to trim
1350
- * @returns {String} The String freed of excess whitespace
1351
- */
1352
- function trim(str) {
1353
- return str.replace(/^\s*/, '').replace(/\s*$/, '');
1354
- }
1355
-
1356
- /**
1357
- * Determine if we're running in a standard browser environment
1358
- *
1359
- * This allows axios to run in a web worker, and react-native.
1360
- * Both environments support XMLHttpRequest, but not fully standard globals.
1361
- *
1362
- * web workers:
1363
- * typeof window -> undefined
1364
- * typeof document -> undefined
1365
- *
1366
- * react-native:
1367
- * navigator.product -> 'ReactNative'
1368
- * nativescript
1369
- * navigator.product -> 'NativeScript' or 'NS'
1370
- */
1371
- function isStandardBrowserEnv() {
1372
- if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
1373
- navigator.product === 'NativeScript' ||
1374
- navigator.product === 'NS')) {
1375
- return false;
1376
- }
1377
- return (
1378
- typeof window !== 'undefined' &&
1379
- typeof document !== 'undefined'
1380
- );
1381
- }
1382
-
1383
- /**
1384
- * Iterate over an Array or an Object invoking a function for each item.
1385
- *
1386
- * If `obj` is an Array callback will be called passing
1387
- * the value, index, and complete array for each item.
1388
- *
1389
- * If 'obj' is an Object callback will be called passing
1390
- * the value, key, and complete object for each property.
1391
- *
1392
- * @param {Object|Array} obj The object to iterate
1393
- * @param {Function} fn The callback to invoke for each item
1394
- */
1395
- function forEach(obj, fn) {
1396
- // Don't bother if no value provided
1397
- if (obj === null || typeof obj === 'undefined') {
1398
- return;
1399
- }
1400
-
1401
- // Force an array if not already something iterable
1402
- if (typeof obj !== 'object') {
1403
- /*eslint no-param-reassign:0*/
1404
- obj = [obj];
1405
- }
1406
-
1407
- if (isArray(obj)) {
1408
- // Iterate over array values
1409
- for (var i = 0, l = obj.length; i < l; i++) {
1410
- fn.call(null, obj[i], i, obj);
1411
- }
1412
- } else {
1413
- // Iterate over object keys
1414
- for (var key in obj) {
1415
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
1416
- fn.call(null, obj[key], key, obj);
1417
- }
1418
- }
1419
- }
1420
- }
1421
-
1422
- /**
1423
- * Accepts varargs expecting each argument to be an object, then
1424
- * immutably merges the properties of each object and returns result.
1425
- *
1426
- * When multiple objects contain the same key the later object in
1427
- * the arguments list will take precedence.
1428
- *
1429
- * Example:
1430
- *
1431
- * ```js
1432
- * var result = merge({foo: 123}, {foo: 456});
1433
- * console.log(result.foo); // outputs 456
1434
- * ```
1435
- *
1436
- * @param {Object} obj1 Object to merge
1437
- * @returns {Object} Result of all merge properties
1438
- */
1439
- function merge(/* obj1, obj2, obj3, ... */) {
1440
- var result = {};
1441
- function assignValue(val, key) {
1442
- if (typeof result[key] === 'object' && typeof val === 'object') {
1443
- result[key] = merge(result[key], val);
1444
- } else {
1445
- result[key] = val;
1446
- }
1447
- }
1448
-
1449
- for (var i = 0, l = arguments.length; i < l; i++) {
1450
- forEach(arguments[i], assignValue);
1451
- }
1452
- return result;
1453
- }
1454
-
1455
- /**
1456
- * Function equal to merge with the difference being that no reference
1457
- * to original objects is kept.
1458
- *
1459
- * @see merge
1460
- * @param {Object} obj1 Object to merge
1461
- * @returns {Object} Result of all merge properties
1462
- */
1463
- function deepMerge(/* obj1, obj2, obj3, ... */) {
1464
- var result = {};
1465
- function assignValue(val, key) {
1466
- if (typeof result[key] === 'object' && typeof val === 'object') {
1467
- result[key] = deepMerge(result[key], val);
1468
- } else if (typeof val === 'object') {
1469
- result[key] = deepMerge({}, val);
1470
- } else {
1471
- result[key] = val;
1472
- }
1473
- }
1474
-
1475
- for (var i = 0, l = arguments.length; i < l; i++) {
1476
- forEach(arguments[i], assignValue);
1477
- }
1478
- return result;
1479
- }
1480
-
1481
- /**
1482
- * Extends object a by mutably adding to it the properties of object b.
1483
- *
1484
- * @param {Object} a The object to be extended
1485
- * @param {Object} b The object to copy properties from
1486
- * @param {Object} thisArg The object to bind function to
1487
- * @return {Object} The resulting value of object a
1488
- */
1489
- function extend(a, b, thisArg) {
1490
- forEach(b, function assignValue(val, key) {
1491
- if (thisArg && typeof val === 'function') {
1492
- a[key] = bind(val, thisArg);
1493
- } else {
1494
- a[key] = val;
1495
- }
1496
- });
1497
- return a;
1498
- }
1499
-
1500
- module.exports = {
1501
- isArray: isArray,
1502
- isArrayBuffer: isArrayBuffer,
1503
- isBuffer: isBuffer,
1504
- isFormData: isFormData,
1505
- isArrayBufferView: isArrayBufferView,
1506
- isString: isString,
1507
- isNumber: isNumber,
1508
- isObject: isObject,
1509
- isUndefined: isUndefined,
1510
- isDate: isDate,
1511
- isFile: isFile,
1512
- isBlob: isBlob,
1513
- isFunction: isFunction,
1514
- isStream: isStream,
1515
- isURLSearchParams: isURLSearchParams,
1516
- isStandardBrowserEnv: isStandardBrowserEnv,
1517
- forEach: forEach,
1518
- merge: merge,
1519
- deepMerge: deepMerge,
1520
- extend: extend,
1521
- trim: trim
1522
- };
1523
-
1524
-
1525
- /***/ }),
1526
-
1527
- /***/ "c8af":
1528
- /***/ (function(module, exports, __webpack_require__) {
1529
-
1530
- "use strict";
1531
-
1532
-
1533
- var utils = __webpack_require__("c532");
1534
-
1535
- module.exports = function normalizeHeaderName(headers, normalizedName) {
1536
- utils.forEach(headers, function processHeader(value, name) {
1537
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
1538
- headers[normalizedName] = value;
1539
- delete headers[name];
1540
- }
1541
- });
1542
- };
1543
-
1544
-
1545
- /***/ }),
1546
-
1547
- /***/ "cee4":
1548
- /***/ (function(module, exports, __webpack_require__) {
1549
-
1550
- "use strict";
1551
-
1552
-
1553
- var utils = __webpack_require__("c532");
1554
- var bind = __webpack_require__("1d2b");
1555
- var Axios = __webpack_require__("0a06");
1556
- var mergeConfig = __webpack_require__("4a7b");
1557
- var defaults = __webpack_require__("2444");
1558
-
1559
- /**
1560
- * Create an instance of Axios
1561
- *
1562
- * @param {Object} defaultConfig The default config for the instance
1563
- * @return {Axios} A new instance of Axios
1564
- */
1565
- function createInstance(defaultConfig) {
1566
- var context = new Axios(defaultConfig);
1567
- var instance = bind(Axios.prototype.request, context);
1568
-
1569
- // Copy axios.prototype to instance
1570
- utils.extend(instance, Axios.prototype, context);
1571
-
1572
- // Copy context to instance
1573
- utils.extend(instance, context);
1574
-
1575
- return instance;
1576
- }
1577
-
1578
- // Create the default instance to be exported
1579
- var axios = createInstance(defaults);
1580
-
1581
- // Expose Axios class to allow class inheritance
1582
- axios.Axios = Axios;
1583
-
1584
- // Factory for creating new instances
1585
- axios.create = function create(instanceConfig) {
1586
- return createInstance(mergeConfig(axios.defaults, instanceConfig));
1587
- };
1588
-
1589
- // Expose Cancel & CancelToken
1590
- axios.Cancel = __webpack_require__("7a77");
1591
- axios.CancelToken = __webpack_require__("8df4");
1592
- axios.isCancel = __webpack_require__("2e67");
1593
-
1594
- // Expose all/spread
1595
- axios.all = function all(promises) {
1596
- return Promise.all(promises);
1597
- };
1598
- axios.spread = __webpack_require__("0df6");
1599
-
1600
- module.exports = axios;
1601
-
1602
- // Allow use of default import syntax in TypeScript
1603
- module.exports.default = axios;
1604
-
1605
-
1606
- /***/ }),
1607
-
1608
- /***/ "d925":
1609
- /***/ (function(module, exports, __webpack_require__) {
1610
-
1611
- "use strict";
1612
-
1613
-
1614
- /**
1615
- * Determines whether the specified URL is absolute
1616
- *
1617
- * @param {string} url The URL to test
1618
- * @returns {boolean} True if the specified URL is absolute, otherwise false
1619
- */
1620
- module.exports = function isAbsoluteURL(url) {
1621
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1622
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1623
- // by any combination of letters, digits, plus, period, or hyphen.
1624
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1625
- };
1626
-
1627
-
1628
- /***/ }),
1629
-
1630
- /***/ "e683":
1631
- /***/ (function(module, exports, __webpack_require__) {
1632
-
1633
- "use strict";
1634
-
1635
-
1636
- /**
1637
- * Creates a new URL by combining the specified URLs
1638
- *
1639
- * @param {string} baseURL The base URL
1640
- * @param {string} relativeURL The relative URL
1641
- * @returns {string} The combined URL
1642
- */
1643
- module.exports = function combineURLs(baseURL, relativeURL) {
1644
- return relativeURL
1645
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1646
- : baseURL;
1647
- };
1648
-
1649
-
1650
- /***/ }),
1651
-
1652
- /***/ "f6b4":
1653
- /***/ (function(module, exports, __webpack_require__) {
1654
-
1655
- "use strict";
1656
-
1657
-
1658
- var utils = __webpack_require__("c532");
1659
-
1660
- function InterceptorManager() {
1661
- this.handlers = [];
1662
- }
1663
-
1664
- /**
1665
- * Add a new interceptor to the stack
1666
- *
1667
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
1668
- * @param {Function} rejected The function to handle `reject` for a `Promise`
1669
- *
1670
- * @return {Number} An ID used to remove interceptor later
1671
- */
1672
- InterceptorManager.prototype.use = function use(fulfilled, rejected) {
1673
- this.handlers.push({
1674
- fulfilled: fulfilled,
1675
- rejected: rejected
1676
- });
1677
- return this.handlers.length - 1;
1678
- };
1679
-
1680
- /**
1681
- * Remove an interceptor from the stack
1682
- *
1683
- * @param {Number} id The ID that was returned by `use`
1684
- */
1685
- InterceptorManager.prototype.eject = function eject(id) {
1686
- if (this.handlers[id]) {
1687
- this.handlers[id] = null;
1688
- }
1689
- };
1690
-
1691
- /**
1692
- * Iterate over all the registered interceptors
1693
- *
1694
- * This method is particularly useful for skipping over any
1695
- * interceptors that may have become `null` calling `eject`.
1696
- *
1697
- * @param {Function} fn The function to call for each interceptor
1698
- */
1699
- InterceptorManager.prototype.forEach = function forEach(fn) {
1700
- utils.forEach(this.handlers, function forEachHandler(h) {
1701
- if (h !== null) {
1702
- fn(h);
1703
- }
1704
- });
1705
- };
1706
-
1707
- module.exports = InterceptorManager;
1708
-
1709
-
1710
- /***/ })
1711
-
1712
- }]);