@odinlin/utils 1.0.0 → 1.0.1
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/CHANGELOG.md +13 -0
- package/dist/browser/browser.cjs +2 -0
- package/dist/browser/browser.d.ts +2 -1
- package/dist/browser/browser.js +2 -1
- package/dist/browser/promise/delay.cjs +8 -0
- package/dist/browser/promise/delay.d.ts +5 -0
- package/dist/browser/promise/delay.d.ts.map +1 -0
- package/dist/browser/promise/delay.js +8 -0
- package/dist/browser/promise/delay.js.map +1 -0
- package/dist/browser/promise/index.cjs +2 -0
- package/dist/browser/promise/index.d.ts +2 -1
- package/dist/browser/promise/index.js +2 -1
- package/dist/browser/string/className.d.ts.map +1 -1
- package/dist/noExternal/browser.esm.js +7 -1
- package/dist/noExternal/browser.esm.min.js +7 -7
- package/dist/noExternal/browser.esm.min.js.map +1 -1
- package/dist/noExternal/browser.umd.js +7 -0
- package/dist/noExternal/browser.umd.min.js +9 -9
- package/dist/noExternal/browser.umd.min.js.map +1 -1
- package/dist/noExternal/node.cjs.js +3624 -1
- package/dist/noExternal/node.cjs.min.js +37 -0
- package/dist/noExternal/node.cjs.min.js.map +1 -1
- package/dist/noExternal/node.esm.js +7 -1
- package/dist/noExternal/node.esm.min.js +15 -15
- package/dist/noExternal/node.esm.min.js.map +1 -1
- package/dist/node/node.cjs +2 -0
- package/dist/node/node.d.ts +2 -1
- package/dist/node/node.js +2 -1
- package/dist/node/promise/delay.cjs +8 -0
- package/dist/node/promise/delay.d.ts +5 -0
- package/dist/node/promise/delay.d.ts.map +1 -0
- package/dist/node/promise/delay.js +8 -0
- package/dist/node/promise/delay.js.map +1 -0
- package/dist/node/promise/index.cjs +2 -0
- package/dist/node/promise/index.d.ts +2 -1
- package/dist/node/promise/index.js +2 -1
- package/dist/node/string/className.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +14 -15
|
@@ -7751,6 +7751,12 @@ var require_await_to_js_umd = /* @__PURE__ */ __commonJS({ "../../node_modules/.
|
|
|
7751
7751
|
var import_await_to_js_umd = require_await_to_js_umd();
|
|
7752
7752
|
const promiseAwaitTo = import_await_to_js_umd.to;
|
|
7753
7753
|
|
|
7754
|
+
//#endregion
|
|
7755
|
+
//#region src/promise/delay.ts
|
|
7756
|
+
async function promiseDelay(ms) {
|
|
7757
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
7758
|
+
}
|
|
7759
|
+
|
|
7754
7760
|
//#endregion
|
|
7755
7761
|
//#region ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
|
|
7756
7762
|
var Node = class {
|
|
@@ -18279,4 +18285,3621 @@ function parsePropPath(name) {
|
|
|
18279
18285
|
*
|
|
18280
18286
|
* @returns An object with the same keys and values as the array.
|
|
18281
18287
|
*/
|
|
18282
|
-
|
|
18288
|
+
function arrayToObject(arr) {
|
|
18289
|
+
const obj = {};
|
|
18290
|
+
const keys = Object.keys(arr);
|
|
18291
|
+
let i;
|
|
18292
|
+
const len = keys.length;
|
|
18293
|
+
let key;
|
|
18294
|
+
for (i = 0; i < len; i++) {
|
|
18295
|
+
key = keys[i];
|
|
18296
|
+
obj[key] = arr[key];
|
|
18297
|
+
}
|
|
18298
|
+
return obj;
|
|
18299
|
+
}
|
|
18300
|
+
/**
|
|
18301
|
+
* It takes a FormData object and returns a JavaScript object
|
|
18302
|
+
*
|
|
18303
|
+
* @param {string} formData The FormData object to convert to JSON.
|
|
18304
|
+
*
|
|
18305
|
+
* @returns {Object<string, any> | null} The converted object.
|
|
18306
|
+
*/
|
|
18307
|
+
function formDataToJSON(formData) {
|
|
18308
|
+
function buildPath(path$1, value, target, index) {
|
|
18309
|
+
let name = path$1[index++];
|
|
18310
|
+
if (name === "__proto__") return true;
|
|
18311
|
+
const isNumericKey = Number.isFinite(+name);
|
|
18312
|
+
const isLast = index >= path$1.length;
|
|
18313
|
+
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
18314
|
+
if (isLast) {
|
|
18315
|
+
if (utils_default.hasOwnProp(target, name)) target[name] = [target[name], value];
|
|
18316
|
+
else target[name] = value;
|
|
18317
|
+
return !isNumericKey;
|
|
18318
|
+
}
|
|
18319
|
+
if (!target[name] || !utils_default.isObject(target[name])) target[name] = [];
|
|
18320
|
+
if (buildPath(path$1, value, target[name], index) && utils_default.isArray(target[name])) target[name] = arrayToObject(target[name]);
|
|
18321
|
+
return !isNumericKey;
|
|
18322
|
+
}
|
|
18323
|
+
if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
|
|
18324
|
+
const obj = {};
|
|
18325
|
+
utils_default.forEachEntry(formData, (name, value) => {
|
|
18326
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
18327
|
+
});
|
|
18328
|
+
return obj;
|
|
18329
|
+
}
|
|
18330
|
+
return null;
|
|
18331
|
+
}
|
|
18332
|
+
var formDataToJSON_default = formDataToJSON;
|
|
18333
|
+
|
|
18334
|
+
//#endregion
|
|
18335
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/defaults/index.js
|
|
18336
|
+
/**
|
|
18337
|
+
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
18338
|
+
* of the input
|
|
18339
|
+
*
|
|
18340
|
+
* @param {any} rawValue - The value to be stringified.
|
|
18341
|
+
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
18342
|
+
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
18343
|
+
*
|
|
18344
|
+
* @returns {string} A stringified version of the rawValue.
|
|
18345
|
+
*/
|
|
18346
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
18347
|
+
if (utils_default.isString(rawValue)) try {
|
|
18348
|
+
(parser || JSON.parse)(rawValue);
|
|
18349
|
+
return utils_default.trim(rawValue);
|
|
18350
|
+
} catch (e) {
|
|
18351
|
+
if (e.name !== "SyntaxError") throw e;
|
|
18352
|
+
}
|
|
18353
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
18354
|
+
}
|
|
18355
|
+
const defaults = {
|
|
18356
|
+
transitional: transitional_default,
|
|
18357
|
+
adapter: [
|
|
18358
|
+
"xhr",
|
|
18359
|
+
"http",
|
|
18360
|
+
"fetch"
|
|
18361
|
+
],
|
|
18362
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
18363
|
+
const contentType$1 = headers.getContentType() || "";
|
|
18364
|
+
const hasJSONContentType = contentType$1.indexOf("application/json") > -1;
|
|
18365
|
+
const isObjectPayload = utils_default.isObject(data);
|
|
18366
|
+
if (isObjectPayload && utils_default.isHTMLForm(data)) data = new FormData(data);
|
|
18367
|
+
if (utils_default.isFormData(data)) return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
18368
|
+
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)) return data;
|
|
18369
|
+
if (utils_default.isArrayBufferView(data)) return data.buffer;
|
|
18370
|
+
if (utils_default.isURLSearchParams(data)) {
|
|
18371
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
18372
|
+
return data.toString();
|
|
18373
|
+
}
|
|
18374
|
+
let isFileList$1;
|
|
18375
|
+
if (isObjectPayload) {
|
|
18376
|
+
if (contentType$1.indexOf("application/x-www-form-urlencoded") > -1) return toURLEncodedForm(data, this.formSerializer).toString();
|
|
18377
|
+
if ((isFileList$1 = utils_default.isFileList(data)) || contentType$1.indexOf("multipart/form-data") > -1) {
|
|
18378
|
+
const _FormData = this.env && this.env.FormData;
|
|
18379
|
+
return toFormData_default(isFileList$1 ? { "files[]": data } : data, _FormData && new _FormData(), this.formSerializer);
|
|
18380
|
+
}
|
|
18381
|
+
}
|
|
18382
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
18383
|
+
headers.setContentType("application/json", false);
|
|
18384
|
+
return stringifySafely(data);
|
|
18385
|
+
}
|
|
18386
|
+
return data;
|
|
18387
|
+
}],
|
|
18388
|
+
transformResponse: [function transformResponse(data) {
|
|
18389
|
+
const transitional = this.transitional || defaults.transitional;
|
|
18390
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
18391
|
+
const JSONRequested = this.responseType === "json";
|
|
18392
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) return data;
|
|
18393
|
+
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
18394
|
+
const strictJSONParsing = !(transitional && transitional.silentJSONParsing) && JSONRequested;
|
|
18395
|
+
try {
|
|
18396
|
+
return JSON.parse(data, this.parseReviver);
|
|
18397
|
+
} catch (e) {
|
|
18398
|
+
if (strictJSONParsing) {
|
|
18399
|
+
if (e.name === "SyntaxError") throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
|
|
18400
|
+
throw e;
|
|
18401
|
+
}
|
|
18402
|
+
}
|
|
18403
|
+
}
|
|
18404
|
+
return data;
|
|
18405
|
+
}],
|
|
18406
|
+
timeout: 0,
|
|
18407
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
18408
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
18409
|
+
maxContentLength: -1,
|
|
18410
|
+
maxBodyLength: -1,
|
|
18411
|
+
env: {
|
|
18412
|
+
FormData: platform_default.classes.FormData,
|
|
18413
|
+
Blob: platform_default.classes.Blob
|
|
18414
|
+
},
|
|
18415
|
+
validateStatus: function validateStatus(status) {
|
|
18416
|
+
return status >= 200 && status < 300;
|
|
18417
|
+
},
|
|
18418
|
+
headers: { common: {
|
|
18419
|
+
"Accept": "application/json, text/plain, */*",
|
|
18420
|
+
"Content-Type": void 0
|
|
18421
|
+
} }
|
|
18422
|
+
};
|
|
18423
|
+
utils_default.forEach([
|
|
18424
|
+
"delete",
|
|
18425
|
+
"get",
|
|
18426
|
+
"head",
|
|
18427
|
+
"post",
|
|
18428
|
+
"put",
|
|
18429
|
+
"patch"
|
|
18430
|
+
], (method) => {
|
|
18431
|
+
defaults.headers[method] = {};
|
|
18432
|
+
});
|
|
18433
|
+
var defaults_default = defaults;
|
|
18434
|
+
|
|
18435
|
+
//#endregion
|
|
18436
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/parseHeaders.js
|
|
18437
|
+
const ignoreDuplicateOf = utils_default.toObjectSet([
|
|
18438
|
+
"age",
|
|
18439
|
+
"authorization",
|
|
18440
|
+
"content-length",
|
|
18441
|
+
"content-type",
|
|
18442
|
+
"etag",
|
|
18443
|
+
"expires",
|
|
18444
|
+
"from",
|
|
18445
|
+
"host",
|
|
18446
|
+
"if-modified-since",
|
|
18447
|
+
"if-unmodified-since",
|
|
18448
|
+
"last-modified",
|
|
18449
|
+
"location",
|
|
18450
|
+
"max-forwards",
|
|
18451
|
+
"proxy-authorization",
|
|
18452
|
+
"referer",
|
|
18453
|
+
"retry-after",
|
|
18454
|
+
"user-agent"
|
|
18455
|
+
]);
|
|
18456
|
+
/**
|
|
18457
|
+
* Parse headers into an object
|
|
18458
|
+
*
|
|
18459
|
+
* ```
|
|
18460
|
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
18461
|
+
* Content-Type: application/json
|
|
18462
|
+
* Connection: keep-alive
|
|
18463
|
+
* Transfer-Encoding: chunked
|
|
18464
|
+
* ```
|
|
18465
|
+
*
|
|
18466
|
+
* @param {String} rawHeaders Headers needing to be parsed
|
|
18467
|
+
*
|
|
18468
|
+
* @returns {Object} Headers parsed into an object
|
|
18469
|
+
*/
|
|
18470
|
+
var parseHeaders_default = (rawHeaders) => {
|
|
18471
|
+
const parsed = {};
|
|
18472
|
+
let key;
|
|
18473
|
+
let val;
|
|
18474
|
+
let i;
|
|
18475
|
+
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
18476
|
+
i = line.indexOf(":");
|
|
18477
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
18478
|
+
val = line.substring(i + 1).trim();
|
|
18479
|
+
if (!key || parsed[key] && ignoreDuplicateOf[key]) return;
|
|
18480
|
+
if (key === "set-cookie") if (parsed[key]) parsed[key].push(val);
|
|
18481
|
+
else parsed[key] = [val];
|
|
18482
|
+
else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
18483
|
+
});
|
|
18484
|
+
return parsed;
|
|
18485
|
+
};
|
|
18486
|
+
|
|
18487
|
+
//#endregion
|
|
18488
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/AxiosHeaders.js
|
|
18489
|
+
const $internals = Symbol("internals");
|
|
18490
|
+
function normalizeHeader(header) {
|
|
18491
|
+
return header && String(header).trim().toLowerCase();
|
|
18492
|
+
}
|
|
18493
|
+
function normalizeValue(value) {
|
|
18494
|
+
if (value === false || value == null) return value;
|
|
18495
|
+
return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
18496
|
+
}
|
|
18497
|
+
function parseTokens(str) {
|
|
18498
|
+
const tokens = Object.create(null);
|
|
18499
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
18500
|
+
let match;
|
|
18501
|
+
while (match = tokensRE.exec(str)) tokens[match[1]] = match[2];
|
|
18502
|
+
return tokens;
|
|
18503
|
+
}
|
|
18504
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
18505
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
18506
|
+
if (utils_default.isFunction(filter)) return filter.call(this, value, header);
|
|
18507
|
+
if (isHeaderNameFilter) value = header;
|
|
18508
|
+
if (!utils_default.isString(value)) return;
|
|
18509
|
+
if (utils_default.isString(filter)) return value.indexOf(filter) !== -1;
|
|
18510
|
+
if (utils_default.isRegExp(filter)) return filter.test(value);
|
|
18511
|
+
}
|
|
18512
|
+
function formatHeader(header) {
|
|
18513
|
+
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w$1, char, str) => {
|
|
18514
|
+
return char.toUpperCase() + str;
|
|
18515
|
+
});
|
|
18516
|
+
}
|
|
18517
|
+
function buildAccessors(obj, header) {
|
|
18518
|
+
const accessorName = utils_default.toCamelCase(" " + header);
|
|
18519
|
+
[
|
|
18520
|
+
"get",
|
|
18521
|
+
"set",
|
|
18522
|
+
"has"
|
|
18523
|
+
].forEach((methodName) => {
|
|
18524
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
18525
|
+
value: function(arg1, arg2, arg3) {
|
|
18526
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
18527
|
+
},
|
|
18528
|
+
configurable: true
|
|
18529
|
+
});
|
|
18530
|
+
});
|
|
18531
|
+
}
|
|
18532
|
+
var AxiosHeaders$1 = class {
|
|
18533
|
+
constructor(headers) {
|
|
18534
|
+
headers && this.set(headers);
|
|
18535
|
+
}
|
|
18536
|
+
set(header, valueOrRewrite, rewrite) {
|
|
18537
|
+
const self$1 = this;
|
|
18538
|
+
function setHeader(_value, _header, _rewrite) {
|
|
18539
|
+
const lHeader = normalizeHeader(_header);
|
|
18540
|
+
if (!lHeader) throw new Error("header name must be a non-empty string");
|
|
18541
|
+
const key = utils_default.findKey(self$1, lHeader);
|
|
18542
|
+
if (!key || self$1[key] === void 0 || _rewrite === true || _rewrite === void 0 && self$1[key] !== false) self$1[key || _header] = normalizeValue(_value);
|
|
18543
|
+
}
|
|
18544
|
+
const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
18545
|
+
if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
|
|
18546
|
+
else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
18547
|
+
else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
|
|
18548
|
+
let obj = {}, dest, key;
|
|
18549
|
+
for (const entry of header) {
|
|
18550
|
+
if (!utils_default.isArray(entry)) throw TypeError("Object iterator must return a key-value pair");
|
|
18551
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
18552
|
+
}
|
|
18553
|
+
setHeaders(obj, valueOrRewrite);
|
|
18554
|
+
} else header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
18555
|
+
return this;
|
|
18556
|
+
}
|
|
18557
|
+
get(header, parser) {
|
|
18558
|
+
header = normalizeHeader(header);
|
|
18559
|
+
if (header) {
|
|
18560
|
+
const key = utils_default.findKey(this, header);
|
|
18561
|
+
if (key) {
|
|
18562
|
+
const value = this[key];
|
|
18563
|
+
if (!parser) return value;
|
|
18564
|
+
if (parser === true) return parseTokens(value);
|
|
18565
|
+
if (utils_default.isFunction(parser)) return parser.call(this, value, key);
|
|
18566
|
+
if (utils_default.isRegExp(parser)) return parser.exec(value);
|
|
18567
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
18568
|
+
}
|
|
18569
|
+
}
|
|
18570
|
+
}
|
|
18571
|
+
has(header, matcher) {
|
|
18572
|
+
header = normalizeHeader(header);
|
|
18573
|
+
if (header) {
|
|
18574
|
+
const key = utils_default.findKey(this, header);
|
|
18575
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
18576
|
+
}
|
|
18577
|
+
return false;
|
|
18578
|
+
}
|
|
18579
|
+
delete(header, matcher) {
|
|
18580
|
+
const self$1 = this;
|
|
18581
|
+
let deleted = false;
|
|
18582
|
+
function deleteHeader(_header) {
|
|
18583
|
+
_header = normalizeHeader(_header);
|
|
18584
|
+
if (_header) {
|
|
18585
|
+
const key = utils_default.findKey(self$1, _header);
|
|
18586
|
+
if (key && (!matcher || matchHeaderValue(self$1, self$1[key], key, matcher))) {
|
|
18587
|
+
delete self$1[key];
|
|
18588
|
+
deleted = true;
|
|
18589
|
+
}
|
|
18590
|
+
}
|
|
18591
|
+
}
|
|
18592
|
+
if (utils_default.isArray(header)) header.forEach(deleteHeader);
|
|
18593
|
+
else deleteHeader(header);
|
|
18594
|
+
return deleted;
|
|
18595
|
+
}
|
|
18596
|
+
clear(matcher) {
|
|
18597
|
+
const keys = Object.keys(this);
|
|
18598
|
+
let i = keys.length;
|
|
18599
|
+
let deleted = false;
|
|
18600
|
+
while (i--) {
|
|
18601
|
+
const key = keys[i];
|
|
18602
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
18603
|
+
delete this[key];
|
|
18604
|
+
deleted = true;
|
|
18605
|
+
}
|
|
18606
|
+
}
|
|
18607
|
+
return deleted;
|
|
18608
|
+
}
|
|
18609
|
+
normalize(format$1) {
|
|
18610
|
+
const self$1 = this;
|
|
18611
|
+
const headers = {};
|
|
18612
|
+
utils_default.forEach(this, (value, header) => {
|
|
18613
|
+
const key = utils_default.findKey(headers, header);
|
|
18614
|
+
if (key) {
|
|
18615
|
+
self$1[key] = normalizeValue(value);
|
|
18616
|
+
delete self$1[header];
|
|
18617
|
+
return;
|
|
18618
|
+
}
|
|
18619
|
+
const normalized = format$1 ? formatHeader(header) : String(header).trim();
|
|
18620
|
+
if (normalized !== header) delete self$1[header];
|
|
18621
|
+
self$1[normalized] = normalizeValue(value);
|
|
18622
|
+
headers[normalized] = true;
|
|
18623
|
+
});
|
|
18624
|
+
return this;
|
|
18625
|
+
}
|
|
18626
|
+
concat(...targets) {
|
|
18627
|
+
return this.constructor.concat(this, ...targets);
|
|
18628
|
+
}
|
|
18629
|
+
toJSON(asStrings) {
|
|
18630
|
+
const obj = Object.create(null);
|
|
18631
|
+
utils_default.forEach(this, (value, header) => {
|
|
18632
|
+
value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
|
|
18633
|
+
});
|
|
18634
|
+
return obj;
|
|
18635
|
+
}
|
|
18636
|
+
[Symbol.iterator]() {
|
|
18637
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
18638
|
+
}
|
|
18639
|
+
toString() {
|
|
18640
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
18641
|
+
}
|
|
18642
|
+
getSetCookie() {
|
|
18643
|
+
return this.get("set-cookie") || [];
|
|
18644
|
+
}
|
|
18645
|
+
get [Symbol.toStringTag]() {
|
|
18646
|
+
return "AxiosHeaders";
|
|
18647
|
+
}
|
|
18648
|
+
static from(thing) {
|
|
18649
|
+
return thing instanceof this ? thing : new this(thing);
|
|
18650
|
+
}
|
|
18651
|
+
static concat(first, ...targets) {
|
|
18652
|
+
const computed = new this(first);
|
|
18653
|
+
targets.forEach((target) => computed.set(target));
|
|
18654
|
+
return computed;
|
|
18655
|
+
}
|
|
18656
|
+
static accessor(header) {
|
|
18657
|
+
const accessors = (this[$internals] = this[$internals] = { accessors: {} }).accessors;
|
|
18658
|
+
const prototype$2 = this.prototype;
|
|
18659
|
+
function defineAccessor(_header) {
|
|
18660
|
+
const lHeader = normalizeHeader(_header);
|
|
18661
|
+
if (!accessors[lHeader]) {
|
|
18662
|
+
buildAccessors(prototype$2, _header);
|
|
18663
|
+
accessors[lHeader] = true;
|
|
18664
|
+
}
|
|
18665
|
+
}
|
|
18666
|
+
utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
18667
|
+
return this;
|
|
18668
|
+
}
|
|
18669
|
+
};
|
|
18670
|
+
AxiosHeaders$1.accessor([
|
|
18671
|
+
"Content-Type",
|
|
18672
|
+
"Content-Length",
|
|
18673
|
+
"Accept",
|
|
18674
|
+
"Accept-Encoding",
|
|
18675
|
+
"User-Agent",
|
|
18676
|
+
"Authorization"
|
|
18677
|
+
]);
|
|
18678
|
+
utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
|
|
18679
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
18680
|
+
return {
|
|
18681
|
+
get: () => value,
|
|
18682
|
+
set(headerValue) {
|
|
18683
|
+
this[mapped] = headerValue;
|
|
18684
|
+
}
|
|
18685
|
+
};
|
|
18686
|
+
});
|
|
18687
|
+
utils_default.freezeMethods(AxiosHeaders$1);
|
|
18688
|
+
var AxiosHeaders_default = AxiosHeaders$1;
|
|
18689
|
+
|
|
18690
|
+
//#endregion
|
|
18691
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/transformData.js
|
|
18692
|
+
/**
|
|
18693
|
+
* Transform the data for a request or a response
|
|
18694
|
+
*
|
|
18695
|
+
* @param {Array|Function} fns A single function or Array of functions
|
|
18696
|
+
* @param {?Object} response The response object
|
|
18697
|
+
*
|
|
18698
|
+
* @returns {*} The resulting transformed data
|
|
18699
|
+
*/
|
|
18700
|
+
function transformData(fns, response) {
|
|
18701
|
+
const config = this || defaults_default;
|
|
18702
|
+
const context = response || config;
|
|
18703
|
+
const headers = AxiosHeaders_default.from(context.headers);
|
|
18704
|
+
let data = context.data;
|
|
18705
|
+
utils_default.forEach(fns, function transform(fn) {
|
|
18706
|
+
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
18707
|
+
});
|
|
18708
|
+
headers.normalize();
|
|
18709
|
+
return data;
|
|
18710
|
+
}
|
|
18711
|
+
|
|
18712
|
+
//#endregion
|
|
18713
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/isCancel.js
|
|
18714
|
+
function isCancel$1(value) {
|
|
18715
|
+
return !!(value && value.__CANCEL__);
|
|
18716
|
+
}
|
|
18717
|
+
|
|
18718
|
+
//#endregion
|
|
18719
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/CanceledError.js
|
|
18720
|
+
/**
|
|
18721
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
18722
|
+
*
|
|
18723
|
+
* @param {string=} message The message.
|
|
18724
|
+
* @param {Object=} config The config.
|
|
18725
|
+
* @param {Object=} request The request.
|
|
18726
|
+
*
|
|
18727
|
+
* @returns {CanceledError} The created error.
|
|
18728
|
+
*/
|
|
18729
|
+
function CanceledError$1(message, config, request) {
|
|
18730
|
+
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
18731
|
+
this.name = "CanceledError";
|
|
18732
|
+
}
|
|
18733
|
+
utils_default.inherits(CanceledError$1, AxiosError_default, { __CANCEL__: true });
|
|
18734
|
+
var CanceledError_default = CanceledError$1;
|
|
18735
|
+
|
|
18736
|
+
//#endregion
|
|
18737
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/settle.js
|
|
18738
|
+
/**
|
|
18739
|
+
* Resolve or reject a Promise based on response status.
|
|
18740
|
+
*
|
|
18741
|
+
* @param {Function} resolve A function that resolves the promise.
|
|
18742
|
+
* @param {Function} reject A function that rejects the promise.
|
|
18743
|
+
* @param {object} response The response.
|
|
18744
|
+
*
|
|
18745
|
+
* @returns {object} The response.
|
|
18746
|
+
*/
|
|
18747
|
+
function settle(resolve, reject, response) {
|
|
18748
|
+
const validateStatus = response.config.validateStatus;
|
|
18749
|
+
if (!response.status || !validateStatus || validateStatus(response.status)) resolve(response);
|
|
18750
|
+
else reject(new AxiosError_default("Request failed with status code " + response.status, [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
18751
|
+
}
|
|
18752
|
+
|
|
18753
|
+
//#endregion
|
|
18754
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
18755
|
+
/**
|
|
18756
|
+
* Determines whether the specified URL is absolute
|
|
18757
|
+
*
|
|
18758
|
+
* @param {string} url The URL to test
|
|
18759
|
+
*
|
|
18760
|
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
18761
|
+
*/
|
|
18762
|
+
function isAbsoluteURL(url$3) {
|
|
18763
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url$3);
|
|
18764
|
+
}
|
|
18765
|
+
|
|
18766
|
+
//#endregion
|
|
18767
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/combineURLs.js
|
|
18768
|
+
/**
|
|
18769
|
+
* Creates a new URL by combining the specified URLs
|
|
18770
|
+
*
|
|
18771
|
+
* @param {string} baseURL The base URL
|
|
18772
|
+
* @param {string} relativeURL The relative URL
|
|
18773
|
+
*
|
|
18774
|
+
* @returns {string} The combined URL
|
|
18775
|
+
*/
|
|
18776
|
+
function combineURLs(baseURL, relativeURL) {
|
|
18777
|
+
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
18778
|
+
}
|
|
18779
|
+
|
|
18780
|
+
//#endregion
|
|
18781
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/buildFullPath.js
|
|
18782
|
+
/**
|
|
18783
|
+
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
18784
|
+
* only when the requestedURL is not already an absolute URL.
|
|
18785
|
+
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
18786
|
+
*
|
|
18787
|
+
* @param {string} baseURL The base URL
|
|
18788
|
+
* @param {string} requestedURL Absolute or relative URL to combine
|
|
18789
|
+
*
|
|
18790
|
+
* @returns {string} The combined full path
|
|
18791
|
+
*/
|
|
18792
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
18793
|
+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
18794
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) return combineURLs(baseURL, requestedURL);
|
|
18795
|
+
return requestedURL;
|
|
18796
|
+
}
|
|
18797
|
+
|
|
18798
|
+
//#endregion
|
|
18799
|
+
//#region ../../node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js
|
|
18800
|
+
var require_proxy_from_env = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js": ((exports) => {
|
|
18801
|
+
var parseUrl$1 = require("url").parse;
|
|
18802
|
+
var DEFAULT_PORTS = {
|
|
18803
|
+
ftp: 21,
|
|
18804
|
+
gopher: 70,
|
|
18805
|
+
http: 80,
|
|
18806
|
+
https: 443,
|
|
18807
|
+
ws: 80,
|
|
18808
|
+
wss: 443
|
|
18809
|
+
};
|
|
18810
|
+
var stringEndsWith = String.prototype.endsWith || function(s$1) {
|
|
18811
|
+
return s$1.length <= this.length && this.indexOf(s$1, this.length - s$1.length) !== -1;
|
|
18812
|
+
};
|
|
18813
|
+
/**
|
|
18814
|
+
* @param {string|object} url - The URL, or the result from url.parse.
|
|
18815
|
+
* @return {string} The URL of the proxy that should handle the request to the
|
|
18816
|
+
* given URL. If no proxy is set, this will be an empty string.
|
|
18817
|
+
*/
|
|
18818
|
+
function getProxyForUrl(url$3) {
|
|
18819
|
+
var parsedUrl = typeof url$3 === "string" ? parseUrl$1(url$3) : url$3 || {};
|
|
18820
|
+
var proto = parsedUrl.protocol;
|
|
18821
|
+
var hostname = parsedUrl.host;
|
|
18822
|
+
var port = parsedUrl.port;
|
|
18823
|
+
if (typeof hostname !== "string" || !hostname || typeof proto !== "string") return "";
|
|
18824
|
+
proto = proto.split(":", 1)[0];
|
|
18825
|
+
hostname = hostname.replace(/:\d*$/, "");
|
|
18826
|
+
port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
|
|
18827
|
+
if (!shouldProxy(hostname, port)) return "";
|
|
18828
|
+
var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
|
|
18829
|
+
if (proxy && proxy.indexOf("://") === -1) proxy = proto + "://" + proxy;
|
|
18830
|
+
return proxy;
|
|
18831
|
+
}
|
|
18832
|
+
/**
|
|
18833
|
+
* Determines whether a given URL should be proxied.
|
|
18834
|
+
*
|
|
18835
|
+
* @param {string} hostname - The host name of the URL.
|
|
18836
|
+
* @param {number} port - The effective port of the URL.
|
|
18837
|
+
* @returns {boolean} Whether the given URL should be proxied.
|
|
18838
|
+
* @private
|
|
18839
|
+
*/
|
|
18840
|
+
function shouldProxy(hostname, port) {
|
|
18841
|
+
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
|
|
18842
|
+
if (!NO_PROXY) return true;
|
|
18843
|
+
if (NO_PROXY === "*") return false;
|
|
18844
|
+
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
18845
|
+
if (!proxy) return true;
|
|
18846
|
+
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
18847
|
+
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
18848
|
+
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
18849
|
+
if (parsedProxyPort && parsedProxyPort !== port) return true;
|
|
18850
|
+
if (!/^[.*]/.test(parsedProxyHostname)) return hostname !== parsedProxyHostname;
|
|
18851
|
+
if (parsedProxyHostname.charAt(0) === "*") parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
18852
|
+
return !stringEndsWith.call(hostname, parsedProxyHostname);
|
|
18853
|
+
});
|
|
18854
|
+
}
|
|
18855
|
+
/**
|
|
18856
|
+
* Get the value for an environment variable.
|
|
18857
|
+
*
|
|
18858
|
+
* @param {string} key - The name of the environment variable.
|
|
18859
|
+
* @return {string} The value of the environment variable.
|
|
18860
|
+
* @private
|
|
18861
|
+
*/
|
|
18862
|
+
function getEnv(key) {
|
|
18863
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
18864
|
+
}
|
|
18865
|
+
exports.getProxyForUrl = getProxyForUrl;
|
|
18866
|
+
}) });
|
|
18867
|
+
|
|
18868
|
+
//#endregion
|
|
18869
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11/node_modules/follow-redirects/debug.js
|
|
18870
|
+
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.11/node_modules/follow-redirects/debug.js": ((exports, module) => {
|
|
18871
|
+
var debug$1;
|
|
18872
|
+
module.exports = function() {
|
|
18873
|
+
if (!debug$1) {
|
|
18874
|
+
try {
|
|
18875
|
+
debug$1 = require_src()("follow-redirects");
|
|
18876
|
+
} catch (error) {}
|
|
18877
|
+
if (typeof debug$1 !== "function") debug$1 = function() {};
|
|
18878
|
+
}
|
|
18879
|
+
debug$1.apply(null, arguments);
|
|
18880
|
+
};
|
|
18881
|
+
}) });
|
|
18882
|
+
|
|
18883
|
+
//#endregion
|
|
18884
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11/node_modules/follow-redirects/index.js
|
|
18885
|
+
var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.11/node_modules/follow-redirects/index.js": ((exports, module) => {
|
|
18886
|
+
var url$1 = require("url");
|
|
18887
|
+
var URL$1 = url$1.URL;
|
|
18888
|
+
var http$2 = require("http");
|
|
18889
|
+
var https$2 = require("https");
|
|
18890
|
+
var Writable = require("stream").Writable;
|
|
18891
|
+
var assert = require("assert");
|
|
18892
|
+
var debug = require_debug();
|
|
18893
|
+
// istanbul ignore next
|
|
18894
|
+
(function detectUnsupportedEnvironment() {
|
|
18895
|
+
var looksLikeNode = typeof process !== "undefined";
|
|
18896
|
+
var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
|
18897
|
+
var looksLikeV8 = isFunction$2(Error.captureStackTrace);
|
|
18898
|
+
if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) console.warn("The follow-redirects package should be excluded from browser builds.");
|
|
18899
|
+
})();
|
|
18900
|
+
var useNativeURL = false;
|
|
18901
|
+
try {
|
|
18902
|
+
assert(new URL$1(""));
|
|
18903
|
+
} catch (error) {
|
|
18904
|
+
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
18905
|
+
}
|
|
18906
|
+
var preservedUrlFields = [
|
|
18907
|
+
"auth",
|
|
18908
|
+
"host",
|
|
18909
|
+
"hostname",
|
|
18910
|
+
"href",
|
|
18911
|
+
"path",
|
|
18912
|
+
"pathname",
|
|
18913
|
+
"port",
|
|
18914
|
+
"protocol",
|
|
18915
|
+
"query",
|
|
18916
|
+
"search",
|
|
18917
|
+
"hash"
|
|
18918
|
+
];
|
|
18919
|
+
var events$1 = [
|
|
18920
|
+
"abort",
|
|
18921
|
+
"aborted",
|
|
18922
|
+
"connect",
|
|
18923
|
+
"error",
|
|
18924
|
+
"socket",
|
|
18925
|
+
"timeout"
|
|
18926
|
+
];
|
|
18927
|
+
var eventHandlers = Object.create(null);
|
|
18928
|
+
events$1.forEach(function(event) {
|
|
18929
|
+
eventHandlers[event] = function(arg1, arg2, arg3) {
|
|
18930
|
+
this._redirectable.emit(event, arg1, arg2, arg3);
|
|
18931
|
+
};
|
|
18932
|
+
});
|
|
18933
|
+
var InvalidUrlError = createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError);
|
|
18934
|
+
var RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed");
|
|
18935
|
+
var TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded", RedirectionError);
|
|
18936
|
+
var MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit");
|
|
18937
|
+
var WriteAfterEndError = createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
|
|
18938
|
+
// istanbul ignore next
|
|
18939
|
+
var destroy = Writable.prototype.destroy || noop;
|
|
18940
|
+
function RedirectableRequest(options, responseCallback) {
|
|
18941
|
+
Writable.call(this);
|
|
18942
|
+
this._sanitizeOptions(options);
|
|
18943
|
+
this._options = options;
|
|
18944
|
+
this._ended = false;
|
|
18945
|
+
this._ending = false;
|
|
18946
|
+
this._redirectCount = 0;
|
|
18947
|
+
this._redirects = [];
|
|
18948
|
+
this._requestBodyLength = 0;
|
|
18949
|
+
this._requestBodyBuffers = [];
|
|
18950
|
+
if (responseCallback) this.on("response", responseCallback);
|
|
18951
|
+
var self$1 = this;
|
|
18952
|
+
this._onNativeResponse = function(response) {
|
|
18953
|
+
try {
|
|
18954
|
+
self$1._processResponse(response);
|
|
18955
|
+
} catch (cause) {
|
|
18956
|
+
self$1.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
18957
|
+
}
|
|
18958
|
+
};
|
|
18959
|
+
this._performRequest();
|
|
18960
|
+
}
|
|
18961
|
+
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
18962
|
+
RedirectableRequest.prototype.abort = function() {
|
|
18963
|
+
destroyRequest(this._currentRequest);
|
|
18964
|
+
this._currentRequest.abort();
|
|
18965
|
+
this.emit("abort");
|
|
18966
|
+
};
|
|
18967
|
+
RedirectableRequest.prototype.destroy = function(error) {
|
|
18968
|
+
destroyRequest(this._currentRequest, error);
|
|
18969
|
+
destroy.call(this, error);
|
|
18970
|
+
return this;
|
|
18971
|
+
};
|
|
18972
|
+
RedirectableRequest.prototype.write = function(data, encoding, callback) {
|
|
18973
|
+
if (this._ending) throw new WriteAfterEndError();
|
|
18974
|
+
if (!isString$1(data) && !isBuffer(data)) throw new TypeError("data should be a string, Buffer or Uint8Array");
|
|
18975
|
+
if (isFunction$2(encoding)) {
|
|
18976
|
+
callback = encoding;
|
|
18977
|
+
encoding = null;
|
|
18978
|
+
}
|
|
18979
|
+
if (data.length === 0) {
|
|
18980
|
+
if (callback) callback();
|
|
18981
|
+
return;
|
|
18982
|
+
}
|
|
18983
|
+
if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
|
|
18984
|
+
this._requestBodyLength += data.length;
|
|
18985
|
+
this._requestBodyBuffers.push({
|
|
18986
|
+
data,
|
|
18987
|
+
encoding
|
|
18988
|
+
});
|
|
18989
|
+
this._currentRequest.write(data, encoding, callback);
|
|
18990
|
+
} else {
|
|
18991
|
+
this.emit("error", new MaxBodyLengthExceededError());
|
|
18992
|
+
this.abort();
|
|
18993
|
+
}
|
|
18994
|
+
};
|
|
18995
|
+
RedirectableRequest.prototype.end = function(data, encoding, callback) {
|
|
18996
|
+
if (isFunction$2(data)) {
|
|
18997
|
+
callback = data;
|
|
18998
|
+
data = encoding = null;
|
|
18999
|
+
} else if (isFunction$2(encoding)) {
|
|
19000
|
+
callback = encoding;
|
|
19001
|
+
encoding = null;
|
|
19002
|
+
}
|
|
19003
|
+
if (!data) {
|
|
19004
|
+
this._ended = this._ending = true;
|
|
19005
|
+
this._currentRequest.end(null, null, callback);
|
|
19006
|
+
} else {
|
|
19007
|
+
var self$1 = this;
|
|
19008
|
+
var currentRequest = this._currentRequest;
|
|
19009
|
+
this.write(data, encoding, function() {
|
|
19010
|
+
self$1._ended = true;
|
|
19011
|
+
currentRequest.end(null, null, callback);
|
|
19012
|
+
});
|
|
19013
|
+
this._ending = true;
|
|
19014
|
+
}
|
|
19015
|
+
};
|
|
19016
|
+
RedirectableRequest.prototype.setHeader = function(name, value) {
|
|
19017
|
+
this._options.headers[name] = value;
|
|
19018
|
+
this._currentRequest.setHeader(name, value);
|
|
19019
|
+
};
|
|
19020
|
+
RedirectableRequest.prototype.removeHeader = function(name) {
|
|
19021
|
+
delete this._options.headers[name];
|
|
19022
|
+
this._currentRequest.removeHeader(name);
|
|
19023
|
+
};
|
|
19024
|
+
RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
|
|
19025
|
+
var self$1 = this;
|
|
19026
|
+
function destroyOnTimeout(socket) {
|
|
19027
|
+
socket.setTimeout(msecs);
|
|
19028
|
+
socket.removeListener("timeout", socket.destroy);
|
|
19029
|
+
socket.addListener("timeout", socket.destroy);
|
|
19030
|
+
}
|
|
19031
|
+
function startTimer(socket) {
|
|
19032
|
+
if (self$1._timeout) clearTimeout(self$1._timeout);
|
|
19033
|
+
self$1._timeout = setTimeout(function() {
|
|
19034
|
+
self$1.emit("timeout");
|
|
19035
|
+
clearTimer();
|
|
19036
|
+
}, msecs);
|
|
19037
|
+
destroyOnTimeout(socket);
|
|
19038
|
+
}
|
|
19039
|
+
function clearTimer() {
|
|
19040
|
+
if (self$1._timeout) {
|
|
19041
|
+
clearTimeout(self$1._timeout);
|
|
19042
|
+
self$1._timeout = null;
|
|
19043
|
+
}
|
|
19044
|
+
self$1.removeListener("abort", clearTimer);
|
|
19045
|
+
self$1.removeListener("error", clearTimer);
|
|
19046
|
+
self$1.removeListener("response", clearTimer);
|
|
19047
|
+
self$1.removeListener("close", clearTimer);
|
|
19048
|
+
if (callback) self$1.removeListener("timeout", callback);
|
|
19049
|
+
if (!self$1.socket) self$1._currentRequest.removeListener("socket", startTimer);
|
|
19050
|
+
}
|
|
19051
|
+
if (callback) this.on("timeout", callback);
|
|
19052
|
+
if (this.socket) startTimer(this.socket);
|
|
19053
|
+
else this._currentRequest.once("socket", startTimer);
|
|
19054
|
+
this.on("socket", destroyOnTimeout);
|
|
19055
|
+
this.on("abort", clearTimer);
|
|
19056
|
+
this.on("error", clearTimer);
|
|
19057
|
+
this.on("response", clearTimer);
|
|
19058
|
+
this.on("close", clearTimer);
|
|
19059
|
+
return this;
|
|
19060
|
+
};
|
|
19061
|
+
[
|
|
19062
|
+
"flushHeaders",
|
|
19063
|
+
"getHeader",
|
|
19064
|
+
"setNoDelay",
|
|
19065
|
+
"setSocketKeepAlive"
|
|
19066
|
+
].forEach(function(method) {
|
|
19067
|
+
RedirectableRequest.prototype[method] = function(a, b) {
|
|
19068
|
+
return this._currentRequest[method](a, b);
|
|
19069
|
+
};
|
|
19070
|
+
});
|
|
19071
|
+
[
|
|
19072
|
+
"aborted",
|
|
19073
|
+
"connection",
|
|
19074
|
+
"socket"
|
|
19075
|
+
].forEach(function(property) {
|
|
19076
|
+
Object.defineProperty(RedirectableRequest.prototype, property, { get: function() {
|
|
19077
|
+
return this._currentRequest[property];
|
|
19078
|
+
} });
|
|
19079
|
+
});
|
|
19080
|
+
RedirectableRequest.prototype._sanitizeOptions = function(options) {
|
|
19081
|
+
if (!options.headers) options.headers = {};
|
|
19082
|
+
if (options.host) {
|
|
19083
|
+
if (!options.hostname) options.hostname = options.host;
|
|
19084
|
+
delete options.host;
|
|
19085
|
+
}
|
|
19086
|
+
if (!options.pathname && options.path) {
|
|
19087
|
+
var searchPos = options.path.indexOf("?");
|
|
19088
|
+
if (searchPos < 0) options.pathname = options.path;
|
|
19089
|
+
else {
|
|
19090
|
+
options.pathname = options.path.substring(0, searchPos);
|
|
19091
|
+
options.search = options.path.substring(searchPos);
|
|
19092
|
+
}
|
|
19093
|
+
}
|
|
19094
|
+
};
|
|
19095
|
+
RedirectableRequest.prototype._performRequest = function() {
|
|
19096
|
+
var protocol = this._options.protocol;
|
|
19097
|
+
var nativeProtocol = this._options.nativeProtocols[protocol];
|
|
19098
|
+
if (!nativeProtocol) throw new TypeError("Unsupported protocol " + protocol);
|
|
19099
|
+
if (this._options.agents) {
|
|
19100
|
+
var scheme = protocol.slice(0, -1);
|
|
19101
|
+
this._options.agent = this._options.agents[scheme];
|
|
19102
|
+
}
|
|
19103
|
+
var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
|
|
19104
|
+
request._redirectable = this;
|
|
19105
|
+
for (var event of events$1) request.on(event, eventHandlers[event]);
|
|
19106
|
+
this._currentUrl = /^\//.test(this._options.path) ? url$1.format(this._options) : this._options.path;
|
|
19107
|
+
if (this._isRedirect) {
|
|
19108
|
+
var i = 0;
|
|
19109
|
+
var self$1 = this;
|
|
19110
|
+
var buffers = this._requestBodyBuffers;
|
|
19111
|
+
(function writeNext(error) {
|
|
19112
|
+
// istanbul ignore else
|
|
19113
|
+
if (request === self$1._currentRequest) {
|
|
19114
|
+
// istanbul ignore if
|
|
19115
|
+
if (error) self$1.emit("error", error);
|
|
19116
|
+
else if (i < buffers.length) {
|
|
19117
|
+
var buffer = buffers[i++];
|
|
19118
|
+
// istanbul ignore else
|
|
19119
|
+
if (!request.finished) request.write(buffer.data, buffer.encoding, writeNext);
|
|
19120
|
+
} else if (self$1._ended) request.end();
|
|
19121
|
+
}
|
|
19122
|
+
})();
|
|
19123
|
+
}
|
|
19124
|
+
};
|
|
19125
|
+
RedirectableRequest.prototype._processResponse = function(response) {
|
|
19126
|
+
var statusCode = response.statusCode;
|
|
19127
|
+
if (this._options.trackRedirects) this._redirects.push({
|
|
19128
|
+
url: this._currentUrl,
|
|
19129
|
+
headers: response.headers,
|
|
19130
|
+
statusCode
|
|
19131
|
+
});
|
|
19132
|
+
var location = response.headers.location;
|
|
19133
|
+
if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) {
|
|
19134
|
+
response.responseUrl = this._currentUrl;
|
|
19135
|
+
response.redirects = this._redirects;
|
|
19136
|
+
this.emit("response", response);
|
|
19137
|
+
this._requestBodyBuffers = [];
|
|
19138
|
+
return;
|
|
19139
|
+
}
|
|
19140
|
+
destroyRequest(this._currentRequest);
|
|
19141
|
+
response.destroy();
|
|
19142
|
+
if (++this._redirectCount > this._options.maxRedirects) throw new TooManyRedirectsError();
|
|
19143
|
+
var requestHeaders;
|
|
19144
|
+
var beforeRedirect = this._options.beforeRedirect;
|
|
19145
|
+
if (beforeRedirect) requestHeaders = Object.assign({ Host: response.req.getHeader("host") }, this._options.headers);
|
|
19146
|
+
var method = this._options.method;
|
|
19147
|
+
if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
|
|
19148
|
+
this._options.method = "GET";
|
|
19149
|
+
this._requestBodyBuffers = [];
|
|
19150
|
+
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
19151
|
+
}
|
|
19152
|
+
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
19153
|
+
var currentUrlParts = parseUrl(this._currentUrl);
|
|
19154
|
+
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
19155
|
+
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url$1.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
19156
|
+
var redirectUrl = resolveUrl(location, currentUrl);
|
|
19157
|
+
debug("redirecting to", redirectUrl.href);
|
|
19158
|
+
this._isRedirect = true;
|
|
19159
|
+
spreadUrlObject(redirectUrl, this._options);
|
|
19160
|
+
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
|
|
19161
|
+
if (isFunction$2(beforeRedirect)) {
|
|
19162
|
+
var responseDetails = {
|
|
19163
|
+
headers: response.headers,
|
|
19164
|
+
statusCode
|
|
19165
|
+
};
|
|
19166
|
+
var requestDetails = {
|
|
19167
|
+
url: currentUrl,
|
|
19168
|
+
method,
|
|
19169
|
+
headers: requestHeaders
|
|
19170
|
+
};
|
|
19171
|
+
beforeRedirect(this._options, responseDetails, requestDetails);
|
|
19172
|
+
this._sanitizeOptions(this._options);
|
|
19173
|
+
}
|
|
19174
|
+
this._performRequest();
|
|
19175
|
+
};
|
|
19176
|
+
function wrap(protocols) {
|
|
19177
|
+
var exports$1 = {
|
|
19178
|
+
maxRedirects: 21,
|
|
19179
|
+
maxBodyLength: 10 * 1024 * 1024
|
|
19180
|
+
};
|
|
19181
|
+
var nativeProtocols = {};
|
|
19182
|
+
Object.keys(protocols).forEach(function(scheme) {
|
|
19183
|
+
var protocol = scheme + ":";
|
|
19184
|
+
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
|
19185
|
+
var wrappedProtocol = exports$1[scheme] = Object.create(nativeProtocol);
|
|
19186
|
+
function request(input, options, callback) {
|
|
19187
|
+
if (isURL(input)) input = spreadUrlObject(input);
|
|
19188
|
+
else if (isString$1(input)) input = spreadUrlObject(parseUrl(input));
|
|
19189
|
+
else {
|
|
19190
|
+
callback = options;
|
|
19191
|
+
options = validateUrl(input);
|
|
19192
|
+
input = { protocol };
|
|
19193
|
+
}
|
|
19194
|
+
if (isFunction$2(options)) {
|
|
19195
|
+
callback = options;
|
|
19196
|
+
options = null;
|
|
19197
|
+
}
|
|
19198
|
+
options = Object.assign({
|
|
19199
|
+
maxRedirects: exports$1.maxRedirects,
|
|
19200
|
+
maxBodyLength: exports$1.maxBodyLength
|
|
19201
|
+
}, input, options);
|
|
19202
|
+
options.nativeProtocols = nativeProtocols;
|
|
19203
|
+
if (!isString$1(options.host) && !isString$1(options.hostname)) options.hostname = "::1";
|
|
19204
|
+
assert.equal(options.protocol, protocol, "protocol mismatch");
|
|
19205
|
+
debug("options", options);
|
|
19206
|
+
return new RedirectableRequest(options, callback);
|
|
19207
|
+
}
|
|
19208
|
+
function get(input, options, callback) {
|
|
19209
|
+
var wrappedRequest = wrappedProtocol.request(input, options, callback);
|
|
19210
|
+
wrappedRequest.end();
|
|
19211
|
+
return wrappedRequest;
|
|
19212
|
+
}
|
|
19213
|
+
Object.defineProperties(wrappedProtocol, {
|
|
19214
|
+
request: {
|
|
19215
|
+
value: request,
|
|
19216
|
+
configurable: true,
|
|
19217
|
+
enumerable: true,
|
|
19218
|
+
writable: true
|
|
19219
|
+
},
|
|
19220
|
+
get: {
|
|
19221
|
+
value: get,
|
|
19222
|
+
configurable: true,
|
|
19223
|
+
enumerable: true,
|
|
19224
|
+
writable: true
|
|
19225
|
+
}
|
|
19226
|
+
});
|
|
19227
|
+
});
|
|
19228
|
+
return exports$1;
|
|
19229
|
+
}
|
|
19230
|
+
function noop() {}
|
|
19231
|
+
function parseUrl(input) {
|
|
19232
|
+
var parsed;
|
|
19233
|
+
// istanbul ignore else
|
|
19234
|
+
if (useNativeURL) parsed = new URL$1(input);
|
|
19235
|
+
else {
|
|
19236
|
+
parsed = validateUrl(url$1.parse(input));
|
|
19237
|
+
if (!isString$1(parsed.protocol)) throw new InvalidUrlError({ input });
|
|
19238
|
+
}
|
|
19239
|
+
return parsed;
|
|
19240
|
+
}
|
|
19241
|
+
function resolveUrl(relative, base) {
|
|
19242
|
+
// istanbul ignore next
|
|
19243
|
+
return useNativeURL ? new URL$1(relative, base) : parseUrl(url$1.resolve(base, relative));
|
|
19244
|
+
}
|
|
19245
|
+
function validateUrl(input) {
|
|
19246
|
+
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) throw new InvalidUrlError({ input: input.href || input });
|
|
19247
|
+
if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) throw new InvalidUrlError({ input: input.href || input });
|
|
19248
|
+
return input;
|
|
19249
|
+
}
|
|
19250
|
+
function spreadUrlObject(urlObject, target) {
|
|
19251
|
+
var spread$2 = target || {};
|
|
19252
|
+
for (var key of preservedUrlFields) spread$2[key] = urlObject[key];
|
|
19253
|
+
if (spread$2.hostname.startsWith("[")) spread$2.hostname = spread$2.hostname.slice(1, -1);
|
|
19254
|
+
if (spread$2.port !== "") spread$2.port = Number(spread$2.port);
|
|
19255
|
+
spread$2.path = spread$2.search ? spread$2.pathname + spread$2.search : spread$2.pathname;
|
|
19256
|
+
return spread$2;
|
|
19257
|
+
}
|
|
19258
|
+
function removeMatchingHeaders(regex, headers) {
|
|
19259
|
+
var lastValue;
|
|
19260
|
+
for (var header in headers) if (regex.test(header)) {
|
|
19261
|
+
lastValue = headers[header];
|
|
19262
|
+
delete headers[header];
|
|
19263
|
+
}
|
|
19264
|
+
return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
|
|
19265
|
+
}
|
|
19266
|
+
function createErrorType(code, message, baseClass) {
|
|
19267
|
+
function CustomError(properties) {
|
|
19268
|
+
// istanbul ignore else
|
|
19269
|
+
if (isFunction$2(Error.captureStackTrace)) Error.captureStackTrace(this, this.constructor);
|
|
19270
|
+
Object.assign(this, properties || {});
|
|
19271
|
+
this.code = code;
|
|
19272
|
+
this.message = this.cause ? message + ": " + this.cause.message : message;
|
|
19273
|
+
}
|
|
19274
|
+
CustomError.prototype = new (baseClass || Error)();
|
|
19275
|
+
Object.defineProperties(CustomError.prototype, {
|
|
19276
|
+
constructor: {
|
|
19277
|
+
value: CustomError,
|
|
19278
|
+
enumerable: false
|
|
19279
|
+
},
|
|
19280
|
+
name: {
|
|
19281
|
+
value: "Error [" + code + "]",
|
|
19282
|
+
enumerable: false
|
|
19283
|
+
}
|
|
19284
|
+
});
|
|
19285
|
+
return CustomError;
|
|
19286
|
+
}
|
|
19287
|
+
function destroyRequest(request, error) {
|
|
19288
|
+
for (var event of events$1) request.removeListener(event, eventHandlers[event]);
|
|
19289
|
+
request.on("error", noop);
|
|
19290
|
+
request.destroy(error);
|
|
19291
|
+
}
|
|
19292
|
+
function isSubdomain(subdomain, domain) {
|
|
19293
|
+
assert(isString$1(subdomain) && isString$1(domain));
|
|
19294
|
+
var dot = subdomain.length - domain.length - 1;
|
|
19295
|
+
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
19296
|
+
}
|
|
19297
|
+
function isString$1(value) {
|
|
19298
|
+
return typeof value === "string" || value instanceof String;
|
|
19299
|
+
}
|
|
19300
|
+
function isFunction$2(value) {
|
|
19301
|
+
return typeof value === "function";
|
|
19302
|
+
}
|
|
19303
|
+
function isBuffer(value) {
|
|
19304
|
+
return typeof value === "object" && "length" in value;
|
|
19305
|
+
}
|
|
19306
|
+
function isURL(value) {
|
|
19307
|
+
return URL$1 && value instanceof URL$1;
|
|
19308
|
+
}
|
|
19309
|
+
module.exports = wrap({
|
|
19310
|
+
http: http$2,
|
|
19311
|
+
https: https$2
|
|
19312
|
+
});
|
|
19313
|
+
module.exports.wrap = wrap;
|
|
19314
|
+
}) });
|
|
19315
|
+
|
|
19316
|
+
//#endregion
|
|
19317
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/env/data.js
|
|
19318
|
+
const VERSION$1 = "1.13.2";
|
|
19319
|
+
|
|
19320
|
+
//#endregion
|
|
19321
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/parseProtocol.js
|
|
19322
|
+
function parseProtocol(url$3) {
|
|
19323
|
+
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url$3);
|
|
19324
|
+
return match && match[1] || "";
|
|
19325
|
+
}
|
|
19326
|
+
|
|
19327
|
+
//#endregion
|
|
19328
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/fromDataURI.js
|
|
19329
|
+
const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
19330
|
+
/**
|
|
19331
|
+
* Parse data uri to a Buffer or Blob
|
|
19332
|
+
*
|
|
19333
|
+
* @param {String} uri
|
|
19334
|
+
* @param {?Boolean} asBlob
|
|
19335
|
+
* @param {?Object} options
|
|
19336
|
+
* @param {?Function} options.Blob
|
|
19337
|
+
*
|
|
19338
|
+
* @returns {Buffer|Blob}
|
|
19339
|
+
*/
|
|
19340
|
+
function fromDataURI(uri, asBlob, options) {
|
|
19341
|
+
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
|
19342
|
+
const protocol = parseProtocol(uri);
|
|
19343
|
+
if (asBlob === void 0 && _Blob) asBlob = true;
|
|
19344
|
+
if (protocol === "data") {
|
|
19345
|
+
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
|
|
19346
|
+
const match = DATA_URL_PATTERN.exec(uri);
|
|
19347
|
+
if (!match) throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL);
|
|
19348
|
+
const mime$1 = match[1];
|
|
19349
|
+
const isBase64 = match[2];
|
|
19350
|
+
const body = match[3];
|
|
19351
|
+
const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8");
|
|
19352
|
+
if (asBlob) {
|
|
19353
|
+
if (!_Blob) throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
19354
|
+
return new _Blob([buffer], { type: mime$1 });
|
|
19355
|
+
}
|
|
19356
|
+
return buffer;
|
|
19357
|
+
}
|
|
19358
|
+
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
|
19359
|
+
}
|
|
19360
|
+
|
|
19361
|
+
//#endregion
|
|
19362
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
19363
|
+
const kInternals = Symbol("internals");
|
|
19364
|
+
var AxiosTransformStream = class extends stream.default.Transform {
|
|
19365
|
+
constructor(options) {
|
|
19366
|
+
options = utils_default.toFlatObject(options, {
|
|
19367
|
+
maxRate: 0,
|
|
19368
|
+
chunkSize: 64 * 1024,
|
|
19369
|
+
minChunkSize: 100,
|
|
19370
|
+
timeWindow: 500,
|
|
19371
|
+
ticksRate: 2,
|
|
19372
|
+
samplesCount: 15
|
|
19373
|
+
}, null, (prop, source) => {
|
|
19374
|
+
return !utils_default.isUndefined(source[prop]);
|
|
19375
|
+
});
|
|
19376
|
+
super({ readableHighWaterMark: options.chunkSize });
|
|
19377
|
+
const internals = this[kInternals] = {
|
|
19378
|
+
timeWindow: options.timeWindow,
|
|
19379
|
+
chunkSize: options.chunkSize,
|
|
19380
|
+
maxRate: options.maxRate,
|
|
19381
|
+
minChunkSize: options.minChunkSize,
|
|
19382
|
+
bytesSeen: 0,
|
|
19383
|
+
isCaptured: false,
|
|
19384
|
+
notifiedBytesLoaded: 0,
|
|
19385
|
+
ts: Date.now(),
|
|
19386
|
+
bytes: 0,
|
|
19387
|
+
onReadCallback: null
|
|
19388
|
+
};
|
|
19389
|
+
this.on("newListener", (event) => {
|
|
19390
|
+
if (event === "progress") {
|
|
19391
|
+
if (!internals.isCaptured) internals.isCaptured = true;
|
|
19392
|
+
}
|
|
19393
|
+
});
|
|
19394
|
+
}
|
|
19395
|
+
_read(size) {
|
|
19396
|
+
const internals = this[kInternals];
|
|
19397
|
+
if (internals.onReadCallback) internals.onReadCallback();
|
|
19398
|
+
return super._read(size);
|
|
19399
|
+
}
|
|
19400
|
+
_transform(chunk, encoding, callback) {
|
|
19401
|
+
const internals = this[kInternals];
|
|
19402
|
+
const maxRate = internals.maxRate;
|
|
19403
|
+
const readableHighWaterMark = this.readableHighWaterMark;
|
|
19404
|
+
const timeWindow = internals.timeWindow;
|
|
19405
|
+
const bytesThreshold = maxRate / (1e3 / timeWindow);
|
|
19406
|
+
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * .01) : 0;
|
|
19407
|
+
const pushChunk = (_chunk, _callback) => {
|
|
19408
|
+
const bytes = Buffer.byteLength(_chunk);
|
|
19409
|
+
internals.bytesSeen += bytes;
|
|
19410
|
+
internals.bytes += bytes;
|
|
19411
|
+
internals.isCaptured && this.emit("progress", internals.bytesSeen);
|
|
19412
|
+
if (this.push(_chunk)) process.nextTick(_callback);
|
|
19413
|
+
else internals.onReadCallback = () => {
|
|
19414
|
+
internals.onReadCallback = null;
|
|
19415
|
+
process.nextTick(_callback);
|
|
19416
|
+
};
|
|
19417
|
+
};
|
|
19418
|
+
const transformChunk = (_chunk, _callback) => {
|
|
19419
|
+
const chunkSize = Buffer.byteLength(_chunk);
|
|
19420
|
+
let chunkRemainder = null;
|
|
19421
|
+
let maxChunkSize = readableHighWaterMark;
|
|
19422
|
+
let bytesLeft;
|
|
19423
|
+
let passed = 0;
|
|
19424
|
+
if (maxRate) {
|
|
19425
|
+
const now = Date.now();
|
|
19426
|
+
if (!internals.ts || (passed = now - internals.ts) >= timeWindow) {
|
|
19427
|
+
internals.ts = now;
|
|
19428
|
+
bytesLeft = bytesThreshold - internals.bytes;
|
|
19429
|
+
internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;
|
|
19430
|
+
passed = 0;
|
|
19431
|
+
}
|
|
19432
|
+
bytesLeft = bytesThreshold - internals.bytes;
|
|
19433
|
+
}
|
|
19434
|
+
if (maxRate) {
|
|
19435
|
+
if (bytesLeft <= 0) return setTimeout(() => {
|
|
19436
|
+
_callback(null, _chunk);
|
|
19437
|
+
}, timeWindow - passed);
|
|
19438
|
+
if (bytesLeft < maxChunkSize) maxChunkSize = bytesLeft;
|
|
19439
|
+
}
|
|
19440
|
+
if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
|
|
19441
|
+
chunkRemainder = _chunk.subarray(maxChunkSize);
|
|
19442
|
+
_chunk = _chunk.subarray(0, maxChunkSize);
|
|
19443
|
+
}
|
|
19444
|
+
pushChunk(_chunk, chunkRemainder ? () => {
|
|
19445
|
+
process.nextTick(_callback, null, chunkRemainder);
|
|
19446
|
+
} : _callback);
|
|
19447
|
+
};
|
|
19448
|
+
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
|
19449
|
+
if (err) return callback(err);
|
|
19450
|
+
if (_chunk) transformChunk(_chunk, transformNextChunk);
|
|
19451
|
+
else callback(null);
|
|
19452
|
+
});
|
|
19453
|
+
}
|
|
19454
|
+
};
|
|
19455
|
+
var AxiosTransformStream_default = AxiosTransformStream;
|
|
19456
|
+
|
|
19457
|
+
//#endregion
|
|
19458
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/readBlob.js
|
|
19459
|
+
const { asyncIterator } = Symbol;
|
|
19460
|
+
const readBlob = async function* (blob) {
|
|
19461
|
+
if (blob.stream) yield* blob.stream();
|
|
19462
|
+
else if (blob.arrayBuffer) yield await blob.arrayBuffer();
|
|
19463
|
+
else if (blob[asyncIterator]) yield* blob[asyncIterator]();
|
|
19464
|
+
else yield blob;
|
|
19465
|
+
};
|
|
19466
|
+
var readBlob_default = readBlob;
|
|
19467
|
+
|
|
19468
|
+
//#endregion
|
|
19469
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/formDataToStream.js
|
|
19470
|
+
const BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
19471
|
+
const textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.default.TextEncoder();
|
|
19472
|
+
const CRLF = "\r\n";
|
|
19473
|
+
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
19474
|
+
const CRLF_BYTES_COUNT = 2;
|
|
19475
|
+
var FormDataPart = class {
|
|
19476
|
+
constructor(name, value) {
|
|
19477
|
+
const { escapeName } = this.constructor;
|
|
19478
|
+
const isStringValue = utils_default.isString(value);
|
|
19479
|
+
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
|
|
19480
|
+
if (isStringValue) value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
19481
|
+
else headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
|
|
19482
|
+
this.headers = textEncoder.encode(headers + CRLF);
|
|
19483
|
+
this.contentLength = isStringValue ? value.byteLength : value.size;
|
|
19484
|
+
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
|
|
19485
|
+
this.name = name;
|
|
19486
|
+
this.value = value;
|
|
19487
|
+
}
|
|
19488
|
+
async *encode() {
|
|
19489
|
+
yield this.headers;
|
|
19490
|
+
const { value } = this;
|
|
19491
|
+
if (utils_default.isTypedArray(value)) yield value;
|
|
19492
|
+
else yield* readBlob_default(value);
|
|
19493
|
+
yield CRLF_BYTES;
|
|
19494
|
+
}
|
|
19495
|
+
static escapeName(name) {
|
|
19496
|
+
return String(name).replace(/[\r\n"]/g, (match) => ({
|
|
19497
|
+
"\r": "%0D",
|
|
19498
|
+
"\n": "%0A",
|
|
19499
|
+
"\"": "%22"
|
|
19500
|
+
})[match]);
|
|
19501
|
+
}
|
|
19502
|
+
};
|
|
19503
|
+
const formDataToStream = (form, headersHandler, options) => {
|
|
19504
|
+
const { tag = "form-data-boundary", size = 25, boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {};
|
|
19505
|
+
if (!utils_default.isFormData(form)) throw TypeError("FormData instance required");
|
|
19506
|
+
if (boundary.length < 1 || boundary.length > 70) throw Error("boundary must be 10-70 characters long");
|
|
19507
|
+
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
19508
|
+
const footerBytes = textEncoder.encode("--" + boundary + "--\r\n");
|
|
19509
|
+
let contentLength = footerBytes.byteLength;
|
|
19510
|
+
const parts = Array.from(form.entries()).map(([name, value]) => {
|
|
19511
|
+
const part = new FormDataPart(name, value);
|
|
19512
|
+
contentLength += part.size;
|
|
19513
|
+
return part;
|
|
19514
|
+
});
|
|
19515
|
+
contentLength += boundaryBytes.byteLength * parts.length;
|
|
19516
|
+
contentLength = utils_default.toFiniteNumber(contentLength);
|
|
19517
|
+
const computedHeaders = { "Content-Type": `multipart/form-data; boundary=${boundary}` };
|
|
19518
|
+
if (Number.isFinite(contentLength)) computedHeaders["Content-Length"] = contentLength;
|
|
19519
|
+
headersHandler && headersHandler(computedHeaders);
|
|
19520
|
+
return stream.Readable.from((async function* () {
|
|
19521
|
+
for (const part of parts) {
|
|
19522
|
+
yield boundaryBytes;
|
|
19523
|
+
yield* part.encode();
|
|
19524
|
+
}
|
|
19525
|
+
yield footerBytes;
|
|
19526
|
+
})());
|
|
19527
|
+
};
|
|
19528
|
+
var formDataToStream_default = formDataToStream;
|
|
19529
|
+
|
|
19530
|
+
//#endregion
|
|
19531
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
19532
|
+
var ZlibHeaderTransformStream = class extends stream.default.Transform {
|
|
19533
|
+
__transform(chunk, encoding, callback) {
|
|
19534
|
+
this.push(chunk);
|
|
19535
|
+
callback();
|
|
19536
|
+
}
|
|
19537
|
+
_transform(chunk, encoding, callback) {
|
|
19538
|
+
if (chunk.length !== 0) {
|
|
19539
|
+
this._transform = this.__transform;
|
|
19540
|
+
if (chunk[0] !== 120) {
|
|
19541
|
+
const header = Buffer.alloc(2);
|
|
19542
|
+
header[0] = 120;
|
|
19543
|
+
header[1] = 156;
|
|
19544
|
+
this.push(header, encoding);
|
|
19545
|
+
}
|
|
19546
|
+
}
|
|
19547
|
+
this.__transform(chunk, encoding, callback);
|
|
19548
|
+
}
|
|
19549
|
+
};
|
|
19550
|
+
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
19551
|
+
|
|
19552
|
+
//#endregion
|
|
19553
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/callbackify.js
|
|
19554
|
+
const callbackify = (fn, reducer) => {
|
|
19555
|
+
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
19556
|
+
const cb = args.pop();
|
|
19557
|
+
fn.apply(this, args).then((value) => {
|
|
19558
|
+
try {
|
|
19559
|
+
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
|
19560
|
+
} catch (err) {
|
|
19561
|
+
cb(err);
|
|
19562
|
+
}
|
|
19563
|
+
}, cb);
|
|
19564
|
+
} : fn;
|
|
19565
|
+
};
|
|
19566
|
+
var callbackify_default = callbackify;
|
|
19567
|
+
|
|
19568
|
+
//#endregion
|
|
19569
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/speedometer.js
|
|
19570
|
+
/**
|
|
19571
|
+
* Calculate data maxRate
|
|
19572
|
+
* @param {Number} [samplesCount= 10]
|
|
19573
|
+
* @param {Number} [min= 1000]
|
|
19574
|
+
* @returns {Function}
|
|
19575
|
+
*/
|
|
19576
|
+
function speedometer(samplesCount, min$1) {
|
|
19577
|
+
samplesCount = samplesCount || 10;
|
|
19578
|
+
const bytes = new Array(samplesCount);
|
|
19579
|
+
const timestamps = new Array(samplesCount);
|
|
19580
|
+
let head$1 = 0;
|
|
19581
|
+
let tail = 0;
|
|
19582
|
+
let firstSampleTS;
|
|
19583
|
+
min$1 = min$1 !== void 0 ? min$1 : 1e3;
|
|
19584
|
+
return function push(chunkLength) {
|
|
19585
|
+
const now = Date.now();
|
|
19586
|
+
const startedAt = timestamps[tail];
|
|
19587
|
+
if (!firstSampleTS) firstSampleTS = now;
|
|
19588
|
+
bytes[head$1] = chunkLength;
|
|
19589
|
+
timestamps[head$1] = now;
|
|
19590
|
+
let i = tail;
|
|
19591
|
+
let bytesCount = 0;
|
|
19592
|
+
while (i !== head$1) {
|
|
19593
|
+
bytesCount += bytes[i++];
|
|
19594
|
+
i = i % samplesCount;
|
|
19595
|
+
}
|
|
19596
|
+
head$1 = (head$1 + 1) % samplesCount;
|
|
19597
|
+
if (head$1 === tail) tail = (tail + 1) % samplesCount;
|
|
19598
|
+
if (now - firstSampleTS < min$1) return;
|
|
19599
|
+
const passed = startedAt && now - startedAt;
|
|
19600
|
+
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
19601
|
+
};
|
|
19602
|
+
}
|
|
19603
|
+
var speedometer_default = speedometer;
|
|
19604
|
+
|
|
19605
|
+
//#endregion
|
|
19606
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/throttle.js
|
|
19607
|
+
/**
|
|
19608
|
+
* Throttle decorator
|
|
19609
|
+
* @param {Function} fn
|
|
19610
|
+
* @param {Number} freq
|
|
19611
|
+
* @return {Function}
|
|
19612
|
+
*/
|
|
19613
|
+
function throttle(fn, freq) {
|
|
19614
|
+
let timestamp = 0;
|
|
19615
|
+
let threshold = 1e3 / freq;
|
|
19616
|
+
let lastArgs;
|
|
19617
|
+
let timer;
|
|
19618
|
+
const invoke = (args, now = Date.now()) => {
|
|
19619
|
+
timestamp = now;
|
|
19620
|
+
lastArgs = null;
|
|
19621
|
+
if (timer) {
|
|
19622
|
+
clearTimeout(timer);
|
|
19623
|
+
timer = null;
|
|
19624
|
+
}
|
|
19625
|
+
fn(...args);
|
|
19626
|
+
};
|
|
19627
|
+
const throttled = (...args) => {
|
|
19628
|
+
const now = Date.now();
|
|
19629
|
+
const passed = now - timestamp;
|
|
19630
|
+
if (passed >= threshold) invoke(args, now);
|
|
19631
|
+
else {
|
|
19632
|
+
lastArgs = args;
|
|
19633
|
+
if (!timer) timer = setTimeout(() => {
|
|
19634
|
+
timer = null;
|
|
19635
|
+
invoke(lastArgs);
|
|
19636
|
+
}, threshold - passed);
|
|
19637
|
+
}
|
|
19638
|
+
};
|
|
19639
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
|
19640
|
+
return [throttled, flush];
|
|
19641
|
+
}
|
|
19642
|
+
var throttle_default = throttle;
|
|
19643
|
+
|
|
19644
|
+
//#endregion
|
|
19645
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
19646
|
+
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
19647
|
+
let bytesNotified = 0;
|
|
19648
|
+
const _speedometer = speedometer_default(50, 250);
|
|
19649
|
+
return throttle_default((e) => {
|
|
19650
|
+
const loaded = e.loaded;
|
|
19651
|
+
const total = e.lengthComputable ? e.total : void 0;
|
|
19652
|
+
const progressBytes = loaded - bytesNotified;
|
|
19653
|
+
const rate = _speedometer(progressBytes);
|
|
19654
|
+
const inRange = loaded <= total;
|
|
19655
|
+
bytesNotified = loaded;
|
|
19656
|
+
listener({
|
|
19657
|
+
loaded,
|
|
19658
|
+
total,
|
|
19659
|
+
progress: total ? loaded / total : void 0,
|
|
19660
|
+
bytes: progressBytes,
|
|
19661
|
+
rate: rate ? rate : void 0,
|
|
19662
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
19663
|
+
event: e,
|
|
19664
|
+
lengthComputable: total != null,
|
|
19665
|
+
[isDownloadStream ? "download" : "upload"]: true
|
|
19666
|
+
});
|
|
19667
|
+
}, freq);
|
|
19668
|
+
};
|
|
19669
|
+
const progressEventDecorator = (total, throttled) => {
|
|
19670
|
+
const lengthComputable = total != null;
|
|
19671
|
+
return [(loaded) => throttled[0]({
|
|
19672
|
+
lengthComputable,
|
|
19673
|
+
total,
|
|
19674
|
+
loaded
|
|
19675
|
+
}), throttled[1]];
|
|
19676
|
+
};
|
|
19677
|
+
const asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
19678
|
+
|
|
19679
|
+
//#endregion
|
|
19680
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
19681
|
+
/**
|
|
19682
|
+
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
19683
|
+
* - For base64: compute exact decoded size using length and padding;
|
|
19684
|
+
* handle %XX at the character-count level (no string allocation).
|
|
19685
|
+
* - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
|
|
19686
|
+
*
|
|
19687
|
+
* @param {string} url
|
|
19688
|
+
* @returns {number}
|
|
19689
|
+
*/
|
|
19690
|
+
function estimateDataURLDecodedBytes(url$3) {
|
|
19691
|
+
if (!url$3 || typeof url$3 !== "string") return 0;
|
|
19692
|
+
if (!url$3.startsWith("data:")) return 0;
|
|
19693
|
+
const comma = url$3.indexOf(",");
|
|
19694
|
+
if (comma < 0) return 0;
|
|
19695
|
+
const meta = url$3.slice(5, comma);
|
|
19696
|
+
const body = url$3.slice(comma + 1);
|
|
19697
|
+
if (/;base64/i.test(meta)) {
|
|
19698
|
+
let effectiveLen = body.length;
|
|
19699
|
+
const len = body.length;
|
|
19700
|
+
for (let i = 0; i < len; i++) if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
19701
|
+
const a = body.charCodeAt(i + 1);
|
|
19702
|
+
const b = body.charCodeAt(i + 2);
|
|
19703
|
+
if ((a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102)) {
|
|
19704
|
+
effectiveLen -= 2;
|
|
19705
|
+
i += 2;
|
|
19706
|
+
}
|
|
19707
|
+
}
|
|
19708
|
+
let pad = 0;
|
|
19709
|
+
let idx = len - 1;
|
|
19710
|
+
const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && body.charCodeAt(j - 1) === 51 && (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
|
|
19711
|
+
if (idx >= 0) {
|
|
19712
|
+
if (body.charCodeAt(idx) === 61) {
|
|
19713
|
+
pad++;
|
|
19714
|
+
idx--;
|
|
19715
|
+
} else if (tailIsPct3D(idx)) {
|
|
19716
|
+
pad++;
|
|
19717
|
+
idx -= 3;
|
|
19718
|
+
}
|
|
19719
|
+
}
|
|
19720
|
+
if (pad === 1 && idx >= 0) {
|
|
19721
|
+
if (body.charCodeAt(idx) === 61) pad++;
|
|
19722
|
+
else if (tailIsPct3D(idx)) pad++;
|
|
19723
|
+
}
|
|
19724
|
+
const bytes = Math.floor(effectiveLen / 4) * 3 - (pad || 0);
|
|
19725
|
+
return bytes > 0 ? bytes : 0;
|
|
19726
|
+
}
|
|
19727
|
+
return Buffer.byteLength(body, "utf8");
|
|
19728
|
+
}
|
|
19729
|
+
|
|
19730
|
+
//#endregion
|
|
19731
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/adapters/http.js
|
|
19732
|
+
var import_proxy_from_env = /* @__PURE__ */ __toESM(require_proxy_from_env(), 1);
|
|
19733
|
+
var import_follow_redirects = /* @__PURE__ */ __toESM(require_follow_redirects(), 1);
|
|
19734
|
+
const zlibOptions = {
|
|
19735
|
+
flush: zlib.default.constants.Z_SYNC_FLUSH,
|
|
19736
|
+
finishFlush: zlib.default.constants.Z_SYNC_FLUSH
|
|
19737
|
+
};
|
|
19738
|
+
const brotliOptions = {
|
|
19739
|
+
flush: zlib.default.constants.BROTLI_OPERATION_FLUSH,
|
|
19740
|
+
finishFlush: zlib.default.constants.BROTLI_OPERATION_FLUSH
|
|
19741
|
+
};
|
|
19742
|
+
const isBrotliSupported = utils_default.isFunction(zlib.default.createBrotliDecompress);
|
|
19743
|
+
const { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
19744
|
+
const isHttps = /https:?/;
|
|
19745
|
+
const supportedProtocols = platform_default.protocols.map((protocol) => {
|
|
19746
|
+
return protocol + ":";
|
|
19747
|
+
});
|
|
19748
|
+
const flushOnFinish = (stream$4, [throttled, flush]) => {
|
|
19749
|
+
stream$4.on("end", flush).on("error", flush);
|
|
19750
|
+
return throttled;
|
|
19751
|
+
};
|
|
19752
|
+
var Http2Sessions = class {
|
|
19753
|
+
constructor() {
|
|
19754
|
+
this.sessions = Object.create(null);
|
|
19755
|
+
}
|
|
19756
|
+
getSession(authority, options) {
|
|
19757
|
+
options = Object.assign({ sessionTimeout: 1e3 }, options);
|
|
19758
|
+
let authoritySessions = this.sessions[authority];
|
|
19759
|
+
if (authoritySessions) {
|
|
19760
|
+
let len = authoritySessions.length;
|
|
19761
|
+
for (let i = 0; i < len; i++) {
|
|
19762
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
19763
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util.default.isDeepStrictEqual(sessionOptions, options)) return sessionHandle;
|
|
19764
|
+
}
|
|
19765
|
+
}
|
|
19766
|
+
const session = http2.default.connect(authority, options);
|
|
19767
|
+
let removed;
|
|
19768
|
+
const removeSession = () => {
|
|
19769
|
+
if (removed) return;
|
|
19770
|
+
removed = true;
|
|
19771
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
19772
|
+
while (i--) if (entries[i][0] === session) {
|
|
19773
|
+
if (len === 1) delete this.sessions[authority];
|
|
19774
|
+
else entries.splice(i, 1);
|
|
19775
|
+
return;
|
|
19776
|
+
}
|
|
19777
|
+
};
|
|
19778
|
+
const originalRequestFn = session.request;
|
|
19779
|
+
const { sessionTimeout } = options;
|
|
19780
|
+
if (sessionTimeout != null) {
|
|
19781
|
+
let timer;
|
|
19782
|
+
let streamsCount = 0;
|
|
19783
|
+
session.request = function() {
|
|
19784
|
+
const stream$4 = originalRequestFn.apply(this, arguments);
|
|
19785
|
+
streamsCount++;
|
|
19786
|
+
if (timer) {
|
|
19787
|
+
clearTimeout(timer);
|
|
19788
|
+
timer = null;
|
|
19789
|
+
}
|
|
19790
|
+
stream$4.once("close", () => {
|
|
19791
|
+
if (!--streamsCount) timer = setTimeout(() => {
|
|
19792
|
+
timer = null;
|
|
19793
|
+
removeSession();
|
|
19794
|
+
}, sessionTimeout);
|
|
19795
|
+
});
|
|
19796
|
+
return stream$4;
|
|
19797
|
+
};
|
|
19798
|
+
}
|
|
19799
|
+
session.once("close", removeSession);
|
|
19800
|
+
let entry = [session, options];
|
|
19801
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
19802
|
+
return session;
|
|
19803
|
+
}
|
|
19804
|
+
};
|
|
19805
|
+
const http2Sessions = new Http2Sessions();
|
|
19806
|
+
/**
|
|
19807
|
+
* If the proxy or config beforeRedirects functions are defined, call them with the options
|
|
19808
|
+
* object.
|
|
19809
|
+
*
|
|
19810
|
+
* @param {Object<string, any>} options - The options object that was passed to the request.
|
|
19811
|
+
*
|
|
19812
|
+
* @returns {Object<string, any>}
|
|
19813
|
+
*/
|
|
19814
|
+
function dispatchBeforeRedirect(options, responseDetails) {
|
|
19815
|
+
if (options.beforeRedirects.proxy) options.beforeRedirects.proxy(options);
|
|
19816
|
+
if (options.beforeRedirects.config) options.beforeRedirects.config(options, responseDetails);
|
|
19817
|
+
}
|
|
19818
|
+
/**
|
|
19819
|
+
* If the proxy or config afterRedirects functions are defined, call them with the options
|
|
19820
|
+
*
|
|
19821
|
+
* @param {http.ClientRequestArgs} options
|
|
19822
|
+
* @param {AxiosProxyConfig} configProxy configuration from Axios options object
|
|
19823
|
+
* @param {string} location
|
|
19824
|
+
*
|
|
19825
|
+
* @returns {http.ClientRequestArgs}
|
|
19826
|
+
*/
|
|
19827
|
+
function setProxy(options, configProxy, location) {
|
|
19828
|
+
let proxy = configProxy;
|
|
19829
|
+
if (!proxy && proxy !== false) {
|
|
19830
|
+
const proxyUrl = import_proxy_from_env.getProxyForUrl(location);
|
|
19831
|
+
if (proxyUrl) proxy = new URL(proxyUrl);
|
|
19832
|
+
}
|
|
19833
|
+
if (proxy) {
|
|
19834
|
+
if (proxy.username) proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
19835
|
+
if (proxy.auth) {
|
|
19836
|
+
if (proxy.auth.username || proxy.auth.password) proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
19837
|
+
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
19838
|
+
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
19839
|
+
}
|
|
19840
|
+
options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
19841
|
+
const proxyHost = proxy.hostname || proxy.host;
|
|
19842
|
+
options.hostname = proxyHost;
|
|
19843
|
+
options.host = proxyHost;
|
|
19844
|
+
options.port = proxy.port;
|
|
19845
|
+
options.path = location;
|
|
19846
|
+
if (proxy.protocol) options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
|
|
19847
|
+
}
|
|
19848
|
+
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
19849
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
19850
|
+
};
|
|
19851
|
+
}
|
|
19852
|
+
const isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
19853
|
+
const wrapAsync = (asyncExecutor) => {
|
|
19854
|
+
return new Promise((resolve, reject) => {
|
|
19855
|
+
let onDone;
|
|
19856
|
+
let isDone;
|
|
19857
|
+
const done = (value, isRejected) => {
|
|
19858
|
+
if (isDone) return;
|
|
19859
|
+
isDone = true;
|
|
19860
|
+
onDone && onDone(value, isRejected);
|
|
19861
|
+
};
|
|
19862
|
+
const _resolve = (value) => {
|
|
19863
|
+
done(value);
|
|
19864
|
+
resolve(value);
|
|
19865
|
+
};
|
|
19866
|
+
const _reject = (reason) => {
|
|
19867
|
+
done(reason, true);
|
|
19868
|
+
reject(reason);
|
|
19869
|
+
};
|
|
19870
|
+
asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
|
|
19871
|
+
});
|
|
19872
|
+
};
|
|
19873
|
+
const resolveFamily = ({ address, family }) => {
|
|
19874
|
+
if (!utils_default.isString(address)) throw TypeError("address must be a string");
|
|
19875
|
+
return {
|
|
19876
|
+
address,
|
|
19877
|
+
family: family || (address.indexOf(".") < 0 ? 6 : 4)
|
|
19878
|
+
};
|
|
19879
|
+
};
|
|
19880
|
+
const buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : {
|
|
19881
|
+
address,
|
|
19882
|
+
family
|
|
19883
|
+
});
|
|
19884
|
+
const http2Transport = { request(options, cb) {
|
|
19885
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
19886
|
+
const { http2Options, headers } = options;
|
|
19887
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
19888
|
+
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.default.constants;
|
|
19889
|
+
const http2Headers = {
|
|
19890
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
19891
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
19892
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
19893
|
+
};
|
|
19894
|
+
utils_default.forEach(headers, (header, name) => {
|
|
19895
|
+
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
19896
|
+
});
|
|
19897
|
+
const req = session.request(http2Headers);
|
|
19898
|
+
req.once("response", (responseHeaders) => {
|
|
19899
|
+
const response = req;
|
|
19900
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
19901
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
19902
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
19903
|
+
response.headers = responseHeaders;
|
|
19904
|
+
response.statusCode = +status;
|
|
19905
|
+
cb(response);
|
|
19906
|
+
});
|
|
19907
|
+
return req;
|
|
19908
|
+
} };
|
|
19909
|
+
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
19910
|
+
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
19911
|
+
let { data, lookup: lookup$1, family, httpVersion = 1, http2Options } = config;
|
|
19912
|
+
const { responseType, responseEncoding } = config;
|
|
19913
|
+
const method = config.method.toUpperCase();
|
|
19914
|
+
let isDone;
|
|
19915
|
+
let rejected = false;
|
|
19916
|
+
let req;
|
|
19917
|
+
httpVersion = +httpVersion;
|
|
19918
|
+
if (Number.isNaN(httpVersion)) throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
19919
|
+
if (httpVersion !== 1 && httpVersion !== 2) throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
19920
|
+
const isHttp2 = httpVersion === 2;
|
|
19921
|
+
if (lookup$1) {
|
|
19922
|
+
const _lookup = callbackify_default(lookup$1, (value) => utils_default.isArray(value) ? value : [value]);
|
|
19923
|
+
lookup$1 = (hostname, opt, cb) => {
|
|
19924
|
+
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
19925
|
+
if (err) return cb(err);
|
|
19926
|
+
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
19927
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
19928
|
+
});
|
|
19929
|
+
};
|
|
19930
|
+
}
|
|
19931
|
+
const abortEmitter = new events.EventEmitter();
|
|
19932
|
+
function abort$3(reason) {
|
|
19933
|
+
try {
|
|
19934
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
19935
|
+
} catch (err) {
|
|
19936
|
+
console.warn("emit error", err);
|
|
19937
|
+
}
|
|
19938
|
+
}
|
|
19939
|
+
abortEmitter.once("abort", reject);
|
|
19940
|
+
const onFinished = () => {
|
|
19941
|
+
if (config.cancelToken) config.cancelToken.unsubscribe(abort$3);
|
|
19942
|
+
if (config.signal) config.signal.removeEventListener("abort", abort$3);
|
|
19943
|
+
abortEmitter.removeAllListeners();
|
|
19944
|
+
};
|
|
19945
|
+
if (config.cancelToken || config.signal) {
|
|
19946
|
+
config.cancelToken && config.cancelToken.subscribe(abort$3);
|
|
19947
|
+
if (config.signal) config.signal.aborted ? abort$3() : config.signal.addEventListener("abort", abort$3);
|
|
19948
|
+
}
|
|
19949
|
+
onDone((response, isRejected) => {
|
|
19950
|
+
isDone = true;
|
|
19951
|
+
if (isRejected) {
|
|
19952
|
+
rejected = true;
|
|
19953
|
+
onFinished();
|
|
19954
|
+
return;
|
|
19955
|
+
}
|
|
19956
|
+
const { data: data$1 } = response;
|
|
19957
|
+
if (data$1 instanceof stream.default.Readable || data$1 instanceof stream.default.Duplex) {
|
|
19958
|
+
const offListeners = stream.default.finished(data$1, () => {
|
|
19959
|
+
offListeners();
|
|
19960
|
+
onFinished();
|
|
19961
|
+
});
|
|
19962
|
+
} else onFinished();
|
|
19963
|
+
});
|
|
19964
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
19965
|
+
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
19966
|
+
const protocol = parsed.protocol || supportedProtocols[0];
|
|
19967
|
+
if (protocol === "data:") {
|
|
19968
|
+
if (config.maxContentLength > -1) {
|
|
19969
|
+
if (estimateDataURLDecodedBytes(String(config.url || fullPath || "")) > config.maxContentLength) return reject(new AxiosError_default("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config));
|
|
19970
|
+
}
|
|
19971
|
+
let convertedData;
|
|
19972
|
+
if (method !== "GET") return settle(resolve, reject, {
|
|
19973
|
+
status: 405,
|
|
19974
|
+
statusText: "method not allowed",
|
|
19975
|
+
headers: {},
|
|
19976
|
+
config
|
|
19977
|
+
});
|
|
19978
|
+
try {
|
|
19979
|
+
convertedData = fromDataURI(config.url, responseType === "blob", { Blob: config.env && config.env.Blob });
|
|
19980
|
+
} catch (err) {
|
|
19981
|
+
throw AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config);
|
|
19982
|
+
}
|
|
19983
|
+
if (responseType === "text") {
|
|
19984
|
+
convertedData = convertedData.toString(responseEncoding);
|
|
19985
|
+
if (!responseEncoding || responseEncoding === "utf8") convertedData = utils_default.stripBOM(convertedData);
|
|
19986
|
+
} else if (responseType === "stream") convertedData = stream.default.Readable.from(convertedData);
|
|
19987
|
+
return settle(resolve, reject, {
|
|
19988
|
+
data: convertedData,
|
|
19989
|
+
status: 200,
|
|
19990
|
+
statusText: "OK",
|
|
19991
|
+
headers: new AxiosHeaders_default(),
|
|
19992
|
+
config
|
|
19993
|
+
});
|
|
19994
|
+
}
|
|
19995
|
+
if (supportedProtocols.indexOf(protocol) === -1) return reject(new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config));
|
|
19996
|
+
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
|
19997
|
+
headers.set("User-Agent", "axios/" + VERSION$1, false);
|
|
19998
|
+
const { onUploadProgress, onDownloadProgress } = config;
|
|
19999
|
+
const maxRate = config.maxRate;
|
|
20000
|
+
let maxUploadRate = void 0;
|
|
20001
|
+
let maxDownloadRate = void 0;
|
|
20002
|
+
if (utils_default.isSpecCompliantForm(data)) {
|
|
20003
|
+
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
20004
|
+
data = formDataToStream_default(data, (formHeaders) => {
|
|
20005
|
+
headers.set(formHeaders);
|
|
20006
|
+
}, {
|
|
20007
|
+
tag: `axios-${VERSION$1}-boundary`,
|
|
20008
|
+
boundary: userBoundary && userBoundary[1] || void 0
|
|
20009
|
+
});
|
|
20010
|
+
} else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
|
|
20011
|
+
headers.set(data.getHeaders());
|
|
20012
|
+
if (!headers.hasContentLength()) try {
|
|
20013
|
+
const knownLength = await util.default.promisify(data.getLength).call(data);
|
|
20014
|
+
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
20015
|
+
} catch (e) {}
|
|
20016
|
+
} else if (utils_default.isBlob(data) || utils_default.isFile(data)) {
|
|
20017
|
+
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
20018
|
+
headers.setContentLength(data.size || 0);
|
|
20019
|
+
data = stream.default.Readable.from(readBlob_default(data));
|
|
20020
|
+
} else if (data && !utils_default.isStream(data)) {
|
|
20021
|
+
if (Buffer.isBuffer(data)) {} else if (utils_default.isArrayBuffer(data)) data = Buffer.from(new Uint8Array(data));
|
|
20022
|
+
else if (utils_default.isString(data)) data = Buffer.from(data, "utf-8");
|
|
20023
|
+
else return reject(new AxiosError_default("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
20024
|
+
headers.setContentLength(data.length, false);
|
|
20025
|
+
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) return reject(new AxiosError_default("Request body larger than maxBodyLength limit", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
20026
|
+
}
|
|
20027
|
+
const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
|
|
20028
|
+
if (utils_default.isArray(maxRate)) {
|
|
20029
|
+
maxUploadRate = maxRate[0];
|
|
20030
|
+
maxDownloadRate = maxRate[1];
|
|
20031
|
+
} else maxUploadRate = maxDownloadRate = maxRate;
|
|
20032
|
+
if (data && (onUploadProgress || maxUploadRate)) {
|
|
20033
|
+
if (!utils_default.isStream(data)) data = stream.default.Readable.from(data, { objectMode: false });
|
|
20034
|
+
data = stream.default.pipeline([data, new AxiosTransformStream_default({ maxRate: utils_default.toFiniteNumber(maxUploadRate) })], utils_default.noop);
|
|
20035
|
+
onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
|
|
20036
|
+
}
|
|
20037
|
+
let auth = void 0;
|
|
20038
|
+
if (config.auth) {
|
|
20039
|
+
const username = config.auth.username || "";
|
|
20040
|
+
const password = config.auth.password || "";
|
|
20041
|
+
auth = username + ":" + password;
|
|
20042
|
+
}
|
|
20043
|
+
if (!auth && parsed.username) {
|
|
20044
|
+
const urlUsername = parsed.username;
|
|
20045
|
+
const urlPassword = parsed.password;
|
|
20046
|
+
auth = urlUsername + ":" + urlPassword;
|
|
20047
|
+
}
|
|
20048
|
+
auth && headers.delete("authorization");
|
|
20049
|
+
let path$1;
|
|
20050
|
+
try {
|
|
20051
|
+
path$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
|
|
20052
|
+
} catch (err) {
|
|
20053
|
+
const customErr = new Error(err.message);
|
|
20054
|
+
customErr.config = config;
|
|
20055
|
+
customErr.url = config.url;
|
|
20056
|
+
customErr.exists = true;
|
|
20057
|
+
return reject(customErr);
|
|
20058
|
+
}
|
|
20059
|
+
headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
|
|
20060
|
+
const options = {
|
|
20061
|
+
path: path$1,
|
|
20062
|
+
method,
|
|
20063
|
+
headers: headers.toJSON(),
|
|
20064
|
+
agents: {
|
|
20065
|
+
http: config.httpAgent,
|
|
20066
|
+
https: config.httpsAgent
|
|
20067
|
+
},
|
|
20068
|
+
auth,
|
|
20069
|
+
protocol,
|
|
20070
|
+
family,
|
|
20071
|
+
beforeRedirect: dispatchBeforeRedirect,
|
|
20072
|
+
beforeRedirects: {},
|
|
20073
|
+
http2Options
|
|
20074
|
+
};
|
|
20075
|
+
!utils_default.isUndefined(lookup$1) && (options.lookup = lookup$1);
|
|
20076
|
+
if (config.socketPath) options.socketPath = config.socketPath;
|
|
20077
|
+
else {
|
|
20078
|
+
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
20079
|
+
options.port = parsed.port;
|
|
20080
|
+
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
20081
|
+
}
|
|
20082
|
+
let transport;
|
|
20083
|
+
const isHttpsRequest = isHttps.test(options.protocol);
|
|
20084
|
+
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
20085
|
+
if (isHttp2) transport = http2Transport;
|
|
20086
|
+
else if (config.transport) transport = config.transport;
|
|
20087
|
+
else if (config.maxRedirects === 0) transport = isHttpsRequest ? https.default : http.default;
|
|
20088
|
+
else {
|
|
20089
|
+
if (config.maxRedirects) options.maxRedirects = config.maxRedirects;
|
|
20090
|
+
if (config.beforeRedirect) options.beforeRedirects.config = config.beforeRedirect;
|
|
20091
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
20092
|
+
}
|
|
20093
|
+
if (config.maxBodyLength > -1) options.maxBodyLength = config.maxBodyLength;
|
|
20094
|
+
else options.maxBodyLength = Infinity;
|
|
20095
|
+
if (config.insecureHTTPParser) options.insecureHTTPParser = config.insecureHTTPParser;
|
|
20096
|
+
req = transport.request(options, function handleResponse(res) {
|
|
20097
|
+
if (req.destroyed) return;
|
|
20098
|
+
const streams = [res];
|
|
20099
|
+
const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
|
|
20100
|
+
if (onDownloadProgress || maxDownloadRate) {
|
|
20101
|
+
const transformStream = new AxiosTransformStream_default({ maxRate: utils_default.toFiniteNumber(maxDownloadRate) });
|
|
20102
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
|
|
20103
|
+
streams.push(transformStream);
|
|
20104
|
+
}
|
|
20105
|
+
let responseStream = res;
|
|
20106
|
+
const lastRequest = res.req || req;
|
|
20107
|
+
if (config.decompress !== false && res.headers["content-encoding"]) {
|
|
20108
|
+
if (method === "HEAD" || res.statusCode === 204) delete res.headers["content-encoding"];
|
|
20109
|
+
switch ((res.headers["content-encoding"] || "").toLowerCase()) {
|
|
20110
|
+
case "gzip":
|
|
20111
|
+
case "x-gzip":
|
|
20112
|
+
case "compress":
|
|
20113
|
+
case "x-compress":
|
|
20114
|
+
streams.push(zlib.default.createUnzip(zlibOptions));
|
|
20115
|
+
delete res.headers["content-encoding"];
|
|
20116
|
+
break;
|
|
20117
|
+
case "deflate":
|
|
20118
|
+
streams.push(new ZlibHeaderTransformStream_default());
|
|
20119
|
+
streams.push(zlib.default.createUnzip(zlibOptions));
|
|
20120
|
+
delete res.headers["content-encoding"];
|
|
20121
|
+
break;
|
|
20122
|
+
case "br": if (isBrotliSupported) {
|
|
20123
|
+
streams.push(zlib.default.createBrotliDecompress(brotliOptions));
|
|
20124
|
+
delete res.headers["content-encoding"];
|
|
20125
|
+
}
|
|
20126
|
+
}
|
|
20127
|
+
}
|
|
20128
|
+
responseStream = streams.length > 1 ? stream.default.pipeline(streams, utils_default.noop) : streams[0];
|
|
20129
|
+
const response = {
|
|
20130
|
+
status: res.statusCode,
|
|
20131
|
+
statusText: res.statusMessage,
|
|
20132
|
+
headers: new AxiosHeaders_default(res.headers),
|
|
20133
|
+
config,
|
|
20134
|
+
request: lastRequest
|
|
20135
|
+
};
|
|
20136
|
+
if (responseType === "stream") {
|
|
20137
|
+
response.data = responseStream;
|
|
20138
|
+
settle(resolve, reject, response);
|
|
20139
|
+
} else {
|
|
20140
|
+
const responseBuffer = [];
|
|
20141
|
+
let totalResponseBytes = 0;
|
|
20142
|
+
responseStream.on("data", function handleStreamData(chunk) {
|
|
20143
|
+
responseBuffer.push(chunk);
|
|
20144
|
+
totalResponseBytes += chunk.length;
|
|
20145
|
+
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
20146
|
+
rejected = true;
|
|
20147
|
+
responseStream.destroy();
|
|
20148
|
+
abort$3(new AxiosError_default("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config, lastRequest));
|
|
20149
|
+
}
|
|
20150
|
+
});
|
|
20151
|
+
responseStream.on("aborted", function handlerStreamAborted() {
|
|
20152
|
+
if (rejected) return;
|
|
20153
|
+
const err = new AxiosError_default("stream has been aborted", AxiosError_default.ERR_BAD_RESPONSE, config, lastRequest);
|
|
20154
|
+
responseStream.destroy(err);
|
|
20155
|
+
reject(err);
|
|
20156
|
+
});
|
|
20157
|
+
responseStream.on("error", function handleStreamError(err) {
|
|
20158
|
+
if (req.destroyed) return;
|
|
20159
|
+
reject(AxiosError_default.from(err, null, config, lastRequest));
|
|
20160
|
+
});
|
|
20161
|
+
responseStream.on("end", function handleStreamEnd() {
|
|
20162
|
+
try {
|
|
20163
|
+
let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
|
|
20164
|
+
if (responseType !== "arraybuffer") {
|
|
20165
|
+
responseData = responseData.toString(responseEncoding);
|
|
20166
|
+
if (!responseEncoding || responseEncoding === "utf8") responseData = utils_default.stripBOM(responseData);
|
|
20167
|
+
}
|
|
20168
|
+
response.data = responseData;
|
|
20169
|
+
} catch (err) {
|
|
20170
|
+
return reject(AxiosError_default.from(err, null, config, response.request, response));
|
|
20171
|
+
}
|
|
20172
|
+
settle(resolve, reject, response);
|
|
20173
|
+
});
|
|
20174
|
+
}
|
|
20175
|
+
abortEmitter.once("abort", (err) => {
|
|
20176
|
+
if (!responseStream.destroyed) {
|
|
20177
|
+
responseStream.emit("error", err);
|
|
20178
|
+
responseStream.destroy();
|
|
20179
|
+
}
|
|
20180
|
+
});
|
|
20181
|
+
});
|
|
20182
|
+
abortEmitter.once("abort", (err) => {
|
|
20183
|
+
if (req.close) req.close();
|
|
20184
|
+
else req.destroy(err);
|
|
20185
|
+
});
|
|
20186
|
+
req.on("error", function handleRequestError(err) {
|
|
20187
|
+
reject(AxiosError_default.from(err, null, config, req));
|
|
20188
|
+
});
|
|
20189
|
+
req.on("socket", function handleRequestSocket(socket) {
|
|
20190
|
+
socket.setKeepAlive(true, 1e3 * 60);
|
|
20191
|
+
});
|
|
20192
|
+
if (config.timeout) {
|
|
20193
|
+
const timeout = parseInt(config.timeout, 10);
|
|
20194
|
+
if (Number.isNaN(timeout)) {
|
|
20195
|
+
abort$3(new AxiosError_default("error trying to parse `config.timeout` to int", AxiosError_default.ERR_BAD_OPTION_VALUE, config, req));
|
|
20196
|
+
return;
|
|
20197
|
+
}
|
|
20198
|
+
req.setTimeout(timeout, function handleRequestTimeout() {
|
|
20199
|
+
if (isDone) return;
|
|
20200
|
+
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
20201
|
+
const transitional = config.transitional || transitional_default;
|
|
20202
|
+
if (config.timeoutErrorMessage) timeoutErrorMessage = config.timeoutErrorMessage;
|
|
20203
|
+
abort$3(new AxiosError_default(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, config, req));
|
|
20204
|
+
});
|
|
20205
|
+
} else req.setTimeout(0);
|
|
20206
|
+
if (utils_default.isStream(data)) {
|
|
20207
|
+
let ended = false;
|
|
20208
|
+
let errored = false;
|
|
20209
|
+
data.on("end", () => {
|
|
20210
|
+
ended = true;
|
|
20211
|
+
});
|
|
20212
|
+
data.once("error", (err) => {
|
|
20213
|
+
errored = true;
|
|
20214
|
+
req.destroy(err);
|
|
20215
|
+
});
|
|
20216
|
+
data.on("close", () => {
|
|
20217
|
+
if (!ended && !errored) abort$3(new CanceledError_default("Request stream has been aborted", config, req));
|
|
20218
|
+
});
|
|
20219
|
+
data.pipe(req);
|
|
20220
|
+
} else {
|
|
20221
|
+
data && req.write(data);
|
|
20222
|
+
req.end();
|
|
20223
|
+
}
|
|
20224
|
+
});
|
|
20225
|
+
};
|
|
20226
|
+
|
|
20227
|
+
//#endregion
|
|
20228
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
20229
|
+
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin$1, isMSIE) => (url$3) => {
|
|
20230
|
+
url$3 = new URL(url$3, platform_default.origin);
|
|
20231
|
+
return origin$1.protocol === url$3.protocol && origin$1.host === url$3.host && (isMSIE || origin$1.port === url$3.port);
|
|
20232
|
+
})(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
|
|
20233
|
+
|
|
20234
|
+
//#endregion
|
|
20235
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/cookies.js
|
|
20236
|
+
var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
20237
|
+
write(name, value, expires, path$1, domain, secure, sameSite) {
|
|
20238
|
+
if (typeof document === "undefined") return;
|
|
20239
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
20240
|
+
if (utils_default.isNumber(expires)) cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
20241
|
+
if (utils_default.isString(path$1)) cookie.push(`path=${path$1}`);
|
|
20242
|
+
if (utils_default.isString(domain)) cookie.push(`domain=${domain}`);
|
|
20243
|
+
if (secure === true) cookie.push("secure");
|
|
20244
|
+
if (utils_default.isString(sameSite)) cookie.push(`SameSite=${sameSite}`);
|
|
20245
|
+
document.cookie = cookie.join("; ");
|
|
20246
|
+
},
|
|
20247
|
+
read(name) {
|
|
20248
|
+
if (typeof document === "undefined") return null;
|
|
20249
|
+
const match = document.cookie.match(/* @__PURE__ */ new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
20250
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
20251
|
+
},
|
|
20252
|
+
remove(name) {
|
|
20253
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
20254
|
+
}
|
|
20255
|
+
} : {
|
|
20256
|
+
write() {},
|
|
20257
|
+
read() {
|
|
20258
|
+
return null;
|
|
20259
|
+
},
|
|
20260
|
+
remove() {}
|
|
20261
|
+
};
|
|
20262
|
+
|
|
20263
|
+
//#endregion
|
|
20264
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/mergeConfig.js
|
|
20265
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
20266
|
+
/**
|
|
20267
|
+
* Config-specific merge-function which creates a new config-object
|
|
20268
|
+
* by merging two configuration objects together.
|
|
20269
|
+
*
|
|
20270
|
+
* @param {Object} config1
|
|
20271
|
+
* @param {Object} config2
|
|
20272
|
+
*
|
|
20273
|
+
* @returns {Object} New object resulting from merging config2 to config1
|
|
20274
|
+
*/
|
|
20275
|
+
function mergeConfig$1(config1, config2) {
|
|
20276
|
+
config2 = config2 || {};
|
|
20277
|
+
const config = {};
|
|
20278
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
20279
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) return utils_default.merge.call({ caseless }, target, source);
|
|
20280
|
+
else if (utils_default.isPlainObject(source)) return utils_default.merge({}, source);
|
|
20281
|
+
else if (utils_default.isArray(source)) return source.slice();
|
|
20282
|
+
return source;
|
|
20283
|
+
}
|
|
20284
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
20285
|
+
if (!utils_default.isUndefined(b)) return getMergedValue(a, b, prop, caseless);
|
|
20286
|
+
else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a, prop, caseless);
|
|
20287
|
+
}
|
|
20288
|
+
function valueFromConfig2(a, b) {
|
|
20289
|
+
if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
|
|
20290
|
+
}
|
|
20291
|
+
function defaultToConfig2(a, b) {
|
|
20292
|
+
if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
|
|
20293
|
+
else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a);
|
|
20294
|
+
}
|
|
20295
|
+
function mergeDirectKeys(a, b, prop) {
|
|
20296
|
+
if (prop in config2) return getMergedValue(a, b);
|
|
20297
|
+
else if (prop in config1) return getMergedValue(void 0, a);
|
|
20298
|
+
}
|
|
20299
|
+
const mergeMap = {
|
|
20300
|
+
url: valueFromConfig2,
|
|
20301
|
+
method: valueFromConfig2,
|
|
20302
|
+
data: valueFromConfig2,
|
|
20303
|
+
baseURL: defaultToConfig2,
|
|
20304
|
+
transformRequest: defaultToConfig2,
|
|
20305
|
+
transformResponse: defaultToConfig2,
|
|
20306
|
+
paramsSerializer: defaultToConfig2,
|
|
20307
|
+
timeout: defaultToConfig2,
|
|
20308
|
+
timeoutMessage: defaultToConfig2,
|
|
20309
|
+
withCredentials: defaultToConfig2,
|
|
20310
|
+
withXSRFToken: defaultToConfig2,
|
|
20311
|
+
adapter: defaultToConfig2,
|
|
20312
|
+
responseType: defaultToConfig2,
|
|
20313
|
+
xsrfCookieName: defaultToConfig2,
|
|
20314
|
+
xsrfHeaderName: defaultToConfig2,
|
|
20315
|
+
onUploadProgress: defaultToConfig2,
|
|
20316
|
+
onDownloadProgress: defaultToConfig2,
|
|
20317
|
+
decompress: defaultToConfig2,
|
|
20318
|
+
maxContentLength: defaultToConfig2,
|
|
20319
|
+
maxBodyLength: defaultToConfig2,
|
|
20320
|
+
beforeRedirect: defaultToConfig2,
|
|
20321
|
+
transport: defaultToConfig2,
|
|
20322
|
+
httpAgent: defaultToConfig2,
|
|
20323
|
+
httpsAgent: defaultToConfig2,
|
|
20324
|
+
cancelToken: defaultToConfig2,
|
|
20325
|
+
socketPath: defaultToConfig2,
|
|
20326
|
+
responseEncoding: defaultToConfig2,
|
|
20327
|
+
validateStatus: mergeDirectKeys,
|
|
20328
|
+
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
20329
|
+
};
|
|
20330
|
+
utils_default.forEach(Object.keys({
|
|
20331
|
+
...config1,
|
|
20332
|
+
...config2
|
|
20333
|
+
}), function computeConfigValue(prop) {
|
|
20334
|
+
const merge$1 = mergeMap[prop] || mergeDeepProperties;
|
|
20335
|
+
const configValue = merge$1(config1[prop], config2[prop], prop);
|
|
20336
|
+
utils_default.isUndefined(configValue) && merge$1 !== mergeDirectKeys || (config[prop] = configValue);
|
|
20337
|
+
});
|
|
20338
|
+
return config;
|
|
20339
|
+
}
|
|
20340
|
+
|
|
20341
|
+
//#endregion
|
|
20342
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/resolveConfig.js
|
|
20343
|
+
var resolveConfig_default = (config) => {
|
|
20344
|
+
const newConfig = mergeConfig$1({}, config);
|
|
20345
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
20346
|
+
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
20347
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
20348
|
+
if (auth) headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
|
|
20349
|
+
if (utils_default.isFormData(data)) {
|
|
20350
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
|
|
20351
|
+
else if (utils_default.isFunction(data.getHeaders)) {
|
|
20352
|
+
const formHeaders = data.getHeaders();
|
|
20353
|
+
const allowedHeaders = ["content-type", "content-length"];
|
|
20354
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
20355
|
+
if (allowedHeaders.includes(key.toLowerCase())) headers.set(key, val);
|
|
20356
|
+
});
|
|
20357
|
+
}
|
|
20358
|
+
}
|
|
20359
|
+
if (platform_default.hasStandardBrowserEnv) {
|
|
20360
|
+
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
20361
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
|
|
20362
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
|
20363
|
+
if (xsrfValue) headers.set(xsrfHeaderName, xsrfValue);
|
|
20364
|
+
}
|
|
20365
|
+
}
|
|
20366
|
+
return newConfig;
|
|
20367
|
+
};
|
|
20368
|
+
|
|
20369
|
+
//#endregion
|
|
20370
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/adapters/xhr.js
|
|
20371
|
+
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
20372
|
+
var xhr_default = isXHRAdapterSupported && function(config) {
|
|
20373
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
20374
|
+
const _config = resolveConfig_default(config);
|
|
20375
|
+
let requestData = _config.data;
|
|
20376
|
+
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
20377
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
20378
|
+
let onCanceled;
|
|
20379
|
+
let uploadThrottled, downloadThrottled;
|
|
20380
|
+
let flushUpload, flushDownload;
|
|
20381
|
+
function done() {
|
|
20382
|
+
flushUpload && flushUpload();
|
|
20383
|
+
flushDownload && flushDownload();
|
|
20384
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
20385
|
+
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
20386
|
+
}
|
|
20387
|
+
let request = new XMLHttpRequest();
|
|
20388
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
20389
|
+
request.timeout = _config.timeout;
|
|
20390
|
+
function onloadend() {
|
|
20391
|
+
if (!request) return;
|
|
20392
|
+
const responseHeaders = AxiosHeaders_default.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
|
|
20393
|
+
settle(function _resolve(value) {
|
|
20394
|
+
resolve(value);
|
|
20395
|
+
done();
|
|
20396
|
+
}, function _reject(err) {
|
|
20397
|
+
reject(err);
|
|
20398
|
+
done();
|
|
20399
|
+
}, {
|
|
20400
|
+
data: !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response,
|
|
20401
|
+
status: request.status,
|
|
20402
|
+
statusText: request.statusText,
|
|
20403
|
+
headers: responseHeaders,
|
|
20404
|
+
config,
|
|
20405
|
+
request
|
|
20406
|
+
});
|
|
20407
|
+
request = null;
|
|
20408
|
+
}
|
|
20409
|
+
if ("onloadend" in request) request.onloadend = onloadend;
|
|
20410
|
+
else request.onreadystatechange = function handleLoad() {
|
|
20411
|
+
if (!request || request.readyState !== 4) return;
|
|
20412
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) return;
|
|
20413
|
+
setTimeout(onloadend);
|
|
20414
|
+
};
|
|
20415
|
+
request.onabort = function handleAbort() {
|
|
20416
|
+
if (!request) return;
|
|
20417
|
+
reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
|
|
20418
|
+
request = null;
|
|
20419
|
+
};
|
|
20420
|
+
request.onerror = function handleError(event) {
|
|
20421
|
+
const err = new AxiosError_default(event && event.message ? event.message : "Network Error", AxiosError_default.ERR_NETWORK, config, request);
|
|
20422
|
+
err.event = event || null;
|
|
20423
|
+
reject(err);
|
|
20424
|
+
request = null;
|
|
20425
|
+
};
|
|
20426
|
+
request.ontimeout = function handleTimeout() {
|
|
20427
|
+
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
20428
|
+
const transitional = _config.transitional || transitional_default;
|
|
20429
|
+
if (_config.timeoutErrorMessage) timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
20430
|
+
reject(new AxiosError_default(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, config, request));
|
|
20431
|
+
request = null;
|
|
20432
|
+
};
|
|
20433
|
+
requestData === void 0 && requestHeaders.setContentType(null);
|
|
20434
|
+
if ("setRequestHeader" in request) utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
20435
|
+
request.setRequestHeader(key, val);
|
|
20436
|
+
});
|
|
20437
|
+
if (!utils_default.isUndefined(_config.withCredentials)) request.withCredentials = !!_config.withCredentials;
|
|
20438
|
+
if (responseType && responseType !== "json") request.responseType = _config.responseType;
|
|
20439
|
+
if (onDownloadProgress) {
|
|
20440
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
20441
|
+
request.addEventListener("progress", downloadThrottled);
|
|
20442
|
+
}
|
|
20443
|
+
if (onUploadProgress && request.upload) {
|
|
20444
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
20445
|
+
request.upload.addEventListener("progress", uploadThrottled);
|
|
20446
|
+
request.upload.addEventListener("loadend", flushUpload);
|
|
20447
|
+
}
|
|
20448
|
+
if (_config.cancelToken || _config.signal) {
|
|
20449
|
+
onCanceled = (cancel$2) => {
|
|
20450
|
+
if (!request) return;
|
|
20451
|
+
reject(!cancel$2 || cancel$2.type ? new CanceledError_default(null, config, request) : cancel$2);
|
|
20452
|
+
request.abort();
|
|
20453
|
+
request = null;
|
|
20454
|
+
};
|
|
20455
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
20456
|
+
if (_config.signal) _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
20457
|
+
}
|
|
20458
|
+
const protocol = parseProtocol(_config.url);
|
|
20459
|
+
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
|
20460
|
+
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
20461
|
+
return;
|
|
20462
|
+
}
|
|
20463
|
+
request.send(requestData || null);
|
|
20464
|
+
});
|
|
20465
|
+
};
|
|
20466
|
+
|
|
20467
|
+
//#endregion
|
|
20468
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/composeSignals.js
|
|
20469
|
+
const composeSignals = (signals, timeout) => {
|
|
20470
|
+
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
20471
|
+
if (timeout || length) {
|
|
20472
|
+
let controller = new AbortController();
|
|
20473
|
+
let aborted;
|
|
20474
|
+
const onabort = function(reason) {
|
|
20475
|
+
if (!aborted) {
|
|
20476
|
+
aborted = true;
|
|
20477
|
+
unsubscribe();
|
|
20478
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
20479
|
+
controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
|
|
20480
|
+
}
|
|
20481
|
+
};
|
|
20482
|
+
let timer = timeout && setTimeout(() => {
|
|
20483
|
+
timer = null;
|
|
20484
|
+
onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
20485
|
+
}, timeout);
|
|
20486
|
+
const unsubscribe = () => {
|
|
20487
|
+
if (signals) {
|
|
20488
|
+
timer && clearTimeout(timer);
|
|
20489
|
+
timer = null;
|
|
20490
|
+
signals.forEach((signal$1) => {
|
|
20491
|
+
signal$1.unsubscribe ? signal$1.unsubscribe(onabort) : signal$1.removeEventListener("abort", onabort);
|
|
20492
|
+
});
|
|
20493
|
+
signals = null;
|
|
20494
|
+
}
|
|
20495
|
+
};
|
|
20496
|
+
signals.forEach((signal$1) => signal$1.addEventListener("abort", onabort));
|
|
20497
|
+
const { signal } = controller;
|
|
20498
|
+
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
20499
|
+
return signal;
|
|
20500
|
+
}
|
|
20501
|
+
};
|
|
20502
|
+
var composeSignals_default = composeSignals;
|
|
20503
|
+
|
|
20504
|
+
//#endregion
|
|
20505
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/trackStream.js
|
|
20506
|
+
const streamChunk = function* (chunk, chunkSize) {
|
|
20507
|
+
let len = chunk.byteLength;
|
|
20508
|
+
if (!chunkSize || len < chunkSize) {
|
|
20509
|
+
yield chunk;
|
|
20510
|
+
return;
|
|
20511
|
+
}
|
|
20512
|
+
let pos = 0;
|
|
20513
|
+
let end;
|
|
20514
|
+
while (pos < len) {
|
|
20515
|
+
end = pos + chunkSize;
|
|
20516
|
+
yield chunk.slice(pos, end);
|
|
20517
|
+
pos = end;
|
|
20518
|
+
}
|
|
20519
|
+
};
|
|
20520
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
20521
|
+
for await (const chunk of readStream(iterable)) yield* streamChunk(chunk, chunkSize);
|
|
20522
|
+
};
|
|
20523
|
+
const readStream = async function* (stream$4) {
|
|
20524
|
+
if (stream$4[Symbol.asyncIterator]) {
|
|
20525
|
+
yield* stream$4;
|
|
20526
|
+
return;
|
|
20527
|
+
}
|
|
20528
|
+
const reader = stream$4.getReader();
|
|
20529
|
+
try {
|
|
20530
|
+
for (;;) {
|
|
20531
|
+
const { done, value } = await reader.read();
|
|
20532
|
+
if (done) break;
|
|
20533
|
+
yield value;
|
|
20534
|
+
}
|
|
20535
|
+
} finally {
|
|
20536
|
+
await reader.cancel();
|
|
20537
|
+
}
|
|
20538
|
+
};
|
|
20539
|
+
const trackStream = (stream$4, chunkSize, onProgress, onFinish) => {
|
|
20540
|
+
const iterator$1 = readBytes(stream$4, chunkSize);
|
|
20541
|
+
let bytes = 0;
|
|
20542
|
+
let done;
|
|
20543
|
+
let _onFinish = (e) => {
|
|
20544
|
+
if (!done) {
|
|
20545
|
+
done = true;
|
|
20546
|
+
onFinish && onFinish(e);
|
|
20547
|
+
}
|
|
20548
|
+
};
|
|
20549
|
+
return new ReadableStream({
|
|
20550
|
+
async pull(controller) {
|
|
20551
|
+
try {
|
|
20552
|
+
const { done: done$1, value } = await iterator$1.next();
|
|
20553
|
+
if (done$1) {
|
|
20554
|
+
_onFinish();
|
|
20555
|
+
controller.close();
|
|
20556
|
+
return;
|
|
20557
|
+
}
|
|
20558
|
+
let len = value.byteLength;
|
|
20559
|
+
if (onProgress) onProgress(bytes += len);
|
|
20560
|
+
controller.enqueue(new Uint8Array(value));
|
|
20561
|
+
} catch (err) {
|
|
20562
|
+
_onFinish(err);
|
|
20563
|
+
throw err;
|
|
20564
|
+
}
|
|
20565
|
+
},
|
|
20566
|
+
cancel(reason) {
|
|
20567
|
+
_onFinish(reason);
|
|
20568
|
+
return iterator$1.return();
|
|
20569
|
+
}
|
|
20570
|
+
}, { highWaterMark: 2 });
|
|
20571
|
+
};
|
|
20572
|
+
|
|
20573
|
+
//#endregion
|
|
20574
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/adapters/fetch.js
|
|
20575
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
20576
|
+
const { isFunction: isFunction$1 } = utils_default;
|
|
20577
|
+
const globalFetchAPI = (({ Request: Request$1, Response: Response$1 }) => ({
|
|
20578
|
+
Request: Request$1,
|
|
20579
|
+
Response: Response$1
|
|
20580
|
+
}))(utils_default.global);
|
|
20581
|
+
const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils_default.global;
|
|
20582
|
+
const test = (fn, ...args) => {
|
|
20583
|
+
try {
|
|
20584
|
+
return !!fn(...args);
|
|
20585
|
+
} catch (e) {
|
|
20586
|
+
return false;
|
|
20587
|
+
}
|
|
20588
|
+
};
|
|
20589
|
+
const factory = (env$1) => {
|
|
20590
|
+
env$1 = utils_default.merge.call({ skipUndefined: true }, globalFetchAPI, env$1);
|
|
20591
|
+
const { fetch: envFetch, Request: Request$1, Response: Response$1 } = env$1;
|
|
20592
|
+
const isFetchSupported = envFetch ? isFunction$1(envFetch) : typeof fetch === "function";
|
|
20593
|
+
const isRequestSupported = isFunction$1(Request$1);
|
|
20594
|
+
const isResponseSupported = isFunction$1(Response$1);
|
|
20595
|
+
if (!isFetchSupported) return false;
|
|
20596
|
+
const isReadableStreamSupported = isFetchSupported && isFunction$1(ReadableStream$1);
|
|
20597
|
+
const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request$1(str).arrayBuffer()));
|
|
20598
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
20599
|
+
let duplexAccessed = false;
|
|
20600
|
+
const hasContentType = new Request$1(platform_default.origin, {
|
|
20601
|
+
body: new ReadableStream$1(),
|
|
20602
|
+
method: "POST",
|
|
20603
|
+
get duplex() {
|
|
20604
|
+
duplexAccessed = true;
|
|
20605
|
+
return "half";
|
|
20606
|
+
}
|
|
20607
|
+
}).headers.has("Content-Type");
|
|
20608
|
+
return duplexAccessed && !hasContentType;
|
|
20609
|
+
});
|
|
20610
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response$1("").body));
|
|
20611
|
+
const resolvers = { stream: supportsResponseStream && ((res) => res.body) };
|
|
20612
|
+
isFetchSupported && [
|
|
20613
|
+
"text",
|
|
20614
|
+
"arrayBuffer",
|
|
20615
|
+
"blob",
|
|
20616
|
+
"formData",
|
|
20617
|
+
"stream"
|
|
20618
|
+
].forEach((type) => {
|
|
20619
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
20620
|
+
let method = res && res[type];
|
|
20621
|
+
if (method) return method.call(res);
|
|
20622
|
+
throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
|
|
20623
|
+
});
|
|
20624
|
+
});
|
|
20625
|
+
const getBodyLength = async (body) => {
|
|
20626
|
+
if (body == null) return 0;
|
|
20627
|
+
if (utils_default.isBlob(body)) return body.size;
|
|
20628
|
+
if (utils_default.isSpecCompliantForm(body)) return (await new Request$1(platform_default.origin, {
|
|
20629
|
+
method: "POST",
|
|
20630
|
+
body
|
|
20631
|
+
}).arrayBuffer()).byteLength;
|
|
20632
|
+
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) return body.byteLength;
|
|
20633
|
+
if (utils_default.isURLSearchParams(body)) body = body + "";
|
|
20634
|
+
if (utils_default.isString(body)) return (await encodeText(body)).byteLength;
|
|
20635
|
+
};
|
|
20636
|
+
const resolveBodyLength = async (headers, body) => {
|
|
20637
|
+
const length = utils_default.toFiniteNumber(headers.getContentLength());
|
|
20638
|
+
return length == null ? getBodyLength(body) : length;
|
|
20639
|
+
};
|
|
20640
|
+
return async (config) => {
|
|
20641
|
+
let { url: url$3, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions } = resolveConfig_default(config);
|
|
20642
|
+
let _fetch = envFetch || fetch;
|
|
20643
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
20644
|
+
let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
20645
|
+
let request = null;
|
|
20646
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
20647
|
+
composedSignal.unsubscribe();
|
|
20648
|
+
});
|
|
20649
|
+
let requestContentLength;
|
|
20650
|
+
try {
|
|
20651
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
20652
|
+
let _request = new Request$1(url$3, {
|
|
20653
|
+
method: "POST",
|
|
20654
|
+
body: data,
|
|
20655
|
+
duplex: "half"
|
|
20656
|
+
});
|
|
20657
|
+
let contentTypeHeader;
|
|
20658
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
|
|
20659
|
+
if (_request.body) {
|
|
20660
|
+
const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
|
|
20661
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
20662
|
+
}
|
|
20663
|
+
}
|
|
20664
|
+
if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
|
|
20665
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request$1.prototype;
|
|
20666
|
+
const resolvedOptions = {
|
|
20667
|
+
...fetchOptions,
|
|
20668
|
+
signal: composedSignal,
|
|
20669
|
+
method: method.toUpperCase(),
|
|
20670
|
+
headers: headers.normalize().toJSON(),
|
|
20671
|
+
body: data,
|
|
20672
|
+
duplex: "half",
|
|
20673
|
+
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
20674
|
+
};
|
|
20675
|
+
request = isRequestSupported && new Request$1(url$3, resolvedOptions);
|
|
20676
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url$3, resolvedOptions));
|
|
20677
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
20678
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
20679
|
+
const options = {};
|
|
20680
|
+
[
|
|
20681
|
+
"status",
|
|
20682
|
+
"statusText",
|
|
20683
|
+
"headers"
|
|
20684
|
+
].forEach((prop) => {
|
|
20685
|
+
options[prop] = response[prop];
|
|
20686
|
+
});
|
|
20687
|
+
const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
|
20688
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
20689
|
+
response = new Response$1(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
20690
|
+
flush && flush();
|
|
20691
|
+
unsubscribe && unsubscribe();
|
|
20692
|
+
}), options);
|
|
20693
|
+
}
|
|
20694
|
+
responseType = responseType || "text";
|
|
20695
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
|
|
20696
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
20697
|
+
return await new Promise((resolve, reject) => {
|
|
20698
|
+
settle(resolve, reject, {
|
|
20699
|
+
data: responseData,
|
|
20700
|
+
headers: AxiosHeaders_default.from(response.headers),
|
|
20701
|
+
status: response.status,
|
|
20702
|
+
statusText: response.statusText,
|
|
20703
|
+
config,
|
|
20704
|
+
request
|
|
20705
|
+
});
|
|
20706
|
+
});
|
|
20707
|
+
} catch (err) {
|
|
20708
|
+
unsubscribe && unsubscribe();
|
|
20709
|
+
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), { cause: err.cause || err });
|
|
20710
|
+
throw AxiosError_default.from(err, err && err.code, config, request);
|
|
20711
|
+
}
|
|
20712
|
+
};
|
|
20713
|
+
};
|
|
20714
|
+
const seedCache = /* @__PURE__ */ new Map();
|
|
20715
|
+
const getFetch = (config) => {
|
|
20716
|
+
let env$1 = config && config.env || {};
|
|
20717
|
+
const { fetch: fetch$1, Request: Request$1, Response: Response$1 } = env$1;
|
|
20718
|
+
const seeds = [
|
|
20719
|
+
Request$1,
|
|
20720
|
+
Response$1,
|
|
20721
|
+
fetch$1
|
|
20722
|
+
];
|
|
20723
|
+
let i = seeds.length, seed, target, map = seedCache;
|
|
20724
|
+
while (i--) {
|
|
20725
|
+
seed = seeds[i];
|
|
20726
|
+
target = map.get(seed);
|
|
20727
|
+
target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env$1));
|
|
20728
|
+
map = target;
|
|
20729
|
+
}
|
|
20730
|
+
return target;
|
|
20731
|
+
};
|
|
20732
|
+
const adapter = getFetch();
|
|
20733
|
+
|
|
20734
|
+
//#endregion
|
|
20735
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/adapters/adapters.js
|
|
20736
|
+
/**
|
|
20737
|
+
* Known adapters mapping.
|
|
20738
|
+
* Provides environment-specific adapters for Axios:
|
|
20739
|
+
* - `http` for Node.js
|
|
20740
|
+
* - `xhr` for browsers
|
|
20741
|
+
* - `fetch` for fetch API-based requests
|
|
20742
|
+
*
|
|
20743
|
+
* @type {Object<string, Function|Object>}
|
|
20744
|
+
*/
|
|
20745
|
+
const knownAdapters = {
|
|
20746
|
+
http: http_default,
|
|
20747
|
+
xhr: xhr_default,
|
|
20748
|
+
fetch: { get: getFetch }
|
|
20749
|
+
};
|
|
20750
|
+
utils_default.forEach(knownAdapters, (fn, value) => {
|
|
20751
|
+
if (fn) {
|
|
20752
|
+
try {
|
|
20753
|
+
Object.defineProperty(fn, "name", { value });
|
|
20754
|
+
} catch (e) {}
|
|
20755
|
+
Object.defineProperty(fn, "adapterName", { value });
|
|
20756
|
+
}
|
|
20757
|
+
});
|
|
20758
|
+
/**
|
|
20759
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
20760
|
+
*
|
|
20761
|
+
* @param {string} reason
|
|
20762
|
+
* @returns {string}
|
|
20763
|
+
*/
|
|
20764
|
+
const renderReason = (reason) => `- ${reason}`;
|
|
20765
|
+
/**
|
|
20766
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
20767
|
+
*
|
|
20768
|
+
* @param {Function|null|false} adapter
|
|
20769
|
+
* @returns {boolean}
|
|
20770
|
+
*/
|
|
20771
|
+
const isResolvedHandle = (adapter$1) => utils_default.isFunction(adapter$1) || adapter$1 === null || adapter$1 === false;
|
|
20772
|
+
/**
|
|
20773
|
+
* Get the first suitable adapter from the provided list.
|
|
20774
|
+
* Tries each adapter in order until a supported one is found.
|
|
20775
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
20776
|
+
*
|
|
20777
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
20778
|
+
* @param {Object} config - Axios request configuration
|
|
20779
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
20780
|
+
* @returns {Function} The resolved adapter function
|
|
20781
|
+
*/
|
|
20782
|
+
function getAdapter$1(adapters, config) {
|
|
20783
|
+
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
20784
|
+
const { length } = adapters;
|
|
20785
|
+
let nameOrAdapter;
|
|
20786
|
+
let adapter$1;
|
|
20787
|
+
const rejectedReasons = {};
|
|
20788
|
+
for (let i = 0; i < length; i++) {
|
|
20789
|
+
nameOrAdapter = adapters[i];
|
|
20790
|
+
let id;
|
|
20791
|
+
adapter$1 = nameOrAdapter;
|
|
20792
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
20793
|
+
adapter$1 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
20794
|
+
if (adapter$1 === void 0) throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
20795
|
+
}
|
|
20796
|
+
if (adapter$1 && (utils_default.isFunction(adapter$1) || (adapter$1 = adapter$1.get(config)))) break;
|
|
20797
|
+
rejectedReasons[id || "#" + i] = adapter$1;
|
|
20798
|
+
}
|
|
20799
|
+
if (!adapter$1) {
|
|
20800
|
+
const reasons = Object.entries(rejectedReasons).map(([id, state$1]) => `adapter ${id} ` + (state$1 === false ? "is not supported by the environment" : "is not available in the build"));
|
|
20801
|
+
throw new AxiosError_default(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
20802
|
+
}
|
|
20803
|
+
return adapter$1;
|
|
20804
|
+
}
|
|
20805
|
+
/**
|
|
20806
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
20807
|
+
*/
|
|
20808
|
+
var adapters_default = {
|
|
20809
|
+
getAdapter: getAdapter$1,
|
|
20810
|
+
adapters: knownAdapters
|
|
20811
|
+
};
|
|
20812
|
+
|
|
20813
|
+
//#endregion
|
|
20814
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/dispatchRequest.js
|
|
20815
|
+
/**
|
|
20816
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
20817
|
+
*
|
|
20818
|
+
* @param {Object} config The config that is to be used for the request
|
|
20819
|
+
*
|
|
20820
|
+
* @returns {void}
|
|
20821
|
+
*/
|
|
20822
|
+
function throwIfCancellationRequested(config) {
|
|
20823
|
+
if (config.cancelToken) config.cancelToken.throwIfRequested();
|
|
20824
|
+
if (config.signal && config.signal.aborted) throw new CanceledError_default(null, config);
|
|
20825
|
+
}
|
|
20826
|
+
/**
|
|
20827
|
+
* Dispatch a request to the server using the configured adapter.
|
|
20828
|
+
*
|
|
20829
|
+
* @param {object} config The config that is to be used for the request
|
|
20830
|
+
*
|
|
20831
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
20832
|
+
*/
|
|
20833
|
+
function dispatchRequest(config) {
|
|
20834
|
+
throwIfCancellationRequested(config);
|
|
20835
|
+
config.headers = AxiosHeaders_default.from(config.headers);
|
|
20836
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
20837
|
+
if ([
|
|
20838
|
+
"post",
|
|
20839
|
+
"put",
|
|
20840
|
+
"patch"
|
|
20841
|
+
].indexOf(config.method) !== -1) config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
20842
|
+
return adapters_default.getAdapter(config.adapter || defaults_default.adapter, config)(config).then(function onAdapterResolution(response) {
|
|
20843
|
+
throwIfCancellationRequested(config);
|
|
20844
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
20845
|
+
response.headers = AxiosHeaders_default.from(response.headers);
|
|
20846
|
+
return response;
|
|
20847
|
+
}, function onAdapterRejection(reason) {
|
|
20848
|
+
if (!isCancel$1(reason)) {
|
|
20849
|
+
throwIfCancellationRequested(config);
|
|
20850
|
+
if (reason && reason.response) {
|
|
20851
|
+
reason.response.data = transformData.call(config, config.transformResponse, reason.response);
|
|
20852
|
+
reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
|
|
20853
|
+
}
|
|
20854
|
+
}
|
|
20855
|
+
return Promise.reject(reason);
|
|
20856
|
+
});
|
|
20857
|
+
}
|
|
20858
|
+
|
|
20859
|
+
//#endregion
|
|
20860
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/validator.js
|
|
20861
|
+
const validators$1 = {};
|
|
20862
|
+
[
|
|
20863
|
+
"object",
|
|
20864
|
+
"boolean",
|
|
20865
|
+
"number",
|
|
20866
|
+
"function",
|
|
20867
|
+
"string",
|
|
20868
|
+
"symbol"
|
|
20869
|
+
].forEach((type, i) => {
|
|
20870
|
+
validators$1[type] = function validator(thing) {
|
|
20871
|
+
return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
|
|
20872
|
+
};
|
|
20873
|
+
});
|
|
20874
|
+
const deprecatedWarnings = {};
|
|
20875
|
+
/**
|
|
20876
|
+
* Transitional option validator
|
|
20877
|
+
*
|
|
20878
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
20879
|
+
* @param {string?} version - deprecated version / removed since version
|
|
20880
|
+
* @param {string?} message - some message with additional info
|
|
20881
|
+
*
|
|
20882
|
+
* @returns {function}
|
|
20883
|
+
*/
|
|
20884
|
+
validators$1.transitional = function transitional(validator, version, message) {
|
|
20885
|
+
function formatMessage(opt, desc$1) {
|
|
20886
|
+
return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc$1 + (message ? ". " + message : "");
|
|
20887
|
+
}
|
|
20888
|
+
return (value, opt, opts) => {
|
|
20889
|
+
if (validator === false) throw new AxiosError_default(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError_default.ERR_DEPRECATED);
|
|
20890
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
20891
|
+
deprecatedWarnings[opt] = true;
|
|
20892
|
+
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
20893
|
+
}
|
|
20894
|
+
return validator ? validator(value, opt, opts) : true;
|
|
20895
|
+
};
|
|
20896
|
+
};
|
|
20897
|
+
validators$1.spelling = function spelling(correctSpelling) {
|
|
20898
|
+
return (value, opt) => {
|
|
20899
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
20900
|
+
return true;
|
|
20901
|
+
};
|
|
20902
|
+
};
|
|
20903
|
+
/**
|
|
20904
|
+
* Assert object's properties type
|
|
20905
|
+
*
|
|
20906
|
+
* @param {object} options
|
|
20907
|
+
* @param {object} schema
|
|
20908
|
+
* @param {boolean?} allowUnknown
|
|
20909
|
+
*
|
|
20910
|
+
* @returns {object}
|
|
20911
|
+
*/
|
|
20912
|
+
function assertOptions(options, schema, allowUnknown) {
|
|
20913
|
+
if (typeof options !== "object") throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
20914
|
+
const keys = Object.keys(options);
|
|
20915
|
+
let i = keys.length;
|
|
20916
|
+
while (i-- > 0) {
|
|
20917
|
+
const opt = keys[i];
|
|
20918
|
+
const validator = schema[opt];
|
|
20919
|
+
if (validator) {
|
|
20920
|
+
const value = options[opt];
|
|
20921
|
+
const result = value === void 0 || validator(value, opt, options);
|
|
20922
|
+
if (result !== true) throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
20923
|
+
continue;
|
|
20924
|
+
}
|
|
20925
|
+
if (allowUnknown !== true) throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION);
|
|
20926
|
+
}
|
|
20927
|
+
}
|
|
20928
|
+
var validator_default = {
|
|
20929
|
+
assertOptions,
|
|
20930
|
+
validators: validators$1
|
|
20931
|
+
};
|
|
20932
|
+
|
|
20933
|
+
//#endregion
|
|
20934
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/Axios.js
|
|
20935
|
+
const validators = validator_default.validators;
|
|
20936
|
+
/**
|
|
20937
|
+
* Create a new instance of Axios
|
|
20938
|
+
*
|
|
20939
|
+
* @param {Object} instanceConfig The default config for the instance
|
|
20940
|
+
*
|
|
20941
|
+
* @return {Axios} A new instance of Axios
|
|
20942
|
+
*/
|
|
20943
|
+
var Axios$1 = class {
|
|
20944
|
+
constructor(instanceConfig) {
|
|
20945
|
+
this.defaults = instanceConfig || {};
|
|
20946
|
+
this.interceptors = {
|
|
20947
|
+
request: new InterceptorManager_default(),
|
|
20948
|
+
response: new InterceptorManager_default()
|
|
20949
|
+
};
|
|
20950
|
+
}
|
|
20951
|
+
/**
|
|
20952
|
+
* Dispatch a request
|
|
20953
|
+
*
|
|
20954
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
20955
|
+
* @param {?Object} config
|
|
20956
|
+
*
|
|
20957
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
20958
|
+
*/
|
|
20959
|
+
async request(configOrUrl, config) {
|
|
20960
|
+
try {
|
|
20961
|
+
return await this._request(configOrUrl, config);
|
|
20962
|
+
} catch (err) {
|
|
20963
|
+
if (err instanceof Error) {
|
|
20964
|
+
let dummy = {};
|
|
20965
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error();
|
|
20966
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
20967
|
+
try {
|
|
20968
|
+
if (!err.stack) err.stack = stack;
|
|
20969
|
+
else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) err.stack += "\n" + stack;
|
|
20970
|
+
} catch (e) {}
|
|
20971
|
+
}
|
|
20972
|
+
throw err;
|
|
20973
|
+
}
|
|
20974
|
+
}
|
|
20975
|
+
_request(configOrUrl, config) {
|
|
20976
|
+
if (typeof configOrUrl === "string") {
|
|
20977
|
+
config = config || {};
|
|
20978
|
+
config.url = configOrUrl;
|
|
20979
|
+
} else config = configOrUrl || {};
|
|
20980
|
+
config = mergeConfig$1(this.defaults, config);
|
|
20981
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
20982
|
+
if (transitional !== void 0) validator_default.assertOptions(transitional, {
|
|
20983
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
20984
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
20985
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
20986
|
+
}, false);
|
|
20987
|
+
if (paramsSerializer != null) if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
|
|
20988
|
+
else validator_default.assertOptions(paramsSerializer, {
|
|
20989
|
+
encode: validators.function,
|
|
20990
|
+
serialize: validators.function
|
|
20991
|
+
}, true);
|
|
20992
|
+
if (config.allowAbsoluteUrls !== void 0) {} else if (this.defaults.allowAbsoluteUrls !== void 0) config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
20993
|
+
else config.allowAbsoluteUrls = true;
|
|
20994
|
+
validator_default.assertOptions(config, {
|
|
20995
|
+
baseUrl: validators.spelling("baseURL"),
|
|
20996
|
+
withXsrfToken: validators.spelling("withXSRFToken")
|
|
20997
|
+
}, true);
|
|
20998
|
+
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
20999
|
+
let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
|
|
21000
|
+
headers && utils_default.forEach([
|
|
21001
|
+
"delete",
|
|
21002
|
+
"get",
|
|
21003
|
+
"head",
|
|
21004
|
+
"post",
|
|
21005
|
+
"put",
|
|
21006
|
+
"patch",
|
|
21007
|
+
"common"
|
|
21008
|
+
], (method) => {
|
|
21009
|
+
delete headers[method];
|
|
21010
|
+
});
|
|
21011
|
+
config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
21012
|
+
const requestInterceptorChain = [];
|
|
21013
|
+
let synchronousRequestInterceptors = true;
|
|
21014
|
+
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
21015
|
+
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) return;
|
|
21016
|
+
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
21017
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
21018
|
+
});
|
|
21019
|
+
const responseInterceptorChain = [];
|
|
21020
|
+
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
21021
|
+
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
21022
|
+
});
|
|
21023
|
+
let promise;
|
|
21024
|
+
let i = 0;
|
|
21025
|
+
let len;
|
|
21026
|
+
if (!synchronousRequestInterceptors) {
|
|
21027
|
+
const chain = [dispatchRequest.bind(this), void 0];
|
|
21028
|
+
chain.unshift(...requestInterceptorChain);
|
|
21029
|
+
chain.push(...responseInterceptorChain);
|
|
21030
|
+
len = chain.length;
|
|
21031
|
+
promise = Promise.resolve(config);
|
|
21032
|
+
while (i < len) promise = promise.then(chain[i++], chain[i++]);
|
|
21033
|
+
return promise;
|
|
21034
|
+
}
|
|
21035
|
+
len = requestInterceptorChain.length;
|
|
21036
|
+
let newConfig = config;
|
|
21037
|
+
while (i < len) {
|
|
21038
|
+
const onFulfilled = requestInterceptorChain[i++];
|
|
21039
|
+
const onRejected = requestInterceptorChain[i++];
|
|
21040
|
+
try {
|
|
21041
|
+
newConfig = onFulfilled(newConfig);
|
|
21042
|
+
} catch (error) {
|
|
21043
|
+
onRejected.call(this, error);
|
|
21044
|
+
break;
|
|
21045
|
+
}
|
|
21046
|
+
}
|
|
21047
|
+
try {
|
|
21048
|
+
promise = dispatchRequest.call(this, newConfig);
|
|
21049
|
+
} catch (error) {
|
|
21050
|
+
return Promise.reject(error);
|
|
21051
|
+
}
|
|
21052
|
+
i = 0;
|
|
21053
|
+
len = responseInterceptorChain.length;
|
|
21054
|
+
while (i < len) promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
|
|
21055
|
+
return promise;
|
|
21056
|
+
}
|
|
21057
|
+
getUri(config) {
|
|
21058
|
+
config = mergeConfig$1(this.defaults, config);
|
|
21059
|
+
return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
21060
|
+
}
|
|
21061
|
+
};
|
|
21062
|
+
utils_default.forEach([
|
|
21063
|
+
"delete",
|
|
21064
|
+
"get",
|
|
21065
|
+
"head",
|
|
21066
|
+
"options"
|
|
21067
|
+
], function forEachMethodNoData(method) {
|
|
21068
|
+
Axios$1.prototype[method] = function(url$3, config) {
|
|
21069
|
+
return this.request(mergeConfig$1(config || {}, {
|
|
21070
|
+
method,
|
|
21071
|
+
url: url$3,
|
|
21072
|
+
data: (config || {}).data
|
|
21073
|
+
}));
|
|
21074
|
+
};
|
|
21075
|
+
});
|
|
21076
|
+
utils_default.forEach([
|
|
21077
|
+
"post",
|
|
21078
|
+
"put",
|
|
21079
|
+
"patch"
|
|
21080
|
+
], function forEachMethodWithData(method) {
|
|
21081
|
+
function generateHTTPMethod(isForm) {
|
|
21082
|
+
return function httpMethod(url$3, data, config) {
|
|
21083
|
+
return this.request(mergeConfig$1(config || {}, {
|
|
21084
|
+
method,
|
|
21085
|
+
headers: isForm ? { "Content-Type": "multipart/form-data" } : {},
|
|
21086
|
+
url: url$3,
|
|
21087
|
+
data
|
|
21088
|
+
}));
|
|
21089
|
+
};
|
|
21090
|
+
}
|
|
21091
|
+
Axios$1.prototype[method] = generateHTTPMethod();
|
|
21092
|
+
Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
21093
|
+
});
|
|
21094
|
+
var Axios_default = Axios$1;
|
|
21095
|
+
|
|
21096
|
+
//#endregion
|
|
21097
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/CancelToken.js
|
|
21098
|
+
/**
|
|
21099
|
+
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
21100
|
+
*
|
|
21101
|
+
* @param {Function} executor The executor function.
|
|
21102
|
+
*
|
|
21103
|
+
* @returns {CancelToken}
|
|
21104
|
+
*/
|
|
21105
|
+
var CancelToken$1 = class CancelToken$1 {
|
|
21106
|
+
constructor(executor) {
|
|
21107
|
+
if (typeof executor !== "function") throw new TypeError("executor must be a function.");
|
|
21108
|
+
let resolvePromise;
|
|
21109
|
+
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
21110
|
+
resolvePromise = resolve;
|
|
21111
|
+
});
|
|
21112
|
+
const token = this;
|
|
21113
|
+
this.promise.then((cancel$2) => {
|
|
21114
|
+
if (!token._listeners) return;
|
|
21115
|
+
let i = token._listeners.length;
|
|
21116
|
+
while (i-- > 0) token._listeners[i](cancel$2);
|
|
21117
|
+
token._listeners = null;
|
|
21118
|
+
});
|
|
21119
|
+
this.promise.then = (onfulfilled) => {
|
|
21120
|
+
let _resolve;
|
|
21121
|
+
const promise = new Promise((resolve) => {
|
|
21122
|
+
token.subscribe(resolve);
|
|
21123
|
+
_resolve = resolve;
|
|
21124
|
+
}).then(onfulfilled);
|
|
21125
|
+
promise.cancel = function reject() {
|
|
21126
|
+
token.unsubscribe(_resolve);
|
|
21127
|
+
};
|
|
21128
|
+
return promise;
|
|
21129
|
+
};
|
|
21130
|
+
executor(function cancel$2(message, config, request) {
|
|
21131
|
+
if (token.reason) return;
|
|
21132
|
+
token.reason = new CanceledError_default(message, config, request);
|
|
21133
|
+
resolvePromise(token.reason);
|
|
21134
|
+
});
|
|
21135
|
+
}
|
|
21136
|
+
/**
|
|
21137
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
21138
|
+
*/
|
|
21139
|
+
throwIfRequested() {
|
|
21140
|
+
if (this.reason) throw this.reason;
|
|
21141
|
+
}
|
|
21142
|
+
/**
|
|
21143
|
+
* Subscribe to the cancel signal
|
|
21144
|
+
*/
|
|
21145
|
+
subscribe(listener) {
|
|
21146
|
+
if (this.reason) {
|
|
21147
|
+
listener(this.reason);
|
|
21148
|
+
return;
|
|
21149
|
+
}
|
|
21150
|
+
if (this._listeners) this._listeners.push(listener);
|
|
21151
|
+
else this._listeners = [listener];
|
|
21152
|
+
}
|
|
21153
|
+
/**
|
|
21154
|
+
* Unsubscribe from the cancel signal
|
|
21155
|
+
*/
|
|
21156
|
+
unsubscribe(listener) {
|
|
21157
|
+
if (!this._listeners) return;
|
|
21158
|
+
const index = this._listeners.indexOf(listener);
|
|
21159
|
+
if (index !== -1) this._listeners.splice(index, 1);
|
|
21160
|
+
}
|
|
21161
|
+
toAbortSignal() {
|
|
21162
|
+
const controller = new AbortController();
|
|
21163
|
+
const abort$3 = (err) => {
|
|
21164
|
+
controller.abort(err);
|
|
21165
|
+
};
|
|
21166
|
+
this.subscribe(abort$3);
|
|
21167
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort$3);
|
|
21168
|
+
return controller.signal;
|
|
21169
|
+
}
|
|
21170
|
+
/**
|
|
21171
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
21172
|
+
* cancels the `CancelToken`.
|
|
21173
|
+
*/
|
|
21174
|
+
static source() {
|
|
21175
|
+
let cancel$2;
|
|
21176
|
+
return {
|
|
21177
|
+
token: new CancelToken$1(function executor(c) {
|
|
21178
|
+
cancel$2 = c;
|
|
21179
|
+
}),
|
|
21180
|
+
cancel: cancel$2
|
|
21181
|
+
};
|
|
21182
|
+
}
|
|
21183
|
+
};
|
|
21184
|
+
var CancelToken_default = CancelToken$1;
|
|
21185
|
+
|
|
21186
|
+
//#endregion
|
|
21187
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/spread.js
|
|
21188
|
+
/**
|
|
21189
|
+
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
21190
|
+
*
|
|
21191
|
+
* Common use case would be to use `Function.prototype.apply`.
|
|
21192
|
+
*
|
|
21193
|
+
* ```js
|
|
21194
|
+
* function f(x, y, z) {}
|
|
21195
|
+
* var args = [1, 2, 3];
|
|
21196
|
+
* f.apply(null, args);
|
|
21197
|
+
* ```
|
|
21198
|
+
*
|
|
21199
|
+
* With `spread` this example can be re-written.
|
|
21200
|
+
*
|
|
21201
|
+
* ```js
|
|
21202
|
+
* spread(function(x, y, z) {})([1, 2, 3]);
|
|
21203
|
+
* ```
|
|
21204
|
+
*
|
|
21205
|
+
* @param {Function} callback
|
|
21206
|
+
*
|
|
21207
|
+
* @returns {Function}
|
|
21208
|
+
*/
|
|
21209
|
+
function spread$1(callback) {
|
|
21210
|
+
return function wrap$1(arr) {
|
|
21211
|
+
return callback.apply(null, arr);
|
|
21212
|
+
};
|
|
21213
|
+
}
|
|
21214
|
+
|
|
21215
|
+
//#endregion
|
|
21216
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/isAxiosError.js
|
|
21217
|
+
/**
|
|
21218
|
+
* Determines whether the payload is an error thrown by Axios
|
|
21219
|
+
*
|
|
21220
|
+
* @param {*} payload The value to test
|
|
21221
|
+
*
|
|
21222
|
+
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
21223
|
+
*/
|
|
21224
|
+
function isAxiosError$1(payload) {
|
|
21225
|
+
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
21226
|
+
}
|
|
21227
|
+
|
|
21228
|
+
//#endregion
|
|
21229
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
21230
|
+
const HttpStatusCode$1 = {
|
|
21231
|
+
Continue: 100,
|
|
21232
|
+
SwitchingProtocols: 101,
|
|
21233
|
+
Processing: 102,
|
|
21234
|
+
EarlyHints: 103,
|
|
21235
|
+
Ok: 200,
|
|
21236
|
+
Created: 201,
|
|
21237
|
+
Accepted: 202,
|
|
21238
|
+
NonAuthoritativeInformation: 203,
|
|
21239
|
+
NoContent: 204,
|
|
21240
|
+
ResetContent: 205,
|
|
21241
|
+
PartialContent: 206,
|
|
21242
|
+
MultiStatus: 207,
|
|
21243
|
+
AlreadyReported: 208,
|
|
21244
|
+
ImUsed: 226,
|
|
21245
|
+
MultipleChoices: 300,
|
|
21246
|
+
MovedPermanently: 301,
|
|
21247
|
+
Found: 302,
|
|
21248
|
+
SeeOther: 303,
|
|
21249
|
+
NotModified: 304,
|
|
21250
|
+
UseProxy: 305,
|
|
21251
|
+
Unused: 306,
|
|
21252
|
+
TemporaryRedirect: 307,
|
|
21253
|
+
PermanentRedirect: 308,
|
|
21254
|
+
BadRequest: 400,
|
|
21255
|
+
Unauthorized: 401,
|
|
21256
|
+
PaymentRequired: 402,
|
|
21257
|
+
Forbidden: 403,
|
|
21258
|
+
NotFound: 404,
|
|
21259
|
+
MethodNotAllowed: 405,
|
|
21260
|
+
NotAcceptable: 406,
|
|
21261
|
+
ProxyAuthenticationRequired: 407,
|
|
21262
|
+
RequestTimeout: 408,
|
|
21263
|
+
Conflict: 409,
|
|
21264
|
+
Gone: 410,
|
|
21265
|
+
LengthRequired: 411,
|
|
21266
|
+
PreconditionFailed: 412,
|
|
21267
|
+
PayloadTooLarge: 413,
|
|
21268
|
+
UriTooLong: 414,
|
|
21269
|
+
UnsupportedMediaType: 415,
|
|
21270
|
+
RangeNotSatisfiable: 416,
|
|
21271
|
+
ExpectationFailed: 417,
|
|
21272
|
+
ImATeapot: 418,
|
|
21273
|
+
MisdirectedRequest: 421,
|
|
21274
|
+
UnprocessableEntity: 422,
|
|
21275
|
+
Locked: 423,
|
|
21276
|
+
FailedDependency: 424,
|
|
21277
|
+
TooEarly: 425,
|
|
21278
|
+
UpgradeRequired: 426,
|
|
21279
|
+
PreconditionRequired: 428,
|
|
21280
|
+
TooManyRequests: 429,
|
|
21281
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
21282
|
+
UnavailableForLegalReasons: 451,
|
|
21283
|
+
InternalServerError: 500,
|
|
21284
|
+
NotImplemented: 501,
|
|
21285
|
+
BadGateway: 502,
|
|
21286
|
+
ServiceUnavailable: 503,
|
|
21287
|
+
GatewayTimeout: 504,
|
|
21288
|
+
HttpVersionNotSupported: 505,
|
|
21289
|
+
VariantAlsoNegotiates: 506,
|
|
21290
|
+
InsufficientStorage: 507,
|
|
21291
|
+
LoopDetected: 508,
|
|
21292
|
+
NotExtended: 510,
|
|
21293
|
+
NetworkAuthenticationRequired: 511,
|
|
21294
|
+
WebServerIsDown: 521,
|
|
21295
|
+
ConnectionTimedOut: 522,
|
|
21296
|
+
OriginIsUnreachable: 523,
|
|
21297
|
+
TimeoutOccurred: 524,
|
|
21298
|
+
SslHandshakeFailed: 525,
|
|
21299
|
+
InvalidSslCertificate: 526
|
|
21300
|
+
};
|
|
21301
|
+
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
|
21302
|
+
HttpStatusCode$1[value] = key;
|
|
21303
|
+
});
|
|
21304
|
+
var HttpStatusCode_default = HttpStatusCode$1;
|
|
21305
|
+
|
|
21306
|
+
//#endregion
|
|
21307
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/axios.js
|
|
21308
|
+
/**
|
|
21309
|
+
* Create an instance of Axios
|
|
21310
|
+
*
|
|
21311
|
+
* @param {Object} defaultConfig The default config for the instance
|
|
21312
|
+
*
|
|
21313
|
+
* @returns {Axios} A new instance of Axios
|
|
21314
|
+
*/
|
|
21315
|
+
function createInstance(defaultConfig) {
|
|
21316
|
+
const context = new Axios_default(defaultConfig);
|
|
21317
|
+
const instance = bind(Axios_default.prototype.request, context);
|
|
21318
|
+
utils_default.extend(instance, Axios_default.prototype, context, { allOwnKeys: true });
|
|
21319
|
+
utils_default.extend(instance, context, null, { allOwnKeys: true });
|
|
21320
|
+
instance.create = function create(instanceConfig) {
|
|
21321
|
+
return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
|
|
21322
|
+
};
|
|
21323
|
+
return instance;
|
|
21324
|
+
}
|
|
21325
|
+
const axios = createInstance(defaults_default);
|
|
21326
|
+
axios.Axios = Axios_default;
|
|
21327
|
+
axios.CanceledError = CanceledError_default;
|
|
21328
|
+
axios.CancelToken = CancelToken_default;
|
|
21329
|
+
axios.isCancel = isCancel$1;
|
|
21330
|
+
axios.VERSION = VERSION$1;
|
|
21331
|
+
axios.toFormData = toFormData_default;
|
|
21332
|
+
axios.AxiosError = AxiosError_default;
|
|
21333
|
+
axios.Cancel = axios.CanceledError;
|
|
21334
|
+
axios.all = function all$1(promises) {
|
|
21335
|
+
return Promise.all(promises);
|
|
21336
|
+
};
|
|
21337
|
+
axios.spread = spread$1;
|
|
21338
|
+
axios.isAxiosError = isAxiosError$1;
|
|
21339
|
+
axios.mergeConfig = mergeConfig$1;
|
|
21340
|
+
axios.AxiosHeaders = AxiosHeaders_default;
|
|
21341
|
+
axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
21342
|
+
axios.getAdapter = adapters_default.getAdapter;
|
|
21343
|
+
axios.HttpStatusCode = HttpStatusCode_default;
|
|
21344
|
+
axios.default = axios;
|
|
21345
|
+
var axios_default = axios;
|
|
21346
|
+
|
|
21347
|
+
//#endregion
|
|
21348
|
+
//#region ../../node_modules/.pnpm/axios@1.13.2/node_modules/axios/index.js
|
|
21349
|
+
const { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios_default;
|
|
21350
|
+
|
|
21351
|
+
//#endregion
|
|
21352
|
+
//#region ../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js
|
|
21353
|
+
var require_classnames = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js": ((exports, module) => {
|
|
21354
|
+
/*!
|
|
21355
|
+
Copyright (c) 2018 Jed Watson.
|
|
21356
|
+
Licensed under the MIT License (MIT), see
|
|
21357
|
+
http://jedwatson.github.io/classnames
|
|
21358
|
+
*/
|
|
21359
|
+
(function() {
|
|
21360
|
+
"use strict";
|
|
21361
|
+
var hasOwn$3 = {}.hasOwnProperty;
|
|
21362
|
+
function classNames() {
|
|
21363
|
+
var classes = "";
|
|
21364
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
21365
|
+
var arg = arguments[i];
|
|
21366
|
+
if (arg) classes = appendClass(classes, parseValue(arg));
|
|
21367
|
+
}
|
|
21368
|
+
return classes;
|
|
21369
|
+
}
|
|
21370
|
+
function parseValue(arg) {
|
|
21371
|
+
if (typeof arg === "string" || typeof arg === "number") return arg;
|
|
21372
|
+
if (typeof arg !== "object") return "";
|
|
21373
|
+
if (Array.isArray(arg)) return classNames.apply(null, arg);
|
|
21374
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) return arg.toString();
|
|
21375
|
+
var classes = "";
|
|
21376
|
+
for (var key in arg) if (hasOwn$3.call(arg, key) && arg[key]) classes = appendClass(classes, key);
|
|
21377
|
+
return classes;
|
|
21378
|
+
}
|
|
21379
|
+
function appendClass(value, newClass) {
|
|
21380
|
+
if (!newClass) return value;
|
|
21381
|
+
if (value) return value + " " + newClass;
|
|
21382
|
+
return value + newClass;
|
|
21383
|
+
}
|
|
21384
|
+
if (typeof module !== "undefined" && module.exports) {
|
|
21385
|
+
classNames.default = classNames;
|
|
21386
|
+
module.exports = classNames;
|
|
21387
|
+
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) define("classnames", [], function() {
|
|
21388
|
+
return classNames;
|
|
21389
|
+
});
|
|
21390
|
+
else window.classNames = classNames;
|
|
21391
|
+
})();
|
|
21392
|
+
}) });
|
|
21393
|
+
|
|
21394
|
+
//#endregion
|
|
21395
|
+
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
21396
|
+
function r(e) {
|
|
21397
|
+
var t, f, n = "";
|
|
21398
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
21399
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
21400
|
+
var o = e.length;
|
|
21401
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
21402
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
21403
|
+
return n;
|
|
21404
|
+
}
|
|
21405
|
+
function clsx() {
|
|
21406
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
21407
|
+
return n;
|
|
21408
|
+
}
|
|
21409
|
+
var clsx_default = clsx;
|
|
21410
|
+
|
|
21411
|
+
//#endregion
|
|
21412
|
+
//#region src/string/className.ts
|
|
21413
|
+
var import_classnames = /* @__PURE__ */ __toESM(require_classnames(), 1);
|
|
21414
|
+
const stringClsn = (...args) => (0, import_classnames.default)(...args);
|
|
21415
|
+
const stringClsx = clsx_default;
|
|
21416
|
+
|
|
21417
|
+
//#endregion
|
|
21418
|
+
//#region src/string/proto.ts
|
|
21419
|
+
/**
|
|
21420
|
+
* 方法 `String.prototype.replace` 的第二个参数的快捷实现,可根据对象的键值对进行替换
|
|
21421
|
+
*
|
|
21422
|
+
* @example args = [ 'h', 0, 'hello' ]
|
|
21423
|
+
* @example args = [ '[h]', 'h', 0, '[h][e][l][l][o]' ]
|
|
21424
|
+
*/
|
|
21425
|
+
function stringReplaceParametersWithObj(obj) {
|
|
21426
|
+
return (...args) => {
|
|
21427
|
+
const substring = at(args, [-3])[0];
|
|
21428
|
+
if (substring && Object.prototype.hasOwnProperty.call(obj, substring)) return obj[substring];
|
|
21429
|
+
return head(args);
|
|
21430
|
+
};
|
|
21431
|
+
}
|
|
21432
|
+
/**
|
|
21433
|
+
* 方法 `String.prototype.slice` 的参数,额外支持索引区间排序问题
|
|
21434
|
+
*
|
|
21435
|
+
* @reference https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice
|
|
21436
|
+
* @reference https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring
|
|
21437
|
+
* @reference https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr
|
|
21438
|
+
*/
|
|
21439
|
+
function stringSliceParametersWithSort(start, end) {
|
|
21440
|
+
const startArg = Number.isSafeInteger(start) ? start : 0;
|
|
21441
|
+
const endArg = !isNotNumber(end) ? end : 0;
|
|
21442
|
+
if (isUndefined(endArg)) return [startArg];
|
|
21443
|
+
if (startArg >= 0 && endArg < 0) return [startArg, endArg];
|
|
21444
|
+
if (startArg < 0 && endArg >= 0) return [endArg, startArg];
|
|
21445
|
+
return [startArg, endArg].sort((a, b) => a - b);
|
|
21446
|
+
}
|
|
21447
|
+
|
|
21448
|
+
//#endregion
|
|
21449
|
+
//#region src/request/instance.ts
|
|
21450
|
+
/**
|
|
21451
|
+
* 自定义 axios 请求
|
|
21452
|
+
* @function 1. 请求体: 支持 argsRegexp、args 实现动态路径
|
|
21453
|
+
* @function 2. 拦截器: 在不改变 axios 原始行为的前提下,实现对应拦截器的特性开关 (不推荐: runWhen 仅支持请求拦截器,不支持响应拦截器)
|
|
21454
|
+
* @function 3. 响应体: 在 safeRequest 实现错误优先
|
|
21455
|
+
* @reference https://axios-http.com/zh/docs/req_config
|
|
21456
|
+
*/
|
|
21457
|
+
var Request = class {
|
|
21458
|
+
/**
|
|
21459
|
+
* axios 实例
|
|
21460
|
+
*/
|
|
21461
|
+
#instance;
|
|
21462
|
+
/**
|
|
21463
|
+
* 在拦截器内获取指定名称的配置选项
|
|
21464
|
+
* @param {InternalAxiosRequestConfig} config 当前请求的配置
|
|
21465
|
+
* @param {string} optionName 配置选项名称
|
|
21466
|
+
* @returns {any} 配置选项的值
|
|
21467
|
+
*/
|
|
21468
|
+
static getOptionValue(config, optionName) {
|
|
21469
|
+
return config?.fetchOptions?.[optionName];
|
|
21470
|
+
}
|
|
21471
|
+
/**
|
|
21472
|
+
* 将额外的自定义 options 合并到 fetchOptions 并往下传递
|
|
21473
|
+
* @function 自定义功能: 贯穿整个请求流程,实现对应拦截器的特性开关
|
|
21474
|
+
* @param {AxiosRequestConfigWrapper} config 请求配置对象
|
|
21475
|
+
* @returns {Record<string, any>} 最终的 config.fetchOptions 对象
|
|
21476
|
+
*/
|
|
21477
|
+
#getInternalOptions(config) {
|
|
21478
|
+
const { fetchOptions, options } = config;
|
|
21479
|
+
return Object.assign({}, fetchOptions, options);
|
|
21480
|
+
}
|
|
21481
|
+
/**
|
|
21482
|
+
* 全局注册拦截器,且不会被移除,通过特性开关外部控制
|
|
21483
|
+
* @description 拦截器是洋葱模型 - 拦截器 request 先注册后执行,拦截器 response 先注册先执行
|
|
21484
|
+
* @description 内置属性 transformRequest 和 transformResponse 是洋葱结构的最内层,可以当作特殊的拦截器
|
|
21485
|
+
* @param {Record<string, AxiosInterceptorParameters>} interceptors 待注册的拦截器
|
|
21486
|
+
* @returns {void} 无返回值
|
|
21487
|
+
*/
|
|
21488
|
+
#registerInterceptors(interceptors = []) {
|
|
21489
|
+
for (const interceptor of interceptors) {
|
|
21490
|
+
const { request, response } = interceptor;
|
|
21491
|
+
request && this.#instance.interceptors.request.use(request.onFulfilled, request.onRejected, request.options);
|
|
21492
|
+
response && this.#instance.interceptors.response.use(response.onFulfilled, response.onRejected);
|
|
21493
|
+
}
|
|
21494
|
+
}
|
|
21495
|
+
/**
|
|
21496
|
+
* 可复用的请求体处理逻辑,返回处理后的请求配置对象
|
|
21497
|
+
* @param {AxiosRequestConfigWrapper} config 请求配置对象
|
|
21498
|
+
* @returns {AxiosRequestConfig} 处理后的请求配置对象
|
|
21499
|
+
*/
|
|
21500
|
+
#beforeRequest(config) {
|
|
21501
|
+
const { url: url$3, argsRegexp, args, fetchOptions, options, ...restConfig } = config;
|
|
21502
|
+
const mergedUrl = this.getUri({
|
|
21503
|
+
url: url$3,
|
|
21504
|
+
argsRegexp,
|
|
21505
|
+
args
|
|
21506
|
+
});
|
|
21507
|
+
const mergedFetchOptions = this.#getInternalOptions({
|
|
21508
|
+
fetchOptions,
|
|
21509
|
+
options
|
|
21510
|
+
});
|
|
21511
|
+
return {
|
|
21512
|
+
...restConfig,
|
|
21513
|
+
url: mergedUrl,
|
|
21514
|
+
fetchOptions: mergedFetchOptions
|
|
21515
|
+
};
|
|
21516
|
+
}
|
|
21517
|
+
constructor(createAxiosDefaults) {
|
|
21518
|
+
const { fetchOptions, options, interceptors, ...restCreateAxiosDefaults } = createAxiosDefaults;
|
|
21519
|
+
const mergedFetchOptions = this.#getInternalOptions({
|
|
21520
|
+
fetchOptions,
|
|
21521
|
+
options
|
|
21522
|
+
});
|
|
21523
|
+
const mergedConfig = {
|
|
21524
|
+
...restCreateAxiosDefaults,
|
|
21525
|
+
fetchOptions: mergedFetchOptions
|
|
21526
|
+
};
|
|
21527
|
+
this.#instance = axios_default.create(mergedConfig);
|
|
21528
|
+
this.#registerInterceptors(interceptors);
|
|
21529
|
+
}
|
|
21530
|
+
/**
|
|
21531
|
+
* 获取最终的请求路径
|
|
21532
|
+
* @function 自定义功能: 若只包含 `{ url?; argsRegexp?; args?; }`,则仅执行动态路径参数替换
|
|
21533
|
+
* @param {AxiosRequestConfigWrapper} config 请求配置对象
|
|
21534
|
+
* @returns {string} 最终的请求路径
|
|
21535
|
+
*/
|
|
21536
|
+
getUri(config) {
|
|
21537
|
+
const { url: url$3 = "", argsRegexp, args, ...restConfig } = config;
|
|
21538
|
+
const mergedArgsRegexp = argsRegexp ?? anyRuleWithBracket.rule;
|
|
21539
|
+
const mergedArgs = args ?? CONSTANT_EMPTY_OBJECT;
|
|
21540
|
+
const mergedUrl = url$3.replace(mergedArgsRegexp, stringReplaceParametersWithObj(mergedArgs));
|
|
21541
|
+
if (isEmpty(restConfig)) return mergedUrl;
|
|
21542
|
+
return this.#instance.getUri({
|
|
21543
|
+
...restConfig,
|
|
21544
|
+
url: mergedUrl
|
|
21545
|
+
});
|
|
21546
|
+
}
|
|
21547
|
+
/**
|
|
21548
|
+
* 包装请求方法
|
|
21549
|
+
* @param {AxiosRequestConfigWrapper} config 请求体
|
|
21550
|
+
* @returns {SafeRequestReturnValue} 响应体
|
|
21551
|
+
*/
|
|
21552
|
+
async request(config) {
|
|
21553
|
+
const mergedConfig = this.#beforeRequest(config);
|
|
21554
|
+
return this.#instance.request(mergedConfig);
|
|
21555
|
+
}
|
|
21556
|
+
/**
|
|
21557
|
+
* 包装错误优先的请求方法
|
|
21558
|
+
* @param {AxiosRequestConfigWrapper} config 请求体
|
|
21559
|
+
* @returns {SafeRequestReturnValue} 响应体
|
|
21560
|
+
*/
|
|
21561
|
+
async safeRequest(config) {
|
|
21562
|
+
const mergedConfig = this.#beforeRequest(config);
|
|
21563
|
+
return this.#instance.request(mergedConfig).then((response) => {
|
|
21564
|
+
if (isNil(response)) return [new AxiosError("The error occurred because no return value was set in AxiosRequestInterceptor or AxiosResponseInterceptor", "ERR_INTERCEPTOR"), void 0];
|
|
21565
|
+
if (isError(response) && response.isAxiosError) return [response, void 0];
|
|
21566
|
+
return [null, response];
|
|
21567
|
+
}).catch((err) => {
|
|
21568
|
+
return [err, void 0];
|
|
21569
|
+
});
|
|
21570
|
+
}
|
|
21571
|
+
};
|
|
21572
|
+
|
|
21573
|
+
//#endregion
|
|
21574
|
+
//#region src/request/interceptors.node.ts
|
|
21575
|
+
/**
|
|
21576
|
+
* 预设拦截器 - 响应耗时
|
|
21577
|
+
*/
|
|
21578
|
+
const presetInterceptorWithResponseLog = { response: {
|
|
21579
|
+
onFulfilled(res) {
|
|
21580
|
+
const { config } = res;
|
|
21581
|
+
const requestId = config.headers["X-Request-Id"];
|
|
21582
|
+
Request.getOptionValue(config, "enableTimeConsuming") && console.timeEnd(`[presetInterceptorWithLog] ${requestId}`);
|
|
21583
|
+
return res;
|
|
21584
|
+
},
|
|
21585
|
+
onRejected(err) {
|
|
21586
|
+
const requestId = err.config.headers["X-Request-Id"];
|
|
21587
|
+
Request.getOptionValue(err.config, "enableTimeConsuming") && console.timeEnd(`[presetInterceptorWithLog] ${requestId}`);
|
|
21588
|
+
throw err;
|
|
21589
|
+
}
|
|
21590
|
+
} };
|
|
21591
|
+
/**
|
|
21592
|
+
* 预设拦截器 - 响应尝试 JSON 解析,若解析成功,则将解析结果赋值给 res.dataJSON,不会影响后续拦截器的参数
|
|
21593
|
+
* @description 若 responseType 为 json 或 forcedJSONParsing 为 true ,则尝试解析响应体为 JSON 字符串
|
|
21594
|
+
* @description 其中前提是通过 `transformResponse: []` 覆盖内置的默认 transformResponse 函数
|
|
21595
|
+
*/
|
|
21596
|
+
const presetInterceptorWithResponseJSON = { response: { async onFulfilled(res) {
|
|
21597
|
+
const { config, request, data } = res;
|
|
21598
|
+
const allowJSONRequested = config.responseType === "json" || (config.transitional?.forcedJSONParsing ?? true);
|
|
21599
|
+
let tempData = null;
|
|
21600
|
+
if (isString(data) && allowJSONRequested) tempData = data;
|
|
21601
|
+
else if (FileBuffer.isBlob(data) && data.type === "application/json" && allowJSONRequested) tempData = (await FileBuffer.fromBlob(data)).toString();
|
|
21602
|
+
if (isNull(tempData)) return res;
|
|
21603
|
+
const [err, json] = isJSONString(tempData, config.parseReviver);
|
|
21604
|
+
if (err) {
|
|
21605
|
+
if (!(config.transitional?.silentJSONParsing ?? false)) throw err.name === "SyntaxError" ? AxiosError.from(err, AxiosError.ERR_BAD_RESPONSE, config, request, res) : err;
|
|
21606
|
+
return res;
|
|
21607
|
+
}
|
|
21608
|
+
res.dataJSON = json;
|
|
21609
|
+
return res;
|
|
21610
|
+
} } };
|
|
21611
|
+
/**
|
|
21612
|
+
* 预设拦截器 - 请求耗时
|
|
21613
|
+
*/
|
|
21614
|
+
const presetInterceptorWithRequestLog = { request: { onFulfilled(config) {
|
|
21615
|
+
const requestId = Date.now().toString();
|
|
21616
|
+
config.headers["X-Request-Id"] = requestId;
|
|
21617
|
+
Request.getOptionValue(config, "enableTimeConsuming") && console.time(`[presetInterceptorWithLog] ${requestId}`);
|
|
21618
|
+
return config;
|
|
21619
|
+
} } };
|
|
21620
|
+
/**
|
|
21621
|
+
* 预设拦截器 - 请求认证
|
|
21622
|
+
*/
|
|
21623
|
+
const presetInterceptorWithRequestAuth = { request: { onFulfilled(config) {
|
|
21624
|
+
config.headers.setAuthorization(`Bearer ${sessionStorage.getItem("Authorization") || ""}`);
|
|
21625
|
+
return config;
|
|
21626
|
+
} } };
|
|
21627
|
+
|
|
21628
|
+
//#endregion
|
|
21629
|
+
//#region src/tree/treeFilter.ts
|
|
21630
|
+
/**
|
|
21631
|
+
* 递归过滤节点 - 保留匹配节点及其所有父节点路径
|
|
21632
|
+
* @param {TreeFilterParams} params 递归过滤节点的参数
|
|
21633
|
+
* @param {Required<Pick<TreeOptions, 'childrenKey' | 'filter'>>} options 递归过滤节点的选项
|
|
21634
|
+
* @returns {[boolean, any]} [过滤结果, 过滤后的节点]
|
|
21635
|
+
*/
|
|
21636
|
+
function treeFilterNode(params, options) {
|
|
21637
|
+
const { node, index, level } = params;
|
|
21638
|
+
const { childrenKey, filter } = options;
|
|
21639
|
+
const filteredChildren = [];
|
|
21640
|
+
const children = node[childrenKey];
|
|
21641
|
+
if (isArray(children) && children.length > 0) for (let i = 0; i < children.length; i++) {
|
|
21642
|
+
const [flag, filteredNode] = treeFilterNode({
|
|
21643
|
+
node: children[i],
|
|
21644
|
+
index: i,
|
|
21645
|
+
level: level + 1
|
|
21646
|
+
}, options);
|
|
21647
|
+
flag && filteredChildren.push(filteredNode);
|
|
21648
|
+
}
|
|
21649
|
+
if (filteredChildren.length > 0) return [true, {
|
|
21650
|
+
...node,
|
|
21651
|
+
[childrenKey]: filteredChildren
|
|
21652
|
+
}];
|
|
21653
|
+
if (filter(node, index, level)) return [true, {
|
|
21654
|
+
...node,
|
|
21655
|
+
[childrenKey]: []
|
|
21656
|
+
}];
|
|
21657
|
+
return [false, null];
|
|
21658
|
+
}
|
|
21659
|
+
/**
|
|
21660
|
+
* 过滤树形结构 -保留匹配节点及其完整父节点路径
|
|
21661
|
+
* @param items 原始树形数据数组
|
|
21662
|
+
* @param options 配置选项
|
|
21663
|
+
* @returns {any[]} 过滤后的树形数据
|
|
21664
|
+
*/
|
|
21665
|
+
function treeFilter(items, options) {
|
|
21666
|
+
const { childrenKey = "children", filter } = options || {};
|
|
21667
|
+
if (!filter) return items;
|
|
21668
|
+
const result = [];
|
|
21669
|
+
for (let i = 0; i < items.length; i++) {
|
|
21670
|
+
const [flag, filteredNode] = treeFilterNode({
|
|
21671
|
+
node: items[i],
|
|
21672
|
+
index: i,
|
|
21673
|
+
level: 0
|
|
21674
|
+
}, {
|
|
21675
|
+
childrenKey,
|
|
21676
|
+
filter
|
|
21677
|
+
});
|
|
21678
|
+
flag && result.push(filteredNode);
|
|
21679
|
+
}
|
|
21680
|
+
return result;
|
|
21681
|
+
}
|
|
21682
|
+
|
|
21683
|
+
//#endregion
|
|
21684
|
+
//#region src/tree/treeFlatten.ts
|
|
21685
|
+
/**
|
|
21686
|
+
* @title 借助对象的引用将树形结构转化为平铺结构
|
|
21687
|
+
* @param {any[]} items 树形结构数组
|
|
21688
|
+
* @param {any} options 配置项
|
|
21689
|
+
* @param {any} options.childrenKey 配置项,默认值为 'children'
|
|
21690
|
+
* @returns 平铺结构数组
|
|
21691
|
+
*/
|
|
21692
|
+
function treeFlatten(items, options) {
|
|
21693
|
+
const { childrenKey = "children" } = options || {};
|
|
21694
|
+
const aFlatten = [];
|
|
21695
|
+
for (const item of items) {
|
|
21696
|
+
const { [childrenKey]: children, ...restItem } = item;
|
|
21697
|
+
aFlatten.push(restItem);
|
|
21698
|
+
if (isArray(children) && children.length) aFlatten.push(...treeFlatten(children, options));
|
|
21699
|
+
}
|
|
21700
|
+
return aFlatten;
|
|
21701
|
+
}
|
|
21702
|
+
|
|
21703
|
+
//#endregion
|
|
21704
|
+
//#region src/tree/treeGenerate.ts
|
|
21705
|
+
/**
|
|
21706
|
+
* @title 借助对象的引用将平铺结构转化为树形结构
|
|
21707
|
+
* @param {any[]} items 平铺结构数组
|
|
21708
|
+
* @param {Omit<TreeOptions, 'filter'>} options 配置项
|
|
21709
|
+
* @returns 树形结构数组
|
|
21710
|
+
*
|
|
21711
|
+
* @reference https://juejin.cn/post/6983904373508145189#heading-8
|
|
21712
|
+
*/
|
|
21713
|
+
function treeGenerate(items, options) {
|
|
21714
|
+
const { parentIdKey = "pid", primaryIdKey = "id", childrenKey = "children", rootValue = null } = options || {};
|
|
21715
|
+
const aTree = [];
|
|
21716
|
+
const oItem = {};
|
|
21717
|
+
for (const item of items) {
|
|
21718
|
+
const primaryId = item[primaryIdKey];
|
|
21719
|
+
const parentId = item[parentIdKey];
|
|
21720
|
+
if (!oItem[primaryId]) oItem[primaryId] = {
|
|
21721
|
+
...item,
|
|
21722
|
+
[childrenKey]: []
|
|
21723
|
+
};
|
|
21724
|
+
else oItem[primaryId] = {
|
|
21725
|
+
...item,
|
|
21726
|
+
[childrenKey]: oItem[primaryId][childrenKey]
|
|
21727
|
+
};
|
|
21728
|
+
const treeItem = oItem[primaryId];
|
|
21729
|
+
if (parentId === rootValue) aTree.push(treeItem);
|
|
21730
|
+
else {
|
|
21731
|
+
if (!oItem[parentId]) oItem[parentId] = { [childrenKey]: [] };
|
|
21732
|
+
oItem[parentId][childrenKey].push(treeItem);
|
|
21733
|
+
}
|
|
21734
|
+
}
|
|
21735
|
+
return aTree;
|
|
21736
|
+
}
|
|
21737
|
+
|
|
21738
|
+
//#endregion
|
|
21739
|
+
Object.defineProperty(exports, 'Buffer', {
|
|
21740
|
+
enumerable: true,
|
|
21741
|
+
get: function () {
|
|
21742
|
+
return node_buffer.Buffer;
|
|
21743
|
+
}
|
|
21744
|
+
});
|
|
21745
|
+
exports.CONSTANT_EMPTY_ARRAY = CONSTANT_EMPTY_ARRAY;
|
|
21746
|
+
exports.CONSTANT_EMPTY_OBJECT = CONSTANT_EMPTY_OBJECT;
|
|
21747
|
+
exports.CONSTANT_NOOP = CONSTANT_NOOP;
|
|
21748
|
+
exports.DOMParser = DOMParser;
|
|
21749
|
+
exports.FileBuffer = FileBuffer;
|
|
21750
|
+
exports.FileTypeParser = FileTypeParser;
|
|
21751
|
+
exports.Request = Request;
|
|
21752
|
+
exports.XMLSerializer = XMLSerializer;
|
|
21753
|
+
exports.anyRule1 = anyRule1;
|
|
21754
|
+
exports.anyRule10 = anyRule10;
|
|
21755
|
+
exports.anyRule11 = anyRule11;
|
|
21756
|
+
exports.anyRule12 = anyRule12;
|
|
21757
|
+
exports.anyRule13 = anyRule13;
|
|
21758
|
+
exports.anyRule14 = anyRule14;
|
|
21759
|
+
exports.anyRule15 = anyRule15;
|
|
21760
|
+
exports.anyRule16 = anyRule16;
|
|
21761
|
+
exports.anyRule17 = anyRule17;
|
|
21762
|
+
exports.anyRule18 = anyRule18;
|
|
21763
|
+
exports.anyRule19 = anyRule19;
|
|
21764
|
+
exports.anyRule2 = anyRule2;
|
|
21765
|
+
exports.anyRule20 = anyRule20;
|
|
21766
|
+
exports.anyRule21 = anyRule21;
|
|
21767
|
+
exports.anyRule22 = anyRule22;
|
|
21768
|
+
exports.anyRule23 = anyRule23;
|
|
21769
|
+
exports.anyRule24 = anyRule24;
|
|
21770
|
+
exports.anyRule25 = anyRule25;
|
|
21771
|
+
exports.anyRule26 = anyRule26;
|
|
21772
|
+
exports.anyRule27 = anyRule27;
|
|
21773
|
+
exports.anyRule28 = anyRule28;
|
|
21774
|
+
exports.anyRule29 = anyRule29;
|
|
21775
|
+
exports.anyRule3 = anyRule3;
|
|
21776
|
+
exports.anyRule30 = anyRule30;
|
|
21777
|
+
exports.anyRule31 = anyRule31;
|
|
21778
|
+
exports.anyRule32 = anyRule32;
|
|
21779
|
+
exports.anyRule33 = anyRule33;
|
|
21780
|
+
exports.anyRule34 = anyRule34;
|
|
21781
|
+
exports.anyRule35 = anyRule35;
|
|
21782
|
+
exports.anyRule36 = anyRule36;
|
|
21783
|
+
exports.anyRule37 = anyRule37;
|
|
21784
|
+
exports.anyRule38 = anyRule38;
|
|
21785
|
+
exports.anyRule39 = anyRule39;
|
|
21786
|
+
exports.anyRule4 = anyRule4;
|
|
21787
|
+
exports.anyRule40 = anyRule40;
|
|
21788
|
+
exports.anyRule41 = anyRule41;
|
|
21789
|
+
exports.anyRule42 = anyRule42;
|
|
21790
|
+
exports.anyRule43 = anyRule43;
|
|
21791
|
+
exports.anyRule44 = anyRule44;
|
|
21792
|
+
exports.anyRule45 = anyRule45;
|
|
21793
|
+
exports.anyRule46 = anyRule46;
|
|
21794
|
+
exports.anyRule47 = anyRule47;
|
|
21795
|
+
exports.anyRule48 = anyRule48;
|
|
21796
|
+
exports.anyRule49 = anyRule49;
|
|
21797
|
+
exports.anyRule5 = anyRule5;
|
|
21798
|
+
exports.anyRule50 = anyRule50;
|
|
21799
|
+
exports.anyRule51 = anyRule51;
|
|
21800
|
+
exports.anyRule52 = anyRule52;
|
|
21801
|
+
exports.anyRule53 = anyRule53;
|
|
21802
|
+
exports.anyRule54 = anyRule54;
|
|
21803
|
+
exports.anyRule55 = anyRule55;
|
|
21804
|
+
exports.anyRule56 = anyRule56;
|
|
21805
|
+
exports.anyRule57 = anyRule57;
|
|
21806
|
+
exports.anyRule58 = anyRule58;
|
|
21807
|
+
exports.anyRule59 = anyRule59;
|
|
21808
|
+
exports.anyRule6 = anyRule6;
|
|
21809
|
+
exports.anyRule60 = anyRule60;
|
|
21810
|
+
exports.anyRule61 = anyRule61;
|
|
21811
|
+
exports.anyRule62 = anyRule62;
|
|
21812
|
+
exports.anyRule63 = anyRule63;
|
|
21813
|
+
exports.anyRule64 = anyRule64;
|
|
21814
|
+
exports.anyRule65 = anyRule65;
|
|
21815
|
+
exports.anyRule66 = anyRule66;
|
|
21816
|
+
exports.anyRule67 = anyRule67;
|
|
21817
|
+
exports.anyRule68 = anyRule68;
|
|
21818
|
+
exports.anyRule69 = anyRule69;
|
|
21819
|
+
exports.anyRule7 = anyRule7;
|
|
21820
|
+
exports.anyRule70 = anyRule70;
|
|
21821
|
+
exports.anyRule71 = anyRule71;
|
|
21822
|
+
exports.anyRule72 = anyRule72;
|
|
21823
|
+
exports.anyRule73 = anyRule73;
|
|
21824
|
+
exports.anyRule74 = anyRule74;
|
|
21825
|
+
exports.anyRule75 = anyRule75;
|
|
21826
|
+
exports.anyRule76 = anyRule76;
|
|
21827
|
+
exports.anyRule77 = anyRule77;
|
|
21828
|
+
exports.anyRule78 = anyRule78;
|
|
21829
|
+
exports.anyRule79 = anyRule79;
|
|
21830
|
+
exports.anyRule8 = anyRule8;
|
|
21831
|
+
exports.anyRule80 = anyRule80;
|
|
21832
|
+
exports.anyRule81 = anyRule81;
|
|
21833
|
+
exports.anyRule82 = anyRule82;
|
|
21834
|
+
exports.anyRule83 = anyRule83;
|
|
21835
|
+
exports.anyRule84 = anyRule84;
|
|
21836
|
+
exports.anyRule9 = anyRule9;
|
|
21837
|
+
exports.anyRuleWithBrace = anyRuleWithBrace;
|
|
21838
|
+
exports.anyRuleWithBracket = anyRuleWithBracket;
|
|
21839
|
+
exports.arrayCast = arrayCast;
|
|
21840
|
+
exports.datePrettyMs = datePrettyMs;
|
|
21841
|
+
exports.dateTimeAgoFormat = dateTimeAgoFormat;
|
|
21842
|
+
exports.dateTimeAgoLocale = dateTimeAgoLocale;
|
|
21843
|
+
exports.dateTimeAgoRender = dateTimeAgoRender;
|
|
21844
|
+
exports.dateTimeAgoRenderCancel = dateTimeAgoRenderCancel;
|
|
21845
|
+
exports.fileBytes = fileBytes;
|
|
21846
|
+
exports.fileTypeFromBlob = fileTypeFromBlob;
|
|
21847
|
+
exports.fileTypeFromBuffer = fileTypeFromBuffer;
|
|
21848
|
+
exports.fileTypeFromStream = fileTypeFromStream;
|
|
21849
|
+
exports.fileTypeFromTokenizer = fileTypeFromTokenizer;
|
|
21850
|
+
exports.fileTypeStream = fileTypeStream;
|
|
21851
|
+
exports.fileTypeSupportedExtensions = fileTypeSupportedExtensions;
|
|
21852
|
+
exports.fileTypeSupportedMimeTypes = fileTypeSupportedMimeTypes;
|
|
21853
|
+
exports.functionDebounce = functionDebounce;
|
|
21854
|
+
exports.functionThrottle = functionThrottle;
|
|
21855
|
+
exports.isArray = isArray;
|
|
21856
|
+
exports.isBigInt = isBigInt;
|
|
21857
|
+
exports.isBoolean = isBoolean;
|
|
21858
|
+
exports.isBooleanLike = isBooleanLike;
|
|
21859
|
+
exports.isBrowser = isBrowser;
|
|
21860
|
+
exports.isDate = isDate;
|
|
21861
|
+
exports.isEmpty = isEmpty;
|
|
21862
|
+
exports.isError = isError;
|
|
21863
|
+
exports.isFunction = isFunction;
|
|
21864
|
+
exports.isJSONArray = isJSONArray;
|
|
21865
|
+
exports.isJSONObject = isJSONObject;
|
|
21866
|
+
exports.isJSONString = isJSONString;
|
|
21867
|
+
exports.isJSONValue = isJSONValue;
|
|
21868
|
+
exports.isMap = isMap;
|
|
21869
|
+
exports.isNil = isNil;
|
|
21870
|
+
exports.isNode = isNode;
|
|
21871
|
+
exports.isNotNumber = isNotNumber;
|
|
21872
|
+
exports.isNull = isNull;
|
|
21873
|
+
exports.isNumber = isNumber;
|
|
21874
|
+
exports.isNumberLike = isNumberLike;
|
|
21875
|
+
exports.isObject = isObject;
|
|
21876
|
+
exports.isPlainObject = isPlainObject;
|
|
21877
|
+
exports.isPrimitive = isPrimitive;
|
|
21878
|
+
exports.isPromise = isPromise;
|
|
21879
|
+
exports.isRegExp = isRegExp;
|
|
21880
|
+
exports.isSet = isSet;
|
|
21881
|
+
exports.isString = isString;
|
|
21882
|
+
exports.isStringLike = isStringLike;
|
|
21883
|
+
exports.isSymbol = isSymbol;
|
|
21884
|
+
exports.isTagOf = isTagOf;
|
|
21885
|
+
exports.isTypeOf = isTypeOf;
|
|
21886
|
+
exports.isTypeOfResult = isTypeOfResult;
|
|
21887
|
+
exports.isUndefined = isUndefined;
|
|
21888
|
+
exports.isWeakMap = isWeakMap;
|
|
21889
|
+
exports.isWeakSet = isWeakSet;
|
|
21890
|
+
exports.objectClone = objectClone;
|
|
21891
|
+
exports.presetInterceptorWithRequestAuth = presetInterceptorWithRequestAuth;
|
|
21892
|
+
exports.presetInterceptorWithRequestLog = presetInterceptorWithRequestLog;
|
|
21893
|
+
exports.presetInterceptorWithResponseJSON = presetInterceptorWithResponseJSON;
|
|
21894
|
+
exports.presetInterceptorWithResponseLog = presetInterceptorWithResponseLog;
|
|
21895
|
+
exports.promiseAwaitTo = promiseAwaitTo;
|
|
21896
|
+
exports.promiseDelay = promiseDelay;
|
|
21897
|
+
exports.promiseLimit = promiseLimit;
|
|
21898
|
+
exports.promiseLimitFunction = promiseLimitFunction;
|
|
21899
|
+
exports.stringClsn = stringClsn;
|
|
21900
|
+
exports.stringClsx = stringClsx;
|
|
21901
|
+
exports.stringReplaceParametersWithObj = stringReplaceParametersWithObj;
|
|
21902
|
+
exports.stringSliceParametersWithSort = stringSliceParametersWithSort;
|
|
21903
|
+
exports.treeFilter = treeFilter;
|
|
21904
|
+
exports.treeFlatten = treeFlatten;
|
|
21905
|
+
exports.treeGenerate = treeGenerate;
|