glitch-javascript-sdk 0.6.4 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1137 -743
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +159 -0
- package/dist/esm/api/Titles.d.ts +73 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +1241 -824
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/CampaignsRoute.d.ts +7 -0
- package/dist/esm/routes/TitlesRoute.d.ts +7 -0
- package/dist/index.d.ts +230 -0
- package/package.json +13 -13
- package/src/api/Campaigns.ts +224 -0
- package/src/api/Titles.ts +105 -0
- package/src/api/index.ts +5 -1
- package/src/index.ts +4 -0
- package/src/routes/CampaignsRoute.ts +27 -0
- package/src/routes/TitlesRoute.ts +18 -0
package/dist/esm/index.js
CHANGED
|
@@ -773,7 +773,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
|
|
|
773
773
|
const isThenable = (thing) =>
|
|
774
774
|
thing && (isObject(thing) || isFunction$2(thing)) && isFunction$2(thing.then) && isFunction$2(thing.catch);
|
|
775
775
|
|
|
776
|
-
var utils = {
|
|
776
|
+
var utils$1 = {
|
|
777
777
|
isArray: isArray$2,
|
|
778
778
|
isArrayBuffer,
|
|
779
779
|
isBuffer: isBuffer$2,
|
|
@@ -1034,6 +1034,8 @@ var isArray$1 = Array.isArray || function (arr) {
|
|
|
1034
1034
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
1035
1035
|
* @license MIT
|
|
1036
1036
|
*/
|
|
1037
|
+
/* eslint-disable no-proto */
|
|
1038
|
+
|
|
1037
1039
|
|
|
1038
1040
|
var INSPECT_MAX_BYTES = 50;
|
|
1039
1041
|
|
|
@@ -2830,7 +2832,7 @@ function AxiosError(message, code, config, request, response) {
|
|
|
2830
2832
|
response && (this.response = response);
|
|
2831
2833
|
}
|
|
2832
2834
|
|
|
2833
|
-
utils.inherits(AxiosError, Error, {
|
|
2835
|
+
utils$1.inherits(AxiosError, Error, {
|
|
2834
2836
|
toJSON: function toJSON() {
|
|
2835
2837
|
return {
|
|
2836
2838
|
// Standard
|
|
@@ -2845,7 +2847,7 @@ utils.inherits(AxiosError, Error, {
|
|
|
2845
2847
|
columnNumber: this.columnNumber,
|
|
2846
2848
|
stack: this.stack,
|
|
2847
2849
|
// Axios
|
|
2848
|
-
config: utils.toJSONObject(this.config),
|
|
2850
|
+
config: utils$1.toJSONObject(this.config),
|
|
2849
2851
|
code: this.code,
|
|
2850
2852
|
status: this.response && this.response.status ? this.response.status : null
|
|
2851
2853
|
};
|
|
@@ -2880,7 +2882,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
|
2880
2882
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
2881
2883
|
const axiosError = Object.create(prototype$1);
|
|
2882
2884
|
|
|
2883
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
2885
|
+
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
2884
2886
|
return obj !== Error.prototype;
|
|
2885
2887
|
}, prop => {
|
|
2886
2888
|
return prop !== 'isAxiosError';
|
|
@@ -3031,7 +3033,7 @@ Item.prototype.run = function () {
|
|
|
3031
3033
|
this.fun.apply(null, this.array);
|
|
3032
3034
|
};
|
|
3033
3035
|
var title = 'browser';
|
|
3034
|
-
var platform$
|
|
3036
|
+
var platform$3 = 'browser';
|
|
3035
3037
|
var browser$1 = true;
|
|
3036
3038
|
var env = {};
|
|
3037
3039
|
var argv = [];
|
|
@@ -3113,7 +3115,7 @@ var browser$1$1 = {
|
|
|
3113
3115
|
chdir: chdir,
|
|
3114
3116
|
umask: umask,
|
|
3115
3117
|
hrtime: hrtime,
|
|
3116
|
-
platform: platform$
|
|
3118
|
+
platform: platform$3,
|
|
3117
3119
|
release: release$1,
|
|
3118
3120
|
config: config,
|
|
3119
3121
|
uptime: uptime$1
|
|
@@ -20008,7 +20010,7 @@ var FormData$2 = /*@__PURE__*/getDefaultExportFromCjs(form_data);
|
|
|
20008
20010
|
* @returns {boolean}
|
|
20009
20011
|
*/
|
|
20010
20012
|
function isVisitable(thing) {
|
|
20011
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
20013
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
20012
20014
|
}
|
|
20013
20015
|
|
|
20014
20016
|
/**
|
|
@@ -20019,7 +20021,7 @@ function isVisitable(thing) {
|
|
|
20019
20021
|
* @returns {string} the key without the brackets.
|
|
20020
20022
|
*/
|
|
20021
20023
|
function removeBrackets(key) {
|
|
20022
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
20024
|
+
return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
20023
20025
|
}
|
|
20024
20026
|
|
|
20025
20027
|
/**
|
|
@@ -20048,10 +20050,10 @@ function renderKey(path, key, dots) {
|
|
|
20048
20050
|
* @returns {boolean}
|
|
20049
20051
|
*/
|
|
20050
20052
|
function isFlatArray(arr) {
|
|
20051
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
20053
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
20052
20054
|
}
|
|
20053
20055
|
|
|
20054
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
20056
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
20055
20057
|
return /^is[A-Z]/.test(prop);
|
|
20056
20058
|
});
|
|
20057
20059
|
|
|
@@ -20079,7 +20081,7 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
|
20079
20081
|
* @returns
|
|
20080
20082
|
*/
|
|
20081
20083
|
function toFormData(obj, formData, options) {
|
|
20082
|
-
if (!utils.isObject(obj)) {
|
|
20084
|
+
if (!utils$1.isObject(obj)) {
|
|
20083
20085
|
throw new TypeError('target must be an object');
|
|
20084
20086
|
}
|
|
20085
20087
|
|
|
@@ -20087,13 +20089,13 @@ function toFormData(obj, formData, options) {
|
|
|
20087
20089
|
formData = formData || new (FormData$2 || FormData)();
|
|
20088
20090
|
|
|
20089
20091
|
// eslint-disable-next-line no-param-reassign
|
|
20090
|
-
options = utils.toFlatObject(options, {
|
|
20092
|
+
options = utils$1.toFlatObject(options, {
|
|
20091
20093
|
metaTokens: true,
|
|
20092
20094
|
dots: false,
|
|
20093
20095
|
indexes: false
|
|
20094
20096
|
}, false, function defined(option, source) {
|
|
20095
20097
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
20096
|
-
return !utils.isUndefined(source[option]);
|
|
20098
|
+
return !utils$1.isUndefined(source[option]);
|
|
20097
20099
|
});
|
|
20098
20100
|
|
|
20099
20101
|
const metaTokens = options.metaTokens;
|
|
@@ -20102,24 +20104,24 @@ function toFormData(obj, formData, options) {
|
|
|
20102
20104
|
const dots = options.dots;
|
|
20103
20105
|
const indexes = options.indexes;
|
|
20104
20106
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
20105
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
20107
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
20106
20108
|
|
|
20107
|
-
if (!utils.isFunction(visitor)) {
|
|
20109
|
+
if (!utils$1.isFunction(visitor)) {
|
|
20108
20110
|
throw new TypeError('visitor must be a function');
|
|
20109
20111
|
}
|
|
20110
20112
|
|
|
20111
20113
|
function convertValue(value) {
|
|
20112
20114
|
if (value === null) return '';
|
|
20113
20115
|
|
|
20114
|
-
if (utils.isDate(value)) {
|
|
20116
|
+
if (utils$1.isDate(value)) {
|
|
20115
20117
|
return value.toISOString();
|
|
20116
20118
|
}
|
|
20117
20119
|
|
|
20118
|
-
if (!useBlob && utils.isBlob(value)) {
|
|
20120
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
|
20119
20121
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
20120
20122
|
}
|
|
20121
20123
|
|
|
20122
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
20124
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
20123
20125
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
20124
20126
|
}
|
|
20125
20127
|
|
|
@@ -20140,20 +20142,20 @@ function toFormData(obj, formData, options) {
|
|
|
20140
20142
|
let arr = value;
|
|
20141
20143
|
|
|
20142
20144
|
if (value && !path && typeof value === 'object') {
|
|
20143
|
-
if (utils.endsWith(key, '{}')) {
|
|
20145
|
+
if (utils$1.endsWith(key, '{}')) {
|
|
20144
20146
|
// eslint-disable-next-line no-param-reassign
|
|
20145
20147
|
key = metaTokens ? key : key.slice(0, -2);
|
|
20146
20148
|
// eslint-disable-next-line no-param-reassign
|
|
20147
20149
|
value = JSON.stringify(value);
|
|
20148
20150
|
} else if (
|
|
20149
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
|
20150
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
|
20151
|
+
(utils$1.isArray(value) && isFlatArray(value)) ||
|
|
20152
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
|
20151
20153
|
)) {
|
|
20152
20154
|
// eslint-disable-next-line no-param-reassign
|
|
20153
20155
|
key = removeBrackets(key);
|
|
20154
20156
|
|
|
20155
20157
|
arr.forEach(function each(el, index) {
|
|
20156
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
20158
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
20157
20159
|
// eslint-disable-next-line no-nested-ternary
|
|
20158
20160
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
20159
20161
|
convertValue(el)
|
|
@@ -20181,7 +20183,7 @@ function toFormData(obj, formData, options) {
|
|
|
20181
20183
|
});
|
|
20182
20184
|
|
|
20183
20185
|
function build(value, path) {
|
|
20184
|
-
if (utils.isUndefined(value)) return;
|
|
20186
|
+
if (utils$1.isUndefined(value)) return;
|
|
20185
20187
|
|
|
20186
20188
|
if (stack.indexOf(value) !== -1) {
|
|
20187
20189
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
@@ -20189,9 +20191,9 @@ function toFormData(obj, formData, options) {
|
|
|
20189
20191
|
|
|
20190
20192
|
stack.push(value);
|
|
20191
20193
|
|
|
20192
|
-
utils.forEach(value, function each(el, key) {
|
|
20193
|
-
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
|
20194
|
-
formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
20194
|
+
utils$1.forEach(value, function each(el, key) {
|
|
20195
|
+
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
|
|
20196
|
+
formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
20195
20197
|
);
|
|
20196
20198
|
|
|
20197
20199
|
if (result === true) {
|
|
@@ -20202,7 +20204,7 @@ function toFormData(obj, formData, options) {
|
|
|
20202
20204
|
stack.pop();
|
|
20203
20205
|
}
|
|
20204
20206
|
|
|
20205
|
-
if (!utils.isObject(obj)) {
|
|
20207
|
+
if (!utils$1.isObject(obj)) {
|
|
20206
20208
|
throw new TypeError('data must be an object');
|
|
20207
20209
|
}
|
|
20208
20210
|
|
|
@@ -20306,7 +20308,7 @@ function buildURL(url, params, options) {
|
|
|
20306
20308
|
if (serializeFn) {
|
|
20307
20309
|
serializedParams = serializeFn(params, options);
|
|
20308
20310
|
} else {
|
|
20309
|
-
serializedParams = utils.isURLSearchParams(params) ?
|
|
20311
|
+
serializedParams = utils$1.isURLSearchParams(params) ?
|
|
20310
20312
|
params.toString() :
|
|
20311
20313
|
new AxiosURLSearchParams(params, options).toString(_encode);
|
|
20312
20314
|
}
|
|
@@ -20381,7 +20383,7 @@ class InterceptorManager {
|
|
|
20381
20383
|
* @returns {void}
|
|
20382
20384
|
*/
|
|
20383
20385
|
forEach(fn) {
|
|
20384
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
20386
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
|
20385
20387
|
if (h !== null) {
|
|
20386
20388
|
fn(h);
|
|
20387
20389
|
}
|
|
@@ -20399,7 +20401,7 @@ var transitionalDefaults = {
|
|
|
20399
20401
|
|
|
20400
20402
|
var URLSearchParams = url$1.URLSearchParams;
|
|
20401
20403
|
|
|
20402
|
-
var platform$
|
|
20404
|
+
var platform$2 = {
|
|
20403
20405
|
isNode: true,
|
|
20404
20406
|
classes: {
|
|
20405
20407
|
URLSearchParams,
|
|
@@ -20409,10 +20411,64 @@ var platform$1 = {
|
|
|
20409
20411
|
protocols: [ 'http', 'https', 'file', 'data' ]
|
|
20410
20412
|
};
|
|
20411
20413
|
|
|
20414
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
20415
|
+
|
|
20416
|
+
/**
|
|
20417
|
+
* Determine if we're running in a standard browser environment
|
|
20418
|
+
*
|
|
20419
|
+
* This allows axios to run in a web worker, and react-native.
|
|
20420
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
20421
|
+
*
|
|
20422
|
+
* web workers:
|
|
20423
|
+
* typeof window -> undefined
|
|
20424
|
+
* typeof document -> undefined
|
|
20425
|
+
*
|
|
20426
|
+
* react-native:
|
|
20427
|
+
* navigator.product -> 'ReactNative'
|
|
20428
|
+
* nativescript
|
|
20429
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
20430
|
+
*
|
|
20431
|
+
* @returns {boolean}
|
|
20432
|
+
*/
|
|
20433
|
+
const hasStandardBrowserEnv = (
|
|
20434
|
+
(product) => {
|
|
20435
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
20436
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
|
20437
|
+
|
|
20438
|
+
/**
|
|
20439
|
+
* Determine if we're running in a standard browser webWorker environment
|
|
20440
|
+
*
|
|
20441
|
+
* Although the `isStandardBrowserEnv` method indicates that
|
|
20442
|
+
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
20443
|
+
* filtered out due to its judgment standard
|
|
20444
|
+
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
20445
|
+
* This leads to a problem when axios post `FormData` in webWorker
|
|
20446
|
+
*/
|
|
20447
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
20448
|
+
return (
|
|
20449
|
+
typeof WorkerGlobalScope !== 'undefined' &&
|
|
20450
|
+
// eslint-disable-next-line no-undef
|
|
20451
|
+
self instanceof WorkerGlobalScope &&
|
|
20452
|
+
typeof self.importScripts === 'function'
|
|
20453
|
+
);
|
|
20454
|
+
})();
|
|
20455
|
+
|
|
20456
|
+
var utils = /*#__PURE__*/Object.freeze({
|
|
20457
|
+
__proto__: null,
|
|
20458
|
+
hasBrowserEnv: hasBrowserEnv,
|
|
20459
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
20460
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv
|
|
20461
|
+
});
|
|
20462
|
+
|
|
20463
|
+
var platform$1 = {
|
|
20464
|
+
...utils,
|
|
20465
|
+
...platform$2
|
|
20466
|
+
};
|
|
20467
|
+
|
|
20412
20468
|
function toURLEncodedForm(data, options) {
|
|
20413
20469
|
return toFormData(data, new platform$1.classes.URLSearchParams(), Object.assign({
|
|
20414
20470
|
visitor: function(value, key, path, helpers) {
|
|
20415
|
-
if (utils.isBuffer(value)) {
|
|
20471
|
+
if (platform$1.isNode && utils$1.isBuffer(value)) {
|
|
20416
20472
|
this.append(key, value.toString('base64'));
|
|
20417
20473
|
return false;
|
|
20418
20474
|
}
|
|
@@ -20434,7 +20490,7 @@ function parsePropPath(name) {
|
|
|
20434
20490
|
// foo.x.y.z
|
|
20435
20491
|
// foo-x-y-z
|
|
20436
20492
|
// foo x y z
|
|
20437
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
20493
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
20438
20494
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
20439
20495
|
});
|
|
20440
20496
|
}
|
|
@@ -20471,10 +20527,10 @@ function formDataToJSON(formData) {
|
|
|
20471
20527
|
let name = path[index++];
|
|
20472
20528
|
const isNumericKey = Number.isFinite(+name);
|
|
20473
20529
|
const isLast = index >= path.length;
|
|
20474
|
-
name = !name && utils.isArray(target) ? target.length : name;
|
|
20530
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
20475
20531
|
|
|
20476
20532
|
if (isLast) {
|
|
20477
|
-
if (utils.hasOwnProp(target, name)) {
|
|
20533
|
+
if (utils$1.hasOwnProp(target, name)) {
|
|
20478
20534
|
target[name] = [target[name], value];
|
|
20479
20535
|
} else {
|
|
20480
20536
|
target[name] = value;
|
|
@@ -20483,23 +20539,23 @@ function formDataToJSON(formData) {
|
|
|
20483
20539
|
return !isNumericKey;
|
|
20484
20540
|
}
|
|
20485
20541
|
|
|
20486
|
-
if (!target[name] || !utils.isObject(target[name])) {
|
|
20542
|
+
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
20487
20543
|
target[name] = [];
|
|
20488
20544
|
}
|
|
20489
20545
|
|
|
20490
20546
|
const result = buildPath(path, value, target[name], index);
|
|
20491
20547
|
|
|
20492
|
-
if (result && utils.isArray(target[name])) {
|
|
20548
|
+
if (result && utils$1.isArray(target[name])) {
|
|
20493
20549
|
target[name] = arrayToObject(target[name]);
|
|
20494
20550
|
}
|
|
20495
20551
|
|
|
20496
20552
|
return !isNumericKey;
|
|
20497
20553
|
}
|
|
20498
20554
|
|
|
20499
|
-
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
20555
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
20500
20556
|
const obj = {};
|
|
20501
20557
|
|
|
20502
|
-
utils.forEachEntry(formData, (name, value) => {
|
|
20558
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
|
20503
20559
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
20504
20560
|
});
|
|
20505
20561
|
|
|
@@ -20520,10 +20576,10 @@ function formDataToJSON(formData) {
|
|
|
20520
20576
|
* @returns {string} A stringified version of the rawValue.
|
|
20521
20577
|
*/
|
|
20522
20578
|
function stringifySafely(rawValue, parser, encoder) {
|
|
20523
|
-
if (utils.isString(rawValue)) {
|
|
20579
|
+
if (utils$1.isString(rawValue)) {
|
|
20524
20580
|
try {
|
|
20525
20581
|
(parser || JSON.parse)(rawValue);
|
|
20526
|
-
return utils.trim(rawValue);
|
|
20582
|
+
return utils$1.trim(rawValue);
|
|
20527
20583
|
} catch (e) {
|
|
20528
20584
|
if (e.name !== 'SyntaxError') {
|
|
20529
20585
|
throw e;
|
|
@@ -20543,13 +20599,13 @@ const defaults = {
|
|
|
20543
20599
|
transformRequest: [function transformRequest(data, headers) {
|
|
20544
20600
|
const contentType = headers.getContentType() || '';
|
|
20545
20601
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
20546
|
-
const isObjectPayload = utils.isObject(data);
|
|
20602
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
20547
20603
|
|
|
20548
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
20604
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
20549
20605
|
data = new FormData(data);
|
|
20550
20606
|
}
|
|
20551
20607
|
|
|
20552
|
-
const isFormData = utils.isFormData(data);
|
|
20608
|
+
const isFormData = utils$1.isFormData(data);
|
|
20553
20609
|
|
|
20554
20610
|
if (isFormData) {
|
|
20555
20611
|
if (!hasJSONContentType) {
|
|
@@ -20558,18 +20614,18 @@ const defaults = {
|
|
|
20558
20614
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
20559
20615
|
}
|
|
20560
20616
|
|
|
20561
|
-
if (utils.isArrayBuffer(data) ||
|
|
20562
|
-
utils.isBuffer(data) ||
|
|
20563
|
-
utils.isStream(data) ||
|
|
20564
|
-
utils.isFile(data) ||
|
|
20565
|
-
utils.isBlob(data)
|
|
20617
|
+
if (utils$1.isArrayBuffer(data) ||
|
|
20618
|
+
utils$1.isBuffer(data) ||
|
|
20619
|
+
utils$1.isStream(data) ||
|
|
20620
|
+
utils$1.isFile(data) ||
|
|
20621
|
+
utils$1.isBlob(data)
|
|
20566
20622
|
) {
|
|
20567
20623
|
return data;
|
|
20568
20624
|
}
|
|
20569
|
-
if (utils.isArrayBufferView(data)) {
|
|
20625
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
20570
20626
|
return data.buffer;
|
|
20571
20627
|
}
|
|
20572
|
-
if (utils.isURLSearchParams(data)) {
|
|
20628
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
20573
20629
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
20574
20630
|
return data.toString();
|
|
20575
20631
|
}
|
|
@@ -20581,7 +20637,7 @@ const defaults = {
|
|
|
20581
20637
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
20582
20638
|
}
|
|
20583
20639
|
|
|
20584
|
-
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
20640
|
+
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
20585
20641
|
const _FormData = this.env && this.env.FormData;
|
|
20586
20642
|
|
|
20587
20643
|
return toFormData(
|
|
@@ -20605,7 +20661,7 @@ const defaults = {
|
|
|
20605
20661
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
20606
20662
|
const JSONRequested = this.responseType === 'json';
|
|
20607
20663
|
|
|
20608
|
-
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
20664
|
+
if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
20609
20665
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
20610
20666
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
20611
20667
|
|
|
@@ -20653,7 +20709,7 @@ const defaults = {
|
|
|
20653
20709
|
}
|
|
20654
20710
|
};
|
|
20655
20711
|
|
|
20656
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
20712
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
20657
20713
|
defaults.headers[method] = {};
|
|
20658
20714
|
});
|
|
20659
20715
|
|
|
@@ -20661,7 +20717,7 @@ var defaults$1 = defaults;
|
|
|
20661
20717
|
|
|
20662
20718
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
20663
20719
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
20664
|
-
const ignoreDuplicateOf = utils.toObjectSet([
|
|
20720
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
20665
20721
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
20666
20722
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
20667
20723
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
@@ -20722,7 +20778,7 @@ function normalizeValue(value) {
|
|
|
20722
20778
|
return value;
|
|
20723
20779
|
}
|
|
20724
20780
|
|
|
20725
|
-
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
20781
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
20726
20782
|
}
|
|
20727
20783
|
|
|
20728
20784
|
function parseTokens(str) {
|
|
@@ -20740,7 +20796,7 @@ function parseTokens(str) {
|
|
|
20740
20796
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
20741
20797
|
|
|
20742
20798
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
20743
|
-
if (utils.isFunction(filter)) {
|
|
20799
|
+
if (utils$1.isFunction(filter)) {
|
|
20744
20800
|
return filter.call(this, value, header);
|
|
20745
20801
|
}
|
|
20746
20802
|
|
|
@@ -20748,13 +20804,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
20748
20804
|
value = header;
|
|
20749
20805
|
}
|
|
20750
20806
|
|
|
20751
|
-
if (!utils.isString(value)) return;
|
|
20807
|
+
if (!utils$1.isString(value)) return;
|
|
20752
20808
|
|
|
20753
|
-
if (utils.isString(filter)) {
|
|
20809
|
+
if (utils$1.isString(filter)) {
|
|
20754
20810
|
return value.indexOf(filter) !== -1;
|
|
20755
20811
|
}
|
|
20756
20812
|
|
|
20757
|
-
if (utils.isRegExp(filter)) {
|
|
20813
|
+
if (utils$1.isRegExp(filter)) {
|
|
20758
20814
|
return filter.test(value);
|
|
20759
20815
|
}
|
|
20760
20816
|
}
|
|
@@ -20767,7 +20823,7 @@ function formatHeader(header) {
|
|
|
20767
20823
|
}
|
|
20768
20824
|
|
|
20769
20825
|
function buildAccessors(obj, header) {
|
|
20770
|
-
const accessorName = utils.toCamelCase(' ' + header);
|
|
20826
|
+
const accessorName = utils$1.toCamelCase(' ' + header);
|
|
20771
20827
|
|
|
20772
20828
|
['get', 'set', 'has'].forEach(methodName => {
|
|
20773
20829
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
@@ -20794,7 +20850,7 @@ class AxiosHeaders {
|
|
|
20794
20850
|
throw new Error('header name must be a non-empty string');
|
|
20795
20851
|
}
|
|
20796
20852
|
|
|
20797
|
-
const key = utils.findKey(self, lHeader);
|
|
20853
|
+
const key = utils$1.findKey(self, lHeader);
|
|
20798
20854
|
|
|
20799
20855
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
20800
20856
|
self[key || _header] = normalizeValue(_value);
|
|
@@ -20802,11 +20858,11 @@ class AxiosHeaders {
|
|
|
20802
20858
|
}
|
|
20803
20859
|
|
|
20804
20860
|
const setHeaders = (headers, _rewrite) =>
|
|
20805
|
-
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
20861
|
+
utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
20806
20862
|
|
|
20807
|
-
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
20863
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
20808
20864
|
setHeaders(header, valueOrRewrite);
|
|
20809
|
-
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
20865
|
+
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
20810
20866
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
20811
20867
|
} else {
|
|
20812
20868
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
@@ -20819,7 +20875,7 @@ class AxiosHeaders {
|
|
|
20819
20875
|
header = normalizeHeader(header);
|
|
20820
20876
|
|
|
20821
20877
|
if (header) {
|
|
20822
|
-
const key = utils.findKey(this, header);
|
|
20878
|
+
const key = utils$1.findKey(this, header);
|
|
20823
20879
|
|
|
20824
20880
|
if (key) {
|
|
20825
20881
|
const value = this[key];
|
|
@@ -20832,11 +20888,11 @@ class AxiosHeaders {
|
|
|
20832
20888
|
return parseTokens(value);
|
|
20833
20889
|
}
|
|
20834
20890
|
|
|
20835
|
-
if (utils.isFunction(parser)) {
|
|
20891
|
+
if (utils$1.isFunction(parser)) {
|
|
20836
20892
|
return parser.call(this, value, key);
|
|
20837
20893
|
}
|
|
20838
20894
|
|
|
20839
|
-
if (utils.isRegExp(parser)) {
|
|
20895
|
+
if (utils$1.isRegExp(parser)) {
|
|
20840
20896
|
return parser.exec(value);
|
|
20841
20897
|
}
|
|
20842
20898
|
|
|
@@ -20849,7 +20905,7 @@ class AxiosHeaders {
|
|
|
20849
20905
|
header = normalizeHeader(header);
|
|
20850
20906
|
|
|
20851
20907
|
if (header) {
|
|
20852
|
-
const key = utils.findKey(this, header);
|
|
20908
|
+
const key = utils$1.findKey(this, header);
|
|
20853
20909
|
|
|
20854
20910
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
20855
20911
|
}
|
|
@@ -20865,7 +20921,7 @@ class AxiosHeaders {
|
|
|
20865
20921
|
_header = normalizeHeader(_header);
|
|
20866
20922
|
|
|
20867
20923
|
if (_header) {
|
|
20868
|
-
const key = utils.findKey(self, _header);
|
|
20924
|
+
const key = utils$1.findKey(self, _header);
|
|
20869
20925
|
|
|
20870
20926
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
20871
20927
|
delete self[key];
|
|
@@ -20875,7 +20931,7 @@ class AxiosHeaders {
|
|
|
20875
20931
|
}
|
|
20876
20932
|
}
|
|
20877
20933
|
|
|
20878
|
-
if (utils.isArray(header)) {
|
|
20934
|
+
if (utils$1.isArray(header)) {
|
|
20879
20935
|
header.forEach(deleteHeader);
|
|
20880
20936
|
} else {
|
|
20881
20937
|
deleteHeader(header);
|
|
@@ -20904,8 +20960,8 @@ class AxiosHeaders {
|
|
|
20904
20960
|
const self = this;
|
|
20905
20961
|
const headers = {};
|
|
20906
20962
|
|
|
20907
|
-
utils.forEach(this, (value, header) => {
|
|
20908
|
-
const key = utils.findKey(headers, header);
|
|
20963
|
+
utils$1.forEach(this, (value, header) => {
|
|
20964
|
+
const key = utils$1.findKey(headers, header);
|
|
20909
20965
|
|
|
20910
20966
|
if (key) {
|
|
20911
20967
|
self[key] = normalizeValue(value);
|
|
@@ -20934,8 +20990,8 @@ class AxiosHeaders {
|
|
|
20934
20990
|
toJSON(asStrings) {
|
|
20935
20991
|
const obj = Object.create(null);
|
|
20936
20992
|
|
|
20937
|
-
utils.forEach(this, (value, header) => {
|
|
20938
|
-
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
20993
|
+
utils$1.forEach(this, (value, header) => {
|
|
20994
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
|
20939
20995
|
});
|
|
20940
20996
|
|
|
20941
20997
|
return obj;
|
|
@@ -20982,7 +21038,7 @@ class AxiosHeaders {
|
|
|
20982
21038
|
}
|
|
20983
21039
|
}
|
|
20984
21040
|
|
|
20985
|
-
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
21041
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
20986
21042
|
|
|
20987
21043
|
return this;
|
|
20988
21044
|
}
|
|
@@ -20991,7 +21047,7 @@ class AxiosHeaders {
|
|
|
20991
21047
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
20992
21048
|
|
|
20993
21049
|
// reserved names hotfix
|
|
20994
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
21050
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
20995
21051
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
20996
21052
|
return {
|
|
20997
21053
|
get: () => value,
|
|
@@ -21001,7 +21057,7 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
|
21001
21057
|
}
|
|
21002
21058
|
});
|
|
21003
21059
|
|
|
21004
|
-
utils.freezeMethods(AxiosHeaders);
|
|
21060
|
+
utils$1.freezeMethods(AxiosHeaders);
|
|
21005
21061
|
|
|
21006
21062
|
var AxiosHeaders$1 = AxiosHeaders;
|
|
21007
21063
|
|
|
@@ -21019,7 +21075,7 @@ function transformData(fns, response) {
|
|
|
21019
21075
|
const headers = AxiosHeaders$1.from(context.headers);
|
|
21020
21076
|
let data = context.data;
|
|
21021
21077
|
|
|
21022
|
-
utils.forEach(fns, function transform(fn) {
|
|
21078
|
+
utils$1.forEach(fns, function transform(fn) {
|
|
21023
21079
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
21024
21080
|
});
|
|
21025
21081
|
|
|
@@ -21047,7 +21103,7 @@ function CanceledError(message, config, request) {
|
|
|
21047
21103
|
this.name = 'CanceledError';
|
|
21048
21104
|
}
|
|
21049
21105
|
|
|
21050
|
-
utils.inherits(CanceledError, AxiosError, {
|
|
21106
|
+
utils$1.inherits(CanceledError, AxiosError, {
|
|
21051
21107
|
__CANCEL__: true
|
|
21052
21108
|
});
|
|
21053
21109
|
|
|
@@ -21712,7 +21768,344 @@ var require$$4 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_assert);
|
|
|
21712
21768
|
|
|
21713
21769
|
var src = {exports: {}};
|
|
21714
21770
|
|
|
21715
|
-
var
|
|
21771
|
+
var node = {exports: {}};
|
|
21772
|
+
|
|
21773
|
+
// MIT lisence
|
|
21774
|
+
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
21775
|
+
|
|
21776
|
+
function isatty() {
|
|
21777
|
+
return false;
|
|
21778
|
+
}
|
|
21779
|
+
|
|
21780
|
+
function ReadStream() {
|
|
21781
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
21782
|
+
}
|
|
21783
|
+
|
|
21784
|
+
function WriteStream() {
|
|
21785
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
21786
|
+
}
|
|
21787
|
+
|
|
21788
|
+
var _polyfillNode_tty = {
|
|
21789
|
+
isatty: isatty,
|
|
21790
|
+
ReadStream: ReadStream,
|
|
21791
|
+
WriteStream: WriteStream
|
|
21792
|
+
};
|
|
21793
|
+
|
|
21794
|
+
var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({
|
|
21795
|
+
__proto__: null,
|
|
21796
|
+
ReadStream: ReadStream,
|
|
21797
|
+
WriteStream: WriteStream,
|
|
21798
|
+
default: _polyfillNode_tty,
|
|
21799
|
+
isatty: isatty
|
|
21800
|
+
});
|
|
21801
|
+
|
|
21802
|
+
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_tty$1);
|
|
21803
|
+
|
|
21804
|
+
/*
|
|
21805
|
+
The MIT License (MIT)
|
|
21806
|
+
|
|
21807
|
+
Copyright (c) 2016 CoderPuppy
|
|
21808
|
+
|
|
21809
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21810
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
21811
|
+
in the Software without restriction, including without limitation the rights
|
|
21812
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21813
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21814
|
+
furnished to do so, subject to the following conditions:
|
|
21815
|
+
|
|
21816
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21817
|
+
copies or substantial portions of the Software.
|
|
21818
|
+
|
|
21819
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21820
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21821
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21822
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21823
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21824
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21825
|
+
SOFTWARE.
|
|
21826
|
+
|
|
21827
|
+
*/
|
|
21828
|
+
var _endianness;
|
|
21829
|
+
function endianness() {
|
|
21830
|
+
if (typeof _endianness === 'undefined') {
|
|
21831
|
+
var a = new ArrayBuffer(2);
|
|
21832
|
+
var b = new Uint8Array(a);
|
|
21833
|
+
var c = new Uint16Array(a);
|
|
21834
|
+
b[0] = 1;
|
|
21835
|
+
b[1] = 2;
|
|
21836
|
+
if (c[0] === 258) {
|
|
21837
|
+
_endianness = 'BE';
|
|
21838
|
+
} else if (c[0] === 513){
|
|
21839
|
+
_endianness = 'LE';
|
|
21840
|
+
} else {
|
|
21841
|
+
throw new Error('unable to figure out endianess');
|
|
21842
|
+
}
|
|
21843
|
+
}
|
|
21844
|
+
return _endianness;
|
|
21845
|
+
}
|
|
21846
|
+
|
|
21847
|
+
function hostname() {
|
|
21848
|
+
if (typeof global$1.location !== 'undefined') {
|
|
21849
|
+
return global$1.location.hostname
|
|
21850
|
+
} else return '';
|
|
21851
|
+
}
|
|
21852
|
+
|
|
21853
|
+
function loadavg() {
|
|
21854
|
+
return [];
|
|
21855
|
+
}
|
|
21856
|
+
|
|
21857
|
+
function uptime() {
|
|
21858
|
+
return 0;
|
|
21859
|
+
}
|
|
21860
|
+
|
|
21861
|
+
function freemem() {
|
|
21862
|
+
return Number.MAX_VALUE;
|
|
21863
|
+
}
|
|
21864
|
+
|
|
21865
|
+
function totalmem() {
|
|
21866
|
+
return Number.MAX_VALUE;
|
|
21867
|
+
}
|
|
21868
|
+
|
|
21869
|
+
function cpus() {
|
|
21870
|
+
return [];
|
|
21871
|
+
}
|
|
21872
|
+
|
|
21873
|
+
function type() {
|
|
21874
|
+
return 'Browser';
|
|
21875
|
+
}
|
|
21876
|
+
|
|
21877
|
+
function release () {
|
|
21878
|
+
if (typeof global$1.navigator !== 'undefined') {
|
|
21879
|
+
return global$1.navigator.appVersion;
|
|
21880
|
+
}
|
|
21881
|
+
return '';
|
|
21882
|
+
}
|
|
21883
|
+
|
|
21884
|
+
function networkInterfaces () {
|
|
21885
|
+
return {};
|
|
21886
|
+
}
|
|
21887
|
+
|
|
21888
|
+
function getNetworkInterfaces () {
|
|
21889
|
+
return {};
|
|
21890
|
+
}
|
|
21891
|
+
|
|
21892
|
+
function arch() {
|
|
21893
|
+
return 'javascript';
|
|
21894
|
+
}
|
|
21895
|
+
|
|
21896
|
+
function platform() {
|
|
21897
|
+
return 'browser';
|
|
21898
|
+
}
|
|
21899
|
+
|
|
21900
|
+
function tmpDir() {
|
|
21901
|
+
return '/tmp';
|
|
21902
|
+
}
|
|
21903
|
+
var tmpdir = tmpDir;
|
|
21904
|
+
|
|
21905
|
+
var EOL = '\n';
|
|
21906
|
+
|
|
21907
|
+
function homedir(){
|
|
21908
|
+
return '$HOME'
|
|
21909
|
+
}
|
|
21910
|
+
|
|
21911
|
+
var _polyfillNode_os = {
|
|
21912
|
+
homedir: homedir,
|
|
21913
|
+
EOL: EOL,
|
|
21914
|
+
arch: arch,
|
|
21915
|
+
platform: platform,
|
|
21916
|
+
tmpdir: tmpdir,
|
|
21917
|
+
tmpDir: tmpDir,
|
|
21918
|
+
networkInterfaces:networkInterfaces,
|
|
21919
|
+
getNetworkInterfaces: getNetworkInterfaces,
|
|
21920
|
+
release: release,
|
|
21921
|
+
type: type,
|
|
21922
|
+
cpus: cpus,
|
|
21923
|
+
totalmem: totalmem,
|
|
21924
|
+
freemem: freemem,
|
|
21925
|
+
uptime: uptime,
|
|
21926
|
+
loadavg: loadavg,
|
|
21927
|
+
hostname: hostname,
|
|
21928
|
+
endianness: endianness,
|
|
21929
|
+
};
|
|
21930
|
+
|
|
21931
|
+
var _polyfillNode_os$1 = /*#__PURE__*/Object.freeze({
|
|
21932
|
+
__proto__: null,
|
|
21933
|
+
EOL: EOL,
|
|
21934
|
+
arch: arch,
|
|
21935
|
+
cpus: cpus,
|
|
21936
|
+
default: _polyfillNode_os,
|
|
21937
|
+
endianness: endianness,
|
|
21938
|
+
freemem: freemem,
|
|
21939
|
+
getNetworkInterfaces: getNetworkInterfaces,
|
|
21940
|
+
homedir: homedir,
|
|
21941
|
+
hostname: hostname,
|
|
21942
|
+
loadavg: loadavg,
|
|
21943
|
+
networkInterfaces: networkInterfaces,
|
|
21944
|
+
platform: platform,
|
|
21945
|
+
release: release,
|
|
21946
|
+
tmpDir: tmpDir,
|
|
21947
|
+
tmpdir: tmpdir,
|
|
21948
|
+
totalmem: totalmem,
|
|
21949
|
+
type: type,
|
|
21950
|
+
uptime: uptime
|
|
21951
|
+
});
|
|
21952
|
+
|
|
21953
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_os$1);
|
|
21954
|
+
|
|
21955
|
+
var hasFlag;
|
|
21956
|
+
var hasRequiredHasFlag;
|
|
21957
|
+
|
|
21958
|
+
function requireHasFlag () {
|
|
21959
|
+
if (hasRequiredHasFlag) return hasFlag;
|
|
21960
|
+
hasRequiredHasFlag = 1;
|
|
21961
|
+
hasFlag = (flag, argv) => {
|
|
21962
|
+
argv = argv || process.argv;
|
|
21963
|
+
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
21964
|
+
const pos = argv.indexOf(prefix + flag);
|
|
21965
|
+
const terminatorPos = argv.indexOf('--');
|
|
21966
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
21967
|
+
};
|
|
21968
|
+
return hasFlag;
|
|
21969
|
+
}
|
|
21970
|
+
|
|
21971
|
+
var supportsColor_1;
|
|
21972
|
+
var hasRequiredSupportsColor;
|
|
21973
|
+
|
|
21974
|
+
function requireSupportsColor () {
|
|
21975
|
+
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
21976
|
+
hasRequiredSupportsColor = 1;
|
|
21977
|
+
const os = require$$0;
|
|
21978
|
+
const hasFlag = requireHasFlag();
|
|
21979
|
+
|
|
21980
|
+
const env = process.env;
|
|
21981
|
+
|
|
21982
|
+
let forceColor;
|
|
21983
|
+
if (hasFlag('no-color') ||
|
|
21984
|
+
hasFlag('no-colors') ||
|
|
21985
|
+
hasFlag('color=false')) {
|
|
21986
|
+
forceColor = false;
|
|
21987
|
+
} else if (hasFlag('color') ||
|
|
21988
|
+
hasFlag('colors') ||
|
|
21989
|
+
hasFlag('color=true') ||
|
|
21990
|
+
hasFlag('color=always')) {
|
|
21991
|
+
forceColor = true;
|
|
21992
|
+
}
|
|
21993
|
+
if ('FORCE_COLOR' in env) {
|
|
21994
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
21995
|
+
}
|
|
21996
|
+
|
|
21997
|
+
function translateLevel(level) {
|
|
21998
|
+
if (level === 0) {
|
|
21999
|
+
return false;
|
|
22000
|
+
}
|
|
22001
|
+
|
|
22002
|
+
return {
|
|
22003
|
+
level,
|
|
22004
|
+
hasBasic: true,
|
|
22005
|
+
has256: level >= 2,
|
|
22006
|
+
has16m: level >= 3
|
|
22007
|
+
};
|
|
22008
|
+
}
|
|
22009
|
+
|
|
22010
|
+
function supportsColor(stream) {
|
|
22011
|
+
if (forceColor === false) {
|
|
22012
|
+
return 0;
|
|
22013
|
+
}
|
|
22014
|
+
|
|
22015
|
+
if (hasFlag('color=16m') ||
|
|
22016
|
+
hasFlag('color=full') ||
|
|
22017
|
+
hasFlag('color=truecolor')) {
|
|
22018
|
+
return 3;
|
|
22019
|
+
}
|
|
22020
|
+
|
|
22021
|
+
if (hasFlag('color=256')) {
|
|
22022
|
+
return 2;
|
|
22023
|
+
}
|
|
22024
|
+
|
|
22025
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
22026
|
+
return 0;
|
|
22027
|
+
}
|
|
22028
|
+
|
|
22029
|
+
const min = forceColor ? 1 : 0;
|
|
22030
|
+
|
|
22031
|
+
if (process.platform === 'win32') {
|
|
22032
|
+
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
22033
|
+
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
22034
|
+
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
22035
|
+
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
22036
|
+
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
22037
|
+
// that supports 16m/TrueColor.
|
|
22038
|
+
const osRelease = os.release().split('.');
|
|
22039
|
+
if (
|
|
22040
|
+
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
22041
|
+
Number(osRelease[0]) >= 10 &&
|
|
22042
|
+
Number(osRelease[2]) >= 10586
|
|
22043
|
+
) {
|
|
22044
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
22045
|
+
}
|
|
22046
|
+
|
|
22047
|
+
return 1;
|
|
22048
|
+
}
|
|
22049
|
+
|
|
22050
|
+
if ('CI' in env) {
|
|
22051
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
22052
|
+
return 1;
|
|
22053
|
+
}
|
|
22054
|
+
|
|
22055
|
+
return min;
|
|
22056
|
+
}
|
|
22057
|
+
|
|
22058
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
22059
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
22060
|
+
}
|
|
22061
|
+
|
|
22062
|
+
if (env.COLORTERM === 'truecolor') {
|
|
22063
|
+
return 3;
|
|
22064
|
+
}
|
|
22065
|
+
|
|
22066
|
+
if ('TERM_PROGRAM' in env) {
|
|
22067
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
22068
|
+
|
|
22069
|
+
switch (env.TERM_PROGRAM) {
|
|
22070
|
+
case 'iTerm.app':
|
|
22071
|
+
return version >= 3 ? 3 : 2;
|
|
22072
|
+
case 'Apple_Terminal':
|
|
22073
|
+
return 2;
|
|
22074
|
+
// No default
|
|
22075
|
+
}
|
|
22076
|
+
}
|
|
22077
|
+
|
|
22078
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
22079
|
+
return 2;
|
|
22080
|
+
}
|
|
22081
|
+
|
|
22082
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
22083
|
+
return 1;
|
|
22084
|
+
}
|
|
22085
|
+
|
|
22086
|
+
if ('COLORTERM' in env) {
|
|
22087
|
+
return 1;
|
|
22088
|
+
}
|
|
22089
|
+
|
|
22090
|
+
if (env.TERM === 'dumb') {
|
|
22091
|
+
return min;
|
|
22092
|
+
}
|
|
22093
|
+
|
|
22094
|
+
return min;
|
|
22095
|
+
}
|
|
22096
|
+
|
|
22097
|
+
function getSupportLevel(stream) {
|
|
22098
|
+
const level = supportsColor(stream);
|
|
22099
|
+
return translateLevel(level);
|
|
22100
|
+
}
|
|
22101
|
+
|
|
22102
|
+
supportsColor_1 = {
|
|
22103
|
+
supportsColor: getSupportLevel,
|
|
22104
|
+
stdout: getSupportLevel(process.stdout),
|
|
22105
|
+
stderr: getSupportLevel(process.stderr)
|
|
22106
|
+
};
|
|
22107
|
+
return supportsColor_1;
|
|
22108
|
+
}
|
|
21716
22109
|
|
|
21717
22110
|
/**
|
|
21718
22111
|
* Helpers.
|
|
@@ -22167,624 +22560,6 @@ function requireCommon () {
|
|
|
22167
22560
|
return common;
|
|
22168
22561
|
}
|
|
22169
22562
|
|
|
22170
|
-
/* eslint-env browser */
|
|
22171
|
-
|
|
22172
|
-
var hasRequiredBrowser;
|
|
22173
|
-
|
|
22174
|
-
function requireBrowser () {
|
|
22175
|
-
if (hasRequiredBrowser) return browser.exports;
|
|
22176
|
-
hasRequiredBrowser = 1;
|
|
22177
|
-
(function (module, exports) {
|
|
22178
|
-
/**
|
|
22179
|
-
* This is the web browser implementation of `debug()`.
|
|
22180
|
-
*/
|
|
22181
|
-
|
|
22182
|
-
exports.formatArgs = formatArgs;
|
|
22183
|
-
exports.save = save;
|
|
22184
|
-
exports.load = load;
|
|
22185
|
-
exports.useColors = useColors;
|
|
22186
|
-
exports.storage = localstorage();
|
|
22187
|
-
exports.destroy = (() => {
|
|
22188
|
-
let warned = false;
|
|
22189
|
-
|
|
22190
|
-
return () => {
|
|
22191
|
-
if (!warned) {
|
|
22192
|
-
warned = true;
|
|
22193
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22194
|
-
}
|
|
22195
|
-
};
|
|
22196
|
-
})();
|
|
22197
|
-
|
|
22198
|
-
/**
|
|
22199
|
-
* Colors.
|
|
22200
|
-
*/
|
|
22201
|
-
|
|
22202
|
-
exports.colors = [
|
|
22203
|
-
'#0000CC',
|
|
22204
|
-
'#0000FF',
|
|
22205
|
-
'#0033CC',
|
|
22206
|
-
'#0033FF',
|
|
22207
|
-
'#0066CC',
|
|
22208
|
-
'#0066FF',
|
|
22209
|
-
'#0099CC',
|
|
22210
|
-
'#0099FF',
|
|
22211
|
-
'#00CC00',
|
|
22212
|
-
'#00CC33',
|
|
22213
|
-
'#00CC66',
|
|
22214
|
-
'#00CC99',
|
|
22215
|
-
'#00CCCC',
|
|
22216
|
-
'#00CCFF',
|
|
22217
|
-
'#3300CC',
|
|
22218
|
-
'#3300FF',
|
|
22219
|
-
'#3333CC',
|
|
22220
|
-
'#3333FF',
|
|
22221
|
-
'#3366CC',
|
|
22222
|
-
'#3366FF',
|
|
22223
|
-
'#3399CC',
|
|
22224
|
-
'#3399FF',
|
|
22225
|
-
'#33CC00',
|
|
22226
|
-
'#33CC33',
|
|
22227
|
-
'#33CC66',
|
|
22228
|
-
'#33CC99',
|
|
22229
|
-
'#33CCCC',
|
|
22230
|
-
'#33CCFF',
|
|
22231
|
-
'#6600CC',
|
|
22232
|
-
'#6600FF',
|
|
22233
|
-
'#6633CC',
|
|
22234
|
-
'#6633FF',
|
|
22235
|
-
'#66CC00',
|
|
22236
|
-
'#66CC33',
|
|
22237
|
-
'#9900CC',
|
|
22238
|
-
'#9900FF',
|
|
22239
|
-
'#9933CC',
|
|
22240
|
-
'#9933FF',
|
|
22241
|
-
'#99CC00',
|
|
22242
|
-
'#99CC33',
|
|
22243
|
-
'#CC0000',
|
|
22244
|
-
'#CC0033',
|
|
22245
|
-
'#CC0066',
|
|
22246
|
-
'#CC0099',
|
|
22247
|
-
'#CC00CC',
|
|
22248
|
-
'#CC00FF',
|
|
22249
|
-
'#CC3300',
|
|
22250
|
-
'#CC3333',
|
|
22251
|
-
'#CC3366',
|
|
22252
|
-
'#CC3399',
|
|
22253
|
-
'#CC33CC',
|
|
22254
|
-
'#CC33FF',
|
|
22255
|
-
'#CC6600',
|
|
22256
|
-
'#CC6633',
|
|
22257
|
-
'#CC9900',
|
|
22258
|
-
'#CC9933',
|
|
22259
|
-
'#CCCC00',
|
|
22260
|
-
'#CCCC33',
|
|
22261
|
-
'#FF0000',
|
|
22262
|
-
'#FF0033',
|
|
22263
|
-
'#FF0066',
|
|
22264
|
-
'#FF0099',
|
|
22265
|
-
'#FF00CC',
|
|
22266
|
-
'#FF00FF',
|
|
22267
|
-
'#FF3300',
|
|
22268
|
-
'#FF3333',
|
|
22269
|
-
'#FF3366',
|
|
22270
|
-
'#FF3399',
|
|
22271
|
-
'#FF33CC',
|
|
22272
|
-
'#FF33FF',
|
|
22273
|
-
'#FF6600',
|
|
22274
|
-
'#FF6633',
|
|
22275
|
-
'#FF9900',
|
|
22276
|
-
'#FF9933',
|
|
22277
|
-
'#FFCC00',
|
|
22278
|
-
'#FFCC33'
|
|
22279
|
-
];
|
|
22280
|
-
|
|
22281
|
-
/**
|
|
22282
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
22283
|
-
* and the Firebug extension (any Firefox version) are known
|
|
22284
|
-
* to support "%c" CSS customizations.
|
|
22285
|
-
*
|
|
22286
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
22287
|
-
*/
|
|
22288
|
-
|
|
22289
|
-
// eslint-disable-next-line complexity
|
|
22290
|
-
function useColors() {
|
|
22291
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
|
22292
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
22293
|
-
// explicitly
|
|
22294
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
22295
|
-
return true;
|
|
22296
|
-
}
|
|
22297
|
-
|
|
22298
|
-
// Internet Explorer and Edge do not support colors.
|
|
22299
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
22300
|
-
return false;
|
|
22301
|
-
}
|
|
22302
|
-
|
|
22303
|
-
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
22304
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
22305
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
22306
|
-
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
22307
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
22308
|
-
// Is firefox >= v31?
|
|
22309
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
22310
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
22311
|
-
// Double check webkit in userAgent just in case we are in a worker
|
|
22312
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
22313
|
-
}
|
|
22314
|
-
|
|
22315
|
-
/**
|
|
22316
|
-
* Colorize log arguments if enabled.
|
|
22317
|
-
*
|
|
22318
|
-
* @api public
|
|
22319
|
-
*/
|
|
22320
|
-
|
|
22321
|
-
function formatArgs(args) {
|
|
22322
|
-
args[0] = (this.useColors ? '%c' : '') +
|
|
22323
|
-
this.namespace +
|
|
22324
|
-
(this.useColors ? ' %c' : ' ') +
|
|
22325
|
-
args[0] +
|
|
22326
|
-
(this.useColors ? '%c ' : ' ') +
|
|
22327
|
-
'+' + module.exports.humanize(this.diff);
|
|
22328
|
-
|
|
22329
|
-
if (!this.useColors) {
|
|
22330
|
-
return;
|
|
22331
|
-
}
|
|
22332
|
-
|
|
22333
|
-
const c = 'color: ' + this.color;
|
|
22334
|
-
args.splice(1, 0, c, 'color: inherit');
|
|
22335
|
-
|
|
22336
|
-
// The final "%c" is somewhat tricky, because there could be other
|
|
22337
|
-
// arguments passed either before or after the %c, so we need to
|
|
22338
|
-
// figure out the correct index to insert the CSS into
|
|
22339
|
-
let index = 0;
|
|
22340
|
-
let lastC = 0;
|
|
22341
|
-
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
22342
|
-
if (match === '%%') {
|
|
22343
|
-
return;
|
|
22344
|
-
}
|
|
22345
|
-
index++;
|
|
22346
|
-
if (match === '%c') {
|
|
22347
|
-
// We only are interested in the *last* %c
|
|
22348
|
-
// (the user may have provided their own)
|
|
22349
|
-
lastC = index;
|
|
22350
|
-
}
|
|
22351
|
-
});
|
|
22352
|
-
|
|
22353
|
-
args.splice(lastC, 0, c);
|
|
22354
|
-
}
|
|
22355
|
-
|
|
22356
|
-
/**
|
|
22357
|
-
* Invokes `console.debug()` when available.
|
|
22358
|
-
* No-op when `console.debug` is not a "function".
|
|
22359
|
-
* If `console.debug` is not available, falls back
|
|
22360
|
-
* to `console.log`.
|
|
22361
|
-
*
|
|
22362
|
-
* @api public
|
|
22363
|
-
*/
|
|
22364
|
-
exports.log = console.debug || console.log || (() => {});
|
|
22365
|
-
|
|
22366
|
-
/**
|
|
22367
|
-
* Save `namespaces`.
|
|
22368
|
-
*
|
|
22369
|
-
* @param {String} namespaces
|
|
22370
|
-
* @api private
|
|
22371
|
-
*/
|
|
22372
|
-
function save(namespaces) {
|
|
22373
|
-
try {
|
|
22374
|
-
if (namespaces) {
|
|
22375
|
-
exports.storage.setItem('debug', namespaces);
|
|
22376
|
-
} else {
|
|
22377
|
-
exports.storage.removeItem('debug');
|
|
22378
|
-
}
|
|
22379
|
-
} catch (error) {
|
|
22380
|
-
// Swallow
|
|
22381
|
-
// XXX (@Qix-) should we be logging these?
|
|
22382
|
-
}
|
|
22383
|
-
}
|
|
22384
|
-
|
|
22385
|
-
/**
|
|
22386
|
-
* Load `namespaces`.
|
|
22387
|
-
*
|
|
22388
|
-
* @return {String} returns the previously persisted debug modes
|
|
22389
|
-
* @api private
|
|
22390
|
-
*/
|
|
22391
|
-
function load() {
|
|
22392
|
-
let r;
|
|
22393
|
-
try {
|
|
22394
|
-
r = exports.storage.getItem('debug');
|
|
22395
|
-
} catch (error) {
|
|
22396
|
-
// Swallow
|
|
22397
|
-
// XXX (@Qix-) should we be logging these?
|
|
22398
|
-
}
|
|
22399
|
-
|
|
22400
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
22401
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
22402
|
-
r = process.env.DEBUG;
|
|
22403
|
-
}
|
|
22404
|
-
|
|
22405
|
-
return r;
|
|
22406
|
-
}
|
|
22407
|
-
|
|
22408
|
-
/**
|
|
22409
|
-
* Localstorage attempts to return the localstorage.
|
|
22410
|
-
*
|
|
22411
|
-
* This is necessary because safari throws
|
|
22412
|
-
* when a user disables cookies/localstorage
|
|
22413
|
-
* and you attempt to access it.
|
|
22414
|
-
*
|
|
22415
|
-
* @return {LocalStorage}
|
|
22416
|
-
* @api private
|
|
22417
|
-
*/
|
|
22418
|
-
|
|
22419
|
-
function localstorage() {
|
|
22420
|
-
try {
|
|
22421
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
22422
|
-
// The Browser also has localStorage in the global context.
|
|
22423
|
-
return localStorage;
|
|
22424
|
-
} catch (error) {
|
|
22425
|
-
// Swallow
|
|
22426
|
-
// XXX (@Qix-) should we be logging these?
|
|
22427
|
-
}
|
|
22428
|
-
}
|
|
22429
|
-
|
|
22430
|
-
module.exports = requireCommon()(exports);
|
|
22431
|
-
|
|
22432
|
-
const {formatters} = module.exports;
|
|
22433
|
-
|
|
22434
|
-
/**
|
|
22435
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
22436
|
-
*/
|
|
22437
|
-
|
|
22438
|
-
formatters.j = function (v) {
|
|
22439
|
-
try {
|
|
22440
|
-
return JSON.stringify(v);
|
|
22441
|
-
} catch (error) {
|
|
22442
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
22443
|
-
}
|
|
22444
|
-
};
|
|
22445
|
-
} (browser, browser.exports));
|
|
22446
|
-
return browser.exports;
|
|
22447
|
-
}
|
|
22448
|
-
|
|
22449
|
-
var node = {exports: {}};
|
|
22450
|
-
|
|
22451
|
-
// MIT lisence
|
|
22452
|
-
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
22453
|
-
|
|
22454
|
-
function isatty() {
|
|
22455
|
-
return false;
|
|
22456
|
-
}
|
|
22457
|
-
|
|
22458
|
-
function ReadStream() {
|
|
22459
|
-
throw new Error('tty.ReadStream is not implemented');
|
|
22460
|
-
}
|
|
22461
|
-
|
|
22462
|
-
function WriteStream() {
|
|
22463
|
-
throw new Error('tty.ReadStream is not implemented');
|
|
22464
|
-
}
|
|
22465
|
-
|
|
22466
|
-
var _polyfillNode_tty = {
|
|
22467
|
-
isatty: isatty,
|
|
22468
|
-
ReadStream: ReadStream,
|
|
22469
|
-
WriteStream: WriteStream
|
|
22470
|
-
};
|
|
22471
|
-
|
|
22472
|
-
var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({
|
|
22473
|
-
__proto__: null,
|
|
22474
|
-
ReadStream: ReadStream,
|
|
22475
|
-
WriteStream: WriteStream,
|
|
22476
|
-
default: _polyfillNode_tty,
|
|
22477
|
-
isatty: isatty
|
|
22478
|
-
});
|
|
22479
|
-
|
|
22480
|
-
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_tty$1);
|
|
22481
|
-
|
|
22482
|
-
/*
|
|
22483
|
-
The MIT License (MIT)
|
|
22484
|
-
|
|
22485
|
-
Copyright (c) 2016 CoderPuppy
|
|
22486
|
-
|
|
22487
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22488
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
22489
|
-
in the Software without restriction, including without limitation the rights
|
|
22490
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22491
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
22492
|
-
furnished to do so, subject to the following conditions:
|
|
22493
|
-
|
|
22494
|
-
The above copyright notice and this permission notice shall be included in all
|
|
22495
|
-
copies or substantial portions of the Software.
|
|
22496
|
-
|
|
22497
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22498
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22499
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22500
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22501
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22502
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22503
|
-
SOFTWARE.
|
|
22504
|
-
|
|
22505
|
-
*/
|
|
22506
|
-
var _endianness;
|
|
22507
|
-
function endianness() {
|
|
22508
|
-
if (typeof _endianness === 'undefined') {
|
|
22509
|
-
var a = new ArrayBuffer(2);
|
|
22510
|
-
var b = new Uint8Array(a);
|
|
22511
|
-
var c = new Uint16Array(a);
|
|
22512
|
-
b[0] = 1;
|
|
22513
|
-
b[1] = 2;
|
|
22514
|
-
if (c[0] === 258) {
|
|
22515
|
-
_endianness = 'BE';
|
|
22516
|
-
} else if (c[0] === 513){
|
|
22517
|
-
_endianness = 'LE';
|
|
22518
|
-
} else {
|
|
22519
|
-
throw new Error('unable to figure out endianess');
|
|
22520
|
-
}
|
|
22521
|
-
}
|
|
22522
|
-
return _endianness;
|
|
22523
|
-
}
|
|
22524
|
-
|
|
22525
|
-
function hostname() {
|
|
22526
|
-
if (typeof global$1.location !== 'undefined') {
|
|
22527
|
-
return global$1.location.hostname
|
|
22528
|
-
} else return '';
|
|
22529
|
-
}
|
|
22530
|
-
|
|
22531
|
-
function loadavg() {
|
|
22532
|
-
return [];
|
|
22533
|
-
}
|
|
22534
|
-
|
|
22535
|
-
function uptime() {
|
|
22536
|
-
return 0;
|
|
22537
|
-
}
|
|
22538
|
-
|
|
22539
|
-
function freemem() {
|
|
22540
|
-
return Number.MAX_VALUE;
|
|
22541
|
-
}
|
|
22542
|
-
|
|
22543
|
-
function totalmem() {
|
|
22544
|
-
return Number.MAX_VALUE;
|
|
22545
|
-
}
|
|
22546
|
-
|
|
22547
|
-
function cpus() {
|
|
22548
|
-
return [];
|
|
22549
|
-
}
|
|
22550
|
-
|
|
22551
|
-
function type() {
|
|
22552
|
-
return 'Browser';
|
|
22553
|
-
}
|
|
22554
|
-
|
|
22555
|
-
function release () {
|
|
22556
|
-
if (typeof global$1.navigator !== 'undefined') {
|
|
22557
|
-
return global$1.navigator.appVersion;
|
|
22558
|
-
}
|
|
22559
|
-
return '';
|
|
22560
|
-
}
|
|
22561
|
-
|
|
22562
|
-
function networkInterfaces () {
|
|
22563
|
-
return {};
|
|
22564
|
-
}
|
|
22565
|
-
|
|
22566
|
-
function getNetworkInterfaces () {
|
|
22567
|
-
return {};
|
|
22568
|
-
}
|
|
22569
|
-
|
|
22570
|
-
function arch() {
|
|
22571
|
-
return 'javascript';
|
|
22572
|
-
}
|
|
22573
|
-
|
|
22574
|
-
function platform() {
|
|
22575
|
-
return 'browser';
|
|
22576
|
-
}
|
|
22577
|
-
|
|
22578
|
-
function tmpDir() {
|
|
22579
|
-
return '/tmp';
|
|
22580
|
-
}
|
|
22581
|
-
var tmpdir = tmpDir;
|
|
22582
|
-
|
|
22583
|
-
var EOL = '\n';
|
|
22584
|
-
|
|
22585
|
-
function homedir(){
|
|
22586
|
-
return '$HOME'
|
|
22587
|
-
}
|
|
22588
|
-
|
|
22589
|
-
var _polyfillNode_os = {
|
|
22590
|
-
homedir: homedir,
|
|
22591
|
-
EOL: EOL,
|
|
22592
|
-
arch: arch,
|
|
22593
|
-
platform: platform,
|
|
22594
|
-
tmpdir: tmpdir,
|
|
22595
|
-
tmpDir: tmpDir,
|
|
22596
|
-
networkInterfaces:networkInterfaces,
|
|
22597
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
22598
|
-
release: release,
|
|
22599
|
-
type: type,
|
|
22600
|
-
cpus: cpus,
|
|
22601
|
-
totalmem: totalmem,
|
|
22602
|
-
freemem: freemem,
|
|
22603
|
-
uptime: uptime,
|
|
22604
|
-
loadavg: loadavg,
|
|
22605
|
-
hostname: hostname,
|
|
22606
|
-
endianness: endianness,
|
|
22607
|
-
};
|
|
22608
|
-
|
|
22609
|
-
var _polyfillNode_os$1 = /*#__PURE__*/Object.freeze({
|
|
22610
|
-
__proto__: null,
|
|
22611
|
-
EOL: EOL,
|
|
22612
|
-
arch: arch,
|
|
22613
|
-
cpus: cpus,
|
|
22614
|
-
default: _polyfillNode_os,
|
|
22615
|
-
endianness: endianness,
|
|
22616
|
-
freemem: freemem,
|
|
22617
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
22618
|
-
homedir: homedir,
|
|
22619
|
-
hostname: hostname,
|
|
22620
|
-
loadavg: loadavg,
|
|
22621
|
-
networkInterfaces: networkInterfaces,
|
|
22622
|
-
platform: platform,
|
|
22623
|
-
release: release,
|
|
22624
|
-
tmpDir: tmpDir,
|
|
22625
|
-
tmpdir: tmpdir,
|
|
22626
|
-
totalmem: totalmem,
|
|
22627
|
-
type: type,
|
|
22628
|
-
uptime: uptime
|
|
22629
|
-
});
|
|
22630
|
-
|
|
22631
|
-
var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_os$1);
|
|
22632
|
-
|
|
22633
|
-
var hasFlag;
|
|
22634
|
-
var hasRequiredHasFlag;
|
|
22635
|
-
|
|
22636
|
-
function requireHasFlag () {
|
|
22637
|
-
if (hasRequiredHasFlag) return hasFlag;
|
|
22638
|
-
hasRequiredHasFlag = 1;
|
|
22639
|
-
hasFlag = (flag, argv) => {
|
|
22640
|
-
argv = argv || process.argv;
|
|
22641
|
-
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
22642
|
-
const pos = argv.indexOf(prefix + flag);
|
|
22643
|
-
const terminatorPos = argv.indexOf('--');
|
|
22644
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
22645
|
-
};
|
|
22646
|
-
return hasFlag;
|
|
22647
|
-
}
|
|
22648
|
-
|
|
22649
|
-
var supportsColor_1;
|
|
22650
|
-
var hasRequiredSupportsColor;
|
|
22651
|
-
|
|
22652
|
-
function requireSupportsColor () {
|
|
22653
|
-
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
22654
|
-
hasRequiredSupportsColor = 1;
|
|
22655
|
-
const os = require$$0;
|
|
22656
|
-
const hasFlag = requireHasFlag();
|
|
22657
|
-
|
|
22658
|
-
const env = process.env;
|
|
22659
|
-
|
|
22660
|
-
let forceColor;
|
|
22661
|
-
if (hasFlag('no-color') ||
|
|
22662
|
-
hasFlag('no-colors') ||
|
|
22663
|
-
hasFlag('color=false')) {
|
|
22664
|
-
forceColor = false;
|
|
22665
|
-
} else if (hasFlag('color') ||
|
|
22666
|
-
hasFlag('colors') ||
|
|
22667
|
-
hasFlag('color=true') ||
|
|
22668
|
-
hasFlag('color=always')) {
|
|
22669
|
-
forceColor = true;
|
|
22670
|
-
}
|
|
22671
|
-
if ('FORCE_COLOR' in env) {
|
|
22672
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
22673
|
-
}
|
|
22674
|
-
|
|
22675
|
-
function translateLevel(level) {
|
|
22676
|
-
if (level === 0) {
|
|
22677
|
-
return false;
|
|
22678
|
-
}
|
|
22679
|
-
|
|
22680
|
-
return {
|
|
22681
|
-
level,
|
|
22682
|
-
hasBasic: true,
|
|
22683
|
-
has256: level >= 2,
|
|
22684
|
-
has16m: level >= 3
|
|
22685
|
-
};
|
|
22686
|
-
}
|
|
22687
|
-
|
|
22688
|
-
function supportsColor(stream) {
|
|
22689
|
-
if (forceColor === false) {
|
|
22690
|
-
return 0;
|
|
22691
|
-
}
|
|
22692
|
-
|
|
22693
|
-
if (hasFlag('color=16m') ||
|
|
22694
|
-
hasFlag('color=full') ||
|
|
22695
|
-
hasFlag('color=truecolor')) {
|
|
22696
|
-
return 3;
|
|
22697
|
-
}
|
|
22698
|
-
|
|
22699
|
-
if (hasFlag('color=256')) {
|
|
22700
|
-
return 2;
|
|
22701
|
-
}
|
|
22702
|
-
|
|
22703
|
-
if (stream && !stream.isTTY && forceColor !== true) {
|
|
22704
|
-
return 0;
|
|
22705
|
-
}
|
|
22706
|
-
|
|
22707
|
-
const min = forceColor ? 1 : 0;
|
|
22708
|
-
|
|
22709
|
-
if (process.platform === 'win32') {
|
|
22710
|
-
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
22711
|
-
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
22712
|
-
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
22713
|
-
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
22714
|
-
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
22715
|
-
// that supports 16m/TrueColor.
|
|
22716
|
-
const osRelease = os.release().split('.');
|
|
22717
|
-
if (
|
|
22718
|
-
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
22719
|
-
Number(osRelease[0]) >= 10 &&
|
|
22720
|
-
Number(osRelease[2]) >= 10586
|
|
22721
|
-
) {
|
|
22722
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
22723
|
-
}
|
|
22724
|
-
|
|
22725
|
-
return 1;
|
|
22726
|
-
}
|
|
22727
|
-
|
|
22728
|
-
if ('CI' in env) {
|
|
22729
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
22730
|
-
return 1;
|
|
22731
|
-
}
|
|
22732
|
-
|
|
22733
|
-
return min;
|
|
22734
|
-
}
|
|
22735
|
-
|
|
22736
|
-
if ('TEAMCITY_VERSION' in env) {
|
|
22737
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
22738
|
-
}
|
|
22739
|
-
|
|
22740
|
-
if (env.COLORTERM === 'truecolor') {
|
|
22741
|
-
return 3;
|
|
22742
|
-
}
|
|
22743
|
-
|
|
22744
|
-
if ('TERM_PROGRAM' in env) {
|
|
22745
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
22746
|
-
|
|
22747
|
-
switch (env.TERM_PROGRAM) {
|
|
22748
|
-
case 'iTerm.app':
|
|
22749
|
-
return version >= 3 ? 3 : 2;
|
|
22750
|
-
case 'Apple_Terminal':
|
|
22751
|
-
return 2;
|
|
22752
|
-
// No default
|
|
22753
|
-
}
|
|
22754
|
-
}
|
|
22755
|
-
|
|
22756
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
22757
|
-
return 2;
|
|
22758
|
-
}
|
|
22759
|
-
|
|
22760
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
22761
|
-
return 1;
|
|
22762
|
-
}
|
|
22763
|
-
|
|
22764
|
-
if ('COLORTERM' in env) {
|
|
22765
|
-
return 1;
|
|
22766
|
-
}
|
|
22767
|
-
|
|
22768
|
-
if (env.TERM === 'dumb') {
|
|
22769
|
-
return min;
|
|
22770
|
-
}
|
|
22771
|
-
|
|
22772
|
-
return min;
|
|
22773
|
-
}
|
|
22774
|
-
|
|
22775
|
-
function getSupportLevel(stream) {
|
|
22776
|
-
const level = supportsColor(stream);
|
|
22777
|
-
return translateLevel(level);
|
|
22778
|
-
}
|
|
22779
|
-
|
|
22780
|
-
supportsColor_1 = {
|
|
22781
|
-
supportsColor: getSupportLevel,
|
|
22782
|
-
stdout: getSupportLevel(process.stdout),
|
|
22783
|
-
stderr: getSupportLevel(process.stderr)
|
|
22784
|
-
};
|
|
22785
|
-
return supportsColor_1;
|
|
22786
|
-
}
|
|
22787
|
-
|
|
22788
22563
|
/**
|
|
22789
22564
|
* Module dependencies.
|
|
22790
22565
|
*/
|
|
@@ -23058,6 +22833,287 @@ function requireNode () {
|
|
|
23058
22833
|
return node.exports;
|
|
23059
22834
|
}
|
|
23060
22835
|
|
|
22836
|
+
var browser = {exports: {}};
|
|
22837
|
+
|
|
22838
|
+
/* eslint-env browser */
|
|
22839
|
+
|
|
22840
|
+
var hasRequiredBrowser;
|
|
22841
|
+
|
|
22842
|
+
function requireBrowser () {
|
|
22843
|
+
if (hasRequiredBrowser) return browser.exports;
|
|
22844
|
+
hasRequiredBrowser = 1;
|
|
22845
|
+
(function (module, exports) {
|
|
22846
|
+
/**
|
|
22847
|
+
* This is the web browser implementation of `debug()`.
|
|
22848
|
+
*/
|
|
22849
|
+
|
|
22850
|
+
exports.formatArgs = formatArgs;
|
|
22851
|
+
exports.save = save;
|
|
22852
|
+
exports.load = load;
|
|
22853
|
+
exports.useColors = useColors;
|
|
22854
|
+
exports.storage = localstorage();
|
|
22855
|
+
exports.destroy = (() => {
|
|
22856
|
+
let warned = false;
|
|
22857
|
+
|
|
22858
|
+
return () => {
|
|
22859
|
+
if (!warned) {
|
|
22860
|
+
warned = true;
|
|
22861
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22862
|
+
}
|
|
22863
|
+
};
|
|
22864
|
+
})();
|
|
22865
|
+
|
|
22866
|
+
/**
|
|
22867
|
+
* Colors.
|
|
22868
|
+
*/
|
|
22869
|
+
|
|
22870
|
+
exports.colors = [
|
|
22871
|
+
'#0000CC',
|
|
22872
|
+
'#0000FF',
|
|
22873
|
+
'#0033CC',
|
|
22874
|
+
'#0033FF',
|
|
22875
|
+
'#0066CC',
|
|
22876
|
+
'#0066FF',
|
|
22877
|
+
'#0099CC',
|
|
22878
|
+
'#0099FF',
|
|
22879
|
+
'#00CC00',
|
|
22880
|
+
'#00CC33',
|
|
22881
|
+
'#00CC66',
|
|
22882
|
+
'#00CC99',
|
|
22883
|
+
'#00CCCC',
|
|
22884
|
+
'#00CCFF',
|
|
22885
|
+
'#3300CC',
|
|
22886
|
+
'#3300FF',
|
|
22887
|
+
'#3333CC',
|
|
22888
|
+
'#3333FF',
|
|
22889
|
+
'#3366CC',
|
|
22890
|
+
'#3366FF',
|
|
22891
|
+
'#3399CC',
|
|
22892
|
+
'#3399FF',
|
|
22893
|
+
'#33CC00',
|
|
22894
|
+
'#33CC33',
|
|
22895
|
+
'#33CC66',
|
|
22896
|
+
'#33CC99',
|
|
22897
|
+
'#33CCCC',
|
|
22898
|
+
'#33CCFF',
|
|
22899
|
+
'#6600CC',
|
|
22900
|
+
'#6600FF',
|
|
22901
|
+
'#6633CC',
|
|
22902
|
+
'#6633FF',
|
|
22903
|
+
'#66CC00',
|
|
22904
|
+
'#66CC33',
|
|
22905
|
+
'#9900CC',
|
|
22906
|
+
'#9900FF',
|
|
22907
|
+
'#9933CC',
|
|
22908
|
+
'#9933FF',
|
|
22909
|
+
'#99CC00',
|
|
22910
|
+
'#99CC33',
|
|
22911
|
+
'#CC0000',
|
|
22912
|
+
'#CC0033',
|
|
22913
|
+
'#CC0066',
|
|
22914
|
+
'#CC0099',
|
|
22915
|
+
'#CC00CC',
|
|
22916
|
+
'#CC00FF',
|
|
22917
|
+
'#CC3300',
|
|
22918
|
+
'#CC3333',
|
|
22919
|
+
'#CC3366',
|
|
22920
|
+
'#CC3399',
|
|
22921
|
+
'#CC33CC',
|
|
22922
|
+
'#CC33FF',
|
|
22923
|
+
'#CC6600',
|
|
22924
|
+
'#CC6633',
|
|
22925
|
+
'#CC9900',
|
|
22926
|
+
'#CC9933',
|
|
22927
|
+
'#CCCC00',
|
|
22928
|
+
'#CCCC33',
|
|
22929
|
+
'#FF0000',
|
|
22930
|
+
'#FF0033',
|
|
22931
|
+
'#FF0066',
|
|
22932
|
+
'#FF0099',
|
|
22933
|
+
'#FF00CC',
|
|
22934
|
+
'#FF00FF',
|
|
22935
|
+
'#FF3300',
|
|
22936
|
+
'#FF3333',
|
|
22937
|
+
'#FF3366',
|
|
22938
|
+
'#FF3399',
|
|
22939
|
+
'#FF33CC',
|
|
22940
|
+
'#FF33FF',
|
|
22941
|
+
'#FF6600',
|
|
22942
|
+
'#FF6633',
|
|
22943
|
+
'#FF9900',
|
|
22944
|
+
'#FF9933',
|
|
22945
|
+
'#FFCC00',
|
|
22946
|
+
'#FFCC33'
|
|
22947
|
+
];
|
|
22948
|
+
|
|
22949
|
+
/**
|
|
22950
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
22951
|
+
* and the Firebug extension (any Firefox version) are known
|
|
22952
|
+
* to support "%c" CSS customizations.
|
|
22953
|
+
*
|
|
22954
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
22955
|
+
*/
|
|
22956
|
+
|
|
22957
|
+
// eslint-disable-next-line complexity
|
|
22958
|
+
function useColors() {
|
|
22959
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
|
22960
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
22961
|
+
// explicitly
|
|
22962
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
22963
|
+
return true;
|
|
22964
|
+
}
|
|
22965
|
+
|
|
22966
|
+
// Internet Explorer and Edge do not support colors.
|
|
22967
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
22968
|
+
return false;
|
|
22969
|
+
}
|
|
22970
|
+
|
|
22971
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
22972
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
22973
|
+
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
22974
|
+
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
22975
|
+
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
22976
|
+
// Is firefox >= v31?
|
|
22977
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
22978
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
22979
|
+
// Double check webkit in userAgent just in case we are in a worker
|
|
22980
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
22981
|
+
}
|
|
22982
|
+
|
|
22983
|
+
/**
|
|
22984
|
+
* Colorize log arguments if enabled.
|
|
22985
|
+
*
|
|
22986
|
+
* @api public
|
|
22987
|
+
*/
|
|
22988
|
+
|
|
22989
|
+
function formatArgs(args) {
|
|
22990
|
+
args[0] = (this.useColors ? '%c' : '') +
|
|
22991
|
+
this.namespace +
|
|
22992
|
+
(this.useColors ? ' %c' : ' ') +
|
|
22993
|
+
args[0] +
|
|
22994
|
+
(this.useColors ? '%c ' : ' ') +
|
|
22995
|
+
'+' + module.exports.humanize(this.diff);
|
|
22996
|
+
|
|
22997
|
+
if (!this.useColors) {
|
|
22998
|
+
return;
|
|
22999
|
+
}
|
|
23000
|
+
|
|
23001
|
+
const c = 'color: ' + this.color;
|
|
23002
|
+
args.splice(1, 0, c, 'color: inherit');
|
|
23003
|
+
|
|
23004
|
+
// The final "%c" is somewhat tricky, because there could be other
|
|
23005
|
+
// arguments passed either before or after the %c, so we need to
|
|
23006
|
+
// figure out the correct index to insert the CSS into
|
|
23007
|
+
let index = 0;
|
|
23008
|
+
let lastC = 0;
|
|
23009
|
+
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
23010
|
+
if (match === '%%') {
|
|
23011
|
+
return;
|
|
23012
|
+
}
|
|
23013
|
+
index++;
|
|
23014
|
+
if (match === '%c') {
|
|
23015
|
+
// We only are interested in the *last* %c
|
|
23016
|
+
// (the user may have provided their own)
|
|
23017
|
+
lastC = index;
|
|
23018
|
+
}
|
|
23019
|
+
});
|
|
23020
|
+
|
|
23021
|
+
args.splice(lastC, 0, c);
|
|
23022
|
+
}
|
|
23023
|
+
|
|
23024
|
+
/**
|
|
23025
|
+
* Invokes `console.debug()` when available.
|
|
23026
|
+
* No-op when `console.debug` is not a "function".
|
|
23027
|
+
* If `console.debug` is not available, falls back
|
|
23028
|
+
* to `console.log`.
|
|
23029
|
+
*
|
|
23030
|
+
* @api public
|
|
23031
|
+
*/
|
|
23032
|
+
exports.log = console.debug || console.log || (() => {});
|
|
23033
|
+
|
|
23034
|
+
/**
|
|
23035
|
+
* Save `namespaces`.
|
|
23036
|
+
*
|
|
23037
|
+
* @param {String} namespaces
|
|
23038
|
+
* @api private
|
|
23039
|
+
*/
|
|
23040
|
+
function save(namespaces) {
|
|
23041
|
+
try {
|
|
23042
|
+
if (namespaces) {
|
|
23043
|
+
exports.storage.setItem('debug', namespaces);
|
|
23044
|
+
} else {
|
|
23045
|
+
exports.storage.removeItem('debug');
|
|
23046
|
+
}
|
|
23047
|
+
} catch (error) {
|
|
23048
|
+
// Swallow
|
|
23049
|
+
// XXX (@Qix-) should we be logging these?
|
|
23050
|
+
}
|
|
23051
|
+
}
|
|
23052
|
+
|
|
23053
|
+
/**
|
|
23054
|
+
* Load `namespaces`.
|
|
23055
|
+
*
|
|
23056
|
+
* @return {String} returns the previously persisted debug modes
|
|
23057
|
+
* @api private
|
|
23058
|
+
*/
|
|
23059
|
+
function load() {
|
|
23060
|
+
let r;
|
|
23061
|
+
try {
|
|
23062
|
+
r = exports.storage.getItem('debug');
|
|
23063
|
+
} catch (error) {
|
|
23064
|
+
// Swallow
|
|
23065
|
+
// XXX (@Qix-) should we be logging these?
|
|
23066
|
+
}
|
|
23067
|
+
|
|
23068
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
23069
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
23070
|
+
r = process.env.DEBUG;
|
|
23071
|
+
}
|
|
23072
|
+
|
|
23073
|
+
return r;
|
|
23074
|
+
}
|
|
23075
|
+
|
|
23076
|
+
/**
|
|
23077
|
+
* Localstorage attempts to return the localstorage.
|
|
23078
|
+
*
|
|
23079
|
+
* This is necessary because safari throws
|
|
23080
|
+
* when a user disables cookies/localstorage
|
|
23081
|
+
* and you attempt to access it.
|
|
23082
|
+
*
|
|
23083
|
+
* @return {LocalStorage}
|
|
23084
|
+
* @api private
|
|
23085
|
+
*/
|
|
23086
|
+
|
|
23087
|
+
function localstorage() {
|
|
23088
|
+
try {
|
|
23089
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
23090
|
+
// The Browser also has localStorage in the global context.
|
|
23091
|
+
return localStorage;
|
|
23092
|
+
} catch (error) {
|
|
23093
|
+
// Swallow
|
|
23094
|
+
// XXX (@Qix-) should we be logging these?
|
|
23095
|
+
}
|
|
23096
|
+
}
|
|
23097
|
+
|
|
23098
|
+
module.exports = requireCommon()(exports);
|
|
23099
|
+
|
|
23100
|
+
const {formatters} = module.exports;
|
|
23101
|
+
|
|
23102
|
+
/**
|
|
23103
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
23104
|
+
*/
|
|
23105
|
+
|
|
23106
|
+
formatters.j = function (v) {
|
|
23107
|
+
try {
|
|
23108
|
+
return JSON.stringify(v);
|
|
23109
|
+
} catch (error) {
|
|
23110
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
23111
|
+
}
|
|
23112
|
+
};
|
|
23113
|
+
} (browser, browser.exports));
|
|
23114
|
+
return browser.exports;
|
|
23115
|
+
}
|
|
23116
|
+
|
|
23061
23117
|
/**
|
|
23062
23118
|
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
23063
23119
|
* treat as a browser.
|
|
@@ -23132,6 +23188,9 @@ var WriteAfterEndError = createErrorType(
|
|
|
23132
23188
|
"write after end"
|
|
23133
23189
|
);
|
|
23134
23190
|
|
|
23191
|
+
// istanbul ignore next
|
|
23192
|
+
var destroy = Writable.prototype.destroy || noop;
|
|
23193
|
+
|
|
23135
23194
|
// An HTTP(S) request that can be redirected
|
|
23136
23195
|
function RedirectableRequest(options, responseCallback) {
|
|
23137
23196
|
// Initialize the request
|
|
@@ -23162,10 +23221,17 @@ function RedirectableRequest(options, responseCallback) {
|
|
|
23162
23221
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
23163
23222
|
|
|
23164
23223
|
RedirectableRequest.prototype.abort = function () {
|
|
23165
|
-
|
|
23224
|
+
destroyRequest(this._currentRequest);
|
|
23225
|
+
this._currentRequest.abort();
|
|
23166
23226
|
this.emit("abort");
|
|
23167
23227
|
};
|
|
23168
23228
|
|
|
23229
|
+
RedirectableRequest.prototype.destroy = function (error) {
|
|
23230
|
+
destroyRequest(this._currentRequest, error);
|
|
23231
|
+
destroy.call(this, error);
|
|
23232
|
+
return this;
|
|
23233
|
+
};
|
|
23234
|
+
|
|
23169
23235
|
// Writes buffered data to the current native request
|
|
23170
23236
|
RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
|
23171
23237
|
// Writing is not allowed if end has been called
|
|
@@ -23278,6 +23344,7 @@ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
|
|
|
23278
23344
|
self.removeListener("abort", clearTimer);
|
|
23279
23345
|
self.removeListener("error", clearTimer);
|
|
23280
23346
|
self.removeListener("response", clearTimer);
|
|
23347
|
+
self.removeListener("close", clearTimer);
|
|
23281
23348
|
if (callback) {
|
|
23282
23349
|
self.removeListener("timeout", callback);
|
|
23283
23350
|
}
|
|
@@ -23304,6 +23371,7 @@ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
|
|
|
23304
23371
|
this.on("abort", clearTimer);
|
|
23305
23372
|
this.on("error", clearTimer);
|
|
23306
23373
|
this.on("response", clearTimer);
|
|
23374
|
+
this.on("close", clearTimer);
|
|
23307
23375
|
|
|
23308
23376
|
return this;
|
|
23309
23377
|
};
|
|
@@ -23455,7 +23523,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
|
|
|
23455
23523
|
}
|
|
23456
23524
|
|
|
23457
23525
|
// The response is a redirect, so abort the current request
|
|
23458
|
-
|
|
23526
|
+
destroyRequest(this._currentRequest);
|
|
23459
23527
|
// Discard the remainder of the response to avoid waiting for data
|
|
23460
23528
|
response.destroy();
|
|
23461
23529
|
|
|
@@ -23684,12 +23752,12 @@ function createErrorType(code, message, baseClass) {
|
|
|
23684
23752
|
return CustomError;
|
|
23685
23753
|
}
|
|
23686
23754
|
|
|
23687
|
-
function
|
|
23755
|
+
function destroyRequest(request, error) {
|
|
23688
23756
|
for (var event of events) {
|
|
23689
23757
|
request.removeListener(event, eventHandlers[event]);
|
|
23690
23758
|
}
|
|
23691
23759
|
request.on("error", noop);
|
|
23692
|
-
request.
|
|
23760
|
+
request.destroy(error);
|
|
23693
23761
|
}
|
|
23694
23762
|
|
|
23695
23763
|
function isSubdomain(subdomain, domain) {
|
|
@@ -29238,7 +29306,7 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29238
29306
|
throw new Error('Unknown mode ' + this.mode);
|
|
29239
29307
|
}
|
|
29240
29308
|
|
|
29241
|
-
if (status
|
|
29309
|
+
if (!this._checkError(status, strm, flush)) {
|
|
29242
29310
|
this._error(status);
|
|
29243
29311
|
}
|
|
29244
29312
|
|
|
@@ -29246,6 +29314,27 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29246
29314
|
return [strm.avail_in, strm.avail_out];
|
|
29247
29315
|
};
|
|
29248
29316
|
|
|
29317
|
+
Zlib$1.prototype._checkError = function (status, strm, flush) {
|
|
29318
|
+
// Acceptable error states depend on the type of zlib stream.
|
|
29319
|
+
switch (status) {
|
|
29320
|
+
case Z_OK:
|
|
29321
|
+
case Z_BUF_ERROR:
|
|
29322
|
+
if (strm.avail_out !== 0 && flush === Z_FINISH) {
|
|
29323
|
+
return false
|
|
29324
|
+
}
|
|
29325
|
+
break
|
|
29326
|
+
case Z_STREAM_END:
|
|
29327
|
+
// normal statuses, not fatal
|
|
29328
|
+
break
|
|
29329
|
+
case Z_NEED_DICT:
|
|
29330
|
+
return false
|
|
29331
|
+
default:
|
|
29332
|
+
return false
|
|
29333
|
+
}
|
|
29334
|
+
|
|
29335
|
+
return true
|
|
29336
|
+
};
|
|
29337
|
+
|
|
29249
29338
|
Zlib$1.prototype.close = function() {
|
|
29250
29339
|
if (this.write_in_progress) {
|
|
29251
29340
|
this.pending_close = true;
|
|
@@ -29660,7 +29749,7 @@ function Zlib(opts, mode) {
|
|
|
29660
29749
|
|
|
29661
29750
|
var error = new Error(message);
|
|
29662
29751
|
error.errno = errno;
|
|
29663
|
-
error.code =
|
|
29752
|
+
error.code = codes[errno];
|
|
29664
29753
|
self.emit('error', error);
|
|
29665
29754
|
};
|
|
29666
29755
|
|
|
@@ -29940,7 +30029,7 @@ var zlib = {
|
|
|
29940
30029
|
Zlib: Zlib
|
|
29941
30030
|
};
|
|
29942
30031
|
|
|
29943
|
-
const VERSION = "1.
|
|
30032
|
+
const VERSION = "1.6.2";
|
|
29944
30033
|
|
|
29945
30034
|
function parseProtocol(url) {
|
|
29946
30035
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
@@ -30081,7 +30170,7 @@ const kInternals = Symbol('internals');
|
|
|
30081
30170
|
|
|
30082
30171
|
class AxiosTransformStream extends Stream$3.Transform{
|
|
30083
30172
|
constructor(options) {
|
|
30084
|
-
options = utils.toFlatObject(options, {
|
|
30173
|
+
options = utils$1.toFlatObject(options, {
|
|
30085
30174
|
maxRate: 0,
|
|
30086
30175
|
chunkSize: 64 * 1024,
|
|
30087
30176
|
minChunkSize: 100,
|
|
@@ -30089,7 +30178,7 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30089
30178
|
ticksRate: 2,
|
|
30090
30179
|
samplesCount: 15
|
|
30091
30180
|
}, null, (prop, source) => {
|
|
30092
|
-
return !utils.isUndefined(source[prop]);
|
|
30181
|
+
return !utils$1.isUndefined(source[prop]);
|
|
30093
30182
|
});
|
|
30094
30183
|
|
|
30095
30184
|
super({
|
|
@@ -30278,7 +30367,7 @@ const readBlob = async function* (blob) {
|
|
|
30278
30367
|
|
|
30279
30368
|
var readBlob$1 = readBlob;
|
|
30280
30369
|
|
|
30281
|
-
const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
|
|
30370
|
+
const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
|
|
30282
30371
|
|
|
30283
30372
|
const textEncoder = new text_min.TextEncoder();
|
|
30284
30373
|
|
|
@@ -30289,7 +30378,7 @@ const CRLF_BYTES_COUNT = 2;
|
|
|
30289
30378
|
class FormDataPart {
|
|
30290
30379
|
constructor(name, value) {
|
|
30291
30380
|
const {escapeName} = this.constructor;
|
|
30292
|
-
const isStringValue = utils.isString(value);
|
|
30381
|
+
const isStringValue = utils$1.isString(value);
|
|
30293
30382
|
|
|
30294
30383
|
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
|
|
30295
30384
|
!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
|
|
@@ -30316,7 +30405,7 @@ class FormDataPart {
|
|
|
30316
30405
|
|
|
30317
30406
|
const {value} = this;
|
|
30318
30407
|
|
|
30319
|
-
if(utils.isTypedArray(value)) {
|
|
30408
|
+
if(utils$1.isTypedArray(value)) {
|
|
30320
30409
|
yield value;
|
|
30321
30410
|
} else {
|
|
30322
30411
|
yield* readBlob$1(value);
|
|
@@ -30338,10 +30427,10 @@ const formDataToStream = (form, headersHandler, options) => {
|
|
|
30338
30427
|
const {
|
|
30339
30428
|
tag = 'form-data-boundary',
|
|
30340
30429
|
size = 25,
|
|
30341
|
-
boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)
|
|
30430
|
+
boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
|
|
30342
30431
|
} = options || {};
|
|
30343
30432
|
|
|
30344
|
-
if(!utils.isFormData(form)) {
|
|
30433
|
+
if(!utils$1.isFormData(form)) {
|
|
30345
30434
|
throw TypeError('FormData instance required');
|
|
30346
30435
|
}
|
|
30347
30436
|
|
|
@@ -30361,7 +30450,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
|
|
30361
30450
|
|
|
30362
30451
|
contentLength += boundaryBytes.byteLength * parts.length;
|
|
30363
30452
|
|
|
30364
|
-
contentLength = utils.toFiniteNumber(contentLength);
|
|
30453
|
+
contentLength = utils$1.toFiniteNumber(contentLength);
|
|
30365
30454
|
|
|
30366
30455
|
const computedHeaders = {
|
|
30367
30456
|
'Content-Type': `multipart/form-data; boundary=${boundary}`
|
|
@@ -30411,7 +30500,7 @@ class ZlibHeaderTransformStream extends Stream$3.Transform {
|
|
|
30411
30500
|
var ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
|
|
30412
30501
|
|
|
30413
30502
|
const callbackify = (fn, reducer) => {
|
|
30414
|
-
return utils.isAsyncFn(fn) ? function (...args) {
|
|
30503
|
+
return utils$1.isAsyncFn(fn) ? function (...args) {
|
|
30415
30504
|
const cb = args.pop();
|
|
30416
30505
|
fn.apply(this, args).then((value) => {
|
|
30417
30506
|
try {
|
|
@@ -30435,7 +30524,7 @@ const brotliOptions = {
|
|
|
30435
30524
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
30436
30525
|
};
|
|
30437
30526
|
|
|
30438
|
-
const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
|
|
30527
|
+
const isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
|
|
30439
30528
|
|
|
30440
30529
|
const {http: httpFollow, https: httpsFollow} = followRedirects;
|
|
30441
30530
|
|
|
@@ -30515,7 +30604,7 @@ function setProxy(options, configProxy, location) {
|
|
|
30515
30604
|
};
|
|
30516
30605
|
}
|
|
30517
30606
|
|
|
30518
|
-
const isHttpAdapterSupported = typeof browser$1$1 !== 'undefined' && utils.kindOf(browser$1$1) === 'process';
|
|
30607
|
+
const isHttpAdapterSupported = typeof browser$1$1 !== 'undefined' && utils$1.kindOf(browser$1$1) === 'process';
|
|
30519
30608
|
|
|
30520
30609
|
// temporary hotfix
|
|
30521
30610
|
|
|
@@ -30544,6 +30633,18 @@ const wrapAsync = (asyncExecutor) => {
|
|
|
30544
30633
|
})
|
|
30545
30634
|
};
|
|
30546
30635
|
|
|
30636
|
+
const resolveFamily = ({address, family}) => {
|
|
30637
|
+
if (!utils$1.isString(address)) {
|
|
30638
|
+
throw TypeError('address must be a string');
|
|
30639
|
+
}
|
|
30640
|
+
return ({
|
|
30641
|
+
address,
|
|
30642
|
+
family: family || (address.indexOf('.') < 0 ? 6 : 4)
|
|
30643
|
+
});
|
|
30644
|
+
};
|
|
30645
|
+
|
|
30646
|
+
const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family});
|
|
30647
|
+
|
|
30547
30648
|
/*eslint consistent-return:0*/
|
|
30548
30649
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
30549
30650
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
@@ -30554,15 +30655,16 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30554
30655
|
let rejected = false;
|
|
30555
30656
|
let req;
|
|
30556
30657
|
|
|
30557
|
-
if (lookup
|
|
30558
|
-
|
|
30559
|
-
|
|
30560
|
-
|
|
30561
|
-
|
|
30562
|
-
|
|
30563
|
-
|
|
30564
|
-
|
|
30565
|
-
|
|
30658
|
+
if (lookup) {
|
|
30659
|
+
const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
|
|
30660
|
+
// hotfix to support opt.all option which is required for node 20.x
|
|
30661
|
+
lookup = (hostname, opt, cb) => {
|
|
30662
|
+
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
30663
|
+
const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
30664
|
+
|
|
30665
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
30666
|
+
});
|
|
30667
|
+
};
|
|
30566
30668
|
}
|
|
30567
30669
|
|
|
30568
30670
|
// temporary internal emitter until the AxiosRequest class will be implemented
|
|
@@ -30630,7 +30732,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30630
30732
|
convertedData = convertedData.toString(responseEncoding);
|
|
30631
30733
|
|
|
30632
30734
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
30633
|
-
convertedData = utils.stripBOM(convertedData);
|
|
30735
|
+
convertedData = utils$1.stripBOM(convertedData);
|
|
30634
30736
|
}
|
|
30635
30737
|
} else if (responseType === 'stream') {
|
|
30636
30738
|
convertedData = Stream$3.Readable.from(convertedData);
|
|
@@ -30668,7 +30770,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30668
30770
|
let maxDownloadRate = undefined;
|
|
30669
30771
|
|
|
30670
30772
|
// support for spec compliant FormData objects
|
|
30671
|
-
if (utils.isSpecCompliantForm(data)) {
|
|
30773
|
+
if (utils$1.isSpecCompliantForm(data)) {
|
|
30672
30774
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
30673
30775
|
|
|
30674
30776
|
data = formDataToStream$1(data, (formHeaders) => {
|
|
@@ -30678,7 +30780,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30678
30780
|
boundary: userBoundary && userBoundary[1] || undefined
|
|
30679
30781
|
});
|
|
30680
30782
|
// support for https://www.npmjs.com/package/form-data api
|
|
30681
|
-
} else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
|
|
30783
|
+
} else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
|
|
30682
30784
|
headers.set(data.getHeaders());
|
|
30683
30785
|
|
|
30684
30786
|
if (!headers.hasContentLength()) {
|
|
@@ -30689,14 +30791,14 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30689
30791
|
} catch (e) {
|
|
30690
30792
|
}
|
|
30691
30793
|
}
|
|
30692
|
-
} else if (utils.isBlob(data)) {
|
|
30794
|
+
} else if (utils$1.isBlob(data)) {
|
|
30693
30795
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
|
30694
30796
|
headers.setContentLength(data.size || 0);
|
|
30695
30797
|
data = Stream$3.Readable.from(readBlob$1(data));
|
|
30696
|
-
} else if (data && !utils.isStream(data)) {
|
|
30697
|
-
if (Buffer.isBuffer(data)) ; else if (utils.isArrayBuffer(data)) {
|
|
30798
|
+
} else if (data && !utils$1.isStream(data)) {
|
|
30799
|
+
if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) {
|
|
30698
30800
|
data = Buffer.from(new Uint8Array(data));
|
|
30699
|
-
} else if (utils.isString(data)) {
|
|
30801
|
+
} else if (utils$1.isString(data)) {
|
|
30700
30802
|
data = Buffer.from(data, 'utf-8');
|
|
30701
30803
|
} else {
|
|
30702
30804
|
return reject(new AxiosError(
|
|
@@ -30718,9 +30820,9 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30718
30820
|
}
|
|
30719
30821
|
}
|
|
30720
30822
|
|
|
30721
|
-
const contentLength = utils.toFiniteNumber(headers.getContentLength());
|
|
30823
|
+
const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
|
|
30722
30824
|
|
|
30723
|
-
if (utils.isArray(maxRate)) {
|
|
30825
|
+
if (utils$1.isArray(maxRate)) {
|
|
30724
30826
|
maxUploadRate = maxRate[0];
|
|
30725
30827
|
maxDownloadRate = maxRate[1];
|
|
30726
30828
|
} else {
|
|
@@ -30728,14 +30830,14 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30728
30830
|
}
|
|
30729
30831
|
|
|
30730
30832
|
if (data && (onUploadProgress || maxUploadRate)) {
|
|
30731
|
-
if (!utils.isStream(data)) {
|
|
30833
|
+
if (!utils$1.isStream(data)) {
|
|
30732
30834
|
data = Stream$3.Readable.from(data, {objectMode: false});
|
|
30733
30835
|
}
|
|
30734
30836
|
|
|
30735
30837
|
data = Stream$3.pipeline([data, new AxiosTransformStream$1({
|
|
30736
30838
|
length: contentLength,
|
|
30737
|
-
maxRate: utils.toFiniteNumber(maxUploadRate)
|
|
30738
|
-
})], utils.noop);
|
|
30839
|
+
maxRate: utils$1.toFiniteNumber(maxUploadRate)
|
|
30840
|
+
})], utils$1.noop);
|
|
30739
30841
|
|
|
30740
30842
|
onUploadProgress && data.on('progress', progress => {
|
|
30741
30843
|
onUploadProgress(Object.assign(progress, {
|
|
@@ -30794,7 +30896,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30794
30896
|
};
|
|
30795
30897
|
|
|
30796
30898
|
// cacheable-lookup integration hotfix
|
|
30797
|
-
!utils.isUndefined(lookup) && (options.lookup = lookup);
|
|
30899
|
+
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
30798
30900
|
|
|
30799
30901
|
if (config.socketPath) {
|
|
30800
30902
|
options.socketPath = config.socketPath;
|
|
@@ -30842,8 +30944,8 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30842
30944
|
|
|
30843
30945
|
if (onDownloadProgress) {
|
|
30844
30946
|
const transformStream = new AxiosTransformStream$1({
|
|
30845
|
-
length: utils.toFiniteNumber(responseLength),
|
|
30846
|
-
maxRate: utils.toFiniteNumber(maxDownloadRate)
|
|
30947
|
+
length: utils$1.toFiniteNumber(responseLength),
|
|
30948
|
+
maxRate: utils$1.toFiniteNumber(maxDownloadRate)
|
|
30847
30949
|
});
|
|
30848
30950
|
|
|
30849
30951
|
onDownloadProgress && transformStream.on('progress', progress => {
|
|
@@ -30898,7 +31000,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30898
31000
|
}
|
|
30899
31001
|
}
|
|
30900
31002
|
|
|
30901
|
-
responseStream = streams.length > 1 ? Stream$3.pipeline(streams, utils.noop) : streams[0];
|
|
31003
|
+
responseStream = streams.length > 1 ? Stream$3.pipeline(streams, utils$1.noop) : streams[0];
|
|
30902
31004
|
|
|
30903
31005
|
const offListeners = Stream$3.finished(responseStream, () => {
|
|
30904
31006
|
offListeners();
|
|
@@ -30960,12 +31062,12 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30960
31062
|
if (responseType !== 'arraybuffer') {
|
|
30961
31063
|
responseData = responseData.toString(responseEncoding);
|
|
30962
31064
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
30963
|
-
responseData = utils.stripBOM(responseData);
|
|
31065
|
+
responseData = utils$1.stripBOM(responseData);
|
|
30964
31066
|
}
|
|
30965
31067
|
}
|
|
30966
31068
|
response.data = responseData;
|
|
30967
31069
|
} catch (err) {
|
|
30968
|
-
reject(AxiosError.from(err, null, config, response.request, response));
|
|
31070
|
+
return reject(AxiosError.from(err, null, config, response.request, response));
|
|
30969
31071
|
}
|
|
30970
31072
|
settle(resolve, reject, response);
|
|
30971
31073
|
});
|
|
@@ -31037,7 +31139,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31037
31139
|
|
|
31038
31140
|
|
|
31039
31141
|
// Send the request
|
|
31040
|
-
if (utils.isStream(data)) {
|
|
31142
|
+
if (utils$1.isStream(data)) {
|
|
31041
31143
|
let ended = false;
|
|
31042
31144
|
let errored = false;
|
|
31043
31145
|
|
|
@@ -31063,55 +31165,46 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31063
31165
|
});
|
|
31064
31166
|
};
|
|
31065
31167
|
|
|
31066
|
-
var cookies = platform$1.
|
|
31168
|
+
var cookies = platform$1.hasStandardBrowserEnv ?
|
|
31067
31169
|
|
|
31068
|
-
// Standard browser envs support document.cookie
|
|
31069
|
-
|
|
31070
|
-
|
|
31071
|
-
|
|
31072
|
-
const cookie = [];
|
|
31073
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
31170
|
+
// Standard browser envs support document.cookie
|
|
31171
|
+
{
|
|
31172
|
+
write(name, value, expires, path, domain, secure) {
|
|
31173
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
31074
31174
|
|
|
31075
|
-
|
|
31076
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
31077
|
-
}
|
|
31175
|
+
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
31078
31176
|
|
|
31079
|
-
|
|
31080
|
-
cookie.push('path=' + path);
|
|
31081
|
-
}
|
|
31177
|
+
utils$1.isString(path) && cookie.push('path=' + path);
|
|
31082
31178
|
|
|
31083
|
-
|
|
31084
|
-
cookie.push('domain=' + domain);
|
|
31085
|
-
}
|
|
31179
|
+
utils$1.isString(domain) && cookie.push('domain=' + domain);
|
|
31086
31180
|
|
|
31087
|
-
|
|
31088
|
-
cookie.push('secure');
|
|
31089
|
-
}
|
|
31181
|
+
secure === true && cookie.push('secure');
|
|
31090
31182
|
|
|
31091
|
-
|
|
31092
|
-
|
|
31183
|
+
document.cookie = cookie.join('; ');
|
|
31184
|
+
},
|
|
31093
31185
|
|
|
31094
|
-
|
|
31095
|
-
|
|
31096
|
-
|
|
31097
|
-
|
|
31186
|
+
read(name) {
|
|
31187
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
31188
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
31189
|
+
},
|
|
31098
31190
|
|
|
31099
|
-
|
|
31100
|
-
|
|
31101
|
-
|
|
31102
|
-
|
|
31103
|
-
})() :
|
|
31191
|
+
remove(name) {
|
|
31192
|
+
this.write(name, '', Date.now() - 86400000);
|
|
31193
|
+
}
|
|
31194
|
+
}
|
|
31104
31195
|
|
|
31105
|
-
|
|
31106
|
-
|
|
31107
|
-
|
|
31108
|
-
|
|
31109
|
-
|
|
31110
|
-
|
|
31111
|
-
|
|
31112
|
-
|
|
31196
|
+
:
|
|
31197
|
+
|
|
31198
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
31199
|
+
{
|
|
31200
|
+
write() {},
|
|
31201
|
+
read() {
|
|
31202
|
+
return null;
|
|
31203
|
+
},
|
|
31204
|
+
remove() {}
|
|
31205
|
+
};
|
|
31113
31206
|
|
|
31114
|
-
var isURLSameOrigin = platform$1.
|
|
31207
|
+
var isURLSameOrigin = platform$1.hasStandardBrowserEnv ?
|
|
31115
31208
|
|
|
31116
31209
|
// Standard browser envs have full support of the APIs needed to test
|
|
31117
31210
|
// whether the request URL is of the same origin as current location.
|
|
@@ -31121,7 +31214,7 @@ var isURLSameOrigin = platform$1.isStandardBrowserEnv ?
|
|
|
31121
31214
|
let originURL;
|
|
31122
31215
|
|
|
31123
31216
|
/**
|
|
31124
|
-
* Parse a URL to discover
|
|
31217
|
+
* Parse a URL to discover its components
|
|
31125
31218
|
*
|
|
31126
31219
|
* @param {String} url The URL to be parsed
|
|
31127
31220
|
* @returns {Object}
|
|
@@ -31161,7 +31254,7 @@ var isURLSameOrigin = platform$1.isStandardBrowserEnv ?
|
|
|
31161
31254
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
31162
31255
|
*/
|
|
31163
31256
|
return function isURLSameOrigin(requestURL) {
|
|
31164
|
-
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
31257
|
+
const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
31165
31258
|
return (parsed.protocol === originURL.protocol &&
|
|
31166
31259
|
parsed.host === originURL.host);
|
|
31167
31260
|
};
|
|
@@ -31209,7 +31302,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31209
31302
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
31210
31303
|
let requestData = config.data;
|
|
31211
31304
|
const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
|
|
31212
|
-
|
|
31305
|
+
let {responseType, withXSRFToken} = config;
|
|
31213
31306
|
let onCanceled;
|
|
31214
31307
|
function done() {
|
|
31215
31308
|
if (config.cancelToken) {
|
|
@@ -31223,14 +31316,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31223
31316
|
|
|
31224
31317
|
let contentType;
|
|
31225
31318
|
|
|
31226
|
-
if (utils.isFormData(requestData)) {
|
|
31227
|
-
if (platform$1.
|
|
31319
|
+
if (utils$1.isFormData(requestData)) {
|
|
31320
|
+
if (platform$1.hasStandardBrowserEnv || platform$1.hasStandardBrowserWebWorkerEnv) {
|
|
31228
31321
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
31229
|
-
} else if(
|
|
31230
|
-
requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
|
|
31231
|
-
} else if(utils.isString(contentType = requestHeaders.getContentType())){
|
|
31322
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
31232
31323
|
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
31233
|
-
|
|
31324
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
31325
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
31234
31326
|
}
|
|
31235
31327
|
}
|
|
31236
31328
|
|
|
@@ -31346,13 +31438,16 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31346
31438
|
// Add xsrf header
|
|
31347
31439
|
// This is only done if running in a standard browser environment.
|
|
31348
31440
|
// Specifically not if we're in a web worker, or react-native.
|
|
31349
|
-
if
|
|
31350
|
-
|
|
31351
|
-
|
|
31352
|
-
|
|
31441
|
+
if(platform$1.hasStandardBrowserEnv) {
|
|
31442
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
31443
|
+
|
|
31444
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
|
|
31445
|
+
// Add xsrf header
|
|
31446
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
31353
31447
|
|
|
31354
|
-
|
|
31355
|
-
|
|
31448
|
+
if (xsrfValue) {
|
|
31449
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
31450
|
+
}
|
|
31356
31451
|
}
|
|
31357
31452
|
}
|
|
31358
31453
|
|
|
@@ -31361,13 +31456,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31361
31456
|
|
|
31362
31457
|
// Add headers to the request
|
|
31363
31458
|
if ('setRequestHeader' in request) {
|
|
31364
|
-
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
31459
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
31365
31460
|
request.setRequestHeader(key, val);
|
|
31366
31461
|
});
|
|
31367
31462
|
}
|
|
31368
31463
|
|
|
31369
31464
|
// Add withCredentials to request if needed
|
|
31370
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
|
31465
|
+
if (!utils$1.isUndefined(config.withCredentials)) {
|
|
31371
31466
|
request.withCredentials = !!config.withCredentials;
|
|
31372
31467
|
}
|
|
31373
31468
|
|
|
@@ -31422,7 +31517,7 @@ const knownAdapters = {
|
|
|
31422
31517
|
xhr: xhrAdapter
|
|
31423
31518
|
};
|
|
31424
31519
|
|
|
31425
|
-
utils.forEach(knownAdapters, (fn, value) => {
|
|
31520
|
+
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
31426
31521
|
if (fn) {
|
|
31427
31522
|
try {
|
|
31428
31523
|
Object.defineProperty(fn, 'name', {value});
|
|
@@ -31435,11 +31530,11 @@ utils.forEach(knownAdapters, (fn, value) => {
|
|
|
31435
31530
|
|
|
31436
31531
|
const renderReason = (reason) => `- ${reason}`;
|
|
31437
31532
|
|
|
31438
|
-
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
|
31533
|
+
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
31439
31534
|
|
|
31440
31535
|
var adapters = {
|
|
31441
31536
|
getAdapter: (adapters) => {
|
|
31442
|
-
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
31537
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
31443
31538
|
|
|
31444
31539
|
const {length} = adapters;
|
|
31445
31540
|
let nameOrAdapter;
|
|
@@ -31580,11 +31675,11 @@ function mergeConfig(config1, config2) {
|
|
|
31580
31675
|
const config = {};
|
|
31581
31676
|
|
|
31582
31677
|
function getMergedValue(target, source, caseless) {
|
|
31583
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
31584
|
-
return utils.merge.call({caseless}, target, source);
|
|
31585
|
-
} else if (utils.isPlainObject(source)) {
|
|
31586
|
-
return utils.merge({}, source);
|
|
31587
|
-
} else if (utils.isArray(source)) {
|
|
31678
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
31679
|
+
return utils$1.merge.call({caseless}, target, source);
|
|
31680
|
+
} else if (utils$1.isPlainObject(source)) {
|
|
31681
|
+
return utils$1.merge({}, source);
|
|
31682
|
+
} else if (utils$1.isArray(source)) {
|
|
31588
31683
|
return source.slice();
|
|
31589
31684
|
}
|
|
31590
31685
|
return source;
|
|
@@ -31592,25 +31687,25 @@ function mergeConfig(config1, config2) {
|
|
|
31592
31687
|
|
|
31593
31688
|
// eslint-disable-next-line consistent-return
|
|
31594
31689
|
function mergeDeepProperties(a, b, caseless) {
|
|
31595
|
-
if (!utils.isUndefined(b)) {
|
|
31690
|
+
if (!utils$1.isUndefined(b)) {
|
|
31596
31691
|
return getMergedValue(a, b, caseless);
|
|
31597
|
-
} else if (!utils.isUndefined(a)) {
|
|
31692
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
31598
31693
|
return getMergedValue(undefined, a, caseless);
|
|
31599
31694
|
}
|
|
31600
31695
|
}
|
|
31601
31696
|
|
|
31602
31697
|
// eslint-disable-next-line consistent-return
|
|
31603
31698
|
function valueFromConfig2(a, b) {
|
|
31604
|
-
if (!utils.isUndefined(b)) {
|
|
31699
|
+
if (!utils$1.isUndefined(b)) {
|
|
31605
31700
|
return getMergedValue(undefined, b);
|
|
31606
31701
|
}
|
|
31607
31702
|
}
|
|
31608
31703
|
|
|
31609
31704
|
// eslint-disable-next-line consistent-return
|
|
31610
31705
|
function defaultToConfig2(a, b) {
|
|
31611
|
-
if (!utils.isUndefined(b)) {
|
|
31706
|
+
if (!utils$1.isUndefined(b)) {
|
|
31612
31707
|
return getMergedValue(undefined, b);
|
|
31613
|
-
} else if (!utils.isUndefined(a)) {
|
|
31708
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
31614
31709
|
return getMergedValue(undefined, a);
|
|
31615
31710
|
}
|
|
31616
31711
|
}
|
|
@@ -31635,6 +31730,7 @@ function mergeConfig(config1, config2) {
|
|
|
31635
31730
|
timeout: defaultToConfig2,
|
|
31636
31731
|
timeoutMessage: defaultToConfig2,
|
|
31637
31732
|
withCredentials: defaultToConfig2,
|
|
31733
|
+
withXSRFToken: defaultToConfig2,
|
|
31638
31734
|
adapter: defaultToConfig2,
|
|
31639
31735
|
responseType: defaultToConfig2,
|
|
31640
31736
|
xsrfCookieName: defaultToConfig2,
|
|
@@ -31655,10 +31751,10 @@ function mergeConfig(config1, config2) {
|
|
|
31655
31751
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
31656
31752
|
};
|
|
31657
31753
|
|
|
31658
|
-
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
31754
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
31659
31755
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
31660
31756
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
31661
|
-
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
31757
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
31662
31758
|
});
|
|
31663
31759
|
|
|
31664
31760
|
return config;
|
|
@@ -31800,7 +31896,7 @@ class Axios {
|
|
|
31800
31896
|
}
|
|
31801
31897
|
|
|
31802
31898
|
if (paramsSerializer != null) {
|
|
31803
|
-
if (utils.isFunction(paramsSerializer)) {
|
|
31899
|
+
if (utils$1.isFunction(paramsSerializer)) {
|
|
31804
31900
|
config.paramsSerializer = {
|
|
31805
31901
|
serialize: paramsSerializer
|
|
31806
31902
|
};
|
|
@@ -31816,12 +31912,12 @@ class Axios {
|
|
|
31816
31912
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
31817
31913
|
|
|
31818
31914
|
// Flatten headers
|
|
31819
|
-
let contextHeaders = headers && utils.merge(
|
|
31915
|
+
let contextHeaders = headers && utils$1.merge(
|
|
31820
31916
|
headers.common,
|
|
31821
31917
|
headers[config.method]
|
|
31822
31918
|
);
|
|
31823
31919
|
|
|
31824
|
-
headers && utils.forEach(
|
|
31920
|
+
headers && utils$1.forEach(
|
|
31825
31921
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
31826
31922
|
(method) => {
|
|
31827
31923
|
delete headers[method];
|
|
@@ -31908,7 +32004,7 @@ class Axios {
|
|
|
31908
32004
|
}
|
|
31909
32005
|
|
|
31910
32006
|
// Provide aliases for supported request methods
|
|
31911
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
32007
|
+
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
31912
32008
|
/*eslint func-names:0*/
|
|
31913
32009
|
Axios.prototype[method] = function(url, config) {
|
|
31914
32010
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -31919,7 +32015,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
31919
32015
|
};
|
|
31920
32016
|
});
|
|
31921
32017
|
|
|
31922
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
32018
|
+
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
31923
32019
|
/*eslint func-names:0*/
|
|
31924
32020
|
|
|
31925
32021
|
function generateHTTPMethod(isForm) {
|
|
@@ -32095,7 +32191,7 @@ function spread(callback) {
|
|
|
32095
32191
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
32096
32192
|
*/
|
|
32097
32193
|
function isAxiosError(payload) {
|
|
32098
|
-
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
32194
|
+
return utils$1.isObject(payload) && (payload.isAxiosError === true);
|
|
32099
32195
|
}
|
|
32100
32196
|
|
|
32101
32197
|
const HttpStatusCode = {
|
|
@@ -32182,10 +32278,10 @@ function createInstance(defaultConfig) {
|
|
|
32182
32278
|
const instance = bind(Axios$1.prototype.request, context);
|
|
32183
32279
|
|
|
32184
32280
|
// Copy axios.prototype to instance
|
|
32185
|
-
utils.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
32281
|
+
utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
32186
32282
|
|
|
32187
32283
|
// Copy context to instance
|
|
32188
|
-
utils.extend(instance, context, null, {allOwnKeys: true});
|
|
32284
|
+
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
|
32189
32285
|
|
|
32190
32286
|
// Factory for creating new instances
|
|
32191
32287
|
instance.create = function create(instanceConfig) {
|
|
@@ -32229,7 +32325,7 @@ axios.mergeConfig = mergeConfig;
|
|
|
32229
32325
|
|
|
32230
32326
|
axios.AxiosHeaders = AxiosHeaders$1;
|
|
32231
32327
|
|
|
32232
|
-
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
32328
|
+
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
32233
32329
|
|
|
32234
32330
|
axios.getAdapter = adapters.getAdapter;
|
|
32235
32331
|
|
|
@@ -35515,6 +35611,325 @@ var SocialPosts = /** @class */ (function () {
|
|
|
35515
35611
|
return SocialPosts;
|
|
35516
35612
|
}());
|
|
35517
35613
|
|
|
35614
|
+
var TitlesRoute = /** @class */ (function () {
|
|
35615
|
+
function TitlesRoute() {
|
|
35616
|
+
}
|
|
35617
|
+
TitlesRoute.routes = {
|
|
35618
|
+
list: { url: '/titles', method: HTTP_METHODS.GET },
|
|
35619
|
+
create: { url: '/titles', method: HTTP_METHODS.POST },
|
|
35620
|
+
view: { url: '/titles/{title_id}', method: HTTP_METHODS.GET },
|
|
35621
|
+
update: { url: '/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
35622
|
+
delete: { url: '/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
35623
|
+
approve: { url: '/titles/{title_id}/approve', method: HTTP_METHODS.POST },
|
|
35624
|
+
reject: { url: '//titles/{title_id}/reject', method: HTTP_METHODS.POST },
|
|
35625
|
+
};
|
|
35626
|
+
return TitlesRoute;
|
|
35627
|
+
}());
|
|
35628
|
+
|
|
35629
|
+
var Titles = /** @class */ (function () {
|
|
35630
|
+
function Titles() {
|
|
35631
|
+
}
|
|
35632
|
+
/**
|
|
35633
|
+
* List all the Titles.
|
|
35634
|
+
*
|
|
35635
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/edab2e3b061347b06c82258622d239e2
|
|
35636
|
+
*
|
|
35637
|
+
* @returns promise
|
|
35638
|
+
*/
|
|
35639
|
+
Titles.list = function (params) {
|
|
35640
|
+
return Requests.processRoute(TitlesRoute.routes.list, undefined, undefined, params);
|
|
35641
|
+
};
|
|
35642
|
+
/**
|
|
35643
|
+
* Create a new title.
|
|
35644
|
+
*
|
|
35645
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/storeTitle
|
|
35646
|
+
*
|
|
35647
|
+
* @param data The data to be passed when creating a title.
|
|
35648
|
+
*
|
|
35649
|
+
* @returns Promise
|
|
35650
|
+
*/
|
|
35651
|
+
Titles.create = function (data, params) {
|
|
35652
|
+
return Requests.processRoute(TitlesRoute.routes.create, data, undefined, params);
|
|
35653
|
+
};
|
|
35654
|
+
/**
|
|
35655
|
+
* Update a title.
|
|
35656
|
+
*
|
|
35657
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/updateTitle
|
|
35658
|
+
*
|
|
35659
|
+
* @param title_id The id of the title to update.
|
|
35660
|
+
* @param data The data to update.
|
|
35661
|
+
*
|
|
35662
|
+
* @returns promise
|
|
35663
|
+
*/
|
|
35664
|
+
Titles.update = function (title_id, data, params) {
|
|
35665
|
+
return Requests.processRoute(TitlesRoute.routes.update, data, { title_id: title_id }, params);
|
|
35666
|
+
};
|
|
35667
|
+
/**
|
|
35668
|
+
* Retrieve the information for a single title.
|
|
35669
|
+
*
|
|
35670
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/getTitleByUUID
|
|
35671
|
+
*
|
|
35672
|
+
* @param title_id The id fo the title to retrieve.
|
|
35673
|
+
*
|
|
35674
|
+
* @returns promise
|
|
35675
|
+
*/
|
|
35676
|
+
Titles.view = function (title_id, params) {
|
|
35677
|
+
return Requests.processRoute(TitlesRoute.routes.view, {}, { title_id: title_id }, params);
|
|
35678
|
+
};
|
|
35679
|
+
/**
|
|
35680
|
+
* Deletes a title.
|
|
35681
|
+
*
|
|
35682
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/deleteTitle
|
|
35683
|
+
*
|
|
35684
|
+
* @param title_id The id of the title to delete.
|
|
35685
|
+
* @returns promise
|
|
35686
|
+
*/
|
|
35687
|
+
Titles.delete = function (title_id, params) {
|
|
35688
|
+
return Requests.processRoute(TitlesRoute.routes.delete, {}, { title_id: title_id }, params);
|
|
35689
|
+
};
|
|
35690
|
+
/**
|
|
35691
|
+
* Approve a title
|
|
35692
|
+
*
|
|
35693
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/approveTitle
|
|
35694
|
+
*
|
|
35695
|
+
* @param data The data to be passed when creating a title.
|
|
35696
|
+
*
|
|
35697
|
+
* @returns Promise
|
|
35698
|
+
*/
|
|
35699
|
+
Titles.approve = function (title_id, data, params) {
|
|
35700
|
+
return Requests.processRoute(TitlesRoute.routes.approve, data, { title_id: title_id }, params);
|
|
35701
|
+
};
|
|
35702
|
+
/**
|
|
35703
|
+
* Reject a title
|
|
35704
|
+
*
|
|
35705
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/rejectTitle
|
|
35706
|
+
*
|
|
35707
|
+
* @param data The data to be passed when creating a title.
|
|
35708
|
+
*
|
|
35709
|
+
* @returns Promise
|
|
35710
|
+
*/
|
|
35711
|
+
Titles.reject = function (title_id, data, params) {
|
|
35712
|
+
return Requests.processRoute(TitlesRoute.routes.reject, data, { title_id: title_id }, params);
|
|
35713
|
+
};
|
|
35714
|
+
return Titles;
|
|
35715
|
+
}());
|
|
35716
|
+
|
|
35717
|
+
var CampaignsRoute = /** @class */ (function () {
|
|
35718
|
+
function CampaignsRoute() {
|
|
35719
|
+
}
|
|
35720
|
+
CampaignsRoute.routes = {
|
|
35721
|
+
listCampaigns: { url: '/campaigns', method: HTTP_METHODS.GET },
|
|
35722
|
+
createCampaign: { url: '/campaigns', method: HTTP_METHODS.POST },
|
|
35723
|
+
viewCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.GET },
|
|
35724
|
+
updateCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.PUT },
|
|
35725
|
+
deleteCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
|
|
35726
|
+
listCampaignLinks: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.DELETE },
|
|
35727
|
+
createCampaignLink: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.POST },
|
|
35728
|
+
getCampaignLink: { url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.GET },
|
|
35729
|
+
updateCampaignLink: { url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.PUT },
|
|
35730
|
+
createInfluencerCampaign: { url: '/campaigns/{campaign_id}/influencers', method: HTTP_METHODS.POST },
|
|
35731
|
+
listInfluencerCampaigns: { url: '/campaigns/influencers', method: HTTP_METHODS.GET },
|
|
35732
|
+
viewInfluencerCampaign: { url: '/campaigns/{campaign_id}/influencers/{user_id}', method: HTTP_METHODS.GET },
|
|
35733
|
+
updateInfluencerCampaign: { url: '/campaigns/{campaign_id}/influencers/{user_id}', method: HTTP_METHODS.PUT },
|
|
35734
|
+
markInfluencerCampaignComplete: { url: '/campaigns/{campaign_id}/influencers/{user_id}/setComplete', method: HTTP_METHODS.POST },
|
|
35735
|
+
markInfluencerCampaignIncomplete: { url: '/campaigns/{campaign_id}/influencers/{user_id}/setIncomplete', method: HTTP_METHODS.POST },
|
|
35736
|
+
listInfluencerCampaignLinks: { url: '/campaigns/{campaign_id}/influencers/{user_id}/links', method: HTTP_METHODS.GET },
|
|
35737
|
+
};
|
|
35738
|
+
return CampaignsRoute;
|
|
35739
|
+
}());
|
|
35740
|
+
|
|
35741
|
+
var Campaigns = /** @class */ (function () {
|
|
35742
|
+
function Campaigns() {
|
|
35743
|
+
}
|
|
35744
|
+
/**
|
|
35745
|
+
* List all the Campaigns.
|
|
35746
|
+
*
|
|
35747
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/edab2e3b061347b06c82258622d239e2
|
|
35748
|
+
*
|
|
35749
|
+
* @returns promise
|
|
35750
|
+
*/
|
|
35751
|
+
Campaigns.list = function (params) {
|
|
35752
|
+
return Requests.processRoute(CampaignsRoute.routes.listCampaigns, undefined, undefined, params);
|
|
35753
|
+
};
|
|
35754
|
+
/**
|
|
35755
|
+
* Create a new campaign.
|
|
35756
|
+
*
|
|
35757
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/createCampaign
|
|
35758
|
+
*
|
|
35759
|
+
* @param data The data to be passed when creating a campaign.
|
|
35760
|
+
*
|
|
35761
|
+
* @returns Promise
|
|
35762
|
+
*/
|
|
35763
|
+
Campaigns.create = function (data, params) {
|
|
35764
|
+
return Requests.processRoute(CampaignsRoute.routes.createCampaign, data, undefined, params);
|
|
35765
|
+
};
|
|
35766
|
+
/**
|
|
35767
|
+
* Update a campaign.
|
|
35768
|
+
*
|
|
35769
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateCampaign
|
|
35770
|
+
*
|
|
35771
|
+
* @param campaign_id The id of the campaign to update.
|
|
35772
|
+
* @param data The data to update.
|
|
35773
|
+
*
|
|
35774
|
+
* @returns promise
|
|
35775
|
+
*/
|
|
35776
|
+
Campaigns.update = function (campaign_id, data, params) {
|
|
35777
|
+
return Requests.processRoute(CampaignsRoute.routes.updateCampaign, data, { campaign_id: campaign_id }, params);
|
|
35778
|
+
};
|
|
35779
|
+
/**
|
|
35780
|
+
* Retrieve the information for a single campaign.
|
|
35781
|
+
*
|
|
35782
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignByUuid
|
|
35783
|
+
*
|
|
35784
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
35785
|
+
*
|
|
35786
|
+
* @returns promise
|
|
35787
|
+
*/
|
|
35788
|
+
Campaigns.view = function (campaign_id, params) {
|
|
35789
|
+
return Requests.processRoute(CampaignsRoute.routes.viewCampaign, {}, { campaign_id: campaign_id }, params);
|
|
35790
|
+
};
|
|
35791
|
+
/**
|
|
35792
|
+
* Deletes a campaign.
|
|
35793
|
+
*
|
|
35794
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/deleteCampaign
|
|
35795
|
+
*
|
|
35796
|
+
* @param campaign_id The id of the campaign to delete.
|
|
35797
|
+
* @returns promise
|
|
35798
|
+
*/
|
|
35799
|
+
Campaigns.delete = function (campaign_id, params) {
|
|
35800
|
+
return Requests.processRoute(CampaignsRoute.routes.deleteCampaign, {}, { campaign_id: campaign_id }, params);
|
|
35801
|
+
};
|
|
35802
|
+
/**
|
|
35803
|
+
* List all the campaign links.
|
|
35804
|
+
*
|
|
35805
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLinks
|
|
35806
|
+
*
|
|
35807
|
+
* @returns promise
|
|
35808
|
+
*/
|
|
35809
|
+
Campaigns.listCampaignLinks = function (campaign_id, params) {
|
|
35810
|
+
return Requests.processRoute(CampaignsRoute.routes.listCampaignLinks, undefined, { campaign_id: campaign_id }, params);
|
|
35811
|
+
};
|
|
35812
|
+
/**
|
|
35813
|
+
* Create a new campaign link.
|
|
35814
|
+
*
|
|
35815
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/storeCampaignLink
|
|
35816
|
+
*
|
|
35817
|
+
* @param data The data to be passed when creating a campaign.
|
|
35818
|
+
*
|
|
35819
|
+
* @returns Promise
|
|
35820
|
+
*/
|
|
35821
|
+
Campaigns.createCampaignLink = function (campaign_id, data, params) {
|
|
35822
|
+
return Requests.processRoute(CampaignsRoute.routes.createCampaign, data, { campaign_id: campaign_id }, params);
|
|
35823
|
+
};
|
|
35824
|
+
/**
|
|
35825
|
+
* Update a campaign.
|
|
35826
|
+
*
|
|
35827
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/1bb1492981b4529693604b03aade8bf6
|
|
35828
|
+
*
|
|
35829
|
+
* @param campaign_id The id of the campaign to update.
|
|
35830
|
+
* @param data The data to update.
|
|
35831
|
+
*
|
|
35832
|
+
* @returns promise
|
|
35833
|
+
*/
|
|
35834
|
+
Campaigns.updateCampaignLink = function (campaign_id, link_id, data, params) {
|
|
35835
|
+
return Requests.processRoute(CampaignsRoute.routes.updateCampaign, data, { campaign_id: campaign_id, link_id: link_id }, params);
|
|
35836
|
+
};
|
|
35837
|
+
/**
|
|
35838
|
+
* Retrieve the information for a single campaign.
|
|
35839
|
+
*
|
|
35840
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLink
|
|
35841
|
+
*
|
|
35842
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
35843
|
+
*
|
|
35844
|
+
* @returns promise
|
|
35845
|
+
*/
|
|
35846
|
+
Campaigns.getCampaignLink = function (campaign_id, link_id, params) {
|
|
35847
|
+
return Requests.processRoute(CampaignsRoute.routes.getCampaignLink, {}, { campaign_id: campaign_id, link_id: link_id }, params);
|
|
35848
|
+
};
|
|
35849
|
+
/**
|
|
35850
|
+
* List all the influencers associated with a campaign.
|
|
35851
|
+
*
|
|
35852
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getInfluencerCampaigns
|
|
35853
|
+
*
|
|
35854
|
+
* @returns promise
|
|
35855
|
+
*/
|
|
35856
|
+
Campaigns.listInfluencerCampaigns = function (campaign_id, params) {
|
|
35857
|
+
return Requests.processRoute(CampaignsRoute.routes.listInfluencerCampaigns, undefined, { campaign_id: campaign_id }, params);
|
|
35858
|
+
};
|
|
35859
|
+
/**
|
|
35860
|
+
* Create an influencer campaign
|
|
35861
|
+
*
|
|
35862
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/6d834c837c5f330d6a4cef5786c45c90
|
|
35863
|
+
*
|
|
35864
|
+
* @param data The data to be passed when creating a campaign.
|
|
35865
|
+
*
|
|
35866
|
+
* @returns Promise
|
|
35867
|
+
*/
|
|
35868
|
+
Campaigns.createInfluencerCampaign = function (campaign_id, user_id, data, params) {
|
|
35869
|
+
return Requests.processRoute(CampaignsRoute.routes.createInfluencerCampaign, data, { campaign_id: campaign_id }, params);
|
|
35870
|
+
};
|
|
35871
|
+
/**
|
|
35872
|
+
* Update an influencer campaign.
|
|
35873
|
+
*
|
|
35874
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateInfluencerCampaign
|
|
35875
|
+
*
|
|
35876
|
+
* @param campaign_id The id of the campaign to update.
|
|
35877
|
+
* @param data The data to update.
|
|
35878
|
+
*
|
|
35879
|
+
* @returns promise
|
|
35880
|
+
*/
|
|
35881
|
+
Campaigns.updateInfluencerCampaign = function (campaign_id, user_id, data, params) {
|
|
35882
|
+
return Requests.processRoute(CampaignsRoute.routes.updateInfluencerCampaign, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35883
|
+
};
|
|
35884
|
+
/**
|
|
35885
|
+
* Retrieve the information for a single campaign.
|
|
35886
|
+
*
|
|
35887
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/showInfluencerCampaign
|
|
35888
|
+
*
|
|
35889
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
35890
|
+
*
|
|
35891
|
+
* @returns promise
|
|
35892
|
+
*/
|
|
35893
|
+
Campaigns.viewInfluencerCampaign = function (campaign_id, user_id, params) {
|
|
35894
|
+
return Requests.processRoute(CampaignsRoute.routes.viewInfluencerCampaign, {}, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35895
|
+
};
|
|
35896
|
+
/**
|
|
35897
|
+
* Mark an influencer campaign as completed.
|
|
35898
|
+
*
|
|
35899
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/markCompleted
|
|
35900
|
+
*
|
|
35901
|
+
* @param data The data to be passed when creating a campaign.
|
|
35902
|
+
*
|
|
35903
|
+
* @returns Promise
|
|
35904
|
+
*/
|
|
35905
|
+
Campaigns.markInfluencerCampaignComplete = function (campaign_id, user_id, data, params) {
|
|
35906
|
+
return Requests.processRoute(CampaignsRoute.routes.markInfluencerCampaignComplete, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35907
|
+
};
|
|
35908
|
+
/**
|
|
35909
|
+
* Mark an influencer campaign as incomplete.
|
|
35910
|
+
*
|
|
35911
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/afffdc7a0c7fc4d9740f10517c53933e
|
|
35912
|
+
*
|
|
35913
|
+
* @param data The data to be passed when creating a campaign.
|
|
35914
|
+
*
|
|
35915
|
+
* @returns Promise
|
|
35916
|
+
*/
|
|
35917
|
+
Campaigns.markInfluencerCampaignIncomplete = function (campaign_id, user_id, data, params) {
|
|
35918
|
+
return Requests.processRoute(CampaignsRoute.routes.markInfluencerCampaignIncomplete, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35919
|
+
};
|
|
35920
|
+
/**
|
|
35921
|
+
* Get all the links associated with an influencer's campaign.
|
|
35922
|
+
*
|
|
35923
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/edab2e3b061347b06c82258622d239e2
|
|
35924
|
+
*
|
|
35925
|
+
* @returns promise
|
|
35926
|
+
*/
|
|
35927
|
+
Campaigns.listInfluencerCampaignLinks = function (campaign_id, user_id, params) {
|
|
35928
|
+
return Requests.processRoute(CampaignsRoute.routes.listInfluencerCampaignLinks, undefined, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35929
|
+
};
|
|
35930
|
+
return Campaigns;
|
|
35931
|
+
}());
|
|
35932
|
+
|
|
35518
35933
|
var Parser = /** @class */ (function () {
|
|
35519
35934
|
function Parser() {
|
|
35520
35935
|
}
|
|
@@ -35885,6 +36300,7 @@ var Glitch = /** @class */ (function () {
|
|
|
35885
36300
|
};
|
|
35886
36301
|
Glitch.api = {
|
|
35887
36302
|
Auth: Auth,
|
|
36303
|
+
Campaigns: Campaigns,
|
|
35888
36304
|
Competitions: Competitions,
|
|
35889
36305
|
Communities: Communities,
|
|
35890
36306
|
Users: Users,
|
|
@@ -35895,6 +36311,7 @@ var Glitch = /** @class */ (function () {
|
|
|
35895
36311
|
Waitlists: Waitlists,
|
|
35896
36312
|
Utility: Utility,
|
|
35897
36313
|
Tips: Tips,
|
|
36314
|
+
Titles: Titles,
|
|
35898
36315
|
Social: Social,
|
|
35899
36316
|
SocialPosts: SocialPosts,
|
|
35900
36317
|
TipPackages: TipPackages,
|