@stellar/stellar-sdk 16.0.0-rc.1 → 16.0.0
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/README.md +22 -28
- package/dist/stellar-sdk-axios.js +245 -232
- package/dist/stellar-sdk-axios.js.map +1 -1
- package/dist/stellar-sdk-axios.min.js +1 -1
- package/dist/stellar-sdk-axios.min.js.map +1 -1
- package/dist/stellar-sdk.js +49 -36
- package/dist/stellar-sdk.js.map +1 -1
- package/dist/stellar-sdk.min.js +2 -2
- package/dist/stellar-sdk.min.js.map +1 -1
- package/lib/axios/cjs/base/auth.js +11 -11
- package/lib/axios/cjs/base/auth.js.map +1 -1
- package/lib/axios/cjs/base/keypair.js +1 -1
- package/lib/axios/cjs/base/keypair.js.map +1 -1
- package/lib/axios/cjs/base/transaction_builder.js +13 -1
- package/lib/axios/cjs/base/transaction_builder.js.map +1 -1
- package/lib/axios/cjs/bindings/config.js +1 -1
- package/lib/axios/cjs/bindings/config.js.map +1 -1
- package/lib/axios/cjs/bindings/wasm_fetcher.js +1 -1
- package/lib/axios/cjs/bindings/wasm_fetcher.js.map +1 -1
- package/lib/axios/cjs/contract/client.js.map +1 -1
- package/lib/axios/cjs/contract/spec.js.map +1 -1
- package/lib/axios/cjs/contract/types.js.map +1 -1
- package/lib/axios/cjs/contract/utils.js.map +1 -1
- package/lib/axios/cjs/contract/wasm_spec_parser.js +1 -1
- package/lib/axios/cjs/contract/wasm_spec_parser.js.map +1 -1
- package/lib/axios/cjs/horizon/call_builder.js.map +1 -1
- package/lib/axios/cjs/horizon/horizon_api.js.map +1 -1
- package/lib/axios/cjs/horizon/horizon_axios_client.js +1 -1
- package/lib/axios/cjs/horizon/horizon_axios_client.js.map +1 -1
- package/lib/axios/cjs/http-client/fetch-client.js +1 -1
- package/lib/axios/cjs/http-client/fetch-client.js.map +1 -1
- package/lib/axios/cjs/http-client/types.js.map +1 -1
- package/lib/axios/cjs/rpc/axios.js +1 -1
- package/lib/axios/cjs/rpc/axios.js.map +1 -1
- package/lib/axios/cjs/rpc/jsonrpc.js.map +1 -1
- package/lib/axios/cjs/rpc/server.js +2 -2
- package/lib/axios/cjs/rpc/server.js.map +1 -1
- package/lib/axios/cjs/webauth/challenge_transaction.js.map +1 -1
- package/lib/axios/esm/base/auth.d.ts +19 -7
- package/lib/axios/esm/base/auth.js +11 -11
- package/lib/axios/esm/base/auth.js.map +1 -1
- package/lib/axios/esm/base/keypair.js +1 -1
- package/lib/axios/esm/base/keypair.js.map +1 -1
- package/lib/axios/esm/base/transaction_builder.js +13 -1
- package/lib/axios/esm/base/transaction_builder.js.map +1 -1
- package/lib/axios/esm/bindings/config.js +1 -1
- package/lib/axios/esm/bindings/config.js.map +1 -1
- package/lib/axios/esm/bindings/wasm_fetcher.js +1 -1
- package/lib/axios/esm/bindings/wasm_fetcher.js.map +1 -1
- package/lib/axios/esm/contract/client.js.map +1 -1
- package/lib/axios/esm/contract/spec.js.map +1 -1
- package/lib/axios/esm/contract/types.js.map +1 -1
- package/lib/axios/esm/contract/utils.js.map +1 -1
- package/lib/axios/esm/contract/wasm_spec_parser.js +1 -1
- package/lib/axios/esm/contract/wasm_spec_parser.js.map +1 -1
- package/lib/axios/esm/horizon/call_builder.js.map +1 -1
- package/lib/axios/esm/horizon/horizon_api.js.map +1 -1
- package/lib/axios/esm/horizon/horizon_axios_client.js +1 -1
- package/lib/axios/esm/horizon/horizon_axios_client.js.map +1 -1
- package/lib/axios/esm/http-client/fetch-client.js +1 -1
- package/lib/axios/esm/http-client/fetch-client.js.map +1 -1
- package/lib/axios/esm/http-client/types.js.map +1 -1
- package/lib/axios/esm/rpc/axios.js +1 -1
- package/lib/axios/esm/rpc/axios.js.map +1 -1
- package/lib/axios/esm/rpc/jsonrpc.js.map +1 -1
- package/lib/axios/esm/rpc/server.js +2 -2
- package/lib/axios/esm/rpc/server.js.map +1 -1
- package/lib/axios/esm/webauth/challenge_transaction.js.map +1 -1
- package/lib/cjs/base/auth.js +11 -11
- package/lib/cjs/base/auth.js.map +1 -1
- package/lib/cjs/base/keypair.js +1 -1
- package/lib/cjs/base/keypair.js.map +1 -1
- package/lib/cjs/base/transaction_builder.js +13 -1
- package/lib/cjs/base/transaction_builder.js.map +1 -1
- package/lib/cjs/bindings/config.js +1 -1
- package/lib/cjs/bindings/config.js.map +1 -1
- package/lib/cjs/bindings/wasm_fetcher.js +1 -1
- package/lib/cjs/bindings/wasm_fetcher.js.map +1 -1
- package/lib/cjs/contract/client.js.map +1 -1
- package/lib/cjs/contract/spec.js.map +1 -1
- package/lib/cjs/contract/types.js.map +1 -1
- package/lib/cjs/contract/utils.js.map +1 -1
- package/lib/cjs/contract/wasm_spec_parser.js +1 -1
- package/lib/cjs/contract/wasm_spec_parser.js.map +1 -1
- package/lib/cjs/horizon/call_builder.js.map +1 -1
- package/lib/cjs/horizon/horizon_api.js.map +1 -1
- package/lib/cjs/horizon/horizon_axios_client.js +1 -1
- package/lib/cjs/horizon/horizon_axios_client.js.map +1 -1
- package/lib/cjs/http-client/fetch-client.js +1 -1
- package/lib/cjs/http-client/fetch-client.js.map +1 -1
- package/lib/cjs/http-client/types.js.map +1 -1
- package/lib/cjs/rpc/axios.js +1 -1
- package/lib/cjs/rpc/axios.js.map +1 -1
- package/lib/cjs/rpc/jsonrpc.js.map +1 -1
- package/lib/cjs/rpc/server.js +2 -2
- package/lib/cjs/rpc/server.js.map +1 -1
- package/lib/cjs/webauth/challenge_transaction.js.map +1 -1
- package/lib/esm/base/auth.d.ts +19 -7
- package/lib/esm/base/auth.js +11 -11
- package/lib/esm/base/auth.js.map +1 -1
- package/lib/esm/base/keypair.js +1 -1
- package/lib/esm/base/keypair.js.map +1 -1
- package/lib/esm/base/transaction_builder.js +13 -1
- package/lib/esm/base/transaction_builder.js.map +1 -1
- package/lib/esm/bindings/config.js +1 -1
- package/lib/esm/bindings/config.js.map +1 -1
- package/lib/esm/bindings/wasm_fetcher.js +1 -1
- package/lib/esm/bindings/wasm_fetcher.js.map +1 -1
- package/lib/esm/contract/client.js.map +1 -1
- package/lib/esm/contract/spec.js.map +1 -1
- package/lib/esm/contract/types.js.map +1 -1
- package/lib/esm/contract/utils.js.map +1 -1
- package/lib/esm/contract/wasm_spec_parser.js +1 -1
- package/lib/esm/contract/wasm_spec_parser.js.map +1 -1
- package/lib/esm/horizon/call_builder.js.map +1 -1
- package/lib/esm/horizon/horizon_api.js.map +1 -1
- package/lib/esm/horizon/horizon_axios_client.js +1 -1
- package/lib/esm/horizon/horizon_axios_client.js.map +1 -1
- package/lib/esm/http-client/fetch-client.js +1 -1
- package/lib/esm/http-client/fetch-client.js.map +1 -1
- package/lib/esm/http-client/types.js.map +1 -1
- package/lib/esm/rpc/axios.js +1 -1
- package/lib/esm/rpc/axios.js.map +1 -1
- package/lib/esm/rpc/jsonrpc.js.map +1 -1
- package/lib/esm/rpc/server.js +2 -2
- package/lib/esm/rpc/server.js.map +1 -1
- package/lib/esm/webauth/challenge_transaction.js.map +1 -1
- package/package.json +2 -5
|
@@ -1125,7 +1125,7 @@
|
|
|
1125
1125
|
|
|
1126
1126
|
const isIterable = (thing) => thing != null && isFunction$3(thing[iterator]);
|
|
1127
1127
|
|
|
1128
|
-
var utils$
|
|
1128
|
+
var utils$2 = {
|
|
1129
1129
|
isArray: isArray$4,
|
|
1130
1130
|
isArrayBuffer,
|
|
1131
1131
|
isBuffer: isBuffer$2,
|
|
@@ -3166,7 +3166,7 @@
|
|
|
3166
3166
|
|
|
3167
3167
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
3168
3168
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
3169
|
-
const ignoreDuplicateOf = utils$
|
|
3169
|
+
const ignoreDuplicateOf = utils$2.toObjectSet([
|
|
3170
3170
|
'age',
|
|
3171
3171
|
'authorization',
|
|
3172
3172
|
'content-length',
|
|
@@ -3264,7 +3264,7 @@
|
|
|
3264
3264
|
const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g');
|
|
3265
3265
|
|
|
3266
3266
|
function sanitizeValue(value, invalidChars) {
|
|
3267
|
-
if (utils$
|
|
3267
|
+
if (utils$2.isArray(value)) {
|
|
3268
3268
|
return value.map((item) => sanitizeValue(item, invalidChars));
|
|
3269
3269
|
}
|
|
3270
3270
|
|
|
@@ -3280,7 +3280,7 @@
|
|
|
3280
3280
|
function toByteStringHeaderObject(headers) {
|
|
3281
3281
|
const byteStringHeaders = Object.create(null);
|
|
3282
3282
|
|
|
3283
|
-
utils$
|
|
3283
|
+
utils$2.forEach(headers.toJSON(), (value, header) => {
|
|
3284
3284
|
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
|
|
3285
3285
|
});
|
|
3286
3286
|
|
|
@@ -3298,7 +3298,7 @@
|
|
|
3298
3298
|
return value;
|
|
3299
3299
|
}
|
|
3300
3300
|
|
|
3301
|
-
return utils$
|
|
3301
|
+
return utils$2.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
3302
3302
|
}
|
|
3303
3303
|
|
|
3304
3304
|
function parseTokens(str) {
|
|
@@ -3316,7 +3316,7 @@
|
|
|
3316
3316
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
3317
3317
|
|
|
3318
3318
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
3319
|
-
if (utils$
|
|
3319
|
+
if (utils$2.isFunction(filter)) {
|
|
3320
3320
|
return filter.call(this, value, header);
|
|
3321
3321
|
}
|
|
3322
3322
|
|
|
@@ -3324,13 +3324,13 @@
|
|
|
3324
3324
|
value = header;
|
|
3325
3325
|
}
|
|
3326
3326
|
|
|
3327
|
-
if (!utils$
|
|
3327
|
+
if (!utils$2.isString(value)) return;
|
|
3328
3328
|
|
|
3329
|
-
if (utils$
|
|
3329
|
+
if (utils$2.isString(filter)) {
|
|
3330
3330
|
return value.indexOf(filter) !== -1;
|
|
3331
3331
|
}
|
|
3332
3332
|
|
|
3333
|
-
if (utils$
|
|
3333
|
+
if (utils$2.isRegExp(filter)) {
|
|
3334
3334
|
return filter.test(value);
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
@@ -3345,7 +3345,7 @@
|
|
|
3345
3345
|
}
|
|
3346
3346
|
|
|
3347
3347
|
function buildAccessors(obj, header) {
|
|
3348
|
-
const accessorName = utils$
|
|
3348
|
+
const accessorName = utils$2.toCamelCase(' ' + header);
|
|
3349
3349
|
|
|
3350
3350
|
['get', 'set', 'has'].forEach((methodName) => {
|
|
3351
3351
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
@@ -3375,7 +3375,7 @@
|
|
|
3375
3375
|
throw new Error('header name must be a non-empty string');
|
|
3376
3376
|
}
|
|
3377
3377
|
|
|
3378
|
-
const key = utils$
|
|
3378
|
+
const key = utils$2.findKey(self, lHeader);
|
|
3379
3379
|
|
|
3380
3380
|
if (
|
|
3381
3381
|
!key ||
|
|
@@ -3388,23 +3388,23 @@
|
|
|
3388
3388
|
}
|
|
3389
3389
|
|
|
3390
3390
|
const setHeaders = (headers, _rewrite) =>
|
|
3391
|
-
utils$
|
|
3391
|
+
utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
3392
3392
|
|
|
3393
|
-
if (utils$
|
|
3393
|
+
if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
|
|
3394
3394
|
setHeaders(header, valueOrRewrite);
|
|
3395
|
-
} else if (utils$
|
|
3395
|
+
} else if (utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
3396
3396
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
3397
|
-
} else if (utils$
|
|
3397
|
+
} else if (utils$2.isObject(header) && utils$2.isIterable(header)) {
|
|
3398
3398
|
let obj = {},
|
|
3399
3399
|
dest,
|
|
3400
3400
|
key;
|
|
3401
3401
|
for (const entry of header) {
|
|
3402
|
-
if (!utils$
|
|
3402
|
+
if (!utils$2.isArray(entry)) {
|
|
3403
3403
|
throw TypeError('Object iterator must return a key-value pair');
|
|
3404
3404
|
}
|
|
3405
3405
|
|
|
3406
3406
|
obj[(key = entry[0])] = (dest = obj[key])
|
|
3407
|
-
? utils$
|
|
3407
|
+
? utils$2.isArray(dest)
|
|
3408
3408
|
? [...dest, entry[1]]
|
|
3409
3409
|
: [dest, entry[1]]
|
|
3410
3410
|
: entry[1];
|
|
@@ -3422,7 +3422,7 @@
|
|
|
3422
3422
|
header = normalizeHeader(header);
|
|
3423
3423
|
|
|
3424
3424
|
if (header) {
|
|
3425
|
-
const key = utils$
|
|
3425
|
+
const key = utils$2.findKey(this, header);
|
|
3426
3426
|
|
|
3427
3427
|
if (key) {
|
|
3428
3428
|
const value = this[key];
|
|
@@ -3435,11 +3435,11 @@
|
|
|
3435
3435
|
return parseTokens(value);
|
|
3436
3436
|
}
|
|
3437
3437
|
|
|
3438
|
-
if (utils$
|
|
3438
|
+
if (utils$2.isFunction(parser)) {
|
|
3439
3439
|
return parser.call(this, value, key);
|
|
3440
3440
|
}
|
|
3441
3441
|
|
|
3442
|
-
if (utils$
|
|
3442
|
+
if (utils$2.isRegExp(parser)) {
|
|
3443
3443
|
return parser.exec(value);
|
|
3444
3444
|
}
|
|
3445
3445
|
|
|
@@ -3452,7 +3452,7 @@
|
|
|
3452
3452
|
header = normalizeHeader(header);
|
|
3453
3453
|
|
|
3454
3454
|
if (header) {
|
|
3455
|
-
const key = utils$
|
|
3455
|
+
const key = utils$2.findKey(this, header);
|
|
3456
3456
|
|
|
3457
3457
|
return !!(
|
|
3458
3458
|
key &&
|
|
@@ -3472,7 +3472,7 @@
|
|
|
3472
3472
|
_header = normalizeHeader(_header);
|
|
3473
3473
|
|
|
3474
3474
|
if (_header) {
|
|
3475
|
-
const key = utils$
|
|
3475
|
+
const key = utils$2.findKey(self, _header);
|
|
3476
3476
|
|
|
3477
3477
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
3478
3478
|
delete self[key];
|
|
@@ -3482,7 +3482,7 @@
|
|
|
3482
3482
|
}
|
|
3483
3483
|
}
|
|
3484
3484
|
|
|
3485
|
-
if (utils$
|
|
3485
|
+
if (utils$2.isArray(header)) {
|
|
3486
3486
|
header.forEach(deleteHeader);
|
|
3487
3487
|
} else {
|
|
3488
3488
|
deleteHeader(header);
|
|
@@ -3511,8 +3511,8 @@
|
|
|
3511
3511
|
const self = this;
|
|
3512
3512
|
const headers = {};
|
|
3513
3513
|
|
|
3514
|
-
utils$
|
|
3515
|
-
const key = utils$
|
|
3514
|
+
utils$2.forEach(this, (value, header) => {
|
|
3515
|
+
const key = utils$2.findKey(headers, header);
|
|
3516
3516
|
|
|
3517
3517
|
if (key) {
|
|
3518
3518
|
self[key] = normalizeValue(value);
|
|
@@ -3541,10 +3541,10 @@
|
|
|
3541
3541
|
toJSON(asStrings) {
|
|
3542
3542
|
const obj = Object.create(null);
|
|
3543
3543
|
|
|
3544
|
-
utils$
|
|
3544
|
+
utils$2.forEach(this, (value, header) => {
|
|
3545
3545
|
value != null &&
|
|
3546
3546
|
value !== false &&
|
|
3547
|
-
(obj[header] = asStrings && utils$
|
|
3547
|
+
(obj[header] = asStrings && utils$2.isArray(value) ? value.join(', ') : value);
|
|
3548
3548
|
});
|
|
3549
3549
|
|
|
3550
3550
|
return obj;
|
|
@@ -3600,7 +3600,7 @@
|
|
|
3600
3600
|
}
|
|
3601
3601
|
}
|
|
3602
3602
|
|
|
3603
|
-
utils$
|
|
3603
|
+
utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
3604
3604
|
|
|
3605
3605
|
return this;
|
|
3606
3606
|
}
|
|
@@ -3616,7 +3616,7 @@
|
|
|
3616
3616
|
]);
|
|
3617
3617
|
|
|
3618
3618
|
// reserved names hotfix
|
|
3619
|
-
utils$
|
|
3619
|
+
utils$2.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
|
|
3620
3620
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
3621
3621
|
return {
|
|
3622
3622
|
get: () => value,
|
|
@@ -3626,19 +3626,19 @@
|
|
|
3626
3626
|
};
|
|
3627
3627
|
});
|
|
3628
3628
|
|
|
3629
|
-
utils$
|
|
3629
|
+
utils$2.freezeMethods(AxiosHeaders$1);
|
|
3630
3630
|
|
|
3631
3631
|
const REDACTED = '[REDACTED ****]';
|
|
3632
3632
|
|
|
3633
3633
|
function hasOwnOrPrototypeToJSON(source) {
|
|
3634
|
-
if (utils$
|
|
3634
|
+
if (utils$2.hasOwnProp(source, 'toJSON')) {
|
|
3635
3635
|
return true;
|
|
3636
3636
|
}
|
|
3637
3637
|
|
|
3638
3638
|
let prototype = Object.getPrototypeOf(source);
|
|
3639
3639
|
|
|
3640
3640
|
while (prototype && prototype !== Object.prototype) {
|
|
3641
|
-
if (utils$
|
|
3641
|
+
if (utils$2.hasOwnProp(prototype, 'toJSON')) {
|
|
3642
3642
|
return true;
|
|
3643
3643
|
}
|
|
3644
3644
|
|
|
@@ -3657,7 +3657,7 @@
|
|
|
3657
3657
|
|
|
3658
3658
|
const visit = (source) => {
|
|
3659
3659
|
if (source === null || typeof source !== 'object') return source;
|
|
3660
|
-
if (utils$
|
|
3660
|
+
if (utils$2.isBuffer(source)) return source;
|
|
3661
3661
|
if (seen.indexOf(source) !== -1) return undefined;
|
|
3662
3662
|
|
|
3663
3663
|
if (source instanceof AxiosHeaders$1) {
|
|
@@ -3667,16 +3667,16 @@
|
|
|
3667
3667
|
seen.push(source);
|
|
3668
3668
|
|
|
3669
3669
|
let result;
|
|
3670
|
-
if (utils$
|
|
3670
|
+
if (utils$2.isArray(source)) {
|
|
3671
3671
|
result = [];
|
|
3672
3672
|
source.forEach((v, i) => {
|
|
3673
3673
|
const reducedValue = visit(v);
|
|
3674
|
-
if (!utils$
|
|
3674
|
+
if (!utils$2.isUndefined(reducedValue)) {
|
|
3675
3675
|
result[i] = reducedValue;
|
|
3676
3676
|
}
|
|
3677
3677
|
});
|
|
3678
3678
|
} else {
|
|
3679
|
-
if (!utils$
|
|
3679
|
+
if (!utils$2.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
3680
3680
|
seen.pop();
|
|
3681
3681
|
return source;
|
|
3682
3682
|
}
|
|
@@ -3684,7 +3684,7 @@
|
|
|
3684
3684
|
result = Object.create(null);
|
|
3685
3685
|
for (const [key, value] of Object.entries(source)) {
|
|
3686
3686
|
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
|
|
3687
|
-
if (!utils$
|
|
3687
|
+
if (!utils$2.isUndefined(reducedValue)) {
|
|
3688
3688
|
result[key] = reducedValue;
|
|
3689
3689
|
}
|
|
3690
3690
|
}
|
|
@@ -3756,11 +3756,11 @@
|
|
|
3756
3756
|
// with REDACTED in the serialized snapshot. Undefined or empty leaves the
|
|
3757
3757
|
// existing serialization behavior unchanged.
|
|
3758
3758
|
const config = this.config;
|
|
3759
|
-
const redactKeys = config && utils$
|
|
3759
|
+
const redactKeys = config && utils$2.hasOwnProp(config, 'redact') ? config.redact : undefined;
|
|
3760
3760
|
const serializedConfig =
|
|
3761
|
-
utils$
|
|
3761
|
+
utils$2.isArray(redactKeys) && redactKeys.length > 0
|
|
3762
3762
|
? redactConfig(config, redactKeys)
|
|
3763
|
-
: utils$
|
|
3763
|
+
: utils$2.toJSONObject(config);
|
|
3764
3764
|
|
|
3765
3765
|
return {
|
|
3766
3766
|
// Standard
|
|
@@ -3854,7 +3854,7 @@
|
|
|
3854
3854
|
* @returns {boolean}
|
|
3855
3855
|
*/
|
|
3856
3856
|
function isVisitable(thing) {
|
|
3857
|
-
return utils$
|
|
3857
|
+
return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
|
|
3858
3858
|
}
|
|
3859
3859
|
|
|
3860
3860
|
/**
|
|
@@ -3865,7 +3865,7 @@
|
|
|
3865
3865
|
* @returns {string} the key without the brackets.
|
|
3866
3866
|
*/
|
|
3867
3867
|
function removeBrackets(key) {
|
|
3868
|
-
return utils$
|
|
3868
|
+
return utils$2.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
3869
3869
|
}
|
|
3870
3870
|
|
|
3871
3871
|
/**
|
|
@@ -3897,10 +3897,10 @@
|
|
|
3897
3897
|
* @returns {boolean}
|
|
3898
3898
|
*/
|
|
3899
3899
|
function isFlatArray(arr) {
|
|
3900
|
-
return utils$
|
|
3900
|
+
return utils$2.isArray(arr) && !arr.some(isVisitable);
|
|
3901
3901
|
}
|
|
3902
3902
|
|
|
3903
|
-
const predicates = utils$
|
|
3903
|
+
const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
|
|
3904
3904
|
return /^is[A-Z]/.test(prop);
|
|
3905
3905
|
});
|
|
3906
3906
|
|
|
@@ -3928,7 +3928,7 @@
|
|
|
3928
3928
|
* @returns
|
|
3929
3929
|
*/
|
|
3930
3930
|
function toFormData$1(obj, formData, options) {
|
|
3931
|
-
if (!utils$
|
|
3931
|
+
if (!utils$2.isObject(obj)) {
|
|
3932
3932
|
throw new TypeError('target must be an object');
|
|
3933
3933
|
}
|
|
3934
3934
|
|
|
@@ -3936,7 +3936,7 @@
|
|
|
3936
3936
|
formData = formData || new (FormData$1 || FormData)();
|
|
3937
3937
|
|
|
3938
3938
|
// eslint-disable-next-line no-param-reassign
|
|
3939
|
-
options = utils$
|
|
3939
|
+
options = utils$2.toFlatObject(
|
|
3940
3940
|
options,
|
|
3941
3941
|
{
|
|
3942
3942
|
metaTokens: true,
|
|
@@ -3946,7 +3946,7 @@
|
|
|
3946
3946
|
false,
|
|
3947
3947
|
function defined(option, source) {
|
|
3948
3948
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
3949
|
-
return !utils$
|
|
3949
|
+
return !utils$2.isUndefined(source[option]);
|
|
3950
3950
|
}
|
|
3951
3951
|
);
|
|
3952
3952
|
|
|
@@ -3957,28 +3957,28 @@
|
|
|
3957
3957
|
const indexes = options.indexes;
|
|
3958
3958
|
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
3959
3959
|
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
3960
|
-
const useBlob = _Blob && utils$
|
|
3960
|
+
const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
|
|
3961
3961
|
|
|
3962
|
-
if (!utils$
|
|
3962
|
+
if (!utils$2.isFunction(visitor)) {
|
|
3963
3963
|
throw new TypeError('visitor must be a function');
|
|
3964
3964
|
}
|
|
3965
3965
|
|
|
3966
3966
|
function convertValue(value) {
|
|
3967
3967
|
if (value === null) return '';
|
|
3968
3968
|
|
|
3969
|
-
if (utils$
|
|
3969
|
+
if (utils$2.isDate(value)) {
|
|
3970
3970
|
return value.toISOString();
|
|
3971
3971
|
}
|
|
3972
3972
|
|
|
3973
|
-
if (utils$
|
|
3973
|
+
if (utils$2.isBoolean(value)) {
|
|
3974
3974
|
return value.toString();
|
|
3975
3975
|
}
|
|
3976
3976
|
|
|
3977
|
-
if (!useBlob && utils$
|
|
3977
|
+
if (!useBlob && utils$2.isBlob(value)) {
|
|
3978
3978
|
throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
|
|
3979
3979
|
}
|
|
3980
3980
|
|
|
3981
|
-
if (utils$
|
|
3981
|
+
if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
|
|
3982
3982
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
3983
3983
|
}
|
|
3984
3984
|
|
|
@@ -3998,26 +3998,26 @@
|
|
|
3998
3998
|
function defaultVisitor(value, key, path) {
|
|
3999
3999
|
let arr = value;
|
|
4000
4000
|
|
|
4001
|
-
if (utils$
|
|
4001
|
+
if (utils$2.isReactNative(formData) && utils$2.isReactNativeBlob(value)) {
|
|
4002
4002
|
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
4003
4003
|
return false;
|
|
4004
4004
|
}
|
|
4005
4005
|
|
|
4006
4006
|
if (value && !path && typeof value === 'object') {
|
|
4007
|
-
if (utils$
|
|
4007
|
+
if (utils$2.endsWith(key, '{}')) {
|
|
4008
4008
|
// eslint-disable-next-line no-param-reassign
|
|
4009
4009
|
key = metaTokens ? key : key.slice(0, -2);
|
|
4010
4010
|
// eslint-disable-next-line no-param-reassign
|
|
4011
4011
|
value = JSON.stringify(value);
|
|
4012
4012
|
} else if (
|
|
4013
|
-
(utils$
|
|
4014
|
-
((utils$
|
|
4013
|
+
(utils$2.isArray(value) && isFlatArray(value)) ||
|
|
4014
|
+
((utils$2.isFileList(value) || utils$2.endsWith(key, '[]')) && (arr = utils$2.toArray(value)))
|
|
4015
4015
|
) {
|
|
4016
4016
|
// eslint-disable-next-line no-param-reassign
|
|
4017
4017
|
key = removeBrackets(key);
|
|
4018
4018
|
|
|
4019
4019
|
arr.forEach(function each(el, index) {
|
|
4020
|
-
!(utils$
|
|
4020
|
+
!(utils$2.isUndefined(el) || el === null) &&
|
|
4021
4021
|
formData.append(
|
|
4022
4022
|
// eslint-disable-next-line no-nested-ternary
|
|
4023
4023
|
indexes === true
|
|
@@ -4050,7 +4050,7 @@
|
|
|
4050
4050
|
});
|
|
4051
4051
|
|
|
4052
4052
|
function build(value, path, depth = 0) {
|
|
4053
|
-
if (utils$
|
|
4053
|
+
if (utils$2.isUndefined(value)) return;
|
|
4054
4054
|
|
|
4055
4055
|
if (depth > maxDepth) {
|
|
4056
4056
|
throw new AxiosError$1(
|
|
@@ -4065,10 +4065,10 @@
|
|
|
4065
4065
|
|
|
4066
4066
|
stack.push(value);
|
|
4067
4067
|
|
|
4068
|
-
utils$
|
|
4068
|
+
utils$2.forEach(value, function each(el, key) {
|
|
4069
4069
|
const result =
|
|
4070
|
-
!(utils$
|
|
4071
|
-
visitor.call(formData, el, utils$
|
|
4070
|
+
!(utils$2.isUndefined(el) || el === null) &&
|
|
4071
|
+
visitor.call(formData, el, utils$2.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
4072
4072
|
|
|
4073
4073
|
if (result === true) {
|
|
4074
4074
|
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
@@ -4078,7 +4078,7 @@
|
|
|
4078
4078
|
stack.pop();
|
|
4079
4079
|
}
|
|
4080
4080
|
|
|
4081
|
-
if (!utils$
|
|
4081
|
+
if (!utils$2.isObject(obj)) {
|
|
4082
4082
|
throw new TypeError('data must be an object');
|
|
4083
4083
|
}
|
|
4084
4084
|
|
|
@@ -4175,7 +4175,7 @@
|
|
|
4175
4175
|
|
|
4176
4176
|
const _encode = (options && options.encode) || encode$1;
|
|
4177
4177
|
|
|
4178
|
-
const _options = utils$
|
|
4178
|
+
const _options = utils$2.isFunction(options)
|
|
4179
4179
|
? {
|
|
4180
4180
|
serialize: options,
|
|
4181
4181
|
}
|
|
@@ -4188,7 +4188,7 @@
|
|
|
4188
4188
|
if (serializeFn) {
|
|
4189
4189
|
serializedParams = serializeFn(params, _options);
|
|
4190
4190
|
} else {
|
|
4191
|
-
serializedParams = utils$
|
|
4191
|
+
serializedParams = utils$2.isURLSearchParams(params)
|
|
4192
4192
|
? params.toString()
|
|
4193
4193
|
: new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
4194
4194
|
}
|
|
@@ -4264,7 +4264,7 @@
|
|
|
4264
4264
|
* @returns {void}
|
|
4265
4265
|
*/
|
|
4266
4266
|
forEach(fn) {
|
|
4267
|
-
utils$
|
|
4267
|
+
utils$2.forEach(this.handlers, function forEachHandler(h) {
|
|
4268
4268
|
if (h !== null) {
|
|
4269
4269
|
fn(h);
|
|
4270
4270
|
}
|
|
@@ -6277,7 +6277,7 @@
|
|
|
6277
6277
|
|
|
6278
6278
|
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
6279
6279
|
|
|
6280
|
-
var utils = /*#__PURE__*/Object.freeze({
|
|
6280
|
+
var utils$1 = /*#__PURE__*/Object.freeze({
|
|
6281
6281
|
__proto__: null,
|
|
6282
6282
|
hasBrowserEnv: hasBrowserEnv,
|
|
6283
6283
|
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
@@ -6287,14 +6287,14 @@
|
|
|
6287
6287
|
});
|
|
6288
6288
|
|
|
6289
6289
|
var platform = {
|
|
6290
|
-
...utils,
|
|
6290
|
+
...utils$1,
|
|
6291
6291
|
...platform$1,
|
|
6292
6292
|
};
|
|
6293
6293
|
|
|
6294
6294
|
function toURLEncodedForm(data, options) {
|
|
6295
6295
|
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
|
6296
6296
|
visitor: function (value, key, path, helpers) {
|
|
6297
|
-
if (platform.isNode && utils$
|
|
6297
|
+
if (platform.isNode && utils$2.isBuffer(value)) {
|
|
6298
6298
|
this.append(key, value.toString('base64'));
|
|
6299
6299
|
return false;
|
|
6300
6300
|
}
|
|
@@ -6317,7 +6317,7 @@
|
|
|
6317
6317
|
// foo.x.y.z
|
|
6318
6318
|
// foo-x-y-z
|
|
6319
6319
|
// foo x y z
|
|
6320
|
-
return utils$
|
|
6320
|
+
return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
6321
6321
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
6322
6322
|
});
|
|
6323
6323
|
}
|
|
@@ -6357,11 +6357,11 @@
|
|
|
6357
6357
|
|
|
6358
6358
|
const isNumericKey = Number.isFinite(+name);
|
|
6359
6359
|
const isLast = index >= path.length;
|
|
6360
|
-
name = !name && utils$
|
|
6360
|
+
name = !name && utils$2.isArray(target) ? target.length : name;
|
|
6361
6361
|
|
|
6362
6362
|
if (isLast) {
|
|
6363
|
-
if (utils$
|
|
6364
|
-
target[name] = utils$
|
|
6363
|
+
if (utils$2.hasOwnProp(target, name)) {
|
|
6364
|
+
target[name] = utils$2.isArray(target[name])
|
|
6365
6365
|
? target[name].concat(value)
|
|
6366
6366
|
: [target[name], value];
|
|
6367
6367
|
} else {
|
|
@@ -6371,23 +6371,23 @@
|
|
|
6371
6371
|
return !isNumericKey;
|
|
6372
6372
|
}
|
|
6373
6373
|
|
|
6374
|
-
if (!utils$
|
|
6374
|
+
if (!utils$2.hasOwnProp(target, name) || !utils$2.isObject(target[name])) {
|
|
6375
6375
|
target[name] = [];
|
|
6376
6376
|
}
|
|
6377
6377
|
|
|
6378
6378
|
const result = buildPath(path, value, target[name], index);
|
|
6379
6379
|
|
|
6380
|
-
if (result && utils$
|
|
6380
|
+
if (result && utils$2.isArray(target[name])) {
|
|
6381
6381
|
target[name] = arrayToObject(target[name]);
|
|
6382
6382
|
}
|
|
6383
6383
|
|
|
6384
6384
|
return !isNumericKey;
|
|
6385
6385
|
}
|
|
6386
6386
|
|
|
6387
|
-
if (utils$
|
|
6387
|
+
if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
|
|
6388
6388
|
const obj = {};
|
|
6389
6389
|
|
|
6390
|
-
utils$
|
|
6390
|
+
utils$2.forEachEntry(formData, (name, value) => {
|
|
6391
6391
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
6392
6392
|
});
|
|
6393
6393
|
|
|
@@ -6397,7 +6397,7 @@
|
|
|
6397
6397
|
return null;
|
|
6398
6398
|
}
|
|
6399
6399
|
|
|
6400
|
-
const own = (obj, key) => (obj != null && utils$
|
|
6400
|
+
const own = (obj, key) => (obj != null && utils$2.hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
6401
6401
|
|
|
6402
6402
|
/**
|
|
6403
6403
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
@@ -6410,10 +6410,10 @@
|
|
|
6410
6410
|
* @returns {string} A stringified version of the rawValue.
|
|
6411
6411
|
*/
|
|
6412
6412
|
function stringifySafely(rawValue, parser, encoder) {
|
|
6413
|
-
if (utils$
|
|
6413
|
+
if (utils$2.isString(rawValue)) {
|
|
6414
6414
|
try {
|
|
6415
6415
|
(parser || JSON.parse)(rawValue);
|
|
6416
|
-
return utils$
|
|
6416
|
+
return utils$2.trim(rawValue);
|
|
6417
6417
|
} catch (e) {
|
|
6418
6418
|
if (e.name !== 'SyntaxError') {
|
|
6419
6419
|
throw e;
|
|
@@ -6433,32 +6433,32 @@
|
|
|
6433
6433
|
function transformRequest(data, headers) {
|
|
6434
6434
|
const contentType = headers.getContentType() || '';
|
|
6435
6435
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
6436
|
-
const isObjectPayload = utils$
|
|
6436
|
+
const isObjectPayload = utils$2.isObject(data);
|
|
6437
6437
|
|
|
6438
|
-
if (isObjectPayload && utils$
|
|
6438
|
+
if (isObjectPayload && utils$2.isHTMLForm(data)) {
|
|
6439
6439
|
data = new FormData(data);
|
|
6440
6440
|
}
|
|
6441
6441
|
|
|
6442
|
-
const isFormData = utils$
|
|
6442
|
+
const isFormData = utils$2.isFormData(data);
|
|
6443
6443
|
|
|
6444
6444
|
if (isFormData) {
|
|
6445
6445
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
6446
6446
|
}
|
|
6447
6447
|
|
|
6448
6448
|
if (
|
|
6449
|
-
utils$
|
|
6450
|
-
utils$
|
|
6451
|
-
utils$
|
|
6452
|
-
utils$
|
|
6453
|
-
utils$
|
|
6454
|
-
utils$
|
|
6449
|
+
utils$2.isArrayBuffer(data) ||
|
|
6450
|
+
utils$2.isBuffer(data) ||
|
|
6451
|
+
utils$2.isStream(data) ||
|
|
6452
|
+
utils$2.isFile(data) ||
|
|
6453
|
+
utils$2.isBlob(data) ||
|
|
6454
|
+
utils$2.isReadableStream(data)
|
|
6455
6455
|
) {
|
|
6456
6456
|
return data;
|
|
6457
6457
|
}
|
|
6458
|
-
if (utils$
|
|
6458
|
+
if (utils$2.isArrayBufferView(data)) {
|
|
6459
6459
|
return data.buffer;
|
|
6460
6460
|
}
|
|
6461
|
-
if (utils$
|
|
6461
|
+
if (utils$2.isURLSearchParams(data)) {
|
|
6462
6462
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
6463
6463
|
return data.toString();
|
|
6464
6464
|
}
|
|
@@ -6472,7 +6472,7 @@
|
|
|
6472
6472
|
}
|
|
6473
6473
|
|
|
6474
6474
|
if (
|
|
6475
|
-
(isFileList = utils$
|
|
6475
|
+
(isFileList = utils$2.isFileList(data)) ||
|
|
6476
6476
|
contentType.indexOf('multipart/form-data') > -1
|
|
6477
6477
|
) {
|
|
6478
6478
|
const env = own(this, 'env');
|
|
@@ -6502,13 +6502,13 @@
|
|
|
6502
6502
|
const responseType = own(this, 'responseType');
|
|
6503
6503
|
const JSONRequested = responseType === 'json';
|
|
6504
6504
|
|
|
6505
|
-
if (utils$
|
|
6505
|
+
if (utils$2.isResponse(data) || utils$2.isReadableStream(data)) {
|
|
6506
6506
|
return data;
|
|
6507
6507
|
}
|
|
6508
6508
|
|
|
6509
6509
|
if (
|
|
6510
6510
|
data &&
|
|
6511
|
-
utils$
|
|
6511
|
+
utils$2.isString(data) &&
|
|
6512
6512
|
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
6513
6513
|
) {
|
|
6514
6514
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
@@ -6559,7 +6559,7 @@
|
|
|
6559
6559
|
},
|
|
6560
6560
|
};
|
|
6561
6561
|
|
|
6562
|
-
utils$
|
|
6562
|
+
utils$2.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
|
|
6563
6563
|
defaults.headers[method] = {};
|
|
6564
6564
|
});
|
|
6565
6565
|
|
|
@@ -6577,7 +6577,7 @@
|
|
|
6577
6577
|
const headers = AxiosHeaders$1.from(context.headers);
|
|
6578
6578
|
let data = context.data;
|
|
6579
6579
|
|
|
6580
|
-
utils$
|
|
6580
|
+
utils$2.forEach(fns, function transform(fn) {
|
|
6581
6581
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
6582
6582
|
});
|
|
6583
6583
|
|
|
@@ -21969,7 +21969,7 @@
|
|
|
21969
21969
|
|
|
21970
21970
|
class AxiosTransformStream extends Stream.Transform {
|
|
21971
21971
|
constructor(options) {
|
|
21972
|
-
options = utils$
|
|
21972
|
+
options = utils$2.toFlatObject(
|
|
21973
21973
|
options,
|
|
21974
21974
|
{
|
|
21975
21975
|
maxRate: 0,
|
|
@@ -21981,7 +21981,7 @@
|
|
|
21981
21981
|
},
|
|
21982
21982
|
null,
|
|
21983
21983
|
(prop, source) => {
|
|
21984
|
-
return !utils$
|
|
21984
|
+
return !utils$2.isUndefined(source[prop]);
|
|
21985
21985
|
}
|
|
21986
21986
|
);
|
|
21987
21987
|
|
|
@@ -22140,7 +22140,7 @@
|
|
|
22140
22140
|
class FormDataPart {
|
|
22141
22141
|
constructor(name, value) {
|
|
22142
22142
|
const { escapeName } = this.constructor;
|
|
22143
|
-
const isStringValue = utils$
|
|
22143
|
+
const isStringValue = utils$2.isString(value);
|
|
22144
22144
|
|
|
22145
22145
|
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
|
|
22146
22146
|
!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
|
|
@@ -22168,7 +22168,7 @@
|
|
|
22168
22168
|
|
|
22169
22169
|
const { value } = this;
|
|
22170
22170
|
|
|
22171
|
-
if (utils$
|
|
22171
|
+
if (utils$2.isTypedArray(value)) {
|
|
22172
22172
|
yield value;
|
|
22173
22173
|
} else {
|
|
22174
22174
|
yield* readBlob(value);
|
|
@@ -22197,7 +22197,7 @@
|
|
|
22197
22197
|
boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET),
|
|
22198
22198
|
} = options || {};
|
|
22199
22199
|
|
|
22200
|
-
if (!utils$
|
|
22200
|
+
if (!utils$2.isFormData(form)) {
|
|
22201
22201
|
throw TypeError('FormData instance required');
|
|
22202
22202
|
}
|
|
22203
22203
|
|
|
@@ -22217,7 +22217,7 @@
|
|
|
22217
22217
|
|
|
22218
22218
|
contentLength += boundaryBytes.byteLength * parts.length;
|
|
22219
22219
|
|
|
22220
|
-
contentLength = utils$
|
|
22220
|
+
contentLength = utils$2.toFiniteNumber(contentLength);
|
|
22221
22221
|
|
|
22222
22222
|
const computedHeaders = {
|
|
22223
22223
|
'Content-Type': `multipart/form-data; boundary=${boundary}`,
|
|
@@ -22266,7 +22266,7 @@
|
|
|
22266
22266
|
}
|
|
22267
22267
|
|
|
22268
22268
|
const callbackify = (fn, reducer) => {
|
|
22269
|
-
return utils$
|
|
22269
|
+
return utils$2.isAsyncFn(fn)
|
|
22270
22270
|
? function (...args) {
|
|
22271
22271
|
const cb = args.pop();
|
|
22272
22272
|
fn.apply(this, args).then((value) => {
|
|
@@ -22603,7 +22603,7 @@
|
|
|
22603
22603
|
const asyncDecorator =
|
|
22604
22604
|
(fn) =>
|
|
22605
22605
|
(...args) =>
|
|
22606
|
-
utils$
|
|
22606
|
+
utils$2.asap(() => fn(...args));
|
|
22607
22607
|
|
|
22608
22608
|
/**
|
|
22609
22609
|
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
@@ -22716,7 +22716,7 @@
|
|
|
22716
22716
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
22717
22717
|
};
|
|
22718
22718
|
|
|
22719
|
-
const isBrotliSupported = utils$
|
|
22719
|
+
const isBrotliSupported = utils$2.isFunction(zlib.createBrotliDecompress);
|
|
22720
22720
|
|
|
22721
22721
|
const { http: httpFollow, https: httpsFollow } = followRedirects;
|
|
22722
22722
|
|
|
@@ -22789,7 +22789,7 @@
|
|
|
22789
22789
|
// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
|
|
22790
22790
|
// original value for malformed input so a bad encoding never throws.
|
|
22791
22791
|
const decodeURIComponentSafe = (value) => {
|
|
22792
|
-
if (!utils$
|
|
22792
|
+
if (!utils$2.isString(value)) {
|
|
22793
22793
|
return value;
|
|
22794
22794
|
}
|
|
22795
22795
|
|
|
@@ -22975,11 +22975,11 @@
|
|
|
22975
22975
|
// redirect proxying to an attacker-controlled host.
|
|
22976
22976
|
const isProxyURL = proxy instanceof URL;
|
|
22977
22977
|
const readProxyField = (key) =>
|
|
22978
|
-
isProxyURL || utils$
|
|
22978
|
+
isProxyURL || utils$2.hasOwnProp(proxy, key) ? proxy[key] : undefined;
|
|
22979
22979
|
|
|
22980
22980
|
const proxyUsername = readProxyField('username');
|
|
22981
22981
|
const proxyPassword = readProxyField('password');
|
|
22982
|
-
let proxyAuth = utils$
|
|
22982
|
+
let proxyAuth = utils$2.hasOwnProp(proxy, 'auth') ? proxy.auth : undefined;
|
|
22983
22983
|
|
|
22984
22984
|
// Basic proxy authorization
|
|
22985
22985
|
if (proxyUsername) {
|
|
@@ -22991,9 +22991,9 @@
|
|
|
22991
22991
|
// plain object inheriting from polluted Object.prototype cannot leak creds.
|
|
22992
22992
|
const authIsObject = typeof proxyAuth === 'object';
|
|
22993
22993
|
const authUsername =
|
|
22994
|
-
authIsObject && utils$
|
|
22994
|
+
authIsObject && utils$2.hasOwnProp(proxyAuth, 'username') ? proxyAuth.username : undefined;
|
|
22995
22995
|
const authPassword =
|
|
22996
|
-
authIsObject && utils$
|
|
22996
|
+
authIsObject && utils$2.hasOwnProp(proxyAuth, 'password') ? proxyAuth.password : undefined;
|
|
22997
22997
|
const validProxyAuth = Boolean(authUsername || authPassword);
|
|
22998
22998
|
|
|
22999
22999
|
if (validProxyAuth) {
|
|
@@ -23095,7 +23095,7 @@
|
|
|
23095
23095
|
}
|
|
23096
23096
|
|
|
23097
23097
|
const isHttpAdapterSupported =
|
|
23098
|
-
typeof browser$1$1 !== 'undefined' && utils$
|
|
23098
|
+
typeof browser$1$1 !== 'undefined' && utils$2.kindOf(browser$1$1) === 'process';
|
|
23099
23099
|
|
|
23100
23100
|
// temporary hotfix
|
|
23101
23101
|
|
|
@@ -23125,7 +23125,7 @@
|
|
|
23125
23125
|
};
|
|
23126
23126
|
|
|
23127
23127
|
const resolveFamily = ({ address, family }) => {
|
|
23128
|
-
if (!utils$
|
|
23128
|
+
if (!utils$2.isString(address)) {
|
|
23129
23129
|
throw TypeError('address must be a string');
|
|
23130
23130
|
}
|
|
23131
23131
|
return {
|
|
@@ -23135,7 +23135,7 @@
|
|
|
23135
23135
|
};
|
|
23136
23136
|
|
|
23137
23137
|
const buildAddressEntry = (address, family) =>
|
|
23138
|
-
resolveFamily(utils$
|
|
23138
|
+
resolveFamily(utils$2.isObject(address) ? address : { address, family });
|
|
23139
23139
|
|
|
23140
23140
|
const http2Transport = {
|
|
23141
23141
|
request(options, cb) {
|
|
@@ -23159,7 +23159,7 @@
|
|
|
23159
23159
|
[HTTP2_HEADER_PATH]: options.path,
|
|
23160
23160
|
};
|
|
23161
23161
|
|
|
23162
|
-
utils$
|
|
23162
|
+
utils$2.forEach(headers, (header, name) => {
|
|
23163
23163
|
name.charAt(0) !== ':' && (http2Headers[name] = header);
|
|
23164
23164
|
});
|
|
23165
23165
|
|
|
@@ -23189,7 +23189,7 @@
|
|
|
23189
23189
|
var httpAdapter = isHttpAdapterSupported &&
|
|
23190
23190
|
function httpAdapter(config) {
|
|
23191
23191
|
return wrapAsync(async function dispatchHttpRequest(resolve$1, reject, onDone) {
|
|
23192
|
-
const own = (key) => (utils$
|
|
23192
|
+
const own = (key) => (utils$2.hasOwnProp(config, key) ? config[key] : undefined);
|
|
23193
23193
|
let data = own('data');
|
|
23194
23194
|
let lookup = own('lookup');
|
|
23195
23195
|
let family = own('family');
|
|
@@ -23217,7 +23217,7 @@
|
|
|
23217
23217
|
const isHttp2 = httpVersion === 2;
|
|
23218
23218
|
|
|
23219
23219
|
if (lookup) {
|
|
23220
|
-
const _lookup = callbackify(lookup, (value) => (utils$
|
|
23220
|
+
const _lookup = callbackify(lookup, (value) => (utils$2.isArray(value) ? value : [value]));
|
|
23221
23221
|
// hotfix to support opt.all option which is required for node 20.x
|
|
23222
23222
|
lookup = (hostname, opt, cb) => {
|
|
23223
23223
|
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
@@ -23225,7 +23225,7 @@
|
|
|
23225
23225
|
return cb(err);
|
|
23226
23226
|
}
|
|
23227
23227
|
|
|
23228
|
-
const addresses = utils$
|
|
23228
|
+
const addresses = utils$2.isArray(arg0)
|
|
23229
23229
|
? arg0.map((addr) => buildAddressEntry(addr))
|
|
23230
23230
|
: [buildAddressEntry(arg0, arg1)];
|
|
23231
23231
|
|
|
@@ -23361,7 +23361,7 @@
|
|
|
23361
23361
|
convertedData = convertedData.toString(responseEncoding);
|
|
23362
23362
|
|
|
23363
23363
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
23364
|
-
convertedData = utils$
|
|
23364
|
+
convertedData = utils$2.stripBOM(convertedData);
|
|
23365
23365
|
}
|
|
23366
23366
|
} else if (responseType === 'stream') {
|
|
23367
23367
|
convertedData = Stream.Readable.from(convertedData);
|
|
@@ -23396,7 +23396,7 @@
|
|
|
23396
23396
|
let maxDownloadRate = undefined;
|
|
23397
23397
|
|
|
23398
23398
|
// support for spec compliant FormData objects
|
|
23399
|
-
if (utils$
|
|
23399
|
+
if (utils$2.isSpecCompliantForm(data)) {
|
|
23400
23400
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
23401
23401
|
|
|
23402
23402
|
data = formDataToStream(
|
|
@@ -23411,8 +23411,8 @@
|
|
|
23411
23411
|
);
|
|
23412
23412
|
// support for https://www.npmjs.com/package/form-data api
|
|
23413
23413
|
} else if (
|
|
23414
|
-
utils$
|
|
23415
|
-
utils$
|
|
23414
|
+
utils$2.isFormData(data) &&
|
|
23415
|
+
utils$2.isFunction(data.getHeaders) &&
|
|
23416
23416
|
data.getHeaders !== Object.prototype.getHeaders
|
|
23417
23417
|
) {
|
|
23418
23418
|
setFormDataHeaders$1(headers, data.getHeaders(), own('formDataHeaderPolicy'));
|
|
@@ -23426,14 +23426,14 @@
|
|
|
23426
23426
|
/*eslint no-empty:0*/
|
|
23427
23427
|
} catch (e) {}
|
|
23428
23428
|
}
|
|
23429
|
-
} else if (utils$
|
|
23429
|
+
} else if (utils$2.isBlob(data) || utils$2.isFile(data)) {
|
|
23430
23430
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
|
23431
23431
|
headers.setContentLength(data.size || 0);
|
|
23432
23432
|
data = Stream.Readable.from(readBlob(data));
|
|
23433
|
-
} else if (data && !utils$
|
|
23434
|
-
if (Buffer.isBuffer(data)) ; else if (utils$
|
|
23433
|
+
} else if (data && !utils$2.isStream(data)) {
|
|
23434
|
+
if (Buffer.isBuffer(data)) ; else if (utils$2.isArrayBuffer(data)) {
|
|
23435
23435
|
data = Buffer.from(new Uint8Array(data));
|
|
23436
|
-
} else if (utils$
|
|
23436
|
+
} else if (utils$2.isString(data)) {
|
|
23437
23437
|
data = Buffer.from(data, 'utf-8');
|
|
23438
23438
|
} else {
|
|
23439
23439
|
return reject(
|
|
@@ -23459,9 +23459,9 @@
|
|
|
23459
23459
|
}
|
|
23460
23460
|
}
|
|
23461
23461
|
|
|
23462
|
-
const contentLength = utils$
|
|
23462
|
+
const contentLength = utils$2.toFiniteNumber(headers.getContentLength());
|
|
23463
23463
|
|
|
23464
|
-
if (utils$
|
|
23464
|
+
if (utils$2.isArray(maxRate)) {
|
|
23465
23465
|
maxUploadRate = maxRate[0];
|
|
23466
23466
|
maxDownloadRate = maxRate[1];
|
|
23467
23467
|
} else {
|
|
@@ -23469,7 +23469,7 @@
|
|
|
23469
23469
|
}
|
|
23470
23470
|
|
|
23471
23471
|
if (data && (onUploadProgress || maxUploadRate)) {
|
|
23472
|
-
if (!utils$
|
|
23472
|
+
if (!utils$2.isStream(data)) {
|
|
23473
23473
|
data = Stream.Readable.from(data, { objectMode: false });
|
|
23474
23474
|
}
|
|
23475
23475
|
|
|
@@ -23477,10 +23477,10 @@
|
|
|
23477
23477
|
[
|
|
23478
23478
|
data,
|
|
23479
23479
|
new AxiosTransformStream({
|
|
23480
|
-
maxRate: utils$
|
|
23480
|
+
maxRate: utils$2.toFiniteNumber(maxUploadRate),
|
|
23481
23481
|
}),
|
|
23482
23482
|
],
|
|
23483
|
-
utils$
|
|
23483
|
+
utils$2.noop
|
|
23484
23484
|
);
|
|
23485
23485
|
|
|
23486
23486
|
onUploadProgress &&
|
|
@@ -23551,7 +23551,7 @@
|
|
|
23551
23551
|
});
|
|
23552
23552
|
|
|
23553
23553
|
// cacheable-lookup integration hotfix
|
|
23554
|
-
!utils$
|
|
23554
|
+
!utils$2.isUndefined(lookup) && (options.lookup = lookup);
|
|
23555
23555
|
|
|
23556
23556
|
if (config.socketPath) {
|
|
23557
23557
|
if (typeof config.socketPath !== 'string') {
|
|
@@ -23645,11 +23645,11 @@
|
|
|
23645
23645
|
|
|
23646
23646
|
const streams = [res];
|
|
23647
23647
|
|
|
23648
|
-
const responseLength = utils$
|
|
23648
|
+
const responseLength = utils$2.toFiniteNumber(res.headers['content-length']);
|
|
23649
23649
|
|
|
23650
23650
|
if (onDownloadProgress || maxDownloadRate) {
|
|
23651
23651
|
const transformStream = new AxiosTransformStream({
|
|
23652
|
-
maxRate: utils$
|
|
23652
|
+
maxRate: utils$2.toFiniteNumber(maxDownloadRate),
|
|
23653
23653
|
});
|
|
23654
23654
|
|
|
23655
23655
|
onDownloadProgress &&
|
|
@@ -23710,7 +23710,7 @@
|
|
|
23710
23710
|
}
|
|
23711
23711
|
}
|
|
23712
23712
|
|
|
23713
|
-
responseStream = streams.length > 1 ? Stream.pipeline(streams, utils$
|
|
23713
|
+
responseStream = streams.length > 1 ? Stream.pipeline(streams, utils$2.noop) : streams[0];
|
|
23714
23714
|
|
|
23715
23715
|
const response = {
|
|
23716
23716
|
status: res.statusCode,
|
|
@@ -23799,7 +23799,7 @@
|
|
|
23799
23799
|
if (responseType !== 'arraybuffer') {
|
|
23800
23800
|
responseData = responseData.toString(responseEncoding);
|
|
23801
23801
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
23802
|
-
responseData = utils$
|
|
23802
|
+
responseData = utils$2.stripBOM(responseData);
|
|
23803
23803
|
}
|
|
23804
23804
|
}
|
|
23805
23805
|
response.data = responseData;
|
|
@@ -23918,7 +23918,7 @@
|
|
|
23918
23918
|
}
|
|
23919
23919
|
|
|
23920
23920
|
// Send the request
|
|
23921
|
-
if (utils$
|
|
23921
|
+
if (utils$2.isStream(data)) {
|
|
23922
23922
|
let ended = false;
|
|
23923
23923
|
let errored = false;
|
|
23924
23924
|
|
|
@@ -23964,7 +23964,7 @@
|
|
|
23964
23964
|
},
|
|
23965
23965
|
}),
|
|
23966
23966
|
],
|
|
23967
|
-
utils$
|
|
23967
|
+
utils$2.noop
|
|
23968
23968
|
);
|
|
23969
23969
|
uploadStream.on('error', (err) => {
|
|
23970
23970
|
if (!req.destroyed) req.destroy(err);
|
|
@@ -24002,19 +24002,19 @@
|
|
|
24002
24002
|
|
|
24003
24003
|
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
24004
24004
|
|
|
24005
|
-
if (utils$
|
|
24005
|
+
if (utils$2.isNumber(expires)) {
|
|
24006
24006
|
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
24007
24007
|
}
|
|
24008
|
-
if (utils$
|
|
24008
|
+
if (utils$2.isString(path)) {
|
|
24009
24009
|
cookie.push(`path=${path}`);
|
|
24010
24010
|
}
|
|
24011
|
-
if (utils$
|
|
24011
|
+
if (utils$2.isString(domain)) {
|
|
24012
24012
|
cookie.push(`domain=${domain}`);
|
|
24013
24013
|
}
|
|
24014
24014
|
if (secure === true) {
|
|
24015
24015
|
cookie.push('secure');
|
|
24016
24016
|
}
|
|
24017
|
-
if (utils$
|
|
24017
|
+
if (utils$2.isString(sameSite)) {
|
|
24018
24018
|
cookie.push(`SameSite=${sameSite}`);
|
|
24019
24019
|
}
|
|
24020
24020
|
|
|
@@ -24083,45 +24083,45 @@
|
|
|
24083
24083
|
});
|
|
24084
24084
|
|
|
24085
24085
|
function getMergedValue(target, source, prop, caseless) {
|
|
24086
|
-
if (utils$
|
|
24087
|
-
return utils$
|
|
24088
|
-
} else if (utils$
|
|
24089
|
-
return utils$
|
|
24090
|
-
} else if (utils$
|
|
24086
|
+
if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
|
|
24087
|
+
return utils$2.merge.call({ caseless }, target, source);
|
|
24088
|
+
} else if (utils$2.isPlainObject(source)) {
|
|
24089
|
+
return utils$2.merge({}, source);
|
|
24090
|
+
} else if (utils$2.isArray(source)) {
|
|
24091
24091
|
return source.slice();
|
|
24092
24092
|
}
|
|
24093
24093
|
return source;
|
|
24094
24094
|
}
|
|
24095
24095
|
|
|
24096
24096
|
function mergeDeepProperties(a, b, prop, caseless) {
|
|
24097
|
-
if (!utils$
|
|
24097
|
+
if (!utils$2.isUndefined(b)) {
|
|
24098
24098
|
return getMergedValue(a, b, prop, caseless);
|
|
24099
|
-
} else if (!utils$
|
|
24099
|
+
} else if (!utils$2.isUndefined(a)) {
|
|
24100
24100
|
return getMergedValue(undefined, a, prop, caseless);
|
|
24101
24101
|
}
|
|
24102
24102
|
}
|
|
24103
24103
|
|
|
24104
24104
|
// eslint-disable-next-line consistent-return
|
|
24105
24105
|
function valueFromConfig2(a, b) {
|
|
24106
|
-
if (!utils$
|
|
24106
|
+
if (!utils$2.isUndefined(b)) {
|
|
24107
24107
|
return getMergedValue(undefined, b);
|
|
24108
24108
|
}
|
|
24109
24109
|
}
|
|
24110
24110
|
|
|
24111
24111
|
// eslint-disable-next-line consistent-return
|
|
24112
24112
|
function defaultToConfig2(a, b) {
|
|
24113
|
-
if (!utils$
|
|
24113
|
+
if (!utils$2.isUndefined(b)) {
|
|
24114
24114
|
return getMergedValue(undefined, b);
|
|
24115
|
-
} else if (!utils$
|
|
24115
|
+
} else if (!utils$2.isUndefined(a)) {
|
|
24116
24116
|
return getMergedValue(undefined, a);
|
|
24117
24117
|
}
|
|
24118
24118
|
}
|
|
24119
24119
|
|
|
24120
24120
|
// eslint-disable-next-line consistent-return
|
|
24121
24121
|
function mergeDirectKeys(a, b, prop) {
|
|
24122
|
-
if (utils$
|
|
24122
|
+
if (utils$2.hasOwnProp(config2, prop)) {
|
|
24123
24123
|
return getMergedValue(a, b);
|
|
24124
|
-
} else if (utils$
|
|
24124
|
+
} else if (utils$2.hasOwnProp(config1, prop)) {
|
|
24125
24125
|
return getMergedValue(undefined, a);
|
|
24126
24126
|
}
|
|
24127
24127
|
}
|
|
@@ -24160,13 +24160,13 @@
|
|
|
24160
24160
|
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
24161
24161
|
};
|
|
24162
24162
|
|
|
24163
|
-
utils$
|
|
24163
|
+
utils$2.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
24164
24164
|
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
24165
|
-
const merge = utils$
|
|
24166
|
-
const a = utils$
|
|
24167
|
-
const b = utils$
|
|
24165
|
+
const merge = utils$2.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
24166
|
+
const a = utils$2.hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
24167
|
+
const b = utils$2.hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
24168
24168
|
const configValue = merge(a, b, prop);
|
|
24169
|
-
(utils$
|
|
24169
|
+
(utils$2.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
24170
24170
|
});
|
|
24171
24171
|
|
|
24172
24172
|
return config;
|
|
@@ -24205,7 +24205,7 @@
|
|
|
24205
24205
|
|
|
24206
24206
|
// Read only own properties to prevent prototype pollution gadgets
|
|
24207
24207
|
// (e.g. Object.prototype.baseURL = 'https://evil.com').
|
|
24208
|
-
const own = (key) => (utils$
|
|
24208
|
+
const own = (key) => (utils$2.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
24209
24209
|
|
|
24210
24210
|
const data = own('data');
|
|
24211
24211
|
let withXSRFToken = own('withXSRFToken');
|
|
@@ -24234,10 +24234,10 @@
|
|
|
24234
24234
|
);
|
|
24235
24235
|
}
|
|
24236
24236
|
|
|
24237
|
-
if (utils$
|
|
24237
|
+
if (utils$2.isFormData(data)) {
|
|
24238
24238
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
24239
24239
|
headers.setContentType(undefined); // browser handles it
|
|
24240
|
-
} else if (utils$
|
|
24240
|
+
} else if (utils$2.isFunction(data.getHeaders)) {
|
|
24241
24241
|
// Node.js FormData (like form-data package)
|
|
24242
24242
|
setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
|
|
24243
24243
|
}
|
|
@@ -24248,7 +24248,7 @@
|
|
|
24248
24248
|
// Specifically not if we're in a web worker, or react-native.
|
|
24249
24249
|
|
|
24250
24250
|
if (platform.hasStandardBrowserEnv) {
|
|
24251
|
-
if (utils$
|
|
24251
|
+
if (utils$2.isFunction(withXSRFToken)) {
|
|
24252
24252
|
withXSRFToken = withXSRFToken(newConfig);
|
|
24253
24253
|
}
|
|
24254
24254
|
|
|
@@ -24417,13 +24417,13 @@
|
|
|
24417
24417
|
|
|
24418
24418
|
// Add headers to the request
|
|
24419
24419
|
if ('setRequestHeader' in request) {
|
|
24420
|
-
utils$
|
|
24420
|
+
utils$2.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
24421
24421
|
request.setRequestHeader(key, val);
|
|
24422
24422
|
});
|
|
24423
24423
|
}
|
|
24424
24424
|
|
|
24425
24425
|
// Add withCredentials to request if needed
|
|
24426
|
-
if (!utils$
|
|
24426
|
+
if (!utils$2.isUndefined(_config.withCredentials)) {
|
|
24427
24427
|
request.withCredentials = !!_config.withCredentials;
|
|
24428
24428
|
}
|
|
24429
24429
|
|
|
@@ -24533,7 +24533,7 @@
|
|
|
24533
24533
|
|
|
24534
24534
|
const { signal } = controller;
|
|
24535
24535
|
|
|
24536
|
-
signal.unsubscribe = () => utils$
|
|
24536
|
+
signal.unsubscribe = () => utils$2.asap(unsubscribe);
|
|
24537
24537
|
|
|
24538
24538
|
return signal;
|
|
24539
24539
|
};
|
|
@@ -24630,7 +24630,7 @@
|
|
|
24630
24630
|
|
|
24631
24631
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
24632
24632
|
|
|
24633
|
-
const { isFunction } = utils$
|
|
24633
|
+
const { isFunction } = utils$2;
|
|
24634
24634
|
|
|
24635
24635
|
const test = (fn, ...args) => {
|
|
24636
24636
|
try {
|
|
@@ -24642,12 +24642,12 @@
|
|
|
24642
24642
|
|
|
24643
24643
|
const factory = (env) => {
|
|
24644
24644
|
const globalObject =
|
|
24645
|
-
utils$
|
|
24646
|
-
? utils$
|
|
24645
|
+
utils$2.global !== undefined && utils$2.global !== null
|
|
24646
|
+
? utils$2.global
|
|
24647
24647
|
: globalThis;
|
|
24648
24648
|
const { ReadableStream, TextEncoder } = globalObject;
|
|
24649
24649
|
|
|
24650
|
-
env = utils$
|
|
24650
|
+
env = utils$2.merge.call(
|
|
24651
24651
|
{
|
|
24652
24652
|
skipUndefined: true,
|
|
24653
24653
|
},
|
|
@@ -24705,7 +24705,7 @@
|
|
|
24705
24705
|
const supportsResponseStream =
|
|
24706
24706
|
isResponseSupported &&
|
|
24707
24707
|
isReadableStreamSupported &&
|
|
24708
|
-
test(() => utils$
|
|
24708
|
+
test(() => utils$2.isReadableStream(new Response('').body));
|
|
24709
24709
|
|
|
24710
24710
|
const resolvers = {
|
|
24711
24711
|
stream: supportsResponseStream && ((res) => res.body),
|
|
@@ -24736,11 +24736,11 @@
|
|
|
24736
24736
|
return 0;
|
|
24737
24737
|
}
|
|
24738
24738
|
|
|
24739
|
-
if (utils$
|
|
24739
|
+
if (utils$2.isBlob(body)) {
|
|
24740
24740
|
return body.size;
|
|
24741
24741
|
}
|
|
24742
24742
|
|
|
24743
|
-
if (utils$
|
|
24743
|
+
if (utils$2.isSpecCompliantForm(body)) {
|
|
24744
24744
|
const _request = new Request(platform.origin, {
|
|
24745
24745
|
method: 'POST',
|
|
24746
24746
|
body,
|
|
@@ -24748,21 +24748,21 @@
|
|
|
24748
24748
|
return (await _request.arrayBuffer()).byteLength;
|
|
24749
24749
|
}
|
|
24750
24750
|
|
|
24751
|
-
if (utils$
|
|
24751
|
+
if (utils$2.isArrayBufferView(body) || utils$2.isArrayBuffer(body)) {
|
|
24752
24752
|
return body.byteLength;
|
|
24753
24753
|
}
|
|
24754
24754
|
|
|
24755
|
-
if (utils$
|
|
24755
|
+
if (utils$2.isURLSearchParams(body)) {
|
|
24756
24756
|
body = body + '';
|
|
24757
24757
|
}
|
|
24758
24758
|
|
|
24759
|
-
if (utils$
|
|
24759
|
+
if (utils$2.isString(body)) {
|
|
24760
24760
|
return (await encodeText(body)).byteLength;
|
|
24761
24761
|
}
|
|
24762
24762
|
};
|
|
24763
24763
|
|
|
24764
24764
|
const resolveBodyLength = async (headers, body) => {
|
|
24765
|
-
const length = utils$
|
|
24765
|
+
const length = utils$2.toFiniteNumber(headers.getContentLength());
|
|
24766
24766
|
|
|
24767
24767
|
return length == null ? getBodyLength(body) : length;
|
|
24768
24768
|
};
|
|
@@ -24785,8 +24785,8 @@
|
|
|
24785
24785
|
maxBodyLength,
|
|
24786
24786
|
} = resolveConfig(config);
|
|
24787
24787
|
|
|
24788
|
-
const hasMaxContentLength = utils$
|
|
24789
|
-
const hasMaxBodyLength = utils$
|
|
24788
|
+
const hasMaxContentLength = utils$2.isNumber(maxContentLength) && maxContentLength > -1;
|
|
24789
|
+
const hasMaxBodyLength = utils$2.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
24790
24790
|
|
|
24791
24791
|
let _fetch = envFetch || fetch;
|
|
24792
24792
|
|
|
@@ -24859,7 +24859,7 @@
|
|
|
24859
24859
|
|
|
24860
24860
|
let contentTypeHeader;
|
|
24861
24861
|
|
|
24862
|
-
if (utils$
|
|
24862
|
+
if (utils$2.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
24863
24863
|
headers.setContentType(contentTypeHeader);
|
|
24864
24864
|
}
|
|
24865
24865
|
|
|
@@ -24873,7 +24873,7 @@
|
|
|
24873
24873
|
}
|
|
24874
24874
|
}
|
|
24875
24875
|
|
|
24876
|
-
if (!utils$
|
|
24876
|
+
if (!utils$2.isString(withCredentials)) {
|
|
24877
24877
|
withCredentials = withCredentials ? 'include' : 'omit';
|
|
24878
24878
|
}
|
|
24879
24879
|
|
|
@@ -24883,7 +24883,7 @@
|
|
|
24883
24883
|
|
|
24884
24884
|
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
24885
24885
|
// delete it so fetch can set it correctly with the boundary
|
|
24886
|
-
if (utils$
|
|
24886
|
+
if (utils$2.isFormData(data)) {
|
|
24887
24887
|
const contentType = headers.getContentType();
|
|
24888
24888
|
if (
|
|
24889
24889
|
contentType &&
|
|
@@ -24916,7 +24916,7 @@
|
|
|
24916
24916
|
// Cheap pre-check: if the server honestly declares a content-length that
|
|
24917
24917
|
// already exceeds the cap, reject before we start streaming.
|
|
24918
24918
|
if (hasMaxContentLength) {
|
|
24919
|
-
const declaredLength = utils$
|
|
24919
|
+
const declaredLength = utils$2.toFiniteNumber(response.headers.get('content-length'));
|
|
24920
24920
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
24921
24921
|
throw new AxiosError$1(
|
|
24922
24922
|
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
@@ -24941,7 +24941,7 @@
|
|
|
24941
24941
|
options[prop] = response[prop];
|
|
24942
24942
|
});
|
|
24943
24943
|
|
|
24944
|
-
const responseContentLength = utils$
|
|
24944
|
+
const responseContentLength = utils$2.toFiniteNumber(response.headers.get('content-length'));
|
|
24945
24945
|
|
|
24946
24946
|
const [onProgress, flush] =
|
|
24947
24947
|
(onDownloadProgress &&
|
|
@@ -24978,7 +24978,7 @@
|
|
|
24978
24978
|
|
|
24979
24979
|
responseType = responseType || 'text';
|
|
24980
24980
|
|
|
24981
|
-
let responseData = await resolvers[utils$
|
|
24981
|
+
let responseData = await resolvers[utils$2.findKey(resolvers, responseType) || 'text'](
|
|
24982
24982
|
response,
|
|
24983
24983
|
config
|
|
24984
24984
|
);
|
|
@@ -25101,7 +25101,7 @@
|
|
|
25101
25101
|
};
|
|
25102
25102
|
|
|
25103
25103
|
// Assign adapter names for easier debugging and identification
|
|
25104
|
-
utils$
|
|
25104
|
+
utils$2.forEach(knownAdapters, (fn, value) => {
|
|
25105
25105
|
if (fn) {
|
|
25106
25106
|
try {
|
|
25107
25107
|
// Null-proto descriptors so a polluted Object.prototype.get cannot turn
|
|
@@ -25129,7 +25129,7 @@
|
|
|
25129
25129
|
* @returns {boolean}
|
|
25130
25130
|
*/
|
|
25131
25131
|
const isResolvedHandle = (adapter) =>
|
|
25132
|
-
utils$
|
|
25132
|
+
utils$2.isFunction(adapter) || adapter === null || adapter === false;
|
|
25133
25133
|
|
|
25134
25134
|
/**
|
|
25135
25135
|
* Get the first suitable adapter from the provided list.
|
|
@@ -25142,7 +25142,7 @@
|
|
|
25142
25142
|
* @returns {Function} The resolved adapter function
|
|
25143
25143
|
*/
|
|
25144
25144
|
function getAdapter$1(adapters, config) {
|
|
25145
|
-
adapters = utils$
|
|
25145
|
+
adapters = utils$2.isArray(adapters) ? adapters : [adapters];
|
|
25146
25146
|
|
|
25147
25147
|
const { length } = adapters;
|
|
25148
25148
|
let nameOrAdapter;
|
|
@@ -25164,7 +25164,7 @@
|
|
|
25164
25164
|
}
|
|
25165
25165
|
}
|
|
25166
25166
|
|
|
25167
|
-
if (adapter && (utils$
|
|
25167
|
+
if (adapter && (utils$2.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
25168
25168
|
break;
|
|
25169
25169
|
}
|
|
25170
25170
|
|
|
@@ -25496,7 +25496,7 @@
|
|
|
25496
25496
|
}
|
|
25497
25497
|
|
|
25498
25498
|
if (paramsSerializer != null) {
|
|
25499
|
-
if (utils$
|
|
25499
|
+
if (utils$2.isFunction(paramsSerializer)) {
|
|
25500
25500
|
config.paramsSerializer = {
|
|
25501
25501
|
serialize: paramsSerializer,
|
|
25502
25502
|
};
|
|
@@ -25532,10 +25532,10 @@
|
|
|
25532
25532
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
25533
25533
|
|
|
25534
25534
|
// Flatten headers
|
|
25535
|
-
let contextHeaders = headers && utils$
|
|
25535
|
+
let contextHeaders = headers && utils$2.merge(headers.common, headers[config.method]);
|
|
25536
25536
|
|
|
25537
25537
|
headers &&
|
|
25538
|
-
utils$
|
|
25538
|
+
utils$2.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
|
|
25539
25539
|
delete headers[method];
|
|
25540
25540
|
});
|
|
25541
25541
|
|
|
@@ -25625,7 +25625,7 @@
|
|
|
25625
25625
|
};
|
|
25626
25626
|
|
|
25627
25627
|
// Provide aliases for supported request methods
|
|
25628
|
-
utils$
|
|
25628
|
+
utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
25629
25629
|
/*eslint func-names:0*/
|
|
25630
25630
|
Axios$1.prototype[method] = function (url, config) {
|
|
25631
25631
|
return this.request(
|
|
@@ -25638,7 +25638,7 @@
|
|
|
25638
25638
|
};
|
|
25639
25639
|
});
|
|
25640
25640
|
|
|
25641
|
-
utils$
|
|
25641
|
+
utils$2.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
|
|
25642
25642
|
function generateHTTPMethod(isForm) {
|
|
25643
25643
|
return function httpMethod(url, data, config) {
|
|
25644
25644
|
return this.request(
|
|
@@ -25830,7 +25830,7 @@
|
|
|
25830
25830
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
25831
25831
|
*/
|
|
25832
25832
|
function isAxiosError$1(payload) {
|
|
25833
|
-
return utils$
|
|
25833
|
+
return utils$2.isObject(payload) && payload.isAxiosError === true;
|
|
25834
25834
|
}
|
|
25835
25835
|
|
|
25836
25836
|
const HttpStatusCode$1 = {
|
|
@@ -25921,10 +25921,10 @@
|
|
|
25921
25921
|
const instance = bind(Axios$1.prototype.request, context);
|
|
25922
25922
|
|
|
25923
25923
|
// Copy axios.prototype to instance
|
|
25924
|
-
utils$
|
|
25924
|
+
utils$2.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
|
|
25925
25925
|
|
|
25926
25926
|
// Copy context to instance
|
|
25927
|
-
utils$
|
|
25927
|
+
utils$2.extend(instance, context, null, { allOwnKeys: true });
|
|
25928
25928
|
|
|
25929
25929
|
// Factory for creating new instances
|
|
25930
25930
|
instance.create = function create(instanceConfig) {
|
|
@@ -25968,7 +25968,7 @@
|
|
|
25968
25968
|
|
|
25969
25969
|
axios.AxiosHeaders = AxiosHeaders$1;
|
|
25970
25970
|
|
|
25971
|
-
axios.formToJSON = (thing) => formDataToJSON(utils$
|
|
25971
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
25972
25972
|
|
|
25973
25973
|
axios.getAdapter = adapters.getAdapter;
|
|
25974
25974
|
|
|
@@ -32110,6 +32110,9 @@
|
|
|
32110
32110
|
// Reduce any little-endian byte string modulo the subgroup order; the `hash` name reflects the
|
|
32111
32111
|
// common caller shape, not an input restriction.
|
|
32112
32112
|
const modL_LE = (hash) => modN(bytesToNumberLE(hash)); // modulo L; but little-endian
|
|
32113
|
+
// Both sync and async SHA-512 slots are exported/configurable; use `callHash(...)` for both so
|
|
32114
|
+
// missing async overrides fail explicitly, then validate the returned digest type/length.
|
|
32115
|
+
const sha512a = (...m) => Promise.resolve(callHash('sha512Async')(concatBytes(...m))).then(checkDigest);
|
|
32113
32116
|
const sha512s = (...m) => checkDigest(callHash('sha512')(concatBytes(...m)));
|
|
32114
32117
|
// RFC8032 5.1.5. Split the 64-byte hashed seed into the clamped scalar half and nonce prefix.
|
|
32115
32118
|
const hash2extK = (hashed) => {
|
|
@@ -32127,6 +32130,8 @@
|
|
|
32127
32130
|
const pointBytes = point.toBytes(); // point serialized to Uint8Array
|
|
32128
32131
|
return { head, prefix, scalar, point, pointBytes };
|
|
32129
32132
|
};
|
|
32133
|
+
// RFC8032 5.1.5; getPublicKey async, sync. Hash priv key and extract point.
|
|
32134
|
+
const getExtendedPublicKeyAsync = (secretKey) => sha512a(abytes(secretKey, L)).then(hash2extK);
|
|
32130
32135
|
const getExtendedPublicKey = (secretKey) => hash2extK(sha512s(abytes(secretKey, L)));
|
|
32131
32136
|
/**
|
|
32132
32137
|
* Creates a 32-byte Ed25519 public key from the RFC 8032 32-byte secret-key seed.
|
|
@@ -32298,28 +32303,24 @@
|
|
|
32298
32303
|
return abytes(seed, L);
|
|
32299
32304
|
};
|
|
32300
32305
|
/**
|
|
32301
|
-
*
|
|
32302
|
-
*
|
|
32303
|
-
*
|
|
32304
|
-
* @throws If synchronous SHA-512 has not been configured in `hashes`. {@link Error}
|
|
32305
|
-
* @throws On wrong argument types. {@link TypeError}
|
|
32306
|
-
* @throws On wrong argument ranges or values. {@link RangeError}
|
|
32306
|
+
* Ed25519-specific key utilities.
|
|
32307
|
+
* `utils.getExtendedPublicKey*` expose secret-derived internals (`head`, `prefix`, `scalar`, and
|
|
32308
|
+
* point objects), not just public-key bytes.
|
|
32307
32309
|
* @example
|
|
32308
|
-
* Generate a new
|
|
32310
|
+
* Generate a new Ed25519 secret key and derive the matching public key.
|
|
32309
32311
|
*
|
|
32310
32312
|
* ```ts
|
|
32311
32313
|
* import * as ed from '@noble/ed25519';
|
|
32312
|
-
* import { sha512 } from '@noble/hashes/sha2.js';
|
|
32313
32314
|
*
|
|
32314
|
-
* ed.
|
|
32315
|
-
* const
|
|
32315
|
+
* const secretKey = ed.utils.randomSecretKey();
|
|
32316
|
+
* const publicKey = await ed.getPublicKeyAsync(secretKey);
|
|
32316
32317
|
* ```
|
|
32317
32318
|
*/
|
|
32318
|
-
const
|
|
32319
|
-
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
};
|
|
32319
|
+
const utils = /* @__PURE__ */ Object.freeze({
|
|
32320
|
+
getExtendedPublicKeyAsync: getExtendedPublicKeyAsync,
|
|
32321
|
+
getExtendedPublicKey: getExtendedPublicKey,
|
|
32322
|
+
randomSecretKey: randomSecretKey,
|
|
32323
|
+
});
|
|
32323
32324
|
// ## Precomputes
|
|
32324
32325
|
// --------------
|
|
32325
32326
|
const W = 8; // W is window size
|
|
@@ -33497,7 +33498,7 @@
|
|
|
33497
33498
|
* Create a random `Keypair` object.
|
|
33498
33499
|
*/
|
|
33499
33500
|
static random() {
|
|
33500
|
-
const
|
|
33501
|
+
const secretKey = utils.randomSecretKey();
|
|
33501
33502
|
return this.fromRawEd25519Seed(bufferExports.Buffer.from(secretKey));
|
|
33502
33503
|
}
|
|
33503
33504
|
/** Returns this public key as an xdr.AccountId. */
|
|
@@ -41191,7 +41192,19 @@
|
|
|
41191
41192
|
"cannot clone a transaction with no operations: per-operation base fee cannot be determined"
|
|
41192
41193
|
);
|
|
41193
41194
|
}
|
|
41194
|
-
|
|
41195
|
+
let sorobanData;
|
|
41196
|
+
const envelope = tx.toEnvelope();
|
|
41197
|
+
if (envelope.switch() === types.EnvelopeType.envelopeTypeTx()) {
|
|
41198
|
+
sorobanData = envelope.v1().tx().ext().value() ?? void 0;
|
|
41199
|
+
}
|
|
41200
|
+
let totalFee = parseInt(tx.fee, 10);
|
|
41201
|
+
if (sorobanData) {
|
|
41202
|
+
const resourceFee = Number(sorobanData.resourceFee().toBigInt());
|
|
41203
|
+
if (totalFee - resourceFee > 0) {
|
|
41204
|
+
totalFee -= resourceFee;
|
|
41205
|
+
}
|
|
41206
|
+
}
|
|
41207
|
+
const unscaledFee = Math.floor(totalFee / tx.operations.length);
|
|
41195
41208
|
const builderOpts = {
|
|
41196
41209
|
fee: (unscaledFee || BASE_FEE).toString(),
|
|
41197
41210
|
memo: tx.memo,
|
|
@@ -42113,7 +42126,8 @@
|
|
|
42113
42126
|
validUntilLedgerSeq,
|
|
42114
42127
|
invocation,
|
|
42115
42128
|
networkPassphrase,
|
|
42116
|
-
publicKey = ""
|
|
42129
|
+
publicKey = "",
|
|
42130
|
+
authV2 = false
|
|
42117
42131
|
} = params;
|
|
42118
42132
|
const kp = Keypair.random().rawPublicKey();
|
|
42119
42133
|
const nonce = new types.Int64(bytesToInt64(kp));
|
|
@@ -42121,18 +42135,17 @@
|
|
|
42121
42135
|
if (!pk) {
|
|
42122
42136
|
throw new Error(`authorizeInvocation requires publicKey parameter`);
|
|
42123
42137
|
}
|
|
42138
|
+
const addressCredentials = new types.SorobanAddressCredentials({
|
|
42139
|
+
address: new Address(pk).toScAddress(),
|
|
42140
|
+
nonce,
|
|
42141
|
+
signatureExpirationLedger: 0,
|
|
42142
|
+
// replaced
|
|
42143
|
+
signature: types.ScVal.scvVec([])
|
|
42144
|
+
// replaced
|
|
42145
|
+
});
|
|
42124
42146
|
const entry = new types.SorobanAuthorizationEntry({
|
|
42125
42147
|
rootInvocation: invocation,
|
|
42126
|
-
credentials: types.SorobanCredentials.sorobanCredentialsAddressV2(
|
|
42127
|
-
new types.SorobanAddressCredentials({
|
|
42128
|
-
address: new Address(pk).toScAddress(),
|
|
42129
|
-
nonce,
|
|
42130
|
-
signatureExpirationLedger: 0,
|
|
42131
|
-
// replaced
|
|
42132
|
-
signature: types.ScVal.scvVec([])
|
|
42133
|
-
// replaced
|
|
42134
|
-
})
|
|
42135
|
-
)
|
|
42148
|
+
credentials: authV2 ? types.SorobanCredentials.sorobanCredentialsAddressV2(addressCredentials) : types.SorobanCredentials.sorobanCredentialsAddress(addressCredentials)
|
|
42136
42149
|
});
|
|
42137
42150
|
return authorizeEntry(entry, signer, validUntilLedgerSeq, networkPassphrase);
|
|
42138
42151
|
}
|
|
@@ -43707,7 +43720,7 @@ ${value}`, dataLines++;
|
|
|
43707
43720
|
return doc && typeof doc == "object" && "baseURI" in doc && typeof doc.baseURI == "string" ? doc.baseURI : void 0;
|
|
43708
43721
|
}
|
|
43709
43722
|
|
|
43710
|
-
const version$1 = "16.0.0
|
|
43723
|
+
const version$1 = "16.0.0";
|
|
43711
43724
|
const SERVER_TIME_MAP = {};
|
|
43712
43725
|
function toSeconds(ms) {
|
|
43713
43726
|
return Math.floor(ms / 1e3);
|
|
@@ -45634,7 +45647,7 @@ ${value}`, dataLines++;
|
|
|
45634
45647
|
Api2.isSimulationRaw = isSimulationRaw;
|
|
45635
45648
|
})(Api || (Api = {}));
|
|
45636
45649
|
|
|
45637
|
-
const version = "16.0.0
|
|
45650
|
+
const version = "16.0.0";
|
|
45638
45651
|
function createHttpClient(headers) {
|
|
45639
45652
|
return create({
|
|
45640
45653
|
headers: {
|
|
@@ -46124,8 +46137,8 @@ ${value}`, dataLines++;
|
|
|
46124
46137
|
async getClaimableBalance(id) {
|
|
46125
46138
|
let balanceId;
|
|
46126
46139
|
if (StrKey.isValidClaimableBalance(id)) {
|
|
46127
|
-
|
|
46128
|
-
|
|
46140
|
+
const buffer = StrKey.decodeClaimableBalance(id);
|
|
46141
|
+
const v = bufferExports.Buffer.concat([
|
|
46129
46142
|
bufferExports.Buffer.from("\0\0\0"),
|
|
46130
46143
|
buffer.subarray(0, 1)
|
|
46131
46144
|
]);
|
|
@@ -48212,7 +48225,7 @@ ${JSON.stringify(sentTransaction)}`
|
|
|
48212
48225
|
|
|
48213
48226
|
function specFromWasm(wasm) {
|
|
48214
48227
|
const customData = parseWasmCustomSections(wasm);
|
|
48215
|
-
|
|
48228
|
+
const xdrSections = customData.get("contractspecv0");
|
|
48216
48229
|
if (!xdrSections || xdrSections.length === 0) {
|
|
48217
48230
|
throw new Error("Could not obtain contract spec from wasm");
|
|
48218
48231
|
}
|
|
@@ -49784,7 +49797,7 @@ ${indent} */
|
|
|
49784
49797
|
build: "tsc"
|
|
49785
49798
|
},
|
|
49786
49799
|
dependencies: {
|
|
49787
|
-
"@stellar/stellar-sdk": `^${"16.0.0
|
|
49800
|
+
"@stellar/stellar-sdk": `^${"16.0.0"}`,
|
|
49788
49801
|
buffer: "6.0.3"
|
|
49789
49802
|
},
|
|
49790
49803
|
devDependencies: {
|
|
@@ -50260,7 +50273,7 @@ export class Client extends ContractClient {
|
|
|
50260
50273
|
return { type: "stellar-asset-contract" };
|
|
50261
50274
|
}
|
|
50262
50275
|
const wasmHash = instance.executable().wasmHash();
|
|
50263
|
-
|
|
50276
|
+
const wasmBytes = await getRemoteWasmFromHash(server, wasmHash);
|
|
50264
50277
|
return { type: "wasm", wasmBytes };
|
|
50265
50278
|
} catch (error) {
|
|
50266
50279
|
if (error instanceof WasmFetchError) {
|