publish-microfrontend 1.6.1 → 1.6.2-beta.7367
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/lib/index.js +688 -357
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -9,6 +9,11 @@ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }
|
|
|
9
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
10
|
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
11
|
};
|
|
12
|
+
var __export = (target, all2) => {
|
|
13
|
+
__markAsModule(target);
|
|
14
|
+
for (var name in all2)
|
|
15
|
+
__defProp(target, name, { get: all2[name], enumerable: true });
|
|
16
|
+
};
|
|
12
17
|
var __reExport = (target, module2, desc) => {
|
|
13
18
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
19
|
for (let key of __getOwnPropNames(module2))
|
|
@@ -1310,10 +1315,10 @@ var require_command = __commonJS({
|
|
|
1310
1315
|
return path.basename(filename, path.extname(filename));
|
|
1311
1316
|
}
|
|
1312
1317
|
function extractDesc({ describe, description, desc }) {
|
|
1313
|
-
for (const
|
|
1314
|
-
if (typeof
|
|
1315
|
-
return
|
|
1316
|
-
common_types_1.assertNotStrictEqual(
|
|
1318
|
+
for (const test2 of [describe, description, desc]) {
|
|
1319
|
+
if (typeof test2 === "string" || test2 === false)
|
|
1320
|
+
return test2;
|
|
1321
|
+
common_types_1.assertNotStrictEqual(test2, true);
|
|
1317
1322
|
}
|
|
1318
1323
|
return false;
|
|
1319
1324
|
}
|
|
@@ -10620,7 +10625,7 @@ var require_end_of_stream = __commonJS({
|
|
|
10620
10625
|
}
|
|
10621
10626
|
function noop2() {
|
|
10622
10627
|
}
|
|
10623
|
-
function
|
|
10628
|
+
function isRequest2(stream4) {
|
|
10624
10629
|
return stream4.setHeader && typeof stream4.abort === "function";
|
|
10625
10630
|
}
|
|
10626
10631
|
function eos(stream4, opts, callback) {
|
|
@@ -10668,7 +10673,7 @@ var require_end_of_stream = __commonJS({
|
|
|
10668
10673
|
var onrequest = function onrequest2() {
|
|
10669
10674
|
stream4.req.on("finish", onfinish);
|
|
10670
10675
|
};
|
|
10671
|
-
if (
|
|
10676
|
+
if (isRequest2(stream4)) {
|
|
10672
10677
|
stream4.on("complete", onfinish);
|
|
10673
10678
|
stream4.on("abort", onclose);
|
|
10674
10679
|
if (stream4.req)
|
|
@@ -11941,7 +11946,7 @@ var require_pipeline = __commonJS({
|
|
|
11941
11946
|
if (err)
|
|
11942
11947
|
throw err;
|
|
11943
11948
|
}
|
|
11944
|
-
function
|
|
11949
|
+
function isRequest2(stream4) {
|
|
11945
11950
|
return stream4.setHeader && typeof stream4.abort === "function";
|
|
11946
11951
|
}
|
|
11947
11952
|
function destroyer(stream4, reading, writing, callback) {
|
|
@@ -11968,7 +11973,7 @@ var require_pipeline = __commonJS({
|
|
|
11968
11973
|
if (destroyed)
|
|
11969
11974
|
return;
|
|
11970
11975
|
destroyed = true;
|
|
11971
|
-
if (
|
|
11976
|
+
if (isRequest2(stream4))
|
|
11972
11977
|
return stream4.abort();
|
|
11973
11978
|
if (typeof stream4.destroy === "function")
|
|
11974
11979
|
return stream4.destroy();
|
|
@@ -12866,15 +12871,15 @@ var require_brace_expansion = __commonJS({
|
|
|
12866
12871
|
var y = numeric(n[1]);
|
|
12867
12872
|
var width = Math.max(n[0].length, n[1].length);
|
|
12868
12873
|
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
12869
|
-
var
|
|
12874
|
+
var test2 = lte;
|
|
12870
12875
|
var reverse = y < x;
|
|
12871
12876
|
if (reverse) {
|
|
12872
12877
|
incr *= -1;
|
|
12873
|
-
|
|
12878
|
+
test2 = gte;
|
|
12874
12879
|
}
|
|
12875
12880
|
var pad = n.some(isPadded);
|
|
12876
12881
|
N = [];
|
|
12877
|
-
for (var i = x;
|
|
12882
|
+
for (var i = x; test2(i, y); i += incr) {
|
|
12878
12883
|
var c;
|
|
12879
12884
|
if (isAlphaSequence) {
|
|
12880
12885
|
c = String.fromCharCode(i);
|
|
@@ -14224,16 +14229,16 @@ var require_glob = __commonJS({
|
|
|
14224
14229
|
glob2.sync = globSync;
|
|
14225
14230
|
var GlobSync = glob2.GlobSync = globSync.GlobSync;
|
|
14226
14231
|
glob2.glob = glob2;
|
|
14227
|
-
function extend2(
|
|
14232
|
+
function extend2(origin2, add) {
|
|
14228
14233
|
if (add === null || typeof add !== "object") {
|
|
14229
|
-
return
|
|
14234
|
+
return origin2;
|
|
14230
14235
|
}
|
|
14231
14236
|
var keys = Object.keys(add);
|
|
14232
14237
|
var i = keys.length;
|
|
14233
14238
|
while (i--) {
|
|
14234
|
-
|
|
14239
|
+
origin2[keys[i]] = add[keys[i]];
|
|
14235
14240
|
}
|
|
14236
|
-
return
|
|
14241
|
+
return origin2;
|
|
14237
14242
|
}
|
|
14238
14243
|
glob2.hasMagic = function(pattern, options_) {
|
|
14239
14244
|
var options = extend2({}, options_);
|
|
@@ -26593,6 +26598,7 @@ var isFormData = (thing) => {
|
|
|
26593
26598
|
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
26594
26599
|
};
|
|
26595
26600
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
26601
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
26596
26602
|
var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
26597
26603
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
26598
26604
|
if (obj === null || typeof obj === "undefined") {
|
|
@@ -26799,8 +26805,7 @@ var toObjectSet = (arrayOrString, delimiter) => {
|
|
|
26799
26805
|
var noop = () => {
|
|
26800
26806
|
};
|
|
26801
26807
|
var toFiniteNumber = (value, defaultValue) => {
|
|
26802
|
-
value = +value;
|
|
26803
|
-
return Number.isFinite(value) ? value : defaultValue;
|
|
26808
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
26804
26809
|
};
|
|
26805
26810
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
26806
26811
|
var DIGIT = "0123456789";
|
|
@@ -26844,6 +26849,23 @@ var toJSONObject = (obj) => {
|
|
|
26844
26849
|
};
|
|
26845
26850
|
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
26846
26851
|
var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
26852
|
+
var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
26853
|
+
if (setImmediateSupported) {
|
|
26854
|
+
return setImmediate;
|
|
26855
|
+
}
|
|
26856
|
+
return postMessageSupported ? ((token, callbacks) => {
|
|
26857
|
+
_global.addEventListener("message", ({ source, data }) => {
|
|
26858
|
+
if (source === _global && data === token) {
|
|
26859
|
+
callbacks.length && callbacks.shift()();
|
|
26860
|
+
}
|
|
26861
|
+
}, false);
|
|
26862
|
+
return (cb) => {
|
|
26863
|
+
callbacks.push(cb);
|
|
26864
|
+
_global.postMessage(token, "*");
|
|
26865
|
+
};
|
|
26866
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
26867
|
+
})(typeof setImmediate === "function", isFunction(_global.postMessage));
|
|
26868
|
+
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
26847
26869
|
var utils_default = {
|
|
26848
26870
|
isArray,
|
|
26849
26871
|
isArrayBuffer,
|
|
@@ -26855,6 +26877,10 @@ var utils_default = {
|
|
|
26855
26877
|
isBoolean,
|
|
26856
26878
|
isObject,
|
|
26857
26879
|
isPlainObject,
|
|
26880
|
+
isReadableStream,
|
|
26881
|
+
isRequest,
|
|
26882
|
+
isResponse,
|
|
26883
|
+
isHeaders,
|
|
26858
26884
|
isUndefined,
|
|
26859
26885
|
isDate,
|
|
26860
26886
|
isFile,
|
|
@@ -26895,7 +26921,9 @@ var utils_default = {
|
|
|
26895
26921
|
isSpecCompliantForm,
|
|
26896
26922
|
toJSONObject,
|
|
26897
26923
|
isAsyncFn,
|
|
26898
|
-
isThenable
|
|
26924
|
+
isThenable,
|
|
26925
|
+
setImmediate: _setImmediate,
|
|
26926
|
+
asap
|
|
26899
26927
|
};
|
|
26900
26928
|
|
|
26901
26929
|
// ../../../node_modules/axios/lib/core/AxiosError.js
|
|
@@ -26912,7 +26940,10 @@ function AxiosError(message, code, config, request, response) {
|
|
|
26912
26940
|
code && (this.code = code);
|
|
26913
26941
|
config && (this.config = config);
|
|
26914
26942
|
request && (this.request = request);
|
|
26915
|
-
|
|
26943
|
+
if (response) {
|
|
26944
|
+
this.response = response;
|
|
26945
|
+
this.status = response.status ? response.status : null;
|
|
26946
|
+
}
|
|
26916
26947
|
}
|
|
26917
26948
|
utils_default.inherits(AxiosError, Error, {
|
|
26918
26949
|
toJSON: function toJSON() {
|
|
@@ -26927,7 +26958,7 @@ utils_default.inherits(AxiosError, Error, {
|
|
|
26927
26958
|
stack: this.stack,
|
|
26928
26959
|
config: utils_default.toJSONObject(this.config),
|
|
26929
26960
|
code: this.code,
|
|
26930
|
-
status: this.
|
|
26961
|
+
status: this.status
|
|
26931
26962
|
};
|
|
26932
26963
|
}
|
|
26933
26964
|
});
|
|
@@ -27196,12 +27227,35 @@ var node_default = {
|
|
|
27196
27227
|
protocols: ["http", "https", "file", "data"]
|
|
27197
27228
|
};
|
|
27198
27229
|
|
|
27230
|
+
// ../../../node_modules/axios/lib/platform/common/utils.js
|
|
27231
|
+
var utils_exports = {};
|
|
27232
|
+
__export(utils_exports, {
|
|
27233
|
+
hasBrowserEnv: () => hasBrowserEnv,
|
|
27234
|
+
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
27235
|
+
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
|
27236
|
+
navigator: () => _navigator,
|
|
27237
|
+
origin: () => origin
|
|
27238
|
+
});
|
|
27239
|
+
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
27240
|
+
var _navigator = typeof navigator === "object" && navigator || void 0;
|
|
27241
|
+
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
27242
|
+
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
27243
|
+
return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
27244
|
+
})();
|
|
27245
|
+
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
27246
|
+
|
|
27247
|
+
// ../../../node_modules/axios/lib/platform/index.js
|
|
27248
|
+
var platform_default = {
|
|
27249
|
+
...utils_exports,
|
|
27250
|
+
...node_default
|
|
27251
|
+
};
|
|
27252
|
+
|
|
27199
27253
|
// ../../../node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
27200
27254
|
"use strict";
|
|
27201
27255
|
function toURLEncodedForm(data, options) {
|
|
27202
|
-
return toFormData_default(data, new
|
|
27256
|
+
return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
|
|
27203
27257
|
visitor: function(value, key, path, helpers) {
|
|
27204
|
-
if (
|
|
27258
|
+
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
27205
27259
|
this.append(key, value.toString("base64"));
|
|
27206
27260
|
return false;
|
|
27207
27261
|
}
|
|
@@ -27232,6 +27286,8 @@ function arrayToObject(arr) {
|
|
|
27232
27286
|
function formDataToJSON(formData) {
|
|
27233
27287
|
function buildPath(path, value, target, index) {
|
|
27234
27288
|
let name = path[index++];
|
|
27289
|
+
if (name === "__proto__")
|
|
27290
|
+
return true;
|
|
27235
27291
|
const isNumericKey = Number.isFinite(+name);
|
|
27236
27292
|
const isLast = index >= path.length;
|
|
27237
27293
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
@@ -27280,7 +27336,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
27280
27336
|
}
|
|
27281
27337
|
var defaults = {
|
|
27282
27338
|
transitional: transitional_default,
|
|
27283
|
-
adapter: ["xhr", "http"],
|
|
27339
|
+
adapter: ["xhr", "http", "fetch"],
|
|
27284
27340
|
transformRequest: [function transformRequest(data, headers) {
|
|
27285
27341
|
const contentType = headers.getContentType() || "";
|
|
27286
27342
|
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
@@ -27290,12 +27346,9 @@ var defaults = {
|
|
|
27290
27346
|
}
|
|
27291
27347
|
const isFormData2 = utils_default.isFormData(data);
|
|
27292
27348
|
if (isFormData2) {
|
|
27293
|
-
if (!hasJSONContentType) {
|
|
27294
|
-
return data;
|
|
27295
|
-
}
|
|
27296
27349
|
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
27297
27350
|
}
|
|
27298
|
-
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
|
|
27351
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
|
|
27299
27352
|
return data;
|
|
27300
27353
|
}
|
|
27301
27354
|
if (utils_default.isArrayBufferView(data)) {
|
|
@@ -27325,6 +27378,9 @@ var defaults = {
|
|
|
27325
27378
|
const transitional2 = this.transitional || defaults.transitional;
|
|
27326
27379
|
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
27327
27380
|
const JSONRequested = this.responseType === "json";
|
|
27381
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
27382
|
+
return data;
|
|
27383
|
+
}
|
|
27328
27384
|
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
27329
27385
|
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
27330
27386
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
@@ -27347,8 +27403,8 @@ var defaults = {
|
|
|
27347
27403
|
maxContentLength: -1,
|
|
27348
27404
|
maxBodyLength: -1,
|
|
27349
27405
|
env: {
|
|
27350
|
-
FormData:
|
|
27351
|
-
Blob:
|
|
27406
|
+
FormData: platform_default.classes.FormData,
|
|
27407
|
+
Blob: platform_default.classes.Blob
|
|
27352
27408
|
},
|
|
27353
27409
|
validateStatus: function validateStatus(status) {
|
|
27354
27410
|
return status >= 200 && status < 300;
|
|
@@ -27486,6 +27542,10 @@ var AxiosHeaders = class {
|
|
|
27486
27542
|
setHeaders(header, valueOrRewrite);
|
|
27487
27543
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
27488
27544
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
27545
|
+
} else if (utils_default.isHeaders(header)) {
|
|
27546
|
+
for (const [key, value] of header.entries()) {
|
|
27547
|
+
setHeader(value, key, rewrite);
|
|
27548
|
+
}
|
|
27489
27549
|
} else {
|
|
27490
27550
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
27491
27551
|
}
|
|
@@ -27681,7 +27741,7 @@ function isAbsoluteURL(url2) {
|
|
|
27681
27741
|
// ../../../node_modules/axios/lib/helpers/combineURLs.js
|
|
27682
27742
|
"use strict";
|
|
27683
27743
|
function combineURLs(baseURL, relativeURL) {
|
|
27684
|
-
return relativeURL ? baseURL.replace(
|
|
27744
|
+
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
27685
27745
|
}
|
|
27686
27746
|
|
|
27687
27747
|
// ../../../node_modules/axios/lib/core/buildFullPath.js
|
|
@@ -27702,7 +27762,7 @@ var import_follow_redirects = __toModule(require_follow_redirects());
|
|
|
27702
27762
|
var import_zlib = __toModule(require("zlib"));
|
|
27703
27763
|
|
|
27704
27764
|
// ../../../node_modules/axios/lib/env/data.js
|
|
27705
|
-
var VERSION = "1.
|
|
27765
|
+
var VERSION = "1.7.7";
|
|
27706
27766
|
|
|
27707
27767
|
// ../../../node_modules/axios/lib/helpers/parseProtocol.js
|
|
27708
27768
|
"use strict";
|
|
@@ -27715,7 +27775,7 @@ function parseProtocol(url2) {
|
|
|
27715
27775
|
"use strict";
|
|
27716
27776
|
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
27717
27777
|
function fromDataURI(uri, asBlob, options) {
|
|
27718
|
-
const _Blob = options && options.Blob ||
|
|
27778
|
+
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
|
27719
27779
|
const protocol = parseProtocol(uri);
|
|
27720
27780
|
if (asBlob === void 0 && _Blob) {
|
|
27721
27781
|
asBlob = true;
|
|
@@ -27746,72 +27806,6 @@ var import_stream5 = __toModule(require("stream"));
|
|
|
27746
27806
|
|
|
27747
27807
|
// ../../../node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
27748
27808
|
var import_stream2 = __toModule(require("stream"));
|
|
27749
|
-
|
|
27750
|
-
// ../../../node_modules/axios/lib/helpers/throttle.js
|
|
27751
|
-
"use strict";
|
|
27752
|
-
function throttle(fn, freq) {
|
|
27753
|
-
let timestamp = 0;
|
|
27754
|
-
const threshold = 1e3 / freq;
|
|
27755
|
-
let timer = null;
|
|
27756
|
-
return function throttled(force, args2) {
|
|
27757
|
-
const now = Date.now();
|
|
27758
|
-
if (force || now - timestamp > threshold) {
|
|
27759
|
-
if (timer) {
|
|
27760
|
-
clearTimeout(timer);
|
|
27761
|
-
timer = null;
|
|
27762
|
-
}
|
|
27763
|
-
timestamp = now;
|
|
27764
|
-
return fn.apply(null, args2);
|
|
27765
|
-
}
|
|
27766
|
-
if (!timer) {
|
|
27767
|
-
timer = setTimeout(() => {
|
|
27768
|
-
timer = null;
|
|
27769
|
-
timestamp = Date.now();
|
|
27770
|
-
return fn.apply(null, args2);
|
|
27771
|
-
}, threshold - (now - timestamp));
|
|
27772
|
-
}
|
|
27773
|
-
};
|
|
27774
|
-
}
|
|
27775
|
-
var throttle_default = throttle;
|
|
27776
|
-
|
|
27777
|
-
// ../../../node_modules/axios/lib/helpers/speedometer.js
|
|
27778
|
-
"use strict";
|
|
27779
|
-
function speedometer(samplesCount, min) {
|
|
27780
|
-
samplesCount = samplesCount || 10;
|
|
27781
|
-
const bytes = new Array(samplesCount);
|
|
27782
|
-
const timestamps = new Array(samplesCount);
|
|
27783
|
-
let head = 0;
|
|
27784
|
-
let tail = 0;
|
|
27785
|
-
let firstSampleTS;
|
|
27786
|
-
min = min !== void 0 ? min : 1e3;
|
|
27787
|
-
return function push(chunkLength) {
|
|
27788
|
-
const now = Date.now();
|
|
27789
|
-
const startedAt = timestamps[tail];
|
|
27790
|
-
if (!firstSampleTS) {
|
|
27791
|
-
firstSampleTS = now;
|
|
27792
|
-
}
|
|
27793
|
-
bytes[head] = chunkLength;
|
|
27794
|
-
timestamps[head] = now;
|
|
27795
|
-
let i = tail;
|
|
27796
|
-
let bytesCount = 0;
|
|
27797
|
-
while (i !== head) {
|
|
27798
|
-
bytesCount += bytes[i++];
|
|
27799
|
-
i = i % samplesCount;
|
|
27800
|
-
}
|
|
27801
|
-
head = (head + 1) % samplesCount;
|
|
27802
|
-
if (head === tail) {
|
|
27803
|
-
tail = (tail + 1) % samplesCount;
|
|
27804
|
-
}
|
|
27805
|
-
if (now - firstSampleTS < min) {
|
|
27806
|
-
return;
|
|
27807
|
-
}
|
|
27808
|
-
const passed = startedAt && now - startedAt;
|
|
27809
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
27810
|
-
};
|
|
27811
|
-
}
|
|
27812
|
-
var speedometer_default = speedometer;
|
|
27813
|
-
|
|
27814
|
-
// ../../../node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
27815
27809
|
"use strict";
|
|
27816
27810
|
var kInternals = Symbol("internals");
|
|
27817
27811
|
var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
@@ -27829,11 +27823,8 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
27829
27823
|
super({
|
|
27830
27824
|
readableHighWaterMark: options.chunkSize
|
|
27831
27825
|
});
|
|
27832
|
-
const self2 = this;
|
|
27833
27826
|
const internals = this[kInternals] = {
|
|
27834
|
-
length: options.length,
|
|
27835
27827
|
timeWindow: options.timeWindow,
|
|
27836
|
-
ticksRate: options.ticksRate,
|
|
27837
27828
|
chunkSize: options.chunkSize,
|
|
27838
27829
|
maxRate: options.maxRate,
|
|
27839
27830
|
minChunkSize: options.minChunkSize,
|
|
@@ -27844,7 +27835,6 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
27844
27835
|
bytes: 0,
|
|
27845
27836
|
onReadCallback: null
|
|
27846
27837
|
};
|
|
27847
|
-
const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
|
|
27848
27838
|
this.on("newListener", (event) => {
|
|
27849
27839
|
if (event === "progress") {
|
|
27850
27840
|
if (!internals.isCaptured) {
|
|
@@ -27852,31 +27842,6 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
27852
27842
|
}
|
|
27853
27843
|
}
|
|
27854
27844
|
});
|
|
27855
|
-
let bytesNotified = 0;
|
|
27856
|
-
internals.updateProgress = throttle_default(function throttledHandler() {
|
|
27857
|
-
const totalBytes = internals.length;
|
|
27858
|
-
const bytesTransferred = internals.bytesSeen;
|
|
27859
|
-
const progressBytes = bytesTransferred - bytesNotified;
|
|
27860
|
-
if (!progressBytes || self2.destroyed)
|
|
27861
|
-
return;
|
|
27862
|
-
const rate = _speedometer(progressBytes);
|
|
27863
|
-
bytesNotified = bytesTransferred;
|
|
27864
|
-
process.nextTick(() => {
|
|
27865
|
-
self2.emit("progress", {
|
|
27866
|
-
"loaded": bytesTransferred,
|
|
27867
|
-
"total": totalBytes,
|
|
27868
|
-
"progress": totalBytes ? bytesTransferred / totalBytes : void 0,
|
|
27869
|
-
"bytes": progressBytes,
|
|
27870
|
-
"rate": rate ? rate : void 0,
|
|
27871
|
-
"estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
|
|
27872
|
-
});
|
|
27873
|
-
});
|
|
27874
|
-
}, internals.ticksRate);
|
|
27875
|
-
const onFinish = () => {
|
|
27876
|
-
internals.updateProgress(true);
|
|
27877
|
-
};
|
|
27878
|
-
this.once("end", onFinish);
|
|
27879
|
-
this.once("error", onFinish);
|
|
27880
27845
|
}
|
|
27881
27846
|
_read(size) {
|
|
27882
27847
|
const internals = this[kInternals];
|
|
@@ -27886,7 +27851,6 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
27886
27851
|
return super._read(size);
|
|
27887
27852
|
}
|
|
27888
27853
|
_transform(chunk, encoding, callback) {
|
|
27889
|
-
const self2 = this;
|
|
27890
27854
|
const internals = this[kInternals];
|
|
27891
27855
|
const maxRate = internals.maxRate;
|
|
27892
27856
|
const readableHighWaterMark = this.readableHighWaterMark;
|
|
@@ -27894,14 +27858,12 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
27894
27858
|
const divider = 1e3 / timeWindow;
|
|
27895
27859
|
const bytesThreshold = maxRate / divider;
|
|
27896
27860
|
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
|
27897
|
-
|
|
27861
|
+
const pushChunk = (_chunk, _callback) => {
|
|
27898
27862
|
const bytes = Buffer.byteLength(_chunk);
|
|
27899
27863
|
internals.bytesSeen += bytes;
|
|
27900
27864
|
internals.bytes += bytes;
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
}
|
|
27904
|
-
if (self2.push(_chunk)) {
|
|
27865
|
+
internals.isCaptured && this.emit("progress", internals.bytesSeen);
|
|
27866
|
+
if (this.push(_chunk)) {
|
|
27905
27867
|
process.nextTick(_callback);
|
|
27906
27868
|
} else {
|
|
27907
27869
|
internals.onReadCallback = () => {
|
|
@@ -27909,7 +27871,7 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
27909
27871
|
process.nextTick(_callback);
|
|
27910
27872
|
};
|
|
27911
27873
|
}
|
|
27912
|
-
}
|
|
27874
|
+
};
|
|
27913
27875
|
const transformChunk = (_chunk, _callback) => {
|
|
27914
27876
|
const chunkSize = Buffer.byteLength(_chunk);
|
|
27915
27877
|
let chunkRemainder = null;
|
|
@@ -27955,10 +27917,6 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
|
|
|
27955
27917
|
}
|
|
27956
27918
|
});
|
|
27957
27919
|
}
|
|
27958
|
-
setLength(length) {
|
|
27959
|
-
this[kInternals].length = +length;
|
|
27960
|
-
return this;
|
|
27961
|
-
}
|
|
27962
27920
|
};
|
|
27963
27921
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
27964
27922
|
|
|
@@ -28101,6 +28059,113 @@ var callbackify = (fn, reducer) => {
|
|
|
28101
28059
|
};
|
|
28102
28060
|
var callbackify_default = callbackify;
|
|
28103
28061
|
|
|
28062
|
+
// ../../../node_modules/axios/lib/helpers/speedometer.js
|
|
28063
|
+
"use strict";
|
|
28064
|
+
function speedometer(samplesCount, min) {
|
|
28065
|
+
samplesCount = samplesCount || 10;
|
|
28066
|
+
const bytes = new Array(samplesCount);
|
|
28067
|
+
const timestamps = new Array(samplesCount);
|
|
28068
|
+
let head = 0;
|
|
28069
|
+
let tail = 0;
|
|
28070
|
+
let firstSampleTS;
|
|
28071
|
+
min = min !== void 0 ? min : 1e3;
|
|
28072
|
+
return function push(chunkLength) {
|
|
28073
|
+
const now = Date.now();
|
|
28074
|
+
const startedAt = timestamps[tail];
|
|
28075
|
+
if (!firstSampleTS) {
|
|
28076
|
+
firstSampleTS = now;
|
|
28077
|
+
}
|
|
28078
|
+
bytes[head] = chunkLength;
|
|
28079
|
+
timestamps[head] = now;
|
|
28080
|
+
let i = tail;
|
|
28081
|
+
let bytesCount = 0;
|
|
28082
|
+
while (i !== head) {
|
|
28083
|
+
bytesCount += bytes[i++];
|
|
28084
|
+
i = i % samplesCount;
|
|
28085
|
+
}
|
|
28086
|
+
head = (head + 1) % samplesCount;
|
|
28087
|
+
if (head === tail) {
|
|
28088
|
+
tail = (tail + 1) % samplesCount;
|
|
28089
|
+
}
|
|
28090
|
+
if (now - firstSampleTS < min) {
|
|
28091
|
+
return;
|
|
28092
|
+
}
|
|
28093
|
+
const passed = startedAt && now - startedAt;
|
|
28094
|
+
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
28095
|
+
};
|
|
28096
|
+
}
|
|
28097
|
+
var speedometer_default = speedometer;
|
|
28098
|
+
|
|
28099
|
+
// ../../../node_modules/axios/lib/helpers/throttle.js
|
|
28100
|
+
function throttle(fn, freq) {
|
|
28101
|
+
let timestamp = 0;
|
|
28102
|
+
let threshold = 1e3 / freq;
|
|
28103
|
+
let lastArgs;
|
|
28104
|
+
let timer;
|
|
28105
|
+
const invoke = (args2, now = Date.now()) => {
|
|
28106
|
+
timestamp = now;
|
|
28107
|
+
lastArgs = null;
|
|
28108
|
+
if (timer) {
|
|
28109
|
+
clearTimeout(timer);
|
|
28110
|
+
timer = null;
|
|
28111
|
+
}
|
|
28112
|
+
fn.apply(null, args2);
|
|
28113
|
+
};
|
|
28114
|
+
const throttled = (...args2) => {
|
|
28115
|
+
const now = Date.now();
|
|
28116
|
+
const passed = now - timestamp;
|
|
28117
|
+
if (passed >= threshold) {
|
|
28118
|
+
invoke(args2, now);
|
|
28119
|
+
} else {
|
|
28120
|
+
lastArgs = args2;
|
|
28121
|
+
if (!timer) {
|
|
28122
|
+
timer = setTimeout(() => {
|
|
28123
|
+
timer = null;
|
|
28124
|
+
invoke(lastArgs);
|
|
28125
|
+
}, threshold - passed);
|
|
28126
|
+
}
|
|
28127
|
+
}
|
|
28128
|
+
};
|
|
28129
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
|
28130
|
+
return [throttled, flush];
|
|
28131
|
+
}
|
|
28132
|
+
var throttle_default = throttle;
|
|
28133
|
+
|
|
28134
|
+
// ../../../node_modules/axios/lib/helpers/progressEventReducer.js
|
|
28135
|
+
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
28136
|
+
let bytesNotified = 0;
|
|
28137
|
+
const _speedometer = speedometer_default(50, 250);
|
|
28138
|
+
return throttle_default((e) => {
|
|
28139
|
+
const loaded = e.loaded;
|
|
28140
|
+
const total = e.lengthComputable ? e.total : void 0;
|
|
28141
|
+
const progressBytes = loaded - bytesNotified;
|
|
28142
|
+
const rate = _speedometer(progressBytes);
|
|
28143
|
+
const inRange = loaded <= total;
|
|
28144
|
+
bytesNotified = loaded;
|
|
28145
|
+
const data = {
|
|
28146
|
+
loaded,
|
|
28147
|
+
total,
|
|
28148
|
+
progress: total ? loaded / total : void 0,
|
|
28149
|
+
bytes: progressBytes,
|
|
28150
|
+
rate: rate ? rate : void 0,
|
|
28151
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
28152
|
+
event: e,
|
|
28153
|
+
lengthComputable: total != null,
|
|
28154
|
+
[isDownloadStream ? "download" : "upload"]: true
|
|
28155
|
+
};
|
|
28156
|
+
listener(data);
|
|
28157
|
+
}, freq);
|
|
28158
|
+
};
|
|
28159
|
+
var progressEventDecorator = (total, throttled) => {
|
|
28160
|
+
const lengthComputable = total != null;
|
|
28161
|
+
return [(loaded) => throttled[0]({
|
|
28162
|
+
lengthComputable,
|
|
28163
|
+
total,
|
|
28164
|
+
loaded
|
|
28165
|
+
}), throttled[1]];
|
|
28166
|
+
};
|
|
28167
|
+
var asyncDecorator = (fn) => (...args2) => utils_default.asap(() => fn(...args2));
|
|
28168
|
+
|
|
28104
28169
|
// ../../../node_modules/axios/lib/adapters/http.js
|
|
28105
28170
|
"use strict";
|
|
28106
28171
|
var zlibOptions = {
|
|
@@ -28114,15 +28179,19 @@ var brotliOptions = {
|
|
|
28114
28179
|
var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
|
|
28115
28180
|
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
28116
28181
|
var isHttps = /https:?/;
|
|
28117
|
-
var supportedProtocols =
|
|
28182
|
+
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
|
28118
28183
|
return protocol + ":";
|
|
28119
28184
|
});
|
|
28120
|
-
|
|
28185
|
+
var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
28186
|
+
stream4.on("end", flush).on("error", flush);
|
|
28187
|
+
return throttled;
|
|
28188
|
+
};
|
|
28189
|
+
function dispatchBeforeRedirect(options, responseDetails) {
|
|
28121
28190
|
if (options.beforeRedirects.proxy) {
|
|
28122
28191
|
options.beforeRedirects.proxy(options);
|
|
28123
28192
|
}
|
|
28124
28193
|
if (options.beforeRedirects.config) {
|
|
28125
|
-
options.beforeRedirects.config(options);
|
|
28194
|
+
options.beforeRedirects.config(options, responseDetails);
|
|
28126
28195
|
}
|
|
28127
28196
|
}
|
|
28128
28197
|
function setProxy(options, configProxy, location) {
|
|
@@ -28202,12 +28271,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
28202
28271
|
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
28203
28272
|
lookup = (hostname, opt, cb) => {
|
|
28204
28273
|
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
28274
|
+
if (err) {
|
|
28275
|
+
return cb(err);
|
|
28276
|
+
}
|
|
28205
28277
|
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
28206
28278
|
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
28207
28279
|
});
|
|
28208
28280
|
};
|
|
28209
28281
|
}
|
|
28210
|
-
const emitter = new import_events.
|
|
28282
|
+
const emitter = new import_events.EventEmitter();
|
|
28211
28283
|
const onFinished = () => {
|
|
28212
28284
|
if (config.cancelToken) {
|
|
28213
28285
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -28235,7 +28307,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
28235
28307
|
}
|
|
28236
28308
|
}
|
|
28237
28309
|
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
28238
|
-
const parsed = new URL(fullPath,
|
|
28310
|
+
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
28239
28311
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
28240
28312
|
if (protocol === "data:") {
|
|
28241
28313
|
let convertedData;
|
|
@@ -28275,8 +28347,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
28275
28347
|
}
|
|
28276
28348
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
|
28277
28349
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
28278
|
-
const onDownloadProgress = config
|
|
28279
|
-
const onUploadProgress = config.onUploadProgress;
|
|
28350
|
+
const { onUploadProgress, onDownloadProgress } = config;
|
|
28280
28351
|
const maxRate = config.maxRate;
|
|
28281
28352
|
let maxUploadRate = void 0;
|
|
28282
28353
|
let maxDownloadRate = void 0;
|
|
@@ -28327,14 +28398,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
28327
28398
|
data = import_stream5.default.Readable.from(data, { objectMode: false });
|
|
28328
28399
|
}
|
|
28329
28400
|
data = import_stream5.default.pipeline([data, new AxiosTransformStream_default({
|
|
28330
|
-
length: contentLength,
|
|
28331
28401
|
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
28332
28402
|
})], utils_default.noop);
|
|
28333
|
-
onUploadProgress && data.on("progress", (
|
|
28334
|
-
onUploadProgress(Object.assign(progress2, {
|
|
28335
|
-
upload: true
|
|
28336
|
-
}));
|
|
28337
|
-
});
|
|
28403
|
+
onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
|
|
28338
28404
|
}
|
|
28339
28405
|
let auth = void 0;
|
|
28340
28406
|
if (config.auth) {
|
|
@@ -28374,7 +28440,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
28374
28440
|
if (config.socketPath) {
|
|
28375
28441
|
options.socketPath = config.socketPath;
|
|
28376
28442
|
} else {
|
|
28377
|
-
options.hostname = parsed.hostname;
|
|
28443
|
+
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
28378
28444
|
options.port = parsed.port;
|
|
28379
28445
|
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
28380
28446
|
}
|
|
@@ -28407,16 +28473,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
28407
28473
|
return;
|
|
28408
28474
|
const streams = [res];
|
|
28409
28475
|
const responseLength = +res.headers["content-length"];
|
|
28410
|
-
if (onDownloadProgress) {
|
|
28476
|
+
if (onDownloadProgress || maxDownloadRate) {
|
|
28411
28477
|
const transformStream = new AxiosTransformStream_default({
|
|
28412
|
-
length: utils_default.toFiniteNumber(responseLength),
|
|
28413
28478
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
28414
28479
|
});
|
|
28415
|
-
onDownloadProgress && transformStream.on("progress", (
|
|
28416
|
-
onDownloadProgress(Object.assign(progress2, {
|
|
28417
|
-
download: true
|
|
28418
|
-
}));
|
|
28419
|
-
});
|
|
28480
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
|
|
28420
28481
|
streams.push(transformStream);
|
|
28421
28482
|
}
|
|
28422
28483
|
let responseStream = res;
|
|
@@ -28558,51 +28619,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
28558
28619
|
});
|
|
28559
28620
|
};
|
|
28560
28621
|
|
|
28561
|
-
// ../../../node_modules/axios/lib/helpers/cookies.js
|
|
28562
|
-
"use strict";
|
|
28563
|
-
var cookies_default = node_default.isStandardBrowserEnv ? function standardBrowserEnv() {
|
|
28564
|
-
return {
|
|
28565
|
-
write: function write(name, value, expires, path, domain, secure) {
|
|
28566
|
-
const cookie = [];
|
|
28567
|
-
cookie.push(name + "=" + encodeURIComponent(value));
|
|
28568
|
-
if (utils_default.isNumber(expires)) {
|
|
28569
|
-
cookie.push("expires=" + new Date(expires).toGMTString());
|
|
28570
|
-
}
|
|
28571
|
-
if (utils_default.isString(path)) {
|
|
28572
|
-
cookie.push("path=" + path);
|
|
28573
|
-
}
|
|
28574
|
-
if (utils_default.isString(domain)) {
|
|
28575
|
-
cookie.push("domain=" + domain);
|
|
28576
|
-
}
|
|
28577
|
-
if (secure === true) {
|
|
28578
|
-
cookie.push("secure");
|
|
28579
|
-
}
|
|
28580
|
-
document.cookie = cookie.join("; ");
|
|
28581
|
-
},
|
|
28582
|
-
read: function read(name) {
|
|
28583
|
-
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
28584
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
28585
|
-
},
|
|
28586
|
-
remove: function remove(name) {
|
|
28587
|
-
this.write(name, "", Date.now() - 864e5);
|
|
28588
|
-
}
|
|
28589
|
-
};
|
|
28590
|
-
}() : function nonStandardBrowserEnv() {
|
|
28591
|
-
return {
|
|
28592
|
-
write: function write() {
|
|
28593
|
-
},
|
|
28594
|
-
read: function read() {
|
|
28595
|
-
return null;
|
|
28596
|
-
},
|
|
28597
|
-
remove: function remove() {
|
|
28598
|
-
}
|
|
28599
|
-
};
|
|
28600
|
-
}();
|
|
28601
|
-
|
|
28602
28622
|
// ../../../node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
28603
28623
|
"use strict";
|
|
28604
|
-
var isURLSameOrigin_default =
|
|
28605
|
-
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
28624
|
+
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function standardBrowserEnv() {
|
|
28625
|
+
const msie = platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent);
|
|
28606
28626
|
const urlParsingNode = document.createElement("a");
|
|
28607
28627
|
let originURL;
|
|
28608
28628
|
function resolveURL(url2) {
|
|
@@ -28628,71 +28648,170 @@ var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? function stand
|
|
|
28628
28648
|
const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
28629
28649
|
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
28630
28650
|
};
|
|
28631
|
-
}() : function
|
|
28651
|
+
}() : function nonStandardBrowserEnv() {
|
|
28632
28652
|
return function isURLSameOrigin() {
|
|
28633
28653
|
return true;
|
|
28634
28654
|
};
|
|
28635
28655
|
}();
|
|
28636
28656
|
|
|
28637
|
-
// ../../../node_modules/axios/lib/
|
|
28657
|
+
// ../../../node_modules/axios/lib/helpers/cookies.js
|
|
28658
|
+
var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
28659
|
+
write(name, value, expires, path, domain, secure) {
|
|
28660
|
+
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
28661
|
+
utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
28662
|
+
utils_default.isString(path) && cookie.push("path=" + path);
|
|
28663
|
+
utils_default.isString(domain) && cookie.push("domain=" + domain);
|
|
28664
|
+
secure === true && cookie.push("secure");
|
|
28665
|
+
document.cookie = cookie.join("; ");
|
|
28666
|
+
},
|
|
28667
|
+
read(name) {
|
|
28668
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
28669
|
+
return match ? decodeURIComponent(match[3]) : null;
|
|
28670
|
+
},
|
|
28671
|
+
remove(name) {
|
|
28672
|
+
this.write(name, "", Date.now() - 864e5);
|
|
28673
|
+
}
|
|
28674
|
+
} : {
|
|
28675
|
+
write() {
|
|
28676
|
+
},
|
|
28677
|
+
read() {
|
|
28678
|
+
return null;
|
|
28679
|
+
},
|
|
28680
|
+
remove() {
|
|
28681
|
+
}
|
|
28682
|
+
};
|
|
28683
|
+
|
|
28684
|
+
// ../../../node_modules/axios/lib/core/mergeConfig.js
|
|
28638
28685
|
"use strict";
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
28642
|
-
|
|
28643
|
-
|
|
28644
|
-
|
|
28645
|
-
|
|
28646
|
-
|
|
28647
|
-
|
|
28648
|
-
|
|
28649
|
-
|
|
28650
|
-
|
|
28651
|
-
|
|
28652
|
-
|
|
28653
|
-
|
|
28654
|
-
|
|
28655
|
-
|
|
28656
|
-
|
|
28657
|
-
|
|
28658
|
-
|
|
28659
|
-
|
|
28686
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
28687
|
+
function mergeConfig(config1, config2) {
|
|
28688
|
+
config2 = config2 || {};
|
|
28689
|
+
const config = {};
|
|
28690
|
+
function getMergedValue(target, source, caseless) {
|
|
28691
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
28692
|
+
return utils_default.merge.call({ caseless }, target, source);
|
|
28693
|
+
} else if (utils_default.isPlainObject(source)) {
|
|
28694
|
+
return utils_default.merge({}, source);
|
|
28695
|
+
} else if (utils_default.isArray(source)) {
|
|
28696
|
+
return source.slice();
|
|
28697
|
+
}
|
|
28698
|
+
return source;
|
|
28699
|
+
}
|
|
28700
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
28701
|
+
if (!utils_default.isUndefined(b)) {
|
|
28702
|
+
return getMergedValue(a, b, caseless);
|
|
28703
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
28704
|
+
return getMergedValue(void 0, a, caseless);
|
|
28705
|
+
}
|
|
28706
|
+
}
|
|
28707
|
+
function valueFromConfig2(a, b) {
|
|
28708
|
+
if (!utils_default.isUndefined(b)) {
|
|
28709
|
+
return getMergedValue(void 0, b);
|
|
28710
|
+
}
|
|
28711
|
+
}
|
|
28712
|
+
function defaultToConfig2(a, b) {
|
|
28713
|
+
if (!utils_default.isUndefined(b)) {
|
|
28714
|
+
return getMergedValue(void 0, b);
|
|
28715
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
28716
|
+
return getMergedValue(void 0, a);
|
|
28717
|
+
}
|
|
28718
|
+
}
|
|
28719
|
+
function mergeDirectKeys(a, b, prop) {
|
|
28720
|
+
if (prop in config2) {
|
|
28721
|
+
return getMergedValue(a, b);
|
|
28722
|
+
} else if (prop in config1) {
|
|
28723
|
+
return getMergedValue(void 0, a);
|
|
28724
|
+
}
|
|
28725
|
+
}
|
|
28726
|
+
const mergeMap = {
|
|
28727
|
+
url: valueFromConfig2,
|
|
28728
|
+
method: valueFromConfig2,
|
|
28729
|
+
data: valueFromConfig2,
|
|
28730
|
+
baseURL: defaultToConfig2,
|
|
28731
|
+
transformRequest: defaultToConfig2,
|
|
28732
|
+
transformResponse: defaultToConfig2,
|
|
28733
|
+
paramsSerializer: defaultToConfig2,
|
|
28734
|
+
timeout: defaultToConfig2,
|
|
28735
|
+
timeoutMessage: defaultToConfig2,
|
|
28736
|
+
withCredentials: defaultToConfig2,
|
|
28737
|
+
withXSRFToken: defaultToConfig2,
|
|
28738
|
+
adapter: defaultToConfig2,
|
|
28739
|
+
responseType: defaultToConfig2,
|
|
28740
|
+
xsrfCookieName: defaultToConfig2,
|
|
28741
|
+
xsrfHeaderName: defaultToConfig2,
|
|
28742
|
+
onUploadProgress: defaultToConfig2,
|
|
28743
|
+
onDownloadProgress: defaultToConfig2,
|
|
28744
|
+
decompress: defaultToConfig2,
|
|
28745
|
+
maxContentLength: defaultToConfig2,
|
|
28746
|
+
maxBodyLength: defaultToConfig2,
|
|
28747
|
+
beforeRedirect: defaultToConfig2,
|
|
28748
|
+
transport: defaultToConfig2,
|
|
28749
|
+
httpAgent: defaultToConfig2,
|
|
28750
|
+
httpsAgent: defaultToConfig2,
|
|
28751
|
+
cancelToken: defaultToConfig2,
|
|
28752
|
+
socketPath: defaultToConfig2,
|
|
28753
|
+
responseEncoding: defaultToConfig2,
|
|
28754
|
+
validateStatus: mergeDirectKeys,
|
|
28755
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
28660
28756
|
};
|
|
28757
|
+
utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
28758
|
+
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
28759
|
+
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
28760
|
+
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
28761
|
+
});
|
|
28762
|
+
return config;
|
|
28661
28763
|
}
|
|
28764
|
+
|
|
28765
|
+
// ../../../node_modules/axios/lib/helpers/resolveConfig.js
|
|
28766
|
+
var resolveConfig_default = (config) => {
|
|
28767
|
+
const newConfig = mergeConfig({}, config);
|
|
28768
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
28769
|
+
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
28770
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
|
28771
|
+
if (auth) {
|
|
28772
|
+
headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
|
|
28773
|
+
}
|
|
28774
|
+
let contentType;
|
|
28775
|
+
if (utils_default.isFormData(data)) {
|
|
28776
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
|
28777
|
+
headers.setContentType(void 0);
|
|
28778
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
|
28779
|
+
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
|
28780
|
+
headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
|
28781
|
+
}
|
|
28782
|
+
}
|
|
28783
|
+
if (platform_default.hasStandardBrowserEnv) {
|
|
28784
|
+
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
28785
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
|
|
28786
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
|
28787
|
+
if (xsrfValue) {
|
|
28788
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
|
28789
|
+
}
|
|
28790
|
+
}
|
|
28791
|
+
}
|
|
28792
|
+
return newConfig;
|
|
28793
|
+
};
|
|
28794
|
+
|
|
28795
|
+
// ../../../node_modules/axios/lib/adapters/xhr.js
|
|
28662
28796
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
28663
28797
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
|
28664
28798
|
return new Promise(function dispatchXhrRequest(resolve3, reject) {
|
|
28665
|
-
|
|
28666
|
-
|
|
28667
|
-
const
|
|
28799
|
+
const _config = resolveConfig_default(config);
|
|
28800
|
+
let requestData = _config.data;
|
|
28801
|
+
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
28802
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
28668
28803
|
let onCanceled;
|
|
28804
|
+
let uploadThrottled, downloadThrottled;
|
|
28805
|
+
let flushUpload, flushDownload;
|
|
28669
28806
|
function done() {
|
|
28670
|
-
|
|
28671
|
-
|
|
28672
|
-
|
|
28673
|
-
|
|
28674
|
-
config.signal.removeEventListener("abort", onCanceled);
|
|
28675
|
-
}
|
|
28676
|
-
}
|
|
28677
|
-
let contentType;
|
|
28678
|
-
if (utils_default.isFormData(requestData)) {
|
|
28679
|
-
if (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv) {
|
|
28680
|
-
requestHeaders.setContentType(false);
|
|
28681
|
-
} else if (!requestHeaders.getContentType(/^\s*multipart\/form-data/)) {
|
|
28682
|
-
requestHeaders.setContentType("multipart/form-data");
|
|
28683
|
-
} else if (utils_default.isString(contentType = requestHeaders.getContentType())) {
|
|
28684
|
-
requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, "$1"));
|
|
28685
|
-
}
|
|
28807
|
+
flushUpload && flushUpload();
|
|
28808
|
+
flushDownload && flushDownload();
|
|
28809
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
28810
|
+
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
28686
28811
|
}
|
|
28687
28812
|
let request = new XMLHttpRequest();
|
|
28688
|
-
|
|
28689
|
-
|
|
28690
|
-
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
28691
|
-
requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
|
|
28692
|
-
}
|
|
28693
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
28694
|
-
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
28695
|
-
request.timeout = config.timeout;
|
|
28813
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
28814
|
+
request.timeout = _config.timeout;
|
|
28696
28815
|
function onloadend() {
|
|
28697
28816
|
if (!request) {
|
|
28698
28817
|
return;
|
|
@@ -28741,39 +28860,36 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
28741
28860
|
request = null;
|
|
28742
28861
|
};
|
|
28743
28862
|
request.ontimeout = function handleTimeout() {
|
|
28744
|
-
let timeoutErrorMessage =
|
|
28745
|
-
const transitional2 =
|
|
28746
|
-
if (
|
|
28747
|
-
timeoutErrorMessage =
|
|
28863
|
+
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
28864
|
+
const transitional2 = _config.transitional || transitional_default;
|
|
28865
|
+
if (_config.timeoutErrorMessage) {
|
|
28866
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
28748
28867
|
}
|
|
28749
28868
|
reject(new AxiosError_default(timeoutErrorMessage, transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, config, request));
|
|
28750
28869
|
request = null;
|
|
28751
28870
|
};
|
|
28752
|
-
if (node_default.isStandardBrowserEnv) {
|
|
28753
|
-
const xsrfValue = isURLSameOrigin_default(fullPath) && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
|
|
28754
|
-
if (xsrfValue) {
|
|
28755
|
-
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
28756
|
-
}
|
|
28757
|
-
}
|
|
28758
28871
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
28759
28872
|
if ("setRequestHeader" in request) {
|
|
28760
28873
|
utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
28761
28874
|
request.setRequestHeader(key, val);
|
|
28762
28875
|
});
|
|
28763
28876
|
}
|
|
28764
|
-
if (!utils_default.isUndefined(
|
|
28765
|
-
request.withCredentials = !!
|
|
28877
|
+
if (!utils_default.isUndefined(_config.withCredentials)) {
|
|
28878
|
+
request.withCredentials = !!_config.withCredentials;
|
|
28766
28879
|
}
|
|
28767
28880
|
if (responseType && responseType !== "json") {
|
|
28768
|
-
request.responseType =
|
|
28881
|
+
request.responseType = _config.responseType;
|
|
28769
28882
|
}
|
|
28770
|
-
if (
|
|
28771
|
-
|
|
28883
|
+
if (onDownloadProgress) {
|
|
28884
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
28885
|
+
request.addEventListener("progress", downloadThrottled);
|
|
28772
28886
|
}
|
|
28773
|
-
if (
|
|
28774
|
-
|
|
28887
|
+
if (onUploadProgress && request.upload) {
|
|
28888
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
28889
|
+
request.upload.addEventListener("progress", uploadThrottled);
|
|
28890
|
+
request.upload.addEventListener("loadend", flushUpload);
|
|
28775
28891
|
}
|
|
28776
|
-
if (
|
|
28892
|
+
if (_config.cancelToken || _config.signal) {
|
|
28777
28893
|
onCanceled = (cancel) => {
|
|
28778
28894
|
if (!request) {
|
|
28779
28895
|
return;
|
|
@@ -28782,13 +28898,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
28782
28898
|
request.abort();
|
|
28783
28899
|
request = null;
|
|
28784
28900
|
};
|
|
28785
|
-
|
|
28786
|
-
if (
|
|
28787
|
-
|
|
28901
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
28902
|
+
if (_config.signal) {
|
|
28903
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
28788
28904
|
}
|
|
28789
28905
|
}
|
|
28790
|
-
const protocol = parseProtocol(
|
|
28791
|
-
if (protocol &&
|
|
28906
|
+
const protocol = parseProtocol(_config.url);
|
|
28907
|
+
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
|
28792
28908
|
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
28793
28909
|
return;
|
|
28794
28910
|
}
|
|
@@ -28796,10 +28912,276 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
28796
28912
|
});
|
|
28797
28913
|
};
|
|
28798
28914
|
|
|
28915
|
+
// ../../../node_modules/axios/lib/helpers/composeSignals.js
|
|
28916
|
+
var composeSignals = (signals, timeout) => {
|
|
28917
|
+
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
28918
|
+
if (timeout || length) {
|
|
28919
|
+
let controller = new AbortController();
|
|
28920
|
+
let aborted;
|
|
28921
|
+
const onabort = function(reason) {
|
|
28922
|
+
if (!aborted) {
|
|
28923
|
+
aborted = true;
|
|
28924
|
+
unsubscribe();
|
|
28925
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
28926
|
+
controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
|
|
28927
|
+
}
|
|
28928
|
+
};
|
|
28929
|
+
let timer = timeout && setTimeout(() => {
|
|
28930
|
+
timer = null;
|
|
28931
|
+
onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
28932
|
+
}, timeout);
|
|
28933
|
+
const unsubscribe = () => {
|
|
28934
|
+
if (signals) {
|
|
28935
|
+
timer && clearTimeout(timer);
|
|
28936
|
+
timer = null;
|
|
28937
|
+
signals.forEach((signal2) => {
|
|
28938
|
+
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
28939
|
+
});
|
|
28940
|
+
signals = null;
|
|
28941
|
+
}
|
|
28942
|
+
};
|
|
28943
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
28944
|
+
const { signal } = controller;
|
|
28945
|
+
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
28946
|
+
return signal;
|
|
28947
|
+
}
|
|
28948
|
+
};
|
|
28949
|
+
var composeSignals_default = composeSignals;
|
|
28950
|
+
|
|
28951
|
+
// ../../../node_modules/axios/lib/helpers/trackStream.js
|
|
28952
|
+
var streamChunk = function* (chunk, chunkSize) {
|
|
28953
|
+
let len = chunk.byteLength;
|
|
28954
|
+
if (!chunkSize || len < chunkSize) {
|
|
28955
|
+
yield chunk;
|
|
28956
|
+
return;
|
|
28957
|
+
}
|
|
28958
|
+
let pos = 0;
|
|
28959
|
+
let end;
|
|
28960
|
+
while (pos < len) {
|
|
28961
|
+
end = pos + chunkSize;
|
|
28962
|
+
yield chunk.slice(pos, end);
|
|
28963
|
+
pos = end;
|
|
28964
|
+
}
|
|
28965
|
+
};
|
|
28966
|
+
var readBytes = async function* (iterable, chunkSize) {
|
|
28967
|
+
for await (const chunk of readStream(iterable)) {
|
|
28968
|
+
yield* streamChunk(chunk, chunkSize);
|
|
28969
|
+
}
|
|
28970
|
+
};
|
|
28971
|
+
var readStream = async function* (stream4) {
|
|
28972
|
+
if (stream4[Symbol.asyncIterator]) {
|
|
28973
|
+
yield* stream4;
|
|
28974
|
+
return;
|
|
28975
|
+
}
|
|
28976
|
+
const reader = stream4.getReader();
|
|
28977
|
+
try {
|
|
28978
|
+
for (; ; ) {
|
|
28979
|
+
const { done, value } = await reader.read();
|
|
28980
|
+
if (done) {
|
|
28981
|
+
break;
|
|
28982
|
+
}
|
|
28983
|
+
yield value;
|
|
28984
|
+
}
|
|
28985
|
+
} finally {
|
|
28986
|
+
await reader.cancel();
|
|
28987
|
+
}
|
|
28988
|
+
};
|
|
28989
|
+
var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
28990
|
+
const iterator = readBytes(stream4, chunkSize);
|
|
28991
|
+
let bytes = 0;
|
|
28992
|
+
let done;
|
|
28993
|
+
let _onFinish = (e) => {
|
|
28994
|
+
if (!done) {
|
|
28995
|
+
done = true;
|
|
28996
|
+
onFinish && onFinish(e);
|
|
28997
|
+
}
|
|
28998
|
+
};
|
|
28999
|
+
return new ReadableStream({
|
|
29000
|
+
async pull(controller) {
|
|
29001
|
+
try {
|
|
29002
|
+
const { done: done2, value } = await iterator.next();
|
|
29003
|
+
if (done2) {
|
|
29004
|
+
_onFinish();
|
|
29005
|
+
controller.close();
|
|
29006
|
+
return;
|
|
29007
|
+
}
|
|
29008
|
+
let len = value.byteLength;
|
|
29009
|
+
if (onProgress) {
|
|
29010
|
+
let loadedBytes = bytes += len;
|
|
29011
|
+
onProgress(loadedBytes);
|
|
29012
|
+
}
|
|
29013
|
+
controller.enqueue(new Uint8Array(value));
|
|
29014
|
+
} catch (err) {
|
|
29015
|
+
_onFinish(err);
|
|
29016
|
+
throw err;
|
|
29017
|
+
}
|
|
29018
|
+
},
|
|
29019
|
+
cancel(reason) {
|
|
29020
|
+
_onFinish(reason);
|
|
29021
|
+
return iterator.return();
|
|
29022
|
+
}
|
|
29023
|
+
}, {
|
|
29024
|
+
highWaterMark: 2
|
|
29025
|
+
});
|
|
29026
|
+
};
|
|
29027
|
+
|
|
29028
|
+
// ../../../node_modules/axios/lib/adapters/fetch.js
|
|
29029
|
+
var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
|
29030
|
+
var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
|
29031
|
+
var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
|
29032
|
+
var test = (fn, ...args2) => {
|
|
29033
|
+
try {
|
|
29034
|
+
return !!fn(...args2);
|
|
29035
|
+
} catch (e) {
|
|
29036
|
+
return false;
|
|
29037
|
+
}
|
|
29038
|
+
};
|
|
29039
|
+
var supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
29040
|
+
let duplexAccessed = false;
|
|
29041
|
+
const hasContentType = new Request(platform_default.origin, {
|
|
29042
|
+
body: new ReadableStream(),
|
|
29043
|
+
method: "POST",
|
|
29044
|
+
get duplex() {
|
|
29045
|
+
duplexAccessed = true;
|
|
29046
|
+
return "half";
|
|
29047
|
+
}
|
|
29048
|
+
}).headers.has("Content-Type");
|
|
29049
|
+
return duplexAccessed && !hasContentType;
|
|
29050
|
+
});
|
|
29051
|
+
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
29052
|
+
var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
29053
|
+
var resolvers = {
|
|
29054
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
29055
|
+
};
|
|
29056
|
+
isFetchSupported && ((res) => {
|
|
29057
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
29058
|
+
!resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
|
29059
|
+
throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
|
|
29060
|
+
});
|
|
29061
|
+
});
|
|
29062
|
+
})(new Response());
|
|
29063
|
+
var getBodyLength = async (body) => {
|
|
29064
|
+
if (body == null) {
|
|
29065
|
+
return 0;
|
|
29066
|
+
}
|
|
29067
|
+
if (utils_default.isBlob(body)) {
|
|
29068
|
+
return body.size;
|
|
29069
|
+
}
|
|
29070
|
+
if (utils_default.isSpecCompliantForm(body)) {
|
|
29071
|
+
const _request = new Request(platform_default.origin, {
|
|
29072
|
+
method: "POST",
|
|
29073
|
+
body
|
|
29074
|
+
});
|
|
29075
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
29076
|
+
}
|
|
29077
|
+
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
|
29078
|
+
return body.byteLength;
|
|
29079
|
+
}
|
|
29080
|
+
if (utils_default.isURLSearchParams(body)) {
|
|
29081
|
+
body = body + "";
|
|
29082
|
+
}
|
|
29083
|
+
if (utils_default.isString(body)) {
|
|
29084
|
+
return (await encodeText(body)).byteLength;
|
|
29085
|
+
}
|
|
29086
|
+
};
|
|
29087
|
+
var resolveBodyLength = async (headers, body) => {
|
|
29088
|
+
const length = utils_default.toFiniteNumber(headers.getContentLength());
|
|
29089
|
+
return length == null ? getBodyLength(body) : length;
|
|
29090
|
+
};
|
|
29091
|
+
var fetch_default = isFetchSupported && (async (config) => {
|
|
29092
|
+
let {
|
|
29093
|
+
url: url2,
|
|
29094
|
+
method,
|
|
29095
|
+
data,
|
|
29096
|
+
signal,
|
|
29097
|
+
cancelToken,
|
|
29098
|
+
timeout,
|
|
29099
|
+
onDownloadProgress,
|
|
29100
|
+
onUploadProgress,
|
|
29101
|
+
responseType,
|
|
29102
|
+
headers,
|
|
29103
|
+
withCredentials = "same-origin",
|
|
29104
|
+
fetchOptions
|
|
29105
|
+
} = resolveConfig_default(config);
|
|
29106
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
29107
|
+
let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
29108
|
+
let request;
|
|
29109
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
29110
|
+
composedSignal.unsubscribe();
|
|
29111
|
+
});
|
|
29112
|
+
let requestContentLength;
|
|
29113
|
+
try {
|
|
29114
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
29115
|
+
let _request = new Request(url2, {
|
|
29116
|
+
method: "POST",
|
|
29117
|
+
body: data,
|
|
29118
|
+
duplex: "half"
|
|
29119
|
+
});
|
|
29120
|
+
let contentTypeHeader;
|
|
29121
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
29122
|
+
headers.setContentType(contentTypeHeader);
|
|
29123
|
+
}
|
|
29124
|
+
if (_request.body) {
|
|
29125
|
+
const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
|
|
29126
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
29127
|
+
}
|
|
29128
|
+
}
|
|
29129
|
+
if (!utils_default.isString(withCredentials)) {
|
|
29130
|
+
withCredentials = withCredentials ? "include" : "omit";
|
|
29131
|
+
}
|
|
29132
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
29133
|
+
request = new Request(url2, {
|
|
29134
|
+
...fetchOptions,
|
|
29135
|
+
signal: composedSignal,
|
|
29136
|
+
method: method.toUpperCase(),
|
|
29137
|
+
headers: headers.normalize().toJSON(),
|
|
29138
|
+
body: data,
|
|
29139
|
+
duplex: "half",
|
|
29140
|
+
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
29141
|
+
});
|
|
29142
|
+
let response = await fetch(request);
|
|
29143
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
29144
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
29145
|
+
const options = {};
|
|
29146
|
+
["status", "statusText", "headers"].forEach((prop) => {
|
|
29147
|
+
options[prop] = response[prop];
|
|
29148
|
+
});
|
|
29149
|
+
const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
|
29150
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
29151
|
+
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
29152
|
+
flush && flush();
|
|
29153
|
+
unsubscribe && unsubscribe();
|
|
29154
|
+
}), options);
|
|
29155
|
+
}
|
|
29156
|
+
responseType = responseType || "text";
|
|
29157
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
|
|
29158
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
29159
|
+
return await new Promise((resolve3, reject) => {
|
|
29160
|
+
settle(resolve3, reject, {
|
|
29161
|
+
data: responseData,
|
|
29162
|
+
headers: AxiosHeaders_default.from(response.headers),
|
|
29163
|
+
status: response.status,
|
|
29164
|
+
statusText: response.statusText,
|
|
29165
|
+
config,
|
|
29166
|
+
request
|
|
29167
|
+
});
|
|
29168
|
+
});
|
|
29169
|
+
} catch (err) {
|
|
29170
|
+
unsubscribe && unsubscribe();
|
|
29171
|
+
if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
|
|
29172
|
+
throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), {
|
|
29173
|
+
cause: err.cause || err
|
|
29174
|
+
});
|
|
29175
|
+
}
|
|
29176
|
+
throw AxiosError_default.from(err, err && err.code, config, request);
|
|
29177
|
+
}
|
|
29178
|
+
});
|
|
29179
|
+
|
|
28799
29180
|
// ../../../node_modules/axios/lib/adapters/adapters.js
|
|
28800
29181
|
var knownAdapters = {
|
|
28801
29182
|
http: http_default,
|
|
28802
|
-
xhr: xhr_default
|
|
29183
|
+
xhr: xhr_default,
|
|
29184
|
+
fetch: fetch_default
|
|
28803
29185
|
};
|
|
28804
29186
|
utils_default.forEach(knownAdapters, (fn, value) => {
|
|
28805
29187
|
if (fn) {
|
|
@@ -28879,86 +29261,6 @@ function dispatchRequest(config) {
|
|
|
28879
29261
|
});
|
|
28880
29262
|
}
|
|
28881
29263
|
|
|
28882
|
-
// ../../../node_modules/axios/lib/core/mergeConfig.js
|
|
28883
|
-
"use strict";
|
|
28884
|
-
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
|
|
28885
|
-
function mergeConfig(config1, config2) {
|
|
28886
|
-
config2 = config2 || {};
|
|
28887
|
-
const config = {};
|
|
28888
|
-
function getMergedValue(target, source, caseless) {
|
|
28889
|
-
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
28890
|
-
return utils_default.merge.call({ caseless }, target, source);
|
|
28891
|
-
} else if (utils_default.isPlainObject(source)) {
|
|
28892
|
-
return utils_default.merge({}, source);
|
|
28893
|
-
} else if (utils_default.isArray(source)) {
|
|
28894
|
-
return source.slice();
|
|
28895
|
-
}
|
|
28896
|
-
return source;
|
|
28897
|
-
}
|
|
28898
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
28899
|
-
if (!utils_default.isUndefined(b)) {
|
|
28900
|
-
return getMergedValue(a, b, caseless);
|
|
28901
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
28902
|
-
return getMergedValue(void 0, a, caseless);
|
|
28903
|
-
}
|
|
28904
|
-
}
|
|
28905
|
-
function valueFromConfig2(a, b) {
|
|
28906
|
-
if (!utils_default.isUndefined(b)) {
|
|
28907
|
-
return getMergedValue(void 0, b);
|
|
28908
|
-
}
|
|
28909
|
-
}
|
|
28910
|
-
function defaultToConfig2(a, b) {
|
|
28911
|
-
if (!utils_default.isUndefined(b)) {
|
|
28912
|
-
return getMergedValue(void 0, b);
|
|
28913
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
28914
|
-
return getMergedValue(void 0, a);
|
|
28915
|
-
}
|
|
28916
|
-
}
|
|
28917
|
-
function mergeDirectKeys(a, b, prop) {
|
|
28918
|
-
if (prop in config2) {
|
|
28919
|
-
return getMergedValue(a, b);
|
|
28920
|
-
} else if (prop in config1) {
|
|
28921
|
-
return getMergedValue(void 0, a);
|
|
28922
|
-
}
|
|
28923
|
-
}
|
|
28924
|
-
const mergeMap = {
|
|
28925
|
-
url: valueFromConfig2,
|
|
28926
|
-
method: valueFromConfig2,
|
|
28927
|
-
data: valueFromConfig2,
|
|
28928
|
-
baseURL: defaultToConfig2,
|
|
28929
|
-
transformRequest: defaultToConfig2,
|
|
28930
|
-
transformResponse: defaultToConfig2,
|
|
28931
|
-
paramsSerializer: defaultToConfig2,
|
|
28932
|
-
timeout: defaultToConfig2,
|
|
28933
|
-
timeoutMessage: defaultToConfig2,
|
|
28934
|
-
withCredentials: defaultToConfig2,
|
|
28935
|
-
adapter: defaultToConfig2,
|
|
28936
|
-
responseType: defaultToConfig2,
|
|
28937
|
-
xsrfCookieName: defaultToConfig2,
|
|
28938
|
-
xsrfHeaderName: defaultToConfig2,
|
|
28939
|
-
onUploadProgress: defaultToConfig2,
|
|
28940
|
-
onDownloadProgress: defaultToConfig2,
|
|
28941
|
-
decompress: defaultToConfig2,
|
|
28942
|
-
maxContentLength: defaultToConfig2,
|
|
28943
|
-
maxBodyLength: defaultToConfig2,
|
|
28944
|
-
beforeRedirect: defaultToConfig2,
|
|
28945
|
-
transport: defaultToConfig2,
|
|
28946
|
-
httpAgent: defaultToConfig2,
|
|
28947
|
-
httpsAgent: defaultToConfig2,
|
|
28948
|
-
cancelToken: defaultToConfig2,
|
|
28949
|
-
socketPath: defaultToConfig2,
|
|
28950
|
-
responseEncoding: defaultToConfig2,
|
|
28951
|
-
validateStatus: mergeDirectKeys,
|
|
28952
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
28953
|
-
};
|
|
28954
|
-
utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
28955
|
-
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
28956
|
-
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
28957
|
-
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
28958
|
-
});
|
|
28959
|
-
return config;
|
|
28960
|
-
}
|
|
28961
|
-
|
|
28962
29264
|
// ../../../node_modules/axios/lib/helpers/validator.js
|
|
28963
29265
|
"use strict";
|
|
28964
29266
|
var validators = {};
|
|
@@ -29021,7 +29323,27 @@ var Axios = class {
|
|
|
29021
29323
|
response: new InterceptorManager_default()
|
|
29022
29324
|
};
|
|
29023
29325
|
}
|
|
29024
|
-
request(configOrUrl, config) {
|
|
29326
|
+
async request(configOrUrl, config) {
|
|
29327
|
+
try {
|
|
29328
|
+
return await this._request(configOrUrl, config);
|
|
29329
|
+
} catch (err) {
|
|
29330
|
+
if (err instanceof Error) {
|
|
29331
|
+
let dummy;
|
|
29332
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
|
|
29333
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
29334
|
+
try {
|
|
29335
|
+
if (!err.stack) {
|
|
29336
|
+
err.stack = stack;
|
|
29337
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
|
29338
|
+
err.stack += "\n" + stack;
|
|
29339
|
+
}
|
|
29340
|
+
} catch (e) {
|
|
29341
|
+
}
|
|
29342
|
+
}
|
|
29343
|
+
throw err;
|
|
29344
|
+
}
|
|
29345
|
+
}
|
|
29346
|
+
_request(configOrUrl, config) {
|
|
29025
29347
|
if (typeof configOrUrl === "string") {
|
|
29026
29348
|
config = config || {};
|
|
29027
29349
|
config.url = configOrUrl;
|
|
@@ -29205,6 +29527,15 @@ var CancelToken = class {
|
|
|
29205
29527
|
this._listeners.splice(index, 1);
|
|
29206
29528
|
}
|
|
29207
29529
|
}
|
|
29530
|
+
toAbortSignal() {
|
|
29531
|
+
const controller = new AbortController();
|
|
29532
|
+
const abort = (err) => {
|
|
29533
|
+
controller.abort(err);
|
|
29534
|
+
};
|
|
29535
|
+
this.subscribe(abort);
|
|
29536
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
29537
|
+
return controller.signal;
|
|
29538
|
+
}
|
|
29208
29539
|
static source() {
|
|
29209
29540
|
let cancel;
|
|
29210
29541
|
const token = new CancelToken(function executor(c) {
|