@block52/poker-vm-sdk 1.1.7 → 1.1.9
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 +81 -15
- package/dist/index.d.ts +4 -0
- package/dist/index.esm.js +282 -335
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +282 -335
- package/dist/index.js.map +1 -1
- package/dist/pokerchain.poker.v1/types/pokerchain/poker/v1/tx.d.ts +2 -0
- package/dist/pokerchain.poker.v1/types/pokerchain/poker/v1/tx.d.ts.map +1 -1
- package/dist/signingClient.d.ts.map +1 -1
- package/dist/types/game.d.ts +2 -0
- package/dist/types/game.d.ts.map +1 -1
- package/package.json +75 -75
package/dist/index.js
CHANGED
|
@@ -3377,7 +3377,7 @@ const MsgDealCards = {
|
|
|
3377
3377
|
},
|
|
3378
3378
|
};
|
|
3379
3379
|
function createBaseMsgPerformAction() {
|
|
3380
|
-
return { player: "", gameId: "", action: "", amount: Long.UZERO };
|
|
3380
|
+
return { player: "", gameId: "", action: "", amount: Long.UZERO, data: "" };
|
|
3381
3381
|
}
|
|
3382
3382
|
const MsgPerformAction = {
|
|
3383
3383
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -3393,6 +3393,9 @@ const MsgPerformAction = {
|
|
|
3393
3393
|
if (!message.amount.equals(Long.UZERO)) {
|
|
3394
3394
|
writer.uint32(32).uint64(message.amount.toString());
|
|
3395
3395
|
}
|
|
3396
|
+
if (message.data !== "") {
|
|
3397
|
+
writer.uint32(42).string(message.data);
|
|
3398
|
+
}
|
|
3396
3399
|
return writer;
|
|
3397
3400
|
},
|
|
3398
3401
|
decode(input, length) {
|
|
@@ -3430,6 +3433,13 @@ const MsgPerformAction = {
|
|
|
3430
3433
|
message.amount = Long.fromString(reader.uint64().toString(), true);
|
|
3431
3434
|
continue;
|
|
3432
3435
|
}
|
|
3436
|
+
case 5: {
|
|
3437
|
+
if (tag !== 42) {
|
|
3438
|
+
break;
|
|
3439
|
+
}
|
|
3440
|
+
message.data = reader.string();
|
|
3441
|
+
continue;
|
|
3442
|
+
}
|
|
3433
3443
|
}
|
|
3434
3444
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3435
3445
|
break;
|
|
@@ -3444,6 +3454,7 @@ const MsgPerformAction = {
|
|
|
3444
3454
|
gameId: isSet$2b(object.gameId) ? globalThis.String(object.gameId) : "",
|
|
3445
3455
|
action: isSet$2b(object.action) ? globalThis.String(object.action) : "",
|
|
3446
3456
|
amount: isSet$2b(object.amount) ? Long.fromValue(object.amount) : Long.UZERO,
|
|
3457
|
+
data: isSet$2b(object.data) ? globalThis.String(object.data) : "",
|
|
3447
3458
|
};
|
|
3448
3459
|
},
|
|
3449
3460
|
toJSON(message) {
|
|
@@ -3460,6 +3471,9 @@ const MsgPerformAction = {
|
|
|
3460
3471
|
if (!message.amount.equals(Long.UZERO)) {
|
|
3461
3472
|
obj.amount = (message.amount || Long.UZERO).toString();
|
|
3462
3473
|
}
|
|
3474
|
+
if (message.data !== "") {
|
|
3475
|
+
obj.data = message.data;
|
|
3476
|
+
}
|
|
3463
3477
|
return obj;
|
|
3464
3478
|
},
|
|
3465
3479
|
create(base) {
|
|
@@ -3473,6 +3487,7 @@ const MsgPerformAction = {
|
|
|
3473
3487
|
message.amount = (object.amount !== undefined && object.amount !== null)
|
|
3474
3488
|
? Long.fromValue(object.amount)
|
|
3475
3489
|
: Long.UZERO;
|
|
3490
|
+
message.data = object.data ?? "";
|
|
3476
3491
|
return message;
|
|
3477
3492
|
},
|
|
3478
3493
|
};
|
|
@@ -4191,30 +4206,30 @@ function bind(fn, thisArg) {
|
|
|
4191
4206
|
|
|
4192
4207
|
// utils is a library of generic helper functions non-specific to axios
|
|
4193
4208
|
|
|
4194
|
-
const {
|
|
4195
|
-
const {
|
|
4196
|
-
const {
|
|
4209
|
+
const {toString} = Object.prototype;
|
|
4210
|
+
const {getPrototypeOf} = Object;
|
|
4211
|
+
const {iterator, toStringTag} = Symbol;
|
|
4197
4212
|
|
|
4198
|
-
const kindOf = (
|
|
4199
|
-
|
|
4200
|
-
|
|
4213
|
+
const kindOf = (cache => thing => {
|
|
4214
|
+
const str = toString.call(thing);
|
|
4215
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
4201
4216
|
})(Object.create(null));
|
|
4202
4217
|
|
|
4203
4218
|
const kindOfTest = (type) => {
|
|
4204
4219
|
type = type.toLowerCase();
|
|
4205
|
-
return (thing) => kindOf(thing) === type
|
|
4220
|
+
return (thing) => kindOf(thing) === type
|
|
4206
4221
|
};
|
|
4207
4222
|
|
|
4208
|
-
const typeOfTest =
|
|
4223
|
+
const typeOfTest = type => thing => typeof thing === type;
|
|
4209
4224
|
|
|
4210
4225
|
/**
|
|
4211
|
-
* Determine if a value is
|
|
4226
|
+
* Determine if a value is an Array
|
|
4212
4227
|
*
|
|
4213
4228
|
* @param {Object} val The value to test
|
|
4214
4229
|
*
|
|
4215
4230
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
4216
4231
|
*/
|
|
4217
|
-
const {
|
|
4232
|
+
const {isArray} = Array;
|
|
4218
4233
|
|
|
4219
4234
|
/**
|
|
4220
4235
|
* Determine if a value is undefined
|
|
@@ -4223,7 +4238,7 @@ const { isArray } = Array;
|
|
|
4223
4238
|
*
|
|
4224
4239
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
4225
4240
|
*/
|
|
4226
|
-
const isUndefined = typeOfTest(
|
|
4241
|
+
const isUndefined = typeOfTest('undefined');
|
|
4227
4242
|
|
|
4228
4243
|
/**
|
|
4229
4244
|
* Determine if a value is a Buffer
|
|
@@ -4233,14 +4248,8 @@ const isUndefined = typeOfTest("undefined");
|
|
|
4233
4248
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
4234
4249
|
*/
|
|
4235
4250
|
function isBuffer(val) {
|
|
4236
|
-
return (
|
|
4237
|
-
val
|
|
4238
|
-
!isUndefined(val) &&
|
|
4239
|
-
val.constructor !== null &&
|
|
4240
|
-
!isUndefined(val.constructor) &&
|
|
4241
|
-
isFunction$1(val.constructor.isBuffer) &&
|
|
4242
|
-
val.constructor.isBuffer(val)
|
|
4243
|
-
);
|
|
4251
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
4252
|
+
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
4244
4253
|
}
|
|
4245
4254
|
|
|
4246
4255
|
/**
|
|
@@ -4250,7 +4259,8 @@ function isBuffer(val) {
|
|
|
4250
4259
|
*
|
|
4251
4260
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
4252
4261
|
*/
|
|
4253
|
-
const isArrayBuffer = kindOfTest(
|
|
4262
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
4263
|
+
|
|
4254
4264
|
|
|
4255
4265
|
/**
|
|
4256
4266
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -4261,10 +4271,10 @@ const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
|
4261
4271
|
*/
|
|
4262
4272
|
function isArrayBufferView(val) {
|
|
4263
4273
|
let result;
|
|
4264
|
-
if (typeof ArrayBuffer !==
|
|
4274
|
+
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
4265
4275
|
result = ArrayBuffer.isView(val);
|
|
4266
4276
|
} else {
|
|
4267
|
-
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
4277
|
+
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
4268
4278
|
}
|
|
4269
4279
|
return result;
|
|
4270
4280
|
}
|
|
@@ -4276,7 +4286,7 @@ function isArrayBufferView(val) {
|
|
|
4276
4286
|
*
|
|
4277
4287
|
* @returns {boolean} True if value is a String, otherwise false
|
|
4278
4288
|
*/
|
|
4279
|
-
const isString = typeOfTest(
|
|
4289
|
+
const isString = typeOfTest('string');
|
|
4280
4290
|
|
|
4281
4291
|
/**
|
|
4282
4292
|
* Determine if a value is a Function
|
|
@@ -4284,7 +4294,7 @@ const isString = typeOfTest("string");
|
|
|
4284
4294
|
* @param {*} val The value to test
|
|
4285
4295
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
4286
4296
|
*/
|
|
4287
|
-
const isFunction$1 = typeOfTest(
|
|
4297
|
+
const isFunction$1 = typeOfTest('function');
|
|
4288
4298
|
|
|
4289
4299
|
/**
|
|
4290
4300
|
* Determine if a value is a Number
|
|
@@ -4293,7 +4303,7 @@ const isFunction$1 = typeOfTest("function");
|
|
|
4293
4303
|
*
|
|
4294
4304
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
4295
4305
|
*/
|
|
4296
|
-
const isNumber = typeOfTest(
|
|
4306
|
+
const isNumber = typeOfTest('number');
|
|
4297
4307
|
|
|
4298
4308
|
/**
|
|
4299
4309
|
* Determine if a value is an Object
|
|
@@ -4302,7 +4312,7 @@ const isNumber = typeOfTest("number");
|
|
|
4302
4312
|
*
|
|
4303
4313
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
4304
4314
|
*/
|
|
4305
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
4315
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
4306
4316
|
|
|
4307
4317
|
/**
|
|
4308
4318
|
* Determine if a value is a Boolean
|
|
@@ -4310,7 +4320,7 @@ const isObject = (thing) => thing !== null && typeof thing === "object";
|
|
|
4310
4320
|
* @param {*} thing The value to test
|
|
4311
4321
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
4312
4322
|
*/
|
|
4313
|
-
const isBoolean =
|
|
4323
|
+
const isBoolean = thing => thing === true || thing === false;
|
|
4314
4324
|
|
|
4315
4325
|
/**
|
|
4316
4326
|
* Determine if a value is a plain Object
|
|
@@ -4320,18 +4330,12 @@ const isBoolean = (thing) => thing === true || thing === false;
|
|
|
4320
4330
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
4321
4331
|
*/
|
|
4322
4332
|
const isPlainObject = (val) => {
|
|
4323
|
-
if (kindOf(val) !==
|
|
4333
|
+
if (kindOf(val) !== 'object') {
|
|
4324
4334
|
return false;
|
|
4325
4335
|
}
|
|
4326
4336
|
|
|
4327
4337
|
const prototype = getPrototypeOf(val);
|
|
4328
|
-
return (
|
|
4329
|
-
(prototype === null ||
|
|
4330
|
-
prototype === Object.prototype ||
|
|
4331
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
4332
|
-
!(toStringTag in val) &&
|
|
4333
|
-
!(iterator in val)
|
|
4334
|
-
);
|
|
4338
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
|
4335
4339
|
};
|
|
4336
4340
|
|
|
4337
4341
|
/**
|
|
@@ -4348,10 +4352,7 @@ const isEmptyObject = (val) => {
|
|
|
4348
4352
|
}
|
|
4349
4353
|
|
|
4350
4354
|
try {
|
|
4351
|
-
return (
|
|
4352
|
-
Object.keys(val).length === 0 &&
|
|
4353
|
-
Object.getPrototypeOf(val) === Object.prototype
|
|
4354
|
-
);
|
|
4355
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
4355
4356
|
} catch (e) {
|
|
4356
4357
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
4357
4358
|
return false;
|
|
@@ -4365,7 +4366,7 @@ const isEmptyObject = (val) => {
|
|
|
4365
4366
|
*
|
|
4366
4367
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
4367
4368
|
*/
|
|
4368
|
-
const isDate = kindOfTest(
|
|
4369
|
+
const isDate = kindOfTest('Date');
|
|
4369
4370
|
|
|
4370
4371
|
/**
|
|
4371
4372
|
* Determine if a value is a File
|
|
@@ -4374,7 +4375,7 @@ const isDate = kindOfTest("Date");
|
|
|
4374
4375
|
*
|
|
4375
4376
|
* @returns {boolean} True if value is a File, otherwise false
|
|
4376
4377
|
*/
|
|
4377
|
-
const isFile = kindOfTest(
|
|
4378
|
+
const isFile = kindOfTest('File');
|
|
4378
4379
|
|
|
4379
4380
|
/**
|
|
4380
4381
|
* Determine if a value is a Blob
|
|
@@ -4383,7 +4384,7 @@ const isFile = kindOfTest("File");
|
|
|
4383
4384
|
*
|
|
4384
4385
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
4385
4386
|
*/
|
|
4386
|
-
const isBlob = kindOfTest(
|
|
4387
|
+
const isBlob = kindOfTest('Blob');
|
|
4387
4388
|
|
|
4388
4389
|
/**
|
|
4389
4390
|
* Determine if a value is a FileList
|
|
@@ -4392,7 +4393,7 @@ const isBlob = kindOfTest("Blob");
|
|
|
4392
4393
|
*
|
|
4393
4394
|
* @returns {boolean} True if value is a File, otherwise false
|
|
4394
4395
|
*/
|
|
4395
|
-
const isFileList = kindOfTest(
|
|
4396
|
+
const isFileList = kindOfTest('FileList');
|
|
4396
4397
|
|
|
4397
4398
|
/**
|
|
4398
4399
|
* Determine if a value is a Stream
|
|
@@ -4412,16 +4413,15 @@ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
|
4412
4413
|
*/
|
|
4413
4414
|
const isFormData = (thing) => {
|
|
4414
4415
|
let kind;
|
|
4415
|
-
return (
|
|
4416
|
-
thing
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
);
|
|
4416
|
+
return thing && (
|
|
4417
|
+
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
4418
|
+
isFunction$1(thing.append) && (
|
|
4419
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
4420
|
+
// detect form-data instance
|
|
4421
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
|
|
4422
|
+
)
|
|
4423
|
+
)
|
|
4424
|
+
)
|
|
4425
4425
|
};
|
|
4426
4426
|
|
|
4427
4427
|
/**
|
|
@@ -4431,14 +4431,9 @@ const isFormData = (thing) => {
|
|
|
4431
4431
|
*
|
|
4432
4432
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
4433
4433
|
*/
|
|
4434
|
-
const isURLSearchParams = kindOfTest(
|
|
4434
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
4435
4435
|
|
|
4436
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
4437
|
-
"ReadableStream",
|
|
4438
|
-
"Request",
|
|
4439
|
-
"Response",
|
|
4440
|
-
"Headers",
|
|
4441
|
-
].map(kindOfTest);
|
|
4436
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
|
|
4442
4437
|
|
|
4443
4438
|
/**
|
|
4444
4439
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -4447,8 +4442,8 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
|
4447
4442
|
*
|
|
4448
4443
|
* @returns {String} The String freed of excess whitespace
|
|
4449
4444
|
*/
|
|
4450
|
-
const trim = (str) =>
|
|
4451
|
-
str.trim
|
|
4445
|
+
const trim = (str) => str.trim ?
|
|
4446
|
+
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
4452
4447
|
|
|
4453
4448
|
/**
|
|
4454
4449
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
@@ -4459,16 +4454,15 @@ const trim = (str) =>
|
|
|
4459
4454
|
* If 'obj' is an Object callback will be called passing
|
|
4460
4455
|
* the value, key, and complete object for each property.
|
|
4461
4456
|
*
|
|
4462
|
-
* @param {Object|Array
|
|
4457
|
+
* @param {Object|Array} obj The object to iterate
|
|
4463
4458
|
* @param {Function} fn The callback to invoke for each item
|
|
4464
4459
|
*
|
|
4465
|
-
* @param {
|
|
4466
|
-
* @param {Boolean} [options.allOwnKeys = false]
|
|
4460
|
+
* @param {Boolean} [allOwnKeys = false]
|
|
4467
4461
|
* @returns {any}
|
|
4468
4462
|
*/
|
|
4469
|
-
function forEach(obj, fn, {
|
|
4463
|
+
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
4470
4464
|
// Don't bother if no value provided
|
|
4471
|
-
if (obj === null || typeof obj ===
|
|
4465
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
4472
4466
|
return;
|
|
4473
4467
|
}
|
|
4474
4468
|
|
|
@@ -4476,7 +4470,7 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
4476
4470
|
let l;
|
|
4477
4471
|
|
|
4478
4472
|
// Force an array if not already something iterable
|
|
4479
|
-
if (typeof obj !==
|
|
4473
|
+
if (typeof obj !== 'object') {
|
|
4480
4474
|
/*eslint no-param-reassign:0*/
|
|
4481
4475
|
obj = [obj];
|
|
4482
4476
|
}
|
|
@@ -4493,9 +4487,7 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
4493
4487
|
}
|
|
4494
4488
|
|
|
4495
4489
|
// Iterate over object keys
|
|
4496
|
-
const keys = allOwnKeys
|
|
4497
|
-
? Object.getOwnPropertyNames(obj)
|
|
4498
|
-
: Object.keys(obj);
|
|
4490
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
4499
4491
|
const len = keys.length;
|
|
4500
4492
|
let key;
|
|
4501
4493
|
|
|
@@ -4507,7 +4499,7 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
4507
4499
|
}
|
|
4508
4500
|
|
|
4509
4501
|
function findKey(obj, key) {
|
|
4510
|
-
if (isBuffer(obj))
|
|
4502
|
+
if (isBuffer(obj)){
|
|
4511
4503
|
return null;
|
|
4512
4504
|
}
|
|
4513
4505
|
|
|
@@ -4527,15 +4519,10 @@ function findKey(obj, key) {
|
|
|
4527
4519
|
const _global = (() => {
|
|
4528
4520
|
/*eslint no-undef:0*/
|
|
4529
4521
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
4530
|
-
return typeof self !== "undefined"
|
|
4531
|
-
? self
|
|
4532
|
-
: typeof window !== "undefined"
|
|
4533
|
-
? window
|
|
4534
|
-
: global;
|
|
4522
|
+
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
|
|
4535
4523
|
})();
|
|
4536
4524
|
|
|
4537
|
-
const isContextDefined = (context) =>
|
|
4538
|
-
!isUndefined(context) && context !== _global;
|
|
4525
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
4539
4526
|
|
|
4540
4527
|
/**
|
|
4541
4528
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -4547,7 +4534,7 @@ const isContextDefined = (context) =>
|
|
|
4547
4534
|
* Example:
|
|
4548
4535
|
*
|
|
4549
4536
|
* ```js
|
|
4550
|
-
*
|
|
4537
|
+
* var result = merge({foo: 123}, {foo: 456});
|
|
4551
4538
|
* console.log(result.foo); // outputs 456
|
|
4552
4539
|
* ```
|
|
4553
4540
|
*
|
|
@@ -4556,15 +4543,10 @@ const isContextDefined = (context) =>
|
|
|
4556
4543
|
* @returns {Object} Result of all merge properties
|
|
4557
4544
|
*/
|
|
4558
4545
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
4559
|
-
const {
|
|
4546
|
+
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
4560
4547
|
const result = {};
|
|
4561
4548
|
const assignValue = (val, key) => {
|
|
4562
|
-
|
|
4563
|
-
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
4564
|
-
return;
|
|
4565
|
-
}
|
|
4566
|
-
|
|
4567
|
-
const targetKey = (caseless && findKey(result, key)) || key;
|
|
4549
|
+
const targetKey = caseless && findKey(result, key) || key;
|
|
4568
4550
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
4569
4551
|
result[targetKey] = merge(result[targetKey], val);
|
|
4570
4552
|
} else if (isPlainObject(val)) {
|
|
@@ -4589,32 +4571,17 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
4589
4571
|
* @param {Object} b The object to copy properties from
|
|
4590
4572
|
* @param {Object} thisArg The object to bind function to
|
|
4591
4573
|
*
|
|
4592
|
-
* @param {
|
|
4593
|
-
* @param {Boolean} [options.allOwnKeys]
|
|
4574
|
+
* @param {Boolean} [allOwnKeys]
|
|
4594
4575
|
* @returns {Object} The resulting value of object a
|
|
4595
4576
|
*/
|
|
4596
|
-
const extend = (a, b, thisArg, {
|
|
4597
|
-
forEach(
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
enumerable: true,
|
|
4605
|
-
configurable: true,
|
|
4606
|
-
});
|
|
4607
|
-
} else {
|
|
4608
|
-
Object.defineProperty(a, key, {
|
|
4609
|
-
value: val,
|
|
4610
|
-
writable: true,
|
|
4611
|
-
enumerable: true,
|
|
4612
|
-
configurable: true,
|
|
4613
|
-
});
|
|
4614
|
-
}
|
|
4615
|
-
},
|
|
4616
|
-
{ allOwnKeys },
|
|
4617
|
-
);
|
|
4577
|
+
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
4578
|
+
forEach(b, (val, key) => {
|
|
4579
|
+
if (thisArg && isFunction$1(val)) {
|
|
4580
|
+
a[key] = bind(val, thisArg);
|
|
4581
|
+
} else {
|
|
4582
|
+
a[key] = val;
|
|
4583
|
+
}
|
|
4584
|
+
}, {allOwnKeys});
|
|
4618
4585
|
return a;
|
|
4619
4586
|
};
|
|
4620
4587
|
|
|
@@ -4626,7 +4593,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
4626
4593
|
* @returns {string} content value without BOM
|
|
4627
4594
|
*/
|
|
4628
4595
|
const stripBOM = (content) => {
|
|
4629
|
-
if (content.charCodeAt(0) ===
|
|
4596
|
+
if (content.charCodeAt(0) === 0xFEFF) {
|
|
4630
4597
|
content = content.slice(1);
|
|
4631
4598
|
}
|
|
4632
4599
|
return content;
|
|
@@ -4642,18 +4609,10 @@ const stripBOM = (content) => {
|
|
|
4642
4609
|
* @returns {void}
|
|
4643
4610
|
*/
|
|
4644
4611
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
4645
|
-
constructor.prototype = Object.create(
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
Object.defineProperty(constructor.prototype, "constructor", {
|
|
4650
|
-
value: constructor,
|
|
4651
|
-
writable: true,
|
|
4652
|
-
enumerable: false,
|
|
4653
|
-
configurable: true,
|
|
4654
|
-
});
|
|
4655
|
-
Object.defineProperty(constructor, "super", {
|
|
4656
|
-
value: superConstructor.prototype,
|
|
4612
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
4613
|
+
constructor.prototype.constructor = constructor;
|
|
4614
|
+
Object.defineProperty(constructor, 'super', {
|
|
4615
|
+
value: superConstructor.prototype
|
|
4657
4616
|
});
|
|
4658
4617
|
props && Object.assign(constructor.prototype, props);
|
|
4659
4618
|
};
|
|
@@ -4682,20 +4641,13 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
|
4682
4641
|
i = props.length;
|
|
4683
4642
|
while (i-- > 0) {
|
|
4684
4643
|
prop = props[i];
|
|
4685
|
-
if (
|
|
4686
|
-
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
4687
|
-
!merged[prop]
|
|
4688
|
-
) {
|
|
4644
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
4689
4645
|
destObj[prop] = sourceObj[prop];
|
|
4690
4646
|
merged[prop] = true;
|
|
4691
4647
|
}
|
|
4692
4648
|
}
|
|
4693
4649
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
4694
|
-
} while (
|
|
4695
|
-
sourceObj &&
|
|
4696
|
-
(!filter || filter(sourceObj, destObj)) &&
|
|
4697
|
-
sourceObj !== Object.prototype
|
|
4698
|
-
);
|
|
4650
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
4699
4651
|
|
|
4700
4652
|
return destObj;
|
|
4701
4653
|
};
|
|
@@ -4719,6 +4671,7 @@ const endsWith = (str, searchString, position) => {
|
|
|
4719
4671
|
return lastIndex !== -1 && lastIndex === position;
|
|
4720
4672
|
};
|
|
4721
4673
|
|
|
4674
|
+
|
|
4722
4675
|
/**
|
|
4723
4676
|
* Returns new array from array like object or null if failed
|
|
4724
4677
|
*
|
|
@@ -4747,12 +4700,12 @@ const toArray = (thing) => {
|
|
|
4747
4700
|
* @returns {Array}
|
|
4748
4701
|
*/
|
|
4749
4702
|
// eslint-disable-next-line func-names
|
|
4750
|
-
const isTypedArray = (
|
|
4703
|
+
const isTypedArray = (TypedArray => {
|
|
4751
4704
|
// eslint-disable-next-line func-names
|
|
4752
|
-
return
|
|
4705
|
+
return thing => {
|
|
4753
4706
|
return TypedArray && thing instanceof TypedArray;
|
|
4754
4707
|
};
|
|
4755
|
-
})(typeof Uint8Array !==
|
|
4708
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
4756
4709
|
|
|
4757
4710
|
/**
|
|
4758
4711
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -4795,22 +4748,18 @@ const matchAll = (regExp, str) => {
|
|
|
4795
4748
|
};
|
|
4796
4749
|
|
|
4797
4750
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
4798
|
-
const isHTMLForm = kindOfTest(
|
|
4751
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
4799
4752
|
|
|
4800
|
-
const toCamelCase =
|
|
4801
|
-
return str
|
|
4802
|
-
|
|
4803
|
-
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
4753
|
+
const toCamelCase = str => {
|
|
4754
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
4755
|
+
function replacer(m, p1, p2) {
|
|
4804
4756
|
return p1.toUpperCase() + p2;
|
|
4805
|
-
}
|
|
4757
|
+
}
|
|
4758
|
+
);
|
|
4806
4759
|
};
|
|
4807
4760
|
|
|
4808
4761
|
/* Creating a function that will check if an object has a property. */
|
|
4809
|
-
const hasOwnProperty = (
|
|
4810
|
-
({ hasOwnProperty }) =>
|
|
4811
|
-
(obj, prop) =>
|
|
4812
|
-
hasOwnProperty.call(obj, prop)
|
|
4813
|
-
)(Object.prototype);
|
|
4762
|
+
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
4814
4763
|
|
|
4815
4764
|
/**
|
|
4816
4765
|
* Determine if a value is a RegExp object
|
|
@@ -4819,7 +4768,7 @@ const hasOwnProperty = (
|
|
|
4819
4768
|
*
|
|
4820
4769
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
4821
4770
|
*/
|
|
4822
|
-
const isRegExp = kindOfTest(
|
|
4771
|
+
const isRegExp = kindOfTest('RegExp');
|
|
4823
4772
|
|
|
4824
4773
|
const reduceDescriptors = (obj, reducer) => {
|
|
4825
4774
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -4843,10 +4792,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
4843
4792
|
const freezeMethods = (obj) => {
|
|
4844
4793
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
4845
4794
|
// skip restricted props in strict mode
|
|
4846
|
-
if (
|
|
4847
|
-
isFunction$1(obj) &&
|
|
4848
|
-
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
4849
|
-
) {
|
|
4795
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
4850
4796
|
return false;
|
|
4851
4797
|
}
|
|
4852
4798
|
|
|
@@ -4856,14 +4802,14 @@ const freezeMethods = (obj) => {
|
|
|
4856
4802
|
|
|
4857
4803
|
descriptor.enumerable = false;
|
|
4858
4804
|
|
|
4859
|
-
if (
|
|
4805
|
+
if ('writable' in descriptor) {
|
|
4860
4806
|
descriptor.writable = false;
|
|
4861
4807
|
return;
|
|
4862
4808
|
}
|
|
4863
4809
|
|
|
4864
4810
|
if (!descriptor.set) {
|
|
4865
4811
|
descriptor.set = () => {
|
|
4866
|
-
throw Error(
|
|
4812
|
+
throw Error('Can not rewrite read-only method \'' + name + '\'');
|
|
4867
4813
|
};
|
|
4868
4814
|
}
|
|
4869
4815
|
});
|
|
@@ -4873,14 +4819,12 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
4873
4819
|
const obj = {};
|
|
4874
4820
|
|
|
4875
4821
|
const define = (arr) => {
|
|
4876
|
-
arr.forEach(
|
|
4822
|
+
arr.forEach(value => {
|
|
4877
4823
|
obj[value] = true;
|
|
4878
4824
|
});
|
|
4879
4825
|
};
|
|
4880
4826
|
|
|
4881
|
-
isArray(arrayOrString)
|
|
4882
|
-
? define(arrayOrString)
|
|
4883
|
-
: define(String(arrayOrString).split(delimiter));
|
|
4827
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
4884
4828
|
|
|
4885
4829
|
return obj;
|
|
4886
4830
|
};
|
|
@@ -4888,11 +4832,11 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
4888
4832
|
const noop = () => {};
|
|
4889
4833
|
|
|
4890
4834
|
const toFiniteNumber = (value, defaultValue) => {
|
|
4891
|
-
return value != null && Number.isFinite(
|
|
4892
|
-
? value
|
|
4893
|
-
: defaultValue;
|
|
4835
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
4894
4836
|
};
|
|
4895
4837
|
|
|
4838
|
+
|
|
4839
|
+
|
|
4896
4840
|
/**
|
|
4897
4841
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
4898
4842
|
*
|
|
@@ -4901,18 +4845,14 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
4901
4845
|
* @returns {boolean}
|
|
4902
4846
|
*/
|
|
4903
4847
|
function isSpecCompliantForm(thing) {
|
|
4904
|
-
return !!(
|
|
4905
|
-
thing &&
|
|
4906
|
-
isFunction$1(thing.append) &&
|
|
4907
|
-
thing[toStringTag] === "FormData" &&
|
|
4908
|
-
thing[iterator]
|
|
4909
|
-
);
|
|
4848
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
4910
4849
|
}
|
|
4911
4850
|
|
|
4912
4851
|
const toJSONObject = (obj) => {
|
|
4913
4852
|
const stack = new Array(10);
|
|
4914
4853
|
|
|
4915
4854
|
const visit = (source, i) => {
|
|
4855
|
+
|
|
4916
4856
|
if (isObject(source)) {
|
|
4917
4857
|
if (stack.indexOf(source) >= 0) {
|
|
4918
4858
|
return;
|
|
@@ -4923,7 +4863,7 @@ const toJSONObject = (obj) => {
|
|
|
4923
4863
|
return source;
|
|
4924
4864
|
}
|
|
4925
4865
|
|
|
4926
|
-
if
|
|
4866
|
+
if(!('toJSON' in source)) {
|
|
4927
4867
|
stack[i] = source;
|
|
4928
4868
|
const target = isArray(source) ? [] : {};
|
|
4929
4869
|
|
|
@@ -4944,13 +4884,10 @@ const toJSONObject = (obj) => {
|
|
|
4944
4884
|
return visit(obj, 0);
|
|
4945
4885
|
};
|
|
4946
4886
|
|
|
4947
|
-
const isAsyncFn = kindOfTest(
|
|
4887
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
4948
4888
|
|
|
4949
4889
|
const isThenable = (thing) =>
|
|
4950
|
-
thing &&
|
|
4951
|
-
(isObject(thing) || isFunction$1(thing)) &&
|
|
4952
|
-
isFunction$1(thing.then) &&
|
|
4953
|
-
isFunction$1(thing.catch);
|
|
4890
|
+
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
4954
4891
|
|
|
4955
4892
|
// original code
|
|
4956
4893
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -4960,35 +4897,32 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
4960
4897
|
return setImmediate;
|
|
4961
4898
|
}
|
|
4962
4899
|
|
|
4963
|
-
return postMessageSupported
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
callbacks.length && callbacks.shift()();
|
|
4970
|
-
}
|
|
4971
|
-
},
|
|
4972
|
-
false,
|
|
4973
|
-
);
|
|
4900
|
+
return postMessageSupported ? ((token, callbacks) => {
|
|
4901
|
+
_global.addEventListener("message", ({source, data}) => {
|
|
4902
|
+
if (source === _global && data === token) {
|
|
4903
|
+
callbacks.length && callbacks.shift()();
|
|
4904
|
+
}
|
|
4905
|
+
}, false);
|
|
4974
4906
|
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4907
|
+
return (cb) => {
|
|
4908
|
+
callbacks.push(cb);
|
|
4909
|
+
_global.postMessage(token, "*");
|
|
4910
|
+
}
|
|
4911
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
4912
|
+
})(
|
|
4913
|
+
typeof setImmediate === 'function',
|
|
4914
|
+
isFunction$1(_global.postMessage)
|
|
4915
|
+
);
|
|
4982
4916
|
|
|
4983
|
-
const asap =
|
|
4984
|
-
typeof
|
|
4985
|
-
? queueMicrotask.bind(_global)
|
|
4986
|
-
: (typeof process !== "undefined" && process.nextTick) || _setImmediate;
|
|
4917
|
+
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
4918
|
+
queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
|
|
4987
4919
|
|
|
4988
4920
|
// *********************
|
|
4989
4921
|
|
|
4922
|
+
|
|
4990
4923
|
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
4991
4924
|
|
|
4925
|
+
|
|
4992
4926
|
var utils$1 = {
|
|
4993
4927
|
isArray,
|
|
4994
4928
|
isArrayBuffer,
|
|
@@ -5046,76 +4980,113 @@ var utils$1 = {
|
|
|
5046
4980
|
isThenable,
|
|
5047
4981
|
setImmediate: _setImmediate,
|
|
5048
4982
|
asap,
|
|
5049
|
-
isIterable
|
|
4983
|
+
isIterable
|
|
5050
4984
|
};
|
|
5051
4985
|
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
4986
|
+
/**
|
|
4987
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
4988
|
+
*
|
|
4989
|
+
* @param {string} message The error message.
|
|
4990
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
4991
|
+
* @param {Object} [config] The config.
|
|
4992
|
+
* @param {Object} [request] The request.
|
|
4993
|
+
* @param {Object} [response] The response.
|
|
4994
|
+
*
|
|
4995
|
+
* @returns {Error} The created error.
|
|
4996
|
+
*/
|
|
4997
|
+
function AxiosError$1(message, code, config, request, response) {
|
|
4998
|
+
Error.call(this);
|
|
5060
4999
|
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5000
|
+
if (Error.captureStackTrace) {
|
|
5001
|
+
Error.captureStackTrace(this, this.constructor);
|
|
5002
|
+
} else {
|
|
5003
|
+
this.stack = (new Error()).stack;
|
|
5004
|
+
}
|
|
5005
|
+
|
|
5006
|
+
this.message = message;
|
|
5007
|
+
this.name = 'AxiosError';
|
|
5008
|
+
code && (this.code = code);
|
|
5009
|
+
config && (this.config = config);
|
|
5010
|
+
request && (this.request = request);
|
|
5011
|
+
if (response) {
|
|
5012
|
+
this.response = response;
|
|
5013
|
+
this.status = response.status ? response.status : null;
|
|
5014
|
+
}
|
|
5015
|
+
}
|
|
5016
|
+
|
|
5017
|
+
utils$1.inherits(AxiosError$1, Error, {
|
|
5018
|
+
toJSON: function toJSON() {
|
|
5019
|
+
return {
|
|
5020
|
+
// Standard
|
|
5021
|
+
message: this.message,
|
|
5022
|
+
name: this.name,
|
|
5023
|
+
// Microsoft
|
|
5024
|
+
description: this.description,
|
|
5025
|
+
number: this.number,
|
|
5026
|
+
// Mozilla
|
|
5027
|
+
fileName: this.fileName,
|
|
5028
|
+
lineNumber: this.lineNumber,
|
|
5029
|
+
columnNumber: this.columnNumber,
|
|
5030
|
+
stack: this.stack,
|
|
5031
|
+
// Axios
|
|
5032
|
+
config: utils$1.toJSONObject(this.config),
|
|
5033
|
+
code: this.code,
|
|
5034
|
+
status: this.status
|
|
5035
|
+
};
|
|
5036
|
+
}
|
|
5037
|
+
});
|
|
5038
|
+
|
|
5039
|
+
const prototype$1 = AxiosError$1.prototype;
|
|
5040
|
+
const descriptors = {};
|
|
5041
|
+
|
|
5042
|
+
[
|
|
5043
|
+
'ERR_BAD_OPTION_VALUE',
|
|
5044
|
+
'ERR_BAD_OPTION',
|
|
5045
|
+
'ECONNABORTED',
|
|
5046
|
+
'ETIMEDOUT',
|
|
5047
|
+
'ERR_NETWORK',
|
|
5048
|
+
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
5049
|
+
'ERR_DEPRECATED',
|
|
5050
|
+
'ERR_BAD_RESPONSE',
|
|
5051
|
+
'ERR_BAD_REQUEST',
|
|
5052
|
+
'ERR_CANCELED',
|
|
5053
|
+
'ERR_NOT_SUPPORT',
|
|
5054
|
+
'ERR_INVALID_URL'
|
|
5055
|
+
// eslint-disable-next-line func-names
|
|
5056
|
+
].forEach(code => {
|
|
5057
|
+
descriptors[code] = {value: code};
|
|
5058
|
+
});
|
|
5059
|
+
|
|
5060
|
+
Object.defineProperties(AxiosError$1, descriptors);
|
|
5061
|
+
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
5062
|
+
|
|
5063
|
+
// eslint-disable-next-line func-names
|
|
5064
|
+
AxiosError$1.from = (error, code, config, request, response, customProps) => {
|
|
5065
|
+
const axiosError = Object.create(prototype$1);
|
|
5066
|
+
|
|
5067
|
+
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
5068
|
+
return obj !== Error.prototype;
|
|
5069
|
+
}, prop => {
|
|
5070
|
+
return prop !== 'isAxiosError';
|
|
5071
|
+
});
|
|
5072
|
+
|
|
5073
|
+
const msg = error && error.message ? error.message : 'Error';
|
|
5074
|
+
|
|
5075
|
+
// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
|
|
5076
|
+
const errCode = code == null && error ? error.code : code;
|
|
5077
|
+
AxiosError$1.call(axiosError, msg, errCode, config, request, response);
|
|
5078
|
+
|
|
5079
|
+
// Chain the original error on the standard field; non-enumerable to avoid JSON noise
|
|
5080
|
+
if (error && axiosError.cause == null) {
|
|
5081
|
+
Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
|
|
5082
|
+
}
|
|
5083
|
+
|
|
5084
|
+
axiosError.name = (error && error.name) || 'Error';
|
|
5085
|
+
|
|
5086
|
+
customProps && Object.assign(axiosError, customProps);
|
|
5087
|
+
|
|
5088
|
+
return axiosError;
|
|
5089
|
+
};
|
|
5119
5090
|
|
|
5120
5091
|
// eslint-disable-next-line strict
|
|
5121
5092
|
var httpAdapter = null;
|
|
@@ -5414,26 +5385,29 @@ function encode(val) {
|
|
|
5414
5385
|
* @returns {string} The formatted url
|
|
5415
5386
|
*/
|
|
5416
5387
|
function buildURL(url, params, options) {
|
|
5388
|
+
/*eslint no-param-reassign:0*/
|
|
5417
5389
|
if (!params) {
|
|
5418
5390
|
return url;
|
|
5419
5391
|
}
|
|
5420
|
-
|
|
5392
|
+
|
|
5421
5393
|
const _encode = options && options.encode || encode;
|
|
5422
5394
|
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5395
|
+
if (utils$1.isFunction(options)) {
|
|
5396
|
+
options = {
|
|
5397
|
+
serialize: options
|
|
5398
|
+
};
|
|
5399
|
+
}
|
|
5426
5400
|
|
|
5427
|
-
const serializeFn =
|
|
5401
|
+
const serializeFn = options && options.serialize;
|
|
5428
5402
|
|
|
5429
5403
|
let serializedParams;
|
|
5430
5404
|
|
|
5431
5405
|
if (serializeFn) {
|
|
5432
|
-
serializedParams = serializeFn(params,
|
|
5406
|
+
serializedParams = serializeFn(params, options);
|
|
5433
5407
|
} else {
|
|
5434
5408
|
serializedParams = utils$1.isURLSearchParams(params) ?
|
|
5435
5409
|
params.toString() :
|
|
5436
|
-
new AxiosURLSearchParams(params,
|
|
5410
|
+
new AxiosURLSearchParams(params, options).toString(_encode);
|
|
5437
5411
|
}
|
|
5438
5412
|
|
|
5439
5413
|
if (serializedParams) {
|
|
@@ -5458,7 +5432,6 @@ class InterceptorManager {
|
|
|
5458
5432
|
*
|
|
5459
5433
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
5460
5434
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
5461
|
-
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
5462
5435
|
*
|
|
5463
5436
|
* @return {Number} An ID used to remove interceptor later
|
|
5464
5437
|
*/
|
|
@@ -5518,8 +5491,7 @@ class InterceptorManager {
|
|
|
5518
5491
|
var transitionalDefaults = {
|
|
5519
5492
|
silentJSONParsing: true,
|
|
5520
5493
|
forcedJSONParsing: true,
|
|
5521
|
-
clarifyTimeoutError: false
|
|
5522
|
-
legacyInterceptorReqResOrdering: true
|
|
5494
|
+
clarifyTimeoutError: false
|
|
5523
5495
|
};
|
|
5524
5496
|
|
|
5525
5497
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -6237,22 +6209,24 @@ function isCancel$1(value) {
|
|
|
6237
6209
|
return !!(value && value.__CANCEL__);
|
|
6238
6210
|
}
|
|
6239
6211
|
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6212
|
+
/**
|
|
6213
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
6214
|
+
*
|
|
6215
|
+
* @param {string=} message The message.
|
|
6216
|
+
* @param {Object=} config The config.
|
|
6217
|
+
* @param {Object=} request The request.
|
|
6218
|
+
*
|
|
6219
|
+
* @returns {CanceledError} The created error.
|
|
6220
|
+
*/
|
|
6221
|
+
function CanceledError$1(message, config, request) {
|
|
6222
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
6223
|
+
AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
|
|
6224
|
+
this.name = 'CanceledError';
|
|
6225
|
+
}
|
|
6226
|
+
|
|
6227
|
+
utils$1.inherits(CanceledError$1, AxiosError$1, {
|
|
6228
|
+
__CANCEL__: true
|
|
6229
|
+
});
|
|
6256
6230
|
|
|
6257
6231
|
/**
|
|
6258
6232
|
* Resolve or reject a Promise based on response status.
|
|
@@ -6493,10 +6467,6 @@ function isAbsoluteURL(url) {
|
|
|
6493
6467
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
6494
6468
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
6495
6469
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
6496
|
-
if (typeof url !== 'string') {
|
|
6497
|
-
return false;
|
|
6498
|
-
}
|
|
6499
|
-
|
|
6500
6470
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
6501
6471
|
}
|
|
6502
6472
|
|
|
@@ -6532,8 +6502,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
6532
6502
|
return requestedURL;
|
|
6533
6503
|
}
|
|
6534
6504
|
|
|
6535
|
-
const headersToObject = (thing) =>
|
|
6536
|
-
thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
6505
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
6537
6506
|
|
|
6538
6507
|
/**
|
|
6539
6508
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -6551,7 +6520,7 @@ function mergeConfig$1(config1, config2) {
|
|
|
6551
6520
|
|
|
6552
6521
|
function getMergedValue(target, source, prop, caseless) {
|
|
6553
6522
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
6554
|
-
return utils$1.merge.call({
|
|
6523
|
+
return utils$1.merge.call({caseless}, target, source);
|
|
6555
6524
|
} else if (utils$1.isPlainObject(source)) {
|
|
6556
6525
|
return utils$1.merge({}, source);
|
|
6557
6526
|
} else if (utils$1.isArray(source)) {
|
|
@@ -6560,6 +6529,7 @@ function mergeConfig$1(config1, config2) {
|
|
|
6560
6529
|
return source;
|
|
6561
6530
|
}
|
|
6562
6531
|
|
|
6532
|
+
// eslint-disable-next-line consistent-return
|
|
6563
6533
|
function mergeDeepProperties(a, b, prop, caseless) {
|
|
6564
6534
|
if (!utils$1.isUndefined(b)) {
|
|
6565
6535
|
return getMergedValue(a, b, prop, caseless);
|
|
@@ -6622,27 +6592,14 @@ function mergeConfig$1(config1, config2) {
|
|
|
6622
6592
|
socketPath: defaultToConfig2,
|
|
6623
6593
|
responseEncoding: defaultToConfig2,
|
|
6624
6594
|
validateStatus: mergeDirectKeys,
|
|
6625
|
-
headers: (a, b, prop) =>
|
|
6626
|
-
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
6595
|
+
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
6627
6596
|
};
|
|
6628
6597
|
|
|
6629
|
-
utils$1.forEach(
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
prop === "constructor" ||
|
|
6635
|
-
prop === "prototype"
|
|
6636
|
-
)
|
|
6637
|
-
return;
|
|
6638
|
-
const merge = utils$1.hasOwnProp(mergeMap, prop)
|
|
6639
|
-
? mergeMap[prop]
|
|
6640
|
-
: mergeDeepProperties;
|
|
6641
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
6642
|
-
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
6643
|
-
(config[prop] = configValue);
|
|
6644
|
-
},
|
|
6645
|
-
);
|
|
6598
|
+
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
|
6599
|
+
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
6600
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
6601
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
6602
|
+
});
|
|
6646
6603
|
|
|
6647
6604
|
return config;
|
|
6648
6605
|
}
|
|
@@ -6908,7 +6865,7 @@ const composeSignals = (signals, timeout) => {
|
|
|
6908
6865
|
|
|
6909
6866
|
let timer = timeout && setTimeout(() => {
|
|
6910
6867
|
timer = null;
|
|
6911
|
-
onabort(new AxiosError$1(`timeout
|
|
6868
|
+
onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
6912
6869
|
}, timeout);
|
|
6913
6870
|
|
|
6914
6871
|
const unsubscribe = () => {
|
|
@@ -7258,14 +7215,14 @@ const factory = (env) => {
|
|
|
7258
7215
|
|
|
7259
7216
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
7260
7217
|
throw Object.assign(
|
|
7261
|
-
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request
|
|
7218
|
+
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
|
7262
7219
|
{
|
|
7263
7220
|
cause: err.cause || err
|
|
7264
7221
|
}
|
|
7265
7222
|
)
|
|
7266
7223
|
}
|
|
7267
7224
|
|
|
7268
|
-
throw AxiosError$1.from(err, err && err.code, config, request
|
|
7225
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
|
7269
7226
|
}
|
|
7270
7227
|
}
|
|
7271
7228
|
};
|
|
@@ -7490,7 +7447,7 @@ function dispatchRequest(config) {
|
|
|
7490
7447
|
});
|
|
7491
7448
|
}
|
|
7492
7449
|
|
|
7493
|
-
const VERSION$1 = "1.13.
|
|
7450
|
+
const VERSION$1 = "1.13.2";
|
|
7494
7451
|
|
|
7495
7452
|
const validators$1 = {};
|
|
7496
7453
|
|
|
@@ -7658,8 +7615,7 @@ let Axios$1 = class Axios {
|
|
|
7658
7615
|
validator.assertOptions(transitional, {
|
|
7659
7616
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
7660
7617
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
7661
|
-
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
7662
|
-
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
7618
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
7663
7619
|
}, false);
|
|
7664
7620
|
}
|
|
7665
7621
|
|
|
@@ -7716,14 +7672,7 @@ let Axios$1 = class Axios {
|
|
|
7716
7672
|
|
|
7717
7673
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
7718
7674
|
|
|
7719
|
-
|
|
7720
|
-
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
|
|
7721
|
-
|
|
7722
|
-
if (legacyInterceptorReqResOrdering) {
|
|
7723
|
-
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
7724
|
-
} else {
|
|
7725
|
-
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
7726
|
-
}
|
|
7675
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
7727
7676
|
});
|
|
7728
7677
|
|
|
7729
7678
|
const responseInterceptorChain = [];
|
|
@@ -7958,7 +7907,7 @@ let CancelToken$1 = class CancelToken {
|
|
|
7958
7907
|
*
|
|
7959
7908
|
* ```js
|
|
7960
7909
|
* function f(x, y, z) {}
|
|
7961
|
-
*
|
|
7910
|
+
* var args = [1, 2, 3];
|
|
7962
7911
|
* f.apply(null, args);
|
|
7963
7912
|
* ```
|
|
7964
7913
|
*
|
|
@@ -57863,16 +57812,14 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
57863
57812
|
const [account] = await this.wallet.getAccounts();
|
|
57864
57813
|
const player = account.address;
|
|
57865
57814
|
// Create the message object (action index is calculated by the keeper)
|
|
57815
|
+
// data must be in the initial object for Protobuf serialization
|
|
57866
57816
|
const msgPerformAction = {
|
|
57867
57817
|
player,
|
|
57868
57818
|
gameId,
|
|
57869
57819
|
action,
|
|
57870
|
-
amount: Long.fromString(amount.toString(), true)
|
|
57820
|
+
amount: Long.fromString(amount.toString(), true),
|
|
57821
|
+
data: data || ""
|
|
57871
57822
|
};
|
|
57872
|
-
// Add optional data field if provided (e.g., entropy for deal)
|
|
57873
|
-
if (data) {
|
|
57874
|
-
msgPerformAction.data = data;
|
|
57875
|
-
}
|
|
57876
57823
|
// Create the transaction message
|
|
57877
57824
|
const msg = {
|
|
57878
57825
|
typeUrl: "/pokerchain.poker.v1.MsgPerformAction",
|