diff --git a/lib/js/packages/reef-mobile-js/dist/index.js b/lib/js/packages/reef-mobile-js/dist/index.js index 6f9de4b8..521d540f 100644 --- a/lib/js/packages/reef-mobile-js/dist/index.js +++ b/lib/js/packages/reef-mobile-js/dist/index.js @@ -3080,15 +3080,15 @@ ErrorCode2["ACTION_REJECTED"] = "ACTION_REJECTED"; })(ErrorCode = exports2.ErrorCode || (exports2.ErrorCode = {})); var HEX = "0123456789abcdef"; - var Logger46 = function() { - function Logger47(version27) { + var Logger42 = function() { + function Logger43(version23) { Object.defineProperty(this, "version", { enumerable: true, - value: version27, + value: version23, writable: false }); } - Logger47.prototype._log = function(logLevel, args) { + Logger43.prototype._log = function(logLevel, args) { var level = logLevel.toLowerCase(); if (LogLevels[level] == null) { this.throwArgumentError("invalid log level name", "logLevel", logLevel); @@ -3098,33 +3098,33 @@ } console.log.apply(console, args); }; - Logger47.prototype.debug = function() { + Logger43.prototype.debug = function() { var args = []; for (var _i2 = 0; _i2 < arguments.length; _i2++) { args[_i2] = arguments[_i2]; } - this._log(Logger47.levels.DEBUG, args); + this._log(Logger43.levels.DEBUG, args); }; - Logger47.prototype.info = function() { + Logger43.prototype.info = function() { var args = []; for (var _i2 = 0; _i2 < arguments.length; _i2++) { args[_i2] = arguments[_i2]; } - this._log(Logger47.levels.INFO, args); + this._log(Logger43.levels.INFO, args); }; - Logger47.prototype.warn = function() { + Logger43.prototype.warn = function() { var args = []; for (var _i2 = 0; _i2 < arguments.length; _i2++) { args[_i2] = arguments[_i2]; } - this._log(Logger47.levels.WARNING, args); + this._log(Logger43.levels.WARNING, args); }; - Logger47.prototype.makeError = function(message, code, params) { + Logger43.prototype.makeError = function(message, code, params) { if (_censorErrors) { return this.makeError("censored error", code, {}); } if (!code) { - code = Logger47.errors.UNKNOWN_ERROR; + code = Logger43.errors.UNKNOWN_ERROR; } if (!params) { params = {}; @@ -3195,39 +3195,39 @@ }); return error; }; - Logger47.prototype.throwError = function(message, code, params) { + Logger43.prototype.throwError = function(message, code, params) { throw this.makeError(message, code, params); }; - Logger47.prototype.throwArgumentError = function(message, name6, value) { - return this.throwError(message, Logger47.errors.INVALID_ARGUMENT, { + Logger43.prototype.throwArgumentError = function(message, name6, value) { + return this.throwError(message, Logger43.errors.INVALID_ARGUMENT, { argument: name6, value }); }; - Logger47.prototype.assert = function(condition, message, code, params) { + Logger43.prototype.assert = function(condition, message, code, params) { if (!!condition) { return; } this.throwError(message, code, params); }; - Logger47.prototype.assertArgument = function(condition, message, name6, value) { + Logger43.prototype.assertArgument = function(condition, message, name6, value) { if (!!condition) { return; } this.throwArgumentError(message, name6, value); }; - Logger47.prototype.checkNormalize = function(message) { + Logger43.prototype.checkNormalize = function(message) { if (message == null) { message = "platform missing String.prototype.normalize"; } if (_normalizeError) { - this.throwError("platform missing String.prototype.normalize", Logger47.errors.UNSUPPORTED_OPERATION, { + this.throwError("platform missing String.prototype.normalize", Logger43.errors.UNSUPPORTED_OPERATION, { operation: "String.prototype.normalize", form: _normalizeError }); } }; - Logger47.prototype.checkSafeUint53 = function(value, message) { + Logger43.prototype.checkSafeUint53 = function(value, message) { if (typeof value !== "number") { return; } @@ -3235,60 +3235,60 @@ message = "value not safe"; } if (value < 0 || value >= 9007199254740991) { - this.throwError(message, Logger47.errors.NUMERIC_FAULT, { + this.throwError(message, Logger43.errors.NUMERIC_FAULT, { operation: "checkSafeInteger", fault: "out-of-safe-range", value }); } if (value % 1) { - this.throwError(message, Logger47.errors.NUMERIC_FAULT, { + this.throwError(message, Logger43.errors.NUMERIC_FAULT, { operation: "checkSafeInteger", fault: "non-integer", value }); } }; - Logger47.prototype.checkArgumentCount = function(count, expectedCount, message) { + Logger43.prototype.checkArgumentCount = function(count, expectedCount, message) { if (message) { message = ": " + message; } else { message = ""; } if (count < expectedCount) { - this.throwError("missing argument" + message, Logger47.errors.MISSING_ARGUMENT, { + this.throwError("missing argument" + message, Logger43.errors.MISSING_ARGUMENT, { count, expectedCount }); } if (count > expectedCount) { - this.throwError("too many arguments" + message, Logger47.errors.UNEXPECTED_ARGUMENT, { + this.throwError("too many arguments" + message, Logger43.errors.UNEXPECTED_ARGUMENT, { count, expectedCount }); } }; - Logger47.prototype.checkNew = function(target, kind) { + Logger43.prototype.checkNew = function(target, kind) { if (target === Object || target == null) { - this.throwError("missing new", Logger47.errors.MISSING_NEW, { name: kind.name }); + this.throwError("missing new", Logger43.errors.MISSING_NEW, { name: kind.name }); } }; - Logger47.prototype.checkAbstract = function(target, kind) { + Logger43.prototype.checkAbstract = function(target, kind) { if (target === kind) { - this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", Logger47.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" }); + this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", Logger43.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" }); } else if (target === Object || target == null) { - this.throwError("missing new", Logger47.errors.MISSING_NEW, { name: kind.name }); + this.throwError("missing new", Logger43.errors.MISSING_NEW, { name: kind.name }); } }; - Logger47.globalLogger = function() { + Logger43.globalLogger = function() { if (!_globalLogger) { - _globalLogger = new Logger47(_version_1.version); + _globalLogger = new Logger43(_version_1.version); } return _globalLogger; }; - Logger47.setCensorship = function(censorship, permanent) { + Logger43.setCensorship = function(censorship, permanent) { if (!censorship && permanent) { - this.globalLogger().throwError("cannot permanently disable censorship", Logger47.errors.UNSUPPORTED_OPERATION, { + this.globalLogger().throwError("cannot permanently disable censorship", Logger43.errors.UNSUPPORTED_OPERATION, { operation: "setCensorship" }); } @@ -3296,29 +3296,29 @@ if (!censorship) { return; } - this.globalLogger().throwError("error censorship permanent", Logger47.errors.UNSUPPORTED_OPERATION, { + this.globalLogger().throwError("error censorship permanent", Logger43.errors.UNSUPPORTED_OPERATION, { operation: "setCensorship" }); } _censorErrors = !!censorship; _permanentCensorErrors = !!permanent; }; - Logger47.setLogLevel = function(logLevel) { + Logger43.setLogLevel = function(logLevel) { var level = LogLevels[logLevel.toLowerCase()]; if (level == null) { - Logger47.globalLogger().warn("invalid log level - " + logLevel); + Logger43.globalLogger().warn("invalid log level - " + logLevel); return; } _logLevel = level; }; - Logger47.from = function(version27) { - return new Logger47(version27); + Logger43.from = function(version23) { + return new Logger43(version23); }; - Logger47.errors = ErrorCode; - Logger47.levels = LogLevel2; - return Logger47; + Logger43.errors = ErrorCode; + Logger43.levels = LogLevel2; + return Logger43; }(); - exports2.Logger = Logger46; + exports2.Logger = Logger42; } }); @@ -3340,7 +3340,7 @@ exports2.joinSignature = exports2.splitSignature = exports2.hexZeroPad = exports2.hexStripZeros = exports2.hexValue = exports2.hexConcat = exports2.hexDataSlice = exports2.hexDataLength = exports2.hexlify = exports2.isHexString = exports2.zeroPad = exports2.stripZeros = exports2.concat = exports2.arrayify = exports2.isBytes = exports2.isBytesLike = void 0; var logger_1 = require_lib(); var _version_1 = require_version2(); - var logger46 = new logger_1.Logger(_version_1.version); + var logger42 = new logger_1.Logger(_version_1.version); function isHexable(value) { return !!value.toHexString; } @@ -3354,10 +3354,10 @@ }; return array; } - function isBytesLike5(value) { - return isHexString12(value) && !(value.length % 2) || isBytes8(value); + function isBytesLike4(value) { + return isHexString11(value) && !(value.length % 2) || isBytes8(value); } - exports2.isBytesLike = isBytesLike5; + exports2.isBytesLike = isBytesLike4; function isInteger(value) { return typeof value === "number" && value == value && value % 1 === 0; } @@ -3383,12 +3383,12 @@ return true; } exports2.isBytes = isBytes8; - function arrayify27(value, options) { + function arrayify24(value, options) { if (!options) { options = {}; } if (typeof value === "number") { - logger46.checkSafeUint53(value, "invalid arrayify value"); + logger42.checkSafeUint53(value, "invalid arrayify value"); var result = []; while (value) { result.unshift(value & 255); @@ -3405,7 +3405,7 @@ if (isHexable(value)) { value = value.toHexString(); } - if (isHexString12(value)) { + if (isHexString11(value)) { var hex8 = value.substring(2); if (hex8.length % 2) { if (options.hexPad === "left") { @@ -3413,7 +3413,7 @@ } else if (options.hexPad === "right") { hex8 += "0"; } else { - logger46.throwArgumentError("hex data is odd-length", "value", value); + logger42.throwArgumentError("hex data is odd-length", "value", value); } } var result = []; @@ -3425,12 +3425,12 @@ if (isBytes8(value)) { return addSlice(new Uint8Array(value)); } - return logger46.throwArgumentError("invalid arrayify value", "value", value); + return logger42.throwArgumentError("invalid arrayify value", "value", value); } - exports2.arrayify = arrayify27; - function concat13(items) { + exports2.arrayify = arrayify24; + function concat12(items) { var objects = items.map(function(item) { - return arrayify27(item); + return arrayify24(item); }); var length = objects.reduce(function(accum, item) { return accum + item.length; @@ -3442,9 +3442,9 @@ }, 0); return addSlice(result); } - exports2.concat = concat13; - function stripZeros4(value) { - var result = arrayify27(value); + exports2.concat = concat12; + function stripZeros3(value) { + var result = arrayify24(value); if (result.length === 0) { return result; } @@ -3457,18 +3457,18 @@ } return result; } - exports2.stripZeros = stripZeros4; + exports2.stripZeros = stripZeros3; function zeroPad4(value, length) { - value = arrayify27(value); + value = arrayify24(value); if (value.length > length) { - logger46.throwArgumentError("value out of range", "value", arguments[0]); + logger42.throwArgumentError("value out of range", "value", arguments[0]); } var result = new Uint8Array(length); result.set(value, length - value.length); return addSlice(result); } exports2.zeroPad = zeroPad4; - function isHexString12(value, length) { + function isHexString11(value, length) { if (typeof value !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) { return false; } @@ -3477,14 +3477,14 @@ } return true; } - exports2.isHexString = isHexString12; + exports2.isHexString = isHexString11; var HexCharacters = "0123456789abcdef"; - function hexlify21(value, options) { + function hexlify20(value, options) { if (!options) { options = {}; } if (typeof value === "number") { - logger46.checkSafeUint53(value, "invalid hexlify value"); + logger42.checkSafeUint53(value, "invalid hexlify value"); var hex8 = ""; while (value) { hex8 = HexCharacters[value & 15] + hex8; @@ -3511,14 +3511,14 @@ if (isHexable(value)) { return value.toHexString(); } - if (isHexString12(value)) { + if (isHexString11(value)) { if (value.length % 2) { if (options.hexPad === "left") { value = "0x0" + value.substring(2); } else if (options.hexPad === "right") { value += "0"; } else { - logger46.throwArgumentError("hex data is odd-length", "value", value); + logger42.throwArgumentError("hex data is odd-length", "value", value); } } return value.toLowerCase(); @@ -3531,23 +3531,23 @@ } return result; } - return logger46.throwArgumentError("invalid hexlify value", "value", value); + return logger42.throwArgumentError("invalid hexlify value", "value", value); } - exports2.hexlify = hexlify21; - function hexDataLength7(data) { + exports2.hexlify = hexlify20; + function hexDataLength6(data) { if (typeof data !== "string") { - data = hexlify21(data); - } else if (!isHexString12(data) || data.length % 2) { + data = hexlify20(data); + } else if (!isHexString11(data) || data.length % 2) { return null; } return (data.length - 2) / 2; } - exports2.hexDataLength = hexDataLength7; - function hexDataSlice9(data, offset, endOffset) { + exports2.hexDataLength = hexDataLength6; + function hexDataSlice8(data, offset, endOffset) { if (typeof data !== "string") { - data = hexlify21(data); - } else if (!isHexString12(data) || data.length % 2) { - logger46.throwArgumentError("invalid hexData", "value", data); + data = hexlify20(data); + } else if (!isHexString11(data) || data.length % 2) { + logger42.throwArgumentError("invalid hexData", "value", data); } offset = 2 + 2 * offset; if (endOffset != null) { @@ -3555,17 +3555,17 @@ } return "0x" + data.substring(offset); } - exports2.hexDataSlice = hexDataSlice9; + exports2.hexDataSlice = hexDataSlice8; function hexConcat6(items) { var result = "0x"; items.forEach(function(item) { - result += hexlify21(item).substring(2); + result += hexlify20(item).substring(2); }); return result; } exports2.hexConcat = hexConcat6; function hexValue6(value) { - var trimmed = hexStripZeros2(hexlify21(value, { hexPad: "left" })); + var trimmed = hexStripZeros2(hexlify20(value, { hexPad: "left" })); if (trimmed === "0x") { return "0x0"; } @@ -3574,10 +3574,10 @@ exports2.hexValue = hexValue6; function hexStripZeros2(value) { if (typeof value !== "string") { - value = hexlify21(value); + value = hexlify20(value); } - if (!isHexString12(value)) { - logger46.throwArgumentError("invalid hex string", "value", value); + if (!isHexString11(value)) { + logger42.throwArgumentError("invalid hex string", "value", value); } value = value.substring(2); var offset = 0; @@ -3589,12 +3589,12 @@ exports2.hexStripZeros = hexStripZeros2; function hexZeroPad11(value, length) { if (typeof value !== "string") { - value = hexlify21(value); - } else if (!isHexString12(value)) { - logger46.throwArgumentError("invalid hex string", "value", value); + value = hexlify20(value); + } else if (!isHexString11(value)) { + logger42.throwArgumentError("invalid hex string", "value", value); } if (value.length > 2 * length + 2) { - logger46.throwArgumentError("value out of range", "value", arguments[1]); + logger42.throwArgumentError("value out of range", "value", arguments[1]); } while (value.length < 2 * length + 2) { value = "0x0" + value.substring(2); @@ -3612,32 +3612,32 @@ yParityAndS: "0x", compact: "0x" }; - if (isBytesLike5(signature2)) { - var bytes5 = arrayify27(signature2); + if (isBytesLike4(signature2)) { + var bytes5 = arrayify24(signature2); if (bytes5.length === 64) { result.v = 27 + (bytes5[32] >> 7); bytes5[32] &= 127; - result.r = hexlify21(bytes5.slice(0, 32)); - result.s = hexlify21(bytes5.slice(32, 64)); + result.r = hexlify20(bytes5.slice(0, 32)); + result.s = hexlify20(bytes5.slice(32, 64)); } else if (bytes5.length === 65) { - result.r = hexlify21(bytes5.slice(0, 32)); - result.s = hexlify21(bytes5.slice(32, 64)); + result.r = hexlify20(bytes5.slice(0, 32)); + result.s = hexlify20(bytes5.slice(32, 64)); result.v = bytes5[64]; } else { - logger46.throwArgumentError("invalid signature string", "signature", signature2); + logger42.throwArgumentError("invalid signature string", "signature", signature2); } if (result.v < 27) { if (result.v === 0 || result.v === 1) { result.v += 27; } else { - logger46.throwArgumentError("signature invalid v byte", "signature", signature2); + logger42.throwArgumentError("signature invalid v byte", "signature", signature2); } } result.recoveryParam = 1 - result.v % 2; if (result.recoveryParam) { bytes5[32] |= 128; } - result._vs = hexlify21(bytes5.slice(32, 64)); + result._vs = hexlify20(bytes5.slice(32, 64)); } else { result.r = signature2.r; result.s = signature2.s; @@ -3645,25 +3645,25 @@ result.recoveryParam = signature2.recoveryParam; result._vs = signature2._vs; if (result._vs != null) { - var vs_1 = zeroPad4(arrayify27(result._vs), 32); - result._vs = hexlify21(vs_1); + var vs_1 = zeroPad4(arrayify24(result._vs), 32); + result._vs = hexlify20(vs_1); var recoveryParam = vs_1[0] >= 128 ? 1 : 0; if (result.recoveryParam == null) { result.recoveryParam = recoveryParam; } else if (result.recoveryParam !== recoveryParam) { - logger46.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature2); + logger42.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature2); } vs_1[0] &= 127; - var s = hexlify21(vs_1); + var s = hexlify20(vs_1); if (result.s == null) { result.s = s; } else if (result.s !== s) { - logger46.throwArgumentError("signature v mismatch _vs", "signature", signature2); + logger42.throwArgumentError("signature v mismatch _vs", "signature", signature2); } } if (result.recoveryParam == null) { if (result.v == null) { - logger46.throwArgumentError("signature missing v and recoveryParam", "signature", signature2); + logger42.throwArgumentError("signature missing v and recoveryParam", "signature", signature2); } else if (result.v === 0 || result.v === 1) { result.recoveryParam = result.v; } else { @@ -3675,38 +3675,38 @@ } else { var recId = result.v === 0 || result.v === 1 ? result.v : 1 - result.v % 2; if (result.recoveryParam !== recId) { - logger46.throwArgumentError("signature recoveryParam mismatch v", "signature", signature2); + logger42.throwArgumentError("signature recoveryParam mismatch v", "signature", signature2); } } } - if (result.r == null || !isHexString12(result.r)) { - logger46.throwArgumentError("signature missing or invalid r", "signature", signature2); + if (result.r == null || !isHexString11(result.r)) { + logger42.throwArgumentError("signature missing or invalid r", "signature", signature2); } else { result.r = hexZeroPad11(result.r, 32); } - if (result.s == null || !isHexString12(result.s)) { - logger46.throwArgumentError("signature missing or invalid s", "signature", signature2); + if (result.s == null || !isHexString11(result.s)) { + logger42.throwArgumentError("signature missing or invalid s", "signature", signature2); } else { result.s = hexZeroPad11(result.s, 32); } - var vs2 = arrayify27(result.s); + var vs2 = arrayify24(result.s); if (vs2[0] >= 128) { - logger46.throwArgumentError("signature s out of range", "signature", signature2); + logger42.throwArgumentError("signature s out of range", "signature", signature2); } if (result.recoveryParam) { vs2[0] |= 128; } - var _vs = hexlify21(vs2); + var _vs = hexlify20(vs2); if (result._vs) { - if (!isHexString12(result._vs)) { - logger46.throwArgumentError("signature invalid _vs", "signature", signature2); + if (!isHexString11(result._vs)) { + logger42.throwArgumentError("signature invalid _vs", "signature", signature2); } result._vs = hexZeroPad11(result._vs, 32); } if (result._vs == null) { result._vs = _vs; } else if (result._vs !== _vs) { - logger46.throwArgumentError("signature _vs mismatch v and s", "signature", signature2); + logger42.throwArgumentError("signature _vs mismatch v and s", "signature", signature2); } } result.yParityAndS = result._vs; @@ -3716,7 +3716,7 @@ exports2.splitSignature = splitSignature4; function joinSignature3(signature2) { signature2 = splitSignature4(signature2); - return hexlify21(concat13([ + return hexlify20(concat12([ signature2.r, signature2.s, signature2.recoveryParam ? "0x1c" : "0x1b" @@ -3750,18 +3750,18 @@ var bytes_1 = require_lib2(); var logger_1 = require_lib(); var _version_1 = require_version3(); - var logger46 = new logger_1.Logger(_version_1.version); + var logger42 = new logger_1.Logger(_version_1.version); var _constructorGuard4 = {}; var MAX_SAFE = 9007199254740991; function isBigNumberish(value) { - return value != null && (BigNumber19.isBigNumber(value) || typeof value === "number" && value % 1 === 0 || typeof value === "string" && !!value.match(/^-?[0-9]+$/) || (0, bytes_1.isHexString)(value) || typeof value === "bigint" || (0, bytes_1.isBytes)(value)); + return value != null && (BigNumber18.isBigNumber(value) || typeof value === "number" && value % 1 === 0 || typeof value === "string" && !!value.match(/^-?[0-9]+$/) || (0, bytes_1.isHexString)(value) || typeof value === "bigint" || (0, bytes_1.isBytes)(value)); } exports2.isBigNumberish = isBigNumberish; var _warnedToStringRadix = false; - var BigNumber19 = function() { - function BigNumber20(constructorGuard, hex8) { + var BigNumber18 = function() { + function BigNumber19(constructorGuard, hex8) { if (constructorGuard !== _constructorGuard4) { - logger46.throwError("cannot call constructor directly; use BigNumber.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + logger42.throwError("cannot call constructor directly; use BigNumber.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "new (BigNumber)" }); } @@ -3769,158 +3769,158 @@ this._isBigNumber = true; Object.freeze(this); } - BigNumber20.prototype.fromTwos = function(value) { - return toBigNumber(toBN(this).fromTwos(value)); + BigNumber19.prototype.fromTwos = function(value) { + return toBigNumber(toBN2(this).fromTwos(value)); }; - BigNumber20.prototype.toTwos = function(value) { - return toBigNumber(toBN(this).toTwos(value)); + BigNumber19.prototype.toTwos = function(value) { + return toBigNumber(toBN2(this).toTwos(value)); }; - BigNumber20.prototype.abs = function() { + BigNumber19.prototype.abs = function() { if (this._hex[0] === "-") { - return BigNumber20.from(this._hex.substring(1)); + return BigNumber19.from(this._hex.substring(1)); } return this; }; - BigNumber20.prototype.add = function(other) { - return toBigNumber(toBN(this).add(toBN(other))); + BigNumber19.prototype.add = function(other) { + return toBigNumber(toBN2(this).add(toBN2(other))); }; - BigNumber20.prototype.sub = function(other) { - return toBigNumber(toBN(this).sub(toBN(other))); + BigNumber19.prototype.sub = function(other) { + return toBigNumber(toBN2(this).sub(toBN2(other))); }; - BigNumber20.prototype.div = function(other) { - var o = BigNumber20.from(other); + BigNumber19.prototype.div = function(other) { + var o = BigNumber19.from(other); if (o.isZero()) { throwFault("division-by-zero", "div"); } - return toBigNumber(toBN(this).div(toBN(other))); + return toBigNumber(toBN2(this).div(toBN2(other))); }; - BigNumber20.prototype.mul = function(other) { - return toBigNumber(toBN(this).mul(toBN(other))); + BigNumber19.prototype.mul = function(other) { + return toBigNumber(toBN2(this).mul(toBN2(other))); }; - BigNumber20.prototype.mod = function(other) { - var value = toBN(other); + BigNumber19.prototype.mod = function(other) { + var value = toBN2(other); if (value.isNeg()) { throwFault("division-by-zero", "mod"); } - return toBigNumber(toBN(this).umod(value)); + return toBigNumber(toBN2(this).umod(value)); }; - BigNumber20.prototype.pow = function(other) { - var value = toBN(other); + BigNumber19.prototype.pow = function(other) { + var value = toBN2(other); if (value.isNeg()) { throwFault("negative-power", "pow"); } - return toBigNumber(toBN(this).pow(value)); + return toBigNumber(toBN2(this).pow(value)); }; - BigNumber20.prototype.and = function(other) { - var value = toBN(other); + BigNumber19.prototype.and = function(other) { + var value = toBN2(other); if (this.isNegative() || value.isNeg()) { throwFault("unbound-bitwise-result", "and"); } - return toBigNumber(toBN(this).and(value)); + return toBigNumber(toBN2(this).and(value)); }; - BigNumber20.prototype.or = function(other) { - var value = toBN(other); + BigNumber19.prototype.or = function(other) { + var value = toBN2(other); if (this.isNegative() || value.isNeg()) { throwFault("unbound-bitwise-result", "or"); } - return toBigNumber(toBN(this).or(value)); + return toBigNumber(toBN2(this).or(value)); }; - BigNumber20.prototype.xor = function(other) { - var value = toBN(other); + BigNumber19.prototype.xor = function(other) { + var value = toBN2(other); if (this.isNegative() || value.isNeg()) { throwFault("unbound-bitwise-result", "xor"); } - return toBigNumber(toBN(this).xor(value)); + return toBigNumber(toBN2(this).xor(value)); }; - BigNumber20.prototype.mask = function(value) { + BigNumber19.prototype.mask = function(value) { if (this.isNegative() || value < 0) { throwFault("negative-width", "mask"); } - return toBigNumber(toBN(this).maskn(value)); + return toBigNumber(toBN2(this).maskn(value)); }; - BigNumber20.prototype.shl = function(value) { + BigNumber19.prototype.shl = function(value) { if (this.isNegative() || value < 0) { throwFault("negative-width", "shl"); } - return toBigNumber(toBN(this).shln(value)); + return toBigNumber(toBN2(this).shln(value)); }; - BigNumber20.prototype.shr = function(value) { + BigNumber19.prototype.shr = function(value) { if (this.isNegative() || value < 0) { throwFault("negative-width", "shr"); } - return toBigNumber(toBN(this).shrn(value)); + return toBigNumber(toBN2(this).shrn(value)); }; - BigNumber20.prototype.eq = function(other) { - return toBN(this).eq(toBN(other)); + BigNumber19.prototype.eq = function(other) { + return toBN2(this).eq(toBN2(other)); }; - BigNumber20.prototype.lt = function(other) { - return toBN(this).lt(toBN(other)); + BigNumber19.prototype.lt = function(other) { + return toBN2(this).lt(toBN2(other)); }; - BigNumber20.prototype.lte = function(other) { - return toBN(this).lte(toBN(other)); + BigNumber19.prototype.lte = function(other) { + return toBN2(this).lte(toBN2(other)); }; - BigNumber20.prototype.gt = function(other) { - return toBN(this).gt(toBN(other)); + BigNumber19.prototype.gt = function(other) { + return toBN2(this).gt(toBN2(other)); }; - BigNumber20.prototype.gte = function(other) { - return toBN(this).gte(toBN(other)); + BigNumber19.prototype.gte = function(other) { + return toBN2(this).gte(toBN2(other)); }; - BigNumber20.prototype.isNegative = function() { + BigNumber19.prototype.isNegative = function() { return this._hex[0] === "-"; }; - BigNumber20.prototype.isZero = function() { - return toBN(this).isZero(); + BigNumber19.prototype.isZero = function() { + return toBN2(this).isZero(); }; - BigNumber20.prototype.toNumber = function() { + BigNumber19.prototype.toNumber = function() { try { - return toBN(this).toNumber(); + return toBN2(this).toNumber(); } catch (error) { throwFault("overflow", "toNumber", this.toString()); } return null; }; - BigNumber20.prototype.toBigInt = function() { + BigNumber19.prototype.toBigInt = function() { try { return BigInt(this.toString()); } catch (e) { } - return logger46.throwError("this platform does not support BigInt", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + return logger42.throwError("this platform does not support BigInt", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { value: this.toString() }); }; - BigNumber20.prototype.toString = function() { + BigNumber19.prototype.toString = function() { if (arguments.length > 0) { if (arguments[0] === 10) { if (!_warnedToStringRadix) { _warnedToStringRadix = true; - logger46.warn("BigNumber.toString does not accept any parameters; base-10 is assumed"); + logger42.warn("BigNumber.toString does not accept any parameters; base-10 is assumed"); } } else if (arguments[0] === 16) { - logger46.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {}); + logger42.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {}); } else { - logger46.throwError("BigNumber.toString does not accept parameters", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {}); + logger42.throwError("BigNumber.toString does not accept parameters", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {}); } } - return toBN(this).toString(10); + return toBN2(this).toString(10); }; - BigNumber20.prototype.toHexString = function() { + BigNumber19.prototype.toHexString = function() { return this._hex; }; - BigNumber20.prototype.toJSON = function(key2) { + BigNumber19.prototype.toJSON = function(key2) { return { type: "BigNumber", hex: this.toHexString() }; }; - BigNumber20.from = function(value) { - if (value instanceof BigNumber20) { + BigNumber19.from = function(value) { + if (value instanceof BigNumber19) { return value; } if (typeof value === "string") { if (value.match(/^-?0x[0-9a-f]+$/i)) { - return new BigNumber20(_constructorGuard4, toHex2(value)); + return new BigNumber19(_constructorGuard4, toHex2(value)); } if (value.match(/^-?[0-9]+$/)) { - return new BigNumber20(_constructorGuard4, toHex2(new BN7(value))); + return new BigNumber19(_constructorGuard4, toHex2(new BN7(value))); } - return logger46.throwArgumentError("invalid BigNumber string", "value", value); + return logger42.throwArgumentError("invalid BigNumber string", "value", value); } if (typeof value === "number") { if (value % 1) { @@ -3929,20 +3929,20 @@ if (value >= MAX_SAFE || value <= -MAX_SAFE) { throwFault("overflow", "BigNumber.from", value); } - return BigNumber20.from(String(value)); + return BigNumber19.from(String(value)); } var anyValue = value; if (typeof anyValue === "bigint") { - return BigNumber20.from(anyValue.toString()); + return BigNumber19.from(anyValue.toString()); } if ((0, bytes_1.isBytes)(anyValue)) { - return BigNumber20.from((0, bytes_1.hexlify)(anyValue)); + return BigNumber19.from((0, bytes_1.hexlify)(anyValue)); } if (anyValue) { if (anyValue.toHexString) { var hex8 = anyValue.toHexString(); if (typeof hex8 === "string") { - return BigNumber20.from(hex8); + return BigNumber19.from(hex8); } } else { var hex8 = anyValue._hex; @@ -3951,19 +3951,19 @@ } if (typeof hex8 === "string") { if ((0, bytes_1.isHexString)(hex8) || hex8[0] === "-" && (0, bytes_1.isHexString)(hex8.substring(1))) { - return BigNumber20.from(hex8); + return BigNumber19.from(hex8); } } } } - return logger46.throwArgumentError("invalid BigNumber value", "value", value); + return logger42.throwArgumentError("invalid BigNumber value", "value", value); }; - BigNumber20.isBigNumber = function(value) { + BigNumber19.isBigNumber = function(value) { return !!(value && value._isBigNumber); }; - return BigNumber20; + return BigNumber19; }(); - exports2.BigNumber = BigNumber19; + exports2.BigNumber = BigNumber18; function toHex2(value) { if (typeof value !== "string") { return toHex2(value.toString(16)); @@ -3971,7 +3971,7 @@ if (value[0] === "-") { value = value.substring(1); if (value[0] === "-") { - logger46.throwArgumentError("invalid hex", "value", value); + logger42.throwArgumentError("invalid hex", "value", value); } value = toHex2(value); if (value === "0x00") { @@ -3994,10 +3994,10 @@ return value; } function toBigNumber(value) { - return BigNumber19.from(toHex2(value)); + return BigNumber18.from(toHex2(value)); } - function toBN(value) { - var hex8 = BigNumber19.from(value).toHexString(); + function toBN2(value) { + var hex8 = BigNumber18.from(value).toHexString(); if (hex8[0] === "-") { return new BN7("-" + hex8.substring(3), 16); } @@ -4008,16 +4008,16 @@ if (value != null) { params.value = value; } - return logger46.throwError(fault, logger_1.Logger.errors.NUMERIC_FAULT, params); + return logger42.throwError(fault, logger_1.Logger.errors.NUMERIC_FAULT, params); } - function _base36To162(value) { + function _base36To16(value) { return new BN7(value, 36).toString(16); } - exports2._base36To16 = _base36To162; - function _base16To362(value) { + exports2._base36To16 = _base36To16; + function _base16To36(value) { return new BN7(value, 16).toString(36); } - exports2._base16To36 = _base16To362; + exports2._base16To36 = _base16To36; } }); @@ -4030,7 +4030,7 @@ var bytes_1 = require_lib2(); var logger_1 = require_lib(); var _version_1 = require_version3(); - var logger46 = new logger_1.Logger(_version_1.version); + var logger42 = new logger_1.Logger(_version_1.version); var bignumber_1 = require_bignumber(); var _constructorGuard4 = {}; var Zero4 = bignumber_1.BigNumber.from(0); @@ -4040,7 +4040,7 @@ if (value !== void 0) { params.value = value; } - return logger46.throwError(message, logger_1.Logger.errors.NUMERIC_FAULT, params); + return logger42.throwError(message, logger_1.Logger.errors.NUMERIC_FAULT, params); } var zeros = "0"; while (zeros.length < 256) { @@ -4056,7 +4056,7 @@ if (typeof decimals === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) { return "1" + zeros.substring(0, decimals); } - return logger46.throwArgumentError("invalid decimal size", "decimals", decimals); + return logger42.throwArgumentError("invalid decimal size", "decimals", decimals); } function formatFixed2(value, decimals) { if (decimals == null) { @@ -4091,18 +4091,18 @@ } var multiplier = getMultiplier(decimals); if (typeof value !== "string" || !value.match(/^-?[0-9.]+$/)) { - logger46.throwArgumentError("invalid decimal value", "value", value); + logger42.throwArgumentError("invalid decimal value", "value", value); } var negative = value.substring(0, 1) === "-"; if (negative) { value = value.substring(1); } if (value === ".") { - logger46.throwArgumentError("missing value", "value", value); + logger42.throwArgumentError("missing value", "value", value); } var comps = value.split("."); if (comps.length > 2) { - logger46.throwArgumentError("too many decimal points", "value", value); + logger42.throwArgumentError("too many decimal points", "value", value); } var whole = comps[0], fraction = comps[1]; if (!whole) { @@ -4135,7 +4135,7 @@ var FixedFormat = function() { function FixedFormat2(constructorGuard, signed2, width, decimals) { if (constructorGuard !== _constructorGuard4) { - logger46.throwError("cannot use FixedFormat constructor; use FixedFormat.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + logger42.throwError("cannot use FixedFormat constructor; use FixedFormat.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "new FixedFormat" }); } @@ -4163,7 +4163,7 @@ } else { var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/); if (!match) { - logger46.throwArgumentError("invalid fixed format", "format", value); + logger42.throwArgumentError("invalid fixed format", "format", value); } signed2 = match[1] !== "u"; width = parseInt(match[2]); @@ -4175,7 +4175,7 @@ return defaultValue; } if (typeof value[key2] !== type) { - logger46.throwArgumentError("invalid fixed format (" + key2 + " not " + type + ")", "format." + key2, value[key2]); + logger42.throwArgumentError("invalid fixed format (" + key2 + " not " + type + ")", "format." + key2, value[key2]); } return value[key2]; }; @@ -4184,10 +4184,10 @@ decimals = check("decimals", "number", decimals); } if (width % 8) { - logger46.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width); + logger42.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width); } if (decimals > 80) { - logger46.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals); + logger42.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals); } return new FixedFormat2(_constructorGuard4, signed2, width, decimals); }; @@ -4197,7 +4197,7 @@ var FixedNumber2 = function() { function FixedNumber3(constructorGuard, hex8, value, format) { if (constructorGuard !== _constructorGuard4) { - logger46.throwError("cannot use FixedNumber constructor; use FixedNumber.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + logger42.throwError("cannot use FixedNumber constructor; use FixedNumber.from", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "new FixedFormat" }); } @@ -4209,7 +4209,7 @@ } FixedNumber3.prototype._checkFormat = function(other) { if (this.format.name !== other.format.name) { - logger46.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other); + logger42.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other); } }; FixedNumber3.prototype.addUnsafe = function(other) { @@ -4269,7 +4269,7 @@ comps.push("0"); } if (decimals < 0 || decimals > 80 || decimals % 1) { - logger46.throwArgumentError("invalid decimal count", "decimals", decimals); + logger42.throwArgumentError("invalid decimal count", "decimals", decimals); } if (comps[1].length <= decimals) { return this; @@ -4292,7 +4292,7 @@ return this._hex; } if (width % 8) { - logger46.throwArgumentError("invalid byte width", "width", width); + logger42.throwArgumentError("invalid byte width", "width", width); } var hex8 = bignumber_1.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString(); return (0, bytes_1.hexZeroPad)(hex8, width / 8); @@ -4365,7 +4365,7 @@ throw error; } } - return logger46.throwArgumentError("invalid FixedNumber value", "value", value); + return logger42.throwArgumentError("invalid FixedNumber value", "value", value); }; FixedNumber3.isFixedNumber = function(value) { return !!(value && value._isFixedNumber); @@ -4424,7 +4424,7 @@ var __propKey; var __setFunctionName; var __metadata; - var __awaiter18; + var __awaiter16; var __generator2; var __exportStar; var __values2; @@ -4584,7 +4584,7 @@ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); }; - __awaiter18 = function(thisArg, _arguments, P, generator) { + __awaiter16 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -4966,7 +4966,7 @@ exporter("__propKey", __propKey); exporter("__setFunctionName", __setFunctionName); exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter18); + exporter("__awaiter", __awaiter16); exporter("__generator", __generator2); exporter("__exportStar", __exportStar); exporter("__createBinding", __createBinding); @@ -5184,13 +5184,13 @@ } return all.map((d) => ` ${fmt(d.version.padEnd(max2), d).join(" ")}`).join("\n"); } - function formatInfo(version27, { name: name6 }) { + function formatInfo(version23, { name: name6 }) { return [ - version27, + version23, name6 ]; } - function formatVersion(version27, { path, type }) { + function formatVersion(version23, { path, type }) { let extracted; if (path && path.length >= 5) { const nmIndex = path.indexOf("node_modules"); @@ -5199,7 +5199,7 @@ extracted = ""; } return [ - `${`${type || ""}`.padStart(3)} ${version27}`, + `${`${type || ""}`.padStart(3)} ${version23}`, extracted ]; } @@ -5220,22 +5220,22 @@ ${DEDUPE} ${formatDisplay(all, fmt)}`); } - function detectPackage({ name: name6, path, type, version: version27 }, pathOrFn, deps = []) { + function detectPackage({ name: name6, path, type, version: version23 }, pathOrFn, deps = []) { if (!name6.startsWith("@polkadot")) { throw new Error(`Invalid package descriptor ${name6}`); } const entry = getEntry(name6); - entry.push({ path: getPath(path, pathOrFn), type, version: version27 }); - const entriesSameVersion = entry.every((e) => e.version === version27); + entry.push({ path: getPath(path, pathOrFn), type, version: version23 }); + const entriesSameVersion = entry.every((e) => e.version === version23); const esmCjsWarningDisabled = x_global_1.xglobal.process?.env?.[exports2.POLKADOTJS_DISABLE_ESM_CJS_WARNING_FLAG] === "1"; const multipleEntries = entry.length !== 1; const disableWarnings = esmCjsWarningDisabled && entriesSameVersion; if (multipleEntries && !disableWarnings) { warn(`${name6} has multiple versions, ensure that there is only one installed.`, entry, formatVersion); } else { - const mismatches = deps.filter((d) => d && d.version !== version27); + const mismatches = deps.filter((d) => d && d.version !== version23); if (mismatches.length) { - warn(`${name6} requires direct dependencies exactly matching version ${version27}.`, mismatches, formatInfo); + warn(`${name6} requires direct dependencies exactly matching version ${version23}.`, mismatches, formatInfo); } } } @@ -11022,7 +11022,7 @@ ${formatDisplay(all, fmt)}`); isNaN(maxSize) ? -1 : maxSize ]; } - function logger46(origin) { + function logger42(origin) { const type = `${origin.toUpperCase()}:`.padStart(16); const [isDebug, maxSize] = parseEnv2(origin.toLowerCase()); return { @@ -11033,7 +11033,7 @@ ${formatDisplay(all, fmt)}`); warn: (...values) => apply2("warn", type, values) }; } - exports2.logger = logger46; + exports2.logger = logger42; } }); @@ -15276,11 +15276,11 @@ ${formatDisplay(all, fmt)}`); return (0, _bridge.resultU8a)(); }); exports2.hmacSha512 = hmacSha5122; - var keccak2564 = (0, _bridge.withWasm)((wasm2, data) => { + var keccak25613 = (0, _bridge.withWasm)((wasm2, data) => { wasm2.ext_keccak256(8, ...(0, _bridge.allocU8a)(data)); return (0, _bridge.resultU8a)(); }); - exports2.keccak256 = keccak2564; + exports2.keccak256 = keccak25613; var keccak5122 = (0, _bridge.withWasm)((wasm2, data) => { wasm2.ext_keccak512(8, ...(0, _bridge.allocU8a)(data)); return (0, _bridge.resultU8a)(); @@ -26162,7 +26162,7 @@ ${formatDisplay(all, fmt)}`); var bytes_1 = require_lib2(); var logger_1 = require_lib(); var _version_1 = require_version4(); - var logger46 = new logger_1.Logger(_version_1.version); + var logger42 = new logger_1.Logger(_version_1.version); var UnicodeNormalizationForm4; (function(UnicodeNormalizationForm5) { UnicodeNormalizationForm5["current"] = ""; @@ -26182,7 +26182,7 @@ ${formatDisplay(all, fmt)}`); Utf8ErrorReason3["OVERLONG"] = "overlong representation"; })(Utf8ErrorReason2 = exports2.Utf8ErrorReason || (exports2.Utf8ErrorReason = {})); function errorFunc(reason, offset, bytes5, output4, badCodepoint) { - return logger46.throwArgumentError("invalid codepoint at offset " + offset + "; " + reason, "bytes", bytes5); + return logger42.throwArgumentError("invalid codepoint at offset " + offset + "; " + reason, "bytes", bytes5); } function ignoreFunc(reason, offset, bytes5, output4, badCodepoint) { if (reason === Utf8ErrorReason2.BAD_PREFIX || reason === Utf8ErrorReason2.UNEXPECTED_CONTINUE) { @@ -26285,7 +26285,7 @@ ${formatDisplay(all, fmt)}`); form = UnicodeNormalizationForm4.current; } if (form != UnicodeNormalizationForm4.current) { - logger46.checkNormalize(); + logger42.checkNormalize(); str2 = str2.normalize(form); } var result = []; @@ -26641,7 +26641,7 @@ ${formatDisplay(all, fmt)}`); var require_utils3 = __commonJS({ "../../node_modules/@reef-chain/evm-provider/utils.js"(exports2) { "use strict"; - var __awaiter18 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter16 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -26735,7 +26735,7 @@ ${formatDisplay(all, fmt)}`); }); } exports2.handleTxResponse = handleTxResponse; - function toBN(bigNumberis = 0) { + function toBN2(bigNumberis = 0) { if ((0, util_1.isU8a)(bigNumberis)) { return (0, util_1.u8aToBn)(bigNumberis); } @@ -26751,7 +26751,7 @@ ${formatDisplay(all, fmt)}`); } return new bn_js_1.default(bigNumberis); } - exports2.toBN = toBN; + exports2.toBN = toBN2; function dataToString(bytes5) { if ((0, util_1.isBuffer)(bytes5)) { return (0, util_1.u8aToHex)((0, util_1.bufferToU8a)(bytes5)); @@ -26784,7 +26784,7 @@ ${formatDisplay(all, fmt)}`); } exports2.isMainnet = isMainnet; function resolveEvmAddress(provider, nativeAddressOrName) { - return __awaiter18(this, void 0, void 0, function* () { + return __awaiter16(this, void 0, void 0, function* () { const resolved = yield nativeAddressOrName; if (resolved.length === 42) { return resolved; @@ -26795,7 +26795,7 @@ ${formatDisplay(all, fmt)}`); } exports2.resolveEvmAddress = resolveEvmAddress; function resolveAddress(provider, evmAddressOrName) { - return __awaiter18(this, void 0, void 0, function* () { + return __awaiter16(this, void 0, void 0, function* () { const resolved = yield evmAddressOrName; if (isSubstrateAddress2(resolved)) { return resolved; @@ -26806,7 +26806,7 @@ ${formatDisplay(all, fmt)}`); } exports2.resolveAddress = resolveAddress; function buildPayload(provider, signerAddress, tx2) { - return __awaiter18(this, void 0, void 0, function* () { + return __awaiter16(this, void 0, void 0, function* () { try { const lastHeader = yield provider.api.rpc.chain.getHeader(); const blockNumber = provider.api.registry.createType("BlockNumber", lastHeader.number.toNumber()); @@ -26817,7 +26817,7 @@ ${formatDisplay(all, fmt)}`); const resources = yield provider.estimateResources(tx2); const gasLimit = resources.gas.mul(31).div(10); const storageLimit = resources.storage.mul(31).div(10); - const extrinsic = provider.api.tx.evm.call(tx2.to, tx2.data, toBN(tx2.value), toBN(gasLimit), toBN(storageLimit.isNegative() ? 0 : storageLimit)); + const extrinsic = provider.api.tx.evm.call(tx2.to, tx2.data, toBN2(tx2.value), toBN2(gasLimit), toBN2(storageLimit.isNegative() ? 0 : storageLimit)); const method = provider.api.createType("Call", extrinsic); const era = provider.api.registry.createType("ExtrinsicEra", { current: lastHeader.number.toNumber(), @@ -26857,7 +26857,7 @@ ${formatDisplay(all, fmt)}`); } exports2.buildPayload = buildPayload; function sendSignedTransaction(provider, signerAddress, tx2, payload, extrinsic, signature2) { - return __awaiter18(this, void 0, void 0, function* () { + return __awaiter16(this, void 0, void 0, function* () { extrinsic.addSignature(signerAddress, signature2, payload); const txResult = yield new Promise((resolve, reject) => { extrinsic.send((result) => { @@ -26890,6 +26890,255 @@ ${formatDisplay(all, fmt)}`); } }); + // ../../node_modules/@ethersproject/properties/lib/_version.js + var require_version5 = __commonJS({ + "../../node_modules/@ethersproject/properties/lib/_version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + exports2.version = "properties/5.7.0"; + } + }); + + // ../../node_modules/@ethersproject/properties/lib/index.js + var require_lib7 = __commonJS({ + "../../node_modules/@ethersproject/properties/lib/index.js"(exports2) { + "use strict"; + var __awaiter16 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f10, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op2) { + if (f10) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f10 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) + return t; + if (y = 0, t) + op2 = [op2[0] & 2, t.value]; + switch (op2[0]) { + case 0: + case 1: + t = op2; + break; + case 4: + _.label++; + return { value: op2[1], done: false }; + case 5: + _.label++; + y = op2[1]; + op2 = [0]; + continue; + case 7: + op2 = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) { + _ = 0; + continue; + } + if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) { + _.label = op2[1]; + break; + } + if (op2[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op2; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op2); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op2 = body.call(thisArg, _); + } catch (e) { + op2 = [6, e]; + y = 0; + } finally { + f10 = t = 0; + } + if (op2[0] & 5) + throw op2[1]; + return { value: op2[0] ? op2[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Description = exports2.deepCopy = exports2.shallowCopy = exports2.checkProperties = exports2.resolveProperties = exports2.getStatic = exports2.defineReadOnly = void 0; + var logger_1 = require_lib(); + var _version_1 = require_version5(); + var logger42 = new logger_1.Logger(_version_1.version); + function defineReadOnly23(object, name6, value) { + Object.defineProperty(object, name6, { + enumerable: true, + value, + writable: false + }); + } + exports2.defineReadOnly = defineReadOnly23; + function getStatic7(ctor, key2) { + for (var i = 0; i < 32; i++) { + if (ctor[key2]) { + return ctor[key2]; + } + if (!ctor.prototype || typeof ctor.prototype !== "object") { + break; + } + ctor = Object.getPrototypeOf(ctor.prototype).constructor; + } + return null; + } + exports2.getStatic = getStatic7; + function resolveProperties7(object) { + return __awaiter16(this, void 0, void 0, function() { + var promises, results; + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + promises = Object.keys(object).map(function(key2) { + var value = object[key2]; + return Promise.resolve(value).then(function(v) { + return { key: key2, value: v }; + }); + }); + return [4, Promise.all(promises)]; + case 1: + results = _a2.sent(); + return [2, results.reduce(function(accum, result) { + accum[result.key] = result.value; + return accum; + }, {})]; + } + }); + }); + } + exports2.resolveProperties = resolveProperties7; + function checkProperties4(object, properties) { + if (!object || typeof object !== "object") { + logger42.throwArgumentError("invalid object", "object", object); + } + Object.keys(object).forEach(function(key2) { + if (!properties[key2]) { + logger42.throwArgumentError("invalid object key - " + key2, "transaction:" + key2, object); + } + }); + } + exports2.checkProperties = checkProperties4; + function shallowCopy8(object) { + var result = {}; + for (var key2 in object) { + result[key2] = object[key2]; + } + return result; + } + exports2.shallowCopy = shallowCopy8; + var opaque = { bigint: true, boolean: true, "function": true, number: true, string: true }; + function _isFrozen(object) { + if (object === void 0 || object === null || opaque[typeof object]) { + return true; + } + if (Array.isArray(object) || typeof object === "object") { + if (!Object.isFrozen(object)) { + return false; + } + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++) { + var value = null; + try { + value = object[keys[i]]; + } catch (error) { + continue; + } + if (!_isFrozen(value)) { + return false; + } + } + return true; + } + return logger42.throwArgumentError("Cannot deepCopy " + typeof object, "object", object); + } + function _deepCopy(object) { + if (_isFrozen(object)) { + return object; + } + if (Array.isArray(object)) { + return Object.freeze(object.map(function(item) { + return deepCopy9(item); + })); + } + if (typeof object === "object") { + var result = {}; + for (var key2 in object) { + var value = object[key2]; + if (value === void 0) { + continue; + } + defineReadOnly23(result, key2, deepCopy9(value)); + } + return result; + } + return logger42.throwArgumentError("Cannot deepCopy " + typeof object, "object", object); + } + function deepCopy9(object) { + return _deepCopy(object); + } + exports2.deepCopy = deepCopy9; + var Description5 = function() { + function Description6(info) { + for (var key2 in info) { + this[key2] = deepCopy9(info[key2]); + } + } + return Description6; + }(); + exports2.Description = Description5; + } + }); + // ../../node_modules/js-sha3/src/sha3.js var require_sha32 = __commonJS({ "../../node_modules/js-sha3/src/sha3.js"(exports2, module2) { @@ -27539,6 +27788,806 @@ ${formatDisplay(all, fmt)}`); } }); + // ../../node_modules/@ethersproject/keccak256/lib/index.js + var require_lib8 = __commonJS({ + "../../node_modules/@ethersproject/keccak256/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod3) { + return mod3 && mod3.__esModule ? mod3 : { "default": mod3 }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.keccak256 = void 0; + var js_sha3_1 = __importDefault(require_sha32()); + var bytes_1 = require_lib2(); + function keccak25613(data) { + return "0x" + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data)); + } + exports2.keccak256 = keccak25613; + } + }); + + // ../../node_modules/@ethersproject/rlp/lib/_version.js + var require_version6 = __commonJS({ + "../../node_modules/@ethersproject/rlp/lib/_version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + exports2.version = "rlp/5.7.0"; + } + }); + + // ../../node_modules/@ethersproject/rlp/lib/index.js + var require_lib9 = __commonJS({ + "../../node_modules/@ethersproject/rlp/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decode = exports2.encode = void 0; + var bytes_1 = require_lib2(); + var logger_1 = require_lib(); + var _version_1 = require_version6(); + var logger42 = new logger_1.Logger(_version_1.version); + function arrayifyInteger(value) { + var result = []; + while (value) { + result.unshift(value & 255); + value >>= 8; + } + return result; + } + function unarrayifyInteger(data, offset, length) { + var result = 0; + for (var i = 0; i < length; i++) { + result = result * 256 + data[offset + i]; + } + return result; + } + function _encode2(object) { + if (Array.isArray(object)) { + var payload_1 = []; + object.forEach(function(child) { + payload_1 = payload_1.concat(_encode2(child)); + }); + if (payload_1.length <= 55) { + payload_1.unshift(192 + payload_1.length); + return payload_1; + } + var length_1 = arrayifyInteger(payload_1.length); + length_1.unshift(247 + length_1.length); + return length_1.concat(payload_1); + } + if (!(0, bytes_1.isBytesLike)(object)) { + logger42.throwArgumentError("RLP object must be BytesLike", "object", object); + } + var data = Array.prototype.slice.call((0, bytes_1.arrayify)(object)); + if (data.length === 1 && data[0] <= 127) { + return data; + } else if (data.length <= 55) { + data.unshift(128 + data.length); + return data; + } + var length = arrayifyInteger(data.length); + length.unshift(183 + length.length); + return length.concat(data); + } + function encode5(object) { + return (0, bytes_1.hexlify)(_encode2(object)); + } + exports2.encode = encode5; + function _decodeChildren(data, offset, childOffset, length) { + var result = []; + while (childOffset < offset + 1 + length) { + var decoded = _decode(data, childOffset); + result.push(decoded.result); + childOffset += decoded.consumed; + if (childOffset > offset + 1 + length) { + logger42.throwError("child data too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + } + return { consumed: 1 + length, result }; + } + function _decode(data, offset) { + if (data.length === 0) { + logger42.throwError("data too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + if (data[offset] >= 248) { + var lengthLength = data[offset] - 247; + if (offset + 1 + lengthLength > data.length) { + logger42.throwError("data short segment too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var length_2 = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length_2 > data.length) { + logger42.throwError("data long segment too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length_2); + } else if (data[offset] >= 192) { + var length_3 = data[offset] - 192; + if (offset + 1 + length_3 > data.length) { + logger42.throwError("data array too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + return _decodeChildren(data, offset, offset + 1, length_3); + } else if (data[offset] >= 184) { + var lengthLength = data[offset] - 183; + if (offset + 1 + lengthLength > data.length) { + logger42.throwError("data array too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var length_4 = unarrayifyInteger(data, offset + 1, lengthLength); + if (offset + 1 + lengthLength + length_4 > data.length) { + logger42.throwError("data array too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var result = (0, bytes_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length_4)); + return { consumed: 1 + lengthLength + length_4, result }; + } else if (data[offset] >= 128) { + var length_5 = data[offset] - 128; + if (offset + 1 + length_5 > data.length) { + logger42.throwError("data too short", logger_1.Logger.errors.BUFFER_OVERRUN, {}); + } + var result = (0, bytes_1.hexlify)(data.slice(offset + 1, offset + 1 + length_5)); + return { consumed: 1 + length_5, result }; + } + return { consumed: 1, result: (0, bytes_1.hexlify)(data[offset]) }; + } + function decode4(data) { + var bytes5 = (0, bytes_1.arrayify)(data); + var decoded = _decode(bytes5, 0); + if (decoded.consumed !== bytes5.length) { + logger42.throwArgumentError("invalid rlp data", "data", data); + } + return decoded.result; + } + exports2.decode = decode4; + } + }); + + // ../../node_modules/@ethersproject/address/lib/_version.js + var require_version7 = __commonJS({ + "../../node_modules/@ethersproject/address/lib/_version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + exports2.version = "address/5.7.0"; + } + }); + + // ../../node_modules/@ethersproject/address/lib/index.js + var require_lib10 = __commonJS({ + "../../node_modules/@ethersproject/address/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCreate2Address = exports2.getContractAddress = exports2.getIcapAddress = exports2.isAddress = exports2.getAddress = void 0; + var bytes_1 = require_lib2(); + var bignumber_1 = require_lib3(); + var keccak256_1 = require_lib8(); + var rlp_1 = require_lib9(); + var logger_1 = require_lib(); + var _version_1 = require_version7(); + var logger42 = new logger_1.Logger(_version_1.version); + function getChecksumAddress(address) { + if (!(0, bytes_1.isHexString)(address, 20)) { + logger42.throwArgumentError("invalid address", "address", address); + } + address = address.toLowerCase(); + var chars2 = address.substring(2).split(""); + var expanded = new Uint8Array(40); + for (var i10 = 0; i10 < 40; i10++) { + expanded[i10] = chars2[i10].charCodeAt(0); + } + var hashed = (0, bytes_1.arrayify)((0, keccak256_1.keccak256)(expanded)); + for (var i10 = 0; i10 < 40; i10 += 2) { + if (hashed[i10 >> 1] >> 4 >= 8) { + chars2[i10] = chars2[i10].toUpperCase(); + } + if ((hashed[i10 >> 1] & 15) >= 8) { + chars2[i10 + 1] = chars2[i10 + 1].toUpperCase(); + } + } + return "0x" + chars2.join(""); + } + var MAX_SAFE_INTEGER2 = 9007199254740991; + function log10(x) { + if (Math.log10) { + return Math.log10(x); + } + return Math.log(x) / Math.LN10; + } + var ibanLookup = {}; + for (i = 0; i < 10; i++) { + ibanLookup[String(i)] = String(i); + } + var i; + for (i = 0; i < 26; i++) { + ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); + } + var i; + var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER2)); + function ibanChecksum(address) { + address = address.toUpperCase(); + address = address.substring(4) + address.substring(0, 2) + "00"; + var expanded = address.split("").map(function(c) { + return ibanLookup[c]; + }).join(""); + while (expanded.length >= safeDigits) { + var block = expanded.substring(0, safeDigits); + expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); + } + var checksum = String(98 - parseInt(expanded, 10) % 97); + while (checksum.length < 2) { + checksum = "0" + checksum; + } + return checksum; + } + function getAddress12(address) { + var result = null; + if (typeof address !== "string") { + logger42.throwArgumentError("invalid address", "address", address); + } + if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + if (address.substring(0, 2) !== "0x") { + address = "0x" + address; + } + result = getChecksumAddress(address); + if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { + logger42.throwArgumentError("bad address checksum", "address", address); + } + } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + if (address.substring(2, 4) !== ibanChecksum(address)) { + logger42.throwArgumentError("bad icap checksum", "address", address); + } + result = (0, bignumber_1._base36To16)(address.substring(4)); + while (result.length < 40) { + result = "0" + result; + } + result = getChecksumAddress("0x" + result); + } else { + logger42.throwArgumentError("invalid address", "address", address); + } + return result; + } + exports2.getAddress = getAddress12; + function isAddress2(address) { + try { + getAddress12(address); + return true; + } catch (error) { + } + return false; + } + exports2.isAddress = isAddress2; + function getIcapAddress2(address) { + var base36 = (0, bignumber_1._base16To36)(getAddress12(address).substring(2)).toUpperCase(); + while (base36.length < 30) { + base36 = "0" + base36; + } + return "XE" + ibanChecksum("XE00" + base36) + base36; + } + exports2.getIcapAddress = getIcapAddress2; + function getContractAddress4(transaction) { + var from2 = null; + try { + from2 = getAddress12(transaction.from); + } catch (error) { + logger42.throwArgumentError("missing from address", "transaction", transaction); + } + var nonce = (0, bytes_1.stripZeros)((0, bytes_1.arrayify)(bignumber_1.BigNumber.from(transaction.nonce).toHexString())); + return getAddress12((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, rlp_1.encode)([from2, nonce])), 12)); + } + exports2.getContractAddress = getContractAddress4; + function getCreate2Address2(from2, salt, initCodeHash) { + if ((0, bytes_1.hexDataLength)(salt) !== 32) { + logger42.throwArgumentError("salt must be 32 bytes", "salt", salt); + } + if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) { + logger42.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash); + } + return getAddress12((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)(["0xff", getAddress12(from2), salt, initCodeHash])), 12)); + } + exports2.getCreate2Address = getCreate2Address2; + } + }); + + // ../../node_modules/@ethersproject/abstract-signer/lib/_version.js + var require_version8 = __commonJS({ + "../../node_modules/@ethersproject/abstract-signer/lib/_version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + exports2.version = "abstract-signer/5.7.0"; + } + }); + + // ../../node_modules/@ethersproject/abstract-signer/lib/index.js + var require_lib11 = __commonJS({ + "../../node_modules/@ethersproject/abstract-signer/lib/index.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + var __awaiter16 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f10, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op2) { + if (f10) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f10 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) + return t; + if (y = 0, t) + op2 = [op2[0] & 2, t.value]; + switch (op2[0]) { + case 0: + case 1: + t = op2; + break; + case 4: + _.label++; + return { value: op2[1], done: false }; + case 5: + _.label++; + y = op2[1]; + op2 = [0]; + continue; + case 7: + op2 = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) { + _ = 0; + continue; + } + if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) { + _.label = op2[1]; + break; + } + if (op2[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op2; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op2); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op2 = body.call(thisArg, _); + } catch (e) { + op2 = [6, e]; + y = 0; + } finally { + f10 = t = 0; + } + if (op2[0] & 5) + throw op2[1]; + return { value: op2[0] ? op2[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VoidSigner = exports2.Signer = void 0; + var properties_1 = require_lib7(); + var logger_1 = require_lib(); + var _version_1 = require_version8(); + var logger42 = new logger_1.Logger(_version_1.version); + var allowedTransactionKeys4 = [ + "accessList", + "ccipReadEnabled", + "chainId", + "customData", + "data", + "from", + "gasLimit", + "gasPrice", + "maxFeePerGas", + "maxPriorityFeePerGas", + "nonce", + "to", + "type", + "value" + ]; + var forwardErrors = [ + logger_1.Logger.errors.INSUFFICIENT_FUNDS, + logger_1.Logger.errors.NONCE_EXPIRED, + logger_1.Logger.errors.REPLACEMENT_UNDERPRICED + ]; + var Signer6 = function() { + function Signer7() { + var _newTarget = this.constructor; + logger42.checkAbstract(_newTarget, Signer7); + (0, properties_1.defineReadOnly)(this, "_isSigner", true); + } + Signer7.prototype.getBalance = function(blockTag) { + return __awaiter16(this, void 0, void 0, function() { + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("getBalance"); + return [4, this.provider.getBalance(this.getAddress(), blockTag)]; + case 1: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.getTransactionCount = function(blockTag) { + return __awaiter16(this, void 0, void 0, function() { + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("getTransactionCount"); + return [4, this.provider.getTransactionCount(this.getAddress(), blockTag)]; + case 1: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.estimateGas = function(transaction) { + return __awaiter16(this, void 0, void 0, function() { + var tx2; + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("estimateGas"); + return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx2 = _a2.sent(); + return [4, this.provider.estimateGas(tx2)]; + case 2: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.call = function(transaction, blockTag) { + return __awaiter16(this, void 0, void 0, function() { + var tx2; + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("call"); + return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx2 = _a2.sent(); + return [4, this.provider.call(tx2, blockTag)]; + case 2: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.sendTransaction = function(transaction) { + return __awaiter16(this, void 0, void 0, function() { + var tx2, signedTx; + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("sendTransaction"); + return [4, this.populateTransaction(transaction)]; + case 1: + tx2 = _a2.sent(); + return [4, this.signTransaction(tx2)]; + case 2: + signedTx = _a2.sent(); + return [4, this.provider.sendTransaction(signedTx)]; + case 3: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.getChainId = function() { + return __awaiter16(this, void 0, void 0, function() { + var network3; + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("getChainId"); + return [4, this.provider.getNetwork()]; + case 1: + network3 = _a2.sent(); + return [2, network3.chainId]; + } + }); + }); + }; + Signer7.prototype.getGasPrice = function() { + return __awaiter16(this, void 0, void 0, function() { + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("getGasPrice"); + return [4, this.provider.getGasPrice()]; + case 1: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.getFeeData = function() { + return __awaiter16(this, void 0, void 0, function() { + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("getFeeData"); + return [4, this.provider.getFeeData()]; + case 1: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.resolveName = function(name6) { + return __awaiter16(this, void 0, void 0, function() { + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + this._checkProvider("resolveName"); + return [4, this.provider.resolveName(name6)]; + case 1: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype.checkTransaction = function(transaction) { + for (var key2 in transaction) { + if (allowedTransactionKeys4.indexOf(key2) === -1) { + logger42.throwArgumentError("invalid transaction key: " + key2, "transaction", transaction); + } + } + var tx2 = (0, properties_1.shallowCopy)(transaction); + if (tx2.from == null) { + tx2.from = this.getAddress(); + } else { + tx2.from = Promise.all([ + Promise.resolve(tx2.from), + this.getAddress() + ]).then(function(result) { + if (result[0].toLowerCase() !== result[1].toLowerCase()) { + logger42.throwArgumentError("from address mismatch", "transaction", transaction); + } + return result[0]; + }); + } + return tx2; + }; + Signer7.prototype.populateTransaction = function(transaction) { + return __awaiter16(this, void 0, void 0, function() { + var tx2, hasEip1559, feeData, gasPrice; + var _this = this; + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))]; + case 1: + tx2 = _a2.sent(); + if (tx2.to != null) { + tx2.to = Promise.resolve(tx2.to).then(function(to2) { + return __awaiter16(_this, void 0, void 0, function() { + var address; + return __generator2(this, function(_a3) { + switch (_a3.label) { + case 0: + if (to2 == null) { + return [2, null]; + } + return [4, this.resolveName(to2)]; + case 1: + address = _a3.sent(); + if (address == null) { + logger42.throwArgumentError("provided ENS name resolves to null", "tx.to", to2); + } + return [2, address]; + } + }); + }); + }); + tx2.to.catch(function(error) { + }); + } + hasEip1559 = tx2.maxFeePerGas != null || tx2.maxPriorityFeePerGas != null; + if (tx2.gasPrice != null && (tx2.type === 2 || hasEip1559)) { + logger42.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); + } else if ((tx2.type === 0 || tx2.type === 1) && hasEip1559) { + logger42.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction); + } + if (!((tx2.type === 2 || tx2.type == null) && (tx2.maxFeePerGas != null && tx2.maxPriorityFeePerGas != null))) + return [3, 2]; + tx2.type = 2; + return [3, 5]; + case 2: + if (!(tx2.type === 0 || tx2.type === 1)) + return [3, 3]; + if (tx2.gasPrice == null) { + tx2.gasPrice = this.getGasPrice(); + } + return [3, 5]; + case 3: + return [4, this.getFeeData()]; + case 4: + feeData = _a2.sent(); + if (tx2.type == null) { + if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) { + tx2.type = 2; + if (tx2.gasPrice != null) { + gasPrice = tx2.gasPrice; + delete tx2.gasPrice; + tx2.maxFeePerGas = gasPrice; + tx2.maxPriorityFeePerGas = gasPrice; + } else { + if (tx2.maxFeePerGas == null) { + tx2.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx2.maxPriorityFeePerGas == null) { + tx2.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + } else if (feeData.gasPrice != null) { + if (hasEip1559) { + logger42.throwError("network does not support EIP-1559", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "populateTransaction" + }); + } + if (tx2.gasPrice == null) { + tx2.gasPrice = feeData.gasPrice; + } + tx2.type = 0; + } else { + logger42.throwError("failed to get consistent fee data", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signer.getFeeData" + }); + } + } else if (tx2.type === 2) { + if (tx2.maxFeePerGas == null) { + tx2.maxFeePerGas = feeData.maxFeePerGas; + } + if (tx2.maxPriorityFeePerGas == null) { + tx2.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; + } + } + _a2.label = 5; + case 5: + if (tx2.nonce == null) { + tx2.nonce = this.getTransactionCount("pending"); + } + if (tx2.gasLimit == null) { + tx2.gasLimit = this.estimateGas(tx2).catch(function(error) { + if (forwardErrors.indexOf(error.code) >= 0) { + throw error; + } + return logger42.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + error, + tx: tx2 + }); + }); + } + if (tx2.chainId == null) { + tx2.chainId = this.getChainId(); + } else { + tx2.chainId = Promise.all([ + Promise.resolve(tx2.chainId), + this.getChainId() + ]).then(function(results) { + if (results[1] !== 0 && results[0] !== results[1]) { + logger42.throwArgumentError("chainId address mismatch", "transaction", transaction); + } + return results[0]; + }); + } + return [4, (0, properties_1.resolveProperties)(tx2)]; + case 6: + return [2, _a2.sent()]; + } + }); + }); + }; + Signer7.prototype._checkProvider = function(operation) { + if (!this.provider) { + logger42.throwError("missing provider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: operation || "_checkProvider" + }); + } + }; + Signer7.isSigner = function(value) { + return !!(value && value._isSigner); + }; + return Signer7; + }(); + exports2.Signer = Signer6; + var VoidSigner3 = function(_super) { + __extends2(VoidSigner4, _super); + function VoidSigner4(address, provider) { + var _this = _super.call(this) || this; + (0, properties_1.defineReadOnly)(_this, "address", address); + (0, properties_1.defineReadOnly)(_this, "provider", provider || null); + return _this; + } + VoidSigner4.prototype.getAddress = function() { + return Promise.resolve(this.address); + }; + VoidSigner4.prototype._fail = function(message, operation) { + return Promise.resolve().then(function() { + logger42.throwError(message, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation }); + }); + }; + VoidSigner4.prototype.signMessage = function(message) { + return this._fail("VoidSigner cannot sign messages", "signMessage"); + }; + VoidSigner4.prototype.signTransaction = function(transaction) { + return this._fail("VoidSigner cannot sign transactions", "signTransaction"); + }; + VoidSigner4.prototype._signTypedData = function(domain, types2, value) { + return this._fail("VoidSigner cannot sign typed data", "signTypedData"); + }; + VoidSigner4.prototype.connect = function(provider) { + return new VoidSigner4(this.address, provider); + }; + return VoidSigner4; + }(Signer6); + exports2.VoidSigner = VoidSigner3; + } + }); + // ../../node_modules/@ethersproject/signing-key/node_modules/bn.js/lib/bn.js var require_bn8 = __commonJS({ "../../node_modules/@ethersproject/signing-key/node_modules/bn.js/lib/bn.js"(exports2, module2) { @@ -33337,6 +34386,56906 @@ ${formatDisplay(all, fmt)}`); } }); + // ../../node_modules/@reef-chain/evm-provider/Signer.js + var require_Signer = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/Signer.js"(exports2) { + "use strict"; + var __awaiter16 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Signer = void 0; + var abstract_signer_1 = require_lib11(); + var address_1 = require_lib10(); + var bignumber_1 = require_lib3(); + var bytes_1 = require_lib2(); + var logger_1 = require_lib(); + var properties_1 = require_lib7(); + var strings_1 = require_lib6(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var utils_12 = require_utils3(); + var logger42 = new logger_1.Logger("evm-provider"); + var Signer6 = class extends abstract_signer_1.Signer { + constructor(provider, address, signingKey) { + super(); + (0, properties_1.defineReadOnly)(this, "provider", provider); + (0, properties_1.defineReadOnly)(this, "signingKey", signingKey); + this.provider.api.setSigner(signingKey); + if (typeof address === "string" && (0, util_crypto_1.isEthereumAddress)(address)) { + logger42.throwError("expect substrate address"); + } else { + try { + (0, util_crypto_1.decodeAddress)(address); + (0, properties_1.defineReadOnly)(this, "_substrateAddress", address); + } catch (_a2) { + logger42.throwArgumentError("invalid address", "address", address); + } + } + } + connect(provider) { + return logger42.throwError("cannot alter JSON-RPC Signer connection", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "connect" + }); + } + isClaimed(evmAddress) { + return __awaiter16(this, void 0, void 0, function* () { + const rpcEvmAddress = yield this.queryEvmAddress(); + if (!rpcEvmAddress) + return false; + if (!evmAddress) + return true; + if (rpcEvmAddress === evmAddress) { + return true; + } + return logger42.throwError("An evm account already exists to bind to this account"); + }); + } + getAddress() { + return __awaiter16(this, void 0, void 0, function* () { + const address = yield this.queryEvmAddress(); + if (address) { + return address; + } else { + return this.computeDefaultEvmAddress(); + } + }); + } + queryEvmAddress() { + return __awaiter16(this, void 0, void 0, function* () { + const address = yield this.provider.api.query.evmAccounts.evmAddresses(this._substrateAddress); + if (!address.isEmpty) { + const evmAddress = (0, address_1.getAddress)(address.toString()); + return evmAddress; + } + return ""; + }); + } + computeDefaultEvmAddress() { + const address = this._substrateAddress; + const publicKey = (0, util_crypto_1.decodeAddress)(address); + const isStartWithEvm = (0, util_1.u8aEq)("evm:", publicKey.slice(0, 4)); + if (isStartWithEvm) { + return (0, address_1.getAddress)((0, util_1.u8aToHex)(publicKey.slice(4, 24))); + } + return (0, address_1.getAddress)((0, util_1.u8aToHex)((0, util_crypto_1.blake2AsU8a)((0, util_1.u8aConcat)("evm:", publicKey), 256).slice(0, 20))); + } + getSubstrateAddress() { + return __awaiter16(this, void 0, void 0, function* () { + return this._substrateAddress; + }); + } + claimEvmAccount(evmAddress) { + return __awaiter16(this, void 0, void 0, function* () { + const isConnented = yield this.isClaimed(evmAddress); + if (isConnented) + return; + const publicKey = (0, util_crypto_1.decodeAddress)(this._substrateAddress); + const data = "Reef evm:" + Buffer.from(publicKey).toString("hex"); + const signature2 = yield this._signMessage(evmAddress, data); + const extrinsic = this.provider.api.tx.evmAccounts.claimAccount(evmAddress, signature2); + yield extrinsic.signAsync(this._substrateAddress); + yield new Promise((resolve, reject) => { + extrinsic.send((result) => { + (0, utils_12.handleTxResponse)(result, this.provider.api).then(() => { + resolve(); + }).catch(({ message, result: result2 }) => { + if (message === "evmAccounts.AccountIdHasMapped") { + resolve(); + } + reject(message); + }); + }).catch((error) => { + reject(error && error.message); + }); + }); + }); + } + claimDefaultAccount() { + return __awaiter16(this, void 0, void 0, function* () { + const extrinsic = this.provider.api.tx.evmAccounts.claimDefaultAccount(); + yield extrinsic.signAsync(this._substrateAddress); + yield new Promise((resolve, reject) => { + extrinsic.send((result) => { + (0, utils_12.handleTxResponse)(result, this.provider.api).then(() => { + resolve(); + }).catch(({ message, result: result2 }) => { + if (message === "evmAccounts.AccountIdHasMapped") { + resolve(); + } + reject(message); + }); + }).catch((error) => { + reject(error && error.message); + }); + }); + }); + } + getBalance(blockTag) { + return this.provider.getBalance(this._substrateAddress, blockTag); + } + signTransaction(transaction) { + return logger42.throwError("signing transactions is unsupported", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "signTransaction" + }); + } + sendTransaction(_transaction) { + return __awaiter16(this, void 0, void 0, function* () { + this._checkProvider("sendTransaction"); + const signerAddress = yield this.getSubstrateAddress(); + const evmAddress = yield this.getAddress(); + const transaction = Object.assign({ from: evmAddress }, _transaction); + const resources = yield this.provider.estimateResources(transaction); + const gasLimit = resources.gas.mul(31).div(10); + let storageLimit; + if (transaction.customData) { + if ("storageLimit" in transaction.customData) { + storageLimit = transaction.customData.storageLimit; + if ((0, util_1.isNumber)(storageLimit)) { + storageLimit = bignumber_1.BigNumber.from(storageLimit); + } + } + } else { + storageLimit = resources.storage.mul(31).div(10); + } + let totalLimit = yield transaction.gasLimit; + if (totalLimit === null || totalLimit === void 0) { + totalLimit = gasLimit.add(storageLimit); + } + transaction.gasLimit = totalLimit; + const tx2 = yield this.populateTransaction(transaction); + const data = tx2.data; + const from2 = tx2.from; + if (!data) { + return logger42.throwError("Request data not found"); + } + if (!from2) { + return logger42.throwError("Request from not found"); + } + let extrinsic; + if (!tx2.to) { + extrinsic = this.provider.api.tx.evm.create(tx2.data, (0, utils_12.toBN)(tx2.value), (0, utils_12.toBN)(gasLimit), (0, utils_12.toBN)(storageLimit.isNegative() ? 0 : storageLimit)); + } else { + extrinsic = this.provider.api.tx.evm.call(tx2.to, tx2.data, (0, utils_12.toBN)(tx2.value), (0, utils_12.toBN)(gasLimit), (0, utils_12.toBN)(storageLimit.isNegative() ? 0 : storageLimit)); + } + yield extrinsic.signAsync(signerAddress); + return new Promise((resolve, reject) => { + extrinsic.send((result) => { + (0, utils_12.handleTxResponse)(result, this.provider.api).then(() => { + resolve({ + hash: extrinsic.hash.toHex(), + from: from2 || "", + confirmations: 0, + nonce: (0, utils_12.toBN)(tx2.nonce).toNumber(), + gasLimit: bignumber_1.BigNumber.from(tx2.gasLimit || "0"), + gasPrice: bignumber_1.BigNumber.from(0), + data: (0, utils_12.dataToString)(data), + value: bignumber_1.BigNumber.from(tx2.value || "0"), + chainId: 13939, + wait: (confirmations) => { + return this.provider._resolveTransactionReceipt(extrinsic.hash.toHex(), result.status.asInBlock.toHex(), from2); + } + }); + }).catch(({ message, result: result2 }) => { + reject(message); + }); + }).catch((error) => { + reject(error && error.message); + }); + }); + }); + } + signMessage(message) { + return __awaiter16(this, void 0, void 0, function* () { + const evmAddress = yield this.queryEvmAddress(); + return this._signMessage(evmAddress, message); + }); + } + _signMessage(evmAddress, message) { + return __awaiter16(this, void 0, void 0, function* () { + if (!evmAddress) { + return logger42.throwError("No binding evm address"); + } + const messagePrefix2 = "Ethereum Signed Message:\n"; + if (typeof message === "string") { + message = (0, strings_1.toUtf8Bytes)(message); + } + const msg = (0, util_1.u8aToHex)((0, bytes_1.concat)([ + (0, strings_1.toUtf8Bytes)(messagePrefix2), + (0, strings_1.toUtf8Bytes)(String(message.length)), + message + ])); + if (!this.signingKey.signRaw) { + return logger42.throwError("Need to implement signRaw method"); + } + const result = yield this.signingKey.signRaw({ + address: evmAddress, + data: msg, + type: "bytes" + }); + return (0, bytes_1.joinSignature)(result.signature); + }); + } + _signTypedData(domain, types2, value) { + return __awaiter16(this, void 0, void 0, function* () { + return logger42.throwError("_signTypedData is unsupported", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { + operation: "_signTypedData" + }); + }); + } + }; + exports2.Signer = Signer6; + } + }); + + // ../../node_modules/@babel/runtime/helpers/typeof.js + var require_typeof = __commonJS({ + "../../node_modules/@babel/runtime/helpers/typeof.js"(exports2, module2) { + function _typeof(o) { + "@babel/helpers - typeof"; + return module2.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o10) { + return typeof o10; + } : function(o10) { + return o10 && "function" == typeof Symbol && o10.constructor === Symbol && o10 !== Symbol.prototype ? "symbol" : typeof o10; + }, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _typeof(o); + } + module2.exports = _typeof, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; + } + }); + + // ../../node_modules/@babel/runtime/helpers/toPrimitive.js + var require_toPrimitive = __commonJS({ + "../../node_modules/@babel/runtime/helpers/toPrimitive.js"(exports2, module2) { + var _typeof = require_typeof()["default"]; + function toPrimitive(t, r10) { + if ("object" != _typeof(t) || !t) + return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r10 || "default"); + if ("object" != _typeof(i)) + return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r10 ? String : Number)(t); + } + module2.exports = toPrimitive, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; + } + }); + + // ../../node_modules/@babel/runtime/helpers/toPropertyKey.js + var require_toPropertyKey = __commonJS({ + "../../node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports2, module2) { + var _typeof = require_typeof()["default"]; + var toPrimitive = require_toPrimitive(); + function toPropertyKey(t) { + var i = toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + module2.exports = toPropertyKey, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; + } + }); + + // ../../node_modules/@babel/runtime/helpers/defineProperty.js + var require_defineProperty = __commonJS({ + "../../node_modules/@babel/runtime/helpers/defineProperty.js"(exports2, module2) { + var toPropertyKey = require_toPropertyKey(); + function _defineProperty(e, r10, t) { + return (r10 = toPropertyKey(r10)) in e ? Object.defineProperty(e, r10, { + value: t, + enumerable: true, + configurable: true, + writable: true + }) : e[r10] = t, e; + } + module2.exports = _defineProperty, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/packageInfo.js + var require_packageInfo12 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/api-derive", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/packageDetect.js + var require_packageDetect = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo12(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, []); + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/packageInfo.js + var require_packageInfo13 = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/rpc-provider", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/packageInfo.js + var require_packageInfo14 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/types", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/packageInfo.js + var require_packageInfo15 = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/rpc-core", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/packageDetect.js + var require_packageDetect2 = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo13(); + var packageInfo_2 = require_packageInfo14(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo15(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_1.packageInfo, packageInfo_2.packageInfo]); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js + var require_isFunction = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isFunction = void 0; + function isFunction6(value) { + return typeof value === "function"; + } + exports2.isFunction = isFunction6; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js + var require_createErrorClass = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createErrorClass = void 0; + function createErrorClass2(createImpl) { + var _super = function(instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; + } + exports2.createErrorClass = createErrorClass2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js + var require_UnsubscriptionError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsubscriptionError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.UnsubscriptionError = createErrorClass_1.createErrorClass(function(_super) { + return function UnsubscriptionErrorImpl(errors2) { + _super(this); + this.message = errors2 ? errors2.length + " errors occurred during unsubscription:\n" + errors2.map(function(err, i) { + return i + 1 + ") " + err.toString(); + }).join("\n ") : ""; + this.name = "UnsubscriptionError"; + this.errors = errors2; + }; + }); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/arrRemove.js + var require_arrRemove = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arrRemove = void 0; + function arrRemove2(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } + } + exports2.arrRemove = arrRemove2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/Subscription.js + var require_Subscription = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/Subscription.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSubscription = exports2.EMPTY_SUBSCRIPTION = exports2.Subscription = void 0; + var isFunction_1 = require_isFunction(); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + var arrRemove_1 = require_arrRemove(); + var Subscription2 = function() { + function Subscription3(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + Subscription3.prototype.unsubscribe = function() { + var e_1, _a2, e_2, _b2; + var errors2; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + try { + for (var _parentage_1 = __values2(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_parentage_1_1 && !_parentage_1_1.done && (_a2 = _parentage_1.return)) + _a2.call(_parentage_1); + } finally { + if (e_1) + throw e_1.error; + } + } + } else { + _parentage.remove(this); + } + } + var initialFinalizer = this.initialTeardown; + if (isFunction_1.isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } catch (e) { + errors2 = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e]; + } + } + var _finalizers = this._finalizers; + if (_finalizers) { + this._finalizers = null; + try { + for (var _finalizers_1 = __values2(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { + var finalizer = _finalizers_1_1.value; + try { + execFinalizer2(finalizer); + } catch (err) { + errors2 = errors2 !== null && errors2 !== void 0 ? errors2 : []; + if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors2 = __spreadArray2(__spreadArray2([], __read2(errors2)), __read2(err.errors)); + } else { + errors2.push(err); + } + } + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (_finalizers_1_1 && !_finalizers_1_1.done && (_b2 = _finalizers_1.return)) + _b2.call(_finalizers_1); + } finally { + if (e_2) + throw e_2.error; + } + } + } + if (errors2) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors2); + } + } + }; + Subscription3.prototype.add = function(teardown) { + var _a2; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer2(teardown); + } else { + if (teardown instanceof Subscription3) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a2 = this._finalizers) !== null && _a2 !== void 0 ? _a2 : []).push(teardown); + } + } + }; + Subscription3.prototype._hasParent = function(parent) { + var _parentage = this._parentage; + return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); + }; + Subscription3.prototype._addParent = function(parent) { + var _parentage = this._parentage; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + }; + Subscription3.prototype._removeParent = function(parent) { + var _parentage = this._parentage; + if (_parentage === parent) { + this._parentage = null; + } else if (Array.isArray(_parentage)) { + arrRemove_1.arrRemove(_parentage, parent); + } + }; + Subscription3.prototype.remove = function(teardown) { + var _finalizers = this._finalizers; + _finalizers && arrRemove_1.arrRemove(_finalizers, teardown); + if (teardown instanceof Subscription3) { + teardown._removeParent(this); + } + }; + Subscription3.EMPTY = function() { + var empty = new Subscription3(); + empty.closed = true; + return empty; + }(); + return Subscription3; + }(); + exports2.Subscription = Subscription2; + exports2.EMPTY_SUBSCRIPTION = Subscription2.EMPTY; + function isSubscription2(value) { + return value instanceof Subscription2 || value && "closed" in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe); + } + exports2.isSubscription = isSubscription2; + function execFinalizer2(finalizer) { + if (isFunction_1.isFunction(finalizer)) { + finalizer(); + } else { + finalizer.unsubscribe(); + } + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/config.js + var require_config = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/config.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.config = void 0; + exports2.config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: void 0, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js + var require_timeoutProvider = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutProvider = void 0; + exports2.timeoutProvider = { + setTimeout: function(handler, timeout) { + var args = []; + for (var _i2 = 2; _i2 < arguments.length; _i2++) { + args[_i2 - 2] = arguments[_i2]; + } + var delegate = exports2.timeoutProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout.apply(delegate, __spreadArray2([handler, timeout], __read2(args))); + } + return setTimeout.apply(void 0, __spreadArray2([handler, timeout], __read2(args))); + }, + clearTimeout: function(handle) { + var delegate = exports2.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: void 0 + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js + var require_reportUnhandledError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reportUnhandledError = void 0; + var config_1 = require_config(); + var timeoutProvider_1 = require_timeoutProvider(); + function reportUnhandledError2(err) { + timeoutProvider_1.timeoutProvider.setTimeout(function() { + var onUnhandledError = config_1.config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } else { + throw err; + } + }); + } + exports2.reportUnhandledError = reportUnhandledError2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/noop.js + var require_noop2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/noop.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noop = void 0; + function noop3() { + } + exports2.noop = noop3; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/NotificationFactories.js + var require_NotificationFactories = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createNotification = exports2.nextNotification = exports2.errorNotification = exports2.COMPLETE_NOTIFICATION = void 0; + exports2.COMPLETE_NOTIFICATION = function() { + return createNotification2("C", void 0, void 0); + }(); + function errorNotification2(error) { + return createNotification2("E", void 0, error); + } + exports2.errorNotification = errorNotification2; + function nextNotification2(value) { + return createNotification2("N", value, void 0); + } + exports2.nextNotification = nextNotification2; + function createNotification2(kind, value, error) { + return { + kind, + value, + error + }; + } + exports2.createNotification = createNotification2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/errorContext.js + var require_errorContext = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.captureError = exports2.errorContext = void 0; + var config_1 = require_config(); + var context2 = null; + function errorContext2(cb2) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context2; + if (isRoot) { + context2 = { errorThrown: false, error: null }; + } + cb2(); + if (isRoot) { + var _a2 = context2, errorThrown = _a2.errorThrown, error = _a2.error; + context2 = null; + if (errorThrown) { + throw error; + } + } + } else { + cb2(); + } + } + exports2.errorContext = errorContext2; + function captureError3(err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling && context2) { + context2.errorThrown = true; + context2.error = err; + } + } + exports2.captureError = captureError3; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/Subscriber.js + var require_Subscriber = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/Subscriber.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EMPTY_OBSERVER = exports2.SafeSubscriber = exports2.Subscriber = void 0; + var isFunction_1 = require_isFunction(); + var Subscription_1 = require_Subscription(); + var config_1 = require_config(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var noop_1 = require_noop2(); + var NotificationFactories_1 = require_NotificationFactories(); + var timeoutProvider_1 = require_timeoutProvider(); + var errorContext_1 = require_errorContext(); + var Subscriber2 = function(_super) { + __extends2(Subscriber3, _super); + function Subscriber3(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (Subscription_1.isSubscription(destination)) { + destination.add(_this); + } + } else { + _this.destination = exports2.EMPTY_OBSERVER; + } + return _this; + } + Subscriber3.create = function(next, error, complete) { + return new SafeSubscriber2(next, error, complete); + }; + Subscriber3.prototype.next = function(value) { + if (this.isStopped) { + handleStoppedNotification2(NotificationFactories_1.nextNotification(value), this); + } else { + this._next(value); + } + }; + Subscriber3.prototype.error = function(err) { + if (this.isStopped) { + handleStoppedNotification2(NotificationFactories_1.errorNotification(err), this); + } else { + this.isStopped = true; + this._error(err); + } + }; + Subscriber3.prototype.complete = function() { + if (this.isStopped) { + handleStoppedNotification2(NotificationFactories_1.COMPLETE_NOTIFICATION, this); + } else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber3.prototype.unsubscribe = function() { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber3.prototype._next = function(value) { + this.destination.next(value); + }; + Subscriber3.prototype._error = function(err) { + try { + this.destination.error(err); + } finally { + this.unsubscribe(); + } + }; + Subscriber3.prototype._complete = function() { + try { + this.destination.complete(); + } finally { + this.unsubscribe(); + } + }; + return Subscriber3; + }(Subscription_1.Subscription); + exports2.Subscriber = Subscriber2; + var _bind2 = Function.prototype.bind; + function bind2(fn2, thisArg) { + return _bind2.call(fn2, thisArg); + } + var ConsumerObserver2 = function() { + function ConsumerObserver3(partialObserver) { + this.partialObserver = partialObserver; + } + ConsumerObserver3.prototype.next = function(value) { + var partialObserver = this.partialObserver; + if (partialObserver.next) { + try { + partialObserver.next(value); + } catch (error) { + handleUnhandledError2(error); + } + } + }; + ConsumerObserver3.prototype.error = function(err) { + var partialObserver = this.partialObserver; + if (partialObserver.error) { + try { + partialObserver.error(err); + } catch (error) { + handleUnhandledError2(error); + } + } else { + handleUnhandledError2(err); + } + }; + ConsumerObserver3.prototype.complete = function() { + var partialObserver = this.partialObserver; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } catch (error) { + handleUnhandledError2(error); + } + } + }; + return ConsumerObserver3; + }(); + var SafeSubscriber2 = function(_super) { + __extends2(SafeSubscriber3, _super); + function SafeSubscriber3(observerOrNext, error, complete) { + var _this = _super.call(this) || this; + var partialObserver; + if (isFunction_1.isFunction(observerOrNext) || !observerOrNext) { + partialObserver = { + next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0, + error: error !== null && error !== void 0 ? error : void 0, + complete: complete !== null && complete !== void 0 ? complete : void 0 + }; + } else { + var context_1; + if (_this && config_1.config.useDeprecatedNextContext) { + context_1 = Object.create(observerOrNext); + context_1.unsubscribe = function() { + return _this.unsubscribe(); + }; + partialObserver = { + next: observerOrNext.next && bind2(observerOrNext.next, context_1), + error: observerOrNext.error && bind2(observerOrNext.error, context_1), + complete: observerOrNext.complete && bind2(observerOrNext.complete, context_1) + }; + } else { + partialObserver = observerOrNext; + } + } + _this.destination = new ConsumerObserver2(partialObserver); + return _this; + } + return SafeSubscriber3; + }(Subscriber2); + exports2.SafeSubscriber = SafeSubscriber2; + function handleUnhandledError2(error) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + errorContext_1.captureError(error); + } else { + reportUnhandledError_1.reportUnhandledError(error); + } + } + function defaultErrorHandler2(err) { + throw err; + } + function handleStoppedNotification2(notification, subscriber) { + var onStoppedNotification = config_1.config.onStoppedNotification; + onStoppedNotification && timeoutProvider_1.timeoutProvider.setTimeout(function() { + return onStoppedNotification(notification, subscriber); + }); + } + exports2.EMPTY_OBSERVER = { + closed: true, + next: noop_1.noop, + error: defaultErrorHandler2, + complete: noop_1.noop + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/symbol/observable.js + var require_observable2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observable = void 0; + exports2.observable = function() { + return typeof Symbol === "function" && Symbol.observable || "@@observable"; + }(); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/identity.js + var require_identity = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/identity.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.identity = void 0; + function identity3(x) { + return x; + } + exports2.identity = identity3; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/pipe.js + var require_pipe = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pipeFromArray = exports2.pipe = void 0; + var identity_1 = require_identity(); + function pipe2() { + var fns = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + fns[_i2] = arguments[_i2]; + } + return pipeFromArray2(fns); + } + exports2.pipe = pipe2; + function pipeFromArray2(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function(prev, fn2) { + return fn2(prev); + }, input); + }; + } + exports2.pipeFromArray = pipeFromArray2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/Observable.js + var require_Observable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/Observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Observable = void 0; + var Subscriber_1 = require_Subscriber(); + var Subscription_1 = require_Subscription(); + var observable_1 = require_observable2(); + var pipe_1 = require_pipe(); + var config_1 = require_config(); + var isFunction_1 = require_isFunction(); + var errorContext_1 = require_errorContext(); + var Observable3 = function() { + function Observable4(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable4.prototype.lift = function(operator) { + var observable2 = new Observable4(); + observable2.source = this; + observable2.operator = operator; + return observable2; + }; + Observable4.prototype.subscribe = function(observerOrNext, error, complete) { + var _this = this; + var subscriber = isSubscriber2(observerOrNext) ? observerOrNext : new Subscriber_1.SafeSubscriber(observerOrNext, error, complete); + errorContext_1.errorContext(function() { + var _a2 = _this, operator = _a2.operator, source = _a2.source; + subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber)); + }); + return subscriber; + }; + Observable4.prototype._trySubscribe = function(sink) { + try { + return this._subscribe(sink); + } catch (err) { + sink.error(err); + } + }; + Observable4.prototype.forEach = function(next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor2(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function(value) { + try { + next(value); + } catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + _this.subscribe(subscriber); + }); + }; + Observable4.prototype._subscribe = function(subscriber) { + var _a2; + return (_a2 = this.source) === null || _a2 === void 0 ? void 0 : _a2.subscribe(subscriber); + }; + Observable4.prototype[observable_1.observable] = function() { + return this; + }; + Observable4.prototype.pipe = function() { + var operations = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + operations[_i2] = arguments[_i2]; + } + return pipe_1.pipeFromArray(operations)(this); + }; + Observable4.prototype.toPromise = function(promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor2(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var value; + _this.subscribe(function(x) { + return value = x; + }, function(err) { + return reject(err); + }, function() { + return resolve(value); + }); + }); + }; + Observable4.create = function(subscribe) { + return new Observable4(subscribe); + }; + return Observable4; + }(); + exports2.Observable = Observable3; + function getPromiseCtor2(promiseCtor) { + var _a2; + return (_a2 = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config_1.config.Promise) !== null && _a2 !== void 0 ? _a2 : Promise; + } + function isObserver2(value) { + return value && isFunction_1.isFunction(value.next) && isFunction_1.isFunction(value.error) && isFunction_1.isFunction(value.complete); + } + function isSubscriber2(value) { + return value && value instanceof Subscriber_1.Subscriber || isObserver2(value) && Subscription_1.isSubscription(value); + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/lift.js + var require_lift = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/lift.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operate = exports2.hasLift = void 0; + var isFunction_1 = require_isFunction(); + function hasLift2(source) { + return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift); + } + exports2.hasLift = hasLift2; + function operate2(init2) { + return function(source) { + if (hasLift2(source)) { + return source.lift(function(liftedSource) { + try { + return init2(liftedSource, this); + } catch (err) { + this.error(err); + } + }); + } + throw new TypeError("Unable to lift unknown Observable type"); + }; + } + exports2.operate = operate2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js + var require_OperatorSubscriber = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OperatorSubscriber = exports2.createOperatorSubscriber = void 0; + var Subscriber_1 = require_Subscriber(); + function createOperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize); + } + exports2.createOperatorSubscriber = createOperatorSubscriber2; + var OperatorSubscriber2 = function(_super) { + __extends2(OperatorSubscriber3, _super); + function OperatorSubscriber3(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { + var _this = _super.call(this, destination) || this; + _this.onFinalize = onFinalize; + _this.shouldUnsubscribe = shouldUnsubscribe; + _this._next = onNext ? function(value) { + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : _super.prototype._next; + _this._error = onError ? function(err) { + try { + onError(err); + } catch (err2) { + destination.error(err2); + } finally { + this.unsubscribe(); + } + } : _super.prototype._error; + _this._complete = onComplete ? function() { + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._complete; + return _this; + } + OperatorSubscriber3.prototype.unsubscribe = function() { + var _a2; + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + var closed_1 = this.closed; + _super.prototype.unsubscribe.call(this); + !closed_1 && ((_a2 = this.onFinalize) === null || _a2 === void 0 ? void 0 : _a2.call(this)); + } + }; + return OperatorSubscriber3; + }(Subscriber_1.Subscriber); + exports2.OperatorSubscriber = OperatorSubscriber2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/refCount.js + var require_refCount = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.refCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function refCount() { + return lift_1.operate(function(source, subscriber) { + var connection = null; + source._refCount++; + var refCounter = OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, void 0, void 0, function() { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); + } + exports2.refCount = refCount; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js + var require_ConnectableObservable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConnectableObservable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var refCount_1 = require_refCount(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + var ConnectableObservable = function(_super) { + __extends2(ConnectableObservable2, _super); + function ConnectableObservable2(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (lift_1.hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable2.prototype._subscribe = function(subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable2.prototype.getSubject = function() { + var subject2 = this._subject; + if (!subject2 || subject2.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable2.prototype._teardown = function() { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable2.prototype.connect = function() { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription_1.Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subject_1, void 0, function() { + _this._teardown(); + subject_1.complete(); + }, function(err) { + _this._teardown(); + subject_1.error(err); + }, function() { + return _this._teardown(); + }))); + if (connection.closed) { + this._connection = null; + connection = Subscription_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable2.prototype.refCount = function() { + return refCount_1.refCount()(this); + }; + return ConnectableObservable2; + }(Observable_1.Observable); + exports2.ConnectableObservable = ConnectableObservable; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js + var require_performanceTimestampProvider = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.performanceTimestampProvider = void 0; + exports2.performanceTimestampProvider = { + now: function() { + return (exports2.performanceTimestampProvider.delegate || performance).now(); + }, + delegate: void 0 + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js + var require_animationFrameProvider = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrameProvider = void 0; + var Subscription_1 = require_Subscription(); + exports2.animationFrameProvider = { + schedule: function(callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = exports2.animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function(timestamp) { + cancel = void 0; + callback(timestamp); + }); + return new Subscription_1.Subscription(function() { + return cancel === null || cancel === void 0 ? void 0 : cancel(handle); + }); + }, + requestAnimationFrame: function() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray2([], __read2(args))); + }, + cancelAnimationFrame: function() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray2([], __read2(args))); + }, + delegate: void 0 + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js + var require_animationFrames = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrames = void 0; + var Observable_1 = require_Observable(); + var performanceTimestampProvider_1 = require_performanceTimestampProvider(); + var animationFrameProvider_1 = require_animationFrameProvider(); + function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; + } + exports2.animationFrames = animationFrames; + function animationFramesFactory(timestampProvider) { + return new Observable_1.Observable(function(subscriber) { + var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider; + var start = provider.now(); + var id4 = 0; + var run = function() { + if (!subscriber.closed) { + id4 = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function(timestamp) { + id4 = 0; + var now2 = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now2 : timestamp, + elapsed: now2 - start + }); + run(); + }); + } + }; + run(); + return function() { + if (id4) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id4); + } + }; + }); + } + var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js + var require_ObjectUnsubscribedError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ObjectUnsubscribedError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ObjectUnsubscribedError = createErrorClass_1.createErrorClass(function(_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = "ObjectUnsubscribedError"; + this.message = "object unsubscribed"; + }; + }); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/Subject.js + var require_Subject = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/Subject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousSubject = exports2.Subject = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + var arrRemove_1 = require_arrRemove(); + var errorContext_1 = require_errorContext(); + var Subject3 = function(_super) { + __extends2(Subject4, _super); + function Subject4() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.currentObservers = null; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject4.prototype.lift = function(operator) { + var subject2 = new AnonymousSubject2(this, this); + subject2.operator = operator; + return subject2; + }; + Subject4.prototype._throwIfClosed = function() { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + }; + Subject4.prototype.next = function(value) { + var _this = this; + errorContext_1.errorContext(function() { + var e_1, _a2; + _this._throwIfClosed(); + if (!_this.isStopped) { + if (!_this.currentObservers) { + _this.currentObservers = Array.from(_this.observers); + } + try { + for (var _b2 = __values2(_this.currentObservers), _c2 = _b2.next(); !_c2.done; _c2 = _b2.next()) { + var observer = _c2.value; + observer.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c2 && !_c2.done && (_a2 = _b2.return)) + _a2.call(_b2); + } finally { + if (e_1) + throw e_1.error; + } + } + } + }); + }; + Subject4.prototype.error = function(err) { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject4.prototype.complete = function() { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject4.prototype.unsubscribe = function() { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + }; + Object.defineProperty(Subject4.prototype, "observed", { + get: function() { + var _a2; + return ((_a2 = this.observers) === null || _a2 === void 0 ? void 0 : _a2.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject4.prototype._trySubscribe = function(subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject4.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject4.prototype._innerSubscribe = function(subscriber) { + var _this = this; + var _a2 = this, hasError = _a2.hasError, isStopped = _a2.isStopped, observers = _a2.observers; + if (hasError || isStopped) { + return Subscription_1.EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription_1.Subscription(function() { + _this.currentObservers = null; + arrRemove_1.arrRemove(observers, subscriber); + }); + }; + Subject4.prototype._checkFinalizedStatuses = function(subscriber) { + var _a2 = this, hasError = _a2.hasError, thrownError = _a2.thrownError, isStopped = _a2.isStopped; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped) { + subscriber.complete(); + } + }; + Subject4.prototype.asObservable = function() { + var observable2 = new Observable_1.Observable(); + observable2.source = this; + return observable2; + }; + Subject4.create = function(destination, source) { + return new AnonymousSubject2(destination, source); + }; + return Subject4; + }(Observable_1.Observable); + exports2.Subject = Subject3; + var AnonymousSubject2 = function(_super) { + __extends2(AnonymousSubject3, _super); + function AnonymousSubject3(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject3.prototype.next = function(value) { + var _a2, _b2; + (_b2 = (_a2 = this.destination) === null || _a2 === void 0 ? void 0 : _a2.next) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, value); + }; + AnonymousSubject3.prototype.error = function(err) { + var _a2, _b2; + (_b2 = (_a2 = this.destination) === null || _a2 === void 0 ? void 0 : _a2.error) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, err); + }; + AnonymousSubject3.prototype.complete = function() { + var _a2, _b2; + (_b2 = (_a2 = this.destination) === null || _a2 === void 0 ? void 0 : _a2.complete) === null || _b2 === void 0 ? void 0 : _b2.call(_a2); + }; + AnonymousSubject3.prototype._subscribe = function(subscriber) { + var _a2, _b2; + return (_b2 = (_a2 = this.source) === null || _a2 === void 0 ? void 0 : _a2.subscribe(subscriber)) !== null && _b2 !== void 0 ? _b2 : Subscription_1.EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject3; + }(Subject3); + exports2.AnonymousSubject = AnonymousSubject2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js + var require_BehaviorSubject = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BehaviorSubject = void 0; + var Subject_1 = require_Subject(); + var BehaviorSubject2 = function(_super) { + __extends2(BehaviorSubject3, _super); + function BehaviorSubject3(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject3.prototype, "value", { + get: function() { + return this.getValue(); + }, + enumerable: false, + configurable: true + }); + BehaviorSubject3.prototype._subscribe = function(subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + }; + BehaviorSubject3.prototype.getValue = function() { + var _a2 = this, hasError = _a2.hasError, thrownError = _a2.thrownError, _value = _a2._value; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + }; + BehaviorSubject3.prototype.next = function(value) { + _super.prototype.next.call(this, this._value = value); + }; + return BehaviorSubject3; + }(Subject_1.Subject); + exports2.BehaviorSubject = BehaviorSubject2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js + var require_dateTimestampProvider = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dateTimestampProvider = void 0; + exports2.dateTimestampProvider = { + now: function() { + return (exports2.dateTimestampProvider.delegate || Date).now(); + }, + delegate: void 0 + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/ReplaySubject.js + var require_ReplaySubject = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReplaySubject = void 0; + var Subject_1 = require_Subject(); + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var ReplaySubject2 = function(_super) { + __extends2(ReplaySubject3, _super); + function ReplaySubject3(_bufferSize, _windowTime, _timestampProvider) { + if (_bufferSize === void 0) { + _bufferSize = Infinity; + } + if (_windowTime === void 0) { + _windowTime = Infinity; + } + if (_timestampProvider === void 0) { + _timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + var _this = _super.call(this) || this; + _this._bufferSize = _bufferSize; + _this._windowTime = _windowTime; + _this._timestampProvider = _timestampProvider; + _this._buffer = []; + _this._infiniteTimeWindow = true; + _this._infiniteTimeWindow = _windowTime === Infinity; + _this._bufferSize = Math.max(1, _bufferSize); + _this._windowTime = Math.max(1, _windowTime); + return _this; + } + ReplaySubject3.prototype.next = function(value) { + var _a2 = this, isStopped = _a2.isStopped, _buffer = _a2._buffer, _infiniteTimeWindow = _a2._infiniteTimeWindow, _timestampProvider = _a2._timestampProvider, _windowTime = _a2._windowTime; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + _super.prototype.next.call(this, value); + }; + ReplaySubject3.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + var subscription = this._innerSubscribe(subscriber); + var _a2 = this, _infiniteTimeWindow = _a2._infiniteTimeWindow, _buffer = _a2._buffer; + var copy = _buffer.slice(); + for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + }; + ReplaySubject3.prototype._trimBuffer = function() { + var _a2 = this, _bufferSize = _a2._bufferSize, _timestampProvider = _a2._timestampProvider, _buffer = _a2._buffer, _infiniteTimeWindow = _a2._infiniteTimeWindow; + var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + var now2 = _timestampProvider.now(); + var last2 = 0; + for (var i = 1; i < _buffer.length && _buffer[i] <= now2; i += 2) { + last2 = i; + } + last2 && _buffer.splice(0, last2 + 1); + } + }; + return ReplaySubject3; + }(Subject_1.Subject); + exports2.ReplaySubject = ReplaySubject2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/AsyncSubject.js + var require_AsyncSubject = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncSubject = void 0; + var Subject_1 = require_Subject(); + var AsyncSubject = function(_super) { + __extends2(AsyncSubject2, _super); + function AsyncSubject2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._value = null; + _this._hasValue = false; + _this._isComplete = false; + return _this; + } + AsyncSubject2.prototype._checkFinalizedStatuses = function(subscriber) { + var _a2 = this, hasError = _a2.hasError, _hasValue = _a2._hasValue, _value = _a2._value, thrownError = _a2.thrownError, isStopped = _a2.isStopped, _isComplete = _a2._isComplete; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + }; + AsyncSubject2.prototype.next = function(value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + }; + AsyncSubject2.prototype.complete = function() { + var _a2 = this, _hasValue = _a2._hasValue, _value = _a2._value, _isComplete = _a2._isComplete; + if (!_isComplete) { + this._isComplete = true; + _hasValue && _super.prototype.next.call(this, _value); + _super.prototype.complete.call(this); + } + }; + return AsyncSubject2; + }(Subject_1.Subject); + exports2.AsyncSubject = AsyncSubject; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/Action.js + var require_Action = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Action = void 0; + var Subscription_1 = require_Subscription(); + var Action2 = function(_super) { + __extends2(Action3, _super); + function Action3(scheduler, work) { + return _super.call(this) || this; + } + Action3.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + return this; + }; + return Action3; + }(Subscription_1.Subscription); + exports2.Action = Action2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js + var require_intervalProvider = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.intervalProvider = void 0; + exports2.intervalProvider = { + setInterval: function(handler, timeout) { + var args = []; + for (var _i2 = 2; _i2 < arguments.length; _i2++) { + args[_i2 - 2] = arguments[_i2]; + } + var delegate = exports2.intervalProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval.apply(delegate, __spreadArray2([handler, timeout], __read2(args))); + } + return setInterval.apply(void 0, __spreadArray2([handler, timeout], __read2(args))); + }, + clearInterval: function(handle) { + var delegate = exports2.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: void 0 + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js + var require_AsyncAction = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncAction = void 0; + var Action_1 = require_Action(); + var intervalProvider_1 = require_intervalProvider(); + var arrRemove_1 = require_arrRemove(); + var AsyncAction2 = function(_super) { + __extends2(AsyncAction3, _super); + function AsyncAction3(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction3.prototype.schedule = function(state, delay) { + var _a2; + if (delay === void 0) { + delay = 0; + } + if (this.closed) { + return this; + } + this.state = state; + var id4 = this.id; + var scheduler = this.scheduler; + if (id4 != null) { + this.id = this.recycleAsyncId(scheduler, id4, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a2 = this.id) !== null && _a2 !== void 0 ? _a2 : this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction3.prototype.requestAsyncId = function(scheduler, _id, delay) { + if (delay === void 0) { + delay = 0; + } + return intervalProvider_1.intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction3.prototype.recycleAsyncId = function(_scheduler, id4, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && this.delay === delay && this.pending === false) { + return id4; + } + if (id4 != null) { + intervalProvider_1.intervalProvider.clearInterval(id4); + } + return void 0; + }; + AsyncAction3.prototype.execute = function(state, delay) { + if (this.closed) { + return new Error("executing a cancelled action"); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction3.prototype._execute = function(state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } catch (e) { + errored = true; + errorValue = e ? e : new Error("Scheduled action threw falsy error"); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction3.prototype.unsubscribe = function() { + if (!this.closed) { + var _a2 = this, id4 = _a2.id, scheduler = _a2.scheduler; + var actions = scheduler.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove_1.arrRemove(actions, this); + if (id4 != null) { + this.id = this.recycleAsyncId(scheduler, id4, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction3; + }(Action_1.Action); + exports2.AsyncAction = AsyncAction2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/Immediate.js + var require_Immediate = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/Immediate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TestTools = exports2.Immediate = void 0; + var nextHandle = 1; + var resolved; + var activeHandles = {}; + function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; + } + exports2.Immediate = { + setImmediate: function(cb2) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function() { + return findAndClearHandle(handle) && cb2(); + }); + return handle; + }, + clearImmediate: function(handle) { + findAndClearHandle(handle); + } + }; + exports2.TestTools = { + pending: function() { + return Object.keys(activeHandles).length; + } + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js + var require_immediateProvider = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.immediateProvider = void 0; + var Immediate_1 = require_Immediate(); + var setImmediate2 = Immediate_1.Immediate.setImmediate; + var clearImmediate = Immediate_1.Immediate.clearImmediate; + exports2.immediateProvider = { + setImmediate: function() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate2).apply(void 0, __spreadArray2([], __read2(args))); + }, + clearImmediate: function(handle) { + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: void 0 + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js + var require_AsapAction = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var immediateProvider_1 = require_immediateProvider(); + var AsapAction = function(_super) { + __extends2(AsapAction2, _super); + function AsapAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction2.prototype.requestAsyncId = function(scheduler, id4, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id4, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, void 0))); + }; + AsapAction2.prototype.recycleAsyncId = function(scheduler, id4, delay) { + var _a2; + if (delay === void 0) { + delay = 0; + } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id4, delay); + } + var actions = scheduler.actions; + if (id4 != null && ((_a2 = actions[actions.length - 1]) === null || _a2 === void 0 ? void 0 : _a2.id) !== id4) { + immediateProvider_1.immediateProvider.clearImmediate(id4); + if (scheduler._scheduled === id4) { + scheduler._scheduled = void 0; + } + } + return void 0; + }; + return AsapAction2; + }(AsyncAction_1.AsyncAction); + exports2.AsapAction = AsapAction; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/Scheduler.js + var require_Scheduler = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/Scheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scheduler = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var Scheduler2 = function() { + function Scheduler3(schedulerActionCtor, now2) { + if (now2 === void 0) { + now2 = Scheduler3.now; + } + this.schedulerActionCtor = schedulerActionCtor; + this.now = now2; + } + Scheduler3.prototype.schedule = function(work, delay, state) { + if (delay === void 0) { + delay = 0; + } + return new this.schedulerActionCtor(this, work).schedule(state, delay); + }; + Scheduler3.now = dateTimestampProvider_1.dateTimestampProvider.now; + return Scheduler3; + }(); + exports2.Scheduler = Scheduler2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js + var require_AsyncScheduler = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncScheduler = void 0; + var Scheduler_1 = require_Scheduler(); + var AsyncScheduler2 = function(_super) { + __extends2(AsyncScheduler3, _super); + function AsyncScheduler3(SchedulerAction, now2) { + if (now2 === void 0) { + now2 = Scheduler_1.Scheduler.now; + } + var _this = _super.call(this, SchedulerAction, now2) || this; + _this.actions = []; + _this._active = false; + return _this; + } + AsyncScheduler3.prototype.flush = function(action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this._active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler3; + }(Scheduler_1.Scheduler); + exports2.AsyncScheduler = AsyncScheduler2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js + var require_AsapScheduler = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AsapScheduler = function(_super) { + __extends2(AsapScheduler2, _super); + function AsapScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler2.prototype.flush = function(action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = void 0; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.AsapScheduler = AsapScheduler; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/asap.js + var require_asap = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/asap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.asap = exports2.asapScheduler = void 0; + var AsapAction_1 = require_AsapAction(); + var AsapScheduler_1 = require_AsapScheduler(); + exports2.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); + exports2.asap = exports2.asapScheduler; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/async.js + var require_async = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.async = exports2.asyncScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var AsyncScheduler_1 = require_AsyncScheduler(); + exports2.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); + exports2.async = exports2.asyncScheduler; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js + var require_QueueAction = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var QueueAction = function(_super) { + __extends2(QueueAction2, _super); + function QueueAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction2.prototype.execute = function(state, delay) { + return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); + }; + QueueAction2.prototype.requestAsyncId = function(scheduler, id4, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id4, delay); + } + scheduler.flush(this); + return 0; + }; + return QueueAction2; + }(AsyncAction_1.AsyncAction); + exports2.QueueAction = QueueAction; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js + var require_QueueScheduler = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var QueueScheduler = function(_super) { + __extends2(QueueScheduler2, _super); + function QueueScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.QueueScheduler = QueueScheduler; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/queue.js + var require_queue = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.queue = exports2.queueScheduler = void 0; + var QueueAction_1 = require_QueueAction(); + var QueueScheduler_1 = require_QueueScheduler(); + exports2.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); + exports2.queue = exports2.queueScheduler; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js + var require_AnimationFrameAction = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var animationFrameProvider_1 = require_animationFrameProvider(); + var AnimationFrameAction = function(_super) { + __extends2(AnimationFrameAction2, _super); + function AnimationFrameAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction2.prototype.requestAsyncId = function(scheduler, id4, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id4, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function() { + return scheduler.flush(void 0); + })); + }; + AnimationFrameAction2.prototype.recycleAsyncId = function(scheduler, id4, delay) { + var _a2; + if (delay === void 0) { + delay = 0; + } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id4, delay); + } + var actions = scheduler.actions; + if (id4 != null && ((_a2 = actions[actions.length - 1]) === null || _a2 === void 0 ? void 0 : _a2.id) !== id4) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id4); + scheduler._scheduled = void 0; + } + return void 0; + }; + return AnimationFrameAction2; + }(AsyncAction_1.AsyncAction); + exports2.AnimationFrameAction = AnimationFrameAction; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js + var require_AnimationFrameScheduler = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AnimationFrameScheduler = function(_super) { + __extends2(AnimationFrameScheduler2, _super); + function AnimationFrameScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler2.prototype.flush = function(action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = void 0; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.AnimationFrameScheduler = AnimationFrameScheduler; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js + var require_animationFrame = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrame = exports2.animationFrameScheduler = void 0; + var AnimationFrameAction_1 = require_AnimationFrameAction(); + var AnimationFrameScheduler_1 = require_AnimationFrameScheduler(); + exports2.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); + exports2.animationFrame = exports2.animationFrameScheduler; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js + var require_VirtualTimeScheduler = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b5) { + d10.__proto__ = b5; + } || function(d10, b5) { + for (var p in b5) + if (Object.prototype.hasOwnProperty.call(b5, p)) + d10[p] = b5[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __2() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__2.prototype = b.prototype, new __2()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VirtualAction = exports2.VirtualTimeScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var Subscription_1 = require_Subscription(); + var AsyncScheduler_1 = require_AsyncScheduler(); + var VirtualTimeScheduler = function(_super) { + __extends2(VirtualTimeScheduler2, _super); + function VirtualTimeScheduler2(schedulerActionCtor, maxFrames) { + if (schedulerActionCtor === void 0) { + schedulerActionCtor = VirtualAction; + } + if (maxFrames === void 0) { + maxFrames = Infinity; + } + var _this = _super.call(this, schedulerActionCtor, function() { + return _this.frame; + }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler2.prototype.flush = function() { + var _a2 = this, actions = _a2.actions, maxFrames = _a2.maxFrames; + var error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if (error = action.execute(action.state, action.delay)) { + break; + } + } + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler2.frameTimeFactor = 10; + return VirtualTimeScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.VirtualTimeScheduler = VirtualTimeScheduler; + var VirtualAction = function(_super) { + __extends2(VirtualAction2, _super); + function VirtualAction2(scheduler, work, index) { + if (index === void 0) { + index = scheduler.index += 1; + } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction2(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } else { + return Subscription_1.Subscription.EMPTY; + } + }; + VirtualAction2.prototype.requestAsyncId = function(scheduler, id4, delay) { + if (delay === void 0) { + delay = 0; + } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction2.sortActions); + return 1; + }; + VirtualAction2.prototype.recycleAsyncId = function(scheduler, id4, delay) { + if (delay === void 0) { + delay = 0; + } + return void 0; + }; + VirtualAction2.prototype._execute = function(state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction2.sortActions = function(a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } else if (a.index > b.index) { + return 1; + } else { + return -1; + } + } else if (a.delay > b.delay) { + return 1; + } else { + return -1; + } + }; + return VirtualAction2; + }(AsyncAction_1.AsyncAction); + exports2.VirtualAction = VirtualAction; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/empty.js + var require_empty3 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/empty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.empty = exports2.EMPTY = void 0; + var Observable_1 = require_Observable(); + exports2.EMPTY = new Observable_1.Observable(function(subscriber) { + return subscriber.complete(); + }); + function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : exports2.EMPTY; + } + exports2.empty = empty; + function emptyScheduled(scheduler) { + return new Observable_1.Observable(function(subscriber) { + return scheduler.schedule(function() { + return subscriber.complete(); + }); + }); + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isScheduler.js + var require_isScheduler = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isScheduler = void 0; + var isFunction_1 = require_isFunction(); + function isScheduler2(value) { + return value && isFunction_1.isFunction(value.schedule); + } + exports2.isScheduler = isScheduler2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/args.js + var require_args = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/args.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.popNumber = exports2.popScheduler = exports2.popResultSelector = void 0; + var isFunction_1 = require_isFunction(); + var isScheduler_1 = require_isScheduler(); + function last2(arr) { + return arr[arr.length - 1]; + } + function popResultSelector2(args) { + return isFunction_1.isFunction(last2(args)) ? args.pop() : void 0; + } + exports2.popResultSelector = popResultSelector2; + function popScheduler2(args) { + return isScheduler_1.isScheduler(last2(args)) ? args.pop() : void 0; + } + exports2.popScheduler = popScheduler2; + function popNumber(args, defaultValue) { + return typeof last2(args) === "number" ? args.pop() : defaultValue; + } + exports2.popNumber = popNumber; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js + var require_isArrayLike = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isArrayLike = void 0; + exports2.isArrayLike = function(x) { + return x && typeof x.length === "number" && typeof x !== "function"; + }; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isPromise.js + var require_isPromise = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isPromise = void 0; + var isFunction_1 = require_isFunction(); + function isPromise2(value) { + return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then); + } + exports2.isPromise = isPromise2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js + var require_isInteropObservable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isInteropObservable = void 0; + var observable_1 = require_observable2(); + var isFunction_1 = require_isFunction(); + function isInteropObservable2(input) { + return isFunction_1.isFunction(input[observable_1.observable]); + } + exports2.isInteropObservable = isInteropObservable2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js + var require_isAsyncIterable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isAsyncIterable = void 0; + var isFunction_1 = require_isFunction(); + function isAsyncIterable2(obj) { + return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); + } + exports2.isAsyncIterable = isAsyncIterable2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js + var require_throwUnobservableError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createInvalidObservableTypeError = void 0; + function createInvalidObservableTypeError2(input) { + return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); + } + exports2.createInvalidObservableTypeError = createInvalidObservableTypeError2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/symbol/iterator.js + var require_iterator = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iterator = exports2.getSymbolIterator = void 0; + function getSymbolIterator2() { + if (typeof Symbol !== "function" || !Symbol.iterator) { + return "@@iterator"; + } + return Symbol.iterator; + } + exports2.getSymbolIterator = getSymbolIterator2; + exports2.iterator = getSymbolIterator2(); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isIterable.js + var require_isIterable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isIterable = void 0; + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + function isIterable2(input) { + return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]); + } + exports2.isIterable = isIterable2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js + var require_isReadableStreamLike = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(exports2) { + "use strict"; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f10, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op2) { + if (f10) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f10 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) + return t; + if (y = 0, t) + op2 = [op2[0] & 2, t.value]; + switch (op2[0]) { + case 0: + case 1: + t = op2; + break; + case 4: + _.label++; + return { value: op2[1], done: false }; + case 5: + _.label++; + y = op2[1]; + op2 = [0]; + continue; + case 7: + op2 = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) { + _ = 0; + continue; + } + if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) { + _.label = op2[1]; + break; + } + if (op2[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op2; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op2); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op2 = body.call(thisArg, _); + } catch (e) { + op2 = [6, e]; + y = 0; + } finally { + f10 = t = 0; + } + if (op2[0] & 5) + throw op2[1]; + return { value: op2[0] ? op2[1] : void 0, done: true }; + } + }; + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); + }; + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r10) { + r10.value instanceof __await2 ? Promise.resolve(r10.value.v).then(fulfill, reject) : settle(q[0][2], r10); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f10, v) { + if (f10(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReadableStreamLike = exports2.readableStreamLikeToAsyncGenerator = void 0; + var isFunction_1 = require_isFunction(); + function readableStreamLikeToAsyncGenerator2(readableStream) { + return __asyncGenerator2(this, arguments, function readableStreamLikeToAsyncGenerator_1() { + var reader, _a2, value, done; + return __generator2(this, function(_b2) { + switch (_b2.label) { + case 0: + reader = readableStream.getReader(); + _b2.label = 1; + case 1: + _b2.trys.push([1, , 9, 10]); + _b2.label = 2; + case 2: + if (false) + return [3, 8]; + return [4, __await2(reader.read())]; + case 3: + _a2 = _b2.sent(), value = _a2.value, done = _a2.done; + if (!done) + return [3, 5]; + return [4, __await2(void 0)]; + case 4: + return [2, _b2.sent()]; + case 5: + return [4, __await2(value)]; + case 6: + return [4, _b2.sent()]; + case 7: + _b2.sent(); + return [3, 2]; + case 8: + return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: + return [2]; + } + }); + }); + } + exports2.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator2; + function isReadableStreamLike2(obj) { + return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); + } + exports2.isReadableStreamLike = isReadableStreamLike2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js + var require_innerFrom = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js"(exports2) { + "use strict"; + var __awaiter16 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f10, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op2) { + if (f10) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f10 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) + return t; + if (y = 0, t) + op2 = [op2[0] & 2, t.value]; + switch (op2[0]) { + case 0: + case 1: + t = op2; + break; + case 4: + _.label++; + return { value: op2[1], done: false }; + case 5: + _.label++; + y = op2[1]; + op2 = [0]; + continue; + case 7: + op2 = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) { + _ = 0; + continue; + } + if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) { + _.label = op2[1]; + break; + } + if (op2[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op2; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op2); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op2 = body.call(thisArg, _); + } catch (e) { + op2 = [6, e]; + y = 0; + } finally { + f10 = t = 0; + } + if (op2[0] & 5) + throw op2[1]; + return { value: op2[0] ? op2[1] : void 0, done: true }; + } + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v5) { + resolve({ value: v5, done: d }); + }, reject); + } + }; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromReadableStreamLike = exports2.fromAsyncIterable = exports2.fromIterable = exports2.fromPromise = exports2.fromArrayLike = exports2.fromInteropObservable = exports2.innerFrom = void 0; + var isArrayLike_1 = require_isArrayLike(); + var isPromise_1 = require_isPromise(); + var Observable_1 = require_Observable(); + var isInteropObservable_1 = require_isInteropObservable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isIterable_1 = require_isIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + var isFunction_1 = require_isFunction(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var observable_1 = require_observable2(); + function innerFrom2(input) { + if (input instanceof Observable_1.Observable) { + return input; + } + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return fromInteropObservable2(input); + } + if (isArrayLike_1.isArrayLike(input)) { + return fromArrayLike2(input); + } + if (isPromise_1.isPromise(input)) { + return fromPromise2(input); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return fromAsyncIterable2(input); + } + if (isIterable_1.isIterable(input)) { + return fromIterable2(input); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return fromReadableStreamLike2(input); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.innerFrom = innerFrom2; + function fromInteropObservable2(obj) { + return new Observable_1.Observable(function(subscriber) { + var obs = obj[observable_1.observable](); + if (isFunction_1.isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError("Provided object does not correctly implement Symbol.observable"); + }); + } + exports2.fromInteropObservable = fromInteropObservable2; + function fromArrayLike2(array) { + return new Observable_1.Observable(function(subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); + } + exports2.fromArrayLike = fromArrayLike2; + function fromPromise2(promise) { + return new Observable_1.Observable(function(subscriber) { + promise.then(function(value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function(err) { + return subscriber.error(err); + }).then(null, reportUnhandledError_1.reportUnhandledError); + }); + } + exports2.fromPromise = fromPromise2; + function fromIterable2(iterable) { + return new Observable_1.Observable(function(subscriber) { + var e_1, _a2; + try { + for (var iterable_1 = __values2(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (iterable_1_1 && !iterable_1_1.done && (_a2 = iterable_1.return)) + _a2.call(iterable_1); + } finally { + if (e_1) + throw e_1.error; + } + } + subscriber.complete(); + }); + } + exports2.fromIterable = fromIterable2; + function fromAsyncIterable2(asyncIterable) { + return new Observable_1.Observable(function(subscriber) { + process3(asyncIterable, subscriber).catch(function(err) { + return subscriber.error(err); + }); + }); + } + exports2.fromAsyncIterable = fromAsyncIterable2; + function fromReadableStreamLike2(readableStream) { + return fromAsyncIterable2(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream)); + } + exports2.fromReadableStreamLike = fromReadableStreamLike2; + function process3(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a2; + return __awaiter16(this, void 0, void 0, function() { + var value, e_2_1; + return __generator2(this, function(_b2) { + switch (_b2.label) { + case 0: + _b2.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues2(asyncIterable); + _b2.label = 1; + case 1: + return [4, asyncIterable_1.next()]; + case 2: + if (!(asyncIterable_1_1 = _b2.sent(), !asyncIterable_1_1.done)) + return [3, 4]; + value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return [2]; + } + _b2.label = 3; + case 3: + return [3, 1]; + case 4: + return [3, 11]; + case 5: + e_2_1 = _b2.sent(); + e_2 = { error: e_2_1 }; + return [3, 11]; + case 6: + _b2.trys.push([6, , 9, 10]); + if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a2 = asyncIterable_1.return))) + return [3, 8]; + return [4, _a2.call(asyncIterable_1)]; + case 7: + _b2.sent(); + _b2.label = 8; + case 8: + return [3, 10]; + case 9: + if (e_2) + throw e_2.error; + return [7]; + case 10: + return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js + var require_executeSchedule = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.executeSchedule = void 0; + function executeSchedule2(parentSubscription, scheduler, work, delay, repeat) { + if (delay === void 0) { + delay = 0; + } + if (repeat === void 0) { + repeat = false; + } + var scheduleSubscription = scheduler.schedule(function() { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } else { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } + } + exports2.executeSchedule = executeSchedule2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/observeOn.js + var require_observeOn = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeOn = void 0; + var executeSchedule_1 = require_executeSchedule(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function observeOn2(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + return subscriber.next(value); + }, delay); + }, function() { + return executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + return subscriber.complete(); + }, delay); + }, function(err) { + return executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + return subscriber.error(err); + }, delay); + })); + }); + } + exports2.observeOn = observeOn2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js + var require_subscribeOn = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeOn = void 0; + var lift_1 = require_lift(); + function subscribeOn2(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + subscriber.add(scheduler.schedule(function() { + return source.subscribe(subscriber); + }, delay)); + }); + } + exports2.subscribeOn = subscribeOn2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js + var require_scheduleObservable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleObservable = void 0; + var innerFrom_1 = require_innerFrom(); + var observeOn_1 = require_observeOn(); + var subscribeOn_1 = require_subscribeOn(); + function scheduleObservable2(input, scheduler) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); + } + exports2.scheduleObservable = scheduleObservable2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js + var require_schedulePromise = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.schedulePromise = void 0; + var innerFrom_1 = require_innerFrom(); + var observeOn_1 = require_observeOn(); + var subscribeOn_1 = require_subscribeOn(); + function schedulePromise2(input, scheduler) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); + } + exports2.schedulePromise = schedulePromise2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js + var require_scheduleArray = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleArray = void 0; + var Observable_1 = require_Observable(); + function scheduleArray2(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var i = 0; + return scheduler.schedule(function() { + if (i === input.length) { + subscriber.complete(); + } else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); + } + exports2.scheduleArray = scheduleArray2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js + var require_scheduleIterable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleIterable = void 0; + var Observable_1 = require_Observable(); + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + var executeSchedule_1 = require_executeSchedule(); + function scheduleIterable2(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var iterator2; + executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + iterator2 = input[iterator_1.iterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + var _a2; + var value; + var done; + try { + _a2 = iterator2.next(), value = _a2.value, done = _a2.done; + } catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } else { + subscriber.next(value); + } + }, 0, true); + }); + return function() { + return isFunction_1.isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return(); + }; + }); + } + exports2.scheduleIterable = scheduleIterable2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js + var require_scheduleAsyncIterable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleAsyncIterable = void 0; + var Observable_1 = require_Observable(); + var executeSchedule_1 = require_executeSchedule(); + function scheduleAsyncIterable2(input, scheduler) { + if (!input) { + throw new Error("Iterable cannot be null"); + } + return new Observable_1.Observable(function(subscriber) { + executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + var iterator2 = input[Symbol.asyncIterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + iterator2.next().then(function(result) { + if (result.done) { + subscriber.complete(); + } else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); + } + exports2.scheduleAsyncIterable = scheduleAsyncIterable2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js + var require_scheduleReadableStreamLike = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleReadableStreamLike = void 0; + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + function scheduleReadableStreamLike2(input, scheduler) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler); + } + exports2.scheduleReadableStreamLike = scheduleReadableStreamLike2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js + var require_scheduled = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduled = void 0; + var scheduleObservable_1 = require_scheduleObservable(); + var schedulePromise_1 = require_schedulePromise(); + var scheduleArray_1 = require_scheduleArray(); + var scheduleIterable_1 = require_scheduleIterable(); + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isInteropObservable_1 = require_isInteropObservable(); + var isPromise_1 = require_isPromise(); + var isArrayLike_1 = require_isArrayLike(); + var isIterable_1 = require_isIterable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + var scheduleReadableStreamLike_1 = require_scheduleReadableStreamLike(); + function scheduled2(input, scheduler) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler); + } + if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler); + } + if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler); + } + if (isIterable_1.isIterable(input)) { + return scheduleIterable_1.scheduleIterable(input, scheduler); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.scheduled = scheduled2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/from.js + var require_from = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/from.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.from = void 0; + var scheduled_1 = require_scheduled(); + var innerFrom_1 = require_innerFrom(); + function from2(input, scheduler) { + return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom_1.innerFrom(input); + } + exports2.from = from2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/of.js + var require_of = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/of.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.of = void 0; + var args_1 = require_args(); + var from_1 = require_from(); + function of4() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var scheduler = args_1.popScheduler(args); + return from_1.from(args, scheduler); + } + exports2.of = of4; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/throwError.js + var require_throwError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwError = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function throwError(errorOrErrorFactory, scheduler) { + var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function() { + return errorOrErrorFactory; + }; + var init2 = function(subscriber) { + return subscriber.error(errorFactory()); + }; + return new Observable_1.Observable(scheduler ? function(subscriber) { + return scheduler.schedule(init2, 0, subscriber); + } : init2); + } + exports2.throwError = throwError; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/Notification.js + var require_Notification = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/Notification.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeNotification = exports2.Notification = exports2.NotificationKind = void 0; + var empty_1 = require_empty3(); + var of_1 = require_of(); + var throwError_1 = require_throwError(); + var isFunction_1 = require_isFunction(); + var NotificationKind; + (function(NotificationKind2) { + NotificationKind2["NEXT"] = "N"; + NotificationKind2["ERROR"] = "E"; + NotificationKind2["COMPLETE"] = "C"; + })(NotificationKind = exports2.NotificationKind || (exports2.NotificationKind = {})); + var Notification = function() { + function Notification2(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === "N"; + } + Notification2.prototype.observe = function(observer) { + return observeNotification(this, observer); + }; + Notification2.prototype.do = function(nextHandler, errorHandler, completeHandler) { + var _a2 = this, kind = _a2.kind, value = _a2.value, error = _a2.error; + return kind === "N" ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === "E" ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); + }; + Notification2.prototype.accept = function(nextOrObserver, error, complete) { + var _a2; + return isFunction_1.isFunction((_a2 = nextOrObserver) === null || _a2 === void 0 ? void 0 : _a2.next) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete); + }; + Notification2.prototype.toObservable = function() { + var _a2 = this, kind = _a2.kind, value = _a2.value, error = _a2.error; + var result = kind === "N" ? of_1.of(value) : kind === "E" ? throwError_1.throwError(function() { + return error; + }) : kind === "C" ? empty_1.EMPTY : 0; + if (!result) { + throw new TypeError("Unexpected notification kind " + kind); + } + return result; + }; + Notification2.createNext = function(value) { + return new Notification2("N", value); + }; + Notification2.createError = function(err) { + return new Notification2("E", void 0, err); + }; + Notification2.createComplete = function() { + return Notification2.completeNotification; + }; + Notification2.completeNotification = new Notification2("C"); + return Notification2; + }(); + exports2.Notification = Notification; + function observeNotification(notification, observer) { + var _a2, _b2, _c2; + var _d2 = notification, kind = _d2.kind, value = _d2.value, error = _d2.error; + if (typeof kind !== "string") { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === "N" ? (_a2 = observer.next) === null || _a2 === void 0 ? void 0 : _a2.call(observer, value) : kind === "E" ? (_b2 = observer.error) === null || _b2 === void 0 ? void 0 : _b2.call(observer, error) : (_c2 = observer.complete) === null || _c2 === void 0 ? void 0 : _c2.call(observer); + } + exports2.observeNotification = observeNotification; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isObservable.js + var require_isObservable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObservable = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function isObservable(obj) { + return !!obj && (obj instanceof Observable_1.Observable || isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe)); + } + exports2.isObservable = isObservable; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/EmptyError.js + var require_EmptyError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EmptyError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.EmptyError = createErrorClass_1.createErrorClass(function(_super) { + return function EmptyErrorImpl() { + _super(this); + this.name = "EmptyError"; + this.message = "no elements in sequence"; + }; + }); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/lastValueFrom.js + var require_lastValueFrom = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/lastValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lastValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + function lastValueFrom(source, config7) { + var hasConfig = typeof config7 === "object"; + return new Promise(function(resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function(value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function() { + if (_hasValue) { + resolve(_value); + } else if (hasConfig) { + resolve(config7.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + }); + } + exports2.lastValueFrom = lastValueFrom; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/firstValueFrom.js + var require_firstValueFrom = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/firstValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.firstValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + var Subscriber_1 = require_Subscriber(); + function firstValueFrom2(source, config7) { + var hasConfig = typeof config7 === "object"; + return new Promise(function(resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function(value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function() { + if (hasConfig) { + resolve(config7.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + source.subscribe(subscriber); + }); + } + exports2.firstValueFrom = firstValueFrom2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js + var require_ArgumentOutOfRangeError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArgumentOutOfRangeError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function(_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = "ArgumentOutOfRangeError"; + this.message = "argument out of range"; + }; + }); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js + var require_NotFoundError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotFoundError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.NotFoundError = createErrorClass_1.createErrorClass(function(_super) { + return function NotFoundErrorImpl(message) { + _super(this); + this.name = "NotFoundError"; + this.message = message; + }; + }); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/SequenceError.js + var require_SequenceError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SequenceError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.SequenceError = createErrorClass_1.createErrorClass(function(_super) { + return function SequenceErrorImpl(message) { + _super(this); + this.name = "SequenceError"; + this.message = message; + }; + }); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/isDate.js + var require_isDate = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/isDate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isValidDate = void 0; + function isValidDate(value) { + return value instanceof Date && !isNaN(value); + } + exports2.isValidDate = isValidDate; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/timeout.js + var require_timeout = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeout = exports2.TimeoutError = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate(); + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var createErrorClass_1 = require_createErrorClass(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var executeSchedule_1 = require_executeSchedule(); + exports2.TimeoutError = createErrorClass_1.createErrorClass(function(_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { + info = null; + } + _super(this); + this.message = "Timeout has occurred"; + this.name = "TimeoutError"; + this.info = info; + }; + }); + function timeout(config7, schedulerArg) { + var _a2 = isDate_1.isValidDate(config7) ? { first: config7 } : typeof config7 === "number" ? { each: config7 } : config7, first = _a2.first, each = _a2.each, _b2 = _a2.with, _with = _b2 === void 0 ? timeoutErrorFactory : _b2, _c2 = _a2.scheduler, scheduler = _c2 === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c2, _d2 = _a2.meta, meta2 = _d2 === void 0 ? null : _d2; + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return lift_1.operate(function(source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + var lastValue = null; + var seen = 0; + var startTimer = function(delay) { + timerSubscription = executeSchedule_1.executeSchedule(subscriber, scheduler, function() { + try { + originalSourceSubscription.unsubscribe(); + innerFrom_1.innerFrom(_with({ + meta: meta2, + lastValue, + seen + })).subscribe(subscriber); + } catch (err) { + subscriber.error(err); + } + }, delay); + }; + originalSourceSubscription = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next(lastValue = value); + each > 0 && startTimer(each); + }, void 0, void 0, function() { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + !seen && startTimer(first != null ? typeof first === "number" ? first : +first - scheduler.now() : each); + }); + } + exports2.timeout = timeout; + function timeoutErrorFactory(info) { + throw new exports2.TimeoutError(info); + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/map.js + var require_map = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/map.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.map = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function map2(project, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); + } + exports2.map = map2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js + var require_mapOneOrManyArgs = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapOneOrManyArgs = void 0; + var map_1 = require_map(); + var isArray4 = Array.isArray; + function callOrApply2(fn2, args) { + return isArray4(args) ? fn2.apply(void 0, __spreadArray2([], __read2(args))) : fn2(args); + } + function mapOneOrManyArgs2(fn2) { + return map_1.map(function(args) { + return callOrApply2(fn2, args); + }); + } + exports2.mapOneOrManyArgs = mapOneOrManyArgs2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js + var require_bindCallbackInternals = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallbackInternals = void 0; + var isScheduler_1 = require_isScheduler(); + var Observable_1 = require_Observable(); + var subscribeOn_1 = require_subscribeOn(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var observeOn_1 = require_observeOn(); + var AsyncSubject_1 = require_AsyncSubject(); + function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } else { + return function() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler).apply(this, args).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc).apply(this, args).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); + }; + } + return function() { + var _this = this; + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var subject2 = new AsyncSubject_1.AsyncSubject(); + var uninitialized = true; + return new Observable_1.Observable(function(subscriber) { + var subs = subject2.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + var isAsync_1 = false; + var isComplete_1 = false; + callbackFunc.apply(_this, __spreadArray2(__spreadArray2([], __read2(args)), [ + function() { + var results = []; + for (var _i3 = 0; _i3 < arguments.length; _i3++) { + results[_i3] = arguments[_i3]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject2.error(err); + return; + } + } + subject2.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject2.complete(); + } + } + ])); + if (isComplete_1) { + subject2.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; + } + exports2.bindCallbackInternals = bindCallbackInternals; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js + var require_bindCallback = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); + } + exports2.bindCallback = bindCallback; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js + var require_bindNodeCallback = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindNodeCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); + } + exports2.bindNodeCallback = bindNodeCallback; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js + var require_argsArgArrayOrObject = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsArgArrayOrObject = void 0; + var isArray4 = Array.isArray; + var getPrototypeOf2 = Object.getPrototypeOf; + var objectProto2 = Object.prototype; + var getKeys2 = Object.keys; + function argsArgArrayOrObject2(args) { + if (args.length === 1) { + var first_1 = args[0]; + if (isArray4(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO2(first_1)) { + var keys = getKeys2(first_1); + return { + args: keys.map(function(key2) { + return first_1[key2]; + }), + keys + }; + } + } + return { args, keys: null }; + } + exports2.argsArgArrayOrObject = argsArgArrayOrObject2; + function isPOJO2(obj) { + return obj && typeof obj === "object" && getPrototypeOf2(obj) === objectProto2; + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/createObject.js + var require_createObject = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/createObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createObject = void 0; + function createObject2(keys, values) { + return keys.reduce(function(result, key2, i) { + return result[key2] = values[i], result; + }, {}); + } + exports2.createObject = createObject2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js + var require_combineLatest = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestInit = exports2.combineLatest = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var from_1 = require_from(); + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var args_1 = require_args(); + var createObject_1 = require_createObject(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var executeSchedule_1 = require_executeSchedule(); + function combineLatest3() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var scheduler = args_1.popScheduler(args); + var resultSelector = args_1.popResultSelector(args); + var _a2 = argsArgArrayOrObject_1.argsArgArrayOrObject(args), observables = _a2.args, keys = _a2.keys; + if (observables.length === 0) { + return from_1.from([], scheduler); + } + var result = new Observable_1.Observable(combineLatestInit2(observables, scheduler, keys ? function(values) { + return createObject_1.createObject(keys, values); + } : identity_1.identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.combineLatest = combineLatest3; + function combineLatestInit2(observables, scheduler, valueTransform) { + if (valueTransform === void 0) { + valueTransform = identity_1.identity; + } + return function(subscriber) { + maybeSchedule2(scheduler, function() { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function(i10) { + maybeSchedule2(scheduler, function() { + var source = from_1.from(observables[i10], scheduler); + var hasFirstValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + values[i10] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, function() { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, subscriber); + }; + } + exports2.combineLatestInit = combineLatestInit2; + function maybeSchedule2(scheduler, execute, subscription) { + if (scheduler) { + executeSchedule_1.executeSchedule(subscription, scheduler, execute); + } else { + execute(); + } + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js + var require_mergeInternals = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeInternals = void 0; + var innerFrom_1 = require_innerFrom(); + var executeSchedule_1 = require_executeSchedule(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function() { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + var outerNext = function(value) { + return active < concurrent ? doInnerSub(value) : buffer.push(value); + }; + var doInnerSub = function(value) { + expand && subscriber.next(value); + active++; + var innerComplete = false; + innerFrom_1.innerFrom(project(value, index++)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(innerValue) { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, function() { + innerComplete = true; + }, void 0, function() { + if (innerComplete) { + try { + active--; + var _loop_1 = function() { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule_1.executeSchedule(subscriber, innerSubScheduler, function() { + return doInnerSub(bufferedValue); + }); + } else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, outerNext, function() { + isComplete = true; + checkComplete(); + })); + return function() { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; + } + exports2.mergeInternals = mergeInternals; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js + var require_mergeMap = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMap = void 0; + var map_1 = require_map(); + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + var isFunction_1 = require_isFunction(); + function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap(function(a, i) { + return map_1.map(function(b, ii2) { + return resultSelector(a, b, i, ii2); + })(innerFrom_1.innerFrom(project(a, i))); + }, concurrent); + } else if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); + }); + } + exports2.mergeMap = mergeMap; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js + var require_mergeAll = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = void 0; + var mergeMap_1 = require_mergeMap(); + var identity_1 = require_identity(); + function mergeAll(concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); + } + exports2.mergeAll = mergeAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/concatAll.js + var require_concatAll = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatAll = void 0; + var mergeAll_1 = require_mergeAll(); + function concatAll() { + return mergeAll_1.mergeAll(1); + } + exports2.concatAll = concatAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/concat.js + var require_concat2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var concatAll_1 = require_concatAll(); + var args_1 = require_args(); + var from_1 = require_from(); + function concat12() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + return concatAll_1.concatAll()(from_1.from(args, args_1.popScheduler(args))); + } + exports2.concat = concat12; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/defer.js + var require_defer = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/defer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defer = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + function defer(observableFactory) { + return new Observable_1.Observable(function(subscriber) { + innerFrom_1.innerFrom(observableFactory()).subscribe(subscriber); + }); + } + exports2.defer = defer; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/connectable.js + var require_connectable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/connectable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectable = void 0; + var Subject_1 = require_Subject(); + var Observable_1 = require_Observable(); + var defer_1 = require_defer(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + }, + resetOnDisconnect: true + }; + function connectable(source, config7) { + if (config7 === void 0) { + config7 = DEFAULT_CONFIG; + } + var connection = null; + var connector = config7.connector, _a2 = config7.resetOnDisconnect, resetOnDisconnect = _a2 === void 0 ? true : _a2; + var subject2 = connector(); + var result = new Observable_1.Observable(function(subscriber) { + return subject2.subscribe(subscriber); + }); + result.connect = function() { + if (!connection || connection.closed) { + connection = defer_1.defer(function() { + return source; + }).subscribe(subject2); + if (resetOnDisconnect) { + connection.add(function() { + return subject2 = connector(); + }); + } + } + return connection; + }; + return result; + } + exports2.connectable = connectable; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js + var require_forkJoin = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.forkJoin = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var innerFrom_1 = require_innerFrom(); + var args_1 = require_args(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var createObject_1 = require_createObject(); + function forkJoin() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var resultSelector = args_1.popResultSelector(args); + var _a2 = argsArgArrayOrObject_1.argsArgArrayOrObject(args), sources = _a2.args, keys = _a2.keys; + var result = new Observable_1.Observable(function(subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function(sourceIndex2) { + var hasValue = false; + innerFrom_1.innerFrom(sources[sourceIndex2]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex2] = value; + }, function() { + return remainingCompletions--; + }, void 0, function() { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject_1.createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.forkJoin = forkJoin; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js + var require_fromEvent = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEvent = void 0; + var innerFrom_1 = require_innerFrom(); + var Observable_1 = require_Observable(); + var mergeMap_1 = require_mergeMap(); + var isArrayLike_1 = require_isArrayLike(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var nodeEventEmitterMethods = ["addListener", "removeListener"]; + var eventTargetMethods = ["addEventListener", "removeEventListener"]; + var jqueryMethods = ["on", "off"]; + function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = void 0; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + var _a2 = __read2(isEventTarget(target) ? eventTargetMethods.map(function(methodName) { + return function(handler) { + return target[methodName](eventName, handler, options); + }; + }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add6 = _a2[0], remove2 = _a2[1]; + if (!add6) { + if (isArrayLike_1.isArrayLike(target)) { + return mergeMap_1.mergeMap(function(subTarget) { + return fromEvent(subTarget, eventName, options); + })(innerFrom_1.innerFrom(target)); + } + } + if (!add6) { + throw new TypeError("Invalid event target"); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + return subscriber.next(1 < args.length ? args : args[0]); + }; + add6(handler); + return function() { + return remove2(handler); + }; + }); + } + exports2.fromEvent = fromEvent; + function toCommonHandlerRegistry(target, eventName) { + return function(methodName) { + return function(handler) { + return target[methodName](eventName, handler); + }; + }; + } + function isNodeStyleEventEmitter(target) { + return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener); + } + function isJQueryStyleEventEmitter(target) { + return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off); + } + function isEventTarget(target) { + return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener); + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js + var require_fromEventPattern = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEventPattern = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var e = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + e[_i2] = arguments[_i2]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction_1.isFunction(removeHandler) ? function() { + return removeHandler(handler, retValue); + } : void 0; + }); + } + exports2.fromEventPattern = fromEventPattern; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/generate.js + var require_generate2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/generate.js"(exports2) { + "use strict"; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f10, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op2) { + if (f10) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f10 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) + return t; + if (y = 0, t) + op2 = [op2[0] & 2, t.value]; + switch (op2[0]) { + case 0: + case 1: + t = op2; + break; + case 4: + _.label++; + return { value: op2[1], done: false }; + case 5: + _.label++; + y = op2[1]; + op2 = [0]; + continue; + case 7: + op2 = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) { + _ = 0; + continue; + } + if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) { + _.label = op2[1]; + break; + } + if (op2[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op2; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op2); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op2 = body.call(thisArg, _); + } catch (e) { + op2 = [6, e]; + y = 0; + } finally { + f10 = t = 0; + } + if (op2[0] & 5) + throw op2[1]; + return { value: op2[0] ? op2[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generate = void 0; + var identity_1 = require_identity(); + var isScheduler_1 = require_isScheduler(); + var defer_1 = require_defer(); + var scheduleIterable_1 = require_scheduleIterable(); + function generate3(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + var _a2, _b2; + var resultSelector; + var initialState; + if (arguments.length === 1) { + _a2 = initialStateOrOptions, initialState = _a2.initialState, condition = _a2.condition, iterate = _a2.iterate, _b2 = _a2.resultSelector, resultSelector = _b2 === void 0 ? identity_1.identity : _b2, scheduler = _a2.scheduler; + } else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity_1.identity; + scheduler = resultSelectorOrScheduler; + } else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen3() { + var state; + return __generator2(this, function(_a3) { + switch (_a3.label) { + case 0: + state = initialState; + _a3.label = 1; + case 1: + if (!(!condition || condition(state))) + return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a3.sent(); + _a3.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: + return [2]; + } + }); + } + return defer_1.defer(scheduler ? function() { + return scheduleIterable_1.scheduleIterable(gen3(), scheduler); + } : gen3); + } + exports2.generate = generate3; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/iif.js + var require_iif = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/iif.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iif = void 0; + var defer_1 = require_defer(); + function iif(condition, trueResult, falseResult) { + return defer_1.defer(function() { + return condition() ? trueResult : falseResult; + }); + } + exports2.iif = iif; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/timer.js + var require_timer = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/timer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timer = void 0; + var Observable_1 = require_Observable(); + var async_1 = require_async(); + var isScheduler_1 = require_isScheduler(); + var isDate_1 = require_isDate(); + function timer2(dueTime, intervalOrScheduler, scheduler) { + if (dueTime === void 0) { + dueTime = 0; + } + if (scheduler === void 0) { + scheduler = async_1.async; + } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler_1.isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable_1.Observable(function(subscriber) { + var due2 = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due2 < 0) { + due2 = 0; + } + var n = 0; + return scheduler.schedule(function() { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(void 0, intervalDuration); + } else { + subscriber.complete(); + } + } + }, due2); + }); + } + exports2.timer = timer2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/interval.js + var require_interval = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/interval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = void 0; + var async_1 = require_async(); + var timer_1 = require_timer(); + function interval(period, scheduler) { + if (period === void 0) { + period = 0; + } + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + if (period < 0) { + period = 0; + } + return timer_1.timer(period, period, scheduler); + } + exports2.interval = interval; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/merge.js + var require_merge = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/merge.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var mergeAll_1 = require_mergeAll(); + var innerFrom_1 = require_innerFrom(); + var empty_1 = require_empty3(); + var args_1 = require_args(); + var from_1 = require_from(); + function merge() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var scheduler = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + var sources = args; + return !sources.length ? empty_1.EMPTY : sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler)); + } + exports2.merge = merge; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/never.js + var require_never = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/never.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.never = exports2.NEVER = void 0; + var Observable_1 = require_Observable(); + var noop_1 = require_noop2(); + exports2.NEVER = new Observable_1.Observable(noop_1.noop); + function never() { + return exports2.NEVER; + } + exports2.never = never; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js + var require_argsOrArgArray = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsOrArgArray = void 0; + var isArray4 = Array.isArray; + function argsOrArgArray2(args) { + return args.length === 1 && isArray4(args[0]) ? args[0] : args; + } + exports2.argsOrArgArray = argsOrArgArray2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js + var require_onErrorResumeNext = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = void 0; + var Observable_1 = require_Observable(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop2(); + var innerFrom_1 = require_innerFrom(); + function onErrorResumeNext() { + var sources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + sources[_i2] = arguments[_i2]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return new Observable_1.Observable(function(subscriber) { + var sourceIndex = 0; + var subscribeNext = function() { + if (sourceIndex < nextSources.length) { + var nextSource = void 0; + try { + nextSource = innerFrom_1.innerFrom(nextSources[sourceIndex++]); + } catch (err) { + subscribeNext(); + return; + } + var innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, noop_1.noop, noop_1.noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } else { + subscriber.complete(); + } + }; + subscribeNext(); + }); + } + exports2.onErrorResumeNext = onErrorResumeNext; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/pairs.js + var require_pairs = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/pairs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairs = void 0; + var from_1 = require_from(); + function pairs(obj, scheduler) { + return from_1.from(Object.entries(obj), scheduler); + } + exports2.pairs = pairs; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/util/not.js + var require_not = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/util/not.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.not = void 0; + function not(pred, thisArg) { + return function(value, index) { + return !pred.call(thisArg, value, index); + }; + } + exports2.not = not; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/filter.js + var require_filter2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/filter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filter = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function filter(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return predicate.call(thisArg, value, index++) && subscriber.next(value); + })); + }); + } + exports2.filter = filter; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/partition.js + var require_partition = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter2(); + var innerFrom_1 = require_innerFrom(); + function partition(source, predicate, thisArg) { + return [filter_1.filter(predicate, thisArg)(innerFrom_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(innerFrom_1.innerFrom(source))]; + } + exports2.partition = partition; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/race.js + var require_race = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/race.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceInit = exports2.race = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function race() { + var sources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + sources[_i2] = arguments[_i2]; + } + sources = argsOrArgArray_1.argsOrArgArray(sources); + return sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources)); + } + exports2.race = race; + function raceInit(sources) { + return function(subscriber) { + var subscriptions = []; + var _loop_1 = function(i10) { + subscriptions.push(innerFrom_1.innerFrom(sources[i10]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i10 && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + }; + for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + _loop_1(i); + } + }; + } + exports2.raceInit = raceInit; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/range.js + var require_range2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.range = void 0; + var Observable_1 = require_Observable(); + var empty_1 = require_empty3(); + function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return empty_1.EMPTY; + } + var end = count + start; + return new Observable_1.Observable(scheduler ? function(subscriber) { + var n = start; + return scheduler.schedule(function() { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } else { + subscriber.complete(); + } + }); + } : function(subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); + } + exports2.range = range; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/using.js + var require_using = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/using.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.using = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var empty_1 = require_empty3(); + function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function(subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? innerFrom_1.innerFrom(result) : empty_1.EMPTY; + source.subscribe(subscriber); + return function() { + if (resource) { + resource.unsubscribe(); + } + }; + }); + } + exports2.using = using; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/zip.js + var require_zip2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/zip.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var empty_1 = require_empty3(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var args_1 = require_args(); + function zip() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var resultSelector = args_1.popResultSelector(args); + var sources = argsOrArgArray_1.argsOrArgArray(args); + return sources.length ? new Observable_1.Observable(function(subscriber) { + var buffers = sources.map(function() { + return []; + }); + var completed = sources.map(function() { + return false; + }); + subscriber.add(function() { + buffers = completed = null; + }); + var _loop_1 = function(sourceIndex2) { + innerFrom_1.innerFrom(sources[sourceIndex2]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + buffers[sourceIndex2].push(value); + if (buffers.every(function(buffer) { + return buffer.length; + })) { + var result = buffers.map(function(buffer) { + return buffer.shift(); + }); + subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray2([], __read2(result))) : result); + if (buffers.some(function(buffer, i) { + return !buffer.length && completed[i]; + })) { + subscriber.complete(); + } + } + }, function() { + completed[sourceIndex2] = true; + !buffers[sourceIndex2].length && subscriber.complete(); + })); + }; + for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + _loop_1(sourceIndex); + } + return function() { + buffers = completed = null; + }; + }) : empty_1.EMPTY; + } + exports2.zip = zip; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/types.js + var require_types = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/audit.js + var require_audit = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/audit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.audit = void 0; + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function audit(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function() { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, endDuration, cleanupDuration)); + } + }, function() { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); + } + exports2.audit = audit; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/auditTime.js + var require_auditTime = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.auditTime = void 0; + var async_1 = require_async(); + var audit_1 = require_audit(); + var timer_1 = require_timer(); + function auditTime(duration, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return audit_1.audit(function() { + return timer_1.timer(duration, scheduler); + }); + } + exports2.auditTime = auditTime; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/buffer.js + var require_buffer4 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buffer = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function buffer(closingNotifier) { + return lift_1.operate(function(source, subscriber) { + var currentBuffer = []; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return currentBuffer.push(value); + }, function() { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + innerFrom_1.innerFrom(closingNotifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop_1.noop)); + return function() { + currentBuffer = null; + }; + }); + } + exports2.buffer = buffer; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js + var require_bufferCount = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + function bufferCount(bufferSize, startBufferEvery) { + if (startBufferEvery === void 0) { + startBufferEvery = null; + } + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return lift_1.operate(function(source, subscriber) { + var buffers = []; + var count = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a2, e_2, _b2; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + try { + for (var buffers_1 = __values2(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a2 = buffers_1.return)) + _a2.call(buffers_1); + } finally { + if (e_1) + throw e_1.error; + } + } + if (toEmit) { + try { + for (var toEmit_1 = __values2(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { + var buffer = toEmit_1_1.value; + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (toEmit_1_1 && !toEmit_1_1.done && (_b2 = toEmit_1.return)) + _b2.call(toEmit_1); + } finally { + if (e_2) + throw e_2.error; + } + } + } + }, function() { + var e_3, _a2; + try { + for (var buffers_2 = __values2(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if (buffers_2_1 && !buffers_2_1.done && (_a2 = buffers_2.return)) + _a2.call(buffers_2); + } finally { + if (e_3) + throw e_3.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffers = null; + })); + }); + } + exports2.bufferCount = bufferCount; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js + var require_bufferTime = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferTime = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var async_1 = require_async(); + var args_1 = require_args(); + var executeSchedule_1 = require_executeSchedule(); + function bufferTime(bufferTimeSpan) { + var _a2, _b2; + var otherArgs = []; + for (var _i2 = 1; _i2 < arguments.length; _i2++) { + otherArgs[_i2 - 1] = arguments[_i2]; + } + var scheduler = (_a2 = args_1.popScheduler(otherArgs)) !== null && _a2 !== void 0 ? _a2 : async_1.asyncScheduler; + var bufferCreationInterval = (_b2 = otherArgs[0]) !== null && _b2 !== void 0 ? _b2 : null; + var maxBufferSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var bufferRecords = []; + var restartOnEmit = false; + var emit = function(record) { + var buffer = record.buffer, subs = record.subs; + subs.unsubscribe(); + arrRemove_1.arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function() { + if (bufferRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer, + subs + }; + bufferRecords.push(record_1); + executeSchedule_1.executeSchedule(subs, scheduler, function() { + return emit(record_1); + }, bufferTimeSpan); + } + }; + if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { + executeSchedule_1.executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); + } else { + restartOnEmit = true; + } + startBuffer(); + var bufferTimeSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a3; + var recordsCopy = bufferRecords.slice(); + try { + for (var recordsCopy_1 = __values2(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a3 = recordsCopy_1.return)) + _a3.call(recordsCopy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, void 0, function() { + return bufferRecords = null; + }); + source.subscribe(bufferTimeSubscriber); + }); + } + exports2.bufferTime = bufferTime; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js + var require_bufferToggle = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferToggle = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop2(); + var arrRemove_1 = require_arrRemove(); + function bufferToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffers = []; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription_1.Subscription(); + var emitBuffer = function() { + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(innerFrom_1.innerFrom(closingSelector(openValue)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a2; + try { + for (var buffers_1 = __values2(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a2 = buffers_1.return)) + _a2.call(buffers_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); + } + exports2.bufferToggle = bufferToggle; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js + var require_bufferWhen = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferWhen = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function bufferWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffer = null; + var closingSubscriber = null; + var openBuffer = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + innerFrom_1.innerFrom(closingSelector()).subscribe(closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openBuffer, noop_1.noop)); + }; + openBuffer(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); + }, function() { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, void 0, function() { + return buffer = closingSubscriber = null; + })); + }); + } + exports2.bufferWhen = bufferWhen; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/catchError.js + var require_catchError = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.catchError = void 0; + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + function catchError3(selector) { + return lift_1.operate(function(source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, void 0, function(err) { + handledResult = innerFrom_1.innerFrom(selector(err, catchError3(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); + } + exports2.catchError = catchError3; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js + var require_scanInternals = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scanInternals = void 0; + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return function(source, subscriber) { + var hasState = hasSeed; + var state = seed; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var i = index++; + state = hasState ? accumulator(state, value, i) : (hasState = true, value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && function() { + hasState && subscriber.next(state); + subscriber.complete(); + })); + }; + } + exports2.scanInternals = scanInternals; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/reduce.js + var require_reduce = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reduce = void 0; + var scanInternals_1 = require_scanInternals(); + var lift_1 = require_lift(); + function reduce(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true)); + } + exports2.reduce = reduce; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/toArray.js + var require_toArray = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toArray = void 0; + var reduce_1 = require_reduce(); + var lift_1 = require_lift(); + var arrReducer = function(arr, value) { + return arr.push(value), arr; + }; + function toArray() { + return lift_1.operate(function(source, subscriber) { + reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber); + }); + } + exports2.toArray = toArray; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js + var require_joinAllInternals = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinAllInternals = void 0; + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var mergeMap_1 = require_mergeMap(); + var toArray_1 = require_toArray(); + function joinAllInternals(joinFn, project) { + return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function(sources) { + return joinFn(sources); + }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity); + } + exports2.joinAllInternals = joinAllInternals; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js + var require_combineLatestAll = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestAll = void 0; + var combineLatest_1 = require_combineLatest(); + var joinAllInternals_1 = require_joinAllInternals(); + function combineLatestAll(project) { + return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project); + } + exports2.combineLatestAll = combineLatestAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/combineAll.js + var require_combineAll = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineAll = void 0; + var combineLatestAll_1 = require_combineLatestAll(); + exports2.combineAll = combineLatestAll_1.combineLatestAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js + var require_combineLatest2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatest = void 0; + var combineLatest_1 = require_combineLatest(); + var lift_1 = require_lift(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var args_1 = require_args(); + function combineLatest3() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var resultSelector = args_1.popResultSelector(args); + return resultSelector ? pipe_1.pipe(combineLatest3.apply(void 0, __spreadArray2([], __read2(args))), mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : lift_1.operate(function(source, subscriber) { + combineLatest_1.combineLatestInit(__spreadArray2([source], __read2(argsOrArgArray_1.argsOrArgArray(args))))(subscriber); + }); + } + exports2.combineLatest = combineLatest3; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js + var require_combineLatestWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestWith = void 0; + var combineLatest_1 = require_combineLatest2(); + function combineLatestWith() { + var otherSources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + otherSources[_i2] = arguments[_i2]; + } + return combineLatest_1.combineLatest.apply(void 0, __spreadArray2([], __read2(otherSources))); + } + exports2.combineLatestWith = combineLatestWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/concatMap.js + var require_concatMap = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMap = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function concatMap(project, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1); + } + exports2.concatMap = concatMap; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js + var require_concatMapTo = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMapTo = void 0; + var concatMap_1 = require_concatMap(); + var isFunction_1 = require_isFunction(); + function concatMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function() { + return innerObservable; + }, resultSelector) : concatMap_1.concatMap(function() { + return innerObservable; + }); + } + exports2.concatMapTo = concatMapTo; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/concat.js + var require_concat3 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/concat.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var lift_1 = require_lift(); + var concatAll_1 = require_concatAll(); + var args_1 = require_args(); + var from_1 = require_from(); + function concat12() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var scheduler = args_1.popScheduler(args); + return lift_1.operate(function(source, subscriber) { + concatAll_1.concatAll()(from_1.from(__spreadArray2([source], __read2(args)), scheduler)).subscribe(subscriber); + }); + } + exports2.concat = concat12; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/concatWith.js + var require_concatWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatWith = void 0; + var concat_1 = require_concat3(); + function concatWith() { + var otherSources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + otherSources[_i2] = arguments[_i2]; + } + return concat_1.concat.apply(void 0, __spreadArray2([], __read2(otherSources))); + } + exports2.concatWith = concatWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js + var require_fromSubscribable = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromSubscribable = void 0; + var Observable_1 = require_Observable(); + function fromSubscribable(subscribable) { + return new Observable_1.Observable(function(subscriber) { + return subscribable.subscribe(subscriber); + }); + } + exports2.fromSubscribable = fromSubscribable; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/connect.js + var require_connect = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/connect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connect = void 0; + var Subject_1 = require_Subject(); + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var fromSubscribable_1 = require_fromSubscribable(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + } + }; + function connect(selector, config7) { + if (config7 === void 0) { + config7 = DEFAULT_CONFIG; + } + var connector = config7.connector; + return lift_1.operate(function(source, subscriber) { + var subject2 = connector(); + innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject2))).subscribe(subscriber); + subscriber.add(source.subscribe(subject2)); + }); + } + exports2.connect = connect; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/count.js + var require_count = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/count.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.count = void 0; + var reduce_1 = require_reduce(); + function count(predicate) { + return reduce_1.reduce(function(total, value, i) { + return !predicate || predicate(value, i) ? total + 1 : total; + }, 0); + } + exports2.count = count; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/debounce.js + var require_debounce = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounce = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function debounce(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var emit = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, emit, noop_1.noop); + innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = durationSubscriber = null; + })); + }); + } + exports2.debounce = debounce; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js + var require_debounceTime = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounceTime = void 0; + var async_1 = require_async(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function debounceTime2(dueTime, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return lift_1.operate(function(source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function() { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now2 = scheduler.now(); + if (now2 < targetTime) { + activeTask = this.schedule(void 0, targetTime - now2); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = activeTask = null; + })); + }); + } + exports2.debounceTime = debounceTime2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js + var require_defaultIfEmpty = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultIfEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function defaultIfEmpty(defaultValue) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); + } + exports2.defaultIfEmpty = defaultIfEmpty; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/take.js + var require_take = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/take.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.take = void 0; + var empty_1 = require_empty3(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function take2(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var seen = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); + } + exports2.take = take2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js + var require_ignoreElements = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ignoreElements = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop2(); + function ignoreElements() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, noop_1.noop)); + }); + } + exports2.ignoreElements = ignoreElements; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/mapTo.js + var require_mapTo = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapTo = void 0; + var map_1 = require_map(); + function mapTo(value) { + return map_1.map(function() { + return value; + }); + } + exports2.mapTo = mapTo; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js + var require_delayWhen = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delayWhen = void 0; + var concat_1 = require_concat2(); + var take_1 = require_take(); + var ignoreElements_1 = require_ignoreElements(); + var mapTo_1 = require_mapTo(); + var mergeMap_1 = require_mergeMap(); + var innerFrom_1 = require_innerFrom(); + function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function(source) { + return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap_1.mergeMap(function(value, index) { + return innerFrom_1.innerFrom(delayDurationSelector(value, index)).pipe(take_1.take(1), mapTo_1.mapTo(value)); + }); + } + exports2.delayWhen = delayWhen; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/delay.js + var require_delay = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = void 0; + var async_1 = require_async(); + var delayWhen_1 = require_delayWhen(); + var timer_1 = require_timer(); + function delay(due2, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + var duration = timer_1.timer(due2, scheduler); + return delayWhen_1.delayWhen(function() { + return duration; + }); + } + exports2.delay = delay; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js + var require_dematerialize = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dematerialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function dematerialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(notification) { + return Notification_1.observeNotification(notification, subscriber); + })); + }); + } + exports2.dematerialize = dematerialize; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/distinct.js + var require_distinct = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinct = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop2(); + var innerFrom_1 = require_innerFrom(); + function distinct(keySelector, flushes) { + return lift_1.operate(function(source, subscriber) { + var distinctKeys = /* @__PURE__ */ new Set(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var key2 = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key2)) { + distinctKeys.add(key2); + subscriber.next(value); + } + })); + flushes && innerFrom_1.innerFrom(flushes).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + return distinctKeys.clear(); + }, noop_1.noop)); + }); + } + exports2.distinct = distinct; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js + var require_distinctUntilChanged = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilChanged = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function distinctUntilChanged(comparator, keySelector) { + if (keySelector === void 0) { + keySelector = identity_1.identity; + } + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return lift_1.operate(function(source, subscriber) { + var previousKey; + var first = true; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); + } + exports2.distinctUntilChanged = distinctUntilChanged; + function defaultCompare(a, b) { + return a === b; + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js + var require_distinctUntilKeyChanged = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilKeyChanged = void 0; + var distinctUntilChanged_1 = require_distinctUntilChanged(); + function distinctUntilKeyChanged(key2, compare2) { + return distinctUntilChanged_1.distinctUntilChanged(function(x, y) { + return compare2 ? compare2(x[key2], y[key2]) : x[key2] === y[key2]; + }); + } + exports2.distinctUntilKeyChanged = distinctUntilKeyChanged; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js + var require_throwIfEmpty = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwIfEmpty = void 0; + var EmptyError_1 = require_EmptyError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + return hasValue ? subscriber.complete() : subscriber.error(errorFactory()); + })); + }); + } + exports2.throwIfEmpty = throwIfEmpty; + function defaultErrorFactory() { + return new EmptyError_1.EmptyError(); + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/elementAt.js + var require_elementAt = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.elementAt = void 0; + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + var filter_1 = require_filter2(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var take_1 = require_take(); + function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(filter_1.filter(function(v, i) { + return i === index; + }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + })); + }; + } + exports2.elementAt = elementAt; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/endWith.js + var require_endWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.endWith = void 0; + var concat_1 = require_concat2(); + var of_1 = require_of(); + function endWith() { + var values = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + values[_i2] = arguments[_i2]; + } + return function(source) { + return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray2([], __read2(values)))); + }; + } + exports2.endWith = endWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/every.js + var require_every = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/every.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.every = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function every(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.every = every; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js + var require_exhaustMap = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustMap = void 0; + var map_1 = require_map(); + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function exhaustMap(project, resultSelector) { + if (resultSelector) { + return function(source) { + return source.pipe(exhaustMap(function(a, i) { + return innerFrom_1.innerFrom(project(a, i)).pipe(map_1.map(function(b, ii2) { + return resultSelector(a, b, i, ii2); + })); + })); + }; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(outerValue) { + if (!innerSub) { + innerSub = OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() { + innerSub = null; + isComplete && subscriber.complete(); + }); + innerFrom_1.innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, function() { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); + } + exports2.exhaustMap = exhaustMap; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js + var require_exhaustAll = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustAll = void 0; + var exhaustMap_1 = require_exhaustMap(); + var identity_1 = require_identity(); + function exhaustAll() { + return exhaustMap_1.exhaustMap(identity_1.identity); + } + exports2.exhaustAll = exhaustAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/exhaust.js + var require_exhaust = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaust = void 0; + var exhaustAll_1 = require_exhaustAll(); + exports2.exhaust = exhaustAll_1.exhaustAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/expand.js + var require_expand2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/expand.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.expand = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function expand(project, concurrent, scheduler) { + if (concurrent === void 0) { + concurrent = Infinity; + } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, void 0, true, scheduler); + }); + } + exports2.expand = expand; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/finalize.js + var require_finalize = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.finalize = void 0; + var lift_1 = require_lift(); + function finalize(callback) { + return lift_1.operate(function(source, subscriber) { + try { + source.subscribe(subscriber); + } finally { + subscriber.add(callback); + } + }); + } + exports2.finalize = finalize; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/find.js + var require_find = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/find.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFind = exports2.find = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function find(predicate, thisArg) { + return lift_1.operate(createFind(predicate, thisArg, "value")); + } + exports2.find = find; + function createFind(predicate, thisArg, emit) { + var findIndex = emit === "index"; + return function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, function() { + subscriber.next(findIndex ? -1 : void 0); + subscriber.complete(); + })); + }; + } + exports2.createFind = createFind; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/findIndex.js + var require_findIndex = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findIndex = void 0; + var lift_1 = require_lift(); + var find_1 = require_find(); + function findIndex(predicate, thisArg) { + return lift_1.operate(find_1.createFind(predicate, thisArg, "index")); + } + exports2.findIndex = findIndex; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/first.js + var require_first = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/first.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.first = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter2(); + var take_1 = require_take(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var identity_1 = require_identity(); + function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.first = first; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/groupBy.js + var require_groupBy = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.groupBy = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function groupBy(keySelector, elementOrOptions, duration, connector) { + return lift_1.operate(function(source, subscriber) { + var element; + if (!elementOrOptions || typeof elementOrOptions === "function") { + element = elementOrOptions; + } else { + duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector; + } + var groups = /* @__PURE__ */ new Map(); + var notify = function(cb2) { + groups.forEach(cb2); + cb2(subscriber); + }; + var handleError = function(err) { + return notify(function(consumer) { + return consumer.error(err); + }); + }; + var activeGroups = 0; + var teardownAttempted = false; + var groupBySourceSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set(key_1, group_1 = connector ? connector() : new Subject_1.Subject()); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(group_1, function() { + group_1.complete(); + durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); + }, void 0, void 0, function() { + return groups.delete(key_1); + }); + groupBySourceSubscriber.add(innerFrom_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + group_1.next(element ? element(value) : value); + } catch (err) { + handleError(err); + } + }, function() { + return notify(function(consumer) { + return consumer.complete(); + }); + }, handleError, function() { + return groups.clear(); + }, function() { + teardownAttempted = true; + return activeGroups === 0; + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key2, groupSubject) { + var result = new Observable_1.Observable(function(groupSubscriber) { + activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function() { + innerSub.unsubscribe(); + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key2; + return result; + } + }); + } + exports2.groupBy = groupBy; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js + var require_isEmpty = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function isEmpty() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + subscriber.next(false); + subscriber.complete(); + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.isEmpty = isEmpty; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/takeLast.js + var require_takeLast = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeLast = void 0; + var empty_1 = require_empty3(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeLast(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var buffer = []; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, function() { + var e_1, _a2; + try { + for (var buffer_1 = __values2(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a2 = buffer_1.return)) + _a2.call(buffer_1); + } finally { + if (e_1) + throw e_1.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffer = null; + })); + }); + } + exports2.takeLast = takeLast; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/last.js + var require_last = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/last.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.last = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter2(); + var takeLast_1 = require_takeLast(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var identity_1 = require_identity(); + function last2(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.last = last2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/materialize.js + var require_materialize = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.materialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function materialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + subscriber.next(Notification_1.Notification.createNext(value)); + }, function() { + subscriber.next(Notification_1.Notification.createComplete()); + subscriber.complete(); + }, function(err) { + subscriber.next(Notification_1.Notification.createError(err)); + subscriber.complete(); + })); + }); + } + exports2.materialize = materialize; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/max.js + var require_max = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/max.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.max = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function max2(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) > 0 ? x : y; + } : function(x, y) { + return x > y ? x : y; + }); + } + exports2.max = max2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/flatMap.js + var require_flatMap = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.flatMap = void 0; + var mergeMap_1 = require_mergeMap(); + exports2.flatMap = mergeMap_1.mergeMap; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js + var require_mergeMapTo = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMapTo = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, resultSelector, concurrent); + } + if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, concurrent); + } + exports2.mergeMapTo = mergeMapTo; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js + var require_mergeScan = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeScan = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return lift_1.operate(function(source, subscriber) { + var state = seed; + return mergeInternals_1.mergeInternals(source, subscriber, function(value, index) { + return accumulator(state, value, index); + }, concurrent, function(value) { + state = value; + }, false, void 0, function() { + return state = null; + }); + }); + } + exports2.mergeScan = mergeScan; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/merge.js + var require_merge2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/merge.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var lift_1 = require_lift(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var mergeAll_1 = require_mergeAll(); + var args_1 = require_args(); + var from_1 = require_from(); + function merge() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + var scheduler = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + args = argsOrArgArray_1.argsOrArgArray(args); + return lift_1.operate(function(source, subscriber) { + mergeAll_1.mergeAll(concurrent)(from_1.from(__spreadArray2([source], __read2(args)), scheduler)).subscribe(subscriber); + }); + } + exports2.merge = merge; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js + var require_mergeWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeWith = void 0; + var merge_1 = require_merge2(); + function mergeWith() { + var otherSources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + otherSources[_i2] = arguments[_i2]; + } + return merge_1.merge.apply(void 0, __spreadArray2([], __read2(otherSources))); + } + exports2.mergeWith = mergeWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/min.js + var require_min3 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/min.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.min = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function min(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) < 0 ? x : y; + } : function(x, y) { + return x < y ? x : y; + }); + } + exports2.min = min; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/multicast.js + var require_multicast = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multicast = void 0; + var ConnectableObservable_1 = require_ConnectableObservable(); + var isFunction_1 = require_isFunction(); + var connect_1 = require_connect(); + function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function() { + return subjectOrSubjectFactory; + }; + if (isFunction_1.isFunction(selector)) { + return connect_1.connect(selector, { + connector: subjectFactory + }); + } + return function(source) { + return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); + }; + } + exports2.multicast = multicast; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js + var require_onErrorResumeNextWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = exports2.onErrorResumeNextWith = void 0; + var argsOrArgArray_1 = require_argsOrArgArray(); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + function onErrorResumeNextWith() { + var sources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + sources[_i2] = arguments[_i2]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return function(source) { + return onErrorResumeNext_1.onErrorResumeNext.apply(void 0, __spreadArray2([source], __read2(nextSources))); + }; + } + exports2.onErrorResumeNextWith = onErrorResumeNextWith; + exports2.onErrorResumeNext = onErrorResumeNextWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/pairwise.js + var require_pairwise = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairwise = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function pairwise() { + return lift_1.operate(function(source, subscriber) { + var prev; + var hasPrev = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); + } + exports2.pairwise = pairwise; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/pluck.js + var require_pluck = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pluck = void 0; + var map_1 = require_map(); + function pluck() { + var properties = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + properties[_i2] = arguments[_i2]; + } + var length = properties.length; + if (length === 0) { + throw new Error("list of properties cannot be empty."); + } + return map_1.map(function(x) { + var currentProp = x; + for (var i = 0; i < length; i++) { + var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== "undefined") { + currentProp = p; + } else { + return void 0; + } + } + return currentProp; + }); + } + exports2.pluck = pluck; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/publish.js + var require_publish = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/publish.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publish = void 0; + var Subject_1 = require_Subject(); + var multicast_1 = require_multicast(); + var connect_1 = require_connect(); + function publish(selector) { + return selector ? function(source) { + return connect_1.connect(selector)(source); + } : function(source) { + return multicast_1.multicast(new Subject_1.Subject())(source); + }; + } + exports2.publish = publish; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js + var require_publishBehavior = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishBehavior = void 0; + var BehaviorSubject_1 = require_BehaviorSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishBehavior(initialValue) { + return function(source) { + var subject2 = new BehaviorSubject_1.BehaviorSubject(initialValue); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject2; + }); + }; + } + exports2.publishBehavior = publishBehavior; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/publishLast.js + var require_publishLast = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishLast = void 0; + var AsyncSubject_1 = require_AsyncSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishLast() { + return function(source) { + var subject2 = new AsyncSubject_1.AsyncSubject(); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject2; + }); + }; + } + exports2.publishLast = publishLast; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js + var require_publishReplay = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var multicast_1 = require_multicast(); + var isFunction_1 = require_isFunction(); + function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction_1.isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction_1.isFunction(selectorOrScheduler) ? selectorOrScheduler : void 0; + return function(source) { + return multicast_1.multicast(new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); + }; + } + exports2.publishReplay = publishReplay; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/raceWith.js + var require_raceWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceWith = void 0; + var race_1 = require_race(); + var lift_1 = require_lift(); + var identity_1 = require_identity(); + function raceWith() { + var otherSources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + otherSources[_i2] = arguments[_i2]; + } + return !otherSources.length ? identity_1.identity : lift_1.operate(function(source, subscriber) { + race_1.raceInit(__spreadArray2([source], __read2(otherSources)))(subscriber); + }); + } + exports2.raceWith = raceWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/repeat.js + var require_repeat = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeat = void 0; + var empty_1 = require_empty3(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var timer_1 = require_timer(); + function repeat(countOrConfig) { + var _a2; + var count = Infinity; + var delay; + if (countOrConfig != null) { + if (typeof countOrConfig === "object") { + _a2 = countOrConfig.count, count = _a2 === void 0 ? Infinity : _a2, delay = countOrConfig.delay; + } else { + count = countOrConfig; + } + } + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var sourceSub; + var resubscribe = function() { + sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = typeof delay === "number" ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar)); + var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber_1); + } else { + subscribeToSource(); + } + }; + var subscribeToSource = function() { + var syncUnsub = false; + sourceSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + })); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); + } + exports2.repeat = repeat; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js + var require_repeatWhen = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeatWhen = void 0; + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function repeatWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function() { + return isMainComplete && isNotifierComplete && (subscriber.complete(), true); + }; + var getCompletionSubject = function() { + if (!completions$) { + completions$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(completions$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, function() { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function() { + isMainComplete = false; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); + } + exports2.repeatWhen = repeatWhen; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/retry.js + var require_retry = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/retry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retry = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + var timer_1 = require_timer(); + var innerFrom_1 = require_innerFrom(); + function retry(configOrCount) { + if (configOrCount === void 0) { + configOrCount = Infinity; + } + var config7; + if (configOrCount && typeof configOrCount === "object") { + config7 = configOrCount; + } else { + config7 = { + count: configOrCount + }; + } + var _a2 = config7.count, count = _a2 === void 0 ? Infinity : _a2, delay = config7.delay, _b2 = config7.resetOnSuccess, resetOnSuccess = _b2 === void 0 ? false : _b2; + return count <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRetry = function() { + var syncUnsub = false; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, void 0, function(err) { + if (soFar++ < count) { + var resub_1 = function() { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = typeof delay === "number" ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, function() { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber_1); + } else { + resub_1(); + } + } else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); + } + exports2.retry = retry; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js + var require_retryWhen = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWhen = void 0; + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function retryWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var errors$; + var subscribeForRetryWhen = function() { + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, void 0, function(err) { + if (!errors$) { + errors$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(errors$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + return innerSub ? subscribeForRetryWhen() : syncResub = true; + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); + } + exports2.retryWhen = retryWhen; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/sample.js + var require_sample = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/sample.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sample = void 0; + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var noop_1 = require_noop2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function sample(notifier) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + })); + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, noop_1.noop)); + }); + } + exports2.sample = sample; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js + var require_sampleTime = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sampleTime = void 0; + var async_1 = require_async(); + var sample_1 = require_sample(); + var interval_1 = require_interval(); + function sampleTime(period, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return sample_1.sample(interval_1.interval(period, scheduler)); + } + exports2.sampleTime = sampleTime; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/scan.js + var require_scan = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/scan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scan = void 0; + var lift_1 = require_lift(); + var scanInternals_1 = require_scanInternals(); + function scan(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true)); + } + exports2.scan = scan; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js + var require_sequenceEqual = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sequenceEqual = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { + comparator = function(a, b) { + return a === b; + }; + } + return lift_1.operate(function(source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function(isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function(selfState, otherState) { + var sequenceEqualSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(a) { + var buffer = otherState.buffer, complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, function() { + selfState.complete = true; + var complete = otherState.complete, buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + innerFrom_1.innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); + } + exports2.sequenceEqual = sequenceEqual; + function createState() { + return { + buffer: [], + complete: false + }; + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/share.js + var require_share = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/share.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.share = void 0; + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var Subscriber_1 = require_Subscriber(); + var lift_1 = require_lift(); + function share2(options) { + if (options === void 0) { + options = {}; + } + var _a2 = options.connector, connector = _a2 === void 0 ? function() { + return new Subject_1.Subject(); + } : _a2, _b2 = options.resetOnError, resetOnError = _b2 === void 0 ? true : _b2, _c2 = options.resetOnComplete, resetOnComplete = _c2 === void 0 ? true : _c2, _d2 = options.resetOnRefCountZero, resetOnRefCountZero = _d2 === void 0 ? true : _d2; + return function(wrapperSource) { + var connection; + var resetConnection; + var subject2; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function() { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = void 0; + }; + var reset = function() { + cancelReset(); + connection = subject2 = void 0; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function() { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return lift_1.operate(function(source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = subject2 = subject2 !== null && subject2 !== void 0 ? subject2 : connector(); + subscriber.add(function() { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset2(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && refCount > 0) { + connection = new Subscriber_1.SafeSubscriber({ + next: function(value) { + return dest.next(value); + }, + error: function(err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset2(reset, resetOnError, err); + dest.error(err); + }, + complete: function() { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset2(reset, resetOnComplete); + dest.complete(); + } + }); + innerFrom_1.innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; + } + exports2.share = share2; + function handleReset2(reset, on2) { + var args = []; + for (var _i2 = 2; _i2 < arguments.length; _i2++) { + args[_i2 - 2] = arguments[_i2]; + } + if (on2 === true) { + reset(); + return; + } + if (on2 === false) { + return; + } + var onSubscriber = new Subscriber_1.SafeSubscriber({ + next: function() { + onSubscriber.unsubscribe(); + reset(); + } + }); + return innerFrom_1.innerFrom(on2.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber); + } + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js + var require_shareReplay = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shareReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var share_1 = require_share(); + function shareReplay2(configOrBufferSize, windowTime, scheduler) { + var _a2, _b2, _c2; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === "object") { + _a2 = configOrBufferSize.bufferSize, bufferSize = _a2 === void 0 ? Infinity : _a2, _b2 = configOrBufferSize.windowTime, windowTime = _b2 === void 0 ? Infinity : _b2, _c2 = configOrBufferSize.refCount, refCount = _c2 === void 0 ? false : _c2, scheduler = configOrBufferSize.scheduler; + } else { + bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; + } + return share_1.share({ + connector: function() { + return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler); + }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount + }); + } + exports2.shareReplay = shareReplay2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/single.js + var require_single = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/single.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.single = void 0; + var EmptyError_1 = require_EmptyError(); + var SequenceError_1 = require_SequenceError(); + var NotFoundError_1 = require_NotFoundError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function single(predicate) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError_1.SequenceError("Too many matching values")); + hasValue = true; + singleValue = value; + } + }, function() { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error(seenValue ? new NotFoundError_1.NotFoundError("No matching values") : new EmptyError_1.EmptyError()); + } + })); + }); + } + exports2.single = single; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/skip.js + var require_skip = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/skip.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skip = void 0; + var filter_1 = require_filter2(); + function skip(count) { + return filter_1.filter(function(_, index) { + return count <= index; + }); + } + exports2.skip = skip; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/skipLast.js + var require_skipLast = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipLast = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipLast(skipCount) { + return skipCount <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return function() { + ring = null; + }; + }); + } + exports2.skipLast = skipLast; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js + var require_skipUntil = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var noop_1 = require_noop2(); + function skipUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop_1.noop); + innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return taking && subscriber.next(value); + })); + }); + } + exports2.skipUntil = skipUntil; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js + var require_skipWhile = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipWhile2(predicate) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); + })); + }); + } + exports2.skipWhile = skipWhile2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/startWith.js + var require_startWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.startWith = void 0; + var concat_1 = require_concat2(); + var args_1 = require_args(); + var lift_1 = require_lift(); + function startWith2() { + var values = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + values[_i2] = arguments[_i2]; + } + var scheduler = args_1.popScheduler(values); + return lift_1.operate(function(source, subscriber) { + (scheduler ? concat_1.concat(values, source, scheduler) : concat_1.concat(values, source)).subscribe(subscriber); + }); + } + exports2.startWith = startWith2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/switchMap.js + var require_switchMap = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMap = void 0; + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function switchMap2(project, resultSelector) { + return lift_1.operate(function(source, subscriber) { + var innerSubscriber = null; + var index = 0; + var isComplete = false; + var checkComplete = function() { + return isComplete && !innerSubscriber && subscriber.complete(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom_1.innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(innerValue) { + return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); + }, function() { + innerSubscriber = null; + checkComplete(); + })); + }, function() { + isComplete = true; + checkComplete(); + })); + }); + } + exports2.switchMap = switchMap2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/switchAll.js + var require_switchAll = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchAll = void 0; + var switchMap_1 = require_switchMap(); + var identity_1 = require_identity(); + function switchAll() { + return switchMap_1.switchMap(identity_1.identity); + } + exports2.switchAll = switchAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js + var require_switchMapTo = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMapTo = void 0; + var switchMap_1 = require_switchMap(); + var isFunction_1 = require_isFunction(); + function switchMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function() { + return innerObservable; + }, resultSelector) : switchMap_1.switchMap(function() { + return innerObservable; + }); + } + exports2.switchMapTo = switchMapTo; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/switchScan.js + var require_switchScan = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchScan = void 0; + var switchMap_1 = require_switchMap(); + var lift_1 = require_lift(); + function switchScan(accumulator, seed) { + return lift_1.operate(function(source, subscriber) { + var state = seed; + switchMap_1.switchMap(function(value, index) { + return accumulator(state, value, index); + }, function(_, innerValue) { + return state = innerValue, innerValue; + })(source).subscribe(subscriber); + return function() { + state = null; + }; + }); + } + exports2.switchScan = switchScan; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js + var require_takeUntil = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var noop_1 = require_noop2(); + function takeUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + return subscriber.complete(); + }, noop_1.noop)); + !subscriber.closed && source.subscribe(subscriber); + }); + } + exports2.takeUntil = takeUntil; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js + var require_takeWhile = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { + inclusive = false; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); + } + exports2.takeWhile = takeWhile; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/tap.js + var require_tap = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/tap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tap = void 0; + var isFunction_1 = require_isFunction(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + function tap2(observerOrNext, error, complete) { + var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext; + return tapObserver ? lift_1.operate(function(source, subscriber) { + var _a2; + (_a2 = tapObserver.subscribe) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); + var isUnsub = true; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var _a3; + (_a3 = tapObserver.next) === null || _a3 === void 0 ? void 0 : _a3.call(tapObserver, value); + subscriber.next(value); + }, function() { + var _a3; + isUnsub = false; + (_a3 = tapObserver.complete) === null || _a3 === void 0 ? void 0 : _a3.call(tapObserver); + subscriber.complete(); + }, function(err) { + var _a3; + isUnsub = false; + (_a3 = tapObserver.error) === null || _a3 === void 0 ? void 0 : _a3.call(tapObserver, err); + subscriber.error(err); + }, function() { + var _a3, _b2; + if (isUnsub) { + (_a3 = tapObserver.unsubscribe) === null || _a3 === void 0 ? void 0 : _a3.call(tapObserver); + } + (_b2 = tapObserver.finalize) === null || _b2 === void 0 ? void 0 : _b2.call(tapObserver); + })); + }) : identity_1.identity; + } + exports2.tap = tap2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/throttle.js + var require_throttle = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttle = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function throttle(durationSelector, config7) { + return lift_1.operate(function(source, subscriber) { + var _a2 = config7 !== null && config7 !== void 0 ? config7 : {}, _b2 = _a2.leading, leading = _b2 === void 0 ? true : _b2, _c2 = _a2.trailing, trailing = _c2 === void 0 ? false : _c2; + var hasValue = false; + var sendValue = null; + var throttled = null; + var isComplete = false; + var endThrottling = function() { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function() { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function(value) { + return throttled = innerFrom_1.innerFrom(durationSelector(value)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)); + }; + var send = function() { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, function() { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); + } + exports2.throttle = throttle; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js + var require_throttleTime = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttleTime = void 0; + var async_1 = require_async(); + var throttle_1 = require_throttle(); + var timer_1 = require_timer(); + function throttleTime(duration, scheduler, config7) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + var duration$ = timer_1.timer(duration, scheduler); + return throttle_1.throttle(function() { + return duration$; + }, config7); + } + exports2.throttleTime = throttleTime; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js + var require_timeInterval = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TimeInterval = exports2.timeInterval = void 0; + var async_1 = require_async(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function timeInterval(scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return lift_1.operate(function(source, subscriber) { + var last2 = scheduler.now(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var now2 = scheduler.now(); + var interval = now2 - last2; + last2 = now2; + subscriber.next(new TimeInterval(value, interval)); + })); + }); + } + exports2.timeInterval = timeInterval; + var TimeInterval = function() { + function TimeInterval2(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval2; + }(); + exports2.TimeInterval = TimeInterval; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js + var require_timeoutWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutWith = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate(); + var timeout_1 = require_timeout(); + function timeoutWith(due2, withObservable, scheduler) { + var first; + var each; + var _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.async; + if (isDate_1.isValidDate(due2)) { + first = due2; + } else if (typeof due2 === "number") { + each = due2; + } + if (withObservable) { + _with = function() { + return withObservable; + }; + } else { + throw new TypeError("No observable provided to switch to"); + } + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return timeout_1.timeout({ + first, + each, + scheduler, + with: _with + }); + } + exports2.timeoutWith = timeoutWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/timestamp.js + var require_timestamp = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timestamp = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var map_1 = require_map(); + function timestamp(timestampProvider) { + if (timestampProvider === void 0) { + timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + return map_1.map(function(value) { + return { value, timestamp: timestampProvider.now() }; + }); + } + exports2.timestamp = timestamp; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/window.js + var require_window = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/window.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.window = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop2(); + var innerFrom_1 = require_innerFrom(); + function window2(windowBoundaries) { + return lift_1.operate(function(source, subscriber) { + var windowSubject = new Subject_1.Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function(err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); + }, function() { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + innerFrom_1.innerFrom(windowBoundaries).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + windowSubject.complete(); + subscriber.next(windowSubject = new Subject_1.Subject()); + }, noop_1.noop, errorHandler)); + return function() { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); + } + exports2.window = window2; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/windowCount.js + var require_windowCount = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowCount = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function windowCount(windowSize, startWindowEvery) { + if (startWindowEvery === void 0) { + startWindowEvery = 0; + } + var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return lift_1.operate(function(source, subscriber) { + var windows = [new Subject_1.Subject()]; + var starts = []; + var count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a2; + try { + for (var windows_1 = __values2(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windows_1_1 && !windows_1_1.done && (_a2 = windows_1.return)) + _a2.call(windows_1); + } finally { + if (e_1) + throw e_1.error; + } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject_1.Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, function() { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, function(err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, function() { + starts = null; + windows = null; + })); + }); + } + exports2.windowCount = windowCount; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/windowTime.js + var require_windowTime = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowTime = void 0; + var Subject_1 = require_Subject(); + var async_1 = require_async(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var args_1 = require_args(); + var executeSchedule_1 = require_executeSchedule(); + function windowTime(windowTimeSpan) { + var _a2, _b2; + var otherArgs = []; + for (var _i2 = 1; _i2 < arguments.length; _i2++) { + otherArgs[_i2 - 1] = arguments[_i2]; + } + var scheduler = (_a2 = args_1.popScheduler(otherArgs)) !== null && _a2 !== void 0 ? _a2 : async_1.asyncScheduler; + var windowCreationInterval = (_b2 = otherArgs[0]) !== null && _b2 !== void 0 ? _b2 : null; + var maxWindowSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var windowRecords = []; + var restartOnClose = false; + var closeWindow = function(record) { + var window2 = record.window, subs = record.subs; + window2.complete(); + subs.unsubscribe(); + arrRemove_1.arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function() { + if (windowRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var window_1 = new Subject_1.Subject(); + var record_1 = { + window: window_1, + subs, + seen: 0 + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + executeSchedule_1.executeSchedule(subs, scheduler, function() { + return closeWindow(record_1); + }, windowTimeSpan); + } + }; + if (windowCreationInterval !== null && windowCreationInterval >= 0) { + executeSchedule_1.executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); + } else { + restartOnClose = true; + } + startWindow(); + var loop = function(cb2) { + return windowRecords.slice().forEach(cb2); + }; + var terminate = function(cb2) { + loop(function(_a3) { + var window2 = _a3.window; + return cb2(window2); + }); + cb2(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + loop(function(record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, function() { + return terminate(function(consumer) { + return consumer.complete(); + }); + }, function(err) { + return terminate(function(consumer) { + return consumer.error(err); + }); + })); + return function() { + windowRecords = null; + }; + }); + } + exports2.windowTime = windowTime; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js + var require_windowToggle = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowToggle = void 0; + var Subject_1 = require_Subject(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop2(); + var arrRemove_1 = require_arrRemove(); + function windowToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var windows = []; + var handleError = function(err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(openValue) { + var window2 = new Subject_1.Subject(); + windows.push(window2); + var closingSubscription = new Subscription_1.Subscription(); + var closeWindow = function() { + arrRemove_1.arrRemove(windows, window2); + window2.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom_1.innerFrom(closingSelector(openValue)); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window2.asObservable()); + closingSubscription.add(closingNotifier.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a2; + var windowsCopy = windows.slice(); + try { + for (var windowsCopy_1 = __values2(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a2 = windowsCopy_1.return)) + _a2.call(windowsCopy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, function() { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); + } + exports2.windowToggle = windowToggle; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js + var require_windowWhen = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function windowWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var window2; + var closingSubscriber; + var handleError = function(err) { + window2.error(err); + subscriber.error(err); + }; + var openWindow = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 === null || window2 === void 0 ? void 0 : window2.complete(); + window2 = new Subject_1.Subject(); + subscriber.next(window2.asObservable()); + var closingNotifier; + try { + closingNotifier = innerFrom_1.innerFrom(closingSelector()); + } catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe(closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)); + }; + openWindow(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return window2.next(value); + }, function() { + window2.complete(); + subscriber.complete(); + }, handleError, function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 = null; + })); + }); + } + exports2.windowWhen = windowWhen; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js + var require_withLatestFrom = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.withLatestFrom = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var identity_1 = require_identity(); + var noop_1 = require_noop2(); + var args_1 = require_args(); + function withLatestFrom() { + var inputs = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + inputs[_i2] = arguments[_i2]; + } + var project = args_1.popResultSelector(inputs); + return lift_1.operate(function(source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function() { + return false; + }); + var ready = false; + var _loop_1 = function(i10) { + innerFrom_1.innerFrom(inputs[i10]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + otherValues[i10] = value; + if (!ready && !hasValue[i10]) { + hasValue[i10] = true; + (ready = hasValue.every(identity_1.identity)) && (hasValue = null); + } + }, noop_1.noop)); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (ready) { + var values = __spreadArray2([value], __read2(otherValues)); + subscriber.next(project ? project.apply(void 0, __spreadArray2([], __read2(values))) : values); + } + })); + }); + } + exports2.withLatestFrom = withLatestFrom; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/zipAll.js + var require_zipAll = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipAll = void 0; + var zip_1 = require_zip2(); + var joinAllInternals_1 = require_joinAllInternals(); + function zipAll(project) { + return joinAllInternals_1.joinAllInternals(zip_1.zip, project); + } + exports2.zipAll = zipAll; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/zip.js + var require_zip3 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/zip.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var zip_1 = require_zip2(); + var lift_1 = require_lift(); + function zip() { + var sources = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + sources[_i2] = arguments[_i2]; + } + return lift_1.operate(function(source, subscriber) { + zip_1.zip.apply(void 0, __spreadArray2([source], __read2(sources))).subscribe(subscriber); + }); + } + exports2.zip = zip; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/zipWith.js + var require_zipWith = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipWith = void 0; + var zip_1 = require_zip3(); + function zipWith() { + var otherInputs = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + otherInputs[_i2] = arguments[_i2]; + } + return zip_1.zip.apply(void 0, __spreadArray2([], __read2(otherInputs))); + } + exports2.zipWith = zipWith; + } + }); + + // ../../node_modules/rxjs/dist/cjs/index.js + var require_cjs7 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k22) { + if (k22 === void 0) + k22 = k; + Object.defineProperty(o, k22, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k22) { + if (k22 === void 0) + k22 = k; + o[k22] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = exports2.iif = exports2.generate = exports2.fromEventPattern = exports2.fromEvent = exports2.from = exports2.forkJoin = exports2.empty = exports2.defer = exports2.connectable = exports2.concat = exports2.combineLatest = exports2.bindNodeCallback = exports2.bindCallback = exports2.UnsubscriptionError = exports2.TimeoutError = exports2.SequenceError = exports2.ObjectUnsubscribedError = exports2.NotFoundError = exports2.EmptyError = exports2.ArgumentOutOfRangeError = exports2.firstValueFrom = exports2.lastValueFrom = exports2.isObservable = exports2.identity = exports2.noop = exports2.pipe = exports2.NotificationKind = exports2.Notification = exports2.Subscriber = exports2.Subscription = exports2.Scheduler = exports2.VirtualAction = exports2.VirtualTimeScheduler = exports2.animationFrameScheduler = exports2.animationFrame = exports2.queueScheduler = exports2.queue = exports2.asyncScheduler = exports2.async = exports2.asapScheduler = exports2.asap = exports2.AsyncSubject = exports2.ReplaySubject = exports2.BehaviorSubject = exports2.Subject = exports2.animationFrames = exports2.observable = exports2.ConnectableObservable = exports2.Observable = void 0; + exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.combineLatestWith = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = exports2.config = exports2.NEVER = exports2.EMPTY = exports2.scheduled = exports2.zip = exports2.using = exports2.timer = exports2.throwError = exports2.range = exports2.race = exports2.partition = exports2.pairs = exports2.onErrorResumeNext = exports2.of = exports2.never = exports2.merge = void 0; + exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.pairwise = exports2.onErrorResumeNextWith = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = exports2.mergeAll = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = void 0; + exports2.zipWith = exports2.zipAll = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = exports2.switchMapTo = void 0; + var Observable_1 = require_Observable(); + Object.defineProperty(exports2, "Observable", { enumerable: true, get: function() { + return Observable_1.Observable; + } }); + var ConnectableObservable_1 = require_ConnectableObservable(); + Object.defineProperty(exports2, "ConnectableObservable", { enumerable: true, get: function() { + return ConnectableObservable_1.ConnectableObservable; + } }); + var observable_1 = require_observable2(); + Object.defineProperty(exports2, "observable", { enumerable: true, get: function() { + return observable_1.observable; + } }); + var animationFrames_1 = require_animationFrames(); + Object.defineProperty(exports2, "animationFrames", { enumerable: true, get: function() { + return animationFrames_1.animationFrames; + } }); + var Subject_1 = require_Subject(); + Object.defineProperty(exports2, "Subject", { enumerable: true, get: function() { + return Subject_1.Subject; + } }); + var BehaviorSubject_1 = require_BehaviorSubject(); + Object.defineProperty(exports2, "BehaviorSubject", { enumerable: true, get: function() { + return BehaviorSubject_1.BehaviorSubject; + } }); + var ReplaySubject_1 = require_ReplaySubject(); + Object.defineProperty(exports2, "ReplaySubject", { enumerable: true, get: function() { + return ReplaySubject_1.ReplaySubject; + } }); + var AsyncSubject_1 = require_AsyncSubject(); + Object.defineProperty(exports2, "AsyncSubject", { enumerable: true, get: function() { + return AsyncSubject_1.AsyncSubject; + } }); + var asap_1 = require_asap(); + Object.defineProperty(exports2, "asap", { enumerable: true, get: function() { + return asap_1.asap; + } }); + Object.defineProperty(exports2, "asapScheduler", { enumerable: true, get: function() { + return asap_1.asapScheduler; + } }); + var async_1 = require_async(); + Object.defineProperty(exports2, "async", { enumerable: true, get: function() { + return async_1.async; + } }); + Object.defineProperty(exports2, "asyncScheduler", { enumerable: true, get: function() { + return async_1.asyncScheduler; + } }); + var queue_1 = require_queue(); + Object.defineProperty(exports2, "queue", { enumerable: true, get: function() { + return queue_1.queue; + } }); + Object.defineProperty(exports2, "queueScheduler", { enumerable: true, get: function() { + return queue_1.queueScheduler; + } }); + var animationFrame_1 = require_animationFrame(); + Object.defineProperty(exports2, "animationFrame", { enumerable: true, get: function() { + return animationFrame_1.animationFrame; + } }); + Object.defineProperty(exports2, "animationFrameScheduler", { enumerable: true, get: function() { + return animationFrame_1.animationFrameScheduler; + } }); + var VirtualTimeScheduler_1 = require_VirtualTimeScheduler(); + Object.defineProperty(exports2, "VirtualTimeScheduler", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualTimeScheduler; + } }); + Object.defineProperty(exports2, "VirtualAction", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualAction; + } }); + var Scheduler_1 = require_Scheduler(); + Object.defineProperty(exports2, "Scheduler", { enumerable: true, get: function() { + return Scheduler_1.Scheduler; + } }); + var Subscription_1 = require_Subscription(); + Object.defineProperty(exports2, "Subscription", { enumerable: true, get: function() { + return Subscription_1.Subscription; + } }); + var Subscriber_1 = require_Subscriber(); + Object.defineProperty(exports2, "Subscriber", { enumerable: true, get: function() { + return Subscriber_1.Subscriber; + } }); + var Notification_1 = require_Notification(); + Object.defineProperty(exports2, "Notification", { enumerable: true, get: function() { + return Notification_1.Notification; + } }); + Object.defineProperty(exports2, "NotificationKind", { enumerable: true, get: function() { + return Notification_1.NotificationKind; + } }); + var pipe_1 = require_pipe(); + Object.defineProperty(exports2, "pipe", { enumerable: true, get: function() { + return pipe_1.pipe; + } }); + var noop_1 = require_noop2(); + Object.defineProperty(exports2, "noop", { enumerable: true, get: function() { + return noop_1.noop; + } }); + var identity_1 = require_identity(); + Object.defineProperty(exports2, "identity", { enumerable: true, get: function() { + return identity_1.identity; + } }); + var isObservable_1 = require_isObservable(); + Object.defineProperty(exports2, "isObservable", { enumerable: true, get: function() { + return isObservable_1.isObservable; + } }); + var lastValueFrom_1 = require_lastValueFrom(); + Object.defineProperty(exports2, "lastValueFrom", { enumerable: true, get: function() { + return lastValueFrom_1.lastValueFrom; + } }); + var firstValueFrom_1 = require_firstValueFrom(); + Object.defineProperty(exports2, "firstValueFrom", { enumerable: true, get: function() { + return firstValueFrom_1.firstValueFrom; + } }); + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + Object.defineProperty(exports2, "ArgumentOutOfRangeError", { enumerable: true, get: function() { + return ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; + } }); + var EmptyError_1 = require_EmptyError(); + Object.defineProperty(exports2, "EmptyError", { enumerable: true, get: function() { + return EmptyError_1.EmptyError; + } }); + var NotFoundError_1 = require_NotFoundError(); + Object.defineProperty(exports2, "NotFoundError", { enumerable: true, get: function() { + return NotFoundError_1.NotFoundError; + } }); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + Object.defineProperty(exports2, "ObjectUnsubscribedError", { enumerable: true, get: function() { + return ObjectUnsubscribedError_1.ObjectUnsubscribedError; + } }); + var SequenceError_1 = require_SequenceError(); + Object.defineProperty(exports2, "SequenceError", { enumerable: true, get: function() { + return SequenceError_1.SequenceError; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "TimeoutError", { enumerable: true, get: function() { + return timeout_1.TimeoutError; + } }); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + Object.defineProperty(exports2, "UnsubscriptionError", { enumerable: true, get: function() { + return UnsubscriptionError_1.UnsubscriptionError; + } }); + var bindCallback_1 = require_bindCallback(); + Object.defineProperty(exports2, "bindCallback", { enumerable: true, get: function() { + return bindCallback_1.bindCallback; + } }); + var bindNodeCallback_1 = require_bindNodeCallback(); + Object.defineProperty(exports2, "bindNodeCallback", { enumerable: true, get: function() { + return bindNodeCallback_1.bindNodeCallback; + } }); + var combineLatest_1 = require_combineLatest(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var concat_1 = require_concat2(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var connectable_1 = require_connectable(); + Object.defineProperty(exports2, "connectable", { enumerable: true, get: function() { + return connectable_1.connectable; + } }); + var defer_1 = require_defer(); + Object.defineProperty(exports2, "defer", { enumerable: true, get: function() { + return defer_1.defer; + } }); + var empty_1 = require_empty3(); + Object.defineProperty(exports2, "empty", { enumerable: true, get: function() { + return empty_1.empty; + } }); + var forkJoin_1 = require_forkJoin(); + Object.defineProperty(exports2, "forkJoin", { enumerable: true, get: function() { + return forkJoin_1.forkJoin; + } }); + var from_1 = require_from(); + Object.defineProperty(exports2, "from", { enumerable: true, get: function() { + return from_1.from; + } }); + var fromEvent_1 = require_fromEvent(); + Object.defineProperty(exports2, "fromEvent", { enumerable: true, get: function() { + return fromEvent_1.fromEvent; + } }); + var fromEventPattern_1 = require_fromEventPattern(); + Object.defineProperty(exports2, "fromEventPattern", { enumerable: true, get: function() { + return fromEventPattern_1.fromEventPattern; + } }); + var generate_1 = require_generate2(); + Object.defineProperty(exports2, "generate", { enumerable: true, get: function() { + return generate_1.generate; + } }); + var iif_1 = require_iif(); + Object.defineProperty(exports2, "iif", { enumerable: true, get: function() { + return iif_1.iif; + } }); + var interval_1 = require_interval(); + Object.defineProperty(exports2, "interval", { enumerable: true, get: function() { + return interval_1.interval; + } }); + var merge_1 = require_merge(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var never_1 = require_never(); + Object.defineProperty(exports2, "never", { enumerable: true, get: function() { + return never_1.never; + } }); + var of_1 = require_of(); + Object.defineProperty(exports2, "of", { enumerable: true, get: function() { + return of_1.of; + } }); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNext_1.onErrorResumeNext; + } }); + var pairs_1 = require_pairs(); + Object.defineProperty(exports2, "pairs", { enumerable: true, get: function() { + return pairs_1.pairs; + } }); + var partition_1 = require_partition(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var race_1 = require_race(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var range_1 = require_range2(); + Object.defineProperty(exports2, "range", { enumerable: true, get: function() { + return range_1.range; + } }); + var throwError_1 = require_throwError(); + Object.defineProperty(exports2, "throwError", { enumerable: true, get: function() { + return throwError_1.throwError; + } }); + var timer_1 = require_timer(); + Object.defineProperty(exports2, "timer", { enumerable: true, get: function() { + return timer_1.timer; + } }); + var using_1 = require_using(); + Object.defineProperty(exports2, "using", { enumerable: true, get: function() { + return using_1.using; + } }); + var zip_1 = require_zip2(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var scheduled_1 = require_scheduled(); + Object.defineProperty(exports2, "scheduled", { enumerable: true, get: function() { + return scheduled_1.scheduled; + } }); + var empty_2 = require_empty3(); + Object.defineProperty(exports2, "EMPTY", { enumerable: true, get: function() { + return empty_2.EMPTY; + } }); + var never_2 = require_never(); + Object.defineProperty(exports2, "NEVER", { enumerable: true, get: function() { + return never_2.NEVER; + } }); + __exportStar(require_types(), exports2); + var config_1 = require_config(); + Object.defineProperty(exports2, "config", { enumerable: true, get: function() { + return config_1.config; + } }); + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer4(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand2(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter2(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min3(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var onErrorResumeNextWith_1 = require_onErrorResumeNextWith(); + Object.defineProperty(exports2, "onErrorResumeNextWith", { enumerable: true, get: function() { + return onErrorResumeNextWith_1.onErrorResumeNextWith; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_2 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_2.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/packageInfo.js + var require_packageInfo16 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/types-codec", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/packageInfo.js + var require_packageInfo17 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/types-create", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/packageDetect.js + var require_packageDetect3 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo16(); + var packageInfo_2 = require_packageInfo17(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo14(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_1.packageInfo, packageInfo_2.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/hashers.js + var require_hashers = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/hashers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AllHashers = void 0; + exports2.AllHashers = { + Blake2_128: null, + Blake2_256: null, + Blake2_128Concat: null, + Twox128: null, + Twox256: null, + Twox64Concat: null, + Identity: null + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/runtime.js + var require_runtime = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var META_V1_TO_V22 = { + metadata: { + description: "Returns the metadata of a runtime", + params: [], + type: "OpaqueMetadata" + } + }; + exports2.runtime = { + Metadata: [ + { + methods: { + metadata_at_version: { + description: "Returns the metadata at a given version.", + params: [ + { + name: "version", + type: "u32" + } + ], + type: "Option" + }, + metadata_versions: { + description: "Returns the supported metadata versions.", + params: [], + type: "Vec" + }, + ...META_V1_TO_V22 + }, + version: 2 + }, + { + methods: { + ...META_V1_TO_V22 + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/v9.js + var require_v9 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/v9.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v9 = void 0; + exports2.v9 = { + ErrorMetadataV9: { + name: "Text", + docs: "Vec" + }, + EventMetadataV9: { + name: "Text", + args: "Vec", + docs: "Vec" + }, + FunctionArgumentMetadataV9: { + name: "Text", + type: "Type" + }, + FunctionMetadataV9: { + name: "Text", + args: "Vec", + docs: "Vec" + }, + MetadataV9: { + modules: "Vec" + }, + ModuleConstantMetadataV9: { + name: "Text", + type: "Type", + value: "Bytes", + docs: "Vec" + }, + ModuleMetadataV9: { + name: "Text", + storage: "Option", + calls: "Option>", + events: "Option>", + constants: "Vec", + errors: "Vec" + }, + StorageEntryMetadataV9: { + name: "Text", + modifier: "StorageEntryModifierV9", + type: "StorageEntryTypeV9", + fallback: "Bytes", + docs: "Vec" + }, + StorageEntryModifierV9: { + _enum: ["Optional", "Default", "Required"] + }, + StorageEntryTypeV9: { + _enum: { + Plain: "Type", + Map: { + hasher: "StorageHasherV9", + key: "Type", + value: "Type", + linked: "bool" + }, + DoubleMap: { + hasher: "StorageHasherV9", + key1: "Type", + key2: "Type", + value: "Type", + key2Hasher: "StorageHasherV9" + } + } + }, + StorageHasherV9: { + _enum: { + Blake2_128: null, + Blake2_256: null, + Twox128: null, + Twox256: null, + Twox64Concat: null + } + }, + StorageMetadataV9: { + prefix: "Text", + items: "Vec" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/v10.js + var require_v10 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/v10.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v10 = void 0; + exports2.v10 = { + ErrorMetadataV10: "ErrorMetadataV9", + EventMetadataV10: "EventMetadataV9", + FunctionArgumentMetadataV10: "FunctionArgumentMetadataV9", + FunctionMetadataV10: "FunctionMetadataV9", + MetadataV10: { + modules: "Vec" + }, + ModuleConstantMetadataV10: "ModuleConstantMetadataV9", + ModuleMetadataV10: { + name: "Text", + storage: "Option", + calls: "Option>", + events: "Option>", + constants: "Vec", + errors: "Vec" + }, + StorageEntryModifierV10: "StorageEntryModifierV9", + StorageEntryMetadataV10: { + name: "Text", + modifier: "StorageEntryModifierV10", + type: "StorageEntryTypeV10", + fallback: "Bytes", + docs: "Vec" + }, + StorageEntryTypeV10: { + _enum: { + Plain: "Type", + Map: { + hasher: "StorageHasherV10", + key: "Type", + value: "Type", + linked: "bool" + }, + DoubleMap: { + hasher: "StorageHasherV10", + key1: "Type", + key2: "Type", + value: "Type", + key2Hasher: "StorageHasherV10" + } + } + }, + StorageMetadataV10: { + prefix: "Text", + items: "Vec" + }, + StorageHasherV10: { + _enum: { + Blake2_128: null, + Blake2_256: null, + Blake2_128Concat: null, + Twox128: null, + Twox256: null, + Twox64Concat: null + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/v11.js + var require_v11 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/v11.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v11 = void 0; + var hashers_js_1 = require_hashers(); + exports2.v11 = { + ErrorMetadataV11: "ErrorMetadataV10", + EventMetadataV11: "EventMetadataV10", + ExtrinsicMetadataV11: { + version: "u8", + signedExtensions: "Vec" + }, + FunctionArgumentMetadataV11: "FunctionArgumentMetadataV10", + FunctionMetadataV11: "FunctionMetadataV10", + MetadataV11: { + modules: "Vec", + extrinsic: "ExtrinsicMetadataV11" + }, + ModuleConstantMetadataV11: "ModuleConstantMetadataV10", + ModuleMetadataV11: { + name: "Text", + storage: "Option", + calls: "Option>", + events: "Option>", + constants: "Vec", + errors: "Vec" + }, + StorageEntryModifierV11: "StorageEntryModifierV10", + StorageEntryMetadataV11: { + name: "Text", + modifier: "StorageEntryModifierV11", + type: "StorageEntryTypeV11", + fallback: "Bytes", + docs: "Vec" + }, + StorageEntryTypeV11: { + _enum: { + Plain: "Type", + Map: { + hasher: "StorageHasherV11", + key: "Type", + value: "Type", + linked: "bool" + }, + DoubleMap: { + hasher: "StorageHasherV11", + key1: "Type", + key2: "Type", + value: "Type", + key2Hasher: "StorageHasherV11" + } + } + }, + StorageMetadataV11: { + prefix: "Text", + items: "Vec" + }, + StorageHasherV11: { + _enum: hashers_js_1.AllHashers + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/v12.js + var require_v12 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/v12.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v12 = void 0; + exports2.v12 = { + ErrorMetadataV12: "ErrorMetadataV11", + EventMetadataV12: "EventMetadataV11", + ExtrinsicMetadataV12: "ExtrinsicMetadataV11", + FunctionArgumentMetadataV12: "FunctionArgumentMetadataV11", + FunctionMetadataV12: "FunctionMetadataV11", + MetadataV12: { + modules: "Vec", + extrinsic: "ExtrinsicMetadataV12" + }, + ModuleConstantMetadataV12: "ModuleConstantMetadataV11", + ModuleMetadataV12: { + name: "Text", + storage: "Option", + calls: "Option>", + events: "Option>", + constants: "Vec", + errors: "Vec", + index: "u8" + }, + StorageEntryModifierV12: "StorageEntryModifierV11", + StorageEntryMetadataV12: "StorageEntryMetadataV11", + StorageEntryTypeV12: "StorageEntryTypeV11", + StorageMetadataV12: "StorageMetadataV11", + StorageHasherV12: "StorageHasherV11" + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/v13.js + var require_v13 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/v13.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v13 = void 0; + exports2.v13 = { + ErrorMetadataV13: "ErrorMetadataV12", + EventMetadataV13: "EventMetadataV12", + ExtrinsicMetadataV13: "ExtrinsicMetadataV12", + FunctionArgumentMetadataV13: "FunctionArgumentMetadataV12", + FunctionMetadataV13: "FunctionMetadataV12", + MetadataV13: { + modules: "Vec", + extrinsic: "ExtrinsicMetadataV13" + }, + ModuleConstantMetadataV13: "ModuleConstantMetadataV12", + ModuleMetadataV13: { + name: "Text", + storage: "Option", + calls: "Option>", + events: "Option>", + constants: "Vec", + errors: "Vec", + index: "u8" + }, + StorageEntryModifierV13: "StorageEntryModifierV12", + StorageEntryMetadataV13: { + name: "Text", + modifier: "StorageEntryModifierV13", + type: "StorageEntryTypeV13", + fallback: "Bytes", + docs: "Vec" + }, + StorageEntryTypeV13: { + _enum: { + Plain: "Type", + Map: { + hasher: "StorageHasherV13", + key: "Type", + value: "Type", + linked: "bool" + }, + DoubleMap: { + hasher: "StorageHasherV13", + key1: "Type", + key2: "Type", + value: "Type", + key2Hasher: "StorageHasherV13" + }, + NMap: { + keyVec: "Vec", + hashers: "Vec", + value: "Type" + } + } + }, + StorageMetadataV13: { + prefix: "Text", + items: "Vec" + }, + StorageHasherV13: "StorageHasherV12" + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/scaleInfo/v1.js + var require_v1 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/scaleInfo/v1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v1 = exports2.Si1Variant = void 0; + exports2.Si1Variant = { + name: "Text", + fields: "Vec", + index: "u8", + docs: "Vec" + }; + exports2.v1 = { + Si1Field: { + name: "Option", + type: "Si1LookupTypeId", + typeName: "Option", + docs: "Vec" + }, + Si1LookupTypeId: "Compact", + Si1Path: "Si0Path", + Si1Type: { + path: "Si1Path", + params: "Vec", + def: "Si1TypeDef", + docs: "Vec" + }, + Si1TypeDef: { + _enum: { + Composite: "Si1TypeDefComposite", + Variant: "Si1TypeDefVariant", + Sequence: "Si1TypeDefSequence", + Array: "Si1TypeDefArray", + Tuple: "Si1TypeDefTuple", + Primitive: "Si1TypeDefPrimitive", + Compact: "Si1TypeDefCompact", + BitSequence: "Si1TypeDefBitSequence", + HistoricMetaCompat: "Type" + } + }, + Si1TypeDefArray: { + len: "u32", + type: "Si1LookupTypeId" + }, + Si1TypeDefBitSequence: { + bitStoreType: "Si1LookupTypeId", + bitOrderType: "Si1LookupTypeId" + }, + Si1TypeDefCompact: { + type: "Si1LookupTypeId" + }, + Si1TypeDefComposite: { + fields: "Vec" + }, + Si1TypeDefPrimitive: "Si0TypeDefPrimitive", + Si1TypeDefSequence: { + type: "Si1LookupTypeId" + }, + Si1TypeDefTuple: "Vec", + Si1TypeParameter: { + name: "Text", + type: "Option" + }, + Si1TypeDefVariant: { + variants: "Vec" + }, + Si1Variant: exports2.Si1Variant + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/v14.js + var require_v14 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/v14.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v14 = void 0; + var v1_js_1 = require_v1(); + exports2.v14 = { + PortableTypeV14: { + id: "Si1LookupTypeId", + type: "Si1Type" + }, + ErrorMetadataV14: { + ...v1_js_1.Si1Variant, + args: "Vec" + }, + EventMetadataV14: { + ...v1_js_1.Si1Variant, + args: "Vec" + }, + FunctionArgumentMetadataV14: { + name: "Text", + type: "Type", + typeName: "Option" + }, + FunctionMetadataV14: { + ...v1_js_1.Si1Variant, + args: "Vec" + }, + ExtrinsicMetadataV14: { + type: "SiLookupTypeId", + version: "u8", + signedExtensions: "Vec" + }, + MetadataV14: { + lookup: "PortableRegistry", + pallets: "Vec", + extrinsic: "ExtrinsicMetadataV14", + type: "SiLookupTypeId" + }, + PalletCallMetadataV14: { + type: "SiLookupTypeId" + }, + PalletConstantMetadataV14: { + name: "Text", + type: "SiLookupTypeId", + value: "Bytes", + docs: "Vec" + }, + PalletErrorMetadataV14: { + type: "SiLookupTypeId" + }, + PalletEventMetadataV14: { + type: "SiLookupTypeId" + }, + PalletMetadataV14: { + name: "Text", + storage: "Option", + calls: "Option", + events: "Option", + constants: "Vec", + errors: "Option", + index: "u8" + }, + PalletStorageMetadataV14: { + prefix: "Text", + items: "Vec" + }, + SignedExtensionMetadataV14: { + identifier: "Text", + type: "SiLookupTypeId", + additionalSigned: "SiLookupTypeId" + }, + StorageEntryMetadataV14: { + name: "Text", + modifier: "StorageEntryModifierV14", + type: "StorageEntryTypeV14", + fallback: "Bytes", + docs: "Vec" + }, + StorageEntryModifierV14: "StorageEntryModifierV13", + StorageEntryTypeV14: { + _enum: { + Plain: "SiLookupTypeId", + Map: { + hashers: "Vec", + key: "SiLookupTypeId", + value: "SiLookupTypeId" + } + } + }, + StorageHasherV14: "StorageHasherV13" + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/v15.js + var require_v15 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/v15.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v15 = void 0; + exports2.v15 = { + CustomMetadata15: { + map: "BTreeMap" + }, + CustomValueMetadata15: { + type: "SiLookupTypeId", + value: "Bytes" + }, + ExtrinsicMetadataV15: { + version: "u8", + addressType: "SiLookupTypeId", + callType: "SiLookupTypeId", + signatureType: "SiLookupTypeId", + extraType: "SiLookupTypeId", + signedExtensions: "Vec" + }, + OuterEnums15: { + callType: "SiLookupTypeId", + eventType: "SiLookupTypeId", + errorType: "SiLookupTypeId" + }, + PalletMetadataV15: { + name: "Text", + storage: "Option", + calls: "Option", + events: "Option", + constants: "Vec", + errors: "Option", + index: "u8", + docs: "Vec" + }, + RuntimeApiMetadataV15: { + name: "Text", + methods: "Vec", + docs: "Vec" + }, + RuntimeApiMethodMetadataV15: { + name: "Text", + inputs: "Vec", + output: "SiLookupTypeId", + docs: "Vec" + }, + RuntimeApiMethodParamMetadataV15: { + name: "Text", + type: "SiLookupTypeId" + }, + MetadataV15: { + lookup: "PortableRegistry", + pallets: "Vec", + extrinsic: "ExtrinsicMetadataV15", + type: "SiLookupTypeId", + apis: "Vec", + outerEnums: "OuterEnums15", + custom: "CustomMetadata15" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/metadata/definitions.js + var require_definitions = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/metadata/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AllHashers = void 0; + var hashers_js_1 = require_hashers(); + Object.defineProperty(exports2, "AllHashers", { enumerable: true, get: function() { + return hashers_js_1.AllHashers; + } }); + var runtime_js_1 = require_runtime(); + var v9_js_1 = require_v9(); + var v10_js_1 = require_v10(); + var v11_js_1 = require_v11(); + var v12_js_1 = require_v12(); + var v13_js_1 = require_v13(); + var v14_js_1 = require_v14(); + var v15_js_1 = require_v15(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + ...v9_js_1.v9, + ...v10_js_1.v10, + ...v11_js_1.v11, + ...v12_js_1.v12, + ...v13_js_1.v13, + ...v14_js_1.v14, + ...v15_js_1.v15, + ErrorMetadataLatest: "ErrorMetadataV14", + EventMetadataLatest: "EventMetadataV14", + ExtrinsicMetadataLatest: "ExtrinsicMetadataV15", + FunctionArgumentMetadataLatest: "FunctionArgumentMetadataV14", + FunctionMetadataLatest: "FunctionMetadataV14", + MetadataLatest: "MetadataV15", + PalletCallMetadataLatest: "PalletCallMetadataV14", + PalletConstantMetadataLatest: "PalletConstantMetadataV14", + PalletErrorMetadataLatest: "PalletErrorMetadataV14", + PalletEventMetadataLatest: "PalletEventMetadataV14", + PalletMetadataLatest: "PalletMetadataV15", + PalletStorageMetadataLatest: "PalletStorageMetadataV14", + PortableType: "PortableTypeV14", + RuntimeApiMetadataLatest: "RuntimeApiMetadataV15", + SignedExtensionMetadataLatest: "SignedExtensionMetadataV14", + StorageEntryMetadataLatest: "StorageEntryMetadataV14", + StorageEntryModifierLatest: "StorageEntryModifierV14", + StorageEntryTypeLatest: "StorageEntryTypeV14", + StorageHasher: "StorageHasherV14", + OpaqueMetadata: "Opaque", + MetadataAll: { + _enum: { + V0: "DoNotConstruct", + V1: "DoNotConstruct", + V2: "DoNotConstruct", + V3: "DoNotConstruct", + V4: "DoNotConstruct", + V5: "DoNotConstruct", + V6: "DoNotConstruct", + V7: "DoNotConstruct", + V8: "DoNotConstruct", + V9: "MetadataV9", + V10: "MetadataV10", + V11: "MetadataV11", + V12: "MetadataV12", + V13: "MetadataV13", + V14: "MetadataV14", + V15: "MetadataV15" + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/runtime/runtime.js + var require_runtime2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/runtime/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var CORE_V1_TO_V42 = { + execute_block: { + description: "Execute the given block.", + params: [ + { + name: "block", + type: "Block" + } + ], + type: "Null" + } + }; + var CORE_V1_TO_V22 = { + version: { + description: "Returns the version of the runtime.", + params: [], + type: "RuntimeVersionPre3" + } + }; + var CORE_V2_TO_V42 = { + initialize_block: { + description: "Initialize a block with the given header.", + params: [ + { + name: "header", + type: "Header" + } + ], + type: "Null" + } + }; + var CORE_V4_VERSION2 = { + version: { + description: "Returns the version of the runtime.", + params: [], + type: "RuntimeVersion" + } + }; + var CORE_V4_TO_V52 = { + ...CORE_V1_TO_V42, + initialize_block: { + description: "Initialize a block with the given header.", + params: [ + { + name: "header", + type: "Header" + } + ], + type: "ExtrinsicInclusionMode" + } + }; + exports2.runtime = { + Core: [ + { + methods: { + ...CORE_V4_VERSION2, + ...CORE_V4_TO_V52 + }, + version: 5 + }, + { + methods: { + ...CORE_V4_VERSION2, + ...CORE_V1_TO_V42, + ...CORE_V2_TO_V42 + }, + version: 4 + }, + { + methods: { + version: { + description: "Returns the version of the runtime.", + params: [], + type: "RuntimeVersionPre4" + }, + ...CORE_V1_TO_V42, + ...CORE_V2_TO_V42 + }, + version: 3 + }, + { + methods: { + ...CORE_V1_TO_V22, + ...CORE_V1_TO_V42, + ...CORE_V2_TO_V42 + }, + version: 2 + }, + { + methods: { + initialise_block: { + description: "Initialize a block with the given header.", + params: [ + { + name: "header", + type: "Header" + } + ], + type: "Null" + }, + ...CORE_V1_TO_V22, + ...CORE_V1_TO_V42 + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/runtime/definitions.js + var require_definitions2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/runtime/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.knownOrigins = void 0; + var runtime_js_1 = require_runtime2(); + var numberTypes2 = { + Fixed64: "Int<64, Fixed64>", + FixedI64: "Int<64, FixedI64>", + FixedU64: "UInt<64, FixedU64>", + Fixed128: "Int<128, Fixed128>", + FixedI128: "Int<128, FixedI128>", + FixedU128: "UInt<128, FixedU128>", + I32F32: "Int<64, I32F32>", + U32F32: "UInt<64, U32F32>", + PerU16: "UInt<16, PerU16>", + Perbill: "UInt<32, Perbill>", + Percent: "UInt<8, Percent>", + Permill: "UInt<32, Permill>", + Perquintill: "UInt<64, Perquintill>" + }; + exports2.knownOrigins = { + Council: "CollectiveOrigin", + System: "SystemOrigin", + TechnicalCommittee: "CollectiveOrigin", + Xcm: "XcmOrigin", + XcmPallet: "XcmOrigin", + Authority: "AuthorityOrigin", + GeneralCouncil: "CollectiveOrigin" + }; + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + ...numberTypes2, + AccountId: "AccountId32", + AccountId20: "GenericEthereumAccountId", + AccountId32: "GenericAccountId32", + AccountId33: "GenericAccountId33", + AccountIdOf: "AccountId", + AccountIndex: "GenericAccountIndex", + Address: "MultiAddress", + AssetId: "u32", + Balance: "UInt<128, Balance>", + BalanceOf: "Balance", + Block: "GenericBlock", + BlockNumber: "u32", + BlockNumberFor: "BlockNumber", + BlockNumberOf: "BlockNumber", + Call: "GenericCall", + CallHash: "Hash", + CallHashOf: "CallHash", + ChangesTrieConfiguration: { + digestInterval: "u32", + digestLevels: "u32" + }, + ChangesTrieSignal: { + _enum: { + NewConfiguration: "Option" + } + }, + ConsensusEngineId: "GenericConsensusEngineId", + CodecHash: "Hash", + CrateVersion: { + major: "u16", + minor: "u8", + patch: "u8" + }, + Digest: { + logs: "Vec" + }, + DigestItem: { + _enum: { + Other: "Bytes", + AuthoritiesChange: "Vec", + ChangesTrieRoot: "Hash", + SealV0: "SealV0", + Consensus: "Consensus", + Seal: "Seal", + PreRuntime: "PreRuntime", + ChangesTrieSignal: "ChangesTrieSignal", + RuntimeEnvironmentUpdated: "Null" + } + }, + ExtrinsicsWeight: { + normal: "Weight", + operational: "Weight" + }, + H32: "[u8; 4; H32]", + H64: "[u8; 8; H64]", + H128: "[u8; 16; H128]", + H160: "[u8; 20; H160]", + H256: "[u8; 32; H256]", + H512: "[u8; 64; H512]", + H1024: "[u8; 128; H1024]", + H2048: "[u8; 256; H2048]", + Hash: "H256", + Header: { + parentHash: "Hash", + number: "Compact", + stateRoot: "Hash", + extrinsicsRoot: "Hash", + digest: "Digest" + }, + HeaderPartial: { + parentHash: "Hash", + number: "BlockNumber" + }, + IndicesLookupSource: "GenericLookupSource", + Index: "u32", + Justification: "(ConsensusEngineId, EncodedJustification)", + EncodedJustification: "Bytes", + Justifications: "Vec", + KeyValue: "(StorageKey, StorageData)", + KeyTypeId: "u32", + LockIdentifier: "[u8; 8]", + LookupSource: "MultiAddress", + LookupTarget: "AccountId", + ModuleId: "LockIdentifier", + MultiAddress: "GenericMultiAddress", + MultiSigner: { + _enum: { + Ed25519: "[u8; 32]", + Sr25519: "[u8; 32]", + Ecdsa: "[u8; 33]" + } + }, + Moment: "UInt<64, Moment>", + OpaqueCall: "Bytes", + Origin: "DoNotConstruct", + OriginCaller: { + _enum: { + System: "SystemOrigin" + } + }, + PalletId: "LockIdentifier", + PalletsOrigin: "OriginCaller", + PalletVersion: { + major: "u16", + minor: "u8", + patch: "u8" + }, + Pays: { + _enum: ["Yes", "No"] + }, + Phantom: "Null", + PhantomData: "Null", + Releases: { + _enum: ["V1", "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10"] + }, + RuntimeCall: "Call", + RuntimeEvent: "Event", + RuntimeDbWeight: { + read: "Weight", + write: "Weight" + }, + SignedBlock: "SignedBlockWithJustifications", + SignedBlockWithJustification: { + block: "Block", + justification: "Option" + }, + SignedBlockWithJustifications: { + block: "Block", + justifications: "Option" + }, + Slot: "u64", + SlotDuration: "u64", + StorageData: "Bytes", + StorageInfo: { + palletName: "Bytes", + storage_name: "Bytes", + prefix: "Bytes", + maxValues: "Option", + maxSize: "Option" + }, + StorageProof: { + trieNodes: "Vec" + }, + TransactionPriority: "u64", + TransactionLongevity: "u64", + TransactionTag: "Bytes", + TransactionInfo: { + _alias: { + dataSize: "size" + }, + chunkRoot: "H256", + contentHash: "H256", + dataSize: "u32", + blockChunks: "u32" + }, + TransactionStorageProof: { + chunk: "Vec", + proof: "Vec>" + }, + ValidatorId: "AccountId", + ValidatorIdOf: "ValidatorId", + WeightV0: "u32", + WeightV1: "u64", + WeightV2: { + refTime: "Compact", + proofSize: "Compact" + }, + Weight: "WeightV2", + WeightMultiplier: "Fixed64", + PreRuntime: "(ConsensusEngineId, Bytes)", + SealV0: "(u64, Signature)", + Seal: "(ConsensusEngineId, Bytes)", + Consensus: "(ConsensusEngineId, Bytes)", + ExtrinsicInclusionMode: { + _enum: ["AllExtrinsics", "OnlyInherents"] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/scaleInfo/v0.js + var require_v0 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/scaleInfo/v0.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v0 = void 0; + exports2.v0 = { + Si0Field: { + name: "Option", + type: "Si0LookupTypeId", + typeName: "Option", + docs: "Vec" + }, + Si0LookupTypeId: "u32", + Si0Path: "Vec", + Si0Type: { + path: "Si0Path", + params: "Vec", + def: "Si0TypeDef" + }, + Si0TypeDef: { + _enum: { + Composite: "Si0TypeDefComposite", + Variant: "Si0TypeDefVariant", + Sequence: "Si0TypeDefSequence", + Array: "Si0TypeDefArray", + Tuple: "Si0TypeDefTuple", + Primitive: "Si0TypeDefPrimitive", + Compact: "Si0TypeDefCompact", + Phantom: "Si0TypeDefPhantom", + BitSequence: "Si0TypeDefBitSequence" + } + }, + Si0TypeDefArray: { + len: "u32", + type: "Si0LookupTypeId" + }, + Si0TypeDefBitSequence: { + bitStoreType: "Si0LookupTypeId", + bitOrderType: "Si0LookupTypeId" + }, + Si0TypeDefCompact: { + type: "Si0LookupTypeId" + }, + Si0TypeDefComposite: { + fields: "Vec" + }, + Si0TypeDefPhantom: "Null", + Si0TypeDefVariant: { + variants: "Vec" + }, + Si0TypeDefPrimitive: { + _enum: ["Bool", "Char", "Str", "U8", "U16", "U32", "U64", "U128", "U256", "I8", "I16", "I32", "I64", "I128", "I256"] + }, + Si0TypeDefSequence: { + type: "Si0LookupTypeId" + }, + Si0TypeDefTuple: "Vec", + Si0TypeParameter: { + name: "Text", + type: "Option" + }, + Si0Variant: { + name: "Text", + fields: "Vec", + index: "Option", + discriminant: "Option", + docs: "Vec" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/scaleInfo/definitions.js + var require_definitions3 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/scaleInfo/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var v0_js_1 = require_v0(); + var v1_js_1 = require_v1(); + exports2.default = { + rpc: {}, + types: { + ...v0_js_1.v0, + ...v1_js_1.v1, + SiField: "Si1Field", + SiLookupTypeId: "Si1LookupTypeId", + SiPath: "Si1Path", + SiType: "Si1Type", + SiTypeDef: "Si1TypeDef", + SiTypeDefArray: "Si1TypeDefArray", + SiTypeDefBitSequence: "Si1TypeDefBitSequence", + SiTypeDefCompact: "Si1TypeDefCompact", + SiTypeDefComposite: "Si1TypeDefComposite", + SiTypeDefPrimitive: "Si1TypeDefPrimitive", + SiTypeDefSequence: "Si1TypeDefSequence", + SiTypeDefTuple: "Si1TypeDefTuple", + SiTypeParameter: "Si1TypeParameter", + SiTypeDefVariant: "Si1TypeDefVariant", + SiVariant: "Si1Variant" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/essentials.js + var require_essentials = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/essentials.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod3) { + return mod3 && mod3.__esModule ? mod3 : { "default": mod3 }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scaleInfo = exports2.runtime = exports2.metadata = void 0; + var definitions_js_1 = require_definitions(); + Object.defineProperty(exports2, "metadata", { enumerable: true, get: function() { + return __importDefault(definitions_js_1).default; + } }); + var definitions_js_2 = require_definitions2(); + Object.defineProperty(exports2, "runtime", { enumerable: true, get: function() { + return __importDefault(definitions_js_2).default; + } }); + var definitions_js_3 = require_definitions3(); + Object.defineProperty(exports2, "scaleInfo", { enumerable: true, get: function() { + return __importDefault(definitions_js_3).default; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/assetConversion/runtime.js + var require_runtime3 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/assetConversion/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + AssetConversionApi: [ + { + methods: { + get_reserves: { + description: "Get pool reserves", + params: [ + { + name: "asset1", + type: "StagingXcmV3MultiLocation" + }, + { + name: "asset2", + type: "StagingXcmV3MultiLocation" + } + ], + type: "Option<(Balance,Balance)>" + }, + quote_price_exact_tokens_for_tokens: { + description: "Quote price: exact tokens for tokens", + params: [ + { + name: "asset1", + type: "StagingXcmV3MultiLocation" + }, + { + name: "asset2", + type: "StagingXcmV3MultiLocation" + }, + { + name: "amount", + type: "u128" + }, + { + name: "include_fee", + type: "bool" + } + ], + type: "Option<(Balance)>" + }, + quote_price_tokens_for_exact_tokens: { + description: "Quote price: tokens for exact tokens", + params: [ + { + name: "asset1", + type: "StagingXcmV3MultiLocation" + }, + { + name: "asset2", + type: "StagingXcmV3MultiLocation" + }, + { + name: "amount", + type: "u128" + }, + { + name: "include_fee", + type: "bool" + } + ], + type: "Option<(Balance)>" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/assetConversion/definitions.js + var require_definitions4 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/assetConversion/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime3(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + TAssetConversion: "Option" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/assets/runtime.js + var require_runtime4 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/assets/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + AssetsApi: [ + { + methods: { + account_balances: { + description: "Return the current set of authorities.", + params: [ + { + name: "account", + type: "AccountId" + } + ], + type: "Vec<(u32, TAssetBalance)>" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/assets/definitions.js + var require_definitions5 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/assets/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime4(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + AssetApprovalKey: { + owner: "AccountId", + delegate: "AccountId" + }, + AssetApproval: { + amount: "TAssetBalance", + deposit: "TAssetDepositBalance" + }, + AssetBalance: { + balance: "TAssetBalance", + isFrozen: "bool", + isSufficient: "bool" + }, + AssetDestroyWitness: { + accounts: "Compact", + sufficients: "Compact", + approvals: "Compact" + }, + AssetDetails: { + owner: "AccountId", + issuer: "AccountId", + admin: "AccountId", + freezer: "AccountId", + supply: "TAssetBalance", + deposit: "TAssetDepositBalance", + minBalance: "TAssetBalance", + isSufficient: "bool", + accounts: "u32", + sufficients: "u32", + approvals: "u32", + isFrozen: "bool" + }, + AssetMetadata: { + deposit: "TAssetDepositBalance", + name: "Vec", + symbol: "Vec", + decimals: "u8", + isFrozen: "bool" + }, + TAssetBalance: "u64", + TAssetDepositBalance: "BalanceOf" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/aura/runtime.js + var require_runtime5 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/aura/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + AuraApi: [ + { + methods: { + authorities: { + description: "Return the current set of authorities.", + params: [], + type: "Vec" + }, + slot_duration: { + description: "Returns the slot duration for Aura.", + params: [], + type: "SlotDuration" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/aura/definitions.js + var require_definitions6 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/aura/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime5(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + RawAuraPreDigest: { + slotNumber: "u64" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/authorship/definitions.js + var require_definitions7 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/authorship/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + UncleEntryItem: { + _enum: { + InclusionHeight: "BlockNumber", + Uncle: "(Hash, Option)" + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/babe/rpc.js + var require_rpc = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/babe/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + epochAuthorship: { + description: "Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore", + isUnsafe: true, + params: [], + type: "HashMap" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/babe/runtime.js + var require_runtime6 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/babe/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var V1_V2_SHARED2 = { + current_epoch: { + description: "Returns information regarding the current epoch.", + params: [], + type: "Epoch" + }, + current_epoch_start: { + description: "Returns the slot that started the current epoch.", + params: [], + type: "Slot" + }, + generate_key_ownership_proof: { + description: "Generates a proof of key ownership for the given authority in the current epoch.", + params: [ + { + name: "slot", + type: "Slot" + }, + { + name: "authorityId", + type: "AuthorityId" + } + ], + type: "Option" + }, + next_epoch: { + description: "Returns information regarding the next epoch (which was already previously announced).", + params: [], + type: "Epoch" + }, + submit_report_equivocation_unsigned_extrinsic: { + description: "Submits an unsigned extrinsic to report an equivocation.", + params: [ + { + name: "equivocationProof", + type: "BabeEquivocationProof" + }, + { + name: "keyOwnerProof", + type: "OpaqueKeyOwnershipProof" + } + ], + type: "Option" + } + }; + exports2.runtime = { + BabeApi: [ + { + methods: { + configuration: { + description: "Return the genesis configuration for BABE. The configuration is only read on genesis.", + params: [], + type: "BabeGenesisConfiguration" + }, + ...V1_V2_SHARED2 + }, + version: 2 + }, + { + methods: { + configuration: { + description: "Return the configuration for BABE. Version 1.", + params: [], + type: "BabeGenesisConfigurationV1" + }, + ...V1_V2_SHARED2 + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/babe/definitions.js + var require_definitions8 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/babe/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc(); + var runtime_js_1 = require_runtime6(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + AllowedSlots: { + _enum: ["PrimarySlots", "PrimaryAndSecondaryPlainSlots", "PrimaryAndSecondaryVRFSlots"] + }, + BabeAuthorityWeight: "u64", + BabeEpochConfiguration: { + c: "(u64, u64)", + allowedSlots: "AllowedSlots" + }, + BabeBlockWeight: "u32", + BabeEquivocationProof: { + offender: "AuthorityId", + slotNumber: "SlotNumber", + firstHeader: "Header", + secondHeader: "Header" + }, + BabeGenesisConfiguration: { + slotDuration: "u64", + epochLength: "u64", + c: "(u64, u64)", + genesisAuthorities: "Vec<(AuthorityId, BabeAuthorityWeight)>", + randomness: "Randomness", + allowedSlots: "AllowedSlots" + }, + BabeGenesisConfigurationV1: { + slotDuration: "u64", + epochLength: "u64", + c: "(u64, u64)", + genesisAuthorities: "Vec<(AuthorityId, BabeAuthorityWeight)>", + randomness: "Randomness", + secondarySlots: "bool" + }, + BabeWeight: "u64", + MaybeRandomness: "Option", + MaybeVrf: "Option", + Epoch: { + epochIndex: "u64", + startSlot: "Slot", + duration: "u64", + authorities: "Vec<(AuthorityId, BabeAuthorityWeight)>", + randomness: "Hash", + config: "BabeEpochConfiguration" + }, + EpochAuthorship: { + primary: "Vec", + secondary: "Vec", + secondary_vrf: "Vec" + }, + NextConfigDescriptor: { + _enum: { + V0: "Null", + V1: "NextConfigDescriptorV1" + } + }, + NextConfigDescriptorV1: { + c: "(u64, u64)", + allowedSlots: "AllowedSlots" + }, + OpaqueKeyOwnershipProof: "Bytes", + Randomness: "Hash", + RawBabePreDigest: { + _enum: { + Phantom: "Null", + Primary: "RawBabePreDigestPrimary", + SecondaryPlain: "RawBabePreDigestSecondaryPlain", + SecondaryVRF: "RawBabePreDigestSecondaryVRF" + } + }, + RawBabePreDigestPrimary: { + authorityIndex: "u32", + slotNumber: "SlotNumber", + vrfOutput: "VrfOutput", + vrfProof: "VrfProof" + }, + RawBabePreDigestSecondaryPlain: { + authorityIndex: "u32", + slotNumber: "SlotNumber" + }, + RawBabePreDigestSecondaryVRF: { + authorityIndex: "u32", + slotNumber: "SlotNumber", + vrfOutput: "VrfOutput", + vrfProof: "VrfProof" + }, + RawBabePreDigestTo159: { + _enum: { + Primary: "RawBabePreDigestPrimaryTo159", + Secondary: "RawBabePreDigestSecondaryTo159" + } + }, + RawBabePreDigestPrimaryTo159: { + authorityIndex: "u32", + slotNumber: "SlotNumber", + weight: "BabeBlockWeight", + vrfOutput: "VrfOutput", + vrfProof: "VrfProof" + }, + RawBabePreDigestSecondaryTo159: { + authorityIndex: "u32", + slotNumber: "SlotNumber", + weight: "BabeBlockWeight" + }, + RawBabePreDigestCompat: { + _enum: { + Zero: "u32", + One: "u32", + Two: "u32", + Three: "u32" + } + }, + SlotNumber: "u64", + VrfData: "[u8; 32]", + VrfOutput: "[u8; 32]", + VrfProof: "[u8; 64]" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/balances/definitions.js + var require_definitions9 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/balances/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + AccountData: { + free: "Balance", + reserved: "Balance", + miscFrozen: "Balance", + feeFrozen: "Balance" + }, + BalanceLockTo212: { + id: "LockIdentifier", + amount: "Balance", + until: "BlockNumber", + reasons: "WithdrawReasons" + }, + BalanceLock: { + id: "LockIdentifier", + amount: "Balance", + reasons: "Reasons" + }, + BalanceStatus: { + _enum: ["Free", "Reserved"] + }, + Reasons: { + _enum: ["Fee", "Misc", "All"] + }, + ReserveData: { + id: "ReserveIdentifier", + amount: "Balance" + }, + ReserveIdentifier: "[u8; 8]", + VestingSchedule: { + offset: "Balance", + perBlock: "Balance", + startingBlock: "BlockNumber" + }, + WithdrawReasons: { + _set: { + TransactionPayment: 1, + Transfer: 2, + Reserve: 4, + Fee: 8, + Tip: 16 + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/beefy/rpc.js + var require_rpc2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/beefy/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + getFinalizedHead: { + description: "Returns hash of the latest BEEFY finalized block as seen by this client.", + params: [], + type: "H256" + }, + subscribeJustifications: { + description: "Returns the block most recently finalized by BEEFY, alongside its justification.", + params: [], + pubsub: [ + "justifications", + "subscribeJustifications", + "unsubscribeJustifications" + ], + type: "BeefyVersionedFinalityProof" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/beefy/runtime.js + var require_runtime7 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/beefy/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var BEEFY_V1_V32 = { + beefy_genesis: { + description: "Return the block number where BEEFY consensus is enabled/started", + params: [], + type: "Option" + }, + generate_key_ownership_proof: { + description: "Generates a proof of key ownership for the given authority in the given set.", + params: [ + { + name: "setId", + type: "ValidatorSetId" + }, + { + name: "authorityId", + type: "AuthorityId" + } + ], + type: "Option" + }, + submit_report_equivocation_unsigned_extrinsic: { + description: "Submits an unsigned extrinsic to report an equivocation.", + params: [ + { + name: "equivocationProof", + type: "BeefyEquivocationProof" + }, + { + name: "keyOwnerProof", + type: "OpaqueKeyOwnershipProof" + } + ], + type: "Option" + }, + validator_set: { + description: "Return the current active BEEFY validator set", + params: [], + type: "Option" + } + }; + var BEEFY_MMR_V12 = { + authority_set_proof: { + description: "Return the currently active BEEFY authority set proof.", + params: [], + type: "BeefyAuthoritySet" + }, + next_authority_set_proof: { + description: "Return the next/queued BEEFY authority set proof.", + params: [], + type: "BeefyNextAuthoritySet" + } + }; + exports2.runtime = { + BeefyApi: [ + { + methods: BEEFY_V1_V32, + version: 3 + }, + { + methods: BEEFY_V1_V32, + version: 2 + }, + { + methods: BEEFY_V1_V32, + version: 1 + } + ], + BeefyMmrApi: [ + { + methods: BEEFY_MMR_V12, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/beefy/definitions.js + var require_definitions10 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/beefy/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc2(); + var runtime_js_1 = require_runtime7(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + BeefyAuthoritySet: { + id: "u64", + len: "u32", + root: "H256" + }, + BeefyCommitment: { + payload: "BeefyPayload", + blockNumber: "BlockNumber", + validatorSetId: "ValidatorSetId" + }, + BeefyId: "[u8; 33]", + BeefyEquivocationProof: { + first: "BeefyVoteMessage", + second: "BeefyVoteMessage" + }, + BeefyCompactSignedCommitment: { + commitment: "BeefyCommitment", + signaturesFrom: "Vec", + validatorSetLen: "u32", + signaturesCompact: "Vec" + }, + BeefySignedCommitment: { + commitment: "BeefyCommitment", + signatures: "Vec>" + }, + BeefyVersionedFinalityProof: { + _enum: { + V0: "Null", + V1: "BeefyCompactSignedCommitment" + } + }, + BeefyNextAuthoritySet: { + id: "u64", + len: "u32", + root: "H256" + }, + BeefyPayload: "Vec<(BeefyPayloadId, Bytes)>", + BeefyPayloadId: "[u8;2]", + BeefyVoteMessage: { + commitment: "BeefyCommitment", + id: "AuthorityId", + signature: "Signature" + }, + MmrRootHash: "H256", + ValidatorSetId: "u64", + ValidatorSet: { + validators: "Vec", + id: "ValidatorSetId" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/benchmark/runtime.js + var require_runtime8 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/benchmark/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + Benchmark: [ + { + methods: { + benchmark_metadata: { + description: "Get the benchmark metadata available for this runtime.", + params: [ + { + name: "extra", + type: "bool" + } + ], + type: "(Vec, Vec)" + }, + dispatch_benchmark: { + description: "Dispatch the given benchmark.", + params: [ + { + name: "config", + type: "BenchmarkConfig" + } + ], + type: "Result, Text>" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/benchmark/definitions.js + var require_definitions11 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/benchmark/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime8(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + BenchmarkBatch: { + pallet: "Text", + instance: "Text", + benchmark: "Text", + results: "Vec" + }, + BenchmarkConfig: { + pallet: "Bytes", + benchmark: "Bytes", + selectedComponents: "Vec<(BenchmarkParameter, u32)>", + verify: "bool", + internalRepeats: "u32" + }, + BenchmarkList: { + pallet: "Bytes", + instance: "Bytes", + benchmarks: "Vec" + }, + BenchmarkMetadata: { + name: "Bytes", + components: "Vec<(BenchmarkParameter, u32, u32)>" + }, + BenchmarkParameter: { + _enum: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] + }, + BenchmarkResult: { + components: "Vec<(BenchmarkParameter, u32)>", + extrinsicTime: "u128", + storageRootTime: "u128", + reads: "u32", + repeatReads: "u32", + writes: "u32", + repeatWrites: "u32", + proofSize: "u32", + benchKeys: "Vec<(Vec, u32, u32, bool)>" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/blockbuilder/runtime.js + var require_runtime9 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/blockbuilder/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var BB_V2_TO_V42 = { + random_seed: { + description: "Generate a random seed.", + params: [], + type: "Hash" + } + }; + var BB_V2_TO_V52 = { + apply_extrinsic: { + description: "Apply the given extrinsic.", + params: [ + { + name: "extrinsic", + type: "Extrinsic" + } + ], + type: "ApplyExtrinsicResultPre6" + } + }; + var BB_V2_TO_V62 = { + check_inherents: { + description: "Check that the inherents are valid.", + params: [ + { + name: "block", + type: "Block" + }, + { + name: "data", + type: "InherentData" + } + ], + type: "CheckInherentsResult" + }, + inherent_extrinsics: { + description: "Generate inherent extrinsics.", + params: [ + { + name: "inherent", + type: "InherentData" + } + ], + type: "Vec" + } + }; + var BB_V3_TO_V62 = { + finalize_block: { + description: "Finish the current block.", + params: [], + type: "Header" + } + }; + exports2.runtime = { + BlockBuilder: [ + { + methods: { + apply_extrinsic: { + description: "Apply the given extrinsic.", + params: [ + { + name: "extrinsic", + type: "Extrinsic" + } + ], + type: "ApplyExtrinsicResult" + }, + ...BB_V2_TO_V62, + ...BB_V3_TO_V62 + }, + version: 6 + }, + { + methods: { + ...BB_V2_TO_V52, + ...BB_V2_TO_V62, + ...BB_V3_TO_V62 + }, + version: 5 + }, + { + methods: { + ...BB_V2_TO_V42, + ...BB_V2_TO_V52, + ...BB_V2_TO_V62, + ...BB_V3_TO_V62 + }, + version: 4 + }, + { + methods: { + ...BB_V2_TO_V42, + ...BB_V2_TO_V62, + ...BB_V3_TO_V62 + }, + version: 3 + }, + { + methods: { + finalise_block: { + description: "Finish the current block.", + params: [], + type: "Header" + }, + ...BB_V2_TO_V42, + ...BB_V2_TO_V62 + }, + version: 2 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/blockbuilder/definitions.js + var require_definitions12 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/blockbuilder/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime9(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + CheckInherentsResult: { + okay: "bool", + fatalError: "bool", + errors: "InherentData" + }, + InherentData: { + data: "BTreeMap" + }, + InherentIdentifier: "[u8; 8]" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/collective/definitions.js + var require_definitions13 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/collective/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + CollectiveOrigin: { + _enum: { + Members: "(MemberCount, MemberCount)", + Member: "AccountId" + } + }, + MemberCount: "u32", + ProposalIndex: "u32", + VotesTo230: { + index: "ProposalIndex", + threshold: "MemberCount", + ayes: "Vec", + nays: "Vec" + }, + Votes: { + index: "ProposalIndex", + threshold: "MemberCount", + ayes: "Vec", + nays: "Vec", + end: "BlockNumber" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/consensus/definitions.js + var require_definitions14 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/consensus/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + AuthorityId: "AccountId", + RawVRFOutput: "[u8; 32]" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/contracts/rpc.js + var require_rpc3 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/contracts/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + call: { + deprecated: "Use the runtime interface `api.call.contractsApi.call` instead", + description: "Executes a call to a contract", + params: [ + { + name: "callRequest", + type: "ContractCallRequest" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "ContractExecResult" + }, + getStorage: { + deprecated: "Use the runtime interface `api.call.contractsApi.getStorage` instead", + description: "Returns the value under a specified storage key in a contract", + params: [ + { + name: "address", + type: "AccountId" + }, + { + name: "key", + type: "H256" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Option" + }, + instantiate: { + deprecated: "Use the runtime interface `api.call.contractsApi.instantiate` instead", + description: "Instantiate a new contract", + params: [ + { + name: "request", + type: "InstantiateRequestV1" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "ContractInstantiateResult" + }, + rentProjection: { + deprecated: "Not available in newer versions of the contracts interfaces", + description: "Returns the projected time a given contract will be able to sustain paying its rent", + params: [ + { + name: "address", + type: "AccountId" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Option" + }, + uploadCode: { + deprecated: "Use the runtime interface `api.call.contractsApi.uploadCode` instead", + description: "Upload new code without instantiating a contract from it", + endpoint: "contracts_upload_code", + params: [ + { + name: "uploadRequest", + type: "CodeUploadRequest" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "CodeUploadResult" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/contracts/runtime.js + var require_runtime10 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/contracts/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var SHARED_V1_V22 = { + get_storage: { + description: "Query a given storage key in a given contract.", + params: [ + { + name: "address", + type: "AccountId" + }, + { + name: "key", + type: "Bytes" + } + ], + type: "Option" + }, + upload_code: { + description: "Upload new code without instantiating a contract from it.", + params: [ + { + name: "origin", + type: "AccountId" + }, + { + name: "code", + type: "Bytes" + }, + { + name: "storageDepositLimit", + type: "Option" + } + ], + type: "CodeUploadResult" + } + }; + exports2.runtime = { + ContractsApi: [ + { + methods: { + call: { + description: "Perform a call from a specified account to a given contract.", + params: [ + { + name: "origin", + type: "AccountId" + }, + { + name: "dest", + type: "AccountId" + }, + { + name: "value", + type: "Balance" + }, + { + name: "gasLimit", + type: "Option" + }, + { + name: "storageDepositLimit", + type: "Option" + }, + { + name: "inputData", + type: "Vec" + } + ], + type: "ContractExecResult" + }, + instantiate: { + description: "Instantiate a new contract.", + params: [ + { + name: "origin", + type: "AccountId" + }, + { + name: "value", + type: "Balance" + }, + { + name: "gasLimit", + type: "Option" + }, + { + name: "storageDepositLimit", + type: "Option" + }, + { + name: "code", + type: "CodeSource" + }, + { + name: "data", + type: "Bytes" + }, + { + name: "salt", + type: "Bytes" + } + ], + type: "ContractInstantiateResult" + }, + ...SHARED_V1_V22 + }, + version: 2 + }, + { + methods: { + call: { + description: "Perform a call from a specified account to a given contract.", + params: [ + { + name: "origin", + type: "AccountId" + }, + { + name: "dest", + type: "AccountId" + }, + { + name: "value", + type: "Balance" + }, + { + name: "gasLimit", + type: "u64" + }, + { + name: "storageDepositLimit", + type: "Option" + }, + { + name: "inputData", + type: "Vec" + } + ], + type: "ContractExecResultU64" + }, + instantiate: { + description: "Instantiate a new contract.", + params: [ + { + name: "origin", + type: "AccountId" + }, + { + name: "value", + type: "Balance" + }, + { + name: "gasLimit", + type: "u64" + }, + { + name: "storageDepositLimit", + type: "Option" + }, + { + name: "code", + type: "CodeSource" + }, + { + name: "data", + type: "Bytes" + }, + { + name: "salt", + type: "Bytes" + } + ], + type: "ContractInstantiateResultU64" + }, + ...SHARED_V1_V22 + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/contracts/definitions.js + var require_definitions15 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/contracts/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc3(); + var runtime_js_1 = require_runtime10(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + AliveContractInfo: { + trieId: "TrieId", + storageSize: "u32", + pairCount: "u32", + codeHash: "CodeHash", + rentAllowance: "Balance", + rentPaid: "Balance", + deductBlock: "BlockNumber", + lastWrite: "Option", + _reserved: "Option" + }, + CodeHash: "Hash", + CodeSource: { + _enum: { + Upload: "Bytes", + Existing: "Hash" + } + }, + CodeUploadRequest: { + origin: "AccountId", + code: "Bytes", + storageDepositLimit: "Option" + }, + CodeUploadResult: "Result", + CodeUploadResultValue: { + codeHash: "CodeHash", + deposit: "Balance" + }, + ContractCallRequest: { + origin: "AccountId", + dest: "AccountId", + value: "Balance", + gasLimit: "u64", + storageDepositLimit: "Option", + inputData: "Bytes" + }, + ContractExecResultSuccessTo255: { + status: "u8", + data: "Raw" + }, + ContractExecResultTo255: { + _enum: { + Success: "ContractExecResultSuccessTo255", + Error: "Null" + } + }, + ContractExecResultSuccessTo260: { + flags: "ContractReturnFlags", + data: "Bytes", + gasConsumed: "u64" + }, + ContractExecResultTo260: { + _enum: { + Success: "ContractExecResultSuccessTo260", + Error: "Null" + } + }, + ContractExecResultOk: { + flags: "ContractReturnFlags", + data: "Bytes" + }, + ContractExecResultResult: "Result", + ContractExecResultTo267: { + gasConsumed: "u64", + debugMessage: "Text", + result: "ContractExecResultResult" + }, + ContractExecResult: { + gasConsumed: "Weight", + gasRequired: "Weight", + storageDeposit: "StorageDeposit", + debugMessage: "Text", + result: "ContractExecResultResult" + }, + ContractExecResultU64: { + gasConsumed: "u64", + gasRequired: "u64", + storageDeposit: "StorageDeposit", + debugMessage: "Text", + result: "ContractExecResultResult" + }, + ContractInfo: { + _enum: { + Alive: "AliveContractInfo", + Tombstone: "TombstoneContractInfo" + } + }, + ContractCallFlags: { + _set: { + _bitLength: 32, + ForwardInput: 1, + CloneInput: 2, + TailCall: 4, + AllowReentry: 8 + } + }, + ContractReturnFlags: { + _set: { + _bitLength: 32, + Revert: 1 + } + }, + ContractStorageKey: "[u8; 32]", + DeletedContract: { + pairCount: "u32", + trieId: "TrieId" + }, + ExecReturnValue: { + flags: "ContractReturnFlags", + data: "Bytes" + }, + Gas: "u64", + HostFnWeightsTo264: { + caller: "Weight", + address: "Weight", + gasLeft: "Weight", + balance: "Weight", + valueTransferred: "Weight", + minimumBalance: "Weight", + tombstoneDeposit: "Weight", + rentAllowance: "Weight", + blockNumber: "Weight", + now: "Weight", + weightToFee: "Weight", + gas: "Weight", + input: "Weight", + inputPerByte: "Weight", + return: "Weight", + returnPerByte: "Weight", + terminate: "Weight", + restoreTo: "Weight", + restoreToPerDelta: "Weight", + random: "Weight", + depositEvent: "Weight", + depositEventPerTopic: "Weight", + depositEventPerByte: "Weight", + setRentAllowance: "Weight", + setStorage: "Weight", + setStoragePerByte: "Weight", + clearStorage: "Weight", + getStorage: "Weight", + getStoragePerByte: "Weight", + transfer: "Weight", + call: "Weight", + callTransferSurcharge: "Weight", + callPerInputByte: "Weight", + callPerOutputByte: "Weight", + instantiate: "Weight", + instantiatePerInputByte: "Weight", + instantiatePerOutputByte: "Weight", + hashSha2256: "Weight", + hashSha2256PerByte: "Weight", + hashKeccak256: "Weight", + hashKeccak256PerByte: "Weight", + hashBlake2256: "Weight", + hashBlake2256PerByte: "Weight", + hashBlake2128: "Weight", + hashBlake2128PerByte: "Weight" + }, + HostFnWeights: { + caller: "Weight", + address: "Weight", + gasLeft: "Weight", + balance: "Weight", + valueTransferred: "Weight", + minimumBalance: "Weight", + tombstoneDeposit: "Weight", + rentAllowance: "Weight", + blockNumber: "Weight", + now: "Weight", + weightToFee: "Weight", + gas: "Weight", + input: "Weight", + inputPerByte: "Weight", + return: "Weight", + returnPerByte: "Weight", + terminate: "Weight", + terminatePerCodeByte: "Weight", + restoreTo: "Weight", + restoreToPerCallerCodeByte: "Weight", + restoreToPerTombstoneCodeByte: "Weight", + restoreToPerDelta: "Weight", + random: "Weight", + depositEvent: "Weight", + depositEventPerTopic: "Weight", + depositEventPerByte: "Weight", + setRentAllowance: "Weight", + setStorage: "Weight", + setStoragePerByte: "Weight", + clearStorage: "Weight", + getStorage: "Weight", + getStoragePerByte: "Weight", + transfer: "Weight", + call: "Weight", + callPerCodeByte: "Weight", + callTransferSurcharge: "Weight", + callPerInputByte: "Weight", + callPerOutputByte: "Weight", + instantiate: "Weight", + instantiatePerCodeByte: "Weight", + instantiatePerInputByte: "Weight", + instantiatePerOutputByte: "Weight", + instantiatePerSaltByte: "Weight", + hashSha2256: "Weight", + hashSha2256PerByte: "Weight", + hashKeccak256: "Weight", + hashKeccak256PerByte: "Weight", + hashBlake2256: "Weight", + hashBlake2256PerByte: "Weight", + hashBlake2128: "Weight", + hashBlake2128PerByte: "Weight", + rentParams: "Weight" + }, + InstantiateRequestV1: { + origin: "AccountId", + value: "Balance", + gasLimit: "Gas", + code: "Bytes", + data: "Bytes", + salt: "Bytes" + }, + InstantiateRequestV2: { + _fallback: "InstantiateRequestV1", + origin: "AccountId", + value: "Balance", + gasLimit: "Gas", + storageDepositLimit: "Option", + code: "Bytes", + data: "Bytes", + salt: "Bytes" + }, + InstantiateRequest: { + _fallback: "InstantiateRequestV2", + origin: "AccountId", + value: "Balance", + gasLimit: "Gas", + storageDepositLimit: "Option", + code: "CodeSource", + data: "Bytes", + salt: "Bytes" + }, + ContractInstantiateResultTo267: "Result", + ContractInstantiateResultTo299: "Result", + ContractInstantiateResult: { + gasConsumed: "WeightV2", + gasRequired: "WeightV2", + storageDeposit: "StorageDeposit", + debugMessage: "Text", + result: "InstantiateReturnValue" + }, + ContractInstantiateResultU64: { + _fallback: "ContractInstantiateResultTo299", + gasConsumed: "u64", + gasRequired: "u64", + storageDeposit: "StorageDeposit", + debugMessage: "Text", + result: "InstantiateReturnValue" + }, + InstantiateReturnValueTo267: { + result: "ExecReturnValue", + accountId: "AccountId", + rentProjection: "Option" + }, + InstantiateReturnValueOk: { + result: "ExecReturnValue", + accountId: "AccountId" + }, + InstantiateReturnValue: "Result", + InstructionWeights: { + i64const: "u32", + i64load: "u32", + i64store: "u32", + select: "u32", + rIf: "u32", + br: "u32", + brIf: "u32", + brIable: "u32", + brIablePerEntry: "u32", + call: "u32", + callIndirect: "u32", + callIndirectPerParam: "u32", + localGet: "u32", + localSet: "u32", + local_tee: "u32", + globalGet: "u32", + globalSet: "u32", + memoryCurrent: "u32", + memoryGrow: "u32", + i64clz: "u32", + i64ctz: "u32", + i64popcnt: "u32", + i64eqz: "u32", + i64extendsi32: "u32", + i64extendui32: "u32", + i32wrapi64: "u32", + i64eq: "u32", + i64ne: "u32", + i64lts: "u32", + i64ltu: "u32", + i64gts: "u32", + i64gtu: "u32", + i64les: "u32", + i64leu: "u32", + i64ges: "u32", + i64geu: "u32", + i64add: "u32", + i64sub: "u32", + i64mul: "u32", + i64divs: "u32", + i64divu: "u32", + i64rems: "u32", + i64remu: "u32", + i64and: "u32", + i64or: "u32", + i64xor: "u32", + i64shl: "u32", + i64shrs: "u32", + i64shru: "u32", + i64rotl: "u32", + i64rotr: "u32" + }, + LimitsTo264: { + eventTopics: "u32", + stackHeight: "u32", + globals: "u32", + parameters: "u32", + memoryPages: "u32", + tableSize: "u32", + brTableSize: "u32", + subjectLen: "u32", + codeSize: "u32" + }, + Limits: { + eventTopics: "u32", + stackHeight: "u32", + globals: "u32", + parameters: "u32", + memoryPages: "u32", + tableSize: "u32", + brTableSize: "u32", + subjectLen: "u32" + }, + PrefabWasmModule: { + scheduleVersion: "Compact", + initial: "Compact", + maximum: "Compact", + refcount: "Compact", + _reserved: "Option", + code: "Bytes", + originalCodeLen: "u32" + }, + RentProjection: { + _enum: { + EvictionAt: "BlockNumber", + NoEviction: "Null" + } + }, + ScheduleTo212: { + version: "u32", + putCodePerByteCost: "Gas", + growMemCost: "Gas", + regularOpCost: "Gas", + returnDataPerByteCost: "Gas", + eventDataPerByteCost: "Gas", + eventPerTopicCost: "Gas", + eventBaseCost: "Gas", + sandboxDataReadCost: "Gas", + sandboxDataWriteCost: "Gas", + maxEventTopics: "u32", + maxStackHeight: "u32", + maxMemoryPages: "u32", + enablePrintln: "bool", + maxSubjectLen: "u32" + }, + ScheduleTo258: { + version: "u32", + putCodePerByteCost: "Gas", + growMemCost: "Gas", + regularOpCost: "Gas", + returnDataPerByteCost: "Gas", + eventDataPerByteCost: "Gas", + eventPerTopicCost: "Gas", + eventBaseCost: "Gas", + sandboxDataReadCost: "Gas", + sandboxDataWriteCost: "Gas", + transferCost: "Gas", + maxEventTopics: "u32", + maxStackHeight: "u32", + maxMemoryPages: "u32", + enablePrintln: "bool", + maxSubjectLen: "u32" + }, + ScheduleTo264: { + version: "u32", + enablePrintln: "bool", + limits: "LimitsTo264", + instructionWeights: "InstructionWeights", + hostFnWeights: "HostFnWeightsTo264" + }, + Schedule: { + version: "u32", + enablePrintln: "bool", + limits: "Limits", + instructionWeights: "InstructionWeights", + hostFnWeights: "HostFnWeights" + }, + SeedOf: "Hash", + StorageDeposit: { + _enum: { + Refund: "Balance", + Charge: "Balance" + } + }, + TombstoneContractInfo: "Hash", + TrieId: "Bytes" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/democracy/definitions.js + var require_definitions16 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/democracy/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AllConvictions = void 0; + exports2.AllConvictions = [ + "None", + "Locked1x", + "Locked2x", + "Locked3x", + "Locked4x", + "Locked5x", + "Locked6x" + ]; + exports2.default = { + rpc: {}, + types: { + AccountVote: { + _enum: { + Standard: "AccountVoteStandard", + Split: "AccountVoteSplit" + } + }, + AccountVoteSplit: { + aye: "Balance", + nay: "Balance" + }, + AccountVoteStandard: { + vote: "Vote", + balance: "Balance" + }, + Conviction: { + _enum: exports2.AllConvictions + }, + Delegations: { + votes: "Balance", + capital: "Balance" + }, + PreimageStatus: { + _enum: { + Missing: "BlockNumber", + Available: "PreimageStatusAvailable" + } + }, + PreimageStatusAvailable: { + data: "Bytes", + provider: "AccountId", + deposit: "Balance", + since: "BlockNumber", + expiry: "Option" + }, + PriorLock: "(BlockNumber, Balance)", + PropIndex: "u32", + Proposal: "Call", + ProxyState: { + _enum: { + Open: "AccountId", + Active: "AccountId" + } + }, + ReferendumIndex: "u32", + ReferendumInfoTo239: { + end: "BlockNumber", + proposalHash: "Hash", + threshold: "VoteThreshold", + delay: "BlockNumber" + }, + ReferendumInfo: { + _enum: { + Ongoing: "ReferendumStatus", + Finished: "ReferendumInfoFinished" + } + }, + ReferendumInfoFinished: { + approved: "bool", + end: "BlockNumber" + }, + ReferendumStatus: { + end: "BlockNumber", + proposalHash: "Hash", + threshold: "VoteThreshold", + delay: "BlockNumber", + tally: "Tally" + }, + Tally: { + ayes: "Balance", + nays: "Balance", + turnout: "Balance" + }, + Voting: { + _enum: { + Direct: "VotingDirect", + Delegating: "VotingDelegating" + } + }, + VotingDirect: { + votes: "Vec", + delegations: "Delegations", + prior: "PriorLock" + }, + VotingDirectVote: "(ReferendumIndex, AccountVote)", + VotingDelegating: { + balance: "Balance", + target: "AccountId", + conviction: "Conviction", + delegations: "Delegations", + prior: "PriorLock" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/dev/rpc.js + var require_rpc4 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/dev/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + getBlockStats: { + description: "Reexecute the specified `block_hash` and gather statistics while doing so", + isUnsafe: true, + params: [ + { + isHistoric: true, + name: "at", + type: "Hash" + } + ], + type: "Option" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/dev/definitions.js + var require_definitions17 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/dev/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc4(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: { + BlockStats: { + witnessLen: "u64", + witnessCompactLen: "u64", + blockLen: "u64", + blockNumExtrinsics: "u64" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/discovery/runtime.js + var require_runtime11 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/discovery/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + AuthorityDiscoveryApi: [ + { + methods: { + authorities: { + description: "Retrieve authority identifiers of the current and next authority set.", + params: [], + type: "Vec" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/discovery/definitions.js + var require_definitions18 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/discovery/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime11(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/elections/definitions.js + var require_definitions19 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/elections/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + ApprovalFlag: "u32", + DefunctVoter: { + who: "AccountId", + voteCount: "Compact", + candidateCount: "Compact" + }, + Renouncing: { + _enum: { + Member: "Null", + RunnerUp: "Null", + Candidate: "Compact" + } + }, + SetIndex: "u32", + Vote: "GenericVote", + VoteIndex: "u32", + VoterInfo: { + lastActive: "VoteIndex", + lastWin: "VoteIndex", + pot: "Balance", + stake: "Balance" + }, + VoteThreshold: { + _enum: [ + "Super Majority Approve", + "Super Majority Against", + "Simple Majority" + ] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/engine/rpc.js + var require_rpc5 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/engine/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + createBlock: { + description: "Instructs the manual-seal authorship task to create a new block", + params: [ + { + name: "createEmpty", + type: "bool" + }, + { + name: "finalize", + type: "bool" + }, + { + isOptional: true, + name: "parentHash", + type: "BlockHash" + } + ], + type: "CreatedBlock" + }, + finalizeBlock: { + description: "Instructs the manual-seal authorship task to finalize a block", + params: [ + { + name: "hash", + type: "BlockHash" + }, + { + isOptional: true, + name: "justification", + type: "Justification" + } + ], + type: "bool" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/engine/definitions.js + var require_definitions20 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/engine/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc5(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: { + CreatedBlock: { + _alias: { + blockHash: "hash" + }, + blockHash: "BlockHash", + aux: "ImportedAux" + }, + ImportedAux: { + headerOnly: "bool", + clearJustificationRequests: "bool", + needsJustification: "bool", + badJustification: "bool", + needsFinalityProof: "bool", + isNewBest: "bool" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/evm/definitions.js + var require_definitions21 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/evm/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + EvmAccount: { + nonce: "u256", + balance: "u256" + }, + EvmCallInfo: { + exitReason: "ExitReason", + value: "Bytes", + usedGas: "U256", + logs: "Vec" + }, + EvmCreateInfo: { + exitReason: "ExitReason", + value: "H160", + usedGas: "U256", + logs: "Vec" + }, + EvmCallInfoV2: { + exitReason: "ExitReason", + value: "Bytes", + usedGas: "U256", + weightInfo: "Option", + logs: "Vec" + }, + EvmCreateInfoV2: { + exitReason: "ExitReason", + value: "H160", + usedGas: "U256", + weightInfo: "Option", + logs: "Vec" + }, + EvmLog: { + address: "H160", + topics: "Vec", + data: "Bytes" + }, + EvmVicinity: { + gasPrice: "u256", + origin: "H160" + }, + EvmWeightInfo: { + refTimeLimit: "Option", + proofSizeLimit: "Option", + refTimeUsage: "Option", + proofSizeUsage: "Option" + }, + ExitError: { + _enum: { + StackUnderflow: "Null", + StackOverflow: "Null", + InvalidJump: "Null", + InvalidRange: "Null", + DesignatedInvalid: "Null", + CallTooDeep: "Null", + CreateCollision: "Null", + CreateContractLimit: "Null", + OutOfOffset: "Null", + OutOfGas: "Null", + OutOfFund: "Null", + PCUnderflow: "Null", + CreateEmpty: "Null", + Other: "Text" + } + }, + ExitFatal: { + _enum: { + NotSupported: "Null", + UnhandledInterrupt: "Null", + CallErrorAsFatal: "ExitError", + Other: "Text" + } + }, + ExitReason: { + _enum: { + Succeed: "ExitSucceed", + Error: "ExitError", + Revert: "ExitRevert", + Fatal: "ExitFatal" + } + }, + ExitRevert: { + _enum: ["Reverted"] + }, + ExitSucceed: { + _enum: ["Stopped", "Returned", "Suicided"] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/extrinsics/definitions.js + var require_definitions22 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/extrinsics/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + Extrinsic: "GenericExtrinsic", + ExtrinsicEra: "GenericExtrinsicEra", + ExtrinsicPayload: "GenericExtrinsicPayload", + ExtrinsicSignature: "MultiSignature", + ExtrinsicV4: "GenericExtrinsicV4", + ExtrinsicPayloadV4: "GenericExtrinsicPayloadV4", + ExtrinsicSignatureV4: "GenericExtrinsicSignatureV4", + ExtrinsicUnknown: "GenericExtrinsicUnknown", + ExtrinsicPayloadUnknown: "GenericExtrinsicPayloadUnknown", + Era: "ExtrinsicEra", + ImmortalEra: "GenericImmortalEra", + MortalEra: "GenericMortalEra", + AnySignature: "H512", + MultiSignature: { + _enum: { + Ed25519: "Ed25519Signature", + Sr25519: "Sr25519Signature", + Ecdsa: "EcdsaSignature" + } + }, + Signature: "H512", + SignerPayload: "GenericSignerPayload", + EcdsaSignature: "[u8; 65]", + Ed25519Signature: "H512", + Sr25519Signature: "H512" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/fungibles/runtime.js + var require_runtime12 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/fungibles/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + FungiblesApi: [ + { + methods: { + query_account_balances: { + description: "Returns the list of all `MultiAsset` that an `AccountId` has", + params: [ + { + name: "account", + type: "AccountId" + } + ], + type: "Result, FungiblesAccessError>" + } + }, + version: 1 + }, + { + methods: { + query_account_balances: { + description: "Returns the list of all `MultiAsset` that an `AccountId` has", + params: [ + { + name: "account", + type: "AccountId" + } + ], + type: "Result" + } + }, + version: 2 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/fungibles/definitions.js + var require_definitions23 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/fungibles/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime12(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + FungiblesAccessError: { + _enum: ["AssetIdConversionFailed", "AmountToBalanceConversionFailed"] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/genericAsset/definitions.js + var require_definitions24 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/genericAsset/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + AssetOptions: { + initalIssuance: "Compact", + permissions: "PermissionLatest" + }, + Owner: { + _enum: { + None: "Null", + Address: "AccountId" + } + }, + PermissionsV1: { + update: "Owner", + mint: "Owner", + burn: "Owner" + }, + PermissionVersions: { + _enum: { + V1: "PermissionsV1" + } + }, + PermissionLatest: "PermissionsV1" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/genesisBuilder/runtime.js + var require_runtime13 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/genesisBuilder/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + GenesisBuilder: [ + { + methods: { + build_config: { + description: "Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.", + params: [ + { + name: "json", + type: "Vec" + } + ], + type: "Result<(), GenesisBuildErr>" + }, + create_default_config: { + description: "Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.", + params: [], + type: "Vec" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/genesisBuilder/definitions.js + var require_definitions25 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/genesisBuilder/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime13(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + GenesisBuildErr: "Text" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/gilt/definitions.js + var require_definitions26 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/gilt/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + ActiveGilt: { + proportion: "Perquintill", + amount: "Balance", + who: "AccountId", + expiry: "BlockNumber" + }, + ActiveGiltsTotal: { + frozen: "Balance", + proportion: "Perquintill", + index: "ActiveIndex", + target: "Perquintill" + }, + ActiveIndex: "u32", + GiltBid: { + amount: "Balance", + who: "AccountId" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/grandpa/rpc.js + var require_rpc6 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/grandpa/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + proveFinality: { + description: "Prove finality for the given block number, returning the Justification for the last block in the set.", + params: [ + { + name: "blockNumber", + type: "BlockNumber" + } + ], + type: "Option" + }, + roundState: { + description: "Returns the state of the current best round state as well as the ongoing background rounds", + params: [], + type: "ReportedRoundStates" + }, + subscribeJustifications: { + description: "Subscribes to grandpa justifications", + params: [], + pubsub: [ + "justifications", + "subscribeJustifications", + "unsubscribeJustifications" + ], + type: "JustificationNotification" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/grandpa/runtime.js + var require_runtime14 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/grandpa/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var GRANDPA_V2_V32 = { + generate_key_ownership_proof: { + description: "Generates a proof of key ownership for the given authority in the given set.", + params: [ + { + name: "setId", + type: "SetId" + }, + { + name: "authorityId", + type: "AuthorityId" + } + ], + type: "Option" + }, + grandpa_authorities: { + description: "Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.", + params: [], + type: "AuthorityList" + }, + submit_report_equivocation_unsigned_extrinsic: { + description: "Submits an unsigned extrinsic to report an equivocation.", + params: [ + { + name: "equivocationProof", + type: "GrandpaEquivocationProof" + }, + { + name: "keyOwnerProof", + type: "OpaqueKeyOwnershipProof" + } + ], + type: "Option" + } + }; + exports2.runtime = { + GrandpaApi: [ + { + methods: { + current_set_id: { + description: "Get current GRANDPA authority set id.", + params: [], + type: "SetId" + }, + ...GRANDPA_V2_V32 + }, + version: 3 + }, + { + methods: GRANDPA_V2_V32, + version: 2 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/grandpa/definitions.js + var require_definitions27 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/grandpa/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc6(); + var runtime_js_1 = require_runtime14(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + AuthorityIndex: "u64", + AuthorityList: "Vec", + AuthoritySet: { + currentAuthorities: "AuthorityList", + setId: "u64", + pendingStandardChanges: "ForkTreePendingChange", + pendingForcedChanges: "Vec", + authoritySetChanges: "AuthoritySetChanges" + }, + ForkTreePendingChange: { + roots: "Vec", + bestFinalizedNumber: "Option" + }, + ForkTreePendingChangeNode: { + hash: "BlockHash", + number: "BlockNumber", + data: "PendingChange", + children: "Vec" + }, + AuthoritySetChange: "(U64, BlockNumber)", + AuthoritySetChanges: "Vec", + AuthorityWeight: "u64", + DelayKind: { + _enum: { + Finalized: "Null", + Best: "DelayKindBest" + } + }, + DelayKindBest: { + medianLastFinalized: "BlockNumber" + }, + EncodedFinalityProofs: "Bytes", + GrandpaEquivocation: { + _enum: { + Prevote: "GrandpaEquivocationValue", + Precommit: "GrandpaEquivocationValue" + } + }, + GrandpaEquivocationProof: { + setId: "SetId", + equivocation: "GrandpaEquivocation" + }, + GrandpaEquivocationValue: { + roundNumber: "u64", + identity: "AuthorityId", + first: "(GrandpaPrevote, AuthoritySignature)", + second: "(GrandpaPrevote, AuthoritySignature)" + }, + GrandpaPrevote: { + targetHash: "Hash", + targetNumber: "BlockNumber" + }, + GrandpaCommit: { + targetHash: "BlockHash", + targetNumber: "BlockNumber", + precommits: "Vec" + }, + GrandpaPrecommit: { + targetHash: "BlockHash", + targetNumber: "BlockNumber" + }, + GrandpaSignedPrecommit: { + precommit: "GrandpaPrecommit", + signature: "AuthoritySignature", + id: "AuthorityId" + }, + GrandpaJustification: { + round: "u64", + commit: "GrandpaCommit", + votesAncestries: "Vec
" + }, + JustificationNotification: "Bytes", + KeyOwnerProof: "MembershipProof", + NextAuthority: "(AuthorityId, AuthorityWeight)", + PendingChange: { + nextAuthorities: "AuthorityList", + delay: "BlockNumber", + canonHeight: "BlockNumber", + canonHash: "BlockHash", + delayKind: "DelayKind" + }, + PendingPause: { + scheduledAt: "BlockNumber", + delay: "BlockNumber" + }, + PendingResume: { + scheduledAt: "BlockNumber", + delay: "BlockNumber" + }, + Precommits: { + currentWeight: "u32", + missing: "BTreeSet" + }, + Prevotes: { + currentWeight: "u32", + missing: "BTreeSet" + }, + ReportedRoundStates: { + setId: "u32", + best: "RoundState", + background: "Vec" + }, + RoundState: { + round: "u32", + totalWeight: "u32", + thresholdWeight: "u32", + prevotes: "Prevotes", + precommits: "Precommits" + }, + SetId: "u64", + StoredPendingChange: { + scheduledAt: "BlockNumber", + delay: "BlockNumber", + nextAuthorities: "AuthorityList" + }, + StoredState: { + _enum: { + Live: "Null", + PendingPause: "PendingPause", + Paused: "Null", + PendingResume: "PendingResume" + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/identity/definitions.js + var require_definitions28 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/identity/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + IdentityFields: { + _set: { + _bitLength: 64, + Display: 1, + Legal: 2, + Web: 4, + Riot: 8, + Email: 16, + PgpFingerprint: 32, + Image: 64, + Twitter: 128 + } + }, + IdentityInfoAdditional: "(Data, Data)", + IdentityInfoTo198: { + additional: "Vec", + display: "Data", + legal: "Data", + web: "Data", + riot: "Data", + email: "Data", + pgpFingerprint: "Option", + image: "Data" + }, + IdentityInfo: { + _fallback: "IdentityInfoTo198", + additional: "Vec", + display: "Data", + legal: "Data", + web: "Data", + riot: "Data", + email: "Data", + pgpFingerprint: "Option", + image: "Data", + twitter: "Data" + }, + IdentityJudgement: { + _enum: { + Unknown: "Null", + FeePaid: "Balance", + Reasonable: "Null", + KnownGood: "Null", + OutOfDate: "Null", + LowQuality: "Null", + Erroneous: "Null" + } + }, + RegistrationJudgement: "(RegistrarIndex, IdentityJudgement)", + RegistrationTo198: { + judgements: "Vec", + deposit: "Balance", + info: "IdentityInfoTo198" + }, + Registration: { + _fallback: "RegistrationTo198", + judgements: "Vec", + deposit: "Balance", + info: "IdentityInfo" + }, + RegistrarIndex: "u32", + RegistrarInfo: { + account: "AccountId", + fee: "Balance", + fields: "IdentityFields" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/imOnline/definitions.js + var require_definitions29 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/imOnline/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + AuthIndex: "u32", + AuthoritySignature: "Signature", + Heartbeat: { + blockNumber: "BlockNumber", + networkState: "OpaqueNetworkState", + sessionIndex: "SessionIndex", + authorityIndex: "AuthIndex", + validatorsLen: "u32" + }, + HeartbeatTo244: { + blockNumber: "BlockNumber", + networkState: "OpaqueNetworkState", + sessionIndex: "SessionIndex", + authorityIndex: "AuthIndex" + }, + OpaqueMultiaddr: "Opaque", + OpaquePeerId: "Opaque", + OpaqueNetworkState: { + peerId: "OpaquePeerId", + externalAddresses: "Vec" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/lottery/definitions.js + var require_definitions30 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/lottery/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + CallIndex: "(u8, u8)", + LotteryConfig: { + price: "Balance", + start: "BlockNumber", + length: "BlockNumber", + delay: "BlockNumber", + repeat: "bool" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/mixnet/runtime.js + var require_runtime15 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/mixnet/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + MixnetApi: [ + { + methods: { + current_mixnodes: { + description: "Get the index and phase of the current session.", + params: [], + type: "Result" + }, + maybe_register: { + description: "Try to register a mixnode for the next session.", + params: [ + { + name: "session_index", + type: "u32" + }, + { + name: "mixnode", + type: "Mixnode" + } + ], + type: "bool" + }, + prev_mixnodes: { + description: "Get the index and phase of the current session.", + params: [], + type: "Result" + }, + session_status: { + description: "Get the index and phase of the current session.", + params: [], + type: "SessionStatus" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/mixnet/definitions.js + var require_definitions31 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/mixnet/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime15(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + Mixnode: { + externalAddresses: "Vec", + kxPublic: "[u8; 32]", + peerId: "[u8; 32]" + }, + MixnodesErr: { + _enum: { + InsufficientRegistrations: { + min: "u32", + num: "u32" + } + } + }, + SessionPhase: { + _enum: ["CoverToCurrent", "RequestsToCurrent", "CoverToPrev", "DisconnectFromPrev"] + }, + SessionStatus: { + currentIndex: "u32", + phase: "SessionPhase" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/mmr/rpc.js + var require_rpc7 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/mmr/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + generateProof: { + description: "Generate MMR proof for the given block numbers.", + params: [ + { + name: "blockNumbers", + type: "Vec" + }, + { + isOptional: true, + name: "bestKnownBlockNumber", + type: "u64" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "MmrLeafBatchProof" + }, + root: { + description: "Get the MMR root hash for the current best block.", + params: [ + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "MmrHash" + }, + verifyProof: { + description: "Verify an MMR proof", + params: [ + { + name: "proof", + type: "MmrLeafBatchProof" + } + ], + type: "bool" + }, + verifyProofStateless: { + description: "Verify an MMR proof statelessly given an mmr_root", + params: [ + { + name: "root", + type: "MmrHash" + }, + { + name: "proof", + type: "MmrLeafBatchProof" + } + ], + type: "bool" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/mmr/runtime.js + var require_runtime16 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/mmr/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var MMR_V22 = { + generate_proof: { + description: "Generate MMR proof for the given block numbers.", + params: [ + { + name: "blockNumbers", + type: "Vec" + }, + { + name: "bestKnownBlockNumber", + type: "Option" + } + ], + type: "Result<(Vec, MmrBatchProof), MmrError>" + }, + mmr_leaf_count: { + description: "Return the number of MMR blocks in the chain.", + params: [], + type: "Result" + }, + mmr_root: { + description: "Return the on-chain MMR root hash.", + params: [], + type: "Result" + }, + verify_proof: { + description: "Verify MMR proof against on-chain MMR.", + params: [ + { + name: "leaves", + type: "Vec" + }, + { + name: "proof", + type: "MmrBatchProof" + } + ], + type: "Result<(), MmrError>" + }, + verify_proof_stateless: { + description: "Verify MMR proof against given root hash.", + params: [ + { + name: "root", + type: "Hash" + }, + { + name: "leaves", + type: "Vec" + }, + { + name: "proof", + type: "MmrBatchProof" + } + ], + type: "Result<(), MmrError>" + } + }; + var MMR_V12 = { + generate_batch_proof: { + description: "Generate MMR proof for a series of leaves under given indices.", + params: [ + { + name: "leafIndices", + type: "Vec" + } + ], + type: "Result<(Vec, MmrBatchProof), MmrError>" + }, + generate_proof: { + description: "Generate MMR proof for a leaf under given index.", + params: [ + { + name: "leafIndex", + type: "MmrLeafIndex" + } + ], + type: "Result<(MmrEncodableOpaqueLeaf, MmrProof), MmrError>" + }, + mmr_root: { + description: "Return the on-chain MMR root hash.", + params: [], + type: "Result" + }, + verify_batch_proof: { + description: "Verify MMR proof against on-chain MMR for a batch of leaves.", + params: [ + { + name: "leaves", + type: "Vec" + }, + { + name: "proof", + type: "MmrBatchProof" + } + ], + type: "Result<(), MmrError>" + }, + verify_batch_proof_stateless: { + description: "Verify MMR proof against given root hash or a batch of leaves.", + params: [ + { + name: "root", + type: "Hash" + }, + { + name: "leaves", + type: "Vec" + }, + { + name: "proof", + type: "MmrBatchProof" + } + ], + type: "Result<(), MmrError>" + }, + verify_proof: { + description: "Verify MMR proof against on-chain MMR.", + params: [ + { + name: "leaf", + type: "MmrEncodableOpaqueLeaf" + }, + { + name: "proof", + type: "MmrProof" + } + ], + type: "Result<(), MmrError>" + }, + verify_proof_stateless: { + description: "Verify MMR proof against given root hash.", + params: [ + { + name: "root", + type: "Hash" + }, + { + name: "leaf", + type: "MmrEncodableOpaqueLeaf" + }, + { + name: "proof", + type: "MmrProof" + } + ], + type: "Result<(), MmrError>" + } + }; + exports2.runtime = { + MmrApi: [ + { + methods: MMR_V22, + version: 2 + }, + { + methods: MMR_V12, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/mmr/definitions.js + var require_definitions32 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/mmr/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc7(); + var runtime_js_1 = require_runtime16(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + MmrBatchProof: { + leafIndices: "Vec", + leafCount: "MmrNodeIndex", + items: "Vec" + }, + MmrEncodableOpaqueLeaf: "Bytes", + MmrError: { + _enum: ["InvalidNumericOp", "Push", "GetRoot", "Commit", "GenerateProof", "Verify", "LeafNotFound", " PalletNotIncluded", "InvalidLeafIndex", "InvalidBestKnownBlock"] + }, + MmrHash: "Hash", + MmrLeafBatchProof: { + blockHash: "BlockHash", + leaves: "Bytes", + proof: "Bytes" + }, + MmrLeafIndex: "u64", + MmrLeafProof: { + blockHash: "BlockHash", + leaf: "Bytes", + proof: "Bytes" + }, + MmrNodeIndex: "u64", + MmrProof: { + leafIndex: "MmrLeafIndex", + leafCount: "MmrNodeIndex", + items: "Vec" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/nfts/runtime.js + var require_runtime17 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/nfts/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + NftsApi: [ + { + methods: { + attribute: { + description: "An attribute", + params: [ + { + name: "collection", + type: "NftCollectionId" + }, + { + name: "item", + type: "NftItemId" + }, + { + name: "key", + type: "Bytes" + } + ], + type: "Option" + }, + collection_attribute: { + description: "A collection attribute", + params: [ + { + name: "collection", + type: "NftCollectionId" + }, + { + name: "key", + type: "Bytes" + } + ], + type: "Option" + }, + collection_owner: { + description: "A collection owner", + params: [ + { + name: "collection", + type: "NftCollectionId" + } + ], + type: "Option" + }, + custom_attribute: { + description: "A custom attribute", + params: [ + { + name: "account", + type: "AccountId" + }, + { + name: "collection", + type: "NftCollectionId" + }, + { + name: "item", + type: "NftItemId" + }, + { + name: "key", + type: "Bytes" + } + ], + type: "Option" + }, + owner: { + description: "Collection owner", + params: [ + { + name: "collection", + type: "NftCollectionId" + }, + { + name: "item", + type: "NftItemId" + } + ], + type: "Option" + }, + system_attribute: { + description: "System attribute", + params: [ + { + name: "collection", + type: "NftCollectionId" + }, + { + name: "item", + type: "NftItemId" + }, + { + name: "key", + type: "Bytes" + } + ], + type: "Option" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/nfts/definitions.js + var require_definitions33 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/nfts/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime17(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + NftCollectionId: "u32", + NftItemId: "u32" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/nompools/runtime.js + var require_runtime18 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/nompools/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + NominationPoolsApi: [ + { + methods: { + balance_to_points: { + description: "Returns the equivalent points of `new_funds` for a given pool.", + params: [ + { + name: "poolId", + type: "NpPoolId" + }, + { + name: "newFunds", + type: "Balance" + } + ], + type: "Balance" + }, + pending_rewards: { + description: "Returns the pending rewards for the given member.", + params: [ + { + name: "member", + type: "AccountId" + } + ], + type: "Balance" + }, + points_to_balance: { + description: "Returns the equivalent balance of `points` for a given pool.", + params: [ + { + name: "poolId", + type: "NpPoolId" + }, + { + name: "points", + type: "Balance" + } + ], + type: "Balance" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/nompools/definitions.js + var require_definitions34 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/nompools/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime18(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + NpApiError: { + _enum: ["MemberNotFound", "OverflowInPendingRewards"] + }, + NpPoolId: "u32" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/offences/definitions.js + var require_definitions35 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/offences/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + DeferredOffenceOf: "(Vec, Vec, SessionIndex)", + Kind: "[u8; 16]", + OffenceDetails: { + offender: "Offender", + reporters: "Vec" + }, + Offender: "IdentificationTuple", + OpaqueTimeSlot: "Bytes", + ReportIdOf: "Hash", + Reporter: "AccountId" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/pow/runtime.js + var require_runtime19 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/pow/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + DifficultyApi: [ + { + methods: { + difficulty: { + description: "Return the target difficulty of the next block.", + params: [], + type: "Raw" + } + }, + version: 1 + } + ], + TimestampApi: [ + { + methods: { + timestamp: { + description: "API necessary for timestamp-based difficulty adjustment algorithms.", + params: [], + type: "Moment" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/pow/definitions.js + var require_definitions36 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/pow/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime19(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/proxy/definitions.js + var require_definitions37 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/proxy/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + ProxyDefinition: { + delegate: "AccountId", + proxyType: "ProxyType", + delay: "BlockNumber" + }, + ProxyType: { + _enum: ["Any", "NonTransfer", "Governance", "Staking"] + }, + ProxyAnnouncement: { + real: "AccountId", + callHash: "Hash", + height: "BlockNumber" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/recovery/definitions.js + var require_definitions38 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/recovery/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + ActiveRecovery: { + created: "BlockNumber", + deposit: "Balance", + friends: "Vec" + }, + RecoveryConfig: { + delayPeriod: "BlockNumber", + deposit: "Balance", + friends: "Vec", + threshold: "u16" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/scheduler/definitions.js + var require_definitions39 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/scheduler/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + Period: "(BlockNumber, u32)", + Priority: "u8", + SchedulePeriod: "Period", + SchedulePriority: "Priority", + Scheduled: { + maybeId: "Option", + priority: "SchedulePriority", + call: "Call", + maybePeriodic: "Option", + origin: "PalletsOrigin" + }, + ScheduledTo254: { + maybeId: "Option", + priority: "SchedulePriority", + call: "Call", + maybePeriodic: "Option" + }, + TaskAddress: "(BlockNumber, u32)" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/session/runtime.js + var require_runtime20 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/session/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + SessionKeys: [ + { + methods: { + decode_session_keys: { + description: "Decode the given public session keys.", + params: [ + { + name: "encoded", + type: "Bytes" + } + ], + type: "Option>" + }, + generate_session_keys: { + description: "Generate a set of session keys with optionally using the given seed.", + params: [ + { + name: "seed", + type: "Option" + } + ], + type: "Bytes" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/session/definitions.js + var require_definitions40 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/session/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime20(); + var keyTypes2 = { + BeefyKey: "[u8; 33]", + Keys: "SessionKeys4", + SessionKeys1: "(AccountId)", + SessionKeys2: "(AccountId, AccountId)", + SessionKeys3: "(AccountId, AccountId, AccountId)", + SessionKeys4: "(AccountId, AccountId, AccountId, AccountId)", + SessionKeys5: "(AccountId, AccountId, AccountId, AccountId, AccountId)", + SessionKeys6: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + SessionKeys6B: "(AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + SessionKeys7: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + SessionKeys7B: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + SessionKeys8: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + SessionKeys8B: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + SessionKeys9: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + SessionKeys9B: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + SessionKeys10: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + SessionKeys10B: "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)" + }; + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + ...keyTypes2, + FullIdentification: "Exposure", + IdentificationTuple: "(ValidatorId, FullIdentification)", + MembershipProof: { + session: "SessionIndex", + trieNodes: "Vec", + validatorCount: "ValidatorCount" + }, + SessionIndex: "u32", + ValidatorCount: "u32" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/society/definitions.js + var require_definitions41 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/society/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + Bid: { + who: "AccountId", + kind: "BidKind", + value: "Balance" + }, + BidKind: { + _enum: { + Deposit: "Balance", + Vouch: "(AccountId, Balance)" + } + }, + SocietyJudgement: { + _enum: ["Rebid", "Reject", "Approve"] + }, + SocietyVote: { + _enum: ["Skeptic", "Reject", "Approve"] + }, + StrikeCount: "u32", + VouchingStatus: { + _enum: ["Vouching", "Banned"] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/staking/runtime.js + var require_runtime21 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/staking/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + StakingApi: [ + { + methods: { + nominations_quota: { + description: "Returns the nominations quota for a nominator with a given balance.", + params: [ + { + name: "balance", + type: "Balance" + } + ], + type: "u32" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/staking/definitions.js + var require_definitions42 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/staking/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime21(); + var deprecated2 = { + Points: "u32", + EraPoints: { + total: "Points", + individual: "Vec" + } + }; + var phragmen2 = { + CompactAssignments: "CompactAssignmentsWith16", + CompactAssignmentsWith16: { + votes1: "Vec<(NominatorIndexCompact, ValidatorIndexCompact)>", + votes2: "Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>", + votes3: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>", + votes4: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>", + votes5: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>", + votes6: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>", + votes7: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>", + votes8: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>", + votes9: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>", + votes10: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>", + votes11: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>", + votes12: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>", + votes13: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>", + votes14: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>", + votes15: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>", + votes16: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>" + }, + CompactAssignmentsWith24: { + votes1: "Vec<(NominatorIndexCompact, ValidatorIndexCompact)>", + votes2: "Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>", + votes3: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>", + votes4: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>", + votes5: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>", + votes6: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>", + votes7: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>", + votes8: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>", + votes9: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>", + votes10: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>", + votes11: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>", + votes12: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>", + votes13: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>", + votes14: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>", + votes15: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>", + votes16: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>", + votes17: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 16], ValidatorIndexCompact)>", + votes18: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 17], ValidatorIndexCompact)>", + votes19: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 18], ValidatorIndexCompact)>", + votes20: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 19], ValidatorIndexCompact)>", + votes21: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 20], ValidatorIndexCompact)>", + votes22: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 21], ValidatorIndexCompact)>", + votes23: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 22], ValidatorIndexCompact)>", + votes24: "Vec<(NominatorIndexCompact, [CompactScoreCompact; 23], ValidatorIndexCompact)>" + }, + CompactAssignmentsTo265: "CompactAssignmentsWith16", + CompactAssignmentsTo257: { + votes1: "Vec<(NominatorIndex, [CompactScore; 0], ValidatorIndex)>", + votes2: "Vec<(NominatorIndex, [CompactScore; 1], ValidatorIndex)>", + votes3: "Vec<(NominatorIndex, [CompactScore; 2], ValidatorIndex)>", + votes4: "Vec<(NominatorIndex, [CompactScore; 3], ValidatorIndex)>", + votes5: "Vec<(NominatorIndex, [CompactScore; 4], ValidatorIndex)>", + votes6: "Vec<(NominatorIndex, [CompactScore; 5], ValidatorIndex)>", + votes7: "Vec<(NominatorIndex, [CompactScore; 6], ValidatorIndex)>", + votes8: "Vec<(NominatorIndex, [CompactScore; 7], ValidatorIndex)>", + votes9: "Vec<(NominatorIndex, [CompactScore; 8], ValidatorIndex)>", + votes10: "Vec<(NominatorIndex, [CompactScore; 9], ValidatorIndex)>", + votes11: "Vec<(NominatorIndex, [CompactScore; 10], ValidatorIndex)>", + votes12: "Vec<(NominatorIndex, [CompactScore; 11], ValidatorIndex)>", + votes13: "Vec<(NominatorIndex, [CompactScore; 12], ValidatorIndex)>", + votes14: "Vec<(NominatorIndex, [CompactScore; 13], ValidatorIndex)>", + votes15: "Vec<(NominatorIndex, [CompactScore; 14], ValidatorIndex)>", + votes16: "Vec<(NominatorIndex, [CompactScore; 15], ValidatorIndex)>" + }, + CompactScore: "(ValidatorIndex, OffchainAccuracy)", + CompactScoreCompact: "(ValidatorIndexCompact, OffchainAccuracyCompact)", + ElectionCompute: { + _enum: ["OnChain", "Signed", "Unsigned"] + }, + ElectionPhase: { + _enum: { + Off: null, + Signed: null, + Unsigned: "(bool, BlockNumber)", + Emergency: null + } + }, + ElectionResult: { + compute: "ElectionCompute", + slotStake: "Balance", + electedStashes: "Vec", + exposures: "Vec<(AccountId, Exposure)>" + }, + ElectionScore: "[u128; 3]", + ElectionSize: { + validators: "Compact", + nominators: "Compact" + }, + ElectionStatus: { + _enum: { + Close: "Null", + Open: "BlockNumber" + } + }, + ExtendedBalance: "u128", + RawSolution: "RawSolutionWith16", + RawSolutionWith16: { + compact: "CompactAssignmentsWith16", + score: "ElectionScore", + round: "u32" + }, + RawSolutionWith24: { + compact: "CompactAssignmentsWith24", + score: "ElectionScore", + round: "u32" + }, + RawSolutionTo265: "RawSolutionWith16", + ReadySolution: { + supports: "SolutionSupports", + score: "ElectionScore", + compute: "ElectionCompute" + }, + RoundSnapshot: { + voters: "Vec<(AccountId, VoteWeight, Vec)>", + targets: "Vec" + }, + SeatHolder: { + who: "AccountId", + stake: "Balance", + deposit: "Balance" + }, + SignedSubmission: { + _fallback: "SignedSubmissionTo276", + who: "AccountId", + deposit: "Balance", + solution: "RawSolution", + reward: "Balance" + }, + SignedSubmissionTo276: { + who: "AccountId", + deposit: "Balance", + solution: "RawSolution" + }, + SignedSubmissionOf: "SignedSubmission", + SolutionOrSnapshotSize: { + voters: "Compact", + targets: "Compact" + }, + SolutionSupport: { + total: "ExtendedBalance", + voters: "Vec<(AccountId, ExtendedBalance)>" + }, + SolutionSupports: "Vec<(AccountId, SolutionSupport)>", + Supports: "SolutionSupports", + SubmissionIndicesOf: "BTreeMap", + Voter: { + votes: "Vec", + stake: "Balance", + deposit: "Balance" + }, + VoteWeight: "u64" + }; + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + ...deprecated2, + ...phragmen2, + ActiveEraInfo: { + index: "EraIndex", + start: "Option" + }, + EraIndex: "u32", + EraRewardPoints: { + total: "RewardPoint", + individual: "BTreeMap" + }, + EraRewards: { + total: "u32", + rewards: "Vec" + }, + Exposure: { + total: "Compact", + own: "Compact", + others: "Vec" + }, + Forcing: { + _enum: [ + "NotForcing", + "ForceNew", + "ForceNone", + "ForceAlways" + ] + }, + IndividualExposure: { + who: "AccountId", + value: "Compact" + }, + KeyType: "AccountId", + MomentOf: "Moment", + Nominations: { + targets: "Vec", + submittedIn: "EraIndex", + suppressed: "bool" + }, + NominatorIndex: "u32", + NominatorIndexCompact: "Compact", + OffchainAccuracy: "PerU16", + OffchainAccuracyCompact: "Compact", + PhragmenScore: "[u128; 3]", + Points: "u32", + RewardDestination: { + _enum: { + Staked: "Null", + Stash: "Null", + Controller: "Null", + Account: "AccountId", + None: "Null" + } + }, + RewardPoint: "u32", + SlashJournalEntry: { + who: "AccountId", + amount: "Balance", + ownSlash: "Balance" + }, + SlashingSpansTo204: { + spanIndex: "SpanIndex", + lastStart: "EraIndex", + prior: "Vec" + }, + SlashingSpans: { + spanIndex: "SpanIndex", + lastStart: "EraIndex", + lastNonzeroSlash: "EraIndex", + prior: "Vec" + }, + SpanIndex: "u32", + SpanRecord: { + slashed: "Balance", + paidOut: "Balance" + }, + StakingLedgerTo223: { + stash: "AccountId", + total: "Compact", + active: "Compact", + unlocking: "Vec" + }, + StakingLedgerTo240: { + _fallback: "StakingLedgerTo223", + stash: "AccountId", + total: "Compact", + active: "Compact", + unlocking: "Vec", + lastReward: "Option" + }, + StakingLedger: { + stash: "AccountId", + total: "Compact", + active: "Compact", + unlocking: "Vec", + claimedRewards: "Vec" + }, + UnappliedSlashOther: "(AccountId, Balance)", + UnappliedSlash: { + validator: "AccountId", + own: "Balance", + others: "Vec", + reporters: "Vec", + payout: "Balance" + }, + UnlockChunk: { + value: "Compact", + era: "Compact" + }, + ValidatorIndex: "u16", + ValidatorIndexCompact: "Compact", + ValidatorPrefs: "ValidatorPrefsWithBlocked", + ValidatorPrefsWithCommission: { + commission: "Compact" + }, + ValidatorPrefsWithBlocked: { + commission: "Compact", + blocked: "bool" + }, + ValidatorPrefsTo196: { + validatorPayment: "Compact" + }, + ValidatorPrefsTo145: { + unstakeThreshold: "Compact", + validatorPayment: "Compact" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/statement/runtime.js + var require_runtime22 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/statement/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + ValidateStatement: [ + { + methods: { + valdate_statement: { + description: "Validate the statement.", + params: [ + { + name: "source", + type: "StatementStoreStatementSource" + }, + { + name: "statement", + type: "SpStatementStoreStatement" + } + ], + type: "Result" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/statement/definitions.js + var require_definitions43 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/statement/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime22(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + StatementStoreStatementSource: { + _enum: ["Chain", "Network", "Local"] + }, + StatementStoreValidStatement: { + maxCount: "u32", + maxSize: "u32" + }, + StatementStoreInvalidStatement: { + _enum: ["BadProof", "NoProof", "InternalError"] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/support/definitions.js + var require_definitions44 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/support/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + WeightToFeeCoefficient: { + coeffInteger: "Balance", + coeffFrac: "Perbill", + negative: "bool", + degree: "u8" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/syncstate/rpc.js + var require_rpc8 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/syncstate/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + genSyncSpec: { + description: "Returns the json-serialized chainspec running the node, with a sync state.", + endpoint: "sync_state_genSyncSpec", + params: [ + { + name: "raw", + type: "bool" + } + ], + type: "Json" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/syncstate/definitions.js + var require_definitions45 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/syncstate/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc8(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/system/rpc.js + var require_rpc9 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/system/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + accountNextIndex: { + alias: ["account_nextIndex"], + description: "Retrieves the next accountIndex as available on the node", + params: [ + { + name: "accountId", + type: "AccountId" + } + ], + type: "Index" + }, + addLogFilter: { + description: "Adds the supplied directives to the current log filter", + isUnsafe: true, + params: [ + { + name: "directives", + type: "Text" + } + ], + type: "Null" + }, + addReservedPeer: { + description: "Adds a reserved peer", + isUnsafe: true, + params: [ + { + name: "peer", + type: "Text" + } + ], + type: "Text" + }, + chain: { + description: "Retrieves the chain", + params: [], + type: "Text" + }, + chainType: { + description: "Retrieves the chain type", + params: [], + type: "ChainType" + }, + dryRun: { + alias: ["system_dryRunAt"], + description: "Dry run an extrinsic at a given block", + isUnsafe: true, + params: [ + { + name: "extrinsic", + type: "Bytes" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "ApplyExtrinsicResult" + }, + health: { + description: "Return health status of the node", + noErrorLog: true, + params: [], + type: "Health" + }, + localListenAddresses: { + description: "The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example", + params: [], + type: "Vec" + }, + localPeerId: { + description: "Returns the base58-encoded PeerId of the node", + params: [], + type: "Text" + }, + name: { + description: "Retrieves the node name", + params: [], + type: "Text" + }, + networkState: { + alias: ["system_unstable_networkState"], + description: "Returns current state of the network", + isUnsafe: true, + params: [], + type: "NetworkState" + }, + nodeRoles: { + description: "Returns the roles the node is running as", + params: [], + type: "Vec" + }, + peers: { + description: "Returns the currently connected peers", + isUnsafe: true, + params: [], + type: "Vec" + }, + properties: { + description: "Get a custom set of properties as a JSON object, defined in the chain spec", + params: [], + type: "ChainProperties" + }, + removeReservedPeer: { + description: "Remove a reserved peer", + isUnsafe: true, + params: [ + { + name: "peerId", + type: "Text" + } + ], + type: "Text" + }, + reservedPeers: { + description: "Returns the list of reserved peers", + params: [], + type: "Vec" + }, + resetLogFilter: { + description: "Resets the log filter to Substrate defaults", + isUnsafe: true, + params: [], + type: "Null" + }, + syncState: { + description: "Returns the state of the syncing of the node", + params: [], + type: "SyncState" + }, + version: { + description: "Retrieves the version of the node", + params: [], + type: "Text" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/system/runtime.js + var require_runtime23 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/system/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + AccountNonceApi: [ + { + methods: { + account_nonce: { + description: "The API to query account nonce (aka transaction index)", + params: [ + { + name: "accountId", + type: "AccountId" + } + ], + type: "Index" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/system/definitions.js + var require_definitions46 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/system/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc9(); + var runtime_js_1 = require_runtime23(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + AccountInfo: "AccountInfoWithTripleRefCount", + AccountInfoWithRefCountU8: { + nonce: "Index", + refcount: "u8", + data: "AccountData" + }, + AccountInfoWithRefCount: { + _fallback: "AccountInfoWithRefCountU8", + nonce: "Index", + refcount: "RefCount", + data: "AccountData" + }, + AccountInfoWithDualRefCount: { + _fallback: "AccountInfoWithRefCount", + nonce: "Index", + consumers: "RefCount", + providers: "RefCount", + data: "AccountData" + }, + AccountInfoWithProviders: "AccountInfoWithDualRefCount", + AccountInfoWithTripleRefCount: { + _fallback: "AccountInfoWithDualRefCount", + nonce: "Index", + consumers: "RefCount", + providers: "RefCount", + sufficients: "RefCount", + data: "AccountData" + }, + ApplyExtrinsicResult: "Result", + ApplyExtrinsicResultPre6: "Result", + ArithmeticError: { + _enum: [ + "Underflow", + "Overflow", + "DivisionByZero" + ] + }, + BlockLength: { + max: "PerDispatchClassU32" + }, + BlockWeights: { + baseBlock: "Weight", + maxBlock: "Weight", + perClass: "PerDispatchClassWeightsPerClass" + }, + ChainProperties: "GenericChainProperties", + ChainType: { + _enum: { + Development: "Null", + Local: "Null", + Live: "Null", + Custom: "Text" + } + }, + ConsumedWeight: "PerDispatchClassWeight", + DigestOf: "Digest", + DispatchClass: { + _enum: ["Normal", "Operational", "Mandatory"] + }, + DispatchError: { + _enum: { + Other: "Null", + CannotLookup: "Null", + BadOrigin: "Null", + Module: "DispatchErrorModule", + ConsumerRemaining: "Null", + NoProviders: "Null", + TooManyConsumers: "Null", + Token: "TokenError", + Arithmetic: "ArithmeticError", + Transactional: "TransactionalError", + Exhausted: "Null", + Corruption: "Null", + Unavailable: "Null" + } + }, + DispatchErrorPre6: { + _enum: { + Other: "Null", + CannotLookup: "Null", + BadOrigin: "Null", + Module: "DispatchErrorModulePre6", + ConsumerRemaining: "Null", + NoProviders: "Null", + TooManyConsumers: "Null", + Token: "TokenError", + Arithmetic: "ArithmeticError", + Transactional: "TransactionalError" + } + }, + DispatchErrorPre6First: { + _enum: { + Other: "Null", + CannotLookup: "Null", + BadOrigin: "Null", + Module: "DispatchErrorModulePre6", + ConsumerRemaining: "Null", + NoProviders: "Null", + Token: "TokenError", + Arithmetic: "ArithmeticError", + Transactional: "TransactionalError" + } + }, + DispatchErrorModuleU8: { + index: "u8", + error: "u8" + }, + DispatchErrorModuleU8a: { + index: "u8", + error: "[u8; 4]" + }, + DispatchErrorModule: "DispatchErrorModuleU8a", + DispatchErrorModulePre6: "DispatchErrorModuleU8", + DispatchErrorTo198: { + module: "Option", + error: "u8" + }, + DispatchInfo: { + weight: "Weight", + class: "DispatchClass", + paysFee: "Pays" + }, + DispatchInfoTo190: { + weight: "Weight", + class: "DispatchClass" + }, + DispatchInfoTo244: { + weight: "Weight", + class: "DispatchClass", + paysFee: "bool" + }, + DispatchOutcome: "Result<(), DispatchError>", + DispatchOutcomePre6: "Result<(), DispatchErrorPre6>", + DispatchResult: "Result<(), DispatchError>", + DispatchResultOf: "DispatchResult", + DispatchResultTo198: "Result<(), Text>", + Event: "GenericEvent", + EventId: "[u8; 2]", + EventIndex: "u32", + EventRecord: { + phase: "Phase", + event: "Event", + topics: "Vec" + }, + Health: { + peers: "u64", + isSyncing: "bool", + shouldHavePeers: "bool" + }, + InvalidTransaction: { + _enum: { + Call: "Null", + Payment: "Null", + Future: "Null", + Stale: "Null", + BadProof: "Null", + AncientBirthBlock: "Null", + ExhaustsResources: "Null", + Custom: "u8", + BadMandatory: "Null", + MandatoryDispatch: "Null", + BadSigner: "Null" + } + }, + Key: "Bytes", + LastRuntimeUpgradeInfo: { + specVersion: "Compact", + specName: "Text" + }, + NetworkState: { + peerId: "Text", + listenedAddresses: "Vec", + externalAddresses: "Vec", + connectedPeers: "HashMap", + notConnectedPeers: "HashMap", + averageDownloadPerSec: "u64", + averageUploadPerSec: "u64", + peerset: "NetworkStatePeerset" + }, + NetworkStatePeerset: { + messageQueue: "u64", + nodes: "HashMap" + }, + NetworkStatePeersetInfo: { + connected: "bool", + reputation: "i32" + }, + NodeRole: { + _enum: { + Full: "Null", + LightClient: "Null", + Authority: "Null", + UnknownRole: "u8" + } + }, + NotConnectedPeer: { + knownAddresses: "Vec", + latestPingTime: "Option", + versionString: "Option" + }, + Peer: { + enabled: "bool", + endpoint: "PeerEndpoint", + knownAddresses: "Vec", + latestPingTime: "PeerPing", + open: "bool", + versionString: "Text" + }, + PeerEndpoint: { + listening: "PeerEndpointAddr" + }, + PeerEndpointAddr: { + _alias: { + localAddr: "local_addr", + sendBackAddr: "send_back_addr" + }, + localAddr: "Text", + sendBackAddr: "Text" + }, + PeerPing: { + nanos: "u64", + secs: "u64" + }, + PeerInfo: { + peerId: "Text", + roles: "Text", + protocolVersion: "u32", + bestHash: "Hash", + bestNumber: "BlockNumber" + }, + PerDispatchClassU32: { + normal: "u32", + operational: "u32", + mandatory: "u32" + }, + PerDispatchClassWeight: { + normal: "Weight", + operational: "Weight", + mandatory: "Weight" + }, + PerDispatchClassWeightsPerClass: { + normal: "WeightPerClass", + operational: "WeightPerClass", + mandatory: "WeightPerClass" + }, + Phase: { + _enum: { + ApplyExtrinsic: "u32", + Finalization: "Null", + Initialization: "Null" + } + }, + RawOrigin: { + _enum: { + Root: "Null", + Signed: "AccountId", + None: "Null" + } + }, + RefCount: "u32", + RefCountTo259: "u8", + SyncState: { + startingBlock: "BlockNumber", + currentBlock: "BlockNumber", + highestBlock: "Option" + }, + SystemOrigin: "RawOrigin", + TokenError: { + _enum: [ + "NoFunds", + "WouldDie", + "BelowMinimum", + "CannotCreate", + "UnknownAsset", + "Frozen", + "Unsupported", + "Underflow", + "Overflow" + ] + }, + TransactionValidityError: { + _enum: { + Invalid: "InvalidTransaction", + Unknown: "UnknownTransaction" + } + }, + TransactionalError: { + _enum: [ + "LimitReached", + "NoLayer" + ] + }, + UnknownTransaction: { + _enum: { + CannotLookup: "Null", + NoUnsignedValidator: "Null", + Custom: "u8" + } + }, + WeightPerClass: { + baseExtrinsic: "Weight", + maxExtrinsic: "Option", + maxTotal: "Option", + reserved: "Option" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/treasury/definitions.js + var require_definitions47 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/treasury/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + Bounty: { + proposer: "AccountId", + value: "Balance", + fee: "Balance", + curatorDeposit: "Balance", + bond: "Balance", + status: "BountyStatus" + }, + BountyIndex: "u32", + BountyStatus: { + _enum: { + Proposed: "Null", + Approved: "Null", + Funded: "Null", + CuratorProposed: "BountyStatusCuratorProposed", + Active: "BountyStatusActive", + PendingPayout: "BountyStatusPendingPayout" + } + }, + BountyStatusActive: { + curator: "AccountId", + updateDue: "BlockNumber" + }, + BountyStatusCuratorProposed: { + curator: "AccountId" + }, + BountyStatusPendingPayout: { + curator: "AccountId", + beneficiary: "AccountId", + unlockAt: "BlockNumber" + }, + OpenTip: { + reason: "Hash", + who: "AccountId", + finder: "AccountId", + deposit: "Balance", + closes: "Option", + tips: "Vec", + findersFee: "bool" + }, + OpenTipTo225: { + reason: "Hash", + who: "AccountId", + finder: "Option", + closes: "Option", + tips: "Vec" + }, + OpenTipFinderTo225: "(AccountId, Balance)", + OpenTipTip: "(AccountId, Balance)", + TreasuryProposal: { + proposer: "AccountId", + value: "Balance", + beneficiary: "AccountId", + bond: "Balance" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/txpayment/definitions.js + var require_definitions48 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/txpayment/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + Multiplier: "Fixed128" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/txqueue/runtime.js + var require_runtime24 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/txqueue/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + TaggedTransactionQueue: [ + { + methods: { + validate_transaction: { + description: "Validate the transaction.", + params: [ + { + name: "source", + type: "TransactionSource" + }, + { + name: "tx", + type: "Extrinsic" + }, + { + name: "blockHash", + type: "BlockHash" + } + ], + type: "TransactionValidity" + } + }, + version: 3 + }, + { + methods: { + validate_transaction: { + description: "Validate the transaction.", + params: [ + { + name: "source", + type: "TransactionSource" + }, + { + name: "tx", + type: "Extrinsic" + } + ], + type: "TransactionValidity" + } + }, + version: 2 + }, + { + methods: { + validate_transaction: { + description: "Validate the transaction.", + params: [ + { + name: "tx", + type: "Extrinsic" + } + ], + type: "TransactionValidity" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/txqueue/definitions.js + var require_definitions49 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/txqueue/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime24(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + TransactionSource: { + _enum: ["InBlock", "Local", "External"] + }, + TransactionValidity: "Result", + ValidTransaction: { + priority: "TransactionPriority", + requires: "Vec", + provides: "Vec", + longevity: "TransactionLongevity", + propagate: "bool" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/uniques/definitions.js + var require_definitions50 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/uniques/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + ClassId: "u32", + InstanceId: "u32", + DepositBalance: "Balance", + DepositBalanceOf: "Balance", + ClassDetails: { + owner: "AccountId", + issuer: "AccountId", + admin: "AccountId", + freezer: "AccountId", + totalDeposit: "DepositBalance", + freeHolding: "bool", + instances: "u32", + instanceMetadatas: "u32", + attributes: "u32", + isFrozen: "bool" + }, + DestroyWitness: { + instances: "Compact", + instanceMetadatas: "Compact", + attributes: "Compact" + }, + InstanceDetails: { + owner: "AccountId", + approved: "Option", + isFrozen: "bool", + deposit: "DepositBalance" + }, + ClassMetadata: { + deposit: "DepositBalance", + data: "Vec", + isFrozen: "bool" + }, + InstanceMetadata: { + deposit: "DepositBalance", + data: "Vec", + isFrozen: "bool" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/utility/definitions.js + var require_definitions51 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/utility/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + Multisig: { + when: "Timepoint", + deposit: "Balance", + depositor: "AccountId", + approvals: "Vec" + }, + Timepoint: { + height: "BlockNumber", + index: "u32" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/vesting/definitions.js + var require_definitions52 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/vesting/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + VestingInfo: { + locked: "Balance", + perBlock: "Balance", + startingBlock: "BlockNumber" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/attestations/definitions.js + var require_definitions53 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/attestations/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + BlockAttestations: { + receipt: "CandidateReceipt", + valid: "Vec", + invalid: "Vec" + }, + IncludedBlocks: { + actualNumber: "BlockNumber", + session: "SessionIndex", + randomSeed: "H256", + activeParachains: "Vec", + paraBlocks: "Vec" + }, + MoreAttestations: {} + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/bridges/definitions.js + var require_definitions54 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/bridges/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + BridgedBlockHash: "H256", + BridgedBlockNumber: "BlockNumber", + BridgedHeader: "Header", + BridgeMessageId: "(LaneId, MessageNonce)", + CallOrigin: { + _enum: { + SourceRoot: "Null", + TargetAccount: "(AccountId, MultiSigner, MultiSignature)", + SourceAccount: "AccountId" + } + }, + ChainId: "[u8; 4]", + DeliveredMessages: { + begin: "MessageNonce", + end: "MessageNonce", + dispatchResults: "BitVec" + }, + DispatchFeePayment: { + _enum: ["AtSourceChain", "AtTargetChain"] + }, + InboundLaneData: { + relayers: "Vec", + lastConfirmedNonce: "MessageNonce" + }, + InboundRelayer: "AccountId", + InitializationData: { + header: "Header", + authorityList: "AuthorityList", + setId: "SetId", + isHalted: "bool" + }, + LaneId: "[u8; 4]", + MessageData: { + payload: "Bytes", + fee: "Balance" + }, + MessagesDeliveryProofOf: { + bridgedHeaderHash: "BlockHash", + storageProof: "Vec", + lane: "LaneId" + }, + MessageKey: { + laneId: "LaneId", + nonce: "MessageNonce" + }, + MessageNonce: "u64", + MessagesProofOf: { + bridgedHeaderHash: "BridgedBlockHash", + storageProof: "Vec", + lane: "LaneId", + noncesStart: "MessageNonce", + noncesEnd: "MessageNonce" + }, + OperatingMode: { + _enum: ["Normal", "RejectingOutboundMessages", "Halted"] + }, + OutboundLaneData: { + oldestUnprunedNonce: "MessageNonce", + latestReceivedNonce: "MessageNonce", + latestGeneratedNonce: "MessageNonce" + }, + OutboundMessageFee: "Balance", + OutboundPayload: { + specVersion: "u32", + weight: "Weight", + origin: "CallOrigin", + dispatchFeePayment: "DispatchFeePayment", + call: "Bytes" + }, + Parameter: "Null", + RelayerId: "AccountId", + UnrewardedRelayer: { + relayer: "RelayerId", + messages: "DeliveredMessages" + }, + UnrewardedRelayersState: { + unrewardedRelayer_Entries: "MessageNonce", + messagesInOldestEntry: "MessageNonce", + totalMessages: "MessageNonce" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/claims/definitions.js + var require_definitions55 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/claims/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + StatementKind: { + _enum: ["Regular", "Saft"] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/crowdloan/definitions.js + var require_definitions56 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/crowdloan/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + FundIndex: "u32", + LastContribution: { + _enum: { + Never: "Null", + PreEnding: "u32", + Ending: "BlockNumber" + } + }, + FundInfo: { + depositor: "AccountId", + verifier: "Option", + deposit: "Balance", + raised: "Balance", + end: "BlockNumber", + cap: "Balance", + lastContribution: "LastContribution", + firstPeriod: "LeasePeriod", + lastPeriod: "LeasePeriod", + trieIndex: "TrieIndex" + }, + TrieIndex: "u32" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/cumulus/runtime.js + var require_runtime25 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/cumulus/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + CollectCollationInfo: [ + { + methods: { + collect_collation_info: { + description: "Collect information about a collation.", + params: [ + { + name: "header", + type: "Header" + } + ], + type: "CollationInfo" + } + }, + version: 2 + }, + { + methods: { + collect_collation_info: { + description: "Collect information about a collation.", + params: [], + type: "CollationInfoV1" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/cumulus/definitions.js + var require_definitions57 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/cumulus/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime25(); + var dmpQueue2 = { + CollationInfo: { + upwardMessages: "Vec", + horizontalMessages: "Vec", + newValidationCode: "Option", + processedDownwardMessages: "u32", + hrmpWatermark: "RelayBlockNumber", + headData: "HeadData" + }, + CollationInfoV1: { + upwardMessages: "Vec", + horizontalMessages: "Vec", + newValidationCode: "Option", + processedDownwardMessages: "u32", + hrmpWatermark: "RelayBlockNumber" + }, + ConfigData: { + maxIndividual: "Weight" + }, + MessageId: "[u8; 32]", + OverweightIndex: "u64", + PageCounter: "u32", + PageIndexData: { + beginUsed: "PageCounter", + endUsed: "PageCounter", + overweightCount: "OverweightIndex" + } + }; + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: dmpQueue2 + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/finality/runtime.js + var require_runtime26 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/finality/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var finalityV12 = { + methods: { + best_finalized: { + description: "Returns number and hash of the best finalized header known to the bridge module.", + params: [], + type: "(BlockNumber, Hash)" + } + }, + version: 1 + }; + exports2.runtime = { + KusamaFinalityApi: [finalityV12], + PolkadotFinalityApi: [finalityV12], + RococoFinalityApi: [finalityV12], + WestendFinalityApi: [finalityV12] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/finality/definitions.js + var require_definitions58 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/finality/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime26(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/parachains/hrmp.js + var require_hrmp = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/parachains/hrmp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + HrmpChannel: { + maxCapacity: "u32", + maxTotalSize: "u32", + maxMessageSize: "u32", + msgCount: "u32", + totalSize: "u32", + mqcHead: "Option", + senderDeposit: "Balance", + recipientDeposit: "Balance" + }, + HrmpChannelId: { + sender: "u32", + receiver: "u32" + }, + HrmpOpenChannelRequest: { + confirmed: "bool", + age: "SessionIndex", + senderDeposit: "Balance", + maxMessageSize: "u32", + maxCapacity: "u32", + maxTotalSize: "u32" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/parachains/runtime.js + var require_runtime27 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/parachains/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var PH_V1_TO_V22 = { + assumed_validation_data: { + description: "Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.", + params: [ + { + name: "paraId", + type: "ParaId" + }, + { + name: "hash", + type: "Hash" + } + ], + type: "Option<(PersistedValidationData, ValidationCodeHash)>" + }, + availability_cores: { + description: "Yields information on all availability cores as relevant to the child block.", + params: [], + type: "Vec" + }, + candidate_events: { + description: "Get a vector of events concerning candidates that occurred within a block.", + params: [], + type: "Vec" + }, + candidate_pending_availability: { + description: "Get the receipt of a candidate pending availability.", + params: [ + { + name: "paraId", + type: "ParaId" + } + ], + type: "Option" + }, + check_validation_outputs: { + description: "Checks if the given validation outputs pass the acceptance criteria.", + params: [ + { + name: "paraId", + type: "ParaId" + }, + { + name: "outputs", + type: "CandidateCommitments" + } + ], + type: "bool" + }, + dmq_contents: { + description: "Get all the pending inbound messages in the downward message queue for a para.", + params: [ + { + name: "paraId", + type: "ParaId" + } + ], + type: "Vec" + }, + inbound_hrmp_channels_contents: { + description: "Get the contents of all channels addressed to the given recipient.", + params: [ + { + name: "paraId", + type: "ParaId" + } + ], + type: "Vec" + }, + on_chain_votes: { + description: "Scrape dispute relevant from on-chain, backing votes and resolved disputes.", + params: [], + type: "Option" + }, + persisted_validation_data: { + description: "Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.", + params: [ + { + name: "paraId", + type: "ParaId" + }, + { + name: "assumption", + type: "OccupiedCoreAssumption" + } + ], + type: "Option" + }, + session_index_for_child: { + description: "Returns the session index expected at a child of the block.", + params: [], + type: "SessionIndex" + }, + validation_code: { + description: "Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.", + params: [ + { + name: "paraId", + type: "ParaId" + }, + { + name: "assumption", + type: "OccupiedCoreAssumption" + } + ], + type: "Option" + }, + validation_code_by_hash: { + description: "Get the validation code from its hash.", + params: [ + { + name: "hash", + type: "ValidationCodeHash" + } + ], + type: "Option" + }, + validator_groups: { + description: "Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on", + params: [], + type: "(Vec>, GroupRotationInfo)" + }, + validators: { + description: "Get the current validators.", + params: [], + type: "Vec" + } + }; + var PH_V2_TO_V32 = { + pvfs_require_precheck: { + description: "Returns code hashes of PVFs that require pre-checking by validators in the active set.", + params: [], + type: "Vec" + }, + session_info: { + description: "Get the session info for the given session, if stored.", + params: [ + { + name: "index", + type: "SessionIndex" + } + ], + type: "Option" + }, + submit_pvf_check_statement: { + description: "Submits a PVF pre-checking statement into the transaction pool.", + params: [ + { + name: "stmt", + type: "PvfCheckStatement" + }, + { + name: "signature", + type: "ValidatorSignature" + } + ], + type: "Null" + }, + validation_code_hash: { + description: "Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.", + params: [ + { + name: "paraId", + type: "ParaId" + }, + { + name: "assumption", + type: "OccupiedCoreAssumption" + } + ], + type: "Option" + } + }; + var PH_V32 = { + disputes: { + description: "Returns all onchain disputes.", + params: [], + type: "Vec<(SessionIndex, CandidateHash, DisputeState)>" + } + }; + var PH_V42 = { + session_executor_params: { + description: "Returns execution parameters for the session.", + params: [ + { + name: "sessionIndex", + type: "SessionIndex" + } + ], + type: "Option" + } + }; + var PH_V52 = { + key_ownership_proof: { + description: "Returns a merkle proof of a validator session key", + params: [ + { + name: "validatorId", + type: "ValidatorId" + } + ], + type: "Option" + }, + submit_report_dispute_lost: { + description: "Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session", + params: [ + { + name: "disputeProof", + type: "DisputeProof" + }, + { + name: "keyOwnershipProof", + type: "OpaqueKeyOwnershipProof" + } + ], + type: "Option" + }, + unapplied_slashes: { + description: "Returns a list of validators that lost a past session dispute and need to be slashed", + params: [], + type: "Vec<(SessionIndex, CandidateHash, PendingSlashes)>" + } + }; + var PH_V62 = { + minimum_backing_votes: { + description: "Get the minimum number of backing votes for a parachain candidate. This is a staging method! Do not use on production runtimes!", + params: [], + type: "u32" + } + }; + var PH_V72 = { + async_backing_params: { + description: "Returns candidate's acceptance limitations for asynchronous backing for a relay parent", + params: [], + type: "AsyncBackingParams" + }, + para_backing_state: { + description: "Returns the state of parachain backing for a given para", + params: [ + { + name: "paraId", + type: "ParaId" + } + ], + type: "Option" + } + }; + var PH_V82 = { + disabled_validators: { + description: "Returns a list of all disabled validators at the given block", + params: [], + type: "ValidatorIndex" + } + }; + var PH_V92 = { + node_features: { + description: "Get node features. This is a staging method! Do not use on production runtimes!", + params: [], + type: "NodeFeatures" + } + }; + var PH_V102 = { + approval_voting_params: { + description: "Approval voting configuration parameters", + params: [], + type: "ApprovalVotingParams" + } + }; + exports2.runtime = { + ParachainHost: [ + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32, + ...PH_V42, + ...PH_V52, + ...PH_V62, + ...PH_V72, + ...PH_V82, + ...PH_V92, + ...PH_V102 + }, + version: 10 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32, + ...PH_V42, + ...PH_V52, + ...PH_V62, + ...PH_V72, + ...PH_V82, + ...PH_V92 + }, + version: 9 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32, + ...PH_V42, + ...PH_V52, + ...PH_V62, + ...PH_V72, + ...PH_V82 + }, + version: 8 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32, + ...PH_V42, + ...PH_V52, + ...PH_V62, + ...PH_V72 + }, + version: 7 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32, + ...PH_V42, + ...PH_V52, + ...PH_V62 + }, + version: 6 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32, + ...PH_V42, + ...PH_V52 + }, + version: 5 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32, + ...PH_V42 + }, + version: 4 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32, + ...PH_V32 + }, + version: 3 + }, + { + methods: { + ...PH_V1_TO_V22, + ...PH_V2_TO_V32 + }, + version: 2 + }, + { + methods: { + session_info: { + description: "Get the session info for the given session, if stored.", + params: [ + { + name: "index", + type: "SessionIndex" + } + ], + type: "Option" + }, + ...PH_V1_TO_V22 + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/parachains/slots.js + var require_slots = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/parachains/slots.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var SlotRange102 = { + _enum: ["ZeroZero", "ZeroOne", "ZeroTwo", "ZeroThree", "OneOne", "OneTwo", "OneThree", "TwoTwo", "TwoThree", "ThreeThree"] + }; + var SlotRange2 = { + _enum: ["ZeroZero", "ZeroOne", "ZeroTwo", "ZeroThree", "ZeroFour", "ZeroFive", "ZeroSix", "ZeroSeven", "OneOne", "OneTwo", "OneThree", "OneFour", "OneFive", "OneSix", "OneSeven", "TwoTwo", "TwoThree", "TwoFour", "TwoFive", "TwoSix", "TwoSeven", "ThreeThree", "ThreeFour", "ThreeFive", "ThreeSix", "ThreeSeven", "FourFour", "FourFive", "FourSix", "FourSeven", "FiveFive", "FiveSix", "FiveSeven", "SixSix", "SixSeven", "SevenSeven"] + }; + var oldTypes2 = { + Bidder: { + _enum: { + New: "NewBidder", + Existing: "ParaId" + } + }, + IncomingParachain: { + _enum: { + Unset: "NewBidder", + Fixed: "IncomingParachainFixed", + Deploy: "IncomingParachainDeploy" + } + }, + IncomingParachainDeploy: { + code: "ValidationCode", + initialHeadData: "HeadData" + }, + IncomingParachainFixed: { + codeHash: "Hash", + codeSize: "u32", + initialHeadData: "HeadData" + }, + NewBidder: { + who: "AccountId", + sub: "SubId" + }, + SubId: "u32" + }; + exports2.default = { + ...oldTypes2, + AuctionIndex: "u32", + LeasePeriod: "BlockNumber", + LeasePeriodOf: "BlockNumber", + SlotRange10: SlotRange102, + SlotRange: SlotRange2, + WinningData10: `[WinningDataEntry; ${SlotRange102._enum.length}]`, + WinningData: `[WinningDataEntry; ${SlotRange2._enum.length}]`, + WinningDataEntry: "Option<(AccountId, ParaId, BalanceOf)>", + WinnersData10: "Vec", + WinnersData: "Vec", + WinnersDataTuple10: "(AccountId, ParaId, BalanceOf, SlotRange10)", + WinnersDataTuple: "(AccountId, ParaId, BalanceOf, SlotRange)" + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/parachains/definitions.js + var require_definitions59 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/parachains/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + var hrmp_js_1 = tslib_1.__importDefault(require_hrmp()); + var runtime_js_1 = require_runtime27(); + var slots_js_1 = tslib_1.__importDefault(require_slots()); + var proposeTypes2 = { + ParachainProposal: { + proposer: "AccountId", + genesisHead: "HeadData", + validators: "Vec", + name: "Bytes", + balance: "Balance" + }, + RegisteredParachainInfo: { + validators: "Vec", + proposer: "AccountId" + } + }; + var cumulusTypes2 = { + ServiceQuality: { + _enum: ["Ordered", "Fast"] + } + }; + var disputeTypes2 = { + DisputeLocation: { + _enum: ["Local", "Remote"] + }, + DisputeResult: { + _enum: ["Valid", "Invalid"] + }, + DisputeState: { + validatorsFor: "BitVec", + validatorsAgainst: "BitVec", + start: "BlockNumber", + concludedAt: "Option" + }, + DisputeStatement: { + _enum: { + Valid: "ValidDisputeStatementKind", + Invalid: "InvalidDisputeStatementKind" + } + }, + DisputeStatementSet: { + candidateHash: "CandidateHash", + session: "SessionIndex", + statements: "Vec<(DisputeStatement, ParaValidatorIndex, ValidatorSignature)>" + }, + ExecutorParam: { + _enum: { + Phantom: "Null", + MaxMemoryPages: "u32", + StackLogicalMax: "u32", + StackNativeMax: "u32", + PrecheckingMaxMemory: "u64", + PvfPrepTimeout: "(PvfPrepTimeoutKind, u64)", + PvfExecTimeout: "(PvfExecTimeoutKind, u64)" + } + }, + ExecutorParamsHash: "Hash", + ExecutorParams: "Vec", + ExplicitDisputeStatement: { + valid: "bool", + candidateHash: "CandidateHash", + session: "SessionIndex" + }, + InvalidDisputeStatementKind: { + _enum: ["Explicit"] + }, + MultiDisputeStatementSet: "Vec", + PvfExecTimeoutKind: { + _enum: ["Backing", "Approval"] + }, + PvfPrepTimeoutKind: { + _enum: ["Precheck", "Lenient"] + }, + ValidDisputeStatementKind: { + _enum: { + Explicit: "Null", + BackingSeconded: "Hash", + BackingValid: "Hash", + ApprovalChecking: "Null" + } + } + }; + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: { + ...cumulusTypes2, + ...disputeTypes2, + ...hrmp_js_1.default, + ...proposeTypes2, + ...slots_js_1.default, + AbridgedCandidateReceipt: { + parachainIndex: "ParaId", + relayParent: "Hash", + headData: "HeadData", + collator: "CollatorId", + signature: "CollatorSignature", + povBlockHash: "Hash", + commitments: "CandidateCommitments" + }, + AbridgedHostConfiguration: { + maxCodeSize: "u32", + maxHeadDataSize: "u32", + maxUpwardQueueCount: "u32", + maxUpwardQueueSize: "u32", + maxUpwardMessageSize: "u32", + maxUpwardMessageNumPerCandidate: "u32", + hrmpMaxMessageNumPerCandidate: "u32", + validationUpgradeFrequency: "BlockNumber", + validationUpgradeDelay: "BlockNumber" + }, + AbridgedHrmpChannel: { + maxCapacity: "u32", + maxTotalSize: "u32", + maxMessageSize: "u32", + msgCount: "u32", + totalSize: "u32", + mqcHead: "Option" + }, + ApprovalVotingParams: { + maxApprovalCoalesceCount: "u32" + }, + AssignmentId: "AccountId", + AssignmentKind: { + _enum: { + Parachain: "Null", + Parathread: "(CollatorId, u32)" + } + }, + AsyncBackingParams: { + maxCandidateDepth: "u32", + allowedAncestryLen: "u32" + }, + AttestedCandidate: { + candidate: "AbridgedCandidateReceipt", + validityVotes: "Vec", + validatorIndices: "BitVec" + }, + AuthorityDiscoveryId: "AccountId", + AvailabilityBitfield: "BitVec", + AvailabilityBitfieldRecord: { + bitfield: "AvailabilityBitfield", + submittedTt: "BlockNumber" + }, + BackedCandidate: { + candidate: "CommittedCandidateReceipt", + validityVotes: "Vec", + validatorIndices: "BitVec" + }, + BackingState: { + constraints: "Constraints", + pendingAvailability: "Vec" + }, + BufferedSessionChange: { + applyAt: "BlockNumber", + validators: "Vec", + queued: "Vec", + sessionIndex: "SessionIndex" + }, + CandidateCommitments: { + upwardMessages: "Vec", + horizontalMessages: "Vec", + newValidationCode: "Option", + headData: "HeadData", + processedDownwardMessages: "u32", + hrmpWatermark: "BlockNumber" + }, + CandidateDescriptor: { + paraId: "ParaId", + relayParent: "RelayChainHash", + collatorId: "CollatorId", + persistedValidationDataHash: "Hash", + povHash: "Hash", + erasureRoot: "Hash", + signature: "CollatorSignature", + paraHead: "Hash", + validationCodeHash: "ValidationCodeHash" + }, + CandidateEvent: { + _enum: { + CandidateBacked: "(CandidateReceipt, HeadData, CoreIndex, GroupIndex)", + CandidateIncluded: "(CandidateReceipt, HeadData, CoreIndex, GroupIndex)", + CandidateTimedOut: "(CandidateReceipt, HeadData, CoreIndex)" + } + }, + CandidateHash: "Hash", + CandidateInfo: { + who: "AccountId", + deposit: "Balance" + }, + CandidatePendingAvailability: { + core: "CoreIndex", + hash: "CandidateHash", + descriptor: "CandidateDescriptor", + availabilityVotes: "BitVec", + backers: "BitVec", + relayParentNumber: "BlockNumber", + backedInNumber: "BlockNumber", + backingGroup: "GroupIndex" + }, + CandidateReceipt: { + descriptor: "CandidateDescriptor", + commitmentsHash: "Hash" + }, + GlobalValidationData: { + maxCodeSize: "u32", + maxHeadDataSize: "u32", + blockNumber: "BlockNumber" + }, + CollatorId: "H256", + CollatorSignature: "Signature", + CommittedCandidateReceipt: { + descriptor: "CandidateDescriptor", + commitments: "CandidateCommitments" + }, + Constraints: { + minRelayParentNumber: "BlockNumber", + maxPovSize: "u32", + maxCodeSize: "u32", + umpRemaining: "u32", + umpRemainingBytes: "u32", + maxUmpNumPerCandidate: "u32", + dmpRemainingMessages: "Vec", + hrmpInbound: "InboundHrmpLimitations", + hrmpChannelsOut: "HashMap", + maxHrmpNumPerCandidate: "u32", + requiredParent: "HeadData", + validationCodeHash: "ValidationCodeHash", + upgradeRestriction: "Option", + futureValidationCode: "Option<(BlockNumber, ValidationCodeHash)>" + }, + CoreAssignment: { + core: "CoreIndex", + paraId: "ParaId", + kind: "AssignmentKind", + groupIdx: "GroupIndex" + }, + CoreIndex: "u32", + CoreOccupied: { + _enum: { + Parathread: "ParathreadEntry", + Parachain: "Null" + } + }, + CoreState: { + _enum: { + Occupied: "OccupiedCore", + Scheduled: "ScheduledCore", + Free: "Null" + } + }, + DisputeProof: { + timeSlot: "DisputesTimeSlot", + kind: "SlashingOffenceKind", + validatorIndex: "ValidatorIndex", + validatorId: "ValidatorId" + }, + DisputesTimeSlot: { + sessionIndex: "SessionIndex", + candidateHash: "CandidateHash" + }, + DoubleVoteReport: { + identity: "ValidatorId", + first: "(Statement, ValidatorSignature)", + second: "(Statement, ValidatorSignature)", + proof: "MembershipProof", + signingContext: "SigningContext" + }, + DownwardMessage: "Bytes", + GroupIndex: "u32", + GroupRotationInfo: { + sessionStartBlock: "BlockNumber", + groupRotationFrequency: "BlockNumber", + now: "BlockNumber" + }, + GlobalValidationSchedule: { + maxCodeSize: "u32", + maxHeadDataSize: "u32", + blockNumber: "BlockNumber" + }, + HeadData: "Bytes", + HostConfiguration: { + maxCodeSize: "u32", + maxHeadDataSize: "u32", + maxUpwardQueueCount: "u32", + maxUpwardQueueSize: "u32", + maxUpwardMessageSize: "u32", + maxUpwardMessageNumPerCandidate: "u32", + hrmpMaxMessageNumPerCandidate: "u32", + validationUpgradeFrequency: "BlockNumber", + validationUpgradeDelay: "BlockNumber", + maxPovSize: "u32", + maxDownwardMessageSize: "u32", + preferredDispatchableUpwardMessagesStepWeight: "Weight", + hrmpMaxParachainOutboundChannels: "u32", + hrmpMaxParathreadOutboundChannels: "u32", + hrmpOpenRequestTtl: "u32", + hrmpSenderDeposit: "Balance", + hrmpRecipientDeposit: "Balance", + hrmpChannelMaxCapacity: "u32", + hrmpChannelMaxTotalSize: "u32", + hrmpMaxParachainInboundChannels: "u32", + hrmpMaxParathreadInboundChannels: "u32", + hrmpChannelMaxMessageSize: "u32", + codeRetentionPeriod: "BlockNumber", + parathreadCores: "u32", + parathreadRetries: "u32", + groupRotationFrequency: "BlockNumber", + chainAvailabilityPeriod: "BlockNumber", + threadAvailabilityPeriod: "BlockNumber", + schedulingLookahead: "u32", + maxValidatorsPerCore: "Option", + maxValidators: "Option", + disputePeriod: "SessionIndex", + disputePostConclusionAcceptancePeriod: "BlockNumber", + disputeMaxSpamSlots: "u32", + disputeConclusionByTimeOutPeriod: "BlockNumber", + noShowSlots: "u32", + nDelayTranches: "u32", + zerothDelayTrancheWidth: "u32", + neededApprovals: "u32", + relayVrfModuloSamples: "u32" + }, + InboundDownwardMessage: { + pubSentAt: "BlockNumber", + pubMsg: "DownwardMessage" + }, + InboundHrmpMessage: { + sentAt: "BlockNumber", + data: "Bytes" + }, + InboundHrmpLimitations: { + validWatermarks: "Vec" + }, + InboundHrmpMessages: "Vec", + LocalValidationData: { + parentHead: "HeadData", + balance: "Balance", + codeUpgradeAllowed: "Option" + }, + MessageIngestionType: { + downwardMessages: "Vec", + horizontalMessages: "BTreeMap" + }, + MessageQueueChain: "RelayChainHash", + NodeFeatures: "BitVec", + OccupiedCore: { + nextUpOnAvailable: "Option", + occupiedSince: "BlockNumber", + timeOutAt: "BlockNumber", + nextUpOnTimeOut: "Option", + availability: "BitVec", + groupResponsible: "GroupIndex", + candidateHash: "CandidateHash", + candidateDescriptor: "CandidateDescriptor" + }, + OccupiedCoreAssumption: { + _enum: ["Included,", "TimedOut", "Free"] + }, + OutboundHrmpChannelLimitations: { + bytesRemaining: "u32", + messagesRemaining: "u32" + }, + OutboundHrmpMessage: { + recipient: "u32", + data: "Bytes" + }, + PendingSlashes: { + _alias: { + slashKeys: "keys" + }, + slashKeys: "BTreeMap", + kind: "SlashingOffenceKind" + }, + ParachainDispatchOrigin: { + _enum: ["Signed", "Parachain", "Root"] + }, + ParachainInherentData: { + validationData: "PersistedValidationData", + relayChainState: "StorageProof", + downwardMessages: "Vec", + horizontalMessages: "BTreeMap" + }, + ParachainsInherentData: { + bitfields: "SignedAvailabilityBitfields", + backedCandidates: "Vec", + disputes: "MultiDisputeStatementSet", + parentHeader: "Header" + }, + ParaGenesisArgs: { + genesisHead: "Bytes", + validationCode: "Bytes", + parachain: "bool" + }, + ParaId: "u32", + ParaInfo: { + manager: "AccountId", + deposit: "Balance", + locked: "bool" + }, + ParaLifecycle: { + _enum: ["Onboarding", "Parathread", "Parachain", "UpgradingToParachain", "DowngradingToParathread", "OutgoingParathread", "OutgoingParachain"] + }, + ParaPastCodeMeta: { + upgradeTimes: "Vec", + lastPruned: "Option" + }, + ParaScheduling: { + _enum: ["Always", "Dynamic"] + }, + ParathreadClaim: "(ParaId, CollatorId)", + ParathreadClaimQueue: { + queue: "Vec", + nextCoreOffset: "u32" + }, + ParathreadEntry: { + claim: "ParathreadClaim", + retries: "u32" + }, + ParaValidatorIndex: "u32", + PersistedValidationData: { + parentHead: "HeadData", + relayParentNumber: "RelayChainBlockNumber", + relayParentStorageRoot: "Hash", + maxPovSize: "u32" + }, + PvfCheckStatement: { + accept: "bool", + subject: "ValidationCodeHash", + sessionIndex: "SessionIndex", + validatorIndex: "ParaValidatorIndex" + }, + QueuedParathread: { + claim: "ParathreadEntry", + coreOffset: "u32" + }, + RelayBlockNumber: "u32", + RelayChainBlockNumber: "RelayBlockNumber", + RelayHash: "Hash", + RelayChainHash: "RelayHash", + Remark: "[u8; 32]", + ReplacementTimes: { + expectedAt: "BlockNumber", + activatedAt: "BlockNumber" + }, + Retriable: { + _enum: { + Never: "Null", + WithRetries: "u32" + } + }, + ScheduledCore: { + paraId: "ParaId", + collator: "Option" + }, + Scheduling: { + _enum: ["Always", "Dynamic"] + }, + ScrapedOnChainVotes: { + session: "SessionIndex", + backingValidatorsPerCandidate: "Vec<(CandidateReceipt, Vec<(ParaValidatorIndex, ValidityAttestation)>)>", + disputes: "MultiDisputeStatementSet" + }, + SessionInfo: { + activeValidatorIndices: "Vec", + randomSeed: "[u8; 32]", + disputePeriod: "SessionIndex", + validators: "Vec", + discoveryKeys: "Vec", + assignmentKeys: "Vec", + validatorGroups: "Vec>", + nCores: "u32", + zerothDelayTrancheWidth: "u32", + relayVrfModuloSamples: "u32", + nDelayTranches: "u32", + noShowSlots: "u32", + neededApprovals: "u32" + }, + OldV1SessionInfo: { + validators: "Vec", + discoveryKeys: "Vec", + assignmentKeys: "Vec", + validatorGroups: "Vec>", + nCores: "u32", + zerothDelayTrancheWidth: "u32", + relayVrfModuloSamples: "u32", + nDelayTranches: "u32", + noShowSlots: "u32", + neededApprovals: "u32" + }, + SessionInfoValidatorGroup: "Vec", + SignedAvailabilityBitfield: { + payload: "BitVec", + validatorIndex: "ParaValidatorIndex", + signature: "ValidatorSignature" + }, + SignedAvailabilityBitfields: "Vec", + SigningContext: { + sessionIndex: "SessionIndex", + parentHash: "Hash" + }, + SlashingOffenceKind: { + _enum: ["ForInvalid", "AgainstValid"] + }, + Statement: { + _enum: { + Never: "Null", + Candidate: "Hash", + Valid: "Hash", + Invalid: "Hash" + } + }, + TransientValidationData: { + maxCodeSize: "u32", + maxHeadDataSize: "u32", + balance: "Balance", + codeUpgradeAllowed: "Option", + dmqLength: "u32" + }, + UpgradeGoAhead: { + _enum: ["Abort", "GoAhead"] + }, + UpgradeRestriction: { + _enum: ["Present"] + }, + UpwardMessage: "Bytes", + ValidationFunctionParams: { + maxCodeSize: "u32", + relayChainHeight: "RelayChainBlockNumber", + codeUpgradeAllowed: "Option" + }, + ValidationCode: "Bytes", + ValidationCodeHash: "Hash", + ValidationData: { + persisted: "PersistedValidationData", + transient: "TransientValidationData" + }, + ValidationDataType: { + validationData: "ValidationData", + relayChainState: "Vec" + }, + ValidatorSignature: "Signature", + ValidityAttestation: { + _enum: { + Never: "Null", + Implicit: "ValidatorSignature", + Explicit: "ValidatorSignature" + } + }, + MessagingStateSnapshot: { + relayDispatchQueueSize: "(u32, u32)", + egressChannels: "Vec" + }, + MessagingStateSnapshotEgressEntry: "(ParaId, AbridgedHrmpChannel)", + SystemInherentData: "ParachainInherentData", + VecInboundHrmpMessage: "Vec" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/poll/definitions.js + var require_definitions60 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/poll/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + Approvals: "[bool; 4]" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/purchase/definitions.js + var require_definitions61 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/purchase/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + rpc: {}, + types: { + AccountStatus: { + validity: "AccountValidity", + freeBalance: "Balance", + lockedBalance: "Balance", + signature: "Vec", + vat: "Permill" + }, + AccountValidity: { + _enum: ["Invalid", "Initiated", "Pending", "ValidLow", "ValidHigh", "Completed"] + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/packageDetect.js + var require_packageDetect4 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo16(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo17(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_1.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/types/registry.js + var require_registry = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/types/registry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/types/augmentRegistry.js + var require_augmentRegistry = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/types/augmentRegistry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_registry(); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/types/lookup.js + var require_lookup = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/types/lookup.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/types/types.js + var require_types2 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/types/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TypeDefInfo = void 0; + var TypeDefInfo2; + (function(TypeDefInfo3) { + TypeDefInfo3[TypeDefInfo3["BTreeMap"] = 0] = "BTreeMap"; + TypeDefInfo3[TypeDefInfo3["BTreeSet"] = 1] = "BTreeSet"; + TypeDefInfo3[TypeDefInfo3["Compact"] = 2] = "Compact"; + TypeDefInfo3[TypeDefInfo3["DoNotConstruct"] = 3] = "DoNotConstruct"; + TypeDefInfo3[TypeDefInfo3["Enum"] = 4] = "Enum"; + TypeDefInfo3[TypeDefInfo3["HashMap"] = 5] = "HashMap"; + TypeDefInfo3[TypeDefInfo3["Int"] = 6] = "Int"; + TypeDefInfo3[TypeDefInfo3["Linkage"] = 7] = "Linkage"; + TypeDefInfo3[TypeDefInfo3["Null"] = 8] = "Null"; + TypeDefInfo3[TypeDefInfo3["Option"] = 9] = "Option"; + TypeDefInfo3[TypeDefInfo3["Plain"] = 10] = "Plain"; + TypeDefInfo3[TypeDefInfo3["Range"] = 11] = "Range"; + TypeDefInfo3[TypeDefInfo3["RangeInclusive"] = 12] = "RangeInclusive"; + TypeDefInfo3[TypeDefInfo3["Result"] = 13] = "Result"; + TypeDefInfo3[TypeDefInfo3["Set"] = 14] = "Set"; + TypeDefInfo3[TypeDefInfo3["Si"] = 15] = "Si"; + TypeDefInfo3[TypeDefInfo3["Struct"] = 16] = "Struct"; + TypeDefInfo3[TypeDefInfo3["Tuple"] = 17] = "Tuple"; + TypeDefInfo3[TypeDefInfo3["UInt"] = 18] = "UInt"; + TypeDefInfo3[TypeDefInfo3["Vec"] = 19] = "Vec"; + TypeDefInfo3[TypeDefInfo3["VecFixed"] = 20] = "VecFixed"; + TypeDefInfo3[TypeDefInfo3["WrapperKeepOpaque"] = 21] = "WrapperKeepOpaque"; + TypeDefInfo3[TypeDefInfo3["WrapperOpaque"] = 22] = "WrapperOpaque"; + })(TypeDefInfo2 || (exports2.TypeDefInfo = TypeDefInfo2 = {})); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/types/index.js + var require_types3 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/types/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_augmentRegistry(); + tslib_1.__exportStar(require_lookup(), exports2); + tslib_1.__exportStar(require_types2(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/packageDetect.js + var require_packageDetect5 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo16(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, []); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/util.js + var require_util2 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasEq = void 0; + var util_1 = require_cjs3(); + function hasEq2(o) { + return (0, util_1.isFunction)(o.eq); + } + exports2.hasEq = hasEq2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/compareArray.js + var require_compareArray = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/compareArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareArray = void 0; + var util_1 = require_cjs3(); + var util_js_1 = require_util2(); + function compareArray2(a, b) { + if (Array.isArray(b)) { + return a.length === b.length && (0, util_1.isUndefined)(a.find((v, index) => (0, util_js_1.hasEq)(v) ? !v.eq(b[index]) : v !== b[index])); + } + return false; + } + exports2.compareArray = compareArray2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/abstract/Array.js + var require_Array = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/abstract/Array.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractArray = void 0; + var util_1 = require_cjs3(); + var compareArray_js_1 = require_compareArray(); + var AbstractArray2 = class extends Array { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + static get [Symbol.species]() { + return Array; + } + constructor(registry, length) { + super(length); + this.registry = registry; + } + get encodedLength() { + const count = this.length; + let total = (0, util_1.compactToU8a)(count).length; + for (let i = 0; i < count; i++) { + total += this[i].encodedLength; + } + return total; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.length === 0; + } + get length() { + return super.length; + } + eq(other) { + return (0, compareArray_js_1.compareArray)(this, other); + } + inspect() { + return { + inner: this.inspectInner(), + outer: [(0, util_1.compactToU8a)(this.length)] + }; + } + inspectInner() { + const count = this.length; + const inner = new Array(count); + for (let i = 0; i < count; i++) { + inner[i] = this[i].inspect(); + } + return inner; + } + toArray() { + return Array.from(this); + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman(isExtended, disableAscii) { + const count = this.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + result[i] = this[i] && this[i].toHuman(isExtended, disableAscii); + } + return result; + } + toJSON() { + const count = this.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + result[i] = this[i] && this[i].toJSON(); + } + return result; + } + toPrimitive(disableAscii) { + const count = this.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + result[i] = this[i] && this[i].toPrimitive(disableAscii); + } + return result; + } + toString() { + const count = this.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + result[i] = this[i].toString(); + } + return `[${result.join(", ")}]`; + } + toU8a(isBare) { + const encoded = this.toU8aInner(); + return isBare ? (0, util_1.u8aConcatStrict)(encoded) : (0, util_1.u8aConcatStrict)([(0, util_1.compactToU8a)(this.length), ...encoded]); + } + toU8aInner(isBare) { + const count = this.length; + const encoded = new Array(count); + for (let i = 0; i < count; i++) { + encoded[i] = this[i].toU8a(isBare); + } + return encoded; + } + }; + exports2.AbstractArray = AbstractArray2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/abstract/Base.js + var require_Base = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/abstract/Base.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractBase = void 0; + var AbstractBase2 = class { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__raw; + constructor(registry, value, initialU8aLength) { + this.initialU8aLength = initialU8aLength; + this.__internal__raw = value; + this.registry = registry; + } + get encodedLength() { + return this.toU8a().length; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get inner() { + return this.__internal__raw; + } + get isEmpty() { + return this.__internal__raw.isEmpty; + } + eq(other) { + return this.__internal__raw.eq(other); + } + inspect() { + return this.__internal__raw.inspect(); + } + toHex(isLe) { + return this.__internal__raw.toHex(isLe); + } + toHuman(isExtended, disableAscii) { + return this.__internal__raw.toHuman(isExtended, disableAscii); + } + toJSON() { + return this.__internal__raw.toJSON(); + } + toPrimitive(disableAscii) { + return this.__internal__raw.toPrimitive(disableAscii); + } + toString() { + return this.__internal__raw.toString(); + } + toU8a(isBare) { + return this.__internal__raw.toU8a(isBare); + } + unwrap() { + return this.__internal__raw; + } + valueOf() { + return this.__internal__raw; + } + }; + exports2.AbstractBase = AbstractBase2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/abstract/Int.js + var require_Int = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/abstract/Int.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractInt = exports2.DEFAULT_UINT_BITS = void 0; + var util_1 = require_cjs3(); + exports2.DEFAULT_UINT_BITS = 64; + var MAX_NUMBER_BITS2 = 52; + var MUL_P2 = new util_1.BN(1e4); + var FORMATTERS2 = [ + ["Perquintill", util_1.BN_QUINTILL], + ["Perbill", util_1.BN_BILLION], + ["Permill", util_1.BN_MILLION], + ["Percent", util_1.BN_HUNDRED] + ]; + function isToBn6(value) { + return (0, util_1.isFunction)(value.toBn); + } + function toPercentage2(value, divisor) { + return `${(value.mul(MUL_P2).div(divisor).toNumber() / 100).toFixed(2)}%`; + } + function decodeAbstractInt2(value, isNegative) { + if ((0, util_1.isNumber)(value)) { + if (!Number.isInteger(value) || value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER) { + throw new Error("Number needs to be an integer <= Number.MAX_SAFE_INTEGER, i.e. 2 ^ 53 - 1"); + } + return value; + } else if ((0, util_1.isString)(value)) { + if ((0, util_1.isHex)(value, -1, true)) { + return (0, util_1.hexToBn)(value, { isLe: false, isNegative }).toString(); + } + if (value.includes(".") || value.includes(",") || value.includes("e")) { + throw new Error("String should not contain decimal points or scientific notation"); + } + return value; + } else if ((0, util_1.isBn)(value) || (0, util_1.isBigInt)(value)) { + return value.toString(); + } else if ((0, util_1.isObject)(value)) { + if (isToBn6(value)) { + return value.toBn().toString(); + } + const keys = Object.keys(value); + if (keys.length !== 1) { + throw new Error("Unable to construct number from multi-key object"); + } + return decodeAbstractInt2(value[keys[0]], isNegative); + } else if (!value) { + return 0; + } + throw new Error(`Unable to create BN from unknown type ${typeof value}`); + } + var AbstractInt2 = class extends util_1.BN { + registry; + encodedLength; + isUnsigned; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__bitLength; + constructor(registry, value = 0, bitLength = exports2.DEFAULT_UINT_BITS, isSigned = false) { + super( + (0, util_1.isU8a)(value) ? bitLength <= 48 ? (0, util_1.u8aToNumber)(value.subarray(0, bitLength / 8), { isNegative: isSigned }) : (0, util_1.u8aToBn)(value.subarray(0, bitLength / 8), { isLe: true, isNegative: isSigned }).toString() : decodeAbstractInt2(value, isSigned) + ); + this.registry = registry; + this.__internal__bitLength = bitLength; + this.encodedLength = this.__internal__bitLength / 8; + this.initialU8aLength = this.__internal__bitLength / 8; + this.isUnsigned = !isSigned; + const isNegative = this.isNeg(); + const maxBits = bitLength - (isSigned && !isNegative ? 1 : 0); + if (isNegative && !isSigned) { + throw new Error(`${this.toRawType()}: Negative number passed to unsigned type`); + } else if (super.bitLength() > maxBits) { + throw new Error(`${this.toRawType()}: Input too large. Found input with ${super.bitLength()} bits, expected ${maxBits}`); + } + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.isZero(); + } + bitLength() { + return this.__internal__bitLength; + } + eq(other) { + return super.eq((0, util_1.isHex)(other) ? (0, util_1.hexToBn)(other.toString(), { isLe: false, isNegative: !this.isUnsigned }) : (0, util_1.bnToBn)(other)); + } + inspect() { + return { + outer: [this.toU8a()] + }; + } + isMax() { + const u8a = this.toU8a().filter((b) => b === 255); + return u8a.length === this.__internal__bitLength / 8; + } + toBigInt() { + return BigInt(this.toString()); + } + toBn() { + return this; + } + toHex(isLe = false) { + return (0, util_1.bnToHex)(this, { + bitLength: this.bitLength(), + isLe, + isNegative: !this.isUnsigned + }); + } + toHuman(_isExpanded) { + const rawType = this.toRawType(); + if (rawType === "Balance") { + return this.isMax() ? "everything" : (0, util_1.formatBalance)(this, { decimals: this.registry.chainDecimals[0], withSi: true, withUnit: this.registry.chainTokens[0] }); + } + const [, divisor] = FORMATTERS2.find(([type]) => type === rawType) || []; + return divisor ? toPercentage2(this, divisor) : (0, util_1.formatNumber)(this); + } + toJSON(onlyHex = false) { + return onlyHex || this.__internal__bitLength > 128 || super.bitLength() > MAX_NUMBER_BITS2 ? this.toHex() : this.toNumber(); + } + toPrimitive() { + return super.bitLength() > MAX_NUMBER_BITS2 ? this.toString() : this.toNumber(); + } + toRawType() { + return this instanceof this.registry.createClassUnsafe("Balance") ? "Balance" : `${this.isUnsigned ? "u" : "i"}${this.bitLength()}`; + } + toString(base2) { + return super.toString(base2); + } + toU8a(_isBare) { + return (0, util_1.bnToU8a)(this, { + bitLength: this.bitLength(), + isLe: true, + isNegative: !this.isUnsigned + }); + } + }; + exports2.AbstractInt = AbstractInt2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/abstract/index.js + var require_abstract = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/abstract/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractInt = exports2.AbstractBase = exports2.AbstractArray = void 0; + var Array_js_1 = require_Array(); + Object.defineProperty(exports2, "AbstractArray", { enumerable: true, get: function() { + return Array_js_1.AbstractArray; + } }); + var Base_js_1 = require_Base(); + Object.defineProperty(exports2, "AbstractBase", { enumerable: true, get: function() { + return Base_js_1.AbstractBase; + } }); + var Int_js_1 = require_Int(); + Object.defineProperty(exports2, "AbstractInt", { enumerable: true, get: function() { + return Int_js_1.AbstractInt; + } }); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/compareMap.js + var require_compareMap = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/compareMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareMap = void 0; + var util_1 = require_cjs3(); + var util_js_1 = require_util2(); + function hasMismatch2(a, b) { + return (0, util_1.isUndefined)(a) || ((0, util_js_1.hasEq)(a) ? !a.eq(b) : a !== b); + } + function notEntry2(value) { + return !Array.isArray(value) || value.length !== 2; + } + function compareMapArray2(a, b) { + return a.size === b.length && !b.some((e) => notEntry2(e) || hasMismatch2(a.get(e[0]), e[1])); + } + function compareMap2(a, b) { + if (Array.isArray(b)) { + return compareMapArray2(a, b); + } else if (b instanceof Map) { + return compareMapArray2(a, [...b.entries()]); + } else if ((0, util_1.isObject)(b)) { + return compareMapArray2(a, Object.entries(b)); + } + return false; + } + exports2.compareMap = compareMap2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/compareSet.js + var require_compareSet = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/compareSet.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareSet = void 0; + var util_1 = require_cjs3(); + function compareSetArray2(a, b) { + return a.size === b.length && !b.some((e) => !a.has(e)); + } + function compareSet2(a, b) { + if (Array.isArray(b)) { + return compareSetArray2(a, b); + } else if (b instanceof Set) { + return compareSetArray2(a, [...b.values()]); + } else if ((0, util_1.isObject)(b)) { + return compareSetArray2(a, Object.values(b)); + } + return false; + } + exports2.compareSet = compareSet2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/decodeU8a.js + var require_decodeU8a = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/decodeU8a.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decodeU8aVec = exports2.decodeU8aStruct = exports2.decodeU8a = void 0; + var util_1 = require_cjs3(); + function formatFailure2(registry, fn2, _result, { message }, u8a, i, count, Type2, key2) { + let type = ""; + try { + type = `: ${new Type2(registry).toRawType()}`; + } catch { + } + return `${fn2}: failed at ${(0, util_1.u8aToHex)(u8a.subarray(0, 16))}\u2026${key2 ? ` on ${key2}` : ""} (index ${i + 1}/${count})${type}:: ${message}`; + } + function decodeU8a8(registry, result, u8a, [Types, keys]) { + const count = result.length; + let offset = 0; + let i = 0; + try { + while (i < count) { + const value = new Types[i](registry, u8a.subarray(offset)); + offset += value.initialU8aLength || value.encodedLength; + result[i] = value; + i++; + } + } catch (error) { + throw new Error(formatFailure2(registry, "decodeU8a", result, error, u8a.subarray(offset), i, count, Types[i], keys[i])); + } + return [result, offset]; + } + exports2.decodeU8a = decodeU8a8; + function decodeU8aStruct2(registry, result, u8a, [Types, keys]) { + const count = result.length; + let offset = 0; + let i = 0; + try { + while (i < count) { + const value = new Types[i](registry, u8a.subarray(offset)); + offset += value.initialU8aLength || value.encodedLength; + result[i] = [keys[i], value]; + i++; + } + } catch (error) { + throw new Error(formatFailure2(registry, "decodeU8aStruct", result, error, u8a.subarray(offset), i, count, Types[i], keys[i])); + } + return [result, offset]; + } + exports2.decodeU8aStruct = decodeU8aStruct2; + function decodeU8aVec2(registry, result, u8a, startAt, Type2) { + const count = result.length; + let offset = startAt; + let i = 0; + try { + while (i < count) { + const value = new Type2(registry, u8a.subarray(offset)); + offset += value.initialU8aLength || value.encodedLength; + result[i] = value; + i++; + } + } catch (error) { + throw new Error(formatFailure2(registry, "decodeU8aVec", result, error, u8a.subarray(offset), i, count, Type2)); + } + return [offset, offset - startAt]; + } + exports2.decodeU8aVec = decodeU8aVec2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/sanitize.js + var require_sanitize = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/sanitize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sanitize = exports2.removeWrap = exports2.removeTraits = exports2.removePairOf = exports2.removeGenerics = exports2.removeColons = exports2.removeExtensions = exports2.flattenSingleTuple = exports2.cleanupCompact = exports2.alias = exports2.findClosing = exports2.trim = void 0; + var BOUNDED2 = ["BTreeMap", "BTreeSet", "HashMap", "Vec"]; + var ALLOWED_BOXES2 = BOUNDED2.concat(["Compact", "DoNotConstruct", "Int", "Linkage", "Range", "RangeInclusive", "Result", "Opaque", "Option", "UInt", "WrapperKeepOpaque", "WrapperOpaque"]); + var BOX_PRECEDING2 = ["<", "(", "[", '"', ",", " "]; + var mappings2 = [ + alias2("::Inherent", "InherentOfflineReport", false), + alias2("VecDeque<", "Vec<", false), + cleanupCompact2(), + removeExtensions2("Bounded", true), + removeExtensions2("Weak", false), + removeTraits2(), + removePairOf2(), + removeWrap2("Box<"), + removeGenerics2(), + alias2("String", "Text"), + alias2("Vec", "Bytes"), + alias2("&\\[u8\\]", "Bytes"), + alias2("&'static\\[u8\\]", "Bytes"), + alias2("RawAddress", "Address"), + alias2("Lookup::Source", "LookupSource"), + alias2("Lookup::Target", "LookupTarget"), + alias2("exec::StorageKey", "ContractStorageKey"), + flattenSingleTuple2(), + removeColons2(), + trim2() + ]; + function trim2() { + return (value) => value.trim(); + } + exports2.trim = trim2; + function findClosing2(value, start) { + let depth = 0; + for (let i = start, count = value.length; i < count; i++) { + if (value[i] === ">") { + if (!depth) { + return i; + } + depth--; + } else if (value[i] === "<") { + depth++; + } + } + throw new Error(`Unable to find closing matching <> on '${value}' (start ${start})`); + } + exports2.findClosing = findClosing2; + function alias2(src, dest, withChecks = true) { + const from2 = new RegExp(`(^${src}|${BOX_PRECEDING2.map((box) => `\\${box}${src}`).join("|")})`, "g"); + const to2 = (src2) => { + from2.lastIndex = 0; + return withChecks && BOX_PRECEDING2.includes(src2[0]) ? `${src2[0]}${dest}` : dest; + }; + return (value) => value.replace(from2, to2); + } + exports2.alias = alias2; + function cleanupCompact2() { + return (value) => { + if (value.includes(" as HasCompact")) { + for (let i = 0, count = value.length; i < count; i++) { + if (value[i] === "<") { + const end = findClosing2(value, i + 1) - 14; + if (value.substring(end, end + 14) === " as HasCompact") { + value = `Compact<${value.substring(i + 1, end)}>`; + } + } + } + } + return value; + }; + } + exports2.cleanupCompact = cleanupCompact2; + function flattenSingleTuple2() { + const from1 = /,\)/g; + const from2 = /\(([^,]+)\)/; + return (value) => { + from1.lastIndex = 0; + return value.replace(from1, ")").replace(from2, "$1"); + }; + } + exports2.flattenSingleTuple = flattenSingleTuple2; + function replaceTagWith2(value, matcher, replacer3) { + let index = -1; + while (true) { + index = value.indexOf(matcher, index + 1); + if (index === -1) { + return value; + } + const start = index + matcher.length; + const end = findClosing2(value, start); + value = `${value.substring(0, index)}${replacer3(value.substring(start, end))}${value.substring(end + 1)}`; + } + } + function removeExtensions2(type, isSized) { + return (value) => { + for (let i = 0, count = BOUNDED2.length; i < count; i++) { + const tag = BOUNDED2[i]; + value = replaceTagWith2(value, `${type}${tag}<`, (v) => { + const parts = v.split(",").map((s) => s.trim()).filter((s) => s); + if (isSized) { + parts.pop(); + } + return `${tag}<${parts.join(",")}>`; + }); + } + return value; + }; + } + exports2.removeExtensions = removeExtensions2; + function removeColons2() { + return (value) => { + let index = 0; + while (index !== -1) { + index = value.indexOf("::"); + if (index === 0) { + value = value.substring(2); + } else if (index !== -1) { + let start = index; + while (start !== -1 && !BOX_PRECEDING2.includes(value[start])) { + start--; + } + value = `${value.substring(0, start + 1)}${value.substring(index + 2)}`; + } + } + return value; + }; + } + exports2.removeColons = removeColons2; + function removeGenerics2() { + return (value) => { + for (let i = 0, count = value.length; i < count; i++) { + if (value[i] === "<") { + const box = ALLOWED_BOXES2.find((box2) => { + const start = i - box2.length; + return start >= 0 && value.substring(start, i) === box2 && (start === 0 || BOX_PRECEDING2.includes(value[start - 1])); + }); + if (!box) { + const end = findClosing2(value, i + 1); + value = `${value.substring(0, i)}${value.substring(end + 1)}`; + } + } + } + return value; + }; + } + exports2.removeGenerics = removeGenerics2; + function removePairOf2() { + const replacer3 = (v) => `(${v},${v})`; + return (value) => replaceTagWith2(value, "PairOf<", replacer3); + } + exports2.removePairOf = removePairOf2; + function removeTraits2() { + const from1 = /\s/g; + const from2 = /(T|Self)::/g; + const from3 = /<(T|Self)asTrait>::/g; + const from4 = /::/g; + const from5 = //g; + const from6 = /::Type/g; + return (value) => { + from1.lastIndex = 0; + from2.lastIndex = 0; + from3.lastIndex = 0; + from4.lastIndex = 0; + from5.lastIndex = 0; + from6.lastIndex = 0; + return value.replace(from1, "").replace(from2, "").replace(from3, "").replace(from4, "").replace(from5, "Lookup").replace(from6, ""); + }; + } + exports2.removeTraits = removeTraits2; + function removeWrap2(check) { + const replacer3 = (v) => v; + return (value) => replaceTagWith2(value, check, replacer3); + } + exports2.removeWrap = removeWrap2; + var sanitizeMap2 = /* @__PURE__ */ new Map(); + function sanitize2(value) { + const startValue = value.toString(); + const memoized2 = sanitizeMap2.get(startValue); + if (memoized2) { + return memoized2; + } + let result = startValue; + for (let i = 0, count = mappings2.length; i < count; i++) { + result = mappings2[i](result); + } + sanitizeMap2.set(startValue, result); + return result; + } + exports2.sanitize = sanitize2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/sortValues.js + var require_sortValues = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/sortValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sortMap = exports2.sortSet = exports2.sortAsc = void 0; + var util_1 = require_cjs3(); + function isArrayLike3(arg) { + return arg instanceof Uint8Array || Array.isArray(arg); + } + function isEnum2(arg) { + return (0, util_1.isCodec)(arg) && (0, util_1.isNumber)(arg.index) && (0, util_1.isCodec)(arg.value); + } + function isOption2(arg) { + return (0, util_1.isCodec)(arg) && (0, util_1.isBoolean)(arg.isSome) && (0, util_1.isCodec)(arg.value); + } + function isNumberLike2(arg) { + return (0, util_1.isNumber)(arg) || (0, util_1.isBn)(arg) || (0, util_1.isBigInt)(arg); + } + function sortArray2(a, b) { + let sortRes = 0; + const minLen = Math.min(a.length, b.length); + for (let i = 0; i < minLen; ++i) { + sortRes = sortAsc2(a[i], b[i]); + if (sortRes !== 0) { + return sortRes; + } + } + return a.length - b.length; + } + function checkForDuplicates2(container, seen, arg) { + if ((0, util_1.isCodec)(arg)) { + const hex8 = arg.toHex(); + if (seen.has(hex8)) { + throw new Error(`Duplicate value in ${container}: ${(0, util_1.stringify)(arg)}`); + } + seen.add(hex8); + } + return true; + } + function sortAsc2(a, b) { + if (isNumberLike2(a) && isNumberLike2(b)) { + return (0, util_1.bnToBn)(a).cmp((0, util_1.bnToBn)(b)); + } else if (a instanceof Map && b instanceof Map) { + return sortAsc2(Array.from(a.values()), Array.from(b.values())); + } else if (isEnum2(a) && isEnum2(b)) { + return sortAsc2(a.index, b.index) || sortAsc2(a.value, b.value); + } else if (isOption2(a) && isOption2(b)) { + return sortAsc2(a.isNone ? 0 : 1, b.isNone ? 0 : 1) || sortAsc2(a.value, b.value); + } else if (isArrayLike3(a) && isArrayLike3(b)) { + return sortArray2(a, b); + } else if ((0, util_1.isCodec)(a) && (0, util_1.isCodec)(b)) { + return sortAsc2(a.toU8a(true), b.toU8a(true)); + } + throw new Error(`Attempting to sort unrecognized values: ${(0, util_1.stringify)(a)} (typeof ${typeof a}) <-> ${(0, util_1.stringify)(b)} (typeof ${typeof b})`); + } + exports2.sortAsc = sortAsc2; + function sortSet2(set2) { + const seen = /* @__PURE__ */ new Set(); + return new Set(Array.from(set2).filter((value) => checkForDuplicates2("BTreeSet", seen, value)).sort(sortAsc2)); + } + exports2.sortSet = sortSet2; + function sortMap2(map2) { + const seen = /* @__PURE__ */ new Set(); + return new Map(Array.from(map2.entries()).filter(([key2]) => checkForDuplicates2("BTreeMap", seen, key2)).sort(([keyA], [keyB]) => sortAsc2(keyA, keyB))); + } + exports2.sortMap = sortMap2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/toConstructors.js + var require_toConstructors = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/toConstructors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapToTypeMap = exports2.typesToConstructors = exports2.typeToConstructor = void 0; + function typeToConstructor2(registry, type) { + return typeof type === "function" ? type : registry.createClassUnsafe(type); + } + exports2.typeToConstructor = typeToConstructor2; + function typesToConstructors2(registry, types2) { + const count = types2.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + result[i] = typeToConstructor2(registry, types2[i]); + } + return result; + } + exports2.typesToConstructors = typesToConstructors2; + function mapToTypeMap2(registry, input) { + const entries = Object.entries(input); + const count = entries.length; + const output4 = [new Array(count), new Array(count)]; + for (let i = 0; i < count; i++) { + output4[1][i] = entries[i][0]; + output4[0][i] = typeToConstructor2(registry, entries[i][1]); + } + return output4; + } + exports2.mapToTypeMap = mapToTypeMap2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/typesToMap.js + var require_typesToMap = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/typesToMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typesToMap = void 0; + function typesToMap2(registry, [Types, keys]) { + const result = {}; + for (let i = 0, count = keys.length; i < count; i++) { + result[keys[i]] = registry.getClassName(Types[i]) || new Types[i](registry).toRawType(); + } + return result; + } + exports2.typesToMap = typesToMap2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/utils/index.js + var require_utils5 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typesToMap = exports2.typeToConstructor = exports2.typesToConstructors = exports2.mapToTypeMap = exports2.sortSet = exports2.sortMap = exports2.sortAsc = exports2.sanitize = exports2.decodeU8aVec = exports2.decodeU8aStruct = exports2.decodeU8a = exports2.compareSet = exports2.compareMap = exports2.compareArray = void 0; + var compareArray_js_1 = require_compareArray(); + Object.defineProperty(exports2, "compareArray", { enumerable: true, get: function() { + return compareArray_js_1.compareArray; + } }); + var compareMap_js_1 = require_compareMap(); + Object.defineProperty(exports2, "compareMap", { enumerable: true, get: function() { + return compareMap_js_1.compareMap; + } }); + var compareSet_js_1 = require_compareSet(); + Object.defineProperty(exports2, "compareSet", { enumerable: true, get: function() { + return compareSet_js_1.compareSet; + } }); + var decodeU8a_js_1 = require_decodeU8a(); + Object.defineProperty(exports2, "decodeU8a", { enumerable: true, get: function() { + return decodeU8a_js_1.decodeU8a; + } }); + Object.defineProperty(exports2, "decodeU8aStruct", { enumerable: true, get: function() { + return decodeU8a_js_1.decodeU8aStruct; + } }); + Object.defineProperty(exports2, "decodeU8aVec", { enumerable: true, get: function() { + return decodeU8a_js_1.decodeU8aVec; + } }); + var sanitize_js_1 = require_sanitize(); + Object.defineProperty(exports2, "sanitize", { enumerable: true, get: function() { + return sanitize_js_1.sanitize; + } }); + var sortValues_js_1 = require_sortValues(); + Object.defineProperty(exports2, "sortAsc", { enumerable: true, get: function() { + return sortValues_js_1.sortAsc; + } }); + Object.defineProperty(exports2, "sortMap", { enumerable: true, get: function() { + return sortValues_js_1.sortMap; + } }); + Object.defineProperty(exports2, "sortSet", { enumerable: true, get: function() { + return sortValues_js_1.sortSet; + } }); + var toConstructors_js_1 = require_toConstructors(); + Object.defineProperty(exports2, "mapToTypeMap", { enumerable: true, get: function() { + return toConstructors_js_1.mapToTypeMap; + } }); + Object.defineProperty(exports2, "typesToConstructors", { enumerable: true, get: function() { + return toConstructors_js_1.typesToConstructors; + } }); + Object.defineProperty(exports2, "typeToConstructor", { enumerable: true, get: function() { + return toConstructors_js_1.typeToConstructor; + } }); + var typesToMap_js_1 = require_typesToMap(); + Object.defineProperty(exports2, "typesToMap", { enumerable: true, get: function() { + return typesToMap_js_1.typesToMap; + } }); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Compact.js + var require_Compact = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Compact.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Compact = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_utils5(); + function decodeCompact2(registry, Type2, value) { + if ((0, util_1.isU8a)(value)) { + const [decodedLength, bn2] = (value[0] & 3) < 3 ? (0, util_1.compactFromU8aLim)(value) : (0, util_1.compactFromU8a)(value); + return [new Type2(registry, bn2), decodedLength]; + } else if (value instanceof Compact2) { + const raw = value.unwrap(); + return raw instanceof Type2 ? [raw, 0] : [new Type2(registry, raw), 0]; + } else if (value instanceof Type2) { + return [value, 0]; + } + return [new Type2(registry, value), 0]; + } + var Compact2 = class { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__Type; + __internal__raw; + constructor(registry, Type2, value = 0, { definition, setDefinition = util_1.identity } = {}) { + this.registry = registry; + this.__internal__Type = definition || setDefinition((0, index_js_1.typeToConstructor)(registry, Type2)); + const [raw, decodedLength] = decodeCompact2(registry, this.__internal__Type, value); + this.initialU8aLength = decodedLength; + this.__internal__raw = raw; + } + static with(Type2) { + let definition; + const setDefinition = (d) => definition = d; + return class extends Compact2 { + constructor(registry, value) { + super(registry, Type2, value, { definition, setDefinition }); + } + }; + } + get encodedLength() { + return this.toU8a().length; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.__internal__raw.isEmpty; + } + bitLength() { + return this.__internal__raw.bitLength(); + } + eq(other) { + return this.__internal__raw.eq(other instanceof Compact2 ? other.__internal__raw : other); + } + inspect() { + return { + outer: [this.toU8a()] + }; + } + toBigInt() { + return this.__internal__raw.toBigInt(); + } + toBn() { + return this.__internal__raw.toBn(); + } + toHex(isLe) { + return this.__internal__raw.toHex(isLe); + } + toHuman(isExtended, disableAscii) { + return this.__internal__raw.toHuman(isExtended, disableAscii); + } + toJSON() { + return this.__internal__raw.toJSON(); + } + toNumber() { + return this.__internal__raw.toNumber(); + } + toPrimitive(disableAscii) { + return this.__internal__raw.toPrimitive(disableAscii); + } + toRawType() { + return `Compact<${this.registry.getClassName(this.__internal__Type) || this.__internal__raw.toRawType()}>`; + } + toString() { + return this.__internal__raw.toString(); + } + toU8a(_isBare) { + return (0, util_1.compactToU8a)(this.__internal__raw.toBn()); + } + unwrap() { + return this.__internal__raw; + } + }; + exports2.Compact = Compact2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/DoNotConstruct.js + var require_DoNotConstruct = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/DoNotConstruct.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DoNotConstruct = void 0; + var DoNotConstruct2 = class { + registry; + createdAtHash; + isStorageFallback; + __internal__neverError; + constructor(registry, typeName = "DoNotConstruct") { + this.registry = registry; + this.__internal__neverError = new Error(`DoNotConstruct: Cannot construct unknown type ${typeName}`); + throw this.__internal__neverError; + } + static with(typeName) { + return class extends DoNotConstruct2 { + constructor(registry) { + super(registry, typeName); + } + }; + } + get encodedLength() { + throw this.__internal__neverError; + } + get hash() { + throw this.__internal__neverError; + } + get isEmpty() { + throw this.__internal__neverError; + } + eq() { + throw this.__internal__neverError; + } + inspect() { + throw this.__internal__neverError; + } + toHex() { + throw this.__internal__neverError; + } + toHuman() { + throw this.__internal__neverError; + } + toJSON() { + throw this.__internal__neverError; + } + toPrimitive() { + throw this.__internal__neverError; + } + toRawType() { + throw this.__internal__neverError; + } + toString() { + throw this.__internal__neverError; + } + toU8a() { + throw this.__internal__neverError; + } + }; + exports2.DoNotConstruct = DoNotConstruct2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Null.js + var require_Null = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Null.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Null = void 0; + var util_1 = require_cjs3(); + var Null2 = class { + encodedLength = 0; + isEmpty = true; + registry; + createdAtHash; + initialU8aLength = 0; + isStorageFallback; + constructor(registry) { + this.registry = registry; + } + get hash() { + throw new Error(".hash is not implemented on Null"); + } + eq(other) { + return other instanceof Null2 || (0, util_1.isNull)(other); + } + inspect() { + return {}; + } + toHex() { + return "0x"; + } + toHuman() { + return this.toJSON(); + } + toJSON() { + return null; + } + toPrimitive() { + return null; + } + toRawType() { + return "Null"; + } + toString() { + return ""; + } + toU8a(_isBare) { + return new Uint8Array(); + } + }; + exports2.Null = Null2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Enum.js + var require_Enum = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Enum = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_utils5(); + var Null_js_1 = require_Null(); + function isRustEnum3(def) { + const defValues = Object.values(def); + if (defValues.some((v) => (0, util_1.isNumber)(v))) { + if (!defValues.every((v) => (0, util_1.isNumber)(v) && v >= 0 && v <= 255)) { + throw new Error("Invalid number-indexed enum definition"); + } + return false; + } + return true; + } + function extractDef2(registry, _def) { + const def = {}; + let isBasic; + let isIndexed; + if (Array.isArray(_def)) { + for (let i = 0, count = _def.length; i < count; i++) { + def[_def[i]] = { Type: Null_js_1.Null, index: i }; + } + isBasic = true; + isIndexed = false; + } else if (isRustEnum3(_def)) { + const [Types, keys] = (0, index_js_1.mapToTypeMap)(registry, _def); + for (let i = 0, count = keys.length; i < count; i++) { + def[keys[i]] = { Type: Types[i], index: i }; + } + isBasic = !Object.values(def).some(({ Type: Type2 }) => Type2 !== Null_js_1.Null); + isIndexed = false; + } else { + const entries = Object.entries(_def); + for (let i = 0, count = entries.length; i < count; i++) { + const [key2, index] = entries[i]; + def[key2] = { Type: Null_js_1.Null, index }; + } + isBasic = true; + isIndexed = true; + } + return { + def, + isBasic, + isIndexed + }; + } + function getEntryType2(def, checkIdx) { + const values = Object.values(def); + for (let i = 0, count = values.length; i < count; i++) { + const { Type: Type2, index } = values[i]; + if (index === checkIdx) { + return Type2; + } + } + throw new Error(`Unable to create Enum via index ${checkIdx}, in ${Object.keys(def).join(", ")}`); + } + function createFromU8a2(registry, def, index, value) { + const Type2 = getEntryType2(def, index); + return { + index, + value: new Type2(registry, value) + }; + } + function createFromValue2(registry, def, index = 0, value) { + const Type2 = getEntryType2(def, index); + return { + index, + value: value instanceof Type2 ? value : new Type2(registry, value) + }; + } + function decodeFromJSON2(registry, def, key2, value) { + const keys = Object.keys(def).map((k) => k.toLowerCase()); + const keyLower = key2.toLowerCase(); + const index = keys.indexOf(keyLower); + if (index === -1) { + throw new Error(`Cannot map Enum JSON, unable to find '${key2}' in ${keys.join(", ")}`); + } + try { + return createFromValue2(registry, def, Object.values(def)[index].index, value); + } catch (error) { + throw new Error(`Enum(${key2}):: ${error.message}`); + } + } + function decodeEnum2(registry, def, value, index) { + if ((0, util_1.isNumber)(index)) { + return createFromValue2(registry, def, index, value); + } else if ((0, util_1.isU8a)(value) || (0, util_1.isHex)(value)) { + const u8a = (0, util_1.u8aToU8a)(value); + if (u8a.length) { + return createFromU8a2(registry, def, u8a[0], u8a.subarray(1)); + } + } else if (value instanceof Enum2) { + return createFromValue2(registry, def, value.index, value.value); + } else if ((0, util_1.isNumber)(value)) { + return createFromValue2(registry, def, value); + } else if ((0, util_1.isString)(value)) { + return decodeFromJSON2(registry, def, value.toString()); + } else if ((0, util_1.isObject)(value)) { + const key2 = Object.keys(value)[0]; + return decodeFromJSON2(registry, def, key2, value[key2]); + } + return createFromValue2(registry, def, Object.values(def)[0].index); + } + var Enum2 = class { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__def; + __internal__entryIndex; + __internal__indexes; + __internal__isBasic; + __internal__isIndexed; + __internal__raw; + constructor(registry, Types, value, index, { definition, setDefinition = util_1.identity } = {}) { + const { def, isBasic, isIndexed } = definition || setDefinition(extractDef2(registry, Types)); + const decoded = (0, util_1.isU8a)(value) && value.length && !(0, util_1.isNumber)(index) ? createFromU8a2(registry, def, value[0], value.subarray(1)) : decodeEnum2(registry, def, value, index); + this.registry = registry; + this.__internal__def = def; + this.__internal__isBasic = isBasic; + this.__internal__isIndexed = isIndexed; + this.__internal__indexes = Object.values(def).map(({ index: index2 }) => index2); + this.__internal__entryIndex = this.__internal__indexes.indexOf(decoded.index); + this.__internal__raw = decoded.value; + if (this.__internal__raw.initialU8aLength) { + this.initialU8aLength = 1 + this.__internal__raw.initialU8aLength; + } + } + static with(Types) { + let definition; + const setDefinition = (d) => definition = d; + return class extends Enum2 { + static { + const keys = Array.isArray(Types) ? Types : Object.keys(Types); + const count = keys.length; + const asKeys = new Array(count); + const isKeys = new Array(count); + for (let i = 0; i < count; i++) { + const name6 = (0, util_1.stringPascalCase)(keys[i]); + asKeys[i] = `as${name6}`; + isKeys[i] = `is${name6}`; + } + (0, util_1.objectProperties)(this.prototype, isKeys, (_, i, self2) => self2.type === keys[i]); + (0, util_1.objectProperties)(this.prototype, asKeys, (k, i, self2) => { + if (self2.type !== keys[i]) { + throw new Error(`Cannot convert '${self2.type}' via ${k}`); + } + return self2.value; + }); + } + constructor(registry, value, index) { + super(registry, Types, value, index, { definition, setDefinition }); + } + }; + } + get encodedLength() { + return 1 + this.__internal__raw.encodedLength; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get index() { + return this.__internal__indexes[this.__internal__entryIndex]; + } + get inner() { + return this.__internal__raw; + } + get isBasic() { + return this.__internal__isBasic; + } + get isEmpty() { + return this.__internal__raw.isEmpty; + } + get isNone() { + return this.__internal__raw instanceof Null_js_1.Null; + } + get defIndexes() { + return this.__internal__indexes; + } + get defKeys() { + return Object.keys(this.__internal__def); + } + get type() { + return this.defKeys[this.__internal__entryIndex]; + } + get value() { + return this.__internal__raw; + } + eq(other) { + if ((0, util_1.isU8a)(other)) { + return !this.toU8a().some((entry, index) => entry !== other[index]); + } else if ((0, util_1.isNumber)(other)) { + return this.toNumber() === other; + } else if (this.__internal__isBasic && (0, util_1.isString)(other)) { + return this.type === other; + } else if ((0, util_1.isHex)(other)) { + return this.toHex() === other; + } else if (other instanceof Enum2) { + return this.index === other.index && this.value.eq(other.value); + } else if ((0, util_1.isObject)(other)) { + return this.value.eq(other[this.type]); + } + return this.value.eq(other); + } + inspect() { + if (this.__internal__isBasic) { + return { outer: [new Uint8Array([this.index])] }; + } + const { inner, outer = [] } = this.__internal__raw.inspect(); + return { + inner, + outer: [new Uint8Array([this.index]), ...outer] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman(isExtended, disableAscii) { + return this.__internal__isBasic || this.isNone ? this.type : { [this.type]: this.__internal__raw.toHuman(isExtended, disableAscii) }; + } + toJSON() { + return this.__internal__isBasic ? this.type : { [(0, util_1.stringCamelCase)(this.type)]: this.__internal__raw.toJSON() }; + } + toNumber() { + return this.index; + } + toPrimitive(disableAscii) { + return this.__internal__isBasic ? this.type : { [(0, util_1.stringCamelCase)(this.type)]: this.__internal__raw.toPrimitive(disableAscii) }; + } + _toRawStruct() { + if (this.__internal__isBasic) { + return this.__internal__isIndexed ? this.defKeys.reduce((out, key2, index) => { + out[key2] = this.__internal__indexes[index]; + return out; + }, {}) : this.defKeys; + } + const entries = Object.entries(this.__internal__def); + return (0, index_js_1.typesToMap)(this.registry, entries.reduce((out, [key2, { Type: Type2 }], i) => { + out[0][i] = Type2; + out[1][i] = key2; + return out; + }, [new Array(entries.length), new Array(entries.length)])); + } + toRawType() { + return (0, util_1.stringify)({ _enum: this._toRawStruct() }); + } + toString() { + return this.isNone ? this.type : (0, util_1.stringify)(this.toJSON()); + } + toU8a(isBare) { + return isBare ? this.__internal__raw.toU8a(isBare) : (0, util_1.u8aConcatStrict)([ + new Uint8Array([this.index]), + this.__internal__raw.toU8a(isBare) + ]); + } + }; + exports2.Enum = Enum2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Int.js + var require_Int2 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Int.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Int = void 0; + var Int_js_1 = require_Int(); + var Int2 = class extends Int_js_1.AbstractInt { + constructor(registry, value = 0, bitLength) { + super(registry, value, bitLength, true); + } + static with(bitLength, typeName) { + return class extends Int2 { + constructor(registry, value) { + super(registry, value, bitLength); + } + toRawType() { + return typeName || super.toRawType(); + } + }; + } + }; + exports2.Int = Int2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Option.js + var require_Option = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Option.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Option = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_utils5(); + var Null_js_1 = require_Null(); + var None2 = class extends Null_js_1.Null { + toRawType() { + return "None"; + } + }; + function decodeOption2(registry, Type2, value) { + if (value instanceof Type2) { + return value; + } else if (value instanceof Option2) { + if (value.value instanceof Type2) { + return value.value; + } else if (value.isNone) { + return new None2(registry); + } + return new Type2(registry, value.value); + } else if ((0, util_1.isNull)(value) || (0, util_1.isUndefined)(value) || value === "0x" || value instanceof None2) { + return new None2(registry); + } else if ((0, util_1.isU8a)(value)) { + return !value.length || value[0] === 0 ? new None2(registry) : new Type2(registry, value.subarray(1)); + } + return new Type2(registry, value); + } + var Option2 = class { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__Type; + __internal__raw; + constructor(registry, typeName, value, { definition, setDefinition = util_1.identity } = {}) { + const Type2 = definition || setDefinition((0, index_js_1.typeToConstructor)(registry, typeName)); + const decoded = (0, util_1.isU8a)(value) && value.length && !(0, util_1.isCodec)(value) ? value[0] === 0 ? new None2(registry) : new Type2(registry, value.subarray(1)) : decodeOption2(registry, Type2, value); + this.registry = registry; + this.__internal__Type = Type2; + this.__internal__raw = decoded; + if (decoded?.initialU8aLength) { + this.initialU8aLength = 1 + decoded.initialU8aLength; + } + } + static with(Type2) { + let definition; + const setDefinition = (d) => { + definition = d; + return d; + }; + return class extends Option2 { + constructor(registry, value) { + super(registry, Type2, value, { definition, setDefinition }); + } + }; + } + get encodedLength() { + return 1 + this.__internal__raw.encodedLength; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.isNone; + } + get isNone() { + return this.__internal__raw instanceof None2; + } + get isSome() { + return !this.isNone; + } + get value() { + return this.__internal__raw; + } + eq(other) { + if (other instanceof Option2) { + return this.isSome === other.isSome && this.value.eq(other.value); + } + return this.value.eq(other); + } + inspect() { + if (this.isNone) { + return { outer: [new Uint8Array([0])] }; + } + const { inner, outer = [] } = this.__internal__raw.inspect(); + return { + inner, + outer: [new Uint8Array([1]), ...outer] + }; + } + toHex() { + return this.isNone ? "0x" : (0, util_1.u8aToHex)(this.toU8a().subarray(1)); + } + toHuman(isExtended, disableAscii) { + return this.__internal__raw.toHuman(isExtended, disableAscii); + } + toJSON() { + return this.isNone ? null : this.__internal__raw.toJSON(); + } + toPrimitive(disableAscii) { + return this.isNone ? null : this.__internal__raw.toPrimitive(disableAscii); + } + toRawType(isBare) { + const wrapped = this.registry.getClassName(this.__internal__Type) || new this.__internal__Type(this.registry).toRawType(); + return isBare ? wrapped : `Option<${wrapped}>`; + } + toString() { + return this.__internal__raw.toString(); + } + toU8a(isBare) { + if (isBare) { + return this.__internal__raw.toU8a(true); + } + const u8a = new Uint8Array(this.encodedLength); + if (this.isSome) { + u8a.set([1]); + u8a.set(this.__internal__raw.toU8a(), 1); + } + return u8a; + } + unwrap() { + if (this.isNone) { + throw new Error("Option: unwrapping a None value"); + } + return this.__internal__raw; + } + unwrapOr(defaultValue) { + return this.isSome ? this.unwrap() : defaultValue; + } + unwrapOrDefault() { + return this.isSome ? this.unwrap() : new this.__internal__Type(this.registry); + } + }; + exports2.Option = Option2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Result.js + var require_Result = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Result.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Result = void 0; + var Enum_js_1 = require_Enum(); + var Result2 = class extends Enum_js_1.Enum { + constructor(registry, Ok2, Err, value) { + super(registry, { Ok: Ok2, Err }, value); + } + static with(Types) { + return class extends Result2 { + constructor(registry, value) { + super(registry, Types.Ok, Types.Err, value); + } + }; + } + get asErr() { + if (!this.isErr) { + throw new Error("Cannot extract Err value from Ok result, check isErr first"); + } + return this.value; + } + get asOk() { + if (!this.isOk) { + throw new Error("Cannot extract Ok value from Err result, check isOk first"); + } + return this.value; + } + get isEmpty() { + return this.isOk && this.value.isEmpty; + } + get isErr() { + return !this.isOk; + } + get isOk() { + return this.index === 0; + } + toRawType() { + const Types = this._toRawStruct(); + return `Result<${Types.Ok},${Types.Err}>`; + } + }; + exports2.Result = Result2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Tuple.js + var require_Tuple = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Tuple.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Tuple = void 0; + var util_1 = require_cjs3(); + var Array_js_1 = require_Array(); + var index_js_1 = require_utils5(); + function decodeTuple2(registry, result, value, Classes) { + if (Array.isArray(value)) { + const Types = Classes[0]; + for (let i = 0, count = Types.length; i < count; i++) { + try { + const entry = value?.[i]; + result[i] = entry instanceof Types[i] ? entry : new Types[i](registry, entry); + } catch (error) { + throw new Error(`Tuple: failed on ${i}:: ${error.message}`); + } + } + return [result, 0]; + } else if ((0, util_1.isHex)(value)) { + return (0, index_js_1.decodeU8a)(registry, result, (0, util_1.u8aToU8a)(value), Classes); + } else if (!value || !result.length) { + const Types = Classes[0]; + for (let i = 0, count = Types.length; i < count; i++) { + result[i] = new Types[i](registry); + } + return [result, 0]; + } + throw new Error(`Expected array input to Tuple decoding, found ${typeof value}: ${(0, util_1.stringify)(value)}`); + } + var Tuple2 = class extends Array_js_1.AbstractArray { + __internal__Types; + constructor(registry, Types, value, { definition, setDefinition = util_1.identity } = {}) { + const Classes = definition || setDefinition(Array.isArray(Types) ? [(0, index_js_1.typesToConstructors)(registry, Types), []] : (0, util_1.isFunction)(Types) || (0, util_1.isString)(Types) ? [[(0, index_js_1.typeToConstructor)(registry, Types)], []] : (0, index_js_1.mapToTypeMap)(registry, Types)); + super(registry, Classes[0].length); + this.initialU8aLength = ((0, util_1.isU8a)(value) ? (0, index_js_1.decodeU8a)(registry, this, value, Classes) : decodeTuple2(registry, this, value, Classes))[1]; + this.__internal__Types = Classes; + } + static with(Types) { + let definition; + const setDefinition = (d) => definition = d; + return class extends Tuple2 { + constructor(registry, value) { + super(registry, Types, value, { definition, setDefinition }); + } + }; + } + get encodedLength() { + let total = 0; + for (let i = 0, count = this.length; i < count; i++) { + total += this[i].encodedLength; + } + return total; + } + get Types() { + return this.__internal__Types[1].length ? this.__internal__Types[1] : this.__internal__Types[0].map((T) => new T(this.registry).toRawType()); + } + inspect() { + return { + inner: this.inspectInner() + }; + } + toRawType() { + const types2 = this.__internal__Types[0].map((T) => this.registry.getClassName(T) || new T(this.registry).toRawType()); + return `(${types2.join(",")})`; + } + toString() { + return (0, util_1.stringify)(this.toJSON()); + } + toU8a(isBare) { + return (0, util_1.u8aConcatStrict)(this.toU8aInner(isBare)); + } + }; + exports2.Tuple = Tuple2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/UInt.js + var require_UInt = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/UInt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UInt = void 0; + var Int_js_1 = require_Int(); + var UInt2 = class extends Int_js_1.AbstractInt { + static with(bitLength, typeName) { + return class extends UInt2 { + constructor(registry, value) { + super(registry, value, bitLength); + } + toRawType() { + return typeName || super.toRawType(); + } + }; + } + }; + exports2.UInt = UInt2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/Vec.js + var require_Vec = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/Vec.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Vec = exports2.decodeVec = void 0; + var util_1 = require_cjs3(); + var Array_js_1 = require_Array(); + var index_js_1 = require_utils5(); + var MAX_LENGTH4 = 64 * 1024; + var l15 = (0, util_1.logger)("Vec"); + function decodeVecLength2(value) { + if (Array.isArray(value)) { + return [value, value.length, 0]; + } else if ((0, util_1.isU8a)(value) || (0, util_1.isHex)(value)) { + const u8a = (0, util_1.u8aToU8a)(value); + const [startAt, length] = (0, util_1.compactFromU8aLim)(u8a); + if (length > MAX_LENGTH4) { + throw new Error(`Vec length ${length.toString()} exceeds ${MAX_LENGTH4}`); + } + return [u8a, length, startAt]; + } else if (!value) { + return [null, 0, 0]; + } + throw new Error(`Expected array/hex input to Vec<*> decoding, found ${typeof value}: ${(0, util_1.stringify)(value)}`); + } + function decodeVec2(registry, result, value, startAt, Type2) { + if (Array.isArray(value)) { + const count = result.length; + for (let i = 0; i < count; i++) { + const entry = value[i]; + try { + result[i] = entry instanceof Type2 ? entry : new Type2(registry, entry); + } catch (error) { + l15.error(`Unable to decode on index ${i}`, error.message); + throw error; + } + } + return [0, 0]; + } else if (!value) { + return [0, 0]; + } + return (0, index_js_1.decodeU8aVec)(registry, result, (0, util_1.u8aToU8a)(value), startAt, Type2); + } + exports2.decodeVec = decodeVec2; + var Vec2 = class extends Array_js_1.AbstractArray { + __internal__Type; + constructor(registry, Type2, value = [], { definition, setDefinition = util_1.identity } = {}) { + const [decodeFrom, length, startAt] = decodeVecLength2(value); + super(registry, length); + this.__internal__Type = definition || setDefinition((0, index_js_1.typeToConstructor)(registry, Type2)); + this.initialU8aLength = ((0, util_1.isU8a)(decodeFrom) ? (0, index_js_1.decodeU8aVec)(registry, this, decodeFrom, startAt, this.__internal__Type) : decodeVec2(registry, this, decodeFrom, startAt, this.__internal__Type))[0]; + } + static with(Type2) { + let definition; + const setDefinition = (d) => definition = d; + return class extends Vec2 { + constructor(registry, value) { + super(registry, Type2, value, { definition, setDefinition }); + } + }; + } + get Type() { + return this.__internal__Type.name; + } + indexOf(other) { + const check = other instanceof this.__internal__Type ? other : new this.__internal__Type(this.registry, other); + for (let i = 0, count = this.length; i < count; i++) { + if (check.eq(this[i])) { + return i; + } + } + return -1; + } + toRawType() { + return `Vec<${this.registry.getClassName(this.__internal__Type) || new this.__internal__Type(this.registry).toRawType()}>`; + } + }; + exports2.Vec = Vec2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/VecAny.js + var require_VecAny = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/VecAny.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VecAny = void 0; + var Array_js_1 = require_Array(); + var VecAny = class extends Array_js_1.AbstractArray { + toRawType() { + return "Vec"; + } + }; + exports2.VecAny = VecAny; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/VecFixed.js + var require_VecFixed = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/VecFixed.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VecFixed = void 0; + var util_1 = require_cjs3(); + var Array_js_1 = require_Array(); + var index_js_1 = require_utils5(); + var Vec_js_1 = require_Vec(); + var VecFixed2 = class extends Array_js_1.AbstractArray { + __internal__Type; + constructor(registry, Type2, length, value = [], { definition, setDefinition = util_1.identity } = {}) { + super(registry, length); + this.__internal__Type = definition || setDefinition((0, index_js_1.typeToConstructor)(registry, Type2)); + this.initialU8aLength = ((0, util_1.isU8a)(value) ? (0, index_js_1.decodeU8aVec)(registry, this, value, 0, this.__internal__Type) : (0, Vec_js_1.decodeVec)(registry, this, value, 0, this.__internal__Type))[1]; + } + static with(Type2, length) { + let definition; + const setDefinition = (d) => definition = d; + return class extends VecFixed2 { + constructor(registry, value) { + super(registry, Type2, length, value, { definition, setDefinition }); + } + }; + } + get Type() { + return new this.__internal__Type(this.registry).toRawType(); + } + get encodedLength() { + let total = 0; + for (let i = 0, count = this.length; i < count; i++) { + total += this[i].encodedLength; + } + return total; + } + inspect() { + return { + inner: this.inspectInner() + }; + } + toU8a() { + const encoded = this.toU8aInner(); + return encoded.length ? (0, util_1.u8aConcatStrict)(encoded) : new Uint8Array([]); + } + toRawType() { + return `[${this.Type};${this.length}]`; + } + }; + exports2.VecFixed = VecFixed2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/base/index.js + var require_base = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/base/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VecFixed = exports2.VecAny = exports2.Vec = exports2.UInt = exports2.Tuple = exports2.Result = exports2.Option = exports2.Null = exports2.Int = exports2.Enum = exports2.DoNotConstruct = exports2.Compact = void 0; + var Compact_js_1 = require_Compact(); + Object.defineProperty(exports2, "Compact", { enumerable: true, get: function() { + return Compact_js_1.Compact; + } }); + var DoNotConstruct_js_1 = require_DoNotConstruct(); + Object.defineProperty(exports2, "DoNotConstruct", { enumerable: true, get: function() { + return DoNotConstruct_js_1.DoNotConstruct; + } }); + var Enum_js_1 = require_Enum(); + Object.defineProperty(exports2, "Enum", { enumerable: true, get: function() { + return Enum_js_1.Enum; + } }); + var Int_js_1 = require_Int2(); + Object.defineProperty(exports2, "Int", { enumerable: true, get: function() { + return Int_js_1.Int; + } }); + var Null_js_1 = require_Null(); + Object.defineProperty(exports2, "Null", { enumerable: true, get: function() { + return Null_js_1.Null; + } }); + var Option_js_1 = require_Option(); + Object.defineProperty(exports2, "Option", { enumerable: true, get: function() { + return Option_js_1.Option; + } }); + var Result_js_1 = require_Result(); + Object.defineProperty(exports2, "Result", { enumerable: true, get: function() { + return Result_js_1.Result; + } }); + var Tuple_js_1 = require_Tuple(); + Object.defineProperty(exports2, "Tuple", { enumerable: true, get: function() { + return Tuple_js_1.Tuple; + } }); + var UInt_js_1 = require_UInt(); + Object.defineProperty(exports2, "UInt", { enumerable: true, get: function() { + return UInt_js_1.UInt; + } }); + var Vec_js_1 = require_Vec(); + Object.defineProperty(exports2, "Vec", { enumerable: true, get: function() { + return Vec_js_1.Vec; + } }); + var VecAny_js_1 = require_VecAny(); + Object.defineProperty(exports2, "VecAny", { enumerable: true, get: function() { + return VecAny_js_1.VecAny; + } }); + var VecFixed_js_1 = require_VecFixed(); + Object.defineProperty(exports2, "VecFixed", { enumerable: true, get: function() { + return VecFixed_js_1.VecFixed; + } }); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Raw.js + var require_Raw = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Raw.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Raw = void 0; + var util_1 = require_cjs3(); + var Raw2 = class extends Uint8Array { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + static get [Symbol.species]() { + return Uint8Array; + } + constructor(registry, value, initialU8aLength) { + super((0, util_1.u8aToU8a)(value)); + this.registry = registry; + this.initialU8aLength = initialU8aLength; + } + get encodedLength() { + return this.length; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isAscii() { + return (0, util_1.isAscii)(this); + } + get isEmpty() { + return !this.length || (0, util_1.isUndefined)(this.find((b) => !!b)); + } + get isUtf8() { + return (0, util_1.isUtf8)(this); + } + bitLength() { + return this.length * 8; + } + eq(other) { + if (other instanceof Uint8Array) { + return this.length === other.length && !this.some((b, index) => b !== other[index]); + } + return this.eq((0, util_1.u8aToU8a)(other)); + } + inspect() { + return { + outer: [this.toU8a()] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this); + } + toHuman(_isExtended, disableAscii) { + return this.toPrimitive(disableAscii); + } + toJSON() { + return this.toHex(); + } + toPrimitive(disableAscii) { + if (!disableAscii && this.isAscii) { + const text2 = this.toUtf8(); + if ((0, util_1.isAscii)(text2)) { + return text2; + } + } + return this.toJSON(); + } + toRawType() { + return "Raw"; + } + toString() { + return this.toHex(); + } + toU8a(_isBare) { + return Uint8Array.from(this); + } + toUtf8() { + if (!this.isUtf8) { + throw new Error("The character sequence is not a valid Utf8 string"); + } + return (0, util_1.u8aToString)(this); + } + }; + exports2.Raw = Raw2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/BitVec.js + var require_BitVec = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/BitVec.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BitVec = void 0; + var util_1 = require_cjs3(); + var Raw_js_1 = require_Raw(); + function decodeBitVecU8a2(value) { + if (!value?.length) { + return [0, new Uint8Array()]; + } + const [offset, length] = (0, util_1.compactFromU8aLim)(value); + const total = offset + Math.ceil(length / 8); + if (total > value.length) { + throw new Error(`BitVec: required length less than remainder, expected at least ${total}, found ${value.length}`); + } + return [length, value.subarray(offset, total)]; + } + function decodeBitVec2(value) { + if (Array.isArray(value) || (0, util_1.isString)(value)) { + const u8a = (0, util_1.u8aToU8a)(value); + return [u8a.length / 8, u8a]; + } + return decodeBitVecU8a2(value); + } + var BitVec2 = class extends Raw_js_1.Raw { + __internal__decodedLength; + __internal__isMsb; + constructor(registry, value, isMsb = false) { + const [decodedLength, u8a] = decodeBitVec2(value); + super(registry, u8a); + this.__internal__decodedLength = decodedLength; + this.__internal__isMsb = isMsb; + } + get encodedLength() { + return this.length + (0, util_1.compactToU8a)(this.__internal__decodedLength).length; + } + inspect() { + return { + outer: [(0, util_1.compactToU8a)(this.__internal__decodedLength), super.toU8a()] + }; + } + toBoolArray() { + const map2 = [...this.toU8a(true)].map((v) => [ + !!(v & 128), + !!(v & 64), + !!(v & 32), + !!(v & 16), + !!(v & 8), + !!(v & 4), + !!(v & 2), + !!(v & 1) + ]); + const count = map2.length; + const result = new Array(8 * count); + for (let i = 0; i < count; i++) { + const off = i * 8; + const v = map2[i]; + for (let j10 = 0; j10 < 8; j10++) { + result[off + j10] = this.__internal__isMsb ? v[j10] : v[7 - j10]; + } + } + return result; + } + toHuman() { + return `0b${[...this.toU8a(true)].map((d) => `00000000${d.toString(2)}`.slice(-8)).map((s) => this.__internal__isMsb ? s : s.split("").reverse().join("")).join("_")}`; + } + toRawType() { + return "BitVec"; + } + toU8a(isBare) { + const bitVec = super.toU8a(isBare); + return isBare ? bitVec : (0, util_1.u8aConcatStrict)([(0, util_1.compactToU8a)(this.__internal__decodedLength), bitVec]); + } + }; + exports2.BitVec = BitVec2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Struct.js + var require_Struct = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Struct.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Struct = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_utils5(); + function noopSetDefinition2(d) { + return d; + } + function decodeStructFromObject2(registry, [Types, keys], value, jsonMap) { + let jsonObj; + const typeofArray = Array.isArray(value); + const typeofMap = value instanceof Map; + const count = keys.length; + if (!typeofArray && !typeofMap && !(0, util_1.isObject)(value)) { + throw new Error(`Struct: Cannot decode value ${(0, util_1.stringify)(value)} (typeof ${typeof value}), expected an input object, map or array`); + } else if (typeofArray && value.length !== count) { + throw new Error(`Struct: Unable to map ${(0, util_1.stringify)(value)} array to object with known keys ${keys.join(", ")}`); + } + const raw = new Array(count); + for (let i = 0; i < count; i++) { + const key2 = keys[i]; + const jsonKey = jsonMap.get(key2) || key2; + const Type2 = Types[i]; + let assign; + try { + if (typeofArray) { + assign = value[i]; + } else if (typeofMap) { + assign = jsonKey && value.get(jsonKey); + } else { + assign = jsonKey && value[jsonKey]; + if ((0, util_1.isUndefined)(assign)) { + if ((0, util_1.isUndefined)(jsonObj)) { + const entries = Object.entries(value); + jsonObj = {}; + for (let e = 0, ecount = entries.length; e < ecount; e++) { + jsonObj[(0, util_1.stringCamelCase)(entries[e][0])] = entries[e][1]; + } + } + assign = jsonKey && jsonObj[jsonKey]; + } + } + raw[i] = [ + key2, + assign instanceof Type2 ? assign : new Type2(registry, assign) + ]; + } catch (error) { + let type = Type2.name; + try { + type = new Type2(registry).toRawType(); + } catch { + } + throw new Error(`Struct: failed on ${jsonKey}: ${type}:: ${error.message}`); + } + } + return [raw, 0]; + } + var Struct2 = class extends Map { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__jsonMap; + __internal__Types; + constructor(registry, Types, value, jsonMap = /* @__PURE__ */ new Map(), { definition, setDefinition = noopSetDefinition2 } = {}) { + const typeMap = definition || setDefinition((0, index_js_1.mapToTypeMap)(registry, Types)); + const [decoded, decodedLength] = (0, util_1.isU8a)(value) || (0, util_1.isHex)(value) ? (0, index_js_1.decodeU8aStruct)(registry, new Array(typeMap[0].length), (0, util_1.u8aToU8a)(value), typeMap) : value instanceof Struct2 ? [value, 0] : decodeStructFromObject2(registry, typeMap, value || {}, jsonMap); + super(decoded); + this.initialU8aLength = decodedLength; + this.registry = registry; + this.__internal__jsonMap = jsonMap; + this.__internal__Types = typeMap; + } + static with(Types, jsonMap) { + let definition; + const setDefinition = (d) => definition = d; + return class extends Struct2 { + static { + const keys = Object.keys(Types); + (0, util_1.objectProperties)(this.prototype, keys, (k, _, self2) => self2.get(k)); + } + constructor(registry, value) { + super(registry, Types, value, jsonMap, { definition, setDefinition }); + } + }; + } + get defKeys() { + return this.__internal__Types[1]; + } + get isEmpty() { + for (const v of this.values()) { + if (!v.isEmpty) { + return false; + } + } + return true; + } + get encodedLength() { + let total = 0; + for (const v of this.values()) { + total += v.encodedLength; + } + return total; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get Type() { + const result = {}; + const [Types, keys] = this.__internal__Types; + for (let i = 0, count = keys.length; i < count; i++) { + result[keys[i]] = new Types[i](this.registry).toRawType(); + } + return result; + } + eq(other) { + return (0, index_js_1.compareMap)(this, other); + } + get(key2) { + return super.get(key2); + } + getAtIndex(index) { + return this.toArray()[index]; + } + getT(key2) { + return super.get(key2); + } + inspect(isBare) { + const inner = []; + for (const [k, v] of this.entries()) { + inner.push({ + ...v.inspect(!isBare || (0, util_1.isBoolean)(isBare) ? isBare : isBare[k]), + name: (0, util_1.stringCamelCase)(k) + }); + } + return { + inner + }; + } + toArray() { + return [...this.values()]; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman(isExtended, disableAscii) { + const json = {}; + for (const [k, v] of this.entries()) { + json[k] = v.toHuman(isExtended, disableAscii); + } + return json; + } + toJSON() { + const json = {}; + for (const [k, v] of this.entries()) { + json[this.__internal__jsonMap.get(k) || k] = v.toJSON(); + } + return json; + } + toPrimitive(disableAscii) { + const json = {}; + for (const [k, v] of this.entries()) { + json[k] = v.toPrimitive(disableAscii); + } + return json; + } + toRawType() { + return (0, util_1.stringify)((0, index_js_1.typesToMap)(this.registry, this.__internal__Types)); + } + toString() { + return (0, util_1.stringify)(this.toJSON()); + } + toU8a(isBare) { + const encoded = []; + for (const [k, v] of this.entries()) { + encoded.push(v.toU8a(!isBare || (0, util_1.isBoolean)(isBare) ? isBare : isBare[k])); + } + return (0, util_1.u8aConcatStrict)(encoded); + } + }; + exports2.Struct = Struct2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/Map.js + var require_Map = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/Map.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodecMap = void 0; + var util_1 = require_cjs3(); + var Array_js_1 = require_Array(); + var Enum_js_1 = require_Enum(); + var Raw_js_1 = require_Raw(); + var Struct_js_1 = require_Struct(); + var index_js_1 = require_utils5(); + var l15 = (0, util_1.logger)("Map"); + function decodeMapFromU8a2(registry, KeyClass, ValClass, u8a) { + const output4 = /* @__PURE__ */ new Map(); + const [offset, count] = (0, util_1.compactFromU8aLim)(u8a); + const types2 = []; + for (let i = 0; i < count; i++) { + types2.push(KeyClass, ValClass); + } + const [values, decodedLength] = (0, index_js_1.decodeU8a)(registry, new Array(types2.length), u8a.subarray(offset), [types2, []]); + for (let i = 0, count2 = values.length; i < count2; i += 2) { + output4.set(values[i], values[i + 1]); + } + return [KeyClass, ValClass, output4, offset + decodedLength]; + } + function decodeMapFromMap2(registry, KeyClass, ValClass, value) { + const output4 = /* @__PURE__ */ new Map(); + for (const [key2, val] of value.entries()) { + const isComplex = KeyClass.prototype instanceof Array_js_1.AbstractArray || KeyClass.prototype instanceof Struct_js_1.Struct || KeyClass.prototype instanceof Enum_js_1.Enum; + try { + output4.set(key2 instanceof KeyClass ? key2 : new KeyClass(registry, isComplex && typeof key2 === "string" ? JSON.parse(key2) : key2), val instanceof ValClass ? val : new ValClass(registry, val)); + } catch (error) { + l15.error("Failed to decode key or value:", error.message); + throw error; + } + } + return [KeyClass, ValClass, output4, 0]; + } + function decodeMap2(registry, keyType, valType, value) { + const KeyClass = (0, index_js_1.typeToConstructor)(registry, keyType); + const ValClass = (0, index_js_1.typeToConstructor)(registry, valType); + if (!value) { + return [KeyClass, ValClass, /* @__PURE__ */ new Map(), 0]; + } else if ((0, util_1.isU8a)(value) || (0, util_1.isHex)(value)) { + return decodeMapFromU8a2(registry, KeyClass, ValClass, (0, util_1.u8aToU8a)(value)); + } else if (value instanceof Map) { + return decodeMapFromMap2(registry, KeyClass, ValClass, value); + } else if ((0, util_1.isObject)(value)) { + return decodeMapFromMap2(registry, KeyClass, ValClass, new Map(Object.entries(value))); + } + throw new Error("Map: cannot decode type"); + } + var CodecMap2 = class extends Map { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__KeyClass; + __internal__ValClass; + __internal__type; + constructor(registry, keyType, valType, rawValue, type = "HashMap") { + const [KeyClass, ValClass, decoded, decodedLength] = decodeMap2(registry, keyType, valType, rawValue); + super(type === "BTreeMap" ? (0, index_js_1.sortMap)(decoded) : decoded); + this.registry = registry; + this.initialU8aLength = decodedLength; + this.__internal__KeyClass = KeyClass; + this.__internal__ValClass = ValClass; + this.__internal__type = type; + } + get encodedLength() { + let len = (0, util_1.compactToU8a)(this.size).length; + for (const [k, v] of this.entries()) { + len += k.encodedLength + v.encodedLength; + } + return len; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.size === 0; + } + eq(other) { + return (0, index_js_1.compareMap)(this, other); + } + inspect() { + const inner = []; + for (const [k, v] of this.entries()) { + inner.push(k.inspect()); + inner.push(v.inspect()); + } + return { + inner, + outer: [(0, util_1.compactToU8a)(this.size)] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman(isExtended, disableAscii) { + const json = {}; + for (const [k, v] of this.entries()) { + json[k instanceof Raw_js_1.Raw && !disableAscii && k.isAscii ? k.toUtf8() : k.toString()] = v.toHuman(isExtended, disableAscii); + } + return json; + } + toJSON() { + const json = {}; + for (const [k, v] of this.entries()) { + json[k.toString()] = v.toJSON(); + } + return json; + } + toPrimitive(disableAscii) { + const json = {}; + for (const [k, v] of this.entries()) { + json[k instanceof Raw_js_1.Raw && !disableAscii && k.isAscii ? k.toUtf8() : k.toString()] = v.toPrimitive(disableAscii); + } + return json; + } + toRawType() { + return `${this.__internal__type}<${this.registry.getClassName(this.__internal__KeyClass) || new this.__internal__KeyClass(this.registry).toRawType()},${this.registry.getClassName(this.__internal__ValClass) || new this.__internal__ValClass(this.registry).toRawType()}>`; + } + toString() { + return (0, util_1.stringify)(this.toJSON()); + } + toU8a(isBare) { + const encoded = []; + if (!isBare) { + encoded.push((0, util_1.compactToU8a)(this.size)); + } + for (const [k, v] of this.entries()) { + encoded.push(k.toU8a(isBare), v.toU8a(isBare)); + } + return (0, util_1.u8aConcatStrict)(encoded); + } + }; + exports2.CodecMap = CodecMap2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/BTreeMap.js + var require_BTreeMap = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/BTreeMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BTreeMap = void 0; + var Map_js_1 = require_Map(); + var BTreeMap2 = class extends Map_js_1.CodecMap { + static with(keyType, valType) { + return class extends BTreeMap2 { + constructor(registry, value) { + super(registry, keyType, valType, value, "BTreeMap"); + } + }; + } + }; + exports2.BTreeMap = BTreeMap2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/BTreeSet.js + var require_BTreeSet = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/BTreeSet.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BTreeSet = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_utils5(); + var l15 = (0, util_1.logger)("BTreeSet"); + function decodeSetFromU8a2(registry, ValClass, u8a) { + const output4 = /* @__PURE__ */ new Set(); + const [offset, count] = (0, util_1.compactFromU8aLim)(u8a); + const result = new Array(count); + const [decodedLength] = (0, index_js_1.decodeU8aVec)(registry, result, u8a, offset, ValClass); + for (let i = 0; i < count; i++) { + output4.add(result[i]); + } + return [ValClass, output4, decodedLength]; + } + function decodeSetFromSet2(registry, ValClass, value) { + const output4 = /* @__PURE__ */ new Set(); + value.forEach((val) => { + try { + output4.add(val instanceof ValClass ? val : new ValClass(registry, val)); + } catch (error) { + l15.error("Failed to decode key or value:", error.message); + throw error; + } + }); + return [ValClass, output4, 0]; + } + function decodeSet3(registry, valType, value) { + const ValClass = (0, index_js_1.typeToConstructor)(registry, valType); + if (!value) { + return [ValClass, /* @__PURE__ */ new Set(), 0]; + } else if ((0, util_1.isU8a)(value) || (0, util_1.isHex)(value)) { + return decodeSetFromU8a2(registry, ValClass, (0, util_1.u8aToU8a)(value)); + } else if (Array.isArray(value) || value instanceof Set) { + return decodeSetFromSet2(registry, ValClass, value); + } + throw new Error("BTreeSet: cannot decode type"); + } + var BTreeSet2 = class extends Set { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__ValClass; + constructor(registry, valType, rawValue) { + const [ValClass, values, decodedLength] = decodeSet3(registry, valType, rawValue); + super((0, index_js_1.sortSet)(values)); + this.registry = registry; + this.initialU8aLength = decodedLength; + this.__internal__ValClass = ValClass; + } + static with(valType) { + return class extends BTreeSet2 { + constructor(registry, value) { + super(registry, valType, value); + } + }; + } + get encodedLength() { + let len = (0, util_1.compactToU8a)(this.size).length; + for (const v of this.values()) { + len += v.encodedLength; + } + return len; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.size === 0; + } + get strings() { + return [...super.values()].map((v) => v.toString()); + } + eq(other) { + return (0, index_js_1.compareSet)(this, other); + } + inspect() { + const inner = []; + for (const v of this.values()) { + inner.push(v.inspect()); + } + return { + inner, + outer: [(0, util_1.compactToU8a)(this.size)] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman(isExtended, disableAscii) { + const json = []; + for (const v of this.values()) { + json.push(v.toHuman(isExtended, disableAscii)); + } + return json; + } + toJSON() { + const json = []; + for (const v of this.values()) { + json.push(v.toJSON()); + } + return json; + } + toRawType() { + return `BTreeSet<${this.registry.getClassName(this.__internal__ValClass) || new this.__internal__ValClass(this.registry).toRawType()}>`; + } + toPrimitive(disableAscii) { + const json = []; + for (const v of this.values()) { + json.push(v.toPrimitive(disableAscii)); + } + return json; + } + toString() { + return (0, util_1.stringify)(this.toJSON()); + } + toU8a(isBare) { + const encoded = []; + if (!isBare) { + encoded.push((0, util_1.compactToU8a)(this.size)); + } + for (const v of this.values()) { + encoded.push(v.toU8a(isBare)); + } + return (0, util_1.u8aConcatStrict)(encoded); + } + }; + exports2.BTreeSet = BTreeSet2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/Bytes.js + var require_Bytes = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/Bytes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Bytes = void 0; + var util_1 = require_cjs3(); + var Raw_js_1 = require_Raw(); + var MAX_LENGTH4 = 10 * 1024 * 1024; + function decodeBytesU8a2(value) { + if (!value.length) { + return [new Uint8Array(), 0]; + } + const [offset, length] = (0, util_1.compactFromU8aLim)(value); + const total = offset + length; + if (length > MAX_LENGTH4) { + throw new Error(`Bytes length ${length.toString()} exceeds ${MAX_LENGTH4}`); + } else if (total > value.length) { + throw new Error(`Bytes: required length less than remainder, expected at least ${total}, found ${value.length}`); + } + return [value.subarray(offset, total), total]; + } + var Bytes2 = class extends Raw_js_1.Raw { + constructor(registry, value) { + const [u8a, decodedLength] = (0, util_1.isU8a)(value) && !(value instanceof Raw_js_1.Raw) ? decodeBytesU8a2(value) : Array.isArray(value) || (0, util_1.isString)(value) ? [(0, util_1.u8aToU8a)(value), 0] : [value, 0]; + super(registry, u8a, decodedLength); + } + get encodedLength() { + return this.length + (0, util_1.compactToU8a)(this.length).length; + } + inspect(isBare) { + const clength = (0, util_1.compactToU8a)(this.length); + return { + outer: isBare ? [super.toU8a()] : this.length ? [clength, super.toU8a()] : [clength] + }; + } + toRawType() { + return "Bytes"; + } + toU8a(isBare) { + return isBare ? super.toU8a(isBare) : (0, util_1.compactAddLength)(this); + } + }; + exports2.Bytes = Bytes2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/HashMap.js + var require_HashMap = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/HashMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HashMap = void 0; + var Map_js_1 = require_Map(); + var HashMap2 = class extends Map_js_1.CodecMap { + static with(keyType, valType) { + return class extends HashMap2 { + constructor(registry, value) { + super(registry, keyType, valType, value); + } + }; + } + }; + exports2.HashMap = HashMap2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/Linkage.js + var require_Linkage = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/Linkage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LinkageResult = exports2.Linkage = void 0; + var Option_js_1 = require_Option(); + var Tuple_js_1 = require_Tuple(); + var Vec_js_1 = require_Vec(); + var Struct_js_1 = require_Struct(); + var EMPTY2 = new Uint8Array(); + var Linkage = class extends Struct_js_1.Struct { + constructor(registry, Type2, value) { + super(registry, { + previous: Option_js_1.Option.with(Type2), + next: Option_js_1.Option.with(Type2) + }, value); + } + static withKey(Type2) { + return class extends Linkage { + constructor(registry, value) { + super(registry, Type2, value); + } + }; + } + get previous() { + return this.get("previous"); + } + get next() { + return this.get("next"); + } + toRawType() { + return `Linkage<${this.next.toRawType(true)}>`; + } + toU8a(isBare) { + return this.isEmpty ? EMPTY2 : super.toU8a(isBare); + } + }; + exports2.Linkage = Linkage; + var LinkageResult = class extends Tuple_js_1.Tuple { + constructor(registry, [TypeKey, keys], [TypeValue, values]) { + super(registry, { + Keys: Vec_js_1.Vec.with(TypeKey), + Values: Vec_js_1.Vec.with(TypeValue) + }, [keys, values]); + } + }; + exports2.LinkageResult = LinkageResult; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Bool.js + var require_Bool = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Bool.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bool = void 0; + var util_1 = require_cjs3(); + var bool3 = class extends Boolean { + registry; + createdAtHash; + initialU8aLength = 1; + isStorageFallback; + constructor(registry, value = false) { + super((0, util_1.isU8a)(value) ? value[0] === 1 : value instanceof Boolean ? value.valueOf() : !!value); + this.registry = registry; + } + get encodedLength() { + return 1 | 0; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.isFalse; + } + get isFalse() { + return !this.isTrue; + } + get isTrue() { + return this.valueOf(); + } + eq(other) { + return this.valueOf() === (other instanceof Boolean ? other.valueOf() : other); + } + inspect() { + return { + outer: [this.toU8a()] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman() { + return this.toJSON(); + } + toJSON() { + return this.valueOf(); + } + toPrimitive() { + return this.toJSON(); + } + toRawType() { + return "bool"; + } + toString() { + return this.toJSON().toString(); + } + toU8a(_isBare) { + return new Uint8Array([this.valueOf() ? 1 : 0]); + } + }; + exports2.bool = bool3; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/OptionBool.js + var require_OptionBool = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/OptionBool.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OptionBool = void 0; + var util_1 = require_cjs3(); + var Option_js_1 = require_Option(); + var Bool_js_1 = require_Bool(); + function decodeU8a8(registry, value) { + return value[0] === 0 ? null : new Bool_js_1.bool(registry, value[0] === 1); + } + var OptionBool2 = class extends Option_js_1.Option { + constructor(registry, value) { + super(registry, Bool_js_1.bool, (0, util_1.isU8a)(value) || (0, util_1.isHex)(value) ? decodeU8a8(registry, (0, util_1.u8aToU8a)(value)) : value); + this.initialU8aLength = 1; + } + get encodedLength() { + return 1 | 0; + } + get isFalse() { + return this.isSome ? !this.value.valueOf() : false; + } + get isTrue() { + return this.isSome ? this.value.valueOf() : false; + } + inspect() { + return { outer: [this.toU8a()] }; + } + toRawType(isBare) { + return isBare ? "bool" : "Option"; + } + toU8a(isBare) { + if (isBare) { + return super.toU8a(true); + } + return this.isSome ? new Uint8Array([this.isTrue ? 1 : 2]) : new Uint8Array([0]); + } + }; + exports2.OptionBool = OptionBool2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/Range.js + var require_Range = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Range = void 0; + var Tuple_js_1 = require_Tuple(); + var Range2 = class extends Tuple_js_1.Tuple { + __internal__rangeName; + constructor(registry, Type2, value, { rangeName = "Range" } = {}) { + super(registry, [Type2, Type2], value); + this.__internal__rangeName = rangeName; + } + static with(Type2) { + return class extends Range2 { + constructor(registry, value) { + super(registry, Type2, value); + } + }; + } + get start() { + return this[0]; + } + get end() { + return this[1]; + } + toRawType() { + return `${this.__internal__rangeName}<${this.start.toRawType()}>`; + } + }; + exports2.Range = Range2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/RangeInclusive.js + var require_RangeInclusive = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/RangeInclusive.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RangeInclusive = void 0; + var Range_js_1 = require_Range(); + var RangeInclusive2 = class extends Range_js_1.Range { + constructor(registry, Type2, value) { + super(registry, Type2, value, { rangeName: "RangeInclusive" }); + } + static with(Type2) { + return class extends RangeInclusive2 { + constructor(registry, value) { + super(registry, Type2, value); + } + }; + } + }; + exports2.RangeInclusive = RangeInclusive2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Text.js + var require_Text = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Text.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Text = void 0; + var util_1 = require_cjs3(); + var Raw_js_1 = require_Raw(); + var MAX_LENGTH4 = 128 * 1024; + function decodeText2(value) { + if ((0, util_1.isU8a)(value)) { + if (!value.length) { + return ["", 0]; + } + if (value instanceof Raw_js_1.Raw) { + return [(0, util_1.u8aToString)(value), 0]; + } + const [offset, length] = (0, util_1.compactFromU8aLim)(value); + const total = offset + length; + if (length > MAX_LENGTH4) { + throw new Error(`Text: length ${length.toString()} exceeds ${MAX_LENGTH4}`); + } else if (total > value.length) { + throw new Error(`Text: required length less than remainder, expected at least ${total}, found ${value.length}`); + } + return [(0, util_1.u8aToString)(value.subarray(offset, total)), total]; + } else if ((0, util_1.isHex)(value)) { + return [(0, util_1.u8aToString)((0, util_1.hexToU8a)(value)), 0]; + } + return [value ? value.toString() : "", 0]; + } + var Text2 = class extends String { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__override = null; + constructor(registry, value) { + const [str2, decodedLength] = decodeText2(value); + super(str2); + this.registry = registry; + this.initialU8aLength = decodedLength; + } + get encodedLength() { + return this.toU8a().length; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.length === 0; + } + get length() { + return super.length; + } + eq(other) { + return (0, util_1.isString)(other) ? this.toString() === other.toString() : false; + } + inspect() { + const value = (0, util_1.stringToU8a)(super.toString()); + return { + outer: value.length ? [(0, util_1.compactToU8a)(value.length), value] : [(0, util_1.compactToU8a)(value.length)] + }; + } + setOverride(override) { + this.__internal__override = override; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a(true)); + } + toHuman() { + return this.toJSON(); + } + toJSON() { + return this.toString(); + } + toPrimitive() { + return this.toJSON(); + } + toRawType() { + return "Text"; + } + toString() { + return this.__internal__override || super.toString(); + } + toU8a(isBare) { + const encoded = (0, util_1.stringToU8a)(super.toString()); + return isBare ? encoded : (0, util_1.compactAddLength)(encoded); + } + }; + exports2.Text = Text2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/Type.js + var require_Type = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/Type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Type = void 0; + var Text_js_1 = require_Text(); + var index_js_1 = require_utils5(); + var Type2 = class extends Text_js_1.Text { + constructor(registry, value = "") { + super(registry, value); + this.setOverride((0, index_js_1.sanitize)(this.toString())); + } + toRawType() { + return "Type"; + } + }; + exports2.Type = Type2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/U8aFixed.js + var require_U8aFixed = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/U8aFixed.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.U8aFixed = void 0; + var util_1 = require_cjs3(); + var Raw_js_1 = require_Raw(); + function decodeU8aFixed2(value, bitLength) { + const u8a = (0, util_1.u8aToU8a)(value); + const byteLength = bitLength / 8; + if (!u8a.length) { + return [new Uint8Array(byteLength), 0]; + } + if ((0, util_1.isU8a)(value) ? u8a.length < byteLength : u8a.length !== byteLength) { + throw new Error(`Expected input with ${byteLength} bytes (${bitLength} bits), found ${u8a.length} bytes`); + } + return [u8a.subarray(0, byteLength), byteLength]; + } + var U8aFixed2 = class extends Raw_js_1.Raw { + constructor(registry, value = new Uint8Array(), bitLength = 256) { + const [u8a, decodedLength] = decodeU8aFixed2(value, bitLength); + super(registry, u8a, decodedLength); + } + static with(bitLength, typeName) { + return class extends U8aFixed2 { + constructor(registry, value) { + super(registry, value, bitLength); + } + toRawType() { + return typeName || super.toRawType(); + } + }; + } + toRawType() { + return `[u8;${this.length}]`; + } + }; + exports2.U8aFixed = U8aFixed2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/WrapperKeepOpaque.js + var require_WrapperKeepOpaque = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/WrapperKeepOpaque.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WrapperKeepOpaque = void 0; + var util_1 = require_cjs3(); + var Raw_js_1 = require_Raw(); + var index_js_1 = require_utils5(); + var Bytes_js_1 = require_Bytes(); + function decodeRaw2(registry, typeName, value) { + const Type2 = (0, index_js_1.typeToConstructor)(registry, typeName); + if ((0, util_1.isU8a)(value) || (0, util_1.isHex)(value)) { + try { + const [, u8a] = (0, util_1.isHex)(value) ? [0, (0, util_1.u8aToU8a)(value)] : value instanceof Raw_js_1.Raw ? [0, value.subarray()] : (0, util_1.compactStripLength)(value); + return [Type2, new Type2(registry, u8a), value]; + } catch { + return [Type2, null, value]; + } + } + const instance = new Type2(registry, value); + return [Type2, instance, (0, util_1.compactAddLength)(instance.toU8a())]; + } + var WrapperKeepOpaque2 = class extends Bytes_js_1.Bytes { + __internal__Type; + __internal__decoded; + __internal__opaqueName; + constructor(registry, typeName, value, { opaqueName = "WrapperKeepOpaque" } = {}) { + const [Type2, decoded, u8a] = decodeRaw2(registry, typeName, value); + super(registry, u8a); + this.__internal__Type = Type2; + this.__internal__decoded = decoded; + this.__internal__opaqueName = opaqueName; + } + static with(Type2) { + return class extends WrapperKeepOpaque2 { + constructor(registry, value) { + super(registry, Type2, value); + } + }; + } + get isDecoded() { + return !!this.__internal__decoded; + } + inspect() { + return this.__internal__decoded ? { + inner: [this.__internal__decoded.inspect()], + outer: [(0, util_1.compactToU8a)(this.length)] + } : { + outer: [(0, util_1.compactToU8a)(this.length), this.toU8a(true)] + }; + } + toHuman(isExtended, disableAscii) { + return this.__internal__decoded ? this.__internal__decoded.toHuman(isExtended, disableAscii) : super.toHuman(isExtended, disableAscii); + } + toPrimitive(disableAscii) { + return this.__internal__decoded ? this.__internal__decoded.toPrimitive(disableAscii) : super.toPrimitive(disableAscii); + } + toRawType() { + return `${this.__internal__opaqueName}<${this.registry.getClassName(this.__internal__Type) || (this.__internal__decoded ? this.__internal__decoded.toRawType() : new this.__internal__Type(this.registry).toRawType())}>`; + } + toString() { + return this.__internal__decoded ? this.__internal__decoded.toString() : super.toString(); + } + unwrap() { + if (!this.__internal__decoded) { + throw new Error(`${this.__internal__opaqueName}: unwrapping an undecodable value`); + } + return this.__internal__decoded; + } + }; + exports2.WrapperKeepOpaque = WrapperKeepOpaque2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/WrapperOpaque.js + var require_WrapperOpaque = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/WrapperOpaque.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WrapperOpaque = void 0; + var WrapperKeepOpaque_js_1 = require_WrapperKeepOpaque(); + var WrapperOpaque2 = class extends WrapperKeepOpaque_js_1.WrapperKeepOpaque { + constructor(registry, typeName, value) { + super(registry, typeName, value, { opaqueName: "WrapperOpaque" }); + } + static with(Type2) { + return class extends WrapperOpaque2 { + constructor(registry, value) { + super(registry, Type2, value); + } + }; + } + get inner() { + return this.unwrap(); + } + }; + exports2.WrapperOpaque = WrapperOpaque2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/extended/index.js + var require_extended = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/extended/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WrapperOpaque = exports2.WrapperKeepOpaque = exports2.U8aFixed = exports2.Type = exports2.RangeInclusive = exports2.Range = exports2.OptionBool = exports2.Map = exports2.CodecMap = exports2.Linkage = exports2.HashMap = exports2.Bytes = exports2.BTreeSet = exports2.BTreeMap = exports2.BitVec = void 0; + var BitVec_js_1 = require_BitVec(); + Object.defineProperty(exports2, "BitVec", { enumerable: true, get: function() { + return BitVec_js_1.BitVec; + } }); + var BTreeMap_js_1 = require_BTreeMap(); + Object.defineProperty(exports2, "BTreeMap", { enumerable: true, get: function() { + return BTreeMap_js_1.BTreeMap; + } }); + var BTreeSet_js_1 = require_BTreeSet(); + Object.defineProperty(exports2, "BTreeSet", { enumerable: true, get: function() { + return BTreeSet_js_1.BTreeSet; + } }); + var Bytes_js_1 = require_Bytes(); + Object.defineProperty(exports2, "Bytes", { enumerable: true, get: function() { + return Bytes_js_1.Bytes; + } }); + var HashMap_js_1 = require_HashMap(); + Object.defineProperty(exports2, "HashMap", { enumerable: true, get: function() { + return HashMap_js_1.HashMap; + } }); + var Linkage_js_1 = require_Linkage(); + Object.defineProperty(exports2, "Linkage", { enumerable: true, get: function() { + return Linkage_js_1.Linkage; + } }); + var Map_js_1 = require_Map(); + Object.defineProperty(exports2, "CodecMap", { enumerable: true, get: function() { + return Map_js_1.CodecMap; + } }); + Object.defineProperty(exports2, "Map", { enumerable: true, get: function() { + return Map_js_1.CodecMap; + } }); + var OptionBool_js_1 = require_OptionBool(); + Object.defineProperty(exports2, "OptionBool", { enumerable: true, get: function() { + return OptionBool_js_1.OptionBool; + } }); + var Range_js_1 = require_Range(); + Object.defineProperty(exports2, "Range", { enumerable: true, get: function() { + return Range_js_1.Range; + } }); + var RangeInclusive_js_1 = require_RangeInclusive(); + Object.defineProperty(exports2, "RangeInclusive", { enumerable: true, get: function() { + return RangeInclusive_js_1.RangeInclusive; + } }); + var Type_js_1 = require_Type(); + Object.defineProperty(exports2, "Type", { enumerable: true, get: function() { + return Type_js_1.Type; + } }); + var U8aFixed_js_1 = require_U8aFixed(); + Object.defineProperty(exports2, "U8aFixed", { enumerable: true, get: function() { + return U8aFixed_js_1.U8aFixed; + } }); + var WrapperKeepOpaque_js_1 = require_WrapperKeepOpaque(); + Object.defineProperty(exports2, "WrapperKeepOpaque", { enumerable: true, get: function() { + return WrapperKeepOpaque_js_1.WrapperKeepOpaque; + } }); + var WrapperOpaque_js_1 = require_WrapperOpaque(); + Object.defineProperty(exports2, "WrapperOpaque", { enumerable: true, get: function() { + return WrapperOpaque_js_1.WrapperOpaque; + } }); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Date.js + var require_Date = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Date.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodecDate = void 0; + var util_1 = require_cjs3(); + var BITLENGTH = 64; + var U8A_OPTS = { bitLength: BITLENGTH, isLe: true }; + function decodeDate(value) { + if ((0, util_1.isU8a)(value)) { + value = (0, util_1.u8aToBn)(value.subarray(0, BITLENGTH / 8)); + } else if (value instanceof Date) { + return value; + } else if ((0, util_1.isString)(value)) { + value = new util_1.BN(value.toString(), 10, "le"); + } + return new Date((0, util_1.bnToBn)(value).toNumber() * 1e3); + } + var CodecDate = class extends Date { + registry; + createdAtHash; + initialU8aLength = BITLENGTH / 8; + isStorageFallback; + constructor(registry, value = 0) { + super(decodeDate(value)); + this.registry = registry; + } + get encodedLength() { + return BITLENGTH / 8; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.getTime() === 0; + } + bitLength() { + return BITLENGTH; + } + eq(other) { + return decodeDate(other).getTime() === this.getTime(); + } + inspect() { + return { + outer: [this.toU8a()] + }; + } + toBigInt() { + return BigInt(this.toNumber()); + } + toBn() { + return new util_1.BN(this.toNumber()); + } + toHex(isLe = false) { + return (0, util_1.bnToHex)(this.toBn(), { + bitLength: BITLENGTH, + isLe, + isNegative: false + }); + } + toHuman() { + return this.toISOString(); + } + toJSON() { + return this.toNumber(); + } + toNumber() { + return Math.ceil(this.getTime() / 1e3); + } + toPrimitive() { + return this.toNumber(); + } + toRawType() { + return "Moment"; + } + toString() { + return super.toString(); + } + toU8a(_isBare) { + return (0, util_1.bnToU8a)(this.toNumber(), U8A_OPTS); + } + }; + exports2.CodecDate = CodecDate; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Float.js + var require_Float = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Float.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Float = void 0; + var util_1 = require_cjs3(); + var Float2 = class extends Number { + encodedLength; + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__bitLength; + constructor(registry, value, { bitLength = 32 } = {}) { + super((0, util_1.isU8a)(value) || (0, util_1.isHex)(value) ? value.length === 0 ? 0 : (0, util_1.u8aToFloat)((0, util_1.u8aToU8a)(value), { bitLength }) : value || 0); + this.__internal__bitLength = bitLength; + this.encodedLength = bitLength / 8; + this.initialU8aLength = this.encodedLength; + this.registry = registry; + } + static with(bitLength) { + return class extends Float2 { + constructor(registry, value) { + super(registry, value, { bitLength }); + } + }; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.valueOf() === 0; + } + eq(other) { + return this.valueOf() === Number(other); + } + inspect() { + return { + outer: [this.toU8a()] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman() { + return this.toString(); + } + toJSON() { + return this.toHex(); + } + toNumber() { + return this.valueOf(); + } + toPrimitive() { + return this.toNumber(); + } + toRawType() { + return `f${this.__internal__bitLength}`; + } + toU8a(_isBare) { + return (0, util_1.floatToU8a)(this, { + bitLength: this.__internal__bitLength + }); + } + }; + exports2.Float = Float2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Json.js + var require_Json = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Json.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Json = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_utils5(); + function decodeJson2(value) { + return Object.entries(value || {}); + } + var Json2 = class extends Map { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + constructor(registry, value) { + const decoded = decodeJson2(value); + super(decoded); + this.registry = registry; + (0, util_1.objectProperties)(this, decoded.map(([k]) => k), (k) => this.get(k)); + } + get encodedLength() { + return 0 | 0; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return [...this.keys()].length === 0; + } + eq(other) { + return (0, index_js_1.compareMap)(this, other); + } + getT(key2) { + return this.get(key2); + } + inspect() { + throw new Error("Unimplemented"); + } + toHex() { + throw new Error("Unimplemented"); + } + toHuman() { + return [...this.entries()].reduce((json, [key2, value]) => { + json[key2] = (0, util_1.isFunction)(value?.toHuman) ? value.toHuman() : value; + return json; + }, {}); + } + toJSON() { + return [...this.entries()].reduce((json, [key2, value]) => { + json[key2] = value; + return json; + }, {}); + } + toPrimitive(disableAscii) { + return [...this.entries()].reduce((json, [key2, value]) => { + json[key2] = (0, util_1.isFunction)(value.toPrimitive) ? value.toPrimitive(disableAscii) : value; + return json; + }, {}); + } + toRawType() { + return "Json"; + } + toString() { + return (0, util_1.stringify)(this.toJSON()); + } + toU8a(_isBare) { + throw new Error("Unimplemented"); + } + }; + exports2.Json = Json2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/Set.js + var require_Set = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/Set.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodecSet = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_utils5(); + function encodeSet2(setValues, values) { + const encoded = new util_1.BN(0); + for (let i = 0, count = values.length; i < count; i++) { + encoded.ior((0, util_1.bnToBn)(setValues[values[i]] || 0)); + } + return encoded; + } + function decodeSetArray2(setValues, values) { + const count = values.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + const key2 = values[i]; + if ((0, util_1.isUndefined)(setValues[key2])) { + throw new Error(`Set: Invalid key '${key2}' passed to Set, allowed ${Object.keys(setValues).join(", ")}`); + } + result[i] = key2; + } + return result; + } + function decodeSetNumber2(setValues, _value) { + const bn2 = (0, util_1.bnToBn)(_value); + const keys = Object.keys(setValues); + const result = []; + for (let i = 0, count = keys.length; i < count; i++) { + const key2 = keys[i]; + if (bn2.and((0, util_1.bnToBn)(setValues[key2])).eq((0, util_1.bnToBn)(setValues[key2]))) { + result.push(key2); + } + } + const computed = encodeSet2(setValues, result); + if (!bn2.eq(computed)) { + throw new Error(`Set: Mismatch decoding '${bn2.toString()}', computed as '${computed.toString()}' with ${result.join(", ")}`); + } + return result; + } + function decodeSet3(setValues, value = 0, bitLength) { + if (bitLength % 8 !== 0) { + throw new Error(`Expected valid bitLength, power of 8, found ${bitLength}`); + } + const byteLength = bitLength / 8; + if ((0, util_1.isU8a)(value)) { + return value.length === 0 ? [] : decodeSetNumber2(setValues, (0, util_1.u8aToBn)(value.subarray(0, byteLength), { isLe: true })); + } else if ((0, util_1.isString)(value)) { + return decodeSet3(setValues, (0, util_1.u8aToU8a)(value), byteLength); + } else if (value instanceof Set || Array.isArray(value)) { + const input = Array.isArray(value) ? value : [...value.values()]; + return decodeSetArray2(setValues, input); + } + return decodeSetNumber2(setValues, value); + } + var CodecSet2 = class extends Set { + registry; + createdAtHash; + initialU8aLength; + isStorageFallback; + __internal__allowed; + __internal__byteLength; + constructor(registry, setValues, value, bitLength = 8) { + super(decodeSet3(setValues, value, bitLength)); + this.registry = registry; + this.__internal__allowed = setValues; + this.__internal__byteLength = bitLength / 8; + } + static with(values, bitLength) { + return class extends CodecSet2 { + static { + const keys = Object.keys(values); + const count = keys.length; + const isKeys = new Array(count); + for (let i = 0; i < count; i++) { + isKeys[i] = `is${(0, util_1.stringPascalCase)(keys[i])}`; + } + (0, util_1.objectProperties)(this.prototype, isKeys, (_, i, self2) => self2.strings.includes(keys[i])); + } + constructor(registry, value) { + super(registry, values, value, bitLength); + } + }; + } + get encodedLength() { + return this.__internal__byteLength; + } + get hash() { + return this.registry.hash(this.toU8a()); + } + get isEmpty() { + return this.size === 0; + } + get strings() { + return [...super.values()]; + } + get valueEncoded() { + return encodeSet2(this.__internal__allowed, this.strings); + } + add = (key2) => { + if (this.__internal__allowed && (0, util_1.isUndefined)(this.__internal__allowed[key2])) { + throw new Error(`Set: Invalid key '${key2}' on add`); + } + super.add(key2); + return this; + }; + eq(other) { + if (Array.isArray(other)) { + return (0, index_js_1.compareArray)(this.strings.sort(), other.sort()); + } else if (other instanceof Set) { + return this.eq([...other.values()]); + } else if ((0, util_1.isNumber)(other) || (0, util_1.isBn)(other)) { + return this.valueEncoded.eq((0, util_1.bnToBn)(other)); + } + return false; + } + inspect() { + return { + outer: [this.toU8a()] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toHuman() { + return this.toJSON(); + } + toJSON() { + return this.strings; + } + toNumber() { + return this.valueEncoded.toNumber(); + } + toPrimitive() { + return this.toJSON(); + } + toRawType() { + return (0, util_1.stringify)({ _set: this.__internal__allowed }); + } + toString() { + return `[${this.strings.join(", ")}]`; + } + toU8a(_isBare) { + return (0, util_1.bnToU8a)(this.valueEncoded, { + bitLength: this.__internal__byteLength * 8, + isLe: true + }); + } + }; + exports2.CodecSet = CodecSet2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/native/index.js + var require_native = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/native/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Text = exports2.Struct = exports2.Set = exports2.CodecSet = exports2.Raw = exports2.Json = exports2.Float = exports2.Date = exports2.CodecDate = exports2.bool = exports2.Bool = void 0; + var Bool_js_1 = require_Bool(); + Object.defineProperty(exports2, "Bool", { enumerable: true, get: function() { + return Bool_js_1.bool; + } }); + Object.defineProperty(exports2, "bool", { enumerable: true, get: function() { + return Bool_js_1.bool; + } }); + var Date_js_1 = require_Date(); + Object.defineProperty(exports2, "CodecDate", { enumerable: true, get: function() { + return Date_js_1.CodecDate; + } }); + Object.defineProperty(exports2, "Date", { enumerable: true, get: function() { + return Date_js_1.CodecDate; + } }); + var Float_js_1 = require_Float(); + Object.defineProperty(exports2, "Float", { enumerable: true, get: function() { + return Float_js_1.Float; + } }); + var Json_js_1 = require_Json(); + Object.defineProperty(exports2, "Json", { enumerable: true, get: function() { + return Json_js_1.Json; + } }); + var Raw_js_1 = require_Raw(); + Object.defineProperty(exports2, "Raw", { enumerable: true, get: function() { + return Raw_js_1.Raw; + } }); + var Set_js_1 = require_Set(); + Object.defineProperty(exports2, "CodecSet", { enumerable: true, get: function() { + return Set_js_1.CodecSet; + } }); + Object.defineProperty(exports2, "Set", { enumerable: true, get: function() { + return Set_js_1.CodecSet; + } }); + var Struct_js_1 = require_Struct(); + Object.defineProperty(exports2, "Struct", { enumerable: true, get: function() { + return Struct_js_1.Struct; + } }); + var Text_js_1 = require_Text(); + Object.defineProperty(exports2, "Text", { enumerable: true, get: function() { + return Text_js_1.Text; + } }); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/F32.js + var require_F32 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/F32.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.f32 = void 0; + var Float_js_1 = require_Float(); + var f322 = class extends Float_js_1.Float.with(32) { + __FloatType = "f32"; + }; + exports2.f32 = f322; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/F64.js + var require_F64 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/F64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.f64 = void 0; + var Float_js_1 = require_Float(); + var f642 = class extends Float_js_1.Float.with(64) { + __FloatType = "f64"; + }; + exports2.f64 = f642; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/I8.js + var require_I8 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/I8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.i8 = void 0; + var Int_js_1 = require_Int2(); + var i83 = class extends Int_js_1.Int.with(8) { + __IntType = "i8"; + }; + exports2.i8 = i83; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/I16.js + var require_I16 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/I16.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.i16 = void 0; + var Int_js_1 = require_Int2(); + var i162 = class extends Int_js_1.Int.with(16) { + __IntType = "i16"; + }; + exports2.i16 = i162; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/I32.js + var require_I32 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/I32.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.i32 = void 0; + var Int_js_1 = require_Int2(); + var i322 = class extends Int_js_1.Int.with(32) { + __IntType = "i32"; + }; + exports2.i32 = i322; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/I64.js + var require_I64 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/I64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.i64 = void 0; + var Int_js_1 = require_Int2(); + var i642 = class extends Int_js_1.Int.with(64) { + __IntType = "i64"; + }; + exports2.i64 = i642; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/I128.js + var require_I128 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/I128.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.i128 = void 0; + var Int_js_1 = require_Int2(); + var i1282 = class extends Int_js_1.Int.with(128) { + __IntType = "i128"; + }; + exports2.i128 = i1282; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/I256.js + var require_I256 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/I256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.i256 = void 0; + var Int_js_1 = require_Int2(); + var i2562 = class extends Int_js_1.Int.with(256) { + __IntType = "i256"; + }; + exports2.i256 = i2562; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/ISize.js + var require_ISize = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/ISize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isize = void 0; + var I32_js_1 = require_I32(); + var isize2 = class extends I32_js_1.i32 { + constructor(registry, value) { + super(registry, value); + throw new Error("The `isize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally i64) and WASM (always i32) code. Use one of the `i32` or `i64` types explicitly."); + } + }; + exports2.isize = isize2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/U8.js + var require_U8 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/U8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.u8 = void 0; + var UInt_js_1 = require_UInt(); + var u84 = class extends UInt_js_1.UInt.with(8) { + __UIntType = "u8"; + }; + exports2.u8 = u84; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/U16.js + var require_U16 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/U16.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.u16 = void 0; + var UInt_js_1 = require_UInt(); + var u163 = class extends UInt_js_1.UInt.with(16) { + __UIntType = "u16"; + }; + exports2.u16 = u163; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/U32.js + var require_U32 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/U32.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.u32 = void 0; + var UInt_js_1 = require_UInt(); + var u326 = class extends UInt_js_1.UInt.with(32) { + __UIntType = "u32"; + }; + exports2.u32 = u326; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/U64.js + var require_U64 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/U64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.u64 = void 0; + var UInt_js_1 = require_UInt(); + var u645 = class extends UInt_js_1.UInt.with(64) { + __UIntType = "u64"; + }; + exports2.u64 = u645; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/U128.js + var require_U128 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/U128.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.u128 = void 0; + var UInt_js_1 = require_UInt(); + var u1282 = class extends UInt_js_1.UInt.with(128) { + __UIntType = "u128"; + }; + exports2.u128 = u1282; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/U256.js + var require_U256 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/U256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.u256 = void 0; + var UInt_js_1 = require_UInt(); + var u2562 = class extends UInt_js_1.UInt.with(256) { + __UIntType = "u256"; + }; + exports2.u256 = u2562; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/USize.js + var require_USize = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/USize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.usize = void 0; + var U32_js_1 = require_U32(); + var usize2 = class extends U32_js_1.u32 { + constructor(registry, value) { + super(registry, value); + throw new Error("The `usize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally u64) and WASM (always u32) code. Use one of the `u32` or `u64` types explicitly."); + } + }; + exports2.usize = usize2; + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/primitive/index.js + var require_primitive = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/primitive/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.usize = exports2.USize = exports2.u256 = exports2.U256 = exports2.u128 = exports2.U128 = exports2.u64 = exports2.U64 = exports2.u32 = exports2.U32 = exports2.u16 = exports2.U16 = exports2.u8 = exports2.U8 = exports2.isize = exports2.ISize = exports2.i256 = exports2.I256 = exports2.i128 = exports2.I128 = exports2.i64 = exports2.I64 = exports2.i32 = exports2.I32 = exports2.i16 = exports2.I16 = exports2.i8 = exports2.I8 = exports2.f64 = exports2.F64 = exports2.f32 = exports2.F32 = void 0; + var F32_js_1 = require_F32(); + Object.defineProperty(exports2, "F32", { enumerable: true, get: function() { + return F32_js_1.f32; + } }); + Object.defineProperty(exports2, "f32", { enumerable: true, get: function() { + return F32_js_1.f32; + } }); + var F64_js_1 = require_F64(); + Object.defineProperty(exports2, "F64", { enumerable: true, get: function() { + return F64_js_1.f64; + } }); + Object.defineProperty(exports2, "f64", { enumerable: true, get: function() { + return F64_js_1.f64; + } }); + var I8_js_1 = require_I8(); + Object.defineProperty(exports2, "I8", { enumerable: true, get: function() { + return I8_js_1.i8; + } }); + Object.defineProperty(exports2, "i8", { enumerable: true, get: function() { + return I8_js_1.i8; + } }); + var I16_js_1 = require_I16(); + Object.defineProperty(exports2, "I16", { enumerable: true, get: function() { + return I16_js_1.i16; + } }); + Object.defineProperty(exports2, "i16", { enumerable: true, get: function() { + return I16_js_1.i16; + } }); + var I32_js_1 = require_I32(); + Object.defineProperty(exports2, "I32", { enumerable: true, get: function() { + return I32_js_1.i32; + } }); + Object.defineProperty(exports2, "i32", { enumerable: true, get: function() { + return I32_js_1.i32; + } }); + var I64_js_1 = require_I64(); + Object.defineProperty(exports2, "I64", { enumerable: true, get: function() { + return I64_js_1.i64; + } }); + Object.defineProperty(exports2, "i64", { enumerable: true, get: function() { + return I64_js_1.i64; + } }); + var I128_js_1 = require_I128(); + Object.defineProperty(exports2, "I128", { enumerable: true, get: function() { + return I128_js_1.i128; + } }); + Object.defineProperty(exports2, "i128", { enumerable: true, get: function() { + return I128_js_1.i128; + } }); + var I256_js_1 = require_I256(); + Object.defineProperty(exports2, "I256", { enumerable: true, get: function() { + return I256_js_1.i256; + } }); + Object.defineProperty(exports2, "i256", { enumerable: true, get: function() { + return I256_js_1.i256; + } }); + var ISize_js_1 = require_ISize(); + Object.defineProperty(exports2, "ISize", { enumerable: true, get: function() { + return ISize_js_1.isize; + } }); + Object.defineProperty(exports2, "isize", { enumerable: true, get: function() { + return ISize_js_1.isize; + } }); + var U8_js_1 = require_U8(); + Object.defineProperty(exports2, "U8", { enumerable: true, get: function() { + return U8_js_1.u8; + } }); + Object.defineProperty(exports2, "u8", { enumerable: true, get: function() { + return U8_js_1.u8; + } }); + var U16_js_1 = require_U16(); + Object.defineProperty(exports2, "U16", { enumerable: true, get: function() { + return U16_js_1.u16; + } }); + Object.defineProperty(exports2, "u16", { enumerable: true, get: function() { + return U16_js_1.u16; + } }); + var U32_js_1 = require_U32(); + Object.defineProperty(exports2, "U32", { enumerable: true, get: function() { + return U32_js_1.u32; + } }); + Object.defineProperty(exports2, "u32", { enumerable: true, get: function() { + return U32_js_1.u32; + } }); + var U64_js_1 = require_U64(); + Object.defineProperty(exports2, "U64", { enumerable: true, get: function() { + return U64_js_1.u64; + } }); + Object.defineProperty(exports2, "u64", { enumerable: true, get: function() { + return U64_js_1.u64; + } }); + var U128_js_1 = require_U128(); + Object.defineProperty(exports2, "U128", { enumerable: true, get: function() { + return U128_js_1.u128; + } }); + Object.defineProperty(exports2, "u128", { enumerable: true, get: function() { + return U128_js_1.u128; + } }); + var U256_js_1 = require_U256(); + Object.defineProperty(exports2, "U256", { enumerable: true, get: function() { + return U256_js_1.u256; + } }); + Object.defineProperty(exports2, "u256", { enumerable: true, get: function() { + return U256_js_1.u256; + } }); + var USize_js_1 = require_USize(); + Object.defineProperty(exports2, "USize", { enumerable: true, get: function() { + return USize_js_1.usize; + } }); + Object.defineProperty(exports2, "usize", { enumerable: true, get: function() { + return USize_js_1.usize; + } }); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/bundle.js + var require_bundle4 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + var tslib_1 = require_tslib(); + var packageInfo_js_1 = require_packageInfo16(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + tslib_1.__exportStar(require_abstract(), exports2); + tslib_1.__exportStar(require_base(), exports2); + tslib_1.__exportStar(require_extended(), exports2); + tslib_1.__exportStar(require_native(), exports2); + tslib_1.__exportStar(require_primitive(), exports2); + tslib_1.__exportStar(require_utils5(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-codec/cjs/index.js + var require_cjs8 = __commonJS({ + "../../node_modules/@polkadot/types-codec/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect5(); + tslib_1.__exportStar(require_bundle4(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/util/typeSplit.js + var require_typeSplit = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/util/typeSplit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typeSplit = void 0; + function typeSplit2(type) { + const result = []; + let c = 0; + let f10 = 0; + let s = 0; + let t = 0; + let start = 0; + for (let i = 0, count = type.length; i < count; i++) { + switch (type[i]) { + case ",": { + if (!(c || f10 || s || t)) { + result.push(type.substring(start, i).trim()); + start = i + 1; + } + break; + } + case "<": + c++; + break; + case ">": + c--; + break; + case "[": + f10++; + break; + case "]": + f10--; + break; + case "{": + s++; + break; + case "}": + s--; + break; + case "(": + t++; + break; + case ")": + t--; + break; + } + } + if (c || f10 || s || t) { + throw new Error(`Invalid definition (missing terminators) found in ${type}`); + } + result.push(type.substring(start, type.length).trim()); + return result; + } + exports2.typeSplit = typeSplit2; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/util/getTypeDef.js + var require_getTypeDef = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/util/getTypeDef.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getTypeDef = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var index_js_1 = require_types3(); + var typeSplit_js_1 = require_typeSplit(); + var KNOWN_INTERNALS2 = ["_alias", "_fallback"]; + function getTypeString2(typeOrObj) { + return (0, util_1.isString)(typeOrObj) ? typeOrObj.toString() : (0, util_1.stringify)(typeOrObj); + } + function isRustEnum3(details) { + const values = Object.values(details); + if (values.some((v) => (0, util_1.isNumber)(v))) { + if (!values.every((v) => (0, util_1.isNumber)(v) && v >= 0 && v <= 255)) { + throw new Error("Invalid number-indexed enum definition"); + } + return false; + } + return true; + } + function _decodeEnum2(value, details, count, fallbackType) { + value.info = index_js_1.TypeDefInfo.Enum; + value.fallbackType = fallbackType; + if (Array.isArray(details)) { + value.sub = details.map((name6, index) => ({ + index, + info: index_js_1.TypeDefInfo.Plain, + name: name6, + type: "Null" + })); + } else if (isRustEnum3(details)) { + value.sub = Object.entries(details).map(([name6, typeOrObj], index) => (0, util_1.objectSpread)({}, getTypeDef2(getTypeString2(typeOrObj || "Null"), { name: name6 }, count), { index })); + } else { + value.sub = Object.entries(details).map(([name6, index]) => ({ + index, + info: index_js_1.TypeDefInfo.Plain, + name: name6, + type: "Null" + })); + } + return value; + } + function _decodeSet2(value, details, fallbackType) { + value.info = index_js_1.TypeDefInfo.Set; + value.fallbackType = fallbackType; + value.length = details._bitLength; + value.sub = Object.entries(details).filter(([name6]) => !name6.startsWith("_")).map(([name6, index]) => ({ + index, + info: index_js_1.TypeDefInfo.Plain, + name: name6, + type: "Null" + })); + return value; + } + function _decodeStruct2(value, type, _, count) { + const parsed = JSON.parse(type); + const keys = Object.keys(parsed); + if (parsed._enum) { + return _decodeEnum2(value, parsed._enum, count, parsed._fallback); + } else if (parsed._set) { + return _decodeSet2(value, parsed._set, parsed._fallback); + } + value.alias = parsed._alias ? new Map(Object.entries(parsed._alias)) : void 0; + value.fallbackType = parsed._fallback; + value.sub = keys.filter((name6) => !KNOWN_INTERNALS2.includes(name6)).map((name6) => getTypeDef2(getTypeString2(parsed[name6]), { name: name6 }, count)); + return value; + } + function _decodeFixedVec2(value, type, _, count) { + const max2 = type.length - 1; + let index = -1; + let inner = 0; + for (let i = 1; i < max2 && index === -1; i++) { + switch (type[i]) { + case ";": { + if (inner === 0) { + index = i; + } + break; + } + case "[": + case "(": + case "<": + inner++; + break; + case "]": + case ")": + case ">": + inner--; + break; + } + } + if (index === -1) { + throw new Error(`${type}: Unable to extract location of ';'`); + } + const vecType = type.substring(1, index); + const [strLength, displayName] = type.substring(index + 1, max2).split(";"); + const length = parseInt(strLength.trim(), 10); + if (length > 2048) { + throw new Error(`${type}: Only support for [Type; ], where length <= 2048`); + } + value.displayName = displayName; + value.length = length; + value.sub = getTypeDef2(vecType, {}, count); + return value; + } + function _decodeTuple2(value, _, subType, count) { + value.sub = subType.length === 0 ? [] : (0, typeSplit_js_1.typeSplit)(subType).map((inner) => getTypeDef2(inner, {}, count)); + return value; + } + function _decodeAnyInt2(value, type, _, clazz) { + const [strLength, displayName] = type.substring(clazz.length + 1, type.length - 1).split(","); + const length = parseInt(strLength.trim(), 10); + if (length > 8192 || length % 8) { + throw new Error(`${type}: Only support for ${clazz}, where length <= 8192 and a power of 8, found ${length}`); + } + value.displayName = displayName; + value.length = length; + return value; + } + function _decodeInt2(value, type, subType) { + return _decodeAnyInt2(value, type, subType, "Int"); + } + function _decodeUInt2(value, type, subType) { + return _decodeAnyInt2(value, type, subType, "UInt"); + } + function _decodeDoNotConstruct2(value, type, _) { + const NAME_LENGTH = "DoNotConstruct".length; + value.displayName = type.substring(NAME_LENGTH + 1, type.length - 1); + return value; + } + function hasWrapper2(type, [start, end]) { + return type.startsWith(start) && type.slice(-1 * end.length) === end; + } + var nestedExtraction2 = [ + ["[", "]", index_js_1.TypeDefInfo.VecFixed, _decodeFixedVec2], + ["{", "}", index_js_1.TypeDefInfo.Struct, _decodeStruct2], + ["(", ")", index_js_1.TypeDefInfo.Tuple, _decodeTuple2], + ["BTreeMap<", ">", index_js_1.TypeDefInfo.BTreeMap, _decodeTuple2], + ["HashMap<", ">", index_js_1.TypeDefInfo.HashMap, _decodeTuple2], + ["Int<", ">", index_js_1.TypeDefInfo.Int, _decodeInt2], + ["Result<", ">", index_js_1.TypeDefInfo.Result, _decodeTuple2], + ["UInt<", ">", index_js_1.TypeDefInfo.UInt, _decodeUInt2], + ["DoNotConstruct<", ">", index_js_1.TypeDefInfo.DoNotConstruct, _decodeDoNotConstruct2] + ]; + var wrappedExtraction2 = [ + ["BTreeSet<", ">", index_js_1.TypeDefInfo.BTreeSet], + ["Compact<", ">", index_js_1.TypeDefInfo.Compact], + ["Linkage<", ">", index_js_1.TypeDefInfo.Linkage], + ["Opaque<", ">", index_js_1.TypeDefInfo.WrapperOpaque], + ["Option<", ">", index_js_1.TypeDefInfo.Option], + ["Range<", ">", index_js_1.TypeDefInfo.Range], + ["RangeInclusive<", ">", index_js_1.TypeDefInfo.RangeInclusive], + ["Vec<", ">", index_js_1.TypeDefInfo.Vec], + ["WrapperKeepOpaque<", ">", index_js_1.TypeDefInfo.WrapperKeepOpaque], + ["WrapperOpaque<", ">", index_js_1.TypeDefInfo.WrapperOpaque] + ]; + function extractSubType2(type, [start, end]) { + return type.substring(start.length, type.length - end.length); + } + function getTypeDef2(_type, { displayName, name: name6 } = {}, count = 0) { + const type = (0, types_codec_1.sanitize)(_type); + const value = { displayName, info: index_js_1.TypeDefInfo.Plain, name: name6, type }; + if (++count > 64) { + throw new Error("getTypeDef: Maximum nested limit reached"); + } + const nested = nestedExtraction2.find((nested2) => hasWrapper2(type, nested2)); + if (nested) { + value.info = nested[2]; + return nested[3](value, type, extractSubType2(type, nested), count); + } + const wrapped = wrappedExtraction2.find((wrapped2) => hasWrapper2(type, wrapped2)); + if (wrapped) { + value.info = wrapped[2]; + value.sub = getTypeDef2(extractSubType2(type, wrapped), {}, count); + } + return value; + } + exports2.getTypeDef = getTypeDef2; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/create/class.js + var require_class2 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/create/class.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createClassUnsafe = exports2.getTypeClass = exports2.constructTypeClass = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var index_js_1 = require_types3(); + var getTypeDef_js_1 = require_getTypeDef(); + function getTypeDefType2({ lookupName, type }) { + return lookupName || type; + } + function getSubDefArray2(value) { + if (!Array.isArray(value.sub)) { + throw new Error(`Expected subtype as TypeDef[] in ${(0, util_1.stringify)(value)}`); + } + return value.sub; + } + function getSubDef2(value) { + if (!value.sub || Array.isArray(value.sub)) { + throw new Error(`Expected subtype as TypeDef in ${(0, util_1.stringify)(value)}`); + } + return value.sub; + } + function getSubType2(value) { + return getTypeDefType2(getSubDef2(value)); + } + function getTypeClassMap2(value) { + const subs = getSubDefArray2(value); + const map2 = {}; + for (let i = 0, count = subs.length; i < count; i++) { + const sub = subs[i]; + if (!sub.name) { + throw new Error(`No name found in definition ${(0, util_1.stringify)(sub)}`); + } + map2[sub.name] = getTypeDefType2(sub); + } + return map2; + } + function getTypeClassArray2(value) { + return getSubDefArray2(value).map(getTypeDefType2); + } + function createInt2(Clazz, { displayName, length }) { + if (!(0, util_1.isNumber)(length)) { + throw new Error(`Expected bitLength information for ${displayName || Clazz.constructor.name}`); + } + return Clazz.with(length, displayName); + } + function createHashMap2(Clazz, value) { + const [keyType, valueType] = getTypeClassArray2(value); + return Clazz.with(keyType, valueType); + } + function createWithSub2(Clazz, value) { + return Clazz.with(getSubType2(value)); + } + var infoMapping2 = { + [index_js_1.TypeDefInfo.BTreeMap]: (_registry, value) => createHashMap2(types_codec_1.BTreeMap, value), + [index_js_1.TypeDefInfo.BTreeSet]: (_registry, value) => createWithSub2(types_codec_1.BTreeSet, value), + [index_js_1.TypeDefInfo.Compact]: (_registry, value) => createWithSub2(types_codec_1.Compact, value), + [index_js_1.TypeDefInfo.DoNotConstruct]: (_registry, value) => types_codec_1.DoNotConstruct.with(value.displayName || value.type), + [index_js_1.TypeDefInfo.Enum]: (_registry, value) => { + const subs = getSubDefArray2(value); + return types_codec_1.Enum.with(subs.every(({ type }) => type === "Null") ? subs.reduce((out, { index, name: name6 }, count) => { + if (!name6) { + throw new Error("No name found in sub definition"); + } + out[name6] = index || count; + return out; + }, {}) : getTypeClassMap2(value)); + }, + [index_js_1.TypeDefInfo.HashMap]: (_registry, value) => createHashMap2(types_codec_1.HashMap, value), + [index_js_1.TypeDefInfo.Int]: (_registry, value) => createInt2(types_codec_1.Int, value), + [index_js_1.TypeDefInfo.Linkage]: (_registry, value) => { + const type = `Option<${getSubType2(value)}>`; + const Clazz = types_codec_1.Struct.with({ previous: type, next: type }); + Clazz.prototype.toRawType = function() { + return `Linkage<${this.next.toRawType(true)}>`; + }; + return Clazz; + }, + [index_js_1.TypeDefInfo.Null]: (_registry, _value) => types_codec_1.Null, + [index_js_1.TypeDefInfo.Option]: (_registry, value) => { + if (!value.sub || Array.isArray(value.sub)) { + throw new Error("Expected type information for Option"); + } + return createWithSub2(types_codec_1.Option, value); + }, + [index_js_1.TypeDefInfo.Plain]: (registry, value) => registry.getOrUnknown(value.type), + [index_js_1.TypeDefInfo.Range]: (_registry, value) => createWithSub2(types_codec_1.Range, value), + [index_js_1.TypeDefInfo.RangeInclusive]: (_registry, value) => createWithSub2(types_codec_1.RangeInclusive, value), + [index_js_1.TypeDefInfo.Result]: (_registry, value) => { + const [Ok2, Err] = getTypeClassArray2(value); + return types_codec_1.Result.with({ Err, Ok: Ok2 }); + }, + [index_js_1.TypeDefInfo.Set]: (_registry, value) => types_codec_1.CodecSet.with(getSubDefArray2(value).reduce((result, { index, name: name6 }) => { + if (!name6 || !(0, util_1.isNumber)(index)) { + throw new Error("No name found in sub definition"); + } + result[name6] = index; + return result; + }, {}), value.length), + [index_js_1.TypeDefInfo.Si]: (registry, value) => getTypeClass2(registry, registry.lookup.getTypeDef(value.type)), + [index_js_1.TypeDefInfo.Struct]: (_registry, value) => types_codec_1.Struct.with(getTypeClassMap2(value), value.alias), + [index_js_1.TypeDefInfo.Tuple]: (_registry, value) => types_codec_1.Tuple.with(getTypeClassArray2(value)), + [index_js_1.TypeDefInfo.UInt]: (_registry, value) => createInt2(types_codec_1.UInt, value), + [index_js_1.TypeDefInfo.Vec]: (_registry, { sub }) => { + if (!sub || Array.isArray(sub)) { + throw new Error("Expected type information for vector"); + } + return sub.type === "u8" ? types_codec_1.Bytes : types_codec_1.Vec.with(getTypeDefType2(sub)); + }, + [index_js_1.TypeDefInfo.VecFixed]: (_registry, { displayName, length, sub }) => { + if (!(0, util_1.isNumber)(length) || !sub || Array.isArray(sub)) { + throw new Error("Expected length & type information for fixed vector"); + } + return sub.type === "u8" ? types_codec_1.U8aFixed.with(length * 8, displayName) : types_codec_1.VecFixed.with(getTypeDefType2(sub), length); + }, + [index_js_1.TypeDefInfo.WrapperKeepOpaque]: (_registry, value) => createWithSub2(types_codec_1.WrapperKeepOpaque, value), + [index_js_1.TypeDefInfo.WrapperOpaque]: (_registry, value) => createWithSub2(types_codec_1.WrapperOpaque, value) + }; + function constructTypeClass2(registry, typeDef) { + try { + const Type2 = infoMapping2[typeDef.info](registry, typeDef); + if (!Type2) { + throw new Error("No class created"); + } + if (!Type2.__fallbackType && typeDef.fallbackType) { + Type2.__fallbackType = typeDef.fallbackType; + } + return Type2; + } catch (error) { + throw new Error(`Unable to construct class from ${(0, util_1.stringify)(typeDef)}: ${error.message}`); + } + } + exports2.constructTypeClass = constructTypeClass2; + function getTypeClass2(registry, typeDef) { + return registry.getUnsafe(typeDef.type, false, typeDef); + } + exports2.getTypeClass = getTypeClass2; + function createClassUnsafe2(registry, type) { + return registry.getUnsafe(type) || getTypeClass2(registry, registry.isLookupType(type) ? registry.lookup.getTypeDef(type) : (0, getTypeDef_js_1.getTypeDef)(type)); + } + exports2.createClassUnsafe = createClassUnsafe2; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/create/type.js + var require_type = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/create/type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTypeUnsafe = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var class_js_1 = require_class2(); + function checkInstance2(created, matcher) { + const u8a = created.toU8a(); + const rawType = created.toRawType(); + const isOk = (0, util_1.u8aEq)(u8a, matcher) || ["Bytes", "Text", "Type"].includes(rawType) && matcher.length === created.length || created.isEmpty && matcher.every((v) => !v); + if (!isOk) { + throw new Error(`${rawType}:: Decoded input doesn't match input, received ${(0, util_1.u8aToHex)(matcher, 512)} (${matcher.length} bytes), created ${(0, util_1.u8aToHex)(u8a, 512)} (${u8a.length} bytes)`); + } + } + function checkPedantic2(created, [value]) { + if ((0, util_1.isU8a)(value)) { + checkInstance2(created, value); + } else if ((0, util_1.isHex)(value)) { + checkInstance2(created, (0, util_1.u8aToU8a)(value)); + } + } + function initType2(registry, Type2, params = [], { blockHash, isFallback, isOptional, isPedantic } = {}) { + const created = new (isOptional ? types_codec_1.Option.with(Type2) : Type2)(registry, ...params); + isPedantic && checkPedantic2(created, params); + if (blockHash) { + created.createdAtHash = createTypeUnsafe2(registry, "BlockHash", [blockHash]); + } + if (isFallback) { + created.isStorageFallback = true; + } + return created; + } + function createTypeUnsafe2(registry, type, params = [], options = {}) { + let Clazz = null; + let firstError = null; + try { + Clazz = (0, class_js_1.createClassUnsafe)(registry, type); + return initType2(registry, Clazz, params, options); + } catch (error) { + firstError = new Error(`createType(${type}):: ${error.message}`); + } + if (Clazz?.__fallbackType) { + try { + Clazz = (0, class_js_1.createClassUnsafe)(registry, Clazz.__fallbackType); + return initType2(registry, Clazz, params, options); + } catch { + } + } + throw firstError; + } + exports2.createTypeUnsafe = createTypeUnsafe2; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/create/index.js + var require_create = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/create/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_class2(), exports2); + tslib_1.__exportStar(require_type(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/util/encodeTypes.js + var require_encodeTypes = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/util/encodeTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.withTypeString = exports2.encodeTypeDef = exports2.paramsNotation = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_types3(); + var stringIdentity2 = (value) => value.toString(); + var INFO_WRAP2 = ["BTreeMap", "BTreeSet", "Compact", "HashMap", "Option", "Result", "Vec"]; + function paramsNotation2(outer, inner, transform = stringIdentity2) { + return `${outer}${inner ? `<${(Array.isArray(inner) ? inner : [inner]).map(transform).join(", ")}>` : ""}`; + } + exports2.paramsNotation = paramsNotation2; + function encodeWithParams2(registry, typeDef, outer) { + const { info, sub } = typeDef; + switch (info) { + case index_js_1.TypeDefInfo.BTreeMap: + case index_js_1.TypeDefInfo.BTreeSet: + case index_js_1.TypeDefInfo.Compact: + case index_js_1.TypeDefInfo.HashMap: + case index_js_1.TypeDefInfo.Linkage: + case index_js_1.TypeDefInfo.Option: + case index_js_1.TypeDefInfo.Range: + case index_js_1.TypeDefInfo.RangeInclusive: + case index_js_1.TypeDefInfo.Result: + case index_js_1.TypeDefInfo.Vec: + case index_js_1.TypeDefInfo.WrapperKeepOpaque: + case index_js_1.TypeDefInfo.WrapperOpaque: + return paramsNotation2(outer, sub, (p) => encodeTypeDef2(registry, p)); + } + throw new Error(`Unable to encode ${(0, util_1.stringify)(typeDef)} with params`); + } + function encodeSubTypes2(registry, sub, asEnum, extra) { + const names2 = sub.map(({ name: name6 }) => name6); + if (!names2.every((n) => !!n)) { + throw new Error(`Subtypes does not have consistent names, ${names2.join(", ")}`); + } + const inner = (0, util_1.objectSpread)({}, extra); + for (let i = 0, count = sub.length; i < count; i++) { + const def = sub[i]; + if (!def.name) { + throw new Error(`No name found in ${(0, util_1.stringify)(def)}`); + } + inner[def.name] = encodeTypeDef2(registry, def); + } + return (0, util_1.stringify)(asEnum ? { _enum: inner } : inner); + } + var encoders2 = { + [index_js_1.TypeDefInfo.BTreeMap]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "BTreeMap"), + [index_js_1.TypeDefInfo.BTreeSet]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "BTreeSet"), + [index_js_1.TypeDefInfo.Compact]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "Compact"), + [index_js_1.TypeDefInfo.DoNotConstruct]: (registry, { displayName, lookupIndex, lookupName }) => `DoNotConstruct<${lookupName || displayName || ((0, util_1.isUndefined)(lookupIndex) ? "Unknown" : registry.createLookupType(lookupIndex))}>`, + [index_js_1.TypeDefInfo.Enum]: (registry, { sub }) => { + if (!Array.isArray(sub)) { + throw new Error("Unable to encode Enum type"); + } + return sub.every(({ type }) => type === "Null") ? (0, util_1.stringify)({ _enum: sub.map(({ name: name6 }, index) => `${name6 || `Empty${index}`}`) }) : encodeSubTypes2(registry, sub, true); + }, + [index_js_1.TypeDefInfo.HashMap]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "HashMap"), + [index_js_1.TypeDefInfo.Int]: (_registry, { length = 32 }) => `Int<${length}>`, + [index_js_1.TypeDefInfo.Linkage]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "Linkage"), + [index_js_1.TypeDefInfo.Null]: (_registry, _typeDef) => "Null", + [index_js_1.TypeDefInfo.Option]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "Option"), + [index_js_1.TypeDefInfo.Plain]: (_registry, { displayName, type }) => displayName || type, + [index_js_1.TypeDefInfo.Range]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "Range"), + [index_js_1.TypeDefInfo.RangeInclusive]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "RangeInclusive"), + [index_js_1.TypeDefInfo.Result]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "Result"), + [index_js_1.TypeDefInfo.Set]: (_registry, { length = 8, sub }) => { + if (!Array.isArray(sub)) { + throw new Error("Unable to encode Set type"); + } + return (0, util_1.stringify)({ + _set: sub.reduce((all, { index, name: name6 }, count) => (0, util_1.objectSpread)(all, { [`${name6 || `Unknown${index || count}`}`]: index || count }), { _bitLength: length || 8 }) + }); + }, + [index_js_1.TypeDefInfo.Si]: (_registry, { lookupName, type }) => lookupName || type, + [index_js_1.TypeDefInfo.Struct]: (registry, { alias: alias2, sub }) => { + if (!Array.isArray(sub)) { + throw new Error("Unable to encode Struct type"); + } + return encodeSubTypes2(registry, sub, false, alias2 ? { + _alias: [...alias2.entries()].reduce((all, [k, v]) => (0, util_1.objectSpread)(all, { [k]: v }), {}) + } : {}); + }, + [index_js_1.TypeDefInfo.Tuple]: (registry, { sub }) => { + if (!Array.isArray(sub)) { + throw new Error("Unable to encode Tuple type"); + } + return `(${sub.map((type) => encodeTypeDef2(registry, type)).join(",")})`; + }, + [index_js_1.TypeDefInfo.UInt]: (_registry, { length = 32 }) => `UInt<${length}>`, + [index_js_1.TypeDefInfo.Vec]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "Vec"), + [index_js_1.TypeDefInfo.VecFixed]: (_registry, { length, sub }) => { + if (!(0, util_1.isNumber)(length) || !sub || Array.isArray(sub)) { + throw new Error("Unable to encode VecFixed type"); + } + return `[${sub.type};${length}]`; + }, + [index_js_1.TypeDefInfo.WrapperKeepOpaque]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "WrapperKeepOpaque"), + [index_js_1.TypeDefInfo.WrapperOpaque]: (registry, typeDef) => encodeWithParams2(registry, typeDef, "WrapperOpaque") + }; + function encodeType3(registry, typeDef, withLookup = true) { + return withLookup && typeDef.lookupName ? typeDef.lookupName : encoders2[typeDef.info](registry, typeDef); + } + function encodeTypeDef2(registry, typeDef) { + return typeDef.displayName && !INFO_WRAP2.some((i) => typeDef.displayName === i) ? typeDef.displayName : encodeType3(registry, typeDef); + } + exports2.encodeTypeDef = encodeTypeDef2; + function withTypeString2(registry, typeDef) { + return (0, util_1.objectSpread)({}, typeDef, { + type: encodeType3(registry, typeDef, false) + }); + } + exports2.withTypeString = withTypeString2; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/util/xcm.js + var require_xcm = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/util/xcm.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapXcmTypes = exports2.XCM_MAPPINGS = void 0; + var util_1 = require_cjs3(); + exports2.XCM_MAPPINGS = ["AssetInstance", "Fungibility", "Junction", "Junctions", "MultiAsset", "MultiAssetFilter", "MultiLocation", "Response", "WildFungibility", "WildMultiAsset", "Xcm", "XcmError", "XcmOrder"]; + function mapXcmTypes2(version23) { + return exports2.XCM_MAPPINGS.reduce((all, key2) => (0, util_1.objectSpread)(all, { [key2]: `${key2}${version23}` }), {}); + } + exports2.mapXcmTypes = mapXcmTypes2; + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/util/index.js + var require_util3 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/util/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_encodeTypes(), exports2); + tslib_1.__exportStar(require_getTypeDef(), exports2); + tslib_1.__exportStar(require_typeSplit(), exports2); + tslib_1.__exportStar(require_xcm(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/exports.js + var require_exports = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/exports.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_create(), exports2); + tslib_1.__exportStar(require_util3(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/bundle.js + var require_bundle5 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TypeDefInfo = exports2.packageInfo = void 0; + var tslib_1 = require_tslib(); + var packageInfo_js_1 = require_packageInfo17(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + var index_js_1 = require_types3(); + Object.defineProperty(exports2, "TypeDefInfo", { enumerable: true, get: function() { + return index_js_1.TypeDefInfo; + } }); + tslib_1.__exportStar(require_exports(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-create/cjs/index.js + var require_cjs9 = __commonJS({ + "../../node_modules/@polkadot/types-create/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect4(); + tslib_1.__exportStar(require_bundle5(), exports2); + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/xcm/v0.js + var require_v02 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/xcm/v0.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v0 = void 0; + exports2.v0 = { + FungibilityV0: "FungibilityV1", + WildFungibilityV0: "WildFungibilityV1", + AssetInstanceV0: { + _enum: { + Undefined: "Null", + Index8: "u8", + Index16: "Compact", + Index32: "Compact", + Index64: "Compact", + Index128: "Compact", + Array4: "[u8; 4]", + Array8: "[u8; 8]", + Array16: "[u8; 16]", + Array32: "[u8; 32]", + Blob: "Vec" + } + }, + JunctionV0: { + _enum: { + Parent: "Null", + Parachain: "Compact", + AccountId32: { + network: "NetworkId", + id: "AccountId" + }, + AccountIndex64: { + network: "NetworkId", + index: "Compact" + }, + AccountKey20: { + network: "NetworkId", + key: "[u8; 20]" + }, + PalletInstance: "u8", + GeneralIndex: "Compact", + GeneralKey: "Vec", + OnlyChild: "Null", + Plurality: { + id: "BodyId", + part: "BodyPart" + } + } + }, + MultiAssetV0: { + _enum: { + None: "Null", + All: "Null", + AllFungible: "Null", + AllNonFungible: "Null", + AllAbstractFungible: "Vec", + AllAbstractNonFungible: "Vec", + AllConcreteFungible: "MultiLocationV0", + AllConcreteNonFungible: "MultiLocationV0", + AbstractFungible: { + id: "Vec", + instance: "Compact" + }, + AbstractNonFungible: { + class: "Vec", + instance: "AssetInstanceV0" + }, + ConcreteFungible: { + id: "MultiLocationV0", + amount: "Compact" + }, + ConcreteNonFungible: { + class: "MultiLocationV0", + instance: "AssetInstanceV0" + } + } + }, + MultiLocationV0: { + _enum: { + Here: "Null", + X1: "JunctionV0", + X2: "(JunctionV0, JunctionV0)", + X3: "(JunctionV0, JunctionV0, JunctionV0)", + X4: "(JunctionV0, JunctionV0, JunctionV0, JunctionV0)", + X5: "(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)", + X6: "(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)", + X7: "(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)", + X8: "(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)" + } + }, + OriginKindV0: { + _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"] + }, + ResponseV0: { + _enum: { + Assets: "Vec" + } + }, + XcmV0: { + _enum: { + WithdrawAsset: { + assets: "Vec", + effects: "Vec" + }, + ReserveAssetDeposit: { + assets: "Vec", + effects: "Vec" + }, + ReceiveTeleportedAsset: { + assets: "Vec", + effects: "Vec" + }, + QueryResponse: { + queryId: "Compact", + response: "ResponseV0" + }, + TransferAsset: { + assets: "Vec", + dest: "MultiLocationV0" + }, + TransferReserveAsset: { + assets: "Vec", + dest: "MultiLocationV0", + effects: "Vec" + }, + Transact: { + originType: "XcmOriginKind", + requireWeightAtMost: "u64", + call: "DoubleEncodedCall" + }, + HrmpNewChannelOpenRequest: { + sender: "Compact", + maxMessageSize: "Compact", + maxCapacity: "Compact" + }, + HrmpChannelAccepted: { + recipient: "Compact" + }, + HrmpChannelClosing: { + initiator: "Compact", + sender: "Compact", + recipient: "Compact" + }, + RelayedFrom: { + who: "MultiLocationV0", + message: "XcmV0" + } + } + }, + XcmErrorV0: { + _enum: { + Undefined: "Null", + Overflow: "Null", + Unimplemented: "Null", + UnhandledXcmVersion: "Null", + UnhandledXcmMessage: "Null", + UnhandledEffect: "Null", + EscalationOfPrivilege: "Null", + UntrustedReserveLocation: "Null", + UntrustedTeleportLocation: "Null", + DestinationBufferOverflow: "Null", + SendFailed: "Null", + CannotReachDestination: "(MultiLocation, Xcm)", + MultiLocationFull: "Null", + FailedToDecode: "Null", + BadOrigin: "Null", + ExceedsMaxMessageSize: "Null", + FailedToTransactAsset: "Null", + WeightLimitReached: "Weight", + Wildcard: "Null", + TooMuchWeightRequired: "Null", + NotHoldingFees: "Null", + WeightNotComputable: "Null", + Barrier: "Null", + NotWithdrawable: "Null", + LocationCannotHold: "Null", + TooExpensive: "Null", + AssetNotFound: "Null", + RecursionLimitReached: "Null" + } + }, + XcmOrderV0: { + _enum: { + Null: "Null", + DepositAsset: { + assets: "Vec", + dest: "MultiLocationV0" + }, + DepositReserveAsset: { + assets: "Vec", + dest: "MultiLocationV0", + effects: "Vec" + }, + ExchangeAsset: { + give: "Vec", + receive: "Vec" + }, + InitiateReserveWithdraw: { + assets: "Vec", + reserve: "MultiLocationV0", + effects: "Vec" + }, + InitiateTeleport: { + assets: "Vec", + dest: "MultiLocationV0", + effects: "Vec" + }, + QueryHolding: { + queryId: "Compact", + dest: "MultiLocationV0", + assets: "Vec" + }, + BuyExecution: { + fees: "MultiAssetV0", + weight: "u64", + debt: "u64", + haltOnError: "bool", + xcm: "Vec" + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/xcm/v1.js + var require_v16 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/xcm/v1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v1 = void 0; + exports2.v1 = { + AssetInstanceV1: { + _enum: { + Undefined: "Null", + Index: "Compact", + Array4: "[u8; 4]", + Array8: "[u8; 8]", + Array16: "[u8; 16]", + Array32: "[u8; 32]", + Blob: "Bytes" + } + }, + FungibilityV1: { + _enum: { + Fungible: "Compact", + NonFungible: "AssetInstanceV1" + } + }, + JunctionV1: { + _enum: { + Parachain: "Compact", + AccountId32: { + network: "NetworkId", + id: "AccountId" + }, + AccountIndex64: { + network: "NetworkId", + index: "Compact" + }, + AccountKey20: { + network: "NetworkId", + key: "[u8; 20]" + }, + PalletInstance: "u8", + GeneralIndex: "Compact", + GeneralKey: "Vec", + OnlyChild: "Null", + Plurality: { + id: "BodyId", + part: "BodyPart" + } + } + }, + JunctionsV1: { + _enum: { + Here: "Null", + X1: "JunctionV1", + X2: "(JunctionV1, JunctionV1)", + X3: "(JunctionV1, JunctionV1, JunctionV1)", + X4: "(JunctionV1, JunctionV1, JunctionV1, JunctionV1)", + X5: "(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)", + X6: "(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)", + X7: "(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)", + X8: "(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)" + } + }, + MultiAssetsV1: "Vec", + MultiAssetV1: { + id: "XcmAssetId", + fungibility: "FungibilityV1" + }, + MultiAssetFilterV1: { + _enum: { + Definite: "MultiAssetsV1", + Wild: "WildMultiAssetV1" + } + }, + MultiLocationV1: { + parents: "u8", + interior: "JunctionsV1" + }, + OriginKindV1: "OriginKindV0", + ResponseV1: { + _enum: { + Assets: "MultiAssetsV1" + } + }, + WildFungibilityV1: { + _enum: ["Fungible", "NonFungible"] + }, + WildMultiAssetV1: { + _enum: { + All: "Null", + AllOf: { + id: "XcmAssetId", + fungibility: "WildFungibilityV1" + } + } + }, + XcmV1: { + _enum: { + WithdrawAsset: { + assets: "MultiAssetsV1", + effects: "Vec" + }, + ReserveAssetDeposit: { + assets: "MultiAssetsV1", + effects: "Vec" + }, + ReceiveTeleportedAsset: { + assets: "MultiAssetsV1", + effects: "Vec" + }, + QueryResponse: { + queryId: "Compact", + response: "ResponseV1" + }, + TransferAsset: { + assets: "MultiAssetsV1", + dest: "MultiLocationV1" + }, + TransferReserveAsset: { + assets: "MultiAssetsV1", + dest: "MultiLocationV1", + effects: "Vec" + }, + Transact: { + originType: "XcmOriginKind", + requireWeightAtMost: "u64", + call: "DoubleEncodedCall" + }, + HrmpNewChannelOpenRequest: { + sender: "Compact", + maxMessageSize: "Compact", + maxCapacity: "Compact" + }, + HrmpChannelAccepted: { + recipient: "Compact" + }, + HrmpChannelClosing: { + initiator: "Compact", + sender: "Compact", + recipient: "Compact" + }, + RelayedFrom: { + who: "MultiLocationV1", + message: "XcmV1" + } + } + }, + XcmErrorV1: { + _enum: { + Undefined: "Null", + Overflow: "Null", + Unimplemented: "Null", + UnhandledXcmVersion: "Null", + UnhandledXcmMessage: "Null", + UnhandledEffect: "Null", + EscalationOfPrivilege: "Null", + UntrustedReserveLocation: "Null", + UntrustedTeleportLocation: "Null", + DestinationBufferOverflow: "Null", + SendFailed: "Null", + CannotReachDestination: "(MultiLocationV1, XcmV1)", + MultiLocationFull: "Null", + FailedToDecode: "Null", + BadOrigin: "Null", + ExceedsMaxMessageSize: "Null", + FailedToTransactAsset: "Null", + WeightLimitReached: "Weight", + Wildcard: "Null", + TooMuchWeightRequired: "Null", + NotHoldingFees: "Null", + WeightNotComputable: "Null", + Barrier: "Null", + NotWithdrawable: "Null", + LocationCannotHold: "Null", + TooExpensive: "Null", + AssetNotFound: "Null", + DestinationUnsupported: "Null", + RecursionLimitReached: "Null" + } + }, + XcmOrderV1: { + _enum: { + Noop: "Null", + DepositAsset: { + assets: "MultiAssetFilterV1", + maxAssets: "u32", + beneficiary: "MultiLocationV1" + }, + DepositReserveAsset: { + assets: "MultiAssetFilterV1", + maxAssets: "u32", + dest: "MultiLocationV1", + effects: "Vec" + }, + ExchangeAsset: { + give: "MultiAssetFilterV1", + receive: "MultiAssetsV1" + }, + InitiateReserveWithdraw: { + assets: "MultiAssetFilterV1", + reserve: "MultiLocationV1", + effects: "Vec" + }, + InitiateTeleport: { + assets: "MultiAssetFilterV1", + dest: "MultiLocationV1", + effects: "Vec" + }, + QueryHolding: { + queryId: "Compact", + dest: "MultiLocationV1", + assets: "MultiAssetFilterV1" + }, + BuyExecution: { + fees: "MultiAssetV1", + weight: "u64", + debt: "u64", + haltOnError: "bool", + instructions: "Vec" + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/xcm/v2.js + var require_v2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/xcm/v2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.v2 = void 0; + exports2.v2 = { + AssetInstanceV2: "AssetInstanceV1", + FungibilityV2: "FungibilityV1", + JunctionV2: "JunctionV1", + JunctionsV2: "JunctionsV1", + MultiAssetsV2: "MultiAssetsV1", + MultiAssetV2: "MultiAssetV1", + MultiAssetFilterV2: "MultiAssetFilterV1", + MultiLocationV2: "MultiLocationV1", + OriginKindV2: "OriginKindV1", + WildFungibilityV2: "WildFungibilityV1", + ResponseV2: { + _enum: { + Null: "Null", + Assets: "MultiAssetsV2", + ExecutionResult: "ResponseV2Result" + } + }, + ResponseV2Error: "(u32, XcmErrorV2)", + ResponseV2Result: "Result", + WeightLimitV2: { + _enum: { + Unlimited: "Null", + Limited: "Compact" + } + }, + InstructionV2: { + _enum: { + WithdrawAsset: "MultiAssetsV2", + ReserveAssetDeposited: "MultiAssetsV2", + ReceiveTeleportedAsset: "MultiAssetsV2", + QueryResponse: { + queryId: "Compact", + response: "ResponseV2", + maxWeight: "Compact" + }, + TransferAsset: { + assets: "MultiAssetsV2", + beneficiary: "MultiLocationV2" + }, + TransferReserveAsset: { + assets: "MultiAssetsV2", + dest: "MultiLocationV2", + xcm: "XcmV2" + }, + Transact: { + originType: "OriginKindV2", + requireWeightAtMost: "u64", + call: "DoubleEncodedCall" + }, + HrmpNewChannelOpenRequest: { + sender: "Compact", + maxMessageSize: "Compact", + maxCapacity: "Compact" + }, + HrmpChannelAccepted: { + recipient: "Compact" + }, + HrmpChannelClosing: { + initiator: "Compact", + sender: "Compact", + recipient: "Compact" + }, + ClearOrigin: "Null", + DescendOrigin: "InteriorMultiLocation", + ReportError: { + queryId: "Compact", + dest: "MultiLocationV2", + maxResponseWeight: "Compact" + }, + DepositAsset: { + assets: "MultiAssetFilterV2", + maxAssets: "u32", + beneficiary: "MultiLocationV2" + }, + DepositReserveAsset: { + assets: "MultiAssetFilterV2", + maxAssets: "u32", + dest: "MultiLocationV2", + xcm: "XcmV2" + }, + ExchangeAsset: { + give: "MultiAssetFilterV2", + receive: "MultiAssetsV2" + }, + InitiateReserveWithdraw: { + assets: "MultiAssetFilterV2", + reserve: "MultiLocationV2", + xcm: "XcmV2" + }, + InitiateTeleport: { + assets: "MultiAssetFilterV2", + dest: "MultiLocationV2", + xcm: "XcmV2" + }, + QueryHolding: { + query_id: "Compact", + dest: "MultiLocationV2", + assets: "MultiAssetFilterV2", + maxResponse_Weight: "Compact" + }, + BuyExecution: { + fees: "MultiAssetV2", + weightLimit: "WeightLimitV2" + }, + RefundSurplus: "Null", + SetErrorHandler: "XcmV2", + SetAppendix: "XcmV2", + ClearError: "Null", + ClaimAsset: { + assets: "MultiAssetsV2", + ticket: "MultiLocationV2" + }, + Trap: "u64" + } + }, + WildMultiAssetV2: "WildMultiAssetV1", + XcmV2: "Vec", + XcmErrorV2: { + _enum: { + Undefined: "Null", + Overflow: "Null", + Unimplemented: "Null", + UnhandledXcmVersion: "Null", + UnhandledXcmMessage: "Null", + UnhandledEffect: "Null", + EscalationOfPrivilege: "Null", + UntrustedReserveLocation: "Null", + UntrustedTeleportLocation: "Null", + DestinationBufferOverflow: "Null", + MultiLocationFull: "Null", + MultiLocationNotInvertible: "Null", + FailedToDecode: "Null", + BadOrigin: "Null", + ExceedsMaxMessageSize: "Null", + FailedToTransactAsset: "Null", + WeightLimitReached: "Weight", + Wildcard: "Null", + TooMuchWeightRequired: "Null", + NotHoldingFees: "Null", + WeightNotComputable: "Null", + Barrier: "Null", + NotWithdrawable: "Null", + LocationCannotHold: "Null", + TooExpensive: "Null", + AssetNotFound: "Null", + DestinationUnsupported: "Null", + RecursionLimitReached: "Null", + Transport: "Null", + Unroutable: "Null", + UnknownWeightRequired: "Null", + Trap: "u64", + UnknownClaim: "Null", + InvalidLocation: "Null" + } + }, + XcmOrderV2: "XcmOrderV1" + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/xcm/definitions.js + var require_definitions62 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/xcm/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var types_create_1 = require_cjs9(); + var v0_js_1 = require_v02(); + var v1_js_1 = require_v16(); + var v2_js_1 = require_v2(); + var XCM_LATEST2 = "V2"; + var xcm2 = { + XcmOrigin: { + _enum: { + Xcm: "MultiLocation" + } + }, + XcmpMessageFormat: { + _enum: ["ConcatenatedVersionedXcm", "ConcatenatedEncodedBlob", "Signals"] + }, + XcmAssetId: { + _enum: { + Concrete: "MultiLocation", + Abstract: "Bytes" + } + }, + InboundStatus: { + _enum: ["Ok", "Suspended"] + }, + OutboundStatus: { + _enum: ["Ok", "Suspended"] + }, + MultiAssets: "Vec" + }; + var location2 = { + BodyId: { + _enum: { + Unit: "Null", + Named: "Vec", + Index: "Compact", + Executive: "Null", + Technical: "Null", + Legislative: "Null", + Judicial: "Null" + } + }, + BodyPart: { + _enum: { + Voice: "Null", + Members: "Compact", + Fraction: { + nom: "Compact", + denom: "Compact" + }, + AtLeastProportion: { + nom: "Compact", + denom: "Compact" + }, + MoreThanProportion: { + nom: "Compact", + denom: "Compact" + } + } + }, + InteriorMultiLocation: "Junctions", + NetworkId: { + _enum: { + Any: "Null", + Named: "Vec", + Polkadot: "Null", + Kusama: "Null" + } + } + }; + exports2.default = { + rpc: {}, + types: { + ...location2, + ...xcm2, + ...v0_js_1.v0, + ...v1_js_1.v1, + ...v2_js_1.v2, + ...(0, types_create_1.mapXcmTypes)(XCM_LATEST2), + DoubleEncodedCall: { + encoded: "Vec" + }, + XcmOriginKind: { + _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"] + }, + Outcome: { + _enum: { + Complete: "Weight", + Incomplete: "(Weight, XcmErrorV0)", + Error: "XcmErrorV0" + } + }, + QueryId: "u64", + QueryStatus: { + _enum: { + Pending: { + responder: "VersionedMultiLocation", + maybeNotify: "Option<(u8, u8)>", + timeout: "BlockNumber" + }, + Ready: { + response: "VersionedResponse", + at: "BlockNumber" + } + } + }, + QueueConfigData: { + suspendThreshold: "u32", + dropThreshold: "u32", + resumeThreshold: "u32", + thresholdWeight: "Weight", + weightRestrictDecay: "Weight" + }, + VersionMigrationStage: { + _enum: { + MigrateSupportedVersion: "Null", + MigrateVersionNotifiers: "Null", + NotifyCurrentTargets: "Option", + MigrateAndNotifyOldTargets: "Null" + } + }, + VersionedMultiAsset: { + _enum: { + V0: "MultiAssetV0", + V1: "MultiAssetV1", + V2: "MultiAssetV2" + } + }, + VersionedMultiAssets: { + _enum: { + V0: "Vec", + V1: "MultiAssetsV1", + V2: "MultiAssetsV2" + } + }, + VersionedMultiLocation: { + _enum: { + V0: "MultiLocationV0", + V1: "MultiLocationV1", + V2: "MultiLocationV2" + } + }, + VersionedResponse: { + V0: "ResponseV0", + V1: "ResponseV1", + V2: "ResponseV2" + }, + VersionedXcm: { + _enum: { + V0: "XcmV0", + V1: "XcmV1", + V2: "XcmV2" + } + }, + XcmVersion: "u32" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/contractsAbi/definitions.js + var require_definitions63 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/contractsAbi/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var layout2 = { + ContractCryptoHasher: { + _enum: ["Blake2x256", "Sha2x256", "Keccak256"] + }, + ContractDiscriminant: "u32", + ContractLayoutArray: { + offset: "ContractLayoutKey", + len: "u32", + cellsPerElem: "u64", + layout: "ContractStorageLayout" + }, + ContractLayoutCell: { + key: "ContractLayoutKey", + ty: "SiLookupTypeId" + }, + ContractLayoutEnum: { + dispatchKey: "ContractLayoutKey", + variants: "BTreeMap" + }, + ContractLayoutHash: { + offset: "ContractLayoutKey", + strategy: "ContractLayoutHashingStrategy", + layout: "ContractStorageLayout" + }, + ContractLayoutHashingStrategy: { + hasher: "ContractCryptoHasher", + postfix: "Vec", + prefix: "Vec" + }, + ContractLayoutKey: "[u8; 32]", + ContractLayoutStruct: { + fields: "Vec" + }, + ContractLayoutStructField: { + layout: "ContractStorageLayout", + name: "Text" + }, + ContractStorageLayout: { + _enum: { + Cell: "ContractLayoutCell", + Hash: "ContractLayoutHash", + Array: "ContractLayoutArray", + Struct: "ContractLayoutStruct", + Enum: "ContractLayoutEnum" + } + } + }; + var spec2 = { + ContractConstructorSpecV0: { + name: "Text", + selector: "ContractSelector", + args: "Vec", + docs: "Vec" + }, + ContractConstructorSpecV1: { + name: "Vec", + selector: "ContractSelector", + args: "Vec", + docs: "Vec" + }, + ContractConstructorSpecV2: { + label: "Text", + selector: "ContractSelector", + args: "Vec", + docs: "Vec" + }, + ContractConstructorSpecV3: { + label: "Text", + selector: "ContractSelector", + payable: "bool", + args: "Vec", + docs: "Vec" + }, + ContractConstructorSpecV4: { + label: "Text", + selector: "ContractSelector", + payable: "bool", + args: "Vec", + docs: "Vec", + default: "bool", + returnType: "Option" + }, + ContractContractSpecV0: { + constructors: "Vec", + messages: "Vec", + events: "Vec", + docs: "Vec" + }, + ContractContractSpecV1: { + constructors: "Vec", + messages: "Vec", + events: "Vec", + docs: "Vec" + }, + ContractContractSpecV2: { + constructors: "Vec", + messages: "Vec", + events: "Vec", + docs: "Vec" + }, + ContractContractSpecV3: { + constructors: "Vec", + messages: "Vec", + events: "Vec", + docs: "Vec" + }, + ContractContractSpecV4: { + constructors: "Vec", + messages: "Vec", + events: "Vec", + docs: "Vec", + environment: "ContractEnvironmentV4" + }, + ContractContractSpecV5: { + constructors: "Vec", + messages: "Vec", + events: "Vec", + docs: "Vec", + environment: "ContractEnvironmentV4" + }, + ContractDisplayName: "SiPath", + ContractEventParamSpecV0: { + name: "Text", + indexed: "bool", + type: "ContractTypeSpec", + docs: "Vec" + }, + ContractEventParamSpecV2: { + label: "Text", + indexed: "bool", + type: "ContractTypeSpec", + docs: "Vec" + }, + ContractEventSpecV0: { + name: "Text", + args: "Vec", + docs: "Vec" + }, + ContractEventSpecV1: { + name: "Text", + args: "Vec", + docs: "Vec" + }, + ContractEventSpecV2: { + label: "Text", + args: "Vec", + docs: "Vec" + }, + ContractEventSpecV3: { + label: "Text", + args: "Vec", + docs: "Vec", + module_path: "Text", + signature_topic: "Option<[u8; 32]>" + }, + ContractMessageParamSpecV0: { + name: "Text", + type: "ContractTypeSpec" + }, + ContractMessageParamSpecV2: { + label: "Text", + type: "ContractTypeSpec" + }, + ContractMessageSpecV0: { + name: "Text", + selector: "ContractSelector", + mutates: "bool", + payable: "bool", + args: "Vec", + returnType: "Option", + docs: "Vec" + }, + ContractMessageSpecV1: { + name: "Vec", + selector: "ContractSelector", + mutates: "bool", + payable: "bool", + args: "Vec", + returnType: "Option", + docs: "Vec" + }, + ContractMessageSpecV2: { + label: "Text", + selector: "ContractSelector", + mutates: "bool", + payable: "bool", + args: "Vec", + returnType: "Option", + docs: "Vec" + }, + ContractMessageSpecV3: { + label: "Text", + selector: "ContractSelector", + mutates: "bool", + payable: "bool", + args: "Vec", + returnType: "Option", + docs: "Vec", + default: "bool" + }, + ContractSelector: "[u8; 4]", + ContractTypeSpec: { + type: "SiLookupTypeId", + displayName: "ContractDisplayName" + } + }; + var latest2 = { + ContractConstructorSpecLatest: "ContractConstructorSpecV4", + ContractEventSpecLatest: "ContractEventSpecV3", + ContractEventParamSpecLatest: "ContractEventParamSpecV2", + ContractMessageParamSpecLatest: "ContractMessageParamSpecV2", + ContractMessageSpecLatest: "ContractMessageSpecV3", + ContractMetadataLatest: "ContractMetadataV5" + }; + exports2.default = { + rpc: {}, + types: { + ...layout2, + ...spec2, + ...latest2, + ContractProjectInfo: { + source: "ContractProjectSource", + contract: "ContractProjectContract" + }, + ContractMetadataV0: { + metadataVersion: "Text", + types: "Vec", + spec: "ContractContractSpecV0" + }, + ContractMetadataV1: { + types: "Vec", + spec: "ContractContractSpecV1" + }, + ContractMetadataV2: { + types: "Vec", + spec: "ContractContractSpecV2" + }, + ContractMetadataV3: { + types: "Vec", + spec: "ContractContractSpecV3" + }, + ContractMetadataV4: { + types: "Vec", + spec: "ContractContractSpecV4", + version: "Text" + }, + ContractMetadataV5: { + types: "Vec", + spec: "ContractContractSpecV5", + version: "u64" + }, + ContractMetadata: { + _enum: { + V0: "ContractMetadataV0", + V1: "ContractMetadataV1", + V2: "ContractMetadataV2", + V3: "ContractMetadataV3", + V4: "ContractMetadataV4", + V5: "ContractMetadataV5" + } + }, + ContractProjectV0: { + metadataVersion: "Text", + source: "ContractProjectSource", + contract: "ContractProjectContract", + types: "Vec", + spec: "ContractContractSpecV0" + }, + ContractProject: "(ContractProjectInfo, ContractMetadata)", + ContractProjectContract: { + _alias: { + docs: "documentation" + }, + name: "Text", + version: "Text", + authors: "Vec", + description: "Option", + docs: "Option", + repository: "Option", + homepage: "Option", + license: "Option" + }, + ContractProjectSource: { + _alias: { + wasmHash: "hash" + }, + wasmHash: "[u8; 32]", + language: "Text", + compiler: "Text", + wasm: "Raw" + }, + ContractEnvironmentV4: { + _alias: { + hashType: "hash" + }, + accountId: "Option", + balance: "Option", + blockNumber: "Option", + hashType: "Option", + timestamp: "Option", + maxEventTopics: "Option" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/eth/rpc.js + var require_rpc10 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/eth/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + var netRpc2 = { + listening: { + aliasSection: "net", + description: "Returns true if client is actively listening for network connections. Otherwise false.", + params: [], + type: "bool" + }, + peerCount: { + aliasSection: "net", + description: "Returns number of peers connected to node.", + params: [], + type: "Text" + }, + version: { + aliasSection: "net", + description: "Returns protocol version.", + params: [], + type: "Text" + } + }; + var web3Rpc2 = { + clientVersion: { + aliasSection: "web3", + description: "Returns current client version.", + params: [], + type: "Text" + }, + sha3: { + aliasSection: "web3", + description: "Returns sha3 of the given data", + params: [{ name: "data", type: "Bytes" }], + type: "H256" + } + }; + exports2.rpc = { + ...netRpc2, + ...web3Rpc2, + accounts: { + description: "Returns accounts list.", + params: [], + type: "Vec" + }, + blockNumber: { + description: "Returns the blockNumber", + params: [], + type: "U256" + }, + call: { + description: "Call contract, returning the output data.", + params: [ + { + name: "request", + type: "EthCallRequest" + }, + { + isHistoric: true, + isOptional: true, + name: "number", + type: "BlockNumber" + } + ], + type: "Bytes" + }, + chainId: { + description: "Returns the chain ID used for transaction signing at the current best block. None is returned if not available.", + params: [], + type: "U64" + }, + coinbase: { + description: "Returns block author.", + params: [], + type: "H160" + }, + estimateGas: { + description: "Estimate gas needed for execution of given contract.", + params: [ + { + name: "request", + type: "EthCallRequest" + }, + { + isHistoric: true, + isOptional: true, + name: "number", + type: "BlockNumber" + } + ], + type: "U256" + }, + feeHistory: { + description: "Returns fee history for given block count & reward percentiles", + params: [ + { + name: "blockCount", + type: "U256" + }, + { + name: "newestBlock", + type: "BlockNumber" + }, + { + name: "rewardPercentiles", + type: "Option>" + } + ], + type: "EthFeeHistory" + }, + gasPrice: { + description: "Returns current gas price.", + params: [], + type: "U256" + }, + getBalance: { + description: "Returns balance of the given account.", + params: [ + { + name: "address", + type: "H160" + }, + { + isHistoric: true, + isOptional: true, + name: "number", + type: "BlockNumber" + } + ], + type: "U256" + }, + getBlockByHash: { + description: "Returns block with given hash.", + params: [ + { + name: "hash", + type: "H256" + }, + { + name: "full", + type: "bool" + } + ], + type: "Option" + }, + getBlockByNumber: { + description: "Returns block with given number.", + params: [ + { + name: "block", + type: "BlockNumber" + }, + { name: "full", type: "bool" } + ], + type: "Option" + }, + getBlockTransactionCountByHash: { + description: "Returns the number of transactions in a block with given hash.", + params: [ + { + name: "hash", + type: "H256" + } + ], + type: "U256" + }, + getBlockTransactionCountByNumber: { + description: "Returns the number of transactions in a block with given block number.", + params: [ + { + name: "block", + type: "BlockNumber" + } + ], + type: "U256" + }, + getCode: { + description: "Returns the code at given address at given time (block number).", + params: [ + { + name: "address", + type: "H160" + }, + { + isHistoric: true, + isOptional: true, + name: "number", + type: "BlockNumber" + } + ], + type: "Bytes" + }, + getFilterChanges: { + description: "Returns filter changes since last poll.", + params: [ + { + name: "index", + type: "U256" + } + ], + type: "EthFilterChanges" + }, + getFilterLogs: { + description: "Returns all logs matching given filter (in a range 'from' - 'to').", + params: [ + { + name: "index", + type: "U256" + } + ], + type: "Vec" + }, + getLogs: { + description: "Returns logs matching given filter object.", + params: [ + { + name: "filter", + type: "EthFilter" + } + ], + type: "Vec" + }, + getProof: { + description: "Returns proof for account and storage.", + params: [ + { + name: "address", + type: "H160" + }, + { + name: "storageKeys", + type: "Vec" + }, + { + name: "number", + type: "BlockNumber" + } + ], + type: "EthAccount" + }, + getStorageAt: { + description: "Returns content of the storage at given address.", + params: [ + { + name: "address", + type: "H160" + }, + { + name: "index", + type: "U256" + }, + { + isHistoric: true, + isOptional: true, + name: "number", + type: "BlockNumber" + } + ], + type: "H256" + }, + getTransactionByBlockHashAndIndex: { + description: "Returns transaction at given block hash and index.", + params: [ + { + name: "hash", + type: "H256" + }, + { + name: "index", + type: "U256" + } + ], + type: "EthTransaction" + }, + getTransactionByBlockNumberAndIndex: { + description: "Returns transaction by given block number and index.", + params: [ + { + name: "number", + type: "BlockNumber" + }, + { + name: "index", + type: "U256" + } + ], + type: "EthTransaction" + }, + getTransactionByHash: { + description: "Get transaction by its hash.", + params: [ + { + name: "hash", + type: "H256" + } + ], + type: "EthTransaction" + }, + getTransactionCount: { + description: "Returns the number of transactions sent from given address at given time (block number).", + params: [ + { + name: "address", + type: "H160" + }, + { + isHistoric: true, + isOptional: true, + name: "number", + type: "BlockNumber" + } + ], + type: "U256" + }, + getTransactionReceipt: { + description: "Returns transaction receipt by transaction hash.", + params: [ + { + name: "hash", + type: "H256" + } + ], + type: "EthReceipt" + }, + getUncleByBlockHashAndIndex: { + description: "Returns an uncles at given block and index.", + params: [ + { + name: "hash", + type: "H256" + }, + { + name: "index", + type: "U256" + } + ], + type: "EthRichBlock" + }, + getUncleByBlockNumberAndIndex: { + description: "Returns an uncles at given block and index.", + params: [ + { + name: "number", + type: "BlockNumber" + }, + { + name: "index", + type: "U256" + } + ], + type: "EthRichBlock" + }, + getUncleCountByBlockHash: { + description: "Returns the number of uncles in a block with given hash.", + params: [ + { + name: "hash", + type: "H256" + } + ], + type: "U256" + }, + getUncleCountByBlockNumber: { + description: "Returns the number of uncles in a block with given block number.", + params: [ + { + name: "number", + type: "BlockNumber" + } + ], + type: "U256" + }, + getWork: { + description: "Returns the hash of the current block, the seedHash, and the boundary condition to be met.", + params: [], + type: "EthWork" + }, + hashrate: { + description: "Returns the number of hashes per second that the node is mining with.", + params: [], + type: "U256" + }, + maxPriorityFeePerGas: { + description: "Returns max priority fee per gas", + params: [], + type: "U256" + }, + mining: { + description: "Returns true if client is actively mining new blocks.", + params: [], + type: "bool" + }, + newBlockFilter: { + description: "Returns id of new block filter.", + params: [], + type: "U256" + }, + newFilter: { + description: "Returns id of new filter.", + params: [ + { + name: "filter", + type: "EthFilter" + } + ], + type: "U256" + }, + newPendingTransactionFilter: { + description: "Returns id of new block filter.", + params: [], + type: "U256" + }, + protocolVersion: { + description: "Returns protocol version encoded as a string (quotes are necessary).", + params: [], + type: "u64" + }, + sendRawTransaction: { + description: "Sends signed transaction, returning its hash.", + params: [ + { + name: "bytes", + type: "Bytes" + } + ], + type: "H256" + }, + sendTransaction: { + description: "Sends transaction; will block waiting for signer to return the transaction hash", + params: [ + { + name: "tx", + type: "EthTransactionRequest" + } + ], + type: "H256" + }, + submitHashrate: { + description: "Used for submitting mining hashrate.", + params: [ + { + name: "index", + type: "U256" + }, + { + name: "hash", + type: "H256" + } + ], + type: "bool" + }, + submitWork: { + description: "Used for submitting a proof-of-work solution.", + params: [ + { + name: "nonce", + type: "H64" + }, + { + name: "headerHash", + type: "H256" + }, + { + name: "mixDigest", + type: "H256" + } + ], + type: "bool" + }, + subscribe: { + description: "Subscribe to Eth subscription.", + params: [ + { name: "kind", type: "EthSubKind" }, + { + isOptional: true, + name: "params", + type: "EthSubParams" + } + ], + pubsub: [ + "subscription", + "subscribe", + "unsubscribe" + ], + type: "Null" + }, + syncing: { + description: "Returns an object with data about the sync status or false.", + params: [], + type: "EthSyncStatus" + }, + uninstallFilter: { + description: "Uninstalls filter.", + params: [ + { + name: "index", + type: "U256" + } + ], + type: "bool" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/eth/runtime.js + var require_runtime28 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/eth/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var ethMethodsV42 = { + account_basic: { + description: "Returns pallet_evm::Accounts by address.", + params: [ + { + name: "address", + type: "H160" + } + ], + type: "EvmAccount" + }, + account_code_at: { + description: "For a given account address, returns pallet_evm::AccountCodes.", + params: [ + { + name: "address", + type: "H160" + } + ], + type: "Bytes" + }, + author: { + description: "Returns the converted FindAuthor::find_author authority id.", + params: [], + type: "H160" + }, + call: { + description: "Returns a frame_ethereum::call response. If `estimate` is true,", + params: [ + { + name: "from", + type: "H160" + }, + { + name: "to", + type: "H160" + }, + { + name: "data", + type: "Vec" + }, + { + name: "value", + type: "U256" + }, + { + name: "gasLimit", + type: "U256" + }, + { + name: "maxFeePerGas", + type: "Option" + }, + { + name: "maxPriorityFeePerGas", + type: "Option" + }, + { + name: "nonce", + type: "Option" + }, + { + name: "estimate", + type: "bool" + }, + { + name: "accessList", + type: "Option)>>" + } + ], + type: "Result" + }, + chain_id: { + description: "Returns runtime defined pallet_evm::ChainId.", + params: [], + type: "u64" + }, + create: { + description: "Returns a frame_ethereum::call response. If `estimate` is true,", + params: [ + { + name: "from", + type: "H160" + }, + { + name: "data", + type: "Vec" + }, + { + name: "value", + type: "U256" + }, + { + name: "gasLimit", + type: "U256" + }, + { + name: "maxFeePerGas", + type: "Option" + }, + { + name: "maxPriorityFeePerGas", + type: "Option" + }, + { + name: "nonce", + type: "Option" + }, + { + name: "estimate", + type: "bool" + }, + { + name: "accessList", + type: "Option)>>" + } + ], + type: "Result" + }, + current_all: { + description: "Return all the current data for a block in a single runtime call.", + params: [], + type: "(Option, Option>, Option>)" + }, + current_block: { + description: "Return the current block.", + params: [], + type: "BlockV2" + }, + current_receipts: { + description: "Return the current receipt.", + params: [], + type: "Option>" + }, + current_transaction_statuses: { + description: "Return the current transaction status.", + params: [], + type: "Option>" + }, + elasticity: { + description: "Return the elasticity multiplier.", + params: [], + type: "Option" + }, + extrinsic_filter: { + description: "Receives a `Vec` and filters all the ethereum transactions.", + params: [ + { + name: "xts", + type: "Vec" + } + ], + type: "Vec" + }, + gas_price: { + description: "Returns FixedGasPrice::min_gas_price", + params: [], + type: "u256" + }, + storage_at: { + description: "For a given account address and index, returns pallet_evm::AccountStorages.", + params: [ + { + name: "address", + type: "H160" + }, + { + name: "index", + type: "u256" + } + ], + type: "H256" + } + }; + var ethMethodsV52 = { + call: { + description: "Returns a frame_ethereum::call response. If `estimate` is true,", + params: [ + { + name: "from", + type: "H160" + }, + { + name: "to", + type: "H160" + }, + { + name: "data", + type: "Vec" + }, + { + name: "value", + type: "U256" + }, + { + name: "gasLimit", + type: "U256" + }, + { + name: "maxFeePerGas", + type: "Option" + }, + { + name: "maxPriorityFeePerGas", + type: "Option" + }, + { + name: "nonce", + type: "Option" + }, + { + name: "estimate", + type: "bool" + }, + { + name: "accessList", + type: "Option)>>" + } + ], + type: "Result" + }, + create: { + description: "Returns a frame_ethereum::call response. If `estimate` is true,", + params: [ + { + name: "from", + type: "H160" + }, + { + name: "data", + type: "Vec" + }, + { + name: "value", + type: "U256" + }, + { + name: "gasLimit", + type: "U256" + }, + { + name: "maxFeePerGas", + type: "Option" + }, + { + name: "maxPriorityFeePerGas", + type: "Option" + }, + { + name: "nonce", + type: "Option" + }, + { + name: "estimate", + type: "bool" + }, + { + name: "accessList", + type: "Option)>>" + } + ], + type: "Result" + } + }; + exports2.runtime = { + ConvertTransactionRuntimeApi: [ + { + methods: { + convert_transaction: { + description: "Converts an Ethereum-style transaction to Extrinsic", + params: [ + { + name: "transaction", + type: "TransactionV2" + } + ], + type: "Extrinsic" + } + }, + version: 2 + } + ], + DebugRuntimeApi: [ + { + methods: { + trace_block: { + description: "Trace all block extrinsics", + params: [ + { + name: "extrinsics", + type: "Vec" + }, + { + name: "knownTransactions", + type: "Vec" + } + ], + type: "Result<(), DispatchError>" + }, + trace_transaction: { + description: "Trace transaction extrinsics", + params: [ + { + name: "extrinsics", + type: "Vec" + }, + { + name: "transaction", + type: "EthTransaction" + } + ], + type: "Result<(), DispatchError>" + } + }, + version: 4 + } + ], + EthereumRuntimeRPCApi: [ + { + methods: { + ...ethMethodsV42 + }, + version: 4 + }, + { + methods: { + ...ethMethodsV42, + ...ethMethodsV52 + }, + version: 5 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/eth/definitions.js + var require_definitions64 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/eth/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc10(); + var runtime_js_1 = require_runtime28(); + var V02 = { + BlockV0: { + header: "EthHeader", + transactions: "Vec", + ommers: "Vec" + }, + LegacyTransaction: { + nonce: "U256", + gasPrice: "U256", + gasLimit: "U256", + action: "EthTransactionAction", + value: "U256", + input: "Bytes", + signature: "EthTransactionSignature" + }, + TransactionV0: "LegacyTransaction" + }; + var V13 = { + BlockV1: { + header: "EthHeader", + transactions: "Vec", + ommers: "Vec" + }, + EIP2930Transaction: { + chainId: "u64", + nonce: "U256", + gasPrice: "U256", + gasLimit: "U256", + action: "EthTransactionAction", + value: "U256", + input: "Bytes", + accessList: "EthAccessList", + oddYParity: "bool", + r: "H256", + s: "H256" + }, + TransactionV1: { + _enum: { + Legacy: "LegacyTransaction", + EIP2930: "EIP2930Transaction" + } + } + }; + var V22 = { + BlockV2: { + header: "EthHeader", + transactions: "Vec", + ommers: "Vec" + }, + EIP1559Transaction: { + chainId: "u64", + nonce: "U256", + maxPriorityFeePerGas: "U256", + maxFeePerGas: "U256", + gasLimit: "U256", + action: "EthTransactionAction", + value: "U256", + input: "Bytes", + accessList: "EthAccessList", + oddYParity: "bool", + r: "H256", + s: "H256" + }, + TransactionV2: { + _enum: { + Legacy: "LegacyTransaction", + EIP2930: "EIP2930Transaction", + EIP1559: "EIP1559Transaction" + } + } + }; + var types2 = { + ...V02, + ...V13, + ...V22, + EthereumAccountId: "GenericEthereumAccountId", + EthereumAddress: "GenericEthereumAccountId", + EthereumLookupSource: "GenericEthereumLookupSource", + EthereumSignature: "[u8; 65]", + EthAccessListItem: { + address: "EthAddress", + slots: "Vec" + }, + EthAccessList: "Vec", + EthAccount: { + address: "EthAddress", + balance: "U256", + nonce: "U256", + codeHash: "H256", + storageHash: "H256", + accountProof: "Vec", + storageProof: "Vec" + }, + EthAddress: "H160", + EthBlock: { + header: "EthHeader", + transactions: "Vec", + ommers: "Vec" + }, + EthHeader: { + parentHash: "H256", + ommersHash: "H256", + beneficiary: "EthAddress", + stateRoot: "H256", + transactionsRoot: "H256", + receiptsRoot: "H256", + logsBloom: "EthBloom", + difficulty: "U256", + number: "U256", + gasLimit: "U256", + gasUsed: "U256", + timestamp: "u64", + extraData: "Bytes", + mixMash: "H256", + nonce: "H64" + }, + EthRichBlock: { + _alias: { + blockHash: "hash", + blockSize: "size" + }, + blockHash: "Option", + parentHash: "H256", + sha3Uncles: "H256", + author: "EthAddress", + miner: "EthAddress", + stateRoot: "H256", + transactionsRoot: "H256", + receiptsRoot: "H256", + number: "Option", + gasUsed: "U256", + gasLimit: "U256", + extraData: "Bytes", + logsBloom: "EthBloom", + timestamp: "U256", + difficulty: "U256", + totalDifficulty: "Option", + sealFields: "Vec", + uncles: "Vec", + transactions: "Vec", + blockSize: "Option" + }, + EthBloom: "H2048", + EthCallRequest: { + from: "Option", + to: "Option", + gasPrice: "Option", + gas: "Option", + value: "Option", + data: "Option", + nonce: "Option" + }, + EthFeeHistory: { + oldestBlock: "U256", + baseFeePerGas: "Vec", + gasUsedRatio: "Vec", + reward: "Option>>" + }, + EthFilter: { + fromBlock: "Option", + toBlock: "Option", + blockHash: "Option", + address: "Option", + topics: "Option" + }, + EthFilterAddress: { + _enum: { + Single: "EthAddress", + Multiple: "Vec", + Null: "Null" + } + }, + EthFilterChanges: { + _enum: { + Logs: "Vec", + Hashes: "Vec", + Empty: "Null" + } + }, + EthFilterTopic: { + _enum: { + Single: "EthFilterTopicInner", + Multiple: "Vec", + Null: "Null" + } + }, + EthFilterTopicEntry: "Option", + EthFilterTopicInner: { + _enum: { + Single: "EthFilterTopicEntry", + Multiple: "Vec", + Null: "Null" + } + }, + EthRichHeader: { + _alias: { + blockHash: "hash", + blockSize: "size" + }, + blockHash: "Option", + parentHash: "H256", + sha3Uncles: "H256", + author: "EthAddress", + miner: "EthAddress", + stateRoot: "H256", + transactionsRoot: "H256", + receiptsRoot: "H256", + number: "Option", + gasUsed: "U256", + gasLimit: "U256", + extraData: "Bytes", + logsBloom: "EthBloom", + timestamp: "U256", + difficulty: "U256", + sealFields: "Vec", + blockSize: "Option" + }, + EthLog: { + address: "EthAddress", + topics: "Vec", + data: "Bytes", + blockHash: "Option", + blockNumber: "Option", + transactionHash: "Option", + transactionIndex: "Option", + logIndex: "Option", + transactionLogIndex: "Option", + removed: "bool" + }, + EthReceipt: { + transactionHash: "Option", + transactionIndex: "Option", + blockHash: "Option", + from: "Option", + to: "Option", + blockNumber: "Option", + cumulativeGasUsed: "U256", + gasUsed: "Option", + contractAddress: "Option", + logs: "Vec", + root: "Option", + logsBloom: "EthBloom", + statusCode: "Option" + }, + EthReceiptV0: "EthReceipt", + EthReceiptV3: "EthReceipt", + EthStorageProof: { + key: "U256", + value: "U256", + proof: "Vec" + }, + EthSubKind: { + _enum: ["newHeads", "logs", "newPendingTransactions", "syncing"] + }, + EthSubParams: { + _enum: { + None: "Null", + Logs: "EthFilter" + } + }, + EthSubResult: { + _enum: { + Header: "EthRichHeader", + Log: "EthLog", + TransactionHash: "H256", + SyncState: "EthSyncStatus" + } + }, + EthSyncInfo: { + startingBlock: "U256", + currentBlock: "U256", + highestBlock: "U256", + warpChunksAmount: "Option", + warpChunksProcessed: "Option" + }, + EthSyncStatus: { + _enum: { + Info: "EthSyncInfo", + None: "Null" + } + }, + EthTransaction: { + hash: "H256", + nonce: "U256", + blockHash: "Option", + blockNumber: "Option", + transactionIndex: "Option", + from: "H160", + to: "Option", + value: "U256", + gasPrice: "Option", + maxFeePerGas: "Option", + maxPriorityFeePerGas: "Option", + gas: "U256", + input: "Bytes", + creates: "Option", + raw: "Bytes", + publicKey: "Option", + chainId: "Option", + standardV: "U256", + v: "U256", + r: "U256", + s: "U256", + accessList: "Option>", + transactionType: "Option" + }, + EthTransactionSignature: { + v: "u64", + r: "H256", + s: "H256" + }, + EthTransactionAction: { + _enum: { + Call: "H160", + Create: "Null" + } + }, + EthTransactionCondition: { + _enum: { + block: "u64", + time: "u64" + } + }, + EthTransactionRequest: { + from: "Option", + to: "Option", + gasPrice: "Option", + gas: "Option", + value: "Option", + data: "Option", + nonce: "Option" + }, + EthTransactionStatus: { + transactionHash: "H256", + transactionIndex: "u32", + from: "EthAddress", + to: "Option", + contractAddress: "Option", + logs: "Vec", + logsBloom: "EthBloom" + }, + EthWork: { + powHash: "H256", + seedHash: "H256", + target: "H256", + number: "Option" + } + }; + exports2.default = { rpc: rpc_js_1.rpc, runtime: runtime_js_1.runtime, types: types2 }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/nimbus/runtime.js + var require_runtime29 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/nimbus/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + AuthorFilterAPI: [ + { + methods: { + can_author: { + description: "The runtime api used to predict whether an author will be eligible in the given slot", + params: [ + { + name: "author", + type: "AccountId" + }, + { + name: "relayParent", + type: "u32" + }, + { + name: "parentHeader", + type: "Header" + } + ], + type: "bool" + } + }, + version: 2 + }, + { + methods: { + can_author: { + description: "The runtime api used to predict whether an author will be eligible in the given slot", + params: [ + { + name: "author", + type: "AccountId" + }, + { + name: "relayParent", + type: "u32" + } + ], + type: "bool" + } + }, + version: 1 + } + ], + NimbusApi: [ + { + methods: { + can_author: { + description: "The runtime api used to predict whether a Nimbus author will be eligible in the given slot", + params: [ + { + name: "author", + type: "AccountId" + }, + { + name: "relayParent", + type: "u32" + }, + { + name: "parentHeader", + type: "Header" + } + ], + type: "bool" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/nimbus/definitions.js + var require_definitions65 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/nimbus/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime29(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/ormlOracle/runtime.js + var require_runtime30 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/ormlOracle/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + OracleApi: [ + { + methods: { + get_all_values: { + description: "Retrieves all values", + params: [ + { + name: "providerId", + type: "Raw" + } + ], + type: "Raw" + }, + get_value: { + description: "Retrieves a single value", + params: [ + { + name: "providerId", + type: "Raw" + }, + { + name: "key", + type: "Raw" + } + ], + type: "Option" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/ormlOracle/definitions.js + var require_definitions66 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/ormlOracle/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime30(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/ormlTokens/runtime.js + var require_runtime31 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/ormlTokens/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + TokensApi: [ + { + methods: { + query_existential_deposit: { + description: "Query the existential amount for a specific currency", + params: [ + { + name: "currencyId", + type: "Raw" + } + ], + type: "u128" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/ormlTokens/definitions.js + var require_definitions67 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/ormlTokens/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var runtime_js_1 = require_runtime31(); + exports2.default = { + rpc: {}, + runtime: runtime_js_1.runtime, + types: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/rpc/rpc.js + var require_rpc11 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/rpc/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + methods: { + description: "Retrieves the list of RPC methods that are exposed by the node", + params: [], + type: "RpcMethods" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/rpc/definitions.js + var require_definitions68 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/rpc/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc11(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: { + RpcMethods: { + version: "u32", + methods: "Vec" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/author/rpc.js + var require_rpc12 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/author/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + hasKey: { + description: "Returns true if the keystore has private keys for the given public key and key type.", + isUnsafe: true, + params: [ + { + name: "publicKey", + type: "Bytes" + }, + { + name: "keyType", + type: "Text" + } + ], + type: "bool" + }, + hasSessionKeys: { + description: "Returns true if the keystore has private keys for the given session public keys.", + isUnsafe: true, + params: [ + { + name: "sessionKeys", + type: "Bytes" + } + ], + type: "bool" + }, + insertKey: { + description: "Insert a key into the keystore.", + isUnsafe: true, + params: [ + { + name: "keyType", + type: "Text" + }, + { + name: "suri", + type: "Text" + }, + { + name: "publicKey", + type: "Bytes" + } + ], + type: "Bytes" + }, + pendingExtrinsics: { + description: "Returns all pending extrinsics, potentially grouped by sender", + params: [], + type: "Vec" + }, + removeExtrinsic: { + description: "Remove given extrinsic from the pool and temporarily ban it to prevent reimporting", + isUnsafe: true, + params: [ + { + name: "bytesOrHash", + type: "Vec" + } + ], + type: "Vec" + }, + rotateKeys: { + description: "Generate new session keys and returns the corresponding public keys", + isUnsafe: true, + params: [], + type: "Bytes" + }, + submitAndWatchExtrinsic: { + description: "Submit and subscribe to watch an extrinsic until unsubscribed", + isSigned: true, + params: [ + { + name: "extrinsic", + type: "Extrinsic" + } + ], + pubsub: [ + "extrinsicUpdate", + "submitAndWatchExtrinsic", + "unwatchExtrinsic" + ], + type: "ExtrinsicStatus" + }, + submitExtrinsic: { + description: "Submit a fully formatted extrinsic for block inclusion", + isSigned: true, + params: [ + { + name: "extrinsic", + type: "Extrinsic" + } + ], + type: "Hash" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/author/definitions.js + var require_definitions69 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/author/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc12(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: { + ExtrinsicOrHash: { + _enum: { + Hash: "Hash", + Extrinsic: "Bytes" + } + }, + ExtrinsicStatus: { + _enum: { + Future: "Null", + Ready: "Null", + Broadcast: "Vec", + InBlock: "Hash", + Retracted: "Hash", + FinalityTimeout: "Hash", + Finalized: "Hash", + Usurped: "Hash", + Dropped: "Null", + Invalid: "Null" + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/chain/rpc.js + var require_rpc13 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/chain/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + getBlock: { + description: "Get header and body of a relay chain block", + params: [ + { + isHistoric: true, + isOptional: true, + name: "hash", + type: "BlockHash" + } + ], + type: "SignedBlock" + }, + getBlockHash: { + description: "Get the block hash for a specific block", + params: [ + { + isOptional: true, + name: "blockNumber", + type: "BlockNumber" + } + ], + type: "BlockHash" + }, + getFinalizedHead: { + alias: ["chain_getFinalisedHead"], + description: "Get hash of the last finalized block in the canon chain", + params: [], + type: "BlockHash" + }, + getHeader: { + alias: ["chain_getHead"], + description: "Retrieves the header for a specific block", + params: [ + { + isHistoric: true, + isOptional: true, + name: "hash", + type: "BlockHash" + } + ], + type: "Header" + }, + subscribeAllHeads: { + description: "Retrieves the newest header via subscription", + params: [], + pubsub: [ + "allHead", + "subscribeAllHeads", + "unsubscribeAllHeads" + ], + type: "Header" + }, + subscribeFinalizedHeads: { + alias: ["chain_subscribeFinalisedHeads", "chain_unsubscribeFinalisedHeads"], + description: "Retrieves the best finalized header via subscription", + params: [], + pubsub: [ + "finalizedHead", + "subscribeFinalizedHeads", + "unsubscribeFinalizedHeads" + ], + type: "Header" + }, + subscribeNewHeads: { + alias: ["chain_unsubscribeNewHeads", "subscribe_newHead", "unsubscribe_newHead"], + description: "Retrieves the best header via subscription", + params: [], + pubsub: [ + "newHead", + "subscribeNewHead", + "unsubscribeNewHead" + ], + type: "Header" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/chain/definitions.js + var require_definitions70 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/chain/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc13(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: { + BlockHash: "Hash" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/childstate/rpc.js + var require_rpc14 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/childstate/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + getKeys: { + description: "Returns the keys with prefix from a child storage, leave empty to get all the keys", + params: [ + { + name: "childKey", + type: "PrefixedStorageKey" + }, + { + name: "prefix", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "Hash" + } + ], + type: "Vec" + }, + getKeysPaged: { + alias: ["childstate_getKeysPagedAt"], + description: "Returns the keys with prefix from a child storage with pagination support", + params: [ + { + name: "childKey", + type: "PrefixedStorageKey" + }, + { + name: "prefix", + type: "StorageKey" + }, + { + name: "count", + type: "u32" + }, + { + isOptional: true, + name: "startKey", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "Hash" + } + ], + type: "Vec" + }, + getStorage: { + description: "Returns a child storage entry at a specific block state", + params: [ + { + name: "childKey", + type: "PrefixedStorageKey" + }, + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "Hash" + } + ], + type: "Option" + }, + getStorageEntries: { + description: "Returns child storage entries for multiple keys at a specific block state", + params: [ + { + name: "childKey", + type: "PrefixedStorageKey" + }, + { + name: "keys", + type: "Vec" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "Hash" + } + ], + type: "Vec>" + }, + getStorageHash: { + description: "Returns the hash of a child storage entry at a block state", + params: [ + { + name: "childKey", + type: "PrefixedStorageKey" + }, + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "Hash" + } + ], + type: "Option" + }, + getStorageSize: { + description: "Returns the size of a child storage entry at a block state", + params: [ + { + name: "childKey", + type: "PrefixedStorageKey" + }, + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "Hash" + } + ], + type: "Option" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/childstate/definitions.js + var require_definitions71 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/childstate/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc14(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: { + PrefixedStorageKey: "StorageKey" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/offchain/rpc.js + var require_rpc15 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/offchain/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + localStorageGet: { + description: "Get offchain local storage under given key and prefix", + isUnsafe: true, + params: [ + { + name: "kind", + type: "StorageKind" + }, + { + name: "key", + type: "Bytes" + } + ], + type: "Option" + }, + localStorageSet: { + description: "Set offchain local storage under given key and prefix", + isUnsafe: true, + params: [ + { + name: "kind", + type: "StorageKind" + }, + { + name: "key", + type: "Bytes" + }, + { + name: "value", + type: "Bytes" + } + ], + type: "Null" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/offchain/runtime.js + var require_runtime32 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/offchain/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + exports2.runtime = { + OffchainWorkerApi: [ + { + methods: { + offchain_worker: { + description: "Starts the off-chain task for given block header.", + params: [ + { + name: "header", + type: "Header" + } + ], + type: "Null" + } + }, + version: 2 + }, + { + methods: { + offchain_worker: { + description: "Starts the off-chain task for given block header.", + params: [ + { + name: "number", + type: "BlockNumber" + } + ], + type: "Null" + } + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/offchain/definitions.js + var require_definitions72 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/offchain/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc15(); + var runtime_js_1 = require_runtime32(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + StorageKind: { + _enum: { + PERSISTENT: 1, + LOCAL: 2 + } + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/payment/rpc.js + var require_rpc16 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/payment/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + queryFeeDetails: { + deprecated: "Use `api.call.transactionPaymentApi.queryFeeDetails` instead", + description: "Query the detailed fee of a given encoded extrinsic", + params: [ + { + name: "extrinsic", + type: "Bytes" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "FeeDetails" + }, + queryInfo: { + deprecated: "Use `api.call.transactionPaymentApi.queryInfo` instead", + description: "Retrieves the fee information for an encoded extrinsic", + params: [ + { + name: "extrinsic", + type: "Bytes" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "RuntimeDispatchInfoV1" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/payment/runtime.js + var require_runtime33 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/payment/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runtime = void 0; + var V1_TO_V4_SHARED_PAY2 = { + query_fee_details: { + description: "The transaction fee details", + params: [ + { + name: "uxt", + type: "Extrinsic" + }, + { + name: "len", + type: "u32" + } + ], + type: "FeeDetails" + } + }; + var V1_TO_V3_SHARED_CALL2 = { + query_call_fee_details: { + description: "The call fee details", + params: [ + { + name: "call", + type: "Call" + }, + { + name: "len", + type: "u32" + } + ], + type: "FeeDetails" + } + }; + var V2_TO_V4_SHARED_PAY2 = { + query_info: { + description: "The transaction info", + params: [ + { + name: "uxt", + type: "Extrinsic" + }, + { + name: "len", + type: "u32" + } + ], + type: "RuntimeDispatchInfo" + } + }; + var V2_V3_SHARED_CALL2 = { + query_call_info: { + description: "The call info", + params: [ + { + name: "call", + type: "Call" + }, + { + name: "len", + type: "u32" + } + ], + type: "RuntimeDispatchInfo" + } + }; + var V3_SHARED_PAY_CALL2 = { + query_length_to_fee: { + description: "Query the output of the current LengthToFee given some input", + params: [ + { + name: "length", + type: "u32" + } + ], + type: "Balance" + }, + query_weight_to_fee: { + description: "Query the output of the current WeightToFee given some input", + params: [ + { + name: "weight", + type: "Weight" + } + ], + type: "Balance" + } + }; + exports2.runtime = { + TransactionPaymentApi: [ + { + methods: { + ...V3_SHARED_PAY_CALL2, + ...V2_TO_V4_SHARED_PAY2, + ...V1_TO_V4_SHARED_PAY2 + }, + version: 4 + }, + { + methods: { + ...V3_SHARED_PAY_CALL2, + ...V2_TO_V4_SHARED_PAY2, + ...V1_TO_V4_SHARED_PAY2 + }, + version: 3 + }, + { + methods: { + ...V2_TO_V4_SHARED_PAY2, + ...V1_TO_V4_SHARED_PAY2 + }, + version: 2 + }, + { + methods: { + query_info: { + description: "The transaction info", + params: [ + { + name: "uxt", + type: "Extrinsic" + }, + { + name: "len", + type: "u32" + } + ], + type: "RuntimeDispatchInfo" + }, + ...V1_TO_V4_SHARED_PAY2 + }, + version: 1 + } + ], + TransactionPaymentCallApi: [ + { + methods: { + ...V3_SHARED_PAY_CALL2, + ...V2_V3_SHARED_CALL2, + ...V1_TO_V3_SHARED_CALL2 + }, + version: 3 + }, + { + methods: { + ...V2_V3_SHARED_CALL2, + ...V1_TO_V3_SHARED_CALL2 + }, + version: 2 + }, + { + methods: { + CALL: { + description: "The call info", + params: [ + { + name: "call", + type: "Call" + }, + { + name: "len", + type: "u32" + } + ], + type: "RuntimeDispatchInfo" + }, + ...V1_TO_V3_SHARED_CALL2 + }, + version: 1 + } + ] + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/payment/definitions.js + var require_definitions73 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/payment/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc16(); + var runtime_js_1 = require_runtime33(); + exports2.default = { + rpc: rpc_js_1.rpc, + runtime: runtime_js_1.runtime, + types: { + FeeDetails: { + inclusionFee: "Option" + }, + InclusionFee: { + baseFee: "Balance", + lenFee: "Balance", + adjustedWeightFee: "Balance" + }, + RuntimeDispatchInfo: { + weight: "Weight", + class: "DispatchClass", + partialFee: "Balance" + }, + RuntimeDispatchInfoV1: { + weight: "WeightV1", + class: "DispatchClass", + partialFee: "Balance" + }, + RuntimeDispatchInfoV2: { + weight: "WeightV2", + class: "DispatchClass", + partialFee: "Balance" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/state/rpc.js + var require_rpc17 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/state/rpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rpc = void 0; + exports2.rpc = { + call: { + alias: ["state_callAt"], + description: "Perform a call to a builtin on the chain", + params: [ + { + name: "method", + type: "Text" + }, + { + name: "data", + type: "Bytes" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Bytes" + }, + getChildKeys: { + description: "Retrieves the keys with prefix of a specific child storage", + params: [ + { + name: "childStorageKey", + type: "StorageKey" + }, + { + name: "childDefinition", + type: "StorageKey" + }, + { + name: "childType", + type: "u32" + }, + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Vec" + }, + getChildReadProof: { + description: "Returns proof of storage for child key entries at a specific block state.", + params: [ + { + name: "childStorageKey", + type: "PrefixedStorageKey" + }, + { + name: "keys", + type: "Vec" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "ReadProof" + }, + getChildStorage: { + description: "Retrieves the child storage for a key", + params: [ + { + name: "childStorageKey", + type: "StorageKey" + }, + { + name: "childDefinition", + type: "StorageKey" + }, + { + name: "childType", + type: "u32" + }, + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "StorageData" + }, + getChildStorageHash: { + description: "Retrieves the child storage hash", + params: [ + { + name: "childStorageKey", + type: "StorageKey" + }, + { + name: "childDefinition", + type: "StorageKey" + }, + { + name: "childType", + type: "u32" + }, + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Hash" + }, + getChildStorageSize: { + description: "Retrieves the child storage size", + params: [ + { + name: "childStorageKey", + type: "StorageKey" + }, + { + name: "childDefinition", + type: "StorageKey" + }, + { + name: "childType", + type: "u32" + }, + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "u64" + }, + getKeys: { + deprecated: "Use `api.rpc.state.getKeysPaged` to retrieve keys", + description: "Retrieves the keys with a certain prefix", + params: [ + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Vec" + }, + getKeysPaged: { + alias: ["state_getKeysPagedAt"], + description: "Returns the keys with prefix with pagination support.", + params: [ + { + name: "key", + type: "StorageKey" + }, + { + name: "count", + type: "u32" + }, + { + isOptional: true, + name: "startKey", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Vec" + }, + getMetadata: { + description: "Returns the runtime metadata", + params: [ + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Metadata" + }, + getPairs: { + deprecated: "Use `api.rpc.state.getKeysPaged` to retrieve keys", + description: "Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)", + isUnsafe: true, + params: [ + { + name: "prefix", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Vec" + }, + getReadProof: { + description: "Returns proof of storage entries at a specific block state", + params: [ + { + name: "keys", + type: "Vec" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "ReadProof" + }, + getRuntimeVersion: { + alias: ["chain_getRuntimeVersion"], + description: "Get the runtime version", + params: [ + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "RuntimeVersion" + }, + getStorage: { + alias: ["state_getStorageAt"], + description: "Retrieves the storage for a key", + params: [ + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "StorageData" + }, + getStorageHash: { + alias: ["state_getStorageHashAt"], + description: "Retrieves the storage hash", + params: [ + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Hash" + }, + getStorageSize: { + alias: ["state_getStorageSizeAt"], + description: "Retrieves the storage size", + params: [ + { + name: "key", + type: "StorageKey" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "u64" + }, + queryStorage: { + description: "Query historical storage entries (by key) starting from a start block", + isUnsafe: true, + params: [ + { + name: "keys", + type: "Vec" + }, + { + name: "fromBlock", + type: "Hash" + }, + { + isOptional: true, + name: "toBlock", + type: "BlockHash" + } + ], + type: "Vec" + }, + queryStorageAt: { + description: "Query storage entries (by key) starting at block hash given as the second parameter", + params: [ + { + name: "keys", + type: "Vec" + }, + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "Vec" + }, + subscribeRuntimeVersion: { + alias: ["chain_subscribeRuntimeVersion", "chain_unsubscribeRuntimeVersion"], + description: "Retrieves the runtime version via subscription", + params: [], + pubsub: [ + "runtimeVersion", + "subscribeRuntimeVersion", + "unsubscribeRuntimeVersion" + ], + type: "RuntimeVersion" + }, + subscribeStorage: { + description: "Subscribes to storage changes for the provided keys", + params: [ + { + isOptional: true, + name: "keys", + type: "Vec" + } + ], + pubsub: [ + "storage", + "subscribeStorage", + "unsubscribeStorage" + ], + type: "StorageChangeSet" + }, + traceBlock: { + description: "Provides a way to trace the re-execution of a single block", + isUnsafe: true, + params: [ + { + name: "block", + type: "Hash" + }, + { + name: "targets", + type: "Option" + }, + { + name: "storageKeys", + type: "Option" + }, + { + name: "methods", + type: "Option" + } + ], + type: "TraceBlockResponse" + }, + trieMigrationStatus: { + description: "Check current migration state", + isUnsafe: true, + params: [ + { + isHistoric: true, + isOptional: true, + name: "at", + type: "BlockHash" + } + ], + type: "MigrationStatusResult" + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/state/definitions.js + var require_definitions74 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/state/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var rpc_js_1 = require_rpc17(); + exports2.default = { + rpc: rpc_js_1.rpc, + types: { + ApiId: "[u8; 8]", + BlockTrace: { + blockHash: "Text", + parentHash: "Text", + tracingTargets: "Text", + storageKeys: "Text", + spans: "Vec", + events: "Vec" + }, + BlockTraceEvent: { + target: "Text", + data: "BlockTraceEventData", + parentId: "Option" + }, + BlockTraceEventData: { + stringValues: "HashMap" + }, + BlockTraceSpan: { + id: "u64", + parentId: "Option", + name: "Text", + target: "Text", + wasm: "bool" + }, + KeyValueOption: "(StorageKey, Option)", + MigrationStatusResult: { + topRemainingToMigrate: "u64", + childRemainingToMigrate: "u64" + }, + ReadProof: { + at: "Hash", + proof: "Vec" + }, + RuntimeVersionApi: "(ApiId, u32)", + RuntimeVersion: { + specName: "Text", + implName: "Text", + authoringVersion: "u32", + specVersion: "u32", + implVersion: "u32", + apis: "Vec", + transactionVersion: "u32", + stateVersion: "u8" + }, + RuntimeVersionPre4: { + specName: "Text", + implName: "Text", + authoringVersion: "u32", + specVersion: "u32", + implVersion: "u32", + apis: "Vec", + transactionVersion: "u32" + }, + RuntimeVersionPre3: { + specName: "Text", + implName: "Text", + authoringVersion: "u32", + specVersion: "u32", + implVersion: "u32", + apis: "Vec" + }, + RuntimeVersionPartial: { + specName: "Text", + specVersion: "u32", + apis: "Vec" + }, + SpecVersion: "u32", + StorageChangeSet: { + block: "Hash", + changes: "Vec" + }, + TraceBlockResponse: { + _enum: { + TraceError: "TraceError", + BlockTrace: "BlockTrace" + } + }, + TraceError: { + error: "Text" + } + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/definitions.js + var require_definitions75 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.attestations = exports2.vesting = exports2.utility = exports2.uniques = exports2.txqueue = exports2.txpayment = exports2.treasury = exports2.system = exports2.syncstate = exports2.support = exports2.statement = exports2.staking = exports2.society = exports2.session = exports2.scheduler = exports2.recovery = exports2.proxy = exports2.pow = exports2.offences = exports2.nompools = exports2.nfts = exports2.mmr = exports2.mixnet = exports2.lottery = exports2.imOnline = exports2.identity = exports2.grandpa = exports2.gilt = exports2.genesisBuilder = exports2.genericAsset = exports2.fungibles = exports2.extrinsics = exports2.evm = exports2.engine = exports2.elections = exports2.discovery = exports2.dev = exports2.democracy = exports2.contracts = exports2.consensus = exports2.collective = exports2.blockbuilder = exports2.benchmark = exports2.beefy = exports2.balances = exports2.babe = exports2.authorship = exports2.aura = exports2.assets = exports2.assetConversion = void 0; + exports2.state = exports2.payment = exports2.offchain = exports2.childstate = exports2.chain = exports2.author = exports2.rpc = exports2.ormlTokens = exports2.ormlOracle = exports2.nimbus = exports2.eth = exports2.contractsAbi = exports2.xcm = exports2.purchase = exports2.poll = exports2.parachains = exports2.finality = exports2.cumulus = exports2.crowdloan = exports2.claims = exports2.bridges = void 0; + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_essentials(), exports2); + var definitions_js_1 = require_definitions4(); + Object.defineProperty(exports2, "assetConversion", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_1).default; + } }); + var definitions_js_2 = require_definitions5(); + Object.defineProperty(exports2, "assets", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_2).default; + } }); + var definitions_js_3 = require_definitions6(); + Object.defineProperty(exports2, "aura", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_3).default; + } }); + var definitions_js_4 = require_definitions7(); + Object.defineProperty(exports2, "authorship", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_4).default; + } }); + var definitions_js_5 = require_definitions8(); + Object.defineProperty(exports2, "babe", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_5).default; + } }); + var definitions_js_6 = require_definitions9(); + Object.defineProperty(exports2, "balances", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_6).default; + } }); + var definitions_js_7 = require_definitions10(); + Object.defineProperty(exports2, "beefy", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_7).default; + } }); + var definitions_js_8 = require_definitions11(); + Object.defineProperty(exports2, "benchmark", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_8).default; + } }); + var definitions_js_9 = require_definitions12(); + Object.defineProperty(exports2, "blockbuilder", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_9).default; + } }); + var definitions_js_10 = require_definitions13(); + Object.defineProperty(exports2, "collective", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_10).default; + } }); + var definitions_js_11 = require_definitions14(); + Object.defineProperty(exports2, "consensus", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_11).default; + } }); + var definitions_js_12 = require_definitions15(); + Object.defineProperty(exports2, "contracts", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_12).default; + } }); + var definitions_js_13 = require_definitions16(); + Object.defineProperty(exports2, "democracy", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_13).default; + } }); + var definitions_js_14 = require_definitions17(); + Object.defineProperty(exports2, "dev", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_14).default; + } }); + var definitions_js_15 = require_definitions18(); + Object.defineProperty(exports2, "discovery", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_15).default; + } }); + var definitions_js_16 = require_definitions19(); + Object.defineProperty(exports2, "elections", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_16).default; + } }); + var definitions_js_17 = require_definitions20(); + Object.defineProperty(exports2, "engine", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_17).default; + } }); + var definitions_js_18 = require_definitions21(); + Object.defineProperty(exports2, "evm", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_18).default; + } }); + var definitions_js_19 = require_definitions22(); + Object.defineProperty(exports2, "extrinsics", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_19).default; + } }); + var definitions_js_20 = require_definitions23(); + Object.defineProperty(exports2, "fungibles", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_20).default; + } }); + var definitions_js_21 = require_definitions24(); + Object.defineProperty(exports2, "genericAsset", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_21).default; + } }); + var definitions_js_22 = require_definitions25(); + Object.defineProperty(exports2, "genesisBuilder", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_22).default; + } }); + var definitions_js_23 = require_definitions26(); + Object.defineProperty(exports2, "gilt", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_23).default; + } }); + var definitions_js_24 = require_definitions27(); + Object.defineProperty(exports2, "grandpa", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_24).default; + } }); + var definitions_js_25 = require_definitions28(); + Object.defineProperty(exports2, "identity", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_25).default; + } }); + var definitions_js_26 = require_definitions29(); + Object.defineProperty(exports2, "imOnline", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_26).default; + } }); + var definitions_js_27 = require_definitions30(); + Object.defineProperty(exports2, "lottery", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_27).default; + } }); + var definitions_js_28 = require_definitions31(); + Object.defineProperty(exports2, "mixnet", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_28).default; + } }); + var definitions_js_29 = require_definitions32(); + Object.defineProperty(exports2, "mmr", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_29).default; + } }); + var definitions_js_30 = require_definitions33(); + Object.defineProperty(exports2, "nfts", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_30).default; + } }); + var definitions_js_31 = require_definitions34(); + Object.defineProperty(exports2, "nompools", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_31).default; + } }); + var definitions_js_32 = require_definitions35(); + Object.defineProperty(exports2, "offences", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_32).default; + } }); + var definitions_js_33 = require_definitions36(); + Object.defineProperty(exports2, "pow", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_33).default; + } }); + var definitions_js_34 = require_definitions37(); + Object.defineProperty(exports2, "proxy", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_34).default; + } }); + var definitions_js_35 = require_definitions38(); + Object.defineProperty(exports2, "recovery", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_35).default; + } }); + var definitions_js_36 = require_definitions39(); + Object.defineProperty(exports2, "scheduler", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_36).default; + } }); + var definitions_js_37 = require_definitions40(); + Object.defineProperty(exports2, "session", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_37).default; + } }); + var definitions_js_38 = require_definitions41(); + Object.defineProperty(exports2, "society", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_38).default; + } }); + var definitions_js_39 = require_definitions42(); + Object.defineProperty(exports2, "staking", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_39).default; + } }); + var definitions_js_40 = require_definitions43(); + Object.defineProperty(exports2, "statement", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_40).default; + } }); + var definitions_js_41 = require_definitions44(); + Object.defineProperty(exports2, "support", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_41).default; + } }); + var definitions_js_42 = require_definitions45(); + Object.defineProperty(exports2, "syncstate", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_42).default; + } }); + var definitions_js_43 = require_definitions46(); + Object.defineProperty(exports2, "system", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_43).default; + } }); + var definitions_js_44 = require_definitions47(); + Object.defineProperty(exports2, "treasury", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_44).default; + } }); + var definitions_js_45 = require_definitions48(); + Object.defineProperty(exports2, "txpayment", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_45).default; + } }); + var definitions_js_46 = require_definitions49(); + Object.defineProperty(exports2, "txqueue", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_46).default; + } }); + var definitions_js_47 = require_definitions50(); + Object.defineProperty(exports2, "uniques", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_47).default; + } }); + var definitions_js_48 = require_definitions51(); + Object.defineProperty(exports2, "utility", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_48).default; + } }); + var definitions_js_49 = require_definitions52(); + Object.defineProperty(exports2, "vesting", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_49).default; + } }); + var definitions_js_50 = require_definitions53(); + Object.defineProperty(exports2, "attestations", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_50).default; + } }); + var definitions_js_51 = require_definitions54(); + Object.defineProperty(exports2, "bridges", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_51).default; + } }); + var definitions_js_52 = require_definitions55(); + Object.defineProperty(exports2, "claims", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_52).default; + } }); + var definitions_js_53 = require_definitions56(); + Object.defineProperty(exports2, "crowdloan", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_53).default; + } }); + var definitions_js_54 = require_definitions57(); + Object.defineProperty(exports2, "cumulus", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_54).default; + } }); + var definitions_js_55 = require_definitions58(); + Object.defineProperty(exports2, "finality", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_55).default; + } }); + var definitions_js_56 = require_definitions59(); + Object.defineProperty(exports2, "parachains", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_56).default; + } }); + var definitions_js_57 = require_definitions60(); + Object.defineProperty(exports2, "poll", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_57).default; + } }); + var definitions_js_58 = require_definitions61(); + Object.defineProperty(exports2, "purchase", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_58).default; + } }); + var definitions_js_59 = require_definitions62(); + Object.defineProperty(exports2, "xcm", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_59).default; + } }); + var definitions_js_60 = require_definitions63(); + Object.defineProperty(exports2, "contractsAbi", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_60).default; + } }); + var definitions_js_61 = require_definitions64(); + Object.defineProperty(exports2, "eth", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_61).default; + } }); + var definitions_js_62 = require_definitions65(); + Object.defineProperty(exports2, "nimbus", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_62).default; + } }); + var definitions_js_63 = require_definitions66(); + Object.defineProperty(exports2, "ormlOracle", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_63).default; + } }); + var definitions_js_64 = require_definitions67(); + Object.defineProperty(exports2, "ormlTokens", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_64).default; + } }); + var definitions_js_65 = require_definitions68(); + Object.defineProperty(exports2, "rpc", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_65).default; + } }); + var definitions_js_66 = require_definitions69(); + Object.defineProperty(exports2, "author", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_66).default; + } }); + var definitions_js_67 = require_definitions70(); + Object.defineProperty(exports2, "chain", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_67).default; + } }); + var definitions_js_68 = require_definitions71(); + Object.defineProperty(exports2, "childstate", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_68).default; + } }); + var definitions_js_69 = require_definitions72(); + Object.defineProperty(exports2, "offchain", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_69).default; + } }); + var definitions_js_70 = require_definitions73(); + Object.defineProperty(exports2, "payment", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_70).default; + } }); + var definitions_js_71 = require_definitions74(); + Object.defineProperty(exports2, "state", { enumerable: true, get: function() { + return tslib_1.__importDefault(definitions_js_71).default; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/jsonrpc.js + var require_jsonrpc = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/jsonrpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + var util_1 = require_cjs3(); + var defs = tslib_1.__importStar(require_definitions75()); + var jsonrpc = {}; + Object.keys(defs).forEach((s) => Object.entries(defs[s].rpc || {}).forEach(([method, def]) => { + const section = def.aliasSection || s; + if (!jsonrpc[section]) { + jsonrpc[section] = {}; + } + jsonrpc[section][method] = (0, util_1.objectSpread)({}, def, { + isSubscription: !!def.pubsub, + jsonrpc: `${section}_${method}`, + method, + section + }); + })); + exports2.default = jsonrpc; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/PortableRegistry/PortableRegistry.js + var require_PortableRegistry = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/PortableRegistry/PortableRegistry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PortableRegistry = void 0; + var types_codec_1 = require_cjs8(); + var types_create_1 = require_cjs9(); + var util_1 = require_cjs3(); + var l15 = (0, util_1.logger)("PortableRegistry"); + var TYPE_UNWRAP2 = { toNumber: () => -1 }; + var PRIMITIVE_ALIAS2 = { + Char: "u32", + Str: "Text" + }; + var PATHS_ALIAS2 = splitNamespace2([ + "sp_core::crypto::AccountId32", + "sp_runtime::generic::era::Era", + "sp_runtime::multiaddress::MultiAddress", + "fp_account::AccountId20", + "account::AccountId20", + "polkadot_runtime_common::claims::EthereumAddress", + "frame_support::weights::weight_v2::Weight", + "sp_weights::weight_v2::Weight", + "*_democracy::vote::Vote", + "*_conviction_voting::vote::Vote", + "*_identity::types::Data", + "sp_core::OpaqueMetadata", + "sp_core::OpaquePeerId", + "sp_core::offchain::OpaqueMultiaddr", + "primitive_types::*", + "sp_arithmetic::per_things::*", + "*_runtime::RuntimeCall", + "*_runtime::RuntimeEvent", + "ink::env::types::*", + "ink::primitives::types::*", + "ink_env::types::*", + "ink_primitives::types::*", + "np_runtime::accountname::AccountName", + "np_runtime::universaladdress::UniversalAddress" + ]); + var PATHS_SET2 = splitNamespace2([ + "pallet_identity::types::BitFlags" + ]); + var BITVEC_NS_LSB2 = ["bitvec::order::Lsb0", "BitOrderLsb0"]; + var BITVEC_NS_MSB2 = ["bitvec::order::Msb0", "BitOrderMsb0"]; + var BITVEC_NS2 = [...BITVEC_NS_LSB2, ...BITVEC_NS_MSB2]; + var WRAPPERS2 = ["BoundedBTreeMap", "BoundedBTreeSet", "BoundedVec", "Box", "BTreeMap", "BTreeSet", "Cow", "Option", "Range", "RangeInclusive", "Result", "WeakBoundedVec", "WrapperKeepOpaque", "WrapperOpaque"]; + var RESERVED2 = [ + "entries", + "keys", + "new", + "size", + "hash", + "registry" + ]; + var PATH_RM_INDEX_12 = ["generic", "misc", "pallet", "traits", "types"]; + function sanitizeDocs2(docs) { + const count = docs.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + result[i] = docs[i].toString(); + } + return result; + } + function splitNamespace2(values) { + const count = values.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + result[i] = values[i].split("::"); + } + return result; + } + function matchParts2(first, second) { + return first.length === second.length && first.every((a, index) => { + const b = second[index].toString(); + if (a === "*" || a === b) { + return true; + } + if (a.includes("*") && a.includes("_") && b.includes("_")) { + let suba = a.split("_"); + let subb = b.split("_"); + if (suba[0] === "*") { + const indexOf = subb.indexOf(suba[1]); + if (indexOf !== -1) { + suba = suba.slice(1); + subb = subb.slice(indexOf); + } + } + if (suba.length === 2 && suba[1] === "*" && suba[0] === subb[0]) { + return true; + } + return matchParts2(suba, subb); + } + return false; + }); + } + function getAliasPath2({ def, path }) { + if (["frame_support::weights::weight_v2::Weight", "sp_weights::weight_v2::Weight"].includes(path.join("::"))) { + return !def.isComposite || def.asComposite.fields.length === 1 ? "WeightV1" : null; + } + return path.length && PATHS_ALIAS2.some((a) => matchParts2(a, path)) ? path[path.length - 1].toString() : null; + } + function extractNameFlat2(portable, lookupIndex, params, path, isInternal = false) { + const count = path.length; + if (count === 0 || WRAPPERS2.includes(path[count - 1].toString())) { + return null; + } + const camels = new Array(count); + const lowers = new Array(count); + for (let i = 0; i < count; i++) { + const c = (0, util_1.stringPascalCase)(isInternal ? path[i].replace("pallet_", "") : path[i]); + const l16 = c.toLowerCase(); + camels[i] = c; + lowers[i] = l16; + } + let name6 = ""; + for (let i = 0; i < count; i++) { + const l16 = lowers[i]; + if (i !== 1 || !PATH_RM_INDEX_12.includes(l16)) { + if (l16 !== lowers[i + 1]) { + name6 += camels[i]; + } + } + } + if (camels[1] === "RawOrigin" && count === 2 && params.length === 2 && params[1].type.isSome) { + const instanceType = portable[params[1].type.unwrap().toNumber()]; + if (instanceType.type.path.length === 2) { + name6 = `${name6}${instanceType.type.path[1].toString()}`; + } + } + return { lookupIndex, name: name6, params }; + } + function extractName2(portable, lookupIndex, { type: { params, path } }) { + return extractNameFlat2(portable, lookupIndex, params, path); + } + function nextDupeMatches2(name6, startAt, names2) { + const result = [names2[startAt]]; + for (let i = startAt + 1, count = names2.length; i < count; i++) { + const v = names2[i]; + if (v.name === name6) { + result.push(v); + } + } + return result; + } + function rewriteDupes2(input, rewrite) { + const count = input.length; + for (let i = 0; i < count; i++) { + const a = input[i]; + for (let j10 = i + 1; j10 < count; j10++) { + const b = input[j10]; + if (a.lookupIndex !== b.lookupIndex && a.name === b.name) { + return false; + } + } + } + for (let i = 0; i < count; i++) { + const p = input[i]; + rewrite[p.lookupIndex] = p.name; + } + return true; + } + function removeDupeNames2(lookup, portable, names2) { + const rewrite = {}; + return names2.map((original, startAt) => { + const { lookupIndex, name: name6, params } = original; + if (!name6) { + return null; + } else if (rewrite[lookupIndex]) { + return original; + } + const allSame = nextDupeMatches2(name6, startAt, names2); + if (allSame.length === 1) { + return original; + } + const anyDiff = allSame.some((o) => params.length !== o.params.length || params.some((p, index) => !p.name.eq(o.params[index].name) || p.type.unwrapOr(TYPE_UNWRAP2).toNumber() !== o.params[index].type.unwrapOr(TYPE_UNWRAP2).toNumber())); + if (!anyDiff) { + return original; + } + const paramIdx = params.findIndex(({ type }, index) => allSame.every(({ params: params2 }, aIndex) => params2[index].type.isSome && (aIndex === 0 || !params2[index].type.eq(type)))); + if (paramIdx === -1) { + return original; + } + const sameCount = allSame.length; + const adjusted = new Array(sameCount); + for (let i = 0; i < sameCount; i++) { + const { lookupIndex: lookupIndex2, name: name7, params: params2 } = allSame[i]; + const { def, path } = lookup.getSiType(params2[paramIdx].type.unwrap()); + if (!def.isPrimitive && !path.length) { + return null; + } + adjusted[i] = { + lookupIndex: lookupIndex2, + name: def.isPrimitive ? `${name7}${def.asPrimitive.toString()}` : `${name7}${path[path.length - 1].toString()}` + }; + } + if (rewriteDupes2(adjusted, rewrite)) { + return original; + } + for (let i = 0; i < sameCount; i++) { + const { lookupIndex: lookupIndex2, name: name7, params: params2 } = allSame[i]; + const { def, path } = lookup.getSiType(params2[paramIdx].type.unwrap()); + const flat2 = extractNameFlat2(portable, lookupIndex2, params2, path, true); + if (def.isPrimitive || !flat2) { + return null; + } + adjusted[i] = { + lookupIndex: lookupIndex2, + name: `${name7}${flat2.name}` + }; + } + if (rewriteDupes2(adjusted, rewrite)) { + return original; + } + return null; + }).filter((n) => !!n).map(({ lookupIndex, name: name6, params }) => ({ + lookupIndex, + name: rewrite[lookupIndex] || name6, + params + })); + } + function registerTypes2(lookup, lookups, names2, params) { + lookup.registry.register(lookups); + if (params.SpRuntimeUncheckedExtrinsic) { + const [addrParam, , sigParam] = params.SpRuntimeUncheckedExtrinsic; + const siAddress = lookup.getSiType(addrParam.type.unwrap()); + const siSignature = lookup.getSiType(sigParam.type.unwrap()); + const nsSignature = siSignature.path.join("::"); + let nsAccountId = siAddress.path.join("::"); + const isMultiAddress = nsAccountId === "sp_runtime::multiaddress::MultiAddress"; + if (isMultiAddress) { + const [idParam] = siAddress.params; + nsAccountId = lookup.getSiType(idParam.type.unwrap()).path.join("::"); + } + lookup.registry.register({ + AccountId: nsAccountId.endsWith("::AccountId20") || nsAccountId.endsWith("::H160") ? "AccountId20" : "AccountId32", + Address: isMultiAddress ? "MultiAddress" : "AccountId", + ExtrinsicSignature: ["sp_runtime::MultiSignature"].includes(nsSignature) ? "MultiSignature" : names2[sigParam.type.unwrap().toNumber()] || "MultiSignature" + }); + } + } + function extractAliases2(params, isContract) { + const hasParams = Object.keys(params).some((k) => !k.startsWith("Pallet")); + const alias2 = {}; + if (params.SpRuntimeUncheckedExtrinsic) { + const [, { type }] = params.SpRuntimeUncheckedExtrinsic; + alias2[type.unwrap().toNumber()] = "Call"; + } else if (hasParams && !isContract) { + l15.warn("Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic"); + } + if (params.FrameSystemEventRecord) { + const [{ type }] = params.FrameSystemEventRecord; + alias2[type.unwrap().toNumber()] = "Event"; + } else if (hasParams && !isContract) { + l15.warn("Unable to determine runtime Event type, cannot inspect frame_system::EventRecord"); + } + return alias2; + } + function extractTypeInfo2(lookup, portable) { + const nameInfo = []; + const types2 = {}; + for (let i = 0, count = portable.length; i < count; i++) { + const type = portable[i]; + const lookupIndex = type.id.toNumber(); + const extracted = extractName2(portable, lookupIndex, portable[i]); + if (extracted) { + nameInfo.push(extracted); + } + types2[lookupIndex] = type; + } + const lookups = {}; + const names2 = {}; + const params = {}; + const dedup = removeDupeNames2(lookup, portable, nameInfo); + for (let i = 0, count = dedup.length; i < count; i++) { + const { lookupIndex, name: name6, params: p } = dedup[i]; + names2[lookupIndex] = name6; + lookups[name6] = lookup.registry.createLookupType(lookupIndex); + params[name6] = p; + } + return { lookups, names: names2, params, types: types2 }; + } + var PortableRegistry2 = class extends types_codec_1.Struct { + __internal__alias; + __internal__lookups; + __internal__names; + __internal__params; + __internal__typeDefs = {}; + __internal__types; + constructor(registry, value, isContract) { + super(registry, { + types: "Vec" + }, value); + const { lookups, names: names2, params, types: types2 } = extractTypeInfo2(this, this.types); + this.__internal__alias = extractAliases2(params, isContract); + this.__internal__lookups = lookups; + this.__internal__names = names2; + this.__internal__params = params; + this.__internal__types = types2; + } + get names() { + return Object.values(this.__internal__names).sort(); + } + get paramTypes() { + return this.__internal__params; + } + get types() { + return this.getT("types"); + } + register() { + registerTypes2(this, this.__internal__lookups, this.__internal__names, this.__internal__params); + } + getName(lookupId) { + return this.__internal__names[this.__internal__getLookupId(lookupId)]; + } + getSiType(lookupId) { + const found = (this.__internal__types || this.types)[this.__internal__getLookupId(lookupId)]; + if (!found) { + throw new Error(`PortableRegistry: Unable to find type with lookupId ${lookupId.toString()}`); + } + return found.type; + } + getTypeDef(lookupId) { + const lookupIndex = this.__internal__getLookupId(lookupId); + if (!this.__internal__typeDefs[lookupIndex]) { + const lookupName = this.__internal__names[lookupIndex]; + const empty = { + info: types_create_1.TypeDefInfo.DoNotConstruct, + lookupIndex, + lookupName, + type: this.registry.createLookupType(lookupIndex) + }; + if (lookupName) { + this.__internal__typeDefs[lookupIndex] = empty; + } + const extracted = this.__internal__extract(this.getSiType(lookupId), lookupIndex); + if (!lookupName) { + this.__internal__typeDefs[lookupIndex] = empty; + } + Object.keys(extracted).forEach((k) => { + if (k !== "lookupName" || extracted[k]) { + this.__internal__typeDefs[lookupIndex][k] = extracted[k]; + } + }); + if (extracted.info === types_create_1.TypeDefInfo.Plain) { + this.__internal__typeDefs[lookupIndex].lookupNameRoot = this.__internal__typeDefs[lookupIndex].lookupName; + delete this.__internal__typeDefs[lookupIndex].lookupName; + } + } + return this.__internal__typeDefs[lookupIndex]; + } + sanitizeField(name6) { + let nameField = null; + let nameOrig = null; + if (name6.isSome) { + nameField = (0, util_1.stringCamelCase)(name6.unwrap()); + if (nameField.includes("#")) { + nameOrig = nameField; + nameField = nameOrig.replace(/#/g, "_"); + } else if (RESERVED2.includes(nameField)) { + nameOrig = nameField; + nameField = `${nameField}_`; + } + } + return [nameField, nameOrig]; + } + __internal__createSiDef(lookupId) { + const typeDef = this.getTypeDef(lookupId); + const lookupIndex = lookupId.toNumber(); + return [types_create_1.TypeDefInfo.DoNotConstruct, types_create_1.TypeDefInfo.Enum, types_create_1.TypeDefInfo.Struct].includes(typeDef.info) && typeDef.lookupName ? { + docs: typeDef.docs, + info: types_create_1.TypeDefInfo.Si, + lookupIndex, + lookupName: this.__internal__names[lookupIndex], + type: this.registry.createLookupType(lookupId) + } : typeDef; + } + __internal__getLookupId(lookupId) { + if ((0, util_1.isString)(lookupId)) { + if (!this.registry.isLookupType(lookupId)) { + throw new Error(`PortableRegistry: Expected a lookup string type, found ${lookupId}`); + } + return parseInt(lookupId.replace("Lookup", ""), 10); + } else if ((0, util_1.isNumber)(lookupId)) { + return lookupId; + } + return lookupId.toNumber(); + } + __internal__extract(type, lookupIndex) { + const namespace = type.path.join("::"); + let typeDef; + const aliasType = this.__internal__alias[lookupIndex] || getAliasPath2(type); + try { + if (aliasType) { + typeDef = this.__internal__extractAliasPath(lookupIndex, aliasType); + } else { + switch (type.def.type) { + case "Array": + typeDef = this.__internal__extractArray(lookupIndex, type.def.asArray); + break; + case "BitSequence": + typeDef = this.__internal__extractBitSequence(lookupIndex, type.def.asBitSequence); + break; + case "Compact": + typeDef = this.__internal__extractCompact(lookupIndex, type.def.asCompact); + break; + case "Composite": + typeDef = this.__internal__extractComposite(lookupIndex, type, type.def.asComposite); + break; + case "HistoricMetaCompat": + typeDef = this.__internal__extractHistoric(lookupIndex, type.def.asHistoricMetaCompat); + break; + case "Primitive": + typeDef = this.__internal__extractPrimitive(lookupIndex, type); + break; + case "Sequence": + typeDef = this.__internal__extractSequence(lookupIndex, type.def.asSequence); + break; + case "Tuple": + typeDef = this.__internal__extractTuple(lookupIndex, type.def.asTuple); + break; + case "Variant": + typeDef = this.__internal__extractVariant(lookupIndex, type, type.def.asVariant); + break; + default: + (0, util_1.assertUnreachable)(type.def.type); + } + } + } catch (error) { + throw new Error(`PortableRegistry: ${lookupIndex}${namespace ? ` (${namespace})` : ""}: Error extracting ${(0, util_1.stringify)(type)}: ${error.message}`); + } + return (0, util_1.objectSpread)({ + docs: sanitizeDocs2(type.docs), + namespace + }, typeDef); + } + __internal__extractArray(_, { len, type }) { + const length = len.toNumber(); + if (length > 2048) { + throw new Error("Only support for [Type; ], where length <= 2048"); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.VecFixed, + length, + sub: this.__internal__createSiDef(type) + }); + } + __internal__extractBitSequence(_, { bitOrderType, bitStoreType }) { + const a = this.__internal__createSiDef(bitOrderType); + const b = this.__internal__createSiDef(bitStoreType); + const [bitOrder, bitStore] = BITVEC_NS2.includes(a.namespace || "") ? [a, b] : [b, a]; + if (!bitOrder.namespace || !BITVEC_NS2.includes(bitOrder.namespace)) { + throw new Error(`Unexpected bitOrder found as ${bitOrder.namespace || ""}`); + } else if (bitStore.info !== types_create_1.TypeDefInfo.Plain || bitStore.type !== "u8") { + throw new Error(`Only u8 bitStore is currently supported, found ${bitStore.type}`); + } + const isLsb = BITVEC_NS_LSB2.includes(bitOrder.namespace); + if (!isLsb) { + } + return { + info: types_create_1.TypeDefInfo.Plain, + type: "BitVec" + }; + } + __internal__extractCompact(_, { type }) { + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.Compact, + sub: this.__internal__createSiDef(type) + }); + } + __internal__extractComposite(lookupIndex, { params, path }, { fields }) { + if (path.length) { + const pathFirst = path[0].toString(); + const pathLast = path[path.length - 1].toString(); + if (path.length === 1 && pathFirst === "BTreeMap") { + if (params.length !== 2) { + throw new Error(`BTreeMap requires 2 parameters, found ${params.length}`); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.BTreeMap, + sub: params.map(({ type }) => this.__internal__createSiDef(type.unwrap())) + }); + } else if (path.length === 1 && pathFirst === "BTreeSet") { + if (params.length !== 1) { + throw new Error(`BTreeSet requires 1 parameter, found ${params.length}`); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.BTreeSet, + sub: this.__internal__createSiDef(params[0].type.unwrap()) + }); + } else if (["Range", "RangeInclusive"].includes(pathFirst)) { + if (params.length !== 1) { + throw new Error(`Range requires 1 parameter, found ${params.length}`); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: pathFirst === "Range" ? types_create_1.TypeDefInfo.Range : types_create_1.TypeDefInfo.RangeInclusive, + sub: this.__internal__createSiDef(params[0].type.unwrap()), + type: pathFirst + }); + } else if (["WrapperKeepOpaque", "WrapperOpaque"].includes(pathLast)) { + if (params.length !== 1) { + throw new Error(`WrapperOpaque requires 1 parameter, found ${params.length}`); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: pathLast === "WrapperKeepOpaque" ? types_create_1.TypeDefInfo.WrapperKeepOpaque : types_create_1.TypeDefInfo.WrapperOpaque, + sub: this.__internal__createSiDef(params[0].type.unwrap()), + type: pathLast + }); + } + } + return PATHS_SET2.some((p) => matchParts2(p, path)) ? this.__internal__extractCompositeSet(lookupIndex, params, fields) : this.__internal__extractFields(lookupIndex, fields); + } + __internal__extractCompositeSet(_, params, fields) { + if (params.length !== 1 || fields.length !== 1) { + throw new Error("Set handling expects param/field as single entries"); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.Set, + length: this.registry.createTypeUnsafe(this.registry.createLookupType(fields[0].type), []).bitLength(), + sub: this.getSiType(params[0].type.unwrap()).def.asVariant.variants.map(({ index, name: name6 }) => ({ + index: index.toNumber(), + info: types_create_1.TypeDefInfo.Plain, + name: name6.toString(), + type: "Null" + })) + }); + } + __internal__extractFields(lookupIndex, fields) { + let isStruct = true; + let isTuple = true; + const count = fields.length; + for (let f10 = 0; f10 < count; f10++) { + const { name: name6 } = fields[f10]; + isStruct = isStruct && name6.isSome; + isTuple = isTuple && name6.isNone; + } + if (!isTuple && !isStruct) { + throw new Error("Invalid fields type detected, expected either Tuple (all unnamed) or Struct (all named)"); + } + if (count === 0) { + return { + info: types_create_1.TypeDefInfo.Null, + type: "Null" + }; + } else if (isTuple && count === 1) { + const typeDef = this.__internal__createSiDef(fields[0].type); + return (0, util_1.objectSpread)({}, typeDef, lookupIndex === -1 ? null : { + lookupIndex, + lookupName: this.__internal__names[lookupIndex], + lookupNameRoot: typeDef.lookupName + }, fields[0].typeName.isSome ? { typeName: (0, types_codec_1.sanitize)(fields[0].typeName.unwrap()) } : null); + } + const [sub, alias2] = this.__internal__extractFieldsAlias(fields); + return (0, types_create_1.withTypeString)(this.registry, (0, util_1.objectSpread)({ + info: isTuple ? types_create_1.TypeDefInfo.Tuple : types_create_1.TypeDefInfo.Struct, + sub + }, alias2.size ? { alias: alias2 } : null, lookupIndex === -1 ? null : { + lookupIndex, + lookupName: this.__internal__names[lookupIndex] + })); + } + __internal__extractFieldsAlias(fields) { + const alias2 = /* @__PURE__ */ new Map(); + const count = fields.length; + const sub = new Array(count); + for (let i = 0; i < count; i++) { + const { docs, name: name6, type, typeName } = fields[i]; + const typeDef = this.__internal__createSiDef(type); + if (name6.isNone) { + sub[i] = typeDef; + } else { + const [nameField, nameOrig] = this.sanitizeField(name6); + if (nameField && nameOrig) { + alias2.set(nameField, nameOrig); + } + sub[i] = (0, util_1.objectSpread)({ + docs: sanitizeDocs2(docs), + name: nameField + }, typeDef, typeName.isSome ? { typeName: (0, types_codec_1.sanitize)(typeName.unwrap()) } : null); + } + } + return [sub, alias2]; + } + __internal__extractHistoric(_, type) { + return (0, util_1.objectSpread)({ + displayName: type.toString(), + isFromSi: true + }, (0, types_create_1.getTypeDef)(type)); + } + __internal__extractPrimitive(_, type) { + const typeStr = type.def.asPrimitive.type.toString(); + return { + info: types_create_1.TypeDefInfo.Plain, + type: PRIMITIVE_ALIAS2[typeStr] || typeStr.toLowerCase() + }; + } + __internal__extractAliasPath(_, type) { + return { + info: types_create_1.TypeDefInfo.Plain, + type + }; + } + __internal__extractSequence(lookupIndex, { type }) { + const sub = this.__internal__createSiDef(type); + if (sub.type === "u8") { + return { + info: types_create_1.TypeDefInfo.Plain, + type: "Bytes" + }; + } + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.Vec, + lookupIndex, + lookupName: this.__internal__names[lookupIndex], + sub + }); + } + __internal__extractTuple(lookupIndex, ids) { + if (ids.length === 0) { + return { + info: types_create_1.TypeDefInfo.Null, + type: "Null" + }; + } else if (ids.length === 1) { + return this.getTypeDef(ids[0]); + } + const sub = ids.map((t) => this.__internal__createSiDef(t)); + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.Tuple, + lookupIndex, + lookupName: this.__internal__names[lookupIndex], + sub + }); + } + __internal__extractVariant(lookupIndex, { params, path }, { variants }) { + if (path.length) { + const specialVariant = path[0].toString(); + if (specialVariant === "Option") { + if (params.length !== 1) { + throw new Error(`Option requires 1 parameter, found ${params.length}`); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.Option, + sub: this.__internal__createSiDef(params[0].type.unwrap()) + }); + } else if (specialVariant === "Result") { + if (params.length !== 2) { + throw new Error(`Result requires 2 parameters, found ${params.length}`); + } + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.Result, + sub: params.map(({ type }, index) => (0, util_1.objectSpread)({ + name: ["Ok", "Error"][index] + }, this.__internal__createSiDef(type.unwrap()))) + }); + } + } + if (variants.length === 0) { + return { + info: types_create_1.TypeDefInfo.Null, + type: "Null" + }; + } + return this.__internal__extractVariantEnum(lookupIndex, variants); + } + __internal__extractVariantEnum(lookupIndex, variants) { + const sub = []; + variants.slice().sort((a, b) => a.index.cmp(b.index)).forEach(({ fields, index: bnIndex, name: name6 }) => { + const index = bnIndex.toNumber(); + while (sub.length !== index) { + sub.push({ + index: sub.length, + info: types_create_1.TypeDefInfo.Null, + name: `__Unused${sub.length}`, + type: "Null" + }); + } + sub.push((0, util_1.objectSpread)(this.__internal__extractFields(-1, fields), { + index, + name: name6.toString() + })); + }); + return (0, types_create_1.withTypeString)(this.registry, { + info: types_create_1.TypeDefInfo.Enum, + lookupIndex, + lookupName: this.__internal__names[lookupIndex], + sub + }); + } + }; + exports2.PortableRegistry = PortableRegistry2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/PortableRegistry/toV1.js + var require_toV1 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/PortableRegistry/toV1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toV1 = void 0; + var util_1 = require_cjs3(); + function convertType(key2) { + return (registry, { type }) => registry.createType("Si1TypeDef", { + [key2]: { + type: type.toNumber() + } + }); + } + function convertArray(registry, { len, type }) { + return registry.createType("Si1TypeDef", { + Array: { + len, + type: type.toNumber() + } + }); + } + function convertBitSequence(registry, { bitOrderType, bitStoreType }) { + return registry.createType("Si1TypeDef", { + BitSequence: { + bitOrderType: bitOrderType.toNumber(), + bitStoreType: bitStoreType.toNumber() + } + }); + } + var convertCompact = convertType("Compact"); + function convertComposite(registry, { fields }) { + return registry.createType("Si1TypeDef", { + Composite: { + fields: convertFields(registry, fields) + } + }); + } + function convertFields(registry, fields) { + return fields.map(({ docs, name: name6, type, typeName }) => registry.createType("Si1Field", { + docs, + name: name6, + type: type.toNumber(), + typeName + })); + } + function convertPhantom(registry, path) { + console.warn(`Converting phantom type ${path.map((p) => p.toString()).join("::")} to empty tuple`); + return registry.createType("Si1TypeDef", { + Tuple: [] + }); + } + function convertPrimitive(registry, prim) { + return registry.createType("Si1TypeDef", { + Primitive: prim.toString() + }); + } + var convertSequence = convertType("Sequence"); + function convertTuple(registry, types2) { + return registry.createType("Si1TypeDef", { + Tuple: types2.map((t) => t.toNumber()) + }); + } + function convertVariant(registry, { variants }) { + return registry.createType("Si1TypeDef", { + Variant: { + variants: variants.map(({ discriminant, docs, fields, name: name6 }, index) => registry.createType("Si1Variant", { + docs, + fields: convertFields(registry, fields), + index: discriminant.isSome ? discriminant.unwrap().toNumber() : index, + name: name6 + })) + } + }); + } + function convertDef(registry, { def, path }) { + let result; + switch (def.type) { + case "Array": + result = convertArray(registry, def.asArray); + break; + case "BitSequence": + result = convertBitSequence(registry, def.asBitSequence); + break; + case "Compact": + result = convertCompact(registry, def.asCompact); + break; + case "Composite": + result = convertComposite(registry, def.asComposite); + break; + case "Phantom": + result = convertPhantom(registry, path); + break; + case "Primitive": + result = convertPrimitive(registry, def.asPrimitive); + break; + case "Sequence": + result = convertSequence(registry, def.asSequence); + break; + case "Tuple": + result = convertTuple(registry, def.asTuple); + break; + case "Variant": + result = convertVariant(registry, def.asVariant); + break; + default: + (0, util_1.assertUnreachable)(def.type); + } + return result; + } + function toV1(registry, types2) { + return types2.map((t, index) => registry.createType("PortableType", { + id: index + 1, + type: { + def: convertDef(registry, t), + docs: [], + params: t.params.map((p) => registry.createType("Si1TypeParameter", { + type: p.toNumber() + })), + path: t.path.map((p) => p.toString()) + } + })); + } + exports2.toV1 = toV1; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/PortableRegistry/index.js + var require_PortableRegistry2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/PortableRegistry/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.convertSiV0toV1 = exports2.PortableRegistry = void 0; + var PortableRegistry_js_1 = require_PortableRegistry(); + Object.defineProperty(exports2, "PortableRegistry", { enumerable: true, get: function() { + return PortableRegistry_js_1.PortableRegistry; + } }); + var toV1_js_1 = require_toV1(); + Object.defineProperty(exports2, "convertSiV0toV1", { enumerable: true, get: function() { + return toV1_js_1.toV1; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/util/flattenUniq.js + var require_flattenUniq = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/util/flattenUniq.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.flattenUniq = void 0; + function flattenUniq2(list, result = []) { + for (let i = 0, count = list.length; i < count; i++) { + const entry = list[i]; + if (Array.isArray(entry)) { + flattenUniq2(entry, result); + } else { + result.push(entry); + } + } + return [...new Set(result)]; + } + exports2.flattenUniq = flattenUniq2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/util/getSiName.js + var require_getSiName = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/util/getSiName.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSiName = void 0; + function getSiName2(lookup, type) { + const typeDef = lookup.getTypeDef(type); + return typeDef.lookupName || typeDef.type; + } + exports2.getSiName = getSiName2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/util/extractTypes.js + var require_extractTypes = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/util/extractTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extractTypes = void 0; + var types_create_1 = require_cjs9(); + function extractSubSingle2(_, { sub }) { + const { lookupName, type } = sub; + return extractTypes3([lookupName || type]); + } + function extractSubArray2(_, { sub }) { + return extractTypes3(sub.map(({ lookupName, type }) => lookupName || type)); + } + function unhandled2(type, { info }) { + throw new Error(`Unhandled: Unable to create and validate type from ${type} (info=${types_create_1.TypeDefInfo[info]})`); + } + var mapping2 = { + [types_create_1.TypeDefInfo.BTreeMap]: extractSubArray2, + [types_create_1.TypeDefInfo.BTreeSet]: extractSubSingle2, + [types_create_1.TypeDefInfo.Compact]: extractSubSingle2, + [types_create_1.TypeDefInfo.DoNotConstruct]: unhandled2, + [types_create_1.TypeDefInfo.Enum]: extractSubArray2, + [types_create_1.TypeDefInfo.HashMap]: extractSubArray2, + [types_create_1.TypeDefInfo.Int]: unhandled2, + [types_create_1.TypeDefInfo.Linkage]: extractSubSingle2, + [types_create_1.TypeDefInfo.Null]: unhandled2, + [types_create_1.TypeDefInfo.Option]: extractSubSingle2, + [types_create_1.TypeDefInfo.Plain]: (_, typeDef) => typeDef.lookupName || typeDef.type, + [types_create_1.TypeDefInfo.Range]: extractSubSingle2, + [types_create_1.TypeDefInfo.RangeInclusive]: extractSubSingle2, + [types_create_1.TypeDefInfo.Result]: extractSubArray2, + [types_create_1.TypeDefInfo.Set]: extractSubArray2, + [types_create_1.TypeDefInfo.Si]: unhandled2, + [types_create_1.TypeDefInfo.Struct]: extractSubArray2, + [types_create_1.TypeDefInfo.Tuple]: extractSubArray2, + [types_create_1.TypeDefInfo.UInt]: unhandled2, + [types_create_1.TypeDefInfo.Vec]: extractSubSingle2, + [types_create_1.TypeDefInfo.VecFixed]: extractSubSingle2, + [types_create_1.TypeDefInfo.WrapperKeepOpaque]: extractSubSingle2, + [types_create_1.TypeDefInfo.WrapperOpaque]: extractSubSingle2 + }; + function extractTypes3(types2) { + const count = types2.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + const type = types2[i]; + const typeDef = (0, types_create_1.getTypeDef)(type); + result[i] = mapping2[typeDef.info](type, typeDef); + } + return result; + } + exports2.extractTypes = extractTypes3; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/util/validateTypes.js + var require_validateTypes = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/util/validateTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateTypes = void 0; + var util_1 = require_cjs3(); + var extractTypes_js_1 = require_extractTypes(); + var flattenUniq_js_1 = require_flattenUniq(); + var l15 = (0, util_1.logger)("metadata"); + function validateTypes2(registry, throwError, types2) { + const missing = (0, flattenUniq_js_1.flattenUniq)((0, extractTypes_js_1.extractTypes)(types2)).filter((type) => !registry.hasType(type) && !registry.isLookupType(type)).sort(); + if (missing.length !== 0) { + const message = `Unknown types found, no types for ${missing.join(", ")}`; + if (throwError) { + throw new Error(message); + } else { + l15.warn(message); + } + } + return types2; + } + exports2.validateTypes = validateTypes2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/util/getUniqTypes.js + var require_getUniqTypes = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/util/getUniqTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUniqTypes = void 0; + var flattenUniq_js_1 = require_flattenUniq(); + var validateTypes_js_1 = require_validateTypes(); + function extractTypes3(lookup, types2) { + return types2.map(({ type }) => lookup.getTypeDef(type).type); + } + function extractFieldTypes2(lookup, type) { + return lookup.getSiType(type).def.asVariant.variants.map(({ fields }) => extractTypes3(lookup, fields)); + } + function getPalletNames2({ lookup, pallets }) { + return pallets.reduce((all, { calls, constants: constants2, events, storage }) => { + all.push([extractTypes3(lookup, constants2)]); + if (calls.isSome) { + all.push(extractFieldTypes2(lookup, calls.unwrap().type)); + } + if (events.isSome) { + all.push(extractFieldTypes2(lookup, events.unwrap().type)); + } + if (storage.isSome) { + all.push(storage.unwrap().items.map(({ type }) => { + if (type.isPlain) { + return [lookup.getTypeDef(type.asPlain).type]; + } + const { hashers, key: key2, value } = type.asMap; + return hashers.length === 1 ? [ + lookup.getTypeDef(value).type, + lookup.getTypeDef(key2).type + ] : [ + lookup.getTypeDef(value).type, + ...lookup.getSiType(key2).def.asTuple.map((t) => lookup.getTypeDef(t).type) + ]; + })); + } + return all; + }, []); + } + function getUniqTypes2(registry, meta2, throwError) { + return (0, validateTypes_js_1.validateTypes)(registry, throwError, (0, flattenUniq_js_1.flattenUniq)(getPalletNames2(meta2))); + } + exports2.getUniqTypes = getUniqTypes2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/util/toCallsOnly.js + var require_toCallsOnly = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/util/toCallsOnly.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCallsOnly = void 0; + var util_1 = require_cjs3(); + function trimDocs2(docs) { + const strings = docs.map((d) => d.toString().trim()); + const firstEmpty = strings.findIndex((d) => !d.length); + return firstEmpty === -1 ? strings : strings.slice(0, firstEmpty); + } + function toCallsOnly2(registry, { extrinsic, lookup, pallets }) { + return registry.createTypeUnsafe("MetadataLatest", [{ + extrinsic, + lookup: { + types: lookup.types.map(({ id: id4, type }) => registry.createTypeUnsafe("PortableType", [{ + id: id4, + type: (0, util_1.objectSpread)({}, type, { docs: trimDocs2(type.docs) }) + }])) + }, + pallets: pallets.map(({ calls, index, name: name6 }) => ({ + calls: registry.createTypeUnsafe("Option", [calls.unwrapOr(null)]), + index, + name: name6 + })) + }]).toJSON(); + } + exports2.toCallsOnly = toCallsOnly2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/util/index.js + var require_util4 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/util/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateTypes = exports2.toCallsOnly = exports2.getUniqTypes = exports2.getSiName = exports2.flattenUniq = void 0; + var flattenUniq_js_1 = require_flattenUniq(); + Object.defineProperty(exports2, "flattenUniq", { enumerable: true, get: function() { + return flattenUniq_js_1.flattenUniq; + } }); + var getSiName_js_1 = require_getSiName(); + Object.defineProperty(exports2, "getSiName", { enumerable: true, get: function() { + return getSiName_js_1.getSiName; + } }); + var getUniqTypes_js_1 = require_getUniqTypes(); + Object.defineProperty(exports2, "getUniqTypes", { enumerable: true, get: function() { + return getUniqTypes_js_1.getUniqTypes; + } }); + var toCallsOnly_js_1 = require_toCallsOnly(); + Object.defineProperty(exports2, "toCallsOnly", { enumerable: true, get: function() { + return toCallsOnly_js_1.toCallsOnly; + } }); + var validateTypes_js_1 = require_validateTypes(); + Object.defineProperty(exports2, "validateTypes", { enumerable: true, get: function() { + return validateTypes_js_1.validateTypes; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/util/storage.js + var require_storage = __commonJS({ + "../../node_modules/@polkadot/types/cjs/util/storage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.unwrapStorageType = exports2.unwrapStorageSi = void 0; + var index_js_1 = require_util4(); + function unwrapStorageSi2(type) { + return type.isPlain ? type.asPlain : type.asMap.value; + } + exports2.unwrapStorageSi = unwrapStorageSi2; + function unwrapStorageType2(registry, type, isOptional) { + const outputType = (0, index_js_1.getSiName)(registry.lookup, unwrapStorageSi2(type)); + return isOptional ? `Option<${outputType}>` : outputType; + } + exports2.unwrapStorageType = unwrapStorageType2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/util/index.js + var require_util5 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/util/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_storage(), exports2); + } + }); + + // ../../node_modules/@polkadot/types/cjs/codec/index.js + var require_codec2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/codec/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WrapperOpaque = exports2.WrapperKeepOpaque = exports2.VecFixed = exports2.Vec = exports2.UInt = exports2.U8aFixed = exports2.Tuple = exports2.Struct = exports2.Set = exports2.Result = exports2.Raw = exports2.RangeInclusive = exports2.Range = exports2.Option = exports2.Map = exports2.Linkage = exports2.Json = exports2.Int = exports2.HashMap = exports2.Enum = exports2.DoNotConstruct = exports2.Compact = exports2.CodecSet = exports2.CodecMap = exports2.BTreeSet = exports2.BTreeMap = void 0; + var types_codec_1 = require_cjs8(); + Object.defineProperty(exports2, "BTreeMap", { enumerable: true, get: function() { + return types_codec_1.BTreeMap; + } }); + Object.defineProperty(exports2, "BTreeSet", { enumerable: true, get: function() { + return types_codec_1.BTreeSet; + } }); + Object.defineProperty(exports2, "CodecMap", { enumerable: true, get: function() { + return types_codec_1.CodecMap; + } }); + Object.defineProperty(exports2, "CodecSet", { enumerable: true, get: function() { + return types_codec_1.CodecSet; + } }); + Object.defineProperty(exports2, "Compact", { enumerable: true, get: function() { + return types_codec_1.Compact; + } }); + Object.defineProperty(exports2, "DoNotConstruct", { enumerable: true, get: function() { + return types_codec_1.DoNotConstruct; + } }); + Object.defineProperty(exports2, "Enum", { enumerable: true, get: function() { + return types_codec_1.Enum; + } }); + Object.defineProperty(exports2, "HashMap", { enumerable: true, get: function() { + return types_codec_1.HashMap; + } }); + Object.defineProperty(exports2, "Int", { enumerable: true, get: function() { + return types_codec_1.Int; + } }); + Object.defineProperty(exports2, "Json", { enumerable: true, get: function() { + return types_codec_1.Json; + } }); + Object.defineProperty(exports2, "Linkage", { enumerable: true, get: function() { + return types_codec_1.Linkage; + } }); + Object.defineProperty(exports2, "Map", { enumerable: true, get: function() { + return types_codec_1.Map; + } }); + Object.defineProperty(exports2, "Option", { enumerable: true, get: function() { + return types_codec_1.Option; + } }); + Object.defineProperty(exports2, "Range", { enumerable: true, get: function() { + return types_codec_1.Range; + } }); + Object.defineProperty(exports2, "RangeInclusive", { enumerable: true, get: function() { + return types_codec_1.RangeInclusive; + } }); + Object.defineProperty(exports2, "Raw", { enumerable: true, get: function() { + return types_codec_1.Raw; + } }); + Object.defineProperty(exports2, "Result", { enumerable: true, get: function() { + return types_codec_1.Result; + } }); + Object.defineProperty(exports2, "Set", { enumerable: true, get: function() { + return types_codec_1.Set; + } }); + Object.defineProperty(exports2, "Struct", { enumerable: true, get: function() { + return types_codec_1.Struct; + } }); + Object.defineProperty(exports2, "Tuple", { enumerable: true, get: function() { + return types_codec_1.Tuple; + } }); + Object.defineProperty(exports2, "U8aFixed", { enumerable: true, get: function() { + return types_codec_1.U8aFixed; + } }); + Object.defineProperty(exports2, "UInt", { enumerable: true, get: function() { + return types_codec_1.UInt; + } }); + Object.defineProperty(exports2, "Vec", { enumerable: true, get: function() { + return types_codec_1.Vec; + } }); + Object.defineProperty(exports2, "VecFixed", { enumerable: true, get: function() { + return types_codec_1.VecFixed; + } }); + Object.defineProperty(exports2, "WrapperKeepOpaque", { enumerable: true, get: function() { + return types_codec_1.WrapperKeepOpaque; + } }); + Object.defineProperty(exports2, "WrapperOpaque", { enumerable: true, get: function() { + return types_codec_1.WrapperOpaque; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/create/createClass.js + var require_createClass = __commonJS({ + "../../node_modules/@polkadot/types/cjs/create/createClass.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createClass = void 0; + var types_create_1 = require_cjs9(); + function createClass(registry, type) { + return (0, types_create_1.createClassUnsafe)(registry, type); + } + exports2.createClass = createClass; + } + }); + + // ../../node_modules/@polkadot/types/cjs/create/createType.js + var require_createType = __commonJS({ + "../../node_modules/@polkadot/types/cjs/create/createType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createType = void 0; + var types_create_1 = require_cjs9(); + function createType(registry, type, ...params) { + return (0, types_create_1.createTypeUnsafe)(registry, type, params); + } + exports2.createType = createType; + } + }); + + // ../../node_modules/@polkadot/types/cjs/create/lazy.js + var require_lazy2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/create/lazy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lazyVariants = void 0; + var util_1 = require_cjs3(); + function lazyVariants2(lookup, { type }, getName, creator) { + const result = {}; + const variants = lookup.getSiType(type).def.asVariant.variants; + for (let i = 0, count = variants.length; i < count; i++) { + (0, util_1.lazyMethod)(result, variants[i], creator, getName, i); + } + return result; + } + exports2.lazyVariants = lazyVariants2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/emptyCheck.js + var require_emptyCheck = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/emptyCheck.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.emptyCheck = void 0; + exports2.emptyCheck = { + extrinsic: {}, + payload: {} + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/polkadot.js + var require_polkadot = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/polkadot.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.polkadot = void 0; + var emptyCheck_js_1 = require_emptyCheck(); + exports2.polkadot = { + LimitParathreadCommits: emptyCheck_js_1.emptyCheck, + OnlyStakingAndClaims: emptyCheck_js_1.emptyCheck, + PrevalidateAttests: emptyCheck_js_1.emptyCheck, + RestrictFunctionality: emptyCheck_js_1.emptyCheck, + TransactionCallFilter: emptyCheck_js_1.emptyCheck, + ValidateDoubleVoteReports: emptyCheck_js_1.emptyCheck + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/shell.js + var require_shell = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/shell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shell = void 0; + var emptyCheck_js_1 = require_emptyCheck(); + exports2.shell = { + DisallowSigned: emptyCheck_js_1.emptyCheck + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/statemint.js + var require_statemint = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/statemint.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.statemint = void 0; + exports2.statemint = { + ChargeAssetTxPayment: { + extrinsic: { + tip: "Compact", + assetId: "TAssetConversion" + }, + payload: {} + } + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/substrate.js + var require_substrate = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/substrate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.substrate = void 0; + var emptyCheck_js_1 = require_emptyCheck(); + var CheckMortality2 = { + extrinsic: { + era: "ExtrinsicEra" + }, + payload: { + blockHash: "Hash" + } + }; + var ChargeTransactionPayment2 = { + extrinsic: { + tip: "Compact" + }, + payload: {} + }; + exports2.substrate = { + ChargeTransactionPayment: ChargeTransactionPayment2, + CheckBlockGasLimit: emptyCheck_js_1.emptyCheck, + CheckEra: CheckMortality2, + CheckGenesis: { + extrinsic: {}, + payload: { + genesisHash: "Hash" + } + }, + CheckMortality: CheckMortality2, + CheckNonZeroSender: emptyCheck_js_1.emptyCheck, + CheckNonce: { + extrinsic: { + nonce: "Compact" + }, + payload: {} + }, + CheckSpecVersion: { + extrinsic: {}, + payload: { + specVersion: "u32" + } + }, + CheckTxVersion: { + extrinsic: {}, + payload: { + transactionVersion: "u32" + } + }, + CheckVersion: { + extrinsic: {}, + payload: { + specVersion: "u32" + } + }, + CheckWeight: emptyCheck_js_1.emptyCheck, + LockStakingStatus: emptyCheck_js_1.emptyCheck, + SkipCheckIfFeeless: ChargeTransactionPayment2, + ValidateEquivocationReport: emptyCheck_js_1.emptyCheck + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/index.js + var require_signedExtensions = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/signedExtensions/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.expandExtensionTypes = exports2.findUnknownExtensions = exports2.fallbackExtensions = exports2.allExtensions = void 0; + var util_1 = require_cjs3(); + var polkadot_js_1 = require_polkadot(); + var shell_js_1 = require_shell(); + var statemint_js_1 = require_statemint(); + var substrate_js_1 = require_substrate(); + exports2.allExtensions = (0, util_1.objectSpread)({}, substrate_js_1.substrate, polkadot_js_1.polkadot, shell_js_1.shell, statemint_js_1.statemint); + exports2.fallbackExtensions = [ + "CheckVersion", + "CheckGenesis", + "CheckEra", + "CheckNonce", + "CheckWeight", + "ChargeTransactionPayment", + "CheckBlockGasLimit" + ]; + function findUnknownExtensions2(extensions, userExtensions = {}) { + const names2 = [...Object.keys(exports2.allExtensions), ...Object.keys(userExtensions)]; + return extensions.filter((k) => !names2.includes(k)); + } + exports2.findUnknownExtensions = findUnknownExtensions2; + function expandExtensionTypes2(extensions, type, userExtensions = {}) { + return extensions.map((k) => userExtensions[k] || exports2.allExtensions[k]).filter((info) => !!info).reduce((result, info) => (0, util_1.objectSpread)(result, info[type]), {}); + } + exports2.expandExtensionTypes = expandExtensionTypes2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/Event.js + var require_Event = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/Event.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericEvent = exports2.GenericEventData = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + function decodeEvent2(registry, value) { + if (!value?.length) { + return { DataType: types_codec_1.Null }; + } + const index = value.subarray(0, 2); + return { + DataType: registry.findMetaEvent(index), + value: { + data: value.subarray(2), + index + } + }; + } + var GenericEventData2 = class extends types_codec_1.Tuple { + __internal__meta; + __internal__method; + __internal__names = null; + __internal__section; + __internal__typeDef; + constructor(registry, value, meta2, section = "", method = "") { + const fields = meta2?.fields || []; + super(registry, fields.map(({ type }) => registry.createLookupType(type)), value); + this.__internal__meta = meta2; + this.__internal__method = method; + this.__internal__section = section; + this.__internal__typeDef = fields.map(({ type }) => registry.lookup.getTypeDef(type)); + const names2 = fields.map(({ name: name6 }) => registry.lookup.sanitizeField(name6)[0]).filter((n) => !!n); + if (names2.length === fields.length) { + this.__internal__names = names2; + (0, util_1.objectProperties)(this, names2, (_, i) => this[i]); + } + } + get meta() { + return this.__internal__meta; + } + get method() { + return this.__internal__method; + } + get names() { + return this.__internal__names; + } + get section() { + return this.__internal__section; + } + get typeDef() { + return this.__internal__typeDef; + } + toHuman(isExtended, disableAscii) { + if (this.__internal__names !== null) { + const json = {}; + for (let i = 0, count = this.__internal__names.length; i < count; i++) { + json[this.__internal__names[i]] = this[i].toHuman(isExtended, disableAscii); + } + return json; + } + return super.toHuman(isExtended); + } + }; + exports2.GenericEventData = GenericEventData2; + var GenericEvent2 = class extends types_codec_1.Struct { + constructor(registry, _value) { + const { DataType, value } = decodeEvent2(registry, _value); + super(registry, { + index: "EventId", + data: DataType + }, value); + } + get data() { + return this.getT("data"); + } + get index() { + return this.getT("index"); + } + get meta() { + return this.data.meta; + } + get method() { + return this.data.method; + } + get section() { + return this.data.section; + } + get typeDef() { + return this.data.typeDef; + } + toHuman(isExpanded, disableAscii) { + return (0, util_1.objectSpread)({ + method: this.method, + section: this.section + }, isExpanded ? { docs: this.meta.docs.map((d) => d.toString()) } : null, super.toHuman(isExpanded, disableAscii)); + } + }; + exports2.GenericEvent = GenericEvent2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/v4/Extrinsic.js + var require_Extrinsic = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/v4/Extrinsic.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicV4 = exports2.EXTRINSIC_VERSION = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + exports2.EXTRINSIC_VERSION = 4; + var GenericExtrinsicV42 = class extends types_codec_1.Struct { + constructor(registry, value, { isSigned } = {}) { + super(registry, { + signature: "ExtrinsicSignatureV4", + method: "Call" + }, GenericExtrinsicV42.decodeExtrinsic(registry, value, isSigned)); + } + static decodeExtrinsic(registry, value, isSigned = false) { + if (value instanceof GenericExtrinsicV42) { + return value; + } else if (value instanceof registry.createClassUnsafe("Call")) { + return { method: value }; + } else if ((0, util_1.isU8a)(value)) { + const signature2 = registry.createTypeUnsafe("ExtrinsicSignatureV4", [value, { isSigned }]); + const method = registry.createTypeUnsafe("Call", [value.subarray(signature2.encodedLength)]); + return { + method, + signature: signature2 + }; + } + return value || {}; + } + get encodedLength() { + return this.toU8a().length; + } + get method() { + return this.getT("method"); + } + get signature() { + return this.getT("signature"); + } + get version() { + return exports2.EXTRINSIC_VERSION; + } + addSignature(signer, signature2, payload) { + this.signature.addSignature(signer, signature2, payload); + return this; + } + sign(account, options) { + this.signature.sign(this.method, account, options); + return this; + } + signFake(signer, options) { + this.signature.signFake(this.method, signer, options); + return this; + } + }; + exports2.GenericExtrinsicV4 = GenericExtrinsicV42; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/constants.js + var require_constants2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UNMASK_VERSION = exports2.IMMORTAL_ERA = exports2.DEFAULT_VERSION = exports2.EMPTY_U8A = exports2.BIT_UNSIGNED = exports2.BIT_SIGNED = void 0; + exports2.BIT_SIGNED = 128; + exports2.BIT_UNSIGNED = 0; + exports2.EMPTY_U8A = new Uint8Array(); + exports2.DEFAULT_VERSION = 4; + exports2.IMMORTAL_ERA = new Uint8Array([0]); + exports2.UNMASK_VERSION = 127; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/Extrinsic.js + var require_Extrinsic2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/Extrinsic.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsic = exports2.LATEST_EXTRINSIC_VERSION = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var Extrinsic_js_1 = require_Extrinsic(); + Object.defineProperty(exports2, "LATEST_EXTRINSIC_VERSION", { enumerable: true, get: function() { + return Extrinsic_js_1.EXTRINSIC_VERSION; + } }); + var constants_js_1 = require_constants2(); + var VERSIONS3 = [ + "ExtrinsicUnknown", + "ExtrinsicUnknown", + "ExtrinsicUnknown", + "ExtrinsicUnknown", + "ExtrinsicV4" + ]; + function newFromValue2(registry, value, version23) { + if (value instanceof GenericExtrinsic2) { + return value.unwrap(); + } + const isSigned = (version23 & constants_js_1.BIT_SIGNED) === constants_js_1.BIT_SIGNED; + const type = VERSIONS3[version23 & constants_js_1.UNMASK_VERSION] || VERSIONS3[0]; + return registry.createTypeUnsafe(type, [value, { isSigned, version: version23 }]); + } + function decodeExtrinsic2(registry, value, version23 = constants_js_1.DEFAULT_VERSION) { + if ((0, util_1.isU8a)(value) || Array.isArray(value) || (0, util_1.isHex)(value)) { + return decodeU8a8(registry, (0, util_1.u8aToU8a)(value), version23); + } else if (value instanceof registry.createClassUnsafe("Call")) { + return newFromValue2(registry, { method: value }, version23); + } + return newFromValue2(registry, value, version23); + } + function decodeU8a8(registry, value, version23) { + if (!value.length) { + return newFromValue2(registry, new Uint8Array(), version23); + } + const [offset, length] = (0, util_1.compactFromU8a)(value); + const total = offset + length.toNumber(); + if (total > value.length) { + throw new Error(`Extrinsic: length less than remainder, expected at least ${total}, found ${value.length}`); + } + const data = value.subarray(offset, total); + return newFromValue2(registry, data.subarray(1), data[0]); + } + var ExtrinsicBase2 = class extends types_codec_1.AbstractBase { + constructor(registry, value, initialU8aLength) { + super(registry, value, initialU8aLength); + const signKeys = Object.keys(registry.getSignedExtensionTypes()); + const getter = (key2) => this.inner.signature[key2]; + for (let i = 0, count = signKeys.length; i < count; i++) { + (0, util_1.objectProperty)(this, signKeys[i], getter); + } + } + get args() { + return this.method.args; + } + get argsDef() { + return this.method.argsDef; + } + get callIndex() { + return this.method.callIndex; + } + get data() { + return this.method.data; + } + get era() { + return this.inner.signature.era; + } + get encodedLength() { + return this.toU8a().length; + } + get isSigned() { + return this.inner.signature.isSigned; + } + get length() { + return this.toU8a(true).length; + } + get meta() { + return this.method.meta; + } + get method() { + return this.inner.method; + } + get nonce() { + return this.inner.signature.nonce; + } + get signature() { + return this.inner.signature.signature; + } + get signer() { + return this.inner.signature.signer; + } + get tip() { + return this.inner.signature.tip; + } + get assetId() { + return this.inner.signature.assetId; + } + get type() { + return this.inner.version; + } + get inner() { + return this.unwrap(); + } + get version() { + return this.type | (this.isSigned ? constants_js_1.BIT_SIGNED : constants_js_1.BIT_UNSIGNED); + } + is(other) { + return this.method.is(other); + } + unwrap() { + return super.unwrap(); + } + }; + var GenericExtrinsic2 = class extends ExtrinsicBase2 { + __internal__hashCache; + constructor(registry, value, { version: version23 } = {}) { + super(registry, decodeExtrinsic2(registry, value, version23)); + } + get hash() { + if (!this.__internal__hashCache) { + this.__internal__hashCache = super.hash; + } + return this.__internal__hashCache; + } + addSignature(signer, signature2, payload) { + this.inner.addSignature(signer, signature2, payload); + this.__internal__hashCache = void 0; + return this; + } + inspect() { + const encoded = (0, util_1.u8aConcat)(...this.toU8aInner()); + return { + inner: this.isSigned ? this.inner.inspect().inner : this.inner.method.inspect().inner, + outer: [(0, util_1.compactToU8a)(encoded.length), new Uint8Array([this.version])] + }; + } + sign(account, options) { + this.inner.sign(account, options); + this.__internal__hashCache = void 0; + return this; + } + signFake(signer, options) { + this.inner.signFake(signer, options); + this.__internal__hashCache = void 0; + return this; + } + toHex(isBare) { + return (0, util_1.u8aToHex)(this.toU8a(isBare)); + } + toHuman(isExpanded, disableAscii) { + return (0, util_1.objectSpread)({}, { + isSigned: this.isSigned, + method: this.method.toHuman(isExpanded, disableAscii) + }, this.isSigned ? { + assetId: this.assetId.toHuman(isExpanded, disableAscii), + era: this.era.toHuman(isExpanded, disableAscii), + nonce: this.nonce.toHuman(isExpanded, disableAscii), + signature: this.signature.toHex(), + signer: this.signer.toHuman(isExpanded, disableAscii), + tip: this.tip.toHuman(isExpanded, disableAscii) + } : null); + } + toJSON() { + return this.toHex(); + } + toRawType() { + return "Extrinsic"; + } + toU8a(isBare) { + const encoded = (0, util_1.u8aConcat)(...this.toU8aInner()); + return isBare ? encoded : (0, util_1.compactAddLength)(encoded); + } + toU8aInner() { + return [ + new Uint8Array([this.version]), + this.inner.toU8a() + ]; + } + }; + __publicField(GenericExtrinsic2, "LATEST_EXTRINSIC_VERSION", Extrinsic_js_1.EXTRINSIC_VERSION); + exports2.GenericExtrinsic = GenericExtrinsic2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicEra.js + var require_ExtrinsicEra = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicEra.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicEra = exports2.MortalEra = exports2.ImmortalEra = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var constants_js_1 = require_constants2(); + function getTrailingZeros2(period) { + const binary = period.toString(2); + let index = 0; + while (binary[binary.length - 1 - index] === "0") { + index++; + } + return index; + } + function decodeMortalEra2(registry, value) { + if ((0, util_1.isU8a)(value) || (0, util_1.isHex)(value) || Array.isArray(value)) { + return decodeMortalU8a2(registry, (0, util_1.u8aToU8a)(value)); + } else if (!value) { + return [new types_codec_1.U64(registry), new types_codec_1.U64(registry)]; + } else if ((0, util_1.isObject)(value)) { + return decodeMortalObject2(registry, value); + } + throw new Error("Invalid data passed to Mortal era"); + } + function decodeMortalObject2(registry, value) { + const { current, period } = value; + let calPeriod = Math.pow(2, Math.ceil(Math.log2(period))); + calPeriod = Math.min(Math.max(calPeriod, 4), 1 << 16); + const phase = current % calPeriod; + const quantizeFactor = Math.max(calPeriod >> 12, 1); + const quantizedPhase = phase / quantizeFactor * quantizeFactor; + return [new types_codec_1.U64(registry, calPeriod), new types_codec_1.U64(registry, quantizedPhase)]; + } + function decodeMortalU8a2(registry, value) { + if (value.length === 0) { + return [new types_codec_1.U64(registry), new types_codec_1.U64(registry)]; + } + const first = (0, util_1.u8aToBn)(value.subarray(0, 1)).toNumber(); + const second = (0, util_1.u8aToBn)(value.subarray(1, 2)).toNumber(); + const encoded = first + (second << 8); + const period = 2 << encoded % (1 << 4); + const quantizeFactor = Math.max(period >> 12, 1); + const phase = (encoded >> 4) * quantizeFactor; + if (period < 4 || phase >= period) { + throw new Error("Invalid data passed to Mortal era"); + } + return [new types_codec_1.U64(registry, period), new types_codec_1.U64(registry, phase)]; + } + function decodeExtrinsicEra2(value = new Uint8Array()) { + if ((0, util_1.isU8a)(value)) { + return !value.length || value[0] === 0 ? new Uint8Array([0]) : new Uint8Array([1, value[0], value[1]]); + } else if (!value) { + return new Uint8Array([0]); + } else if (value instanceof GenericExtrinsicEra2) { + return decodeExtrinsicEra2(value.toU8a()); + } else if ((0, util_1.isHex)(value)) { + return decodeExtrinsicEra2((0, util_1.hexToU8a)(value)); + } else if ((0, util_1.isObject)(value)) { + const entries = Object.entries(value).map(([k, v]) => [k.toLowerCase(), v]); + const mortal = entries.find(([k]) => k.toLowerCase() === "mortalera"); + const immortal = entries.find(([k]) => k.toLowerCase() === "immortalera"); + return mortal ? { MortalEra: mortal[1] } : immortal ? { ImmortalEra: immortal[1] } : { MortalEra: value }; + } + throw new Error("Invalid data passed to Era"); + } + var ImmortalEra2 = class extends types_codec_1.Raw { + constructor(registry, _value) { + super(registry, constants_js_1.IMMORTAL_ERA); + } + }; + exports2.ImmortalEra = ImmortalEra2; + var MortalEra2 = class extends types_codec_1.Tuple { + constructor(registry, value) { + super(registry, { + period: types_codec_1.U64, + phase: types_codec_1.U64 + }, decodeMortalEra2(registry, value)); + } + get encodedLength() { + return 2 | 0; + } + get period() { + return this[0]; + } + get phase() { + return this[1]; + } + toHuman() { + return { + period: (0, util_1.formatNumber)(this.period), + phase: (0, util_1.formatNumber)(this.phase) + }; + } + toJSON() { + return this.toHex(); + } + toU8a(_isBare) { + const period = this.period.toNumber(); + const encoded = Math.min(15, Math.max(1, getTrailingZeros2(period) - 1)) + (this.phase.toNumber() / Math.max(period >> 12, 1) << 4); + return new Uint8Array([ + encoded & 255, + encoded >> 8 + ]); + } + birth(current) { + const phase = this.phase.toNumber(); + const period = this.period.toNumber(); + return ~~((Math.max((0, util_1.bnToBn)(current).toNumber(), phase) - phase) / period) * period + phase; + } + death(current) { + return this.birth(current) + this.period.toNumber(); + } + }; + exports2.MortalEra = MortalEra2; + var GenericExtrinsicEra2 = class extends types_codec_1.Enum { + constructor(registry, value) { + super(registry, { + ImmortalEra: ImmortalEra2, + MortalEra: MortalEra2 + }, decodeExtrinsicEra2(value)); + } + get encodedLength() { + return this.isImmortalEra ? this.asImmortalEra.encodedLength : this.asMortalEra.encodedLength; + } + get asImmortalEra() { + if (!this.isImmortalEra) { + throw new Error(`Cannot convert '${this.type}' via asImmortalEra`); + } + return this.inner; + } + get asMortalEra() { + if (!this.isMortalEra) { + throw new Error(`Cannot convert '${this.type}' via asMortalEra`); + } + return this.inner; + } + get isImmortalEra() { + return this.index === 0; + } + get isMortalEra() { + return this.index > 0; + } + toU8a(isBare) { + return this.isMortalEra ? this.asMortalEra.toU8a(isBare) : this.asImmortalEra.toU8a(isBare); + } + }; + exports2.GenericExtrinsicEra = GenericExtrinsicEra2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicPayload.js + var require_ExtrinsicPayload = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicPayload.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicPayload = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var constants_js_1 = require_constants2(); + var VERSIONS3 = [ + "ExtrinsicPayloadUnknown", + "ExtrinsicPayloadUnknown", + "ExtrinsicPayloadUnknown", + "ExtrinsicPayloadUnknown", + "ExtrinsicPayloadV4" + ]; + function decodeExtrinsicPayload2(registry, value, version23 = constants_js_1.DEFAULT_VERSION) { + if (value instanceof GenericExtrinsicPayload2) { + return value.unwrap(); + } + return registry.createTypeUnsafe(VERSIONS3[version23] || VERSIONS3[0], [value, { version: version23 }]); + } + var GenericExtrinsicPayload2 = class extends types_codec_1.AbstractBase { + constructor(registry, value, { version: version23 } = {}) { + super(registry, decodeExtrinsicPayload2(registry, value, version23)); + } + get blockHash() { + return this.inner.blockHash; + } + get era() { + return this.inner.era; + } + get genesisHash() { + return this.inner.genesisHash || this.registry.createTypeUnsafe("Hash", []); + } + get method() { + return this.inner.method; + } + get nonce() { + return this.inner.nonce; + } + get specVersion() { + return this.inner.specVersion || this.registry.createTypeUnsafe("u32", []); + } + get tip() { + return this.inner.tip || this.registry.createTypeUnsafe("Compact", []); + } + get transactionVersion() { + return this.inner.transactionVersion || this.registry.createTypeUnsafe("u32", []); + } + get assetId() { + return this.inner.assetId; + } + eq(other) { + return this.inner.eq(other); + } + sign(signerPair) { + const signature2 = this.inner.sign(signerPair); + return { + signature: (0, util_1.u8aToHex)(signature2) + }; + } + toHuman(isExtended, disableAscii) { + return this.inner.toHuman(isExtended, disableAscii); + } + toJSON() { + return this.toHex(); + } + toRawType() { + return "ExtrinsicPayload"; + } + toString() { + return this.toHex(); + } + toU8a(isBare) { + return super.toU8a(isBare ? { method: true } : false); + } + }; + exports2.GenericExtrinsicPayload = GenericExtrinsicPayload2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicPayloadUnknown.js + var require_ExtrinsicPayloadUnknown = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicPayloadUnknown.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicPayloadUnknown = void 0; + var types_codec_1 = require_cjs8(); + var GenericExtrinsicPayloadUnknown2 = class extends types_codec_1.Struct { + constructor(registry, _value, { version: version23 = 0 } = {}) { + super(registry, {}); + throw new Error(`Unsupported extrinsic payload version ${version23}`); + } + }; + exports2.GenericExtrinsicPayloadUnknown = GenericExtrinsicPayloadUnknown2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicUnknown.js + var require_ExtrinsicUnknown = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/ExtrinsicUnknown.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicUnknown = void 0; + var types_codec_1 = require_cjs8(); + var constants_js_1 = require_constants2(); + var GenericExtrinsicUnknown2 = class extends types_codec_1.Struct { + constructor(registry, _value, { isSigned = false, version: version23 = 0 } = {}) { + super(registry, {}); + throw new Error(`Unsupported ${isSigned ? "" : "un"}signed extrinsic version ${version23 & constants_js_1.UNMASK_VERSION}`); + } + }; + exports2.GenericExtrinsicUnknown = GenericExtrinsicUnknown2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/SignerPayload.js + var require_SignerPayload = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/SignerPayload.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericSignerPayload = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var knownTypes2 = { + address: "Address", + blockHash: "Hash", + blockNumber: "BlockNumber", + era: "ExtrinsicEra", + genesisHash: "Hash", + method: "Call", + nonce: "Compact", + runtimeVersion: "RuntimeVersion", + signedExtensions: "Vec", + tip: "Compact", + version: "u8" + }; + var GenericSignerPayload2 = class extends types_codec_1.Struct { + __internal__extraTypes; + constructor(registry, value) { + const extensionTypes = (0, util_1.objectSpread)({}, registry.getSignedExtensionTypes(), registry.getSignedExtensionExtra()); + super(registry, (0, util_1.objectSpread)({}, extensionTypes, knownTypes2), value); + this.__internal__extraTypes = {}; + const getter = (key2) => this.get(key2); + for (const [key2, type] of Object.entries(extensionTypes)) { + if (!knownTypes2[key2]) { + this.__internal__extraTypes[key2] = type; + } + (0, util_1.objectProperty)(this, key2, getter); + } + } + get address() { + return this.getT("address"); + } + get blockHash() { + return this.getT("blockHash"); + } + get blockNumber() { + return this.getT("blockNumber"); + } + get era() { + return this.getT("era"); + } + get genesisHash() { + return this.getT("genesisHash"); + } + get method() { + return this.getT("method"); + } + get nonce() { + return this.getT("nonce"); + } + get runtimeVersion() { + return this.getT("runtimeVersion"); + } + get signedExtensions() { + return this.getT("signedExtensions"); + } + get tip() { + return this.getT("tip"); + } + get assetId() { + return this.getT("assetId"); + } + get version() { + return this.getT("version"); + } + toPayload() { + const result = {}; + const keys = Object.keys(this.__internal__extraTypes); + for (let i = 0, count = keys.length; i < count; i++) { + const key2 = keys[i]; + const value = this.getT(key2); + if (!(value instanceof types_codec_1.Option) || value.isSome) { + result[key2] = value.toJSON(); + } + } + return (0, util_1.objectSpread)(result, { + address: this.address.toString(), + blockHash: this.blockHash.toHex(), + blockNumber: this.blockNumber.toHex(), + era: this.era.toHex(), + genesisHash: this.genesisHash.toHex(), + method: this.method.toHex(), + nonce: this.nonce.toHex(), + signedExtensions: this.signedExtensions.map((e) => e.toString()), + specVersion: this.runtimeVersion.specVersion.toHex(), + tip: this.tip.toHex(), + transactionVersion: this.runtimeVersion.transactionVersion.toHex(), + version: this.version.toNumber() + }); + } + toRaw() { + const payload = this.toPayload(); + const data = (0, util_1.u8aToHex)(this.registry.createTypeUnsafe("ExtrinsicPayload", [payload, { version: payload.version }]).toU8a({ method: true })); + return { + address: payload.address, + data, + type: "payload" + }; + } + }; + exports2.GenericSignerPayload = GenericSignerPayload2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/util.js + var require_util6 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sign = void 0; + function sign4(registry, signerPair, u8a, options) { + const encoded = u8a.length > 256 ? registry.hash(u8a) : u8a; + return signerPair.sign(encoded, options); + } + exports2.sign = sign4; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/v4/ExtrinsicPayload.js + var require_ExtrinsicPayload2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/v4/ExtrinsicPayload.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicPayloadV4 = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_js_1 = require_util6(); + var GenericExtrinsicPayloadV42 = class extends types_codec_1.Struct { + __internal__signOptions; + constructor(registry, value) { + super(registry, (0, util_1.objectSpread)({ method: "Bytes" }, registry.getSignedExtensionTypes(), registry.getSignedExtensionExtra()), value); + this.__internal__signOptions = { + withType: registry.createTypeUnsafe("ExtrinsicSignature", []) instanceof types_codec_1.Enum + }; + } + inspect() { + return super.inspect({ method: true }); + } + get blockHash() { + return this.getT("blockHash"); + } + get era() { + return this.getT("era"); + } + get genesisHash() { + return this.getT("genesisHash"); + } + get method() { + return this.getT("method"); + } + get nonce() { + return this.getT("nonce"); + } + get specVersion() { + return this.getT("specVersion"); + } + get tip() { + return this.getT("tip"); + } + get transactionVersion() { + return this.getT("transactionVersion"); + } + get assetId() { + return this.getT("assetId"); + } + sign(signerPair) { + return (0, util_js_1.sign)(this.registry, signerPair, this.toU8a({ method: true }), this.__internal__signOptions); + } + }; + exports2.GenericExtrinsicPayloadV4 = GenericExtrinsicPayloadV42; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/v4/ExtrinsicSignature.js + var require_ExtrinsicSignature = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/v4/ExtrinsicSignature.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicSignatureV4 = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var constants_js_1 = require_constants2(); + var ExtrinsicPayload_js_1 = require_ExtrinsicPayload2(); + var FAKE_SIGNATURE2 = new Uint8Array(256).fill(1); + function toAddress2(registry, address) { + return registry.createTypeUnsafe("Address", [(0, util_1.isU8a)(address) ? (0, util_1.u8aToHex)(address) : address]); + } + var GenericExtrinsicSignatureV42 = class extends types_codec_1.Struct { + __internal__signKeys; + constructor(registry, value, { isSigned } = {}) { + const signTypes = registry.getSignedExtensionTypes(); + super(registry, (0, util_1.objectSpread)( + { signer: "Address", signature: "ExtrinsicSignature" }, + signTypes + ), GenericExtrinsicSignatureV42.decodeExtrinsicSignature(value, isSigned)); + this.__internal__signKeys = Object.keys(signTypes); + (0, util_1.objectProperties)(this, this.__internal__signKeys, (k) => this.get(k)); + } + static decodeExtrinsicSignature(value, isSigned = false) { + if (!value) { + return constants_js_1.EMPTY_U8A; + } else if (value instanceof GenericExtrinsicSignatureV42) { + return value; + } + return isSigned ? value : constants_js_1.EMPTY_U8A; + } + get encodedLength() { + return this.isSigned ? super.encodedLength : 0; + } + get isSigned() { + return !this.signature.isEmpty; + } + get era() { + return this.getT("era"); + } + get nonce() { + return this.getT("nonce"); + } + get signature() { + return this.multiSignature.value || this.multiSignature; + } + get multiSignature() { + return this.getT("signature"); + } + get signer() { + return this.getT("signer"); + } + get tip() { + return this.getT("tip"); + } + get assetId() { + return this.getT("assetId"); + } + _injectSignature(signer, signature2, payload) { + for (let i = 0, count = this.__internal__signKeys.length; i < count; i++) { + const k = this.__internal__signKeys[i]; + const v = payload.get(k); + if (!(0, util_1.isUndefined)(v)) { + this.set(k, v); + } + } + this.set("signer", signer); + this.set("signature", signature2); + return this; + } + addSignature(signer, signature2, payload) { + return this._injectSignature(toAddress2(this.registry, signer), this.registry.createTypeUnsafe("ExtrinsicSignature", [signature2]), new ExtrinsicPayload_js_1.GenericExtrinsicPayloadV4(this.registry, payload)); + } + createPayload(method, options) { + const { era, runtimeVersion: { specVersion, transactionVersion } } = options; + return new ExtrinsicPayload_js_1.GenericExtrinsicPayloadV4(this.registry, (0, util_1.objectSpread)({}, options, { + era: era || constants_js_1.IMMORTAL_ERA, + method: method.toHex(), + specVersion, + transactionVersion + })); + } + sign(method, account, options) { + if (!account?.addressRaw) { + throw new Error(`Expected a valid keypair for signing, found ${(0, util_1.stringify)(account)}`); + } + const payload = this.createPayload(method, options); + return this._injectSignature(toAddress2(this.registry, account.addressRaw), this.registry.createTypeUnsafe("ExtrinsicSignature", [payload.sign(account)]), payload); + } + signFake(method, address, options) { + if (!address) { + throw new Error(`Expected a valid address for signing, found ${(0, util_1.stringify)(address)}`); + } + const payload = this.createPayload(method, options); + return this._injectSignature(toAddress2(this.registry, address), this.registry.createTypeUnsafe("ExtrinsicSignature", [FAKE_SIGNATURE2]), payload); + } + toU8a(isBare) { + return this.isSigned ? super.toU8a(isBare) : constants_js_1.EMPTY_U8A; + } + }; + exports2.GenericExtrinsicSignatureV4 = GenericExtrinsicSignatureV42; + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/v4/index.js + var require_v4 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/v4/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericExtrinsicSignatureV4 = exports2.GenericExtrinsicPayloadV4 = exports2.GenericExtrinsicV4 = void 0; + var Extrinsic_js_1 = require_Extrinsic(); + Object.defineProperty(exports2, "GenericExtrinsicV4", { enumerable: true, get: function() { + return Extrinsic_js_1.GenericExtrinsicV4; + } }); + var ExtrinsicPayload_js_1 = require_ExtrinsicPayload2(); + Object.defineProperty(exports2, "GenericExtrinsicPayloadV4", { enumerable: true, get: function() { + return ExtrinsicPayload_js_1.GenericExtrinsicPayloadV4; + } }); + var ExtrinsicSignature_js_1 = require_ExtrinsicSignature(); + Object.defineProperty(exports2, "GenericExtrinsicSignatureV4", { enumerable: true, get: function() { + return ExtrinsicSignature_js_1.GenericExtrinsicSignatureV4; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/extrinsic/index.js + var require_extrinsic = __commonJS({ + "../../node_modules/@polkadot/types/cjs/extrinsic/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericSignerPayload = exports2.GenericExtrinsicUnknown = exports2.GenericExtrinsicPayloadUnknown = exports2.GenericExtrinsicPayload = exports2.GenericMortalEra = exports2.GenericImmortalEra = exports2.GenericExtrinsicEra = exports2.GenericExtrinsic = void 0; + var tslib_1 = require_tslib(); + var Extrinsic_js_1 = require_Extrinsic2(); + Object.defineProperty(exports2, "GenericExtrinsic", { enumerable: true, get: function() { + return Extrinsic_js_1.GenericExtrinsic; + } }); + var ExtrinsicEra_js_1 = require_ExtrinsicEra(); + Object.defineProperty(exports2, "GenericExtrinsicEra", { enumerable: true, get: function() { + return ExtrinsicEra_js_1.GenericExtrinsicEra; + } }); + Object.defineProperty(exports2, "GenericImmortalEra", { enumerable: true, get: function() { + return ExtrinsicEra_js_1.ImmortalEra; + } }); + Object.defineProperty(exports2, "GenericMortalEra", { enumerable: true, get: function() { + return ExtrinsicEra_js_1.MortalEra; + } }); + var ExtrinsicPayload_js_1 = require_ExtrinsicPayload(); + Object.defineProperty(exports2, "GenericExtrinsicPayload", { enumerable: true, get: function() { + return ExtrinsicPayload_js_1.GenericExtrinsicPayload; + } }); + var ExtrinsicPayloadUnknown_js_1 = require_ExtrinsicPayloadUnknown(); + Object.defineProperty(exports2, "GenericExtrinsicPayloadUnknown", { enumerable: true, get: function() { + return ExtrinsicPayloadUnknown_js_1.GenericExtrinsicPayloadUnknown; + } }); + var ExtrinsicUnknown_js_1 = require_ExtrinsicUnknown(); + Object.defineProperty(exports2, "GenericExtrinsicUnknown", { enumerable: true, get: function() { + return ExtrinsicUnknown_js_1.GenericExtrinsicUnknown; + } }); + var SignerPayload_js_1 = require_SignerPayload(); + Object.defineProperty(exports2, "GenericSignerPayload", { enumerable: true, get: function() { + return SignerPayload_js_1.GenericSignerPayload; + } }); + tslib_1.__exportStar(require_v4(), exports2); + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/AccountId.js + var require_AccountId = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/AccountId.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericAccountId33 = exports2.GenericAccountId = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + function decodeAccountId3(value) { + if ((0, util_1.isU8a)(value) || Array.isArray(value)) { + return (0, util_1.u8aToU8a)(value); + } else if (!value) { + return new Uint8Array(); + } else if ((0, util_1.isHex)(value)) { + return (0, util_1.hexToU8a)(value); + } else if ((0, util_1.isString)(value)) { + return (0, util_crypto_1.decodeAddress)(value.toString()); + } + throw new Error(`Unknown type passed to AccountId constructor, found typeof ${typeof value}`); + } + var BaseAccountId2 = class extends types_codec_1.U8aFixed { + constructor(registry, allowedBits = 256 | 264, value) { + const decoded = decodeAccountId3(value); + const decodedBits = decoded.length * 8; + if (decodedBits < allowedBits && decoded.some((b) => b)) { + throw new Error(`Invalid AccountId provided, expected ${allowedBits >> 3} bytes, found ${decoded.length}`); + } + super(registry, decoded, allowedBits); + } + eq(other) { + return super.eq(decodeAccountId3(other)); + } + toHuman() { + return this.toJSON(); + } + toJSON() { + return this.toString(); + } + toPrimitive() { + return this.toJSON(); + } + toString() { + return (0, util_crypto_1.encodeAddress)(this, this.registry.chainSS58); + } + toRawType() { + return "AccountId"; + } + }; + var GenericAccountId2 = class extends BaseAccountId2 { + constructor(registry, value) { + super(registry, 256, value); + } + }; + exports2.GenericAccountId = GenericAccountId2; + var GenericAccountId332 = class extends BaseAccountId2 { + constructor(registry, value) { + super(registry, 264, value); + } + }; + exports2.GenericAccountId33 = GenericAccountId332; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/AccountIndex.js + var require_AccountIndex = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/AccountIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericAccountIndex = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var PREFIX_1BYTE2 = 239; + var PREFIX_2BYTE2 = 252; + var PREFIX_4BYTE2 = 253; + var PREFIX_8BYTE2 = 254; + var MAX_1BYTE2 = new util_1.BN(PREFIX_1BYTE2); + var MAX_2BYTE2 = new util_1.BN(1).shln(16); + var MAX_4BYTE2 = new util_1.BN(1).shln(32); + function decodeAccountIndex2(value) { + if (value instanceof GenericAccountIndex2) { + return value.toBn(); + } else if ((0, util_1.isBn)(value) || (0, util_1.isNumber)(value) || (0, util_1.isHex)(value) || (0, util_1.isU8a)(value) || (0, util_1.isBigInt)(value)) { + return value; + } + return decodeAccountIndex2((0, util_crypto_1.decodeAddress)(value)); + } + var GenericAccountIndex2 = class extends types_codec_1.u32 { + constructor(registry, value = new util_1.BN(0)) { + super(registry, decodeAccountIndex2(value)); + } + static calcLength(_value) { + const value = (0, util_1.bnToBn)(_value); + if (value.lte(MAX_1BYTE2)) { + return 1; + } else if (value.lt(MAX_2BYTE2)) { + return 2; + } else if (value.lt(MAX_4BYTE2)) { + return 4; + } + return 8; + } + static readLength(input) { + const first = input[0]; + if (first === PREFIX_2BYTE2) { + return [1, 2]; + } else if (first === PREFIX_4BYTE2) { + return [1, 4]; + } else if (first === PREFIX_8BYTE2) { + return [1, 8]; + } + return [0, 1]; + } + static writeLength(input) { + switch (input.length) { + case 2: + return new Uint8Array([PREFIX_2BYTE2]); + case 4: + return new Uint8Array([PREFIX_4BYTE2]); + case 8: + return new Uint8Array([PREFIX_8BYTE2]); + default: + return new Uint8Array([]); + } + } + eq(other) { + if ((0, util_1.isBn)(other) || (0, util_1.isNumber)(other)) { + return super.eq(other); + } + return super.eq(this.registry.createTypeUnsafe("AccountIndex", [other])); + } + toHuman() { + return this.toJSON(); + } + toJSON() { + return this.toString(); + } + toPrimitive() { + return this.toJSON(); + } + toString() { + const length = GenericAccountIndex2.calcLength(this); + return (0, util_crypto_1.encodeAddress)(this.toU8a().subarray(0, length), this.registry.chainSS58); + } + toRawType() { + return "AccountIndex"; + } + }; + exports2.GenericAccountIndex = GenericAccountIndex2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/Block.js + var require_Block = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/Block.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericBlock = void 0; + var types_codec_1 = require_cjs8(); + var GenericBlock2 = class extends types_codec_1.Struct { + constructor(registry, value) { + super(registry, { + header: "Header", + extrinsics: "Vec" + }, value); + } + get contentHash() { + return this.registry.hash(this.toU8a()); + } + get extrinsics() { + return this.getT("extrinsics"); + } + get hash() { + return this.header.hash; + } + get header() { + return this.getT("header"); + } + }; + exports2.GenericBlock = GenericBlock2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/Call.js + var require_Call = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/Call.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericCall = exports2.GenericCallIndex = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + function getArgsDef2(registry, meta2) { + return meta2.fields.reduce((result, { name: name6, type }, index) => { + result[name6.unwrapOr(`param${index}`).toString()] = registry.createLookupType(type); + return result; + }, {}); + } + function decodeCallViaObject2(registry, value, _meta) { + const { args, callIndex } = value; + const lookupIndex = callIndex instanceof GenericCallIndex2 ? callIndex.toU8a() : callIndex; + const meta2 = _meta || registry.findMetaCall(lookupIndex).meta; + return { + args, + argsDef: getArgsDef2(registry, meta2), + callIndex, + meta: meta2 + }; + } + function decodeCallViaU8a2(registry, value, _meta) { + const callIndex = registry.firstCallIndex.slice(); + callIndex.set(value.subarray(0, 2), 0); + const meta2 = _meta || registry.findMetaCall(callIndex).meta; + return { + args: value.subarray(2), + argsDef: getArgsDef2(registry, meta2), + callIndex, + meta: meta2 + }; + } + function decodeCall2(registry, value = new Uint8Array(), _meta) { + if ((0, util_1.isU8a)(value) || (0, util_1.isHex)(value)) { + return decodeCallViaU8a2(registry, (0, util_1.u8aToU8a)(value), _meta); + } else if ((0, util_1.isObject)(value) && value.callIndex && value.args) { + return decodeCallViaObject2(registry, value, _meta); + } + throw new Error(`Call: Cannot decode value '${value}' of type ${typeof value}`); + } + var GenericCallIndex2 = class extends types_codec_1.U8aFixed { + constructor(registry, value) { + super(registry, value, 16); + } + toPrimitive() { + return this.toHex(); + } + }; + exports2.GenericCallIndex = GenericCallIndex2; + var GenericCall2 = class extends types_codec_1.Struct { + _meta; + constructor(registry, value, meta2) { + const decoded = decodeCall2(registry, value, meta2); + try { + super(registry, { + callIndex: GenericCallIndex2, + args: types_codec_1.Struct.with(decoded.argsDef) + }, decoded); + } catch (error) { + let method = "unknown.unknown"; + try { + const c = registry.findMetaCall(decoded.callIndex); + method = `${c.section}.${c.method}`; + } catch { + } + throw new Error(`Call: failed decoding ${method}:: ${error.message}`); + } + this._meta = decoded.meta; + } + get args() { + return [...this.getT("args").values()]; + } + get argsDef() { + return getArgsDef2(this.registry, this.meta); + } + get argsEntries() { + return [...this.getT("args").entries()]; + } + get callIndex() { + return this.getT("callIndex").toU8a(); + } + get data() { + return this.getT("args").toU8a(); + } + get meta() { + return this._meta; + } + get method() { + return this.registry.findMetaCall(this.callIndex).method; + } + get section() { + return this.registry.findMetaCall(this.callIndex).section; + } + is(other) { + return other.callIndex[0] === this.callIndex[0] && other.callIndex[1] === this.callIndex[1]; + } + toHuman(isExpanded, disableAscii) { + let call; + try { + call = this.registry.findMetaCall(this.callIndex); + } catch { + } + return (0, util_1.objectSpread)({ + args: this.argsEntries.reduce((args, [n, a]) => (0, util_1.objectSpread)(args, { [n]: a.toHuman(isExpanded, disableAscii) }), {}), + method: call?.method, + section: call?.section + }, isExpanded && call ? { docs: call.meta.docs.map((d) => d.toString()) } : null); + } + toRawType() { + return "Call"; + } + }; + exports2.GenericCall = GenericCall2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/ChainProperties.js + var require_ChainProperties = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/ChainProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericChainProperties = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + function createValue3(registry, type, value, asArray = true) { + if (value && (0, util_1.isFunction)(value.unwrapOrDefault)) { + return value; + } + return registry.createTypeUnsafe(type, [ + asArray ? (0, util_1.isNull)(value) || (0, util_1.isUndefined)(value) ? null : Array.isArray(value) ? value : [value] : value + ]); + } + function decodeValue2(registry, key2, value) { + return key2 === "ss58Format" ? createValue3(registry, "Option", value, false) : key2 === "tokenDecimals" ? createValue3(registry, "Option>", value) : key2 === "tokenSymbol" ? createValue3(registry, "Option>", value) : key2 === "isEthereum" ? createValue3(registry, "Bool", value, false) : value; + } + function decode4(registry, value) { + return (value && (0, util_1.isFunction)(value.entries) ? [...value.entries()] : Object.entries(value || {})).reduce((all, [key2, value2]) => { + all[key2] = decodeValue2(registry, key2, value2); + return all; + }, { + isEthereum: registry.createTypeUnsafe("Bool", []), + ss58Format: registry.createTypeUnsafe("Option", []), + tokenDecimals: registry.createTypeUnsafe("Option>", []), + tokenSymbol: registry.createTypeUnsafe("Option>", []) + }); + } + var GenericChainProperties2 = class extends types_codec_1.Json { + constructor(registry, value) { + super(registry, decode4(registry, value)); + } + get isEthereum() { + return this.getT("isEthereum"); + } + get ss58Format() { + return this.getT("ss58Format"); + } + get tokenDecimals() { + return this.getT("tokenDecimals"); + } + get tokenSymbol() { + return this.getT("tokenSymbol"); + } + }; + exports2.GenericChainProperties = GenericChainProperties2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/ConsensusEngineId.js + var require_ConsensusEngineId = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/ConsensusEngineId.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericConsensusEngineId = exports2.CID_NMBS = exports2.CID_POW = exports2.CID_GRPA = exports2.CID_BABE = exports2.CID_AURA = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + exports2.CID_AURA = (0, util_1.stringToU8a)("aura"); + exports2.CID_BABE = (0, util_1.stringToU8a)("BABE"); + exports2.CID_GRPA = (0, util_1.stringToU8a)("FRNK"); + exports2.CID_POW = (0, util_1.stringToU8a)("pow_"); + exports2.CID_NMBS = (0, util_1.stringToU8a)("nmbs"); + function getAuraAuthor2(registry, bytes5, sessionValidators) { + return sessionValidators[registry.createTypeUnsafe("RawAuraPreDigest", [bytes5.toU8a(true)]).slotNumber.mod(new util_1.BN(sessionValidators.length)).toNumber()]; + } + function getBabeAuthor2(registry, bytes5, sessionValidators) { + const digest = registry.createTypeUnsafe("RawBabePreDigestCompat", [bytes5.toU8a(true)]); + return sessionValidators[digest.value.toNumber()]; + } + function getBytesAsAuthor2(registry, bytes5) { + return registry.createTypeUnsafe("AccountId", [bytes5]); + } + var GenericConsensusEngineId2 = class extends types_codec_1.U8aFixed { + constructor(registry, value) { + super(registry, (0, util_1.isNumber)(value) ? (0, util_1.bnToU8a)(value, { isLe: false }) : value, 32); + } + get isAura() { + return this.eq(exports2.CID_AURA); + } + get isBabe() { + return this.eq(exports2.CID_BABE); + } + get isGrandpa() { + return this.eq(exports2.CID_GRPA); + } + get isPow() { + return this.eq(exports2.CID_POW); + } + get isNimbus() { + return this.eq(exports2.CID_NMBS); + } + extractAuthor(bytes5, sessionValidators) { + if (sessionValidators?.length) { + if (this.isAura) { + return getAuraAuthor2(this.registry, bytes5, sessionValidators); + } else if (this.isBabe) { + return getBabeAuthor2(this.registry, bytes5, sessionValidators); + } + } + if (this.isPow || this.isNimbus) { + return getBytesAsAuthor2(this.registry, bytes5); + } + return void 0; + } + toHuman() { + return this.toString(); + } + toRawType() { + return "ConsensusEngineId"; + } + toString() { + return this.isAscii ? (0, util_1.u8aToString)(this) : (0, util_1.u8aToHex)(this); + } + }; + exports2.GenericConsensusEngineId = GenericConsensusEngineId2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/LookupSource.js + var require_LookupSource = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/LookupSource.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericLookupSource = exports2.ACCOUNT_ID_PREFIX = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var AccountId_js_1 = require_AccountId(); + var AccountIndex_js_1 = require_AccountIndex(); + exports2.ACCOUNT_ID_PREFIX = new Uint8Array([255]); + function decodeString3(registry, value) { + const decoded = (0, util_crypto_1.decodeAddress)(value); + return decoded.length === 32 ? registry.createTypeUnsafe("AccountId", [decoded]) : registry.createTypeUnsafe("AccountIndex", [(0, util_1.u8aToBn)(decoded)]); + } + function decodeU8a8(registry, value) { + if (value.length === 32) { + return registry.createTypeUnsafe("AccountId", [value]); + } else if (value[0] === 255) { + return registry.createTypeUnsafe("AccountId", [value.subarray(1)]); + } + const [offset, length] = AccountIndex_js_1.GenericAccountIndex.readLength(value); + return registry.createTypeUnsafe("AccountIndex", [(0, util_1.u8aToBn)(value.subarray(offset, offset + length))]); + } + function decodeAddressOrIndex3(registry, value) { + return value instanceof GenericLookupSource2 ? value.inner : value instanceof AccountId_js_1.GenericAccountId || value instanceof AccountIndex_js_1.GenericAccountIndex ? value : (0, util_1.isBn)(value) || (0, util_1.isNumber)(value) || (0, util_1.isBigInt)(value) ? registry.createTypeUnsafe("AccountIndex", [value]) : Array.isArray(value) || (0, util_1.isHex)(value) || (0, util_1.isU8a)(value) ? decodeU8a8(registry, (0, util_1.u8aToU8a)(value)) : decodeString3(registry, value); + } + var GenericLookupSource2 = class extends types_codec_1.AbstractBase { + constructor(registry, value = new Uint8Array()) { + super(registry, decodeAddressOrIndex3(registry, value)); + } + get encodedLength() { + const rawLength = this._rawLength; + return rawLength + (rawLength > 1 ? 1 : 0); + } + get _rawLength() { + return this.inner instanceof AccountIndex_js_1.GenericAccountIndex ? AccountIndex_js_1.GenericAccountIndex.calcLength(this.inner) : this.inner.encodedLength; + } + inspect() { + const value = this.inner.toU8a().subarray(0, this._rawLength); + return { + outer: [ + new Uint8Array(this.inner instanceof AccountIndex_js_1.GenericAccountIndex ? AccountIndex_js_1.GenericAccountIndex.writeLength(value) : exports2.ACCOUNT_ID_PREFIX), + value + ] + }; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toRawType() { + return "Address"; + } + toU8a(isBare) { + const encoded = this.inner.toU8a().subarray(0, this._rawLength); + return isBare ? encoded : (0, util_1.u8aConcat)(this.inner instanceof AccountIndex_js_1.GenericAccountIndex ? AccountIndex_js_1.GenericAccountIndex.writeLength(encoded) : exports2.ACCOUNT_ID_PREFIX, encoded); + } + }; + exports2.GenericLookupSource = GenericLookupSource2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/MultiAddress.js + var require_MultiAddress = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/MultiAddress.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericMultiAddress = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var AccountId_js_1 = require_AccountId(); + var AccountIndex_js_1 = require_AccountIndex(); + function decodeU8a8(registry, u8a) { + if ([0, 32].includes(u8a.length)) { + return { Id: u8a }; + } else if (u8a.length === 20) { + return { Address20: u8a }; + } else if (u8a.length <= 8) { + return { Index: registry.createTypeUnsafe("AccountIndex", [u8a]).toNumber() }; + } + return u8a; + } + function decodeMultiAny2(registry, value) { + if (value instanceof AccountId_js_1.GenericAccountId) { + return { Id: value }; + } else if ((0, util_1.isU8a)(value)) { + return decodeU8a8(registry, value); + } else if (value instanceof GenericMultiAddress2) { + return value; + } else if (value instanceof AccountIndex_js_1.GenericAccountIndex || (0, util_1.isBn)(value) || (0, util_1.isNumber)(value)) { + return { Index: (0, util_1.isNumber)(value) ? value : value.toNumber() }; + } else if ((0, util_1.isString)(value)) { + return decodeU8a8(registry, (0, util_crypto_1.decodeAddress)(value.toString())); + } + return value; + } + var GenericMultiAddress2 = class extends types_codec_1.Enum { + constructor(registry, value) { + super(registry, { + Id: "AccountId", + Index: "Compact", + Raw: "Bytes", + Address32: "H256", + Address20: "H160" + }, decodeMultiAny2(registry, value)); + } + inspect() { + const { inner, outer = [] } = this.inner.inspect(); + return { + inner, + outer: [new Uint8Array([this.index]), ...outer] + }; + } + toString() { + return this.value.toString(); + } + }; + exports2.GenericMultiAddress = GenericMultiAddress2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/Vote.js + var require_Vote = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/Vote.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericVote = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var AYE_BITS2 = 128; + var NAY_BITS2 = 0; + var CON_MASK2 = 127; + var DEF_CONV2 = 0; + function decodeVoteBool2(value) { + return value ? new Uint8Array([AYE_BITS2 | DEF_CONV2]) : new Uint8Array([NAY_BITS2]); + } + function decodeVoteU8a2(value) { + return value.length ? value.subarray(0, 1) : new Uint8Array([NAY_BITS2]); + } + function decodeVoteType2(registry, value) { + return new Uint8Array([ + (new types_codec_1.Bool(registry, value.aye).isTrue ? AYE_BITS2 : NAY_BITS2) | registry.createTypeUnsafe("Conviction", [value.conviction || DEF_CONV2]).index + ]); + } + function decodeVote2(registry, value) { + if ((0, util_1.isU8a)(value)) { + return decodeVoteU8a2(value); + } else if ((0, util_1.isUndefined)(value) || value instanceof Boolean || (0, util_1.isBoolean)(value)) { + return decodeVoteBool2(new types_codec_1.Bool(registry, value).isTrue); + } else if ((0, util_1.isNumber)(value)) { + return decodeVoteBool2(value < 0); + } + return decodeVoteType2(registry, value); + } + var GenericVote2 = class extends types_codec_1.U8aFixed { + __internal__aye; + __internal__conviction; + constructor(registry, value) { + const decoded = decodeVote2(registry, value); + super(registry, decoded, 8); + this.__internal__aye = (decoded[0] & AYE_BITS2) === AYE_BITS2; + this.__internal__conviction = this.registry.createTypeUnsafe("Conviction", [decoded[0] & CON_MASK2]); + } + get conviction() { + return this.__internal__conviction; + } + get isAye() { + return this.__internal__aye; + } + get isNay() { + return !this.isAye; + } + toHuman(isExpanded) { + return { + conviction: this.conviction.toHuman(isExpanded), + vote: this.isAye ? "Aye" : "Nay" + }; + } + toPrimitive() { + return { + aye: this.isAye, + conviction: this.conviction.toPrimitive() + }; + } + toRawType() { + return "Vote"; + } + }; + exports2.GenericVote = GenericVote2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/ethereum/AccountId.js + var require_AccountId2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/ethereum/AccountId.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericEthereumAccountId = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + function decodeAccountId3(value) { + if ((0, util_1.isU8a)(value) || Array.isArray(value)) { + return (0, util_1.u8aToU8a)(value); + } else if ((0, util_1.isHex)(value) || (0, util_crypto_1.isEthereumAddress)(value.toString())) { + return (0, util_1.hexToU8a)(value.toString()); + } else if ((0, util_1.isString)(value)) { + return (0, util_1.u8aToU8a)(value); + } + return value; + } + var GenericEthereumAccountId2 = class extends types_codec_1.U8aFixed { + constructor(registry, value = new Uint8Array()) { + super(registry, decodeAccountId3(value), 160); + } + eq(other) { + return !!other && super.eq(decodeAccountId3(other)); + } + toHuman() { + return this.toJSON(); + } + toJSON() { + return this.toString(); + } + toPrimitive() { + return this.toJSON(); + } + toString() { + return (0, util_crypto_1.ethereumEncode)(this); + } + toRawType() { + return "AccountId"; + } + }; + exports2.GenericEthereumAccountId = GenericEthereumAccountId2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/ethereum/LookupSource.js + var require_LookupSource2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/ethereum/LookupSource.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericEthereumLookupSource = exports2.ACCOUNT_ID_PREFIX = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var AccountIndex_js_1 = require_AccountIndex(); + var AccountId_js_1 = require_AccountId2(); + exports2.ACCOUNT_ID_PREFIX = new Uint8Array([255]); + function decodeString3(registry, value) { + const decoded = (0, util_crypto_1.decodeAddress)(value); + return decoded.length === 20 ? registry.createTypeUnsafe("EthereumAccountId", [decoded]) : registry.createTypeUnsafe("AccountIndex", [(0, util_1.u8aToBn)(decoded)]); + } + function decodeU8a8(registry, value) { + if (value.length === 20) { + return registry.createTypeUnsafe("EthereumAccountId", [value]); + } else if (value[0] === 255) { + return registry.createTypeUnsafe("EthereumAccountId", [value.subarray(1)]); + } + const [offset, length] = AccountIndex_js_1.GenericAccountIndex.readLength(value); + return registry.createTypeUnsafe("AccountIndex", [(0, util_1.u8aToBn)(value.subarray(offset, offset + length))]); + } + function decodeAddressOrIndex3(registry, value) { + return value instanceof GenericEthereumLookupSource2 ? value.inner : value instanceof AccountId_js_1.GenericEthereumAccountId || value instanceof AccountIndex_js_1.GenericAccountIndex ? value : (0, util_1.isU8a)(value) || Array.isArray(value) || (0, util_1.isHex)(value) ? decodeU8a8(registry, (0, util_1.u8aToU8a)(value)) : (0, util_1.isBn)(value) || (0, util_1.isNumber)(value) || (0, util_1.isBigInt)(value) ? registry.createTypeUnsafe("AccountIndex", [value]) : decodeString3(registry, value); + } + var GenericEthereumLookupSource2 = class extends types_codec_1.AbstractBase { + constructor(registry, value = new Uint8Array()) { + super(registry, decodeAddressOrIndex3(registry, value)); + } + get encodedLength() { + const rawLength = this._rawLength; + return rawLength + (rawLength > 1 ? 1 : 0); + } + get _rawLength() { + return this.inner instanceof AccountIndex_js_1.GenericAccountIndex ? AccountIndex_js_1.GenericAccountIndex.calcLength(this.inner) : this.inner.encodedLength; + } + toHex() { + return (0, util_1.u8aToHex)(this.toU8a()); + } + toRawType() { + return "Address"; + } + toU8a(isBare) { + const encoded = this.inner.toU8a().subarray(0, this._rawLength); + return isBare ? encoded : (0, util_1.u8aConcat)(this.inner instanceof AccountIndex_js_1.GenericAccountIndex ? AccountIndex_js_1.GenericAccountIndex.writeLength(encoded) : exports2.ACCOUNT_ID_PREFIX, encoded); + } + }; + exports2.GenericEthereumLookupSource = GenericEthereumLookupSource2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/ethereum/index.js + var require_ethereum3 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/ethereum/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericEthereumLookupSource = exports2.GenericEthereumAccountId = void 0; + var AccountId_js_1 = require_AccountId2(); + Object.defineProperty(exports2, "GenericEthereumAccountId", { enumerable: true, get: function() { + return AccountId_js_1.GenericEthereumAccountId; + } }); + var LookupSource_js_1 = require_LookupSource2(); + Object.defineProperty(exports2, "GenericEthereumLookupSource", { enumerable: true, get: function() { + return LookupSource_js_1.GenericEthereumLookupSource; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/generic/index.js + var require_generic = __commonJS({ + "../../node_modules/@polkadot/types/cjs/generic/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericVote = exports2.GenericMultiAddress = exports2.GenericAddress = exports2.GenericLookupSource = exports2.GenericEventData = exports2.GenericEvent = exports2.GenericConsensusEngineId = exports2.GenericChainProperties = exports2.GenericCall = exports2.GenericBlock = exports2.GenericAccountIndex = exports2.GenericAccountId33 = exports2.GenericAccountId32 = exports2.GenericAccountId = void 0; + var tslib_1 = require_tslib(); + var AccountId_js_1 = require_AccountId(); + Object.defineProperty(exports2, "GenericAccountId", { enumerable: true, get: function() { + return AccountId_js_1.GenericAccountId; + } }); + Object.defineProperty(exports2, "GenericAccountId32", { enumerable: true, get: function() { + return AccountId_js_1.GenericAccountId; + } }); + Object.defineProperty(exports2, "GenericAccountId33", { enumerable: true, get: function() { + return AccountId_js_1.GenericAccountId33; + } }); + var AccountIndex_js_1 = require_AccountIndex(); + Object.defineProperty(exports2, "GenericAccountIndex", { enumerable: true, get: function() { + return AccountIndex_js_1.GenericAccountIndex; + } }); + var Block_js_1 = require_Block(); + Object.defineProperty(exports2, "GenericBlock", { enumerable: true, get: function() { + return Block_js_1.GenericBlock; + } }); + var Call_js_1 = require_Call(); + Object.defineProperty(exports2, "GenericCall", { enumerable: true, get: function() { + return Call_js_1.GenericCall; + } }); + var ChainProperties_js_1 = require_ChainProperties(); + Object.defineProperty(exports2, "GenericChainProperties", { enumerable: true, get: function() { + return ChainProperties_js_1.GenericChainProperties; + } }); + var ConsensusEngineId_js_1 = require_ConsensusEngineId(); + Object.defineProperty(exports2, "GenericConsensusEngineId", { enumerable: true, get: function() { + return ConsensusEngineId_js_1.GenericConsensusEngineId; + } }); + var Event_js_1 = require_Event(); + Object.defineProperty(exports2, "GenericEvent", { enumerable: true, get: function() { + return Event_js_1.GenericEvent; + } }); + Object.defineProperty(exports2, "GenericEventData", { enumerable: true, get: function() { + return Event_js_1.GenericEventData; + } }); + var LookupSource_js_1 = require_LookupSource(); + Object.defineProperty(exports2, "GenericLookupSource", { enumerable: true, get: function() { + return LookupSource_js_1.GenericLookupSource; + } }); + var MultiAddress_js_1 = require_MultiAddress(); + Object.defineProperty(exports2, "GenericAddress", { enumerable: true, get: function() { + return MultiAddress_js_1.GenericMultiAddress; + } }); + Object.defineProperty(exports2, "GenericMultiAddress", { enumerable: true, get: function() { + return MultiAddress_js_1.GenericMultiAddress; + } }); + var Vote_js_1 = require_Vote(); + Object.defineProperty(exports2, "GenericVote", { enumerable: true, get: function() { + return Vote_js_1.GenericVote; + } }); + tslib_1.__exportStar(require_ethereum3(), exports2); + } + }); + + // ../../node_modules/@polkadot/types/cjs/primitive/Data.js + var require_Data = __commonJS({ + "../../node_modules/@polkadot/types/cjs/primitive/Data.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Data = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + function decodeDataU8a2(registry, value) { + const indicator = value[0]; + if (!indicator) { + return [void 0, void 0]; + } else if (indicator >= 1 && indicator <= 33) { + const length = indicator - 1; + const data = value.subarray(1, length + 1); + return [registry.createTypeUnsafe("Raw", [data]), 1]; + } else if (indicator >= 34 && indicator <= 37) { + return [value.subarray(1, 32 + 1), indicator - 32]; + } + throw new Error(`Unable to decode Data, invalid indicator byte ${indicator}`); + } + function decodeData2(registry, value) { + if ((0, util_1.isU8a)(value) || (0, util_1.isString)(value)) { + return decodeDataU8a2(registry, (0, util_1.u8aToU8a)(value)); + } else if (!value) { + return [void 0, void 0]; + } + return [value, void 0]; + } + var Data2 = class extends types_codec_1.Enum { + constructor(registry, value) { + super(registry, { + None: "Null", + Raw: "Bytes", + BlakeTwo256: "H256", + Sha256: "H256", + Keccak256: "H256", + ShaThree256: "H256" + }, ...decodeData2(registry, value)); + if (this.isRaw && this.asRaw.length > 32) { + throw new Error("Data.Raw values are limited to a maximum length of 32 bytes"); + } + } + get asBlakeTwo256() { + return this.value; + } + get asKeccak256() { + return this.value; + } + get asRaw() { + return this.value; + } + get asSha256() { + return this.value; + } + get asShaThree256() { + return this.value; + } + get isBlakeTwo256() { + return this.index === 2; + } + get isKeccak256() { + return this.index === 4; + } + get isNone() { + return this.index === 0; + } + get isRaw() { + return this.index === 1; + } + get isSha256() { + return this.index === 3; + } + get isShaThree256() { + return this.index === 5; + } + get encodedLength() { + return this.toU8a().length; + } + toU8a() { + if (this.index === 0) { + return new Uint8Array(1); + } else if (this.index === 1) { + const data = this.value.toU8a(true); + const length = Math.min(data.length, 32); + const u8a2 = new Uint8Array(length + 1); + u8a2.set([length + 1], 0); + u8a2.set(data.subarray(0, length), 1); + return u8a2; + } + const u8a = new Uint8Array(33); + u8a.set([this.index + 32], 0); + u8a.set(this.value.toU8a(), 1); + return u8a; + } + }; + exports2.Data = Data2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/primitive/StorageKey.js + var require_StorageKey = __commonJS({ + "../../node_modules/@polkadot/types/cjs/primitive/StorageKey.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageKey = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var index_js_1 = require_util4(); + var index_js_2 = require_util5(); + var HASHER_MAP2 = { + Blake2_128: [16, false], + Blake2_128Concat: [16, true], + Blake2_256: [32, false], + Identity: [0, true], + Twox128: [16, false], + Twox256: [32, false], + Twox64Concat: [8, true] + }; + function decodeStorageKey2(value) { + if ((0, util_1.isU8a)(value) || !value || (0, util_1.isString)(value)) { + return { key: value }; + } else if (value instanceof StorageKey2) { + return { + key: value, + method: value.method, + section: value.section + }; + } else if ((0, util_1.isFunction)(value)) { + return { + key: value(), + method: value.method, + section: value.section + }; + } else if (Array.isArray(value)) { + const [fn2, args = []] = value; + if (!(0, util_1.isFunction)(fn2)) { + throw new Error("Expected function input for key construction"); + } + if (fn2.meta && fn2.meta.type.isMap) { + const map2 = fn2.meta.type.asMap; + if (!Array.isArray(args) || args.length !== map2.hashers.length) { + throw new Error(`Expected an array of ${map2.hashers.length} values as params to a Map query`); + } + } + return { + key: fn2(...args), + method: fn2.method, + section: fn2.section + }; + } + throw new Error(`Unable to convert input ${value} to StorageKey`); + } + function decodeHashers2(registry, value, hashers) { + let offset = 32; + const count = hashers.length; + const result = new Array(count); + for (let i = 0; i < count; i++) { + const [hasher2, type] = hashers[i]; + const [hashLen, canDecode] = HASHER_MAP2[hasher2.type]; + const decoded = canDecode ? registry.createTypeUnsafe((0, index_js_1.getSiName)(registry.lookup, type), [value.subarray(offset + hashLen)]) : registry.createTypeUnsafe("Raw", [value.subarray(offset, offset + hashLen)]); + offset += hashLen + (canDecode ? decoded.encodedLength : 0); + result[i] = decoded; + } + return result; + } + function decodeArgsFromMeta2(registry, value, meta2) { + if (!meta2 || !meta2.type.isMap) { + return []; + } + const { hashers, key: key2 } = meta2.type.asMap; + const keys = hashers.length === 1 ? [key2] : registry.lookup.getSiType(key2).def.asTuple; + return decodeHashers2(registry, value, hashers.map((h, i) => [h, keys[i]])); + } + function getMeta2(value) { + if (value instanceof StorageKey2) { + return value.meta; + } else if ((0, util_1.isFunction)(value)) { + return value.meta; + } else if (Array.isArray(value)) { + const [fn2] = value; + return fn2.meta; + } + return void 0; + } + function getType2(registry, value) { + if (value instanceof StorageKey2) { + return value.outputType; + } else if ((0, util_1.isFunction)(value)) { + return (0, index_js_2.unwrapStorageType)(registry, value.meta.type); + } else if (Array.isArray(value)) { + const [fn2] = value; + if (fn2.meta) { + return (0, index_js_2.unwrapStorageType)(registry, fn2.meta.type); + } + } + return "Raw"; + } + var StorageKey2 = class extends types_codec_1.Bytes { + __internal__args; + __internal__meta; + __internal__outputType; + __internal__method; + __internal__section; + constructor(registry, value, override = {}) { + const { key: key2, method, section } = decodeStorageKey2(value); + super(registry, key2); + this.__internal__outputType = getType2(registry, value); + this.setMeta(getMeta2(value), override.section || section, override.method || method); + } + get args() { + return this.__internal__args; + } + get meta() { + return this.__internal__meta; + } + get method() { + return this.__internal__method; + } + get outputType() { + return this.__internal__outputType; + } + get section() { + return this.__internal__section; + } + is(key2) { + return key2.section === this.section && key2.method === this.method; + } + setMeta(meta2, section, method) { + this.__internal__meta = meta2; + this.__internal__method = method || this.__internal__method; + this.__internal__section = section || this.__internal__section; + if (meta2) { + this.__internal__outputType = (0, index_js_2.unwrapStorageType)(this.registry, meta2.type); + } + try { + this.__internal__args = decodeArgsFromMeta2(this.registry, this.toU8a(true), meta2); + } catch { + } + return this; + } + toHuman(_isExtended, disableAscii) { + return this.__internal__args.length ? this.__internal__args.map((a) => a.toHuman(void 0, disableAscii)) : super.toHuman(void 0, disableAscii); + } + toRawType() { + return "StorageKey"; + } + }; + exports2.StorageKey = StorageKey2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/primitive/index.js + var require_primitive2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/primitive/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageKey = exports2.Data = exports2.usize = exports2.USize = exports2.u256 = exports2.U256 = exports2.u128 = exports2.U128 = exports2.u64 = exports2.U64 = exports2.u32 = exports2.U32 = exports2.u16 = exports2.U16 = exports2.u8 = exports2.U8 = exports2.Type = exports2.Text = exports2.OptionBool = exports2.Null = exports2.isize = exports2.ISize = exports2.i256 = exports2.I256 = exports2.i128 = exports2.I128 = exports2.i64 = exports2.I64 = exports2.i32 = exports2.I32 = exports2.i16 = exports2.I16 = exports2.i8 = exports2.I8 = exports2.f64 = exports2.F64 = exports2.f32 = exports2.F32 = exports2.Bytes = exports2.bool = exports2.Bool = exports2.BitVec = void 0; + var types_codec_1 = require_cjs8(); + Object.defineProperty(exports2, "BitVec", { enumerable: true, get: function() { + return types_codec_1.BitVec; + } }); + Object.defineProperty(exports2, "Bool", { enumerable: true, get: function() { + return types_codec_1.Bool; + } }); + Object.defineProperty(exports2, "bool", { enumerable: true, get: function() { + return types_codec_1.bool; + } }); + Object.defineProperty(exports2, "Bytes", { enumerable: true, get: function() { + return types_codec_1.Bytes; + } }); + Object.defineProperty(exports2, "F32", { enumerable: true, get: function() { + return types_codec_1.F32; + } }); + Object.defineProperty(exports2, "f32", { enumerable: true, get: function() { + return types_codec_1.f32; + } }); + Object.defineProperty(exports2, "F64", { enumerable: true, get: function() { + return types_codec_1.F64; + } }); + Object.defineProperty(exports2, "f64", { enumerable: true, get: function() { + return types_codec_1.f64; + } }); + Object.defineProperty(exports2, "I8", { enumerable: true, get: function() { + return types_codec_1.I8; + } }); + Object.defineProperty(exports2, "i8", { enumerable: true, get: function() { + return types_codec_1.i8; + } }); + Object.defineProperty(exports2, "I16", { enumerable: true, get: function() { + return types_codec_1.I16; + } }); + Object.defineProperty(exports2, "i16", { enumerable: true, get: function() { + return types_codec_1.i16; + } }); + Object.defineProperty(exports2, "I32", { enumerable: true, get: function() { + return types_codec_1.I32; + } }); + Object.defineProperty(exports2, "i32", { enumerable: true, get: function() { + return types_codec_1.i32; + } }); + Object.defineProperty(exports2, "I64", { enumerable: true, get: function() { + return types_codec_1.I64; + } }); + Object.defineProperty(exports2, "i64", { enumerable: true, get: function() { + return types_codec_1.i64; + } }); + Object.defineProperty(exports2, "I128", { enumerable: true, get: function() { + return types_codec_1.I128; + } }); + Object.defineProperty(exports2, "i128", { enumerable: true, get: function() { + return types_codec_1.i128; + } }); + Object.defineProperty(exports2, "I256", { enumerable: true, get: function() { + return types_codec_1.I256; + } }); + Object.defineProperty(exports2, "i256", { enumerable: true, get: function() { + return types_codec_1.i256; + } }); + Object.defineProperty(exports2, "ISize", { enumerable: true, get: function() { + return types_codec_1.ISize; + } }); + Object.defineProperty(exports2, "isize", { enumerable: true, get: function() { + return types_codec_1.isize; + } }); + Object.defineProperty(exports2, "Null", { enumerable: true, get: function() { + return types_codec_1.Null; + } }); + Object.defineProperty(exports2, "OptionBool", { enumerable: true, get: function() { + return types_codec_1.OptionBool; + } }); + Object.defineProperty(exports2, "Text", { enumerable: true, get: function() { + return types_codec_1.Text; + } }); + Object.defineProperty(exports2, "Type", { enumerable: true, get: function() { + return types_codec_1.Type; + } }); + Object.defineProperty(exports2, "U8", { enumerable: true, get: function() { + return types_codec_1.U8; + } }); + Object.defineProperty(exports2, "u8", { enumerable: true, get: function() { + return types_codec_1.u8; + } }); + Object.defineProperty(exports2, "U16", { enumerable: true, get: function() { + return types_codec_1.U16; + } }); + Object.defineProperty(exports2, "u16", { enumerable: true, get: function() { + return types_codec_1.u16; + } }); + Object.defineProperty(exports2, "U32", { enumerable: true, get: function() { + return types_codec_1.U32; + } }); + Object.defineProperty(exports2, "u32", { enumerable: true, get: function() { + return types_codec_1.u32; + } }); + Object.defineProperty(exports2, "U64", { enumerable: true, get: function() { + return types_codec_1.U64; + } }); + Object.defineProperty(exports2, "u64", { enumerable: true, get: function() { + return types_codec_1.u64; + } }); + Object.defineProperty(exports2, "U128", { enumerable: true, get: function() { + return types_codec_1.U128; + } }); + Object.defineProperty(exports2, "u128", { enumerable: true, get: function() { + return types_codec_1.u128; + } }); + Object.defineProperty(exports2, "U256", { enumerable: true, get: function() { + return types_codec_1.U256; + } }); + Object.defineProperty(exports2, "u256", { enumerable: true, get: function() { + return types_codec_1.u256; + } }); + Object.defineProperty(exports2, "USize", { enumerable: true, get: function() { + return types_codec_1.USize; + } }); + Object.defineProperty(exports2, "usize", { enumerable: true, get: function() { + return types_codec_1.usize; + } }); + var Data_js_1 = require_Data(); + Object.defineProperty(exports2, "Data", { enumerable: true, get: function() { + return Data_js_1.Data; + } }); + var StorageKey_js_1 = require_StorageKey(); + Object.defineProperty(exports2, "StorageKey", { enumerable: true, get: function() { + return StorageKey_js_1.StorageKey; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/index.types.js + var require_index_types = __commonJS({ + "../../node_modules/@polkadot/types/cjs/index.types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_extrinsic(), exports2); + tslib_1.__exportStar(require_generic(), exports2); + tslib_1.__exportStar(require_primitive2(), exports2); + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/util.js + var require_util7 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.objectNameToString = exports2.objectNameToCamel = void 0; + var util_1 = require_cjs3(); + function convert2(fn2) { + return ({ name: name6 }) => fn2(name6); + } + exports2.objectNameToCamel = convert2(util_1.stringCamelCase); + exports2.objectNameToString = convert2((n) => n.toString()); + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js + var require_createUnchecked = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createUnchecked = void 0; + var util_1 = require_cjs3(); + function isTx2(tx2, callIndex) { + return tx2.callIndex[0] === callIndex[0] && tx2.callIndex[1] === callIndex[1]; + } + function createUnchecked2(registry, section, callIndex, callMetadata) { + const expectedArgs = callMetadata.fields; + const funcName = (0, util_1.stringCamelCase)(callMetadata.name); + const extrinsicFn = (...args) => { + if (expectedArgs.length !== args.length) { + throw new Error(`Extrinsic ${section}.${funcName} expects ${expectedArgs.length} arguments, got ${args.length}.`); + } + return registry.createTypeUnsafe("Call", [{ args, callIndex }, callMetadata]); + }; + extrinsicFn.is = (tx2) => isTx2(tx2, callIndex); + extrinsicFn.callIndex = callIndex; + extrinsicFn.meta = callMetadata; + extrinsicFn.method = funcName; + extrinsicFn.section = section; + extrinsicFn.toJSON = () => callMetadata.toJSON(); + return extrinsicFn; + } + exports2.createUnchecked = createUnchecked2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/index.js + var require_extrinsics = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decorateExtrinsics = exports2.createCallFunction = exports2.filterCallsSome = void 0; + var util_1 = require_cjs3(); + var lazy_js_1 = require_lazy2(); + var index_js_1 = require_util4(); + var util_js_1 = require_util7(); + var createUnchecked_js_1 = require_createUnchecked(); + function filterCallsSome2({ calls }) { + return calls.isSome; + } + exports2.filterCallsSome = filterCallsSome2; + function createCallFunction2(registry, lookup, variant, sectionName, sectionIndex) { + const { fields, index } = variant; + const count = fields.length; + const args = new Array(count); + for (let i = 0; i < count; i++) { + const { name: name6, type, typeName } = fields[i]; + args[i] = (0, util_1.objectSpread)({ + name: (0, util_1.stringCamelCase)(name6.unwrapOr(`param${i}`)), + type: (0, index_js_1.getSiName)(lookup, type) + }, typeName.isSome ? { typeName: typeName.unwrap() } : null); + } + return (0, createUnchecked_js_1.createUnchecked)(registry, sectionName, new Uint8Array([sectionIndex, index.toNumber()]), registry.createTypeUnsafe("FunctionMetadataLatest", [(0, util_1.objectSpread)({ args }, variant)])); + } + exports2.createCallFunction = createCallFunction2; + function decorateExtrinsics2(registry, { lookup, pallets }, version23) { + const result = {}; + const filtered = pallets.filter(filterCallsSome2); + for (let i = 0, count = filtered.length; i < count; i++) { + const { calls, index, name: name6 } = filtered[i]; + const sectionName = (0, util_1.stringCamelCase)(name6); + const sectionIndex = version23 >= 12 ? index.toNumber() : i; + (0, util_1.lazyMethod)(result, sectionName, () => (0, lazy_js_1.lazyVariants)(lookup, calls.unwrap(), util_js_1.objectNameToCamel, (variant) => createCallFunction2(registry, lookup, variant, sectionName, sectionIndex))); + } + return result; + } + exports2.decorateExtrinsics = decorateExtrinsics2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/v9/toV10.js + var require_toV10 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/v9/toV10.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toV10 = void 0; + var util_1 = require_cjs3(); + function createStorageHasher2(registry, hasher2) { + if (hasher2.toNumber() >= 2) { + return registry.createTypeUnsafe("StorageHasherV10", [hasher2.toNumber() + 1]); + } + return registry.createTypeUnsafe("StorageHasherV10", [hasher2]); + } + function createStorageType2(registry, entryType) { + if (entryType.isMap) { + return [(0, util_1.objectSpread)({}, entryType.asMap, { + hasher: createStorageHasher2(registry, entryType.asMap.hasher) + }), 1]; + } + if (entryType.isDoubleMap) { + return [(0, util_1.objectSpread)({}, entryType.asDoubleMap, { + hasher: createStorageHasher2(registry, entryType.asDoubleMap.hasher), + key2Hasher: createStorageHasher2(registry, entryType.asDoubleMap.key2Hasher) + }), 2]; + } + return [entryType.asPlain, 0]; + } + function convertModule2(registry, mod3) { + const storage = mod3.storage.unwrapOr(null); + return registry.createTypeUnsafe("ModuleMetadataV10", [(0, util_1.objectSpread)({}, mod3, { + storage: storage ? (0, util_1.objectSpread)({}, storage, { + items: storage.items.map((item) => (0, util_1.objectSpread)({}, item, { + type: registry.createTypeUnsafe("StorageEntryTypeV10", createStorageType2(registry, item.type)) + })) + }) : null + })]); + } + function toV102(registry, { modules }) { + return registry.createTypeUnsafe("MetadataV10", [{ + modules: modules.map((mod3) => convertModule2(registry, mod3)) + }]); + } + exports2.toV10 = toV102; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/v10/toV11.js + var require_toV11 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/v10/toV11.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toV11 = void 0; + function toV112(registry, { modules }) { + return registry.createTypeUnsafe("MetadataV11", [{ + extrinsic: { + signedExtensions: [], + version: 0 + }, + modules + }]); + } + exports2.toV11 = toV112; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/v11/toV12.js + var require_toV12 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/v11/toV12.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toV12 = void 0; + var util_1 = require_cjs3(); + function toV122(registry, { extrinsic, modules }) { + return registry.createTypeUnsafe("MetadataV12", [{ + extrinsic, + modules: modules.map((mod3) => registry.createTypeUnsafe("ModuleMetadataV12", [(0, util_1.objectSpread)({}, mod3, { index: 255 })])) + }]); + } + exports2.toV12 = toV122; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/v12/toV13.js + var require_toV13 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/v12/toV13.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toV13 = void 0; + function toV132(registry, v122) { + return registry.createTypeUnsafe("MetadataV13", [v122]); + } + exports2.toV13 = toV132; + } + }); + + // ../../node_modules/@polkadot/types/cjs/interfaces/alias.js + var require_alias = __commonJS({ + "../../node_modules/@polkadot/types/cjs/interfaces/alias.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAliasTypes = void 0; + var typesAlias2 = { + assets: { + Approval: "AssetApproval", + ApprovalKey: "AssetApprovalKey", + Balance: "TAssetBalance", + DestroyWitness: "AssetDestroyWitness" + }, + babe: { + EquivocationProof: "BabeEquivocationProof" + }, + balances: { + Status: "BalanceStatus" + }, + beefy: { + AuthorityId: "BeefyId" + }, + contracts: { + StorageKey: "ContractStorageKey" + }, + electionProviderMultiPhase: { + Phase: "ElectionPhase" + }, + ethereum: { + Block: "EthBlock", + Header: "EthHeader", + Receipt: "EthReceipt", + Transaction: "EthTransaction", + TransactionStatus: "EthTransactionStatus" + }, + evm: { + Account: "EvmAccount", + Log: "EvmLog", + Vicinity: "EvmVicinity" + }, + grandpa: { + Equivocation: "GrandpaEquivocation", + EquivocationProof: "GrandpaEquivocationProof" + }, + identity: { + Judgement: "IdentityJudgement" + }, + inclusion: { + ValidatorIndex: "ParaValidatorIndex" + }, + paraDisputes: { + ValidatorIndex: "ParaValidatorIndex" + }, + paraInclusion: { + ValidatorIndex: "ParaValidatorIndex" + }, + paraScheduler: { + ValidatorIndex: "ParaValidatorIndex" + }, + paraShared: { + ValidatorIndex: "ParaValidatorIndex" + }, + parachains: { + Id: "ParaId" + }, + parasDisputes: { + ValidatorIndex: "ParaValidatorIndex" + }, + parasInclusion: { + ValidatorIndex: "ParaValidatorIndex" + }, + parasScheduler: { + ValidatorIndex: "ParaValidatorIndex" + }, + parasShared: { + ValidatorIndex: "ParaValidatorIndex" + }, + proposeParachain: { + Proposal: "ParachainProposal" + }, + proxy: { + Announcement: "ProxyAnnouncement" + }, + scheduler: { + ValidatorIndex: "ParaValidatorIndex" + }, + shared: { + ValidatorIndex: "ParaValidatorIndex" + }, + society: { + Judgement: "SocietyJudgement", + Vote: "SocietyVote" + }, + staking: { + Compact: "CompactAssignments" + }, + treasury: { + Proposal: "TreasuryProposal" + }, + xcm: { + AssetId: "XcmAssetId" + }, + xcmPallet: { + AssetId: "XcmAssetId" + } + }; + function getAliasTypes2({ knownTypes: knownTypes2 }, section) { + return { + ...typesAlias2[section] ?? {}, + ...knownTypes2.typesAlias?.[section] ?? {} + }; + } + exports2.getAliasTypes = getAliasTypes2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/v13/toV14.js + var require_toV14 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/v13/toV14.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toV14 = void 0; + var util_1 = require_cjs3(); + var alias_js_1 = require_alias(); + var definitions_js_1 = require_definitions2(); + var BOXES2 = [["<", ">"], ["<", ","], [",", ">"], ["(", ")"], ["(", ","], [",", ","], [",", ")"]]; + function compatType2(specs, _type) { + const type = _type.toString(); + const index = specs.findIndex(({ def }) => def.HistoricMetaCompat === type); + if (index !== -1) { + return index; + } + return specs.push({ + def: { + HistoricMetaCompat: type + } + }) - 1; + } + function compatTypes2(specs, ...types2) { + for (let i = 0, count = types2.length; i < count; i++) { + compatType2(specs, types2[i]); + } + } + function makeTupleType2(specs, entries) { + return specs.push({ + def: { + Tuple: entries + } + }) - 1; + } + function makeVariantType2(modName, variantType, specs, variants) { + return specs.push({ + def: { + Variant: { variants } + }, + path: [`pallet_${modName.toString()}`, "pallet", variantType] + }) - 1; + } + function registerOriginCaller2(registry, modules, metaVersion) { + registry.register({ + OriginCaller: { + _enum: modules.map((mod3, index) => [ + mod3.name.toString(), + metaVersion >= 12 ? mod3.index.toNumber() : index + ]).sort((a, b) => a[1] - b[1]).reduce((result, [name6, index]) => { + for (let i = Object.keys(result).length; i < index; i++) { + result[`Empty${i}`] = "Null"; + } + result[name6] = definitions_js_1.knownOrigins[name6] || "Null"; + return result; + }, {}) + } + }); + } + function setTypeOverride2(sectionTypes, types2) { + types2.forEach((type) => { + const override = Object.keys(sectionTypes).find((aliased) => type.eq(aliased)); + if (override) { + type.setOverride(sectionTypes[override]); + } else { + const orig = type.toString(); + const alias2 = Object.entries(sectionTypes).reduce((result, [src, dst]) => BOXES2.reduce((result2, [a, z]) => result2.replace(`${a}${src}${z}`, `${a}${dst}${z}`), result), orig); + if (orig !== alias2) { + type.setOverride(alias2); + } + } + }); + } + function convertCalls2(specs, registry, modName, calls, sectionTypes) { + const variants = calls.map(({ args, docs, name: name6 }, index) => { + setTypeOverride2(sectionTypes, args.map(({ type }) => type)); + return registry.createTypeUnsafe("SiVariant", [{ + docs, + fields: args.map(({ name: name7, type }) => registry.createTypeUnsafe("SiField", [{ name: name7, type: compatType2(specs, type) }])), + index, + name: name6 + }]); + }); + return registry.createTypeUnsafe("PalletCallMetadataV14", [{ + type: makeVariantType2(modName, "Call", specs, variants) + }]); + } + function convertConstants2(specs, registry, constants2, sectionTypes) { + return constants2.map(({ docs, name: name6, type, value }) => { + setTypeOverride2(sectionTypes, [type]); + return registry.createTypeUnsafe("PalletConstantMetadataV14", [{ + docs, + name: name6, + type: compatType2(specs, type), + value + }]); + }); + } + function convertErrors2(specs, registry, modName, errors2, _sectionTypes) { + const variants = errors2.map(({ docs, name: name6 }, index) => registry.createTypeUnsafe("SiVariant", [{ + docs, + fields: [], + index, + name: name6 + }])); + return registry.createTypeUnsafe("PalletErrorMetadataV14", [{ + type: makeVariantType2(modName, "Error", specs, variants) + }]); + } + function convertEvents2(specs, registry, modName, events, sectionTypes) { + const variants = events.map(({ args, docs, name: name6 }, index) => { + setTypeOverride2(sectionTypes, args); + return registry.createTypeUnsafe("SiVariant", [{ + docs, + fields: args.map((t) => registry.createTypeUnsafe("SiField", [{ type: compatType2(specs, t) }])), + index, + name: name6 + }]); + }); + return registry.createTypeUnsafe("PalletEventMetadataV14", [{ + type: makeVariantType2(modName, "Event", specs, variants) + }]); + } + function createMapEntry2(specs, registry, sectionTypes, { hashers, isLinked, isOptional, keys, value }) { + setTypeOverride2(sectionTypes, [value, ...Array.isArray(keys) ? keys : [keys]]); + return registry.createTypeUnsafe("StorageEntryTypeV14", [{ + Map: { + hashers, + key: hashers.length === 1 ? compatType2(specs, keys[0]) : makeTupleType2(specs, keys.map((t) => compatType2(specs, t))), + value: isLinked ? compatType2(specs, `(${isOptional ? `Option<${value.toString()}>` : value.toString()}, Linkage<${keys[0].toString()}>)`) : compatType2(specs, value) + } + }]); + } + function convertStorage2(specs, registry, { items, prefix }, sectionTypes) { + return registry.createTypeUnsafe("PalletStorageMetadataV14", [{ + items: items.map(({ docs, fallback, modifier, name: name6, type }) => { + let entryType; + if (type.isPlain) { + const plain = type.asPlain; + setTypeOverride2(sectionTypes, [plain]); + entryType = registry.createTypeUnsafe("StorageEntryTypeV14", [{ + Plain: compatType2(specs, plain) + }]); + } else if (type.isMap) { + const map2 = type.asMap; + entryType = createMapEntry2(specs, registry, sectionTypes, { + hashers: [map2.hasher], + isLinked: map2.linked.isTrue, + isOptional: modifier.isOptional, + keys: [map2.key], + value: map2.value + }); + } else if (type.isDoubleMap) { + const dm2 = type.asDoubleMap; + entryType = createMapEntry2(specs, registry, sectionTypes, { + hashers: [dm2.hasher, dm2.key2Hasher], + isLinked: false, + isOptional: modifier.isOptional, + keys: [dm2.key1, dm2.key2], + value: dm2.value + }); + } else { + const nm2 = type.asNMap; + entryType = createMapEntry2(specs, registry, sectionTypes, { + hashers: nm2.hashers, + isLinked: false, + isOptional: modifier.isOptional, + keys: nm2.keyVec, + value: nm2.value + }); + } + return registry.createTypeUnsafe("StorageEntryMetadataV14", [{ + docs, + fallback, + modifier, + name: name6, + type: entryType + }]); + }), + prefix + }]); + } + function convertExtrinsic2(registry, { signedExtensions, version: version23 }) { + return registry.createTypeUnsafe("ExtrinsicMetadataV14", [{ + signedExtensions: signedExtensions.map((identifier) => ({ + identifier, + type: 0 + })), + type: 0, + version: version23 + }]); + } + function createPallet2(specs, registry, mod3, { calls, constants: constants2, errors: errors2, events, storage }) { + const sectionTypes = (0, alias_js_1.getAliasTypes)(registry, (0, util_1.stringCamelCase)(mod3.name)); + return registry.createTypeUnsafe("PalletMetadataV14", [{ + calls: calls && convertCalls2(specs, registry, mod3.name, calls, sectionTypes), + constants: convertConstants2(specs, registry, constants2, sectionTypes), + errors: errors2 && convertErrors2(specs, registry, mod3.name, errors2, sectionTypes), + events: events && convertEvents2(specs, registry, mod3.name, events, sectionTypes), + index: mod3.index, + name: mod3.name, + storage: storage && convertStorage2(specs, registry, storage, sectionTypes) + }]); + } + function toV142(registry, v132, metaVersion) { + const specs = []; + compatTypes2(specs, "Null", "u8", "u16", "u32", "u64"); + registerOriginCaller2(registry, v132.modules, metaVersion); + const extrinsic = convertExtrinsic2(registry, v132.extrinsic); + const pallets = v132.modules.map((mod3) => createPallet2(specs, registry, mod3, { + calls: mod3.calls.unwrapOr(null), + constants: mod3.constants, + errors: mod3.errors.length ? mod3.errors : null, + events: mod3.events.unwrapOr(null), + storage: mod3.storage.unwrapOr(null) + })); + return registry.createTypeUnsafe("MetadataV14", [{ + extrinsic, + lookup: { + types: specs.map((type, id4) => registry.createTypeUnsafe("PortableType", [{ id: id4, type }])) + }, + pallets + }]); + } + exports2.toV14 = toV142; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/v14/toV15.js + var require_toV15 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/v14/toV15.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toV15 = void 0; + var util_1 = require_cjs3(); + function toV152(registry, v143, _) { + const unchecked = v143.lookup.paramTypes.SpRuntimeUncheckedExtrinsic; + return registry.createTypeUnsafe("MetadataV15", [ + (0, util_1.objectSpread)({}, v143, { + extrinsic: registry.createTypeUnsafe("ExtrinsicMetadataV15", [ + (0, util_1.objectSpread)({}, v143.extrinsic, { + addressType: unchecked?.[0].type.unwrapOr(0), + callType: unchecked?.[1].type.unwrapOr(0), + extraType: unchecked?.[3].type.unwrapOr(0), + signatureType: unchecked?.[2].type.unwrapOr(0) + }) + ]), + outerEnums: registry.createTypeUnsafe("OuterEnums15", [{ + callType: unchecked?.[1].type.unwrapOr(0), + eventType: v143.lookup.paramTypes.FrameSystemEventRecord?.[0].type.unwrapOr(0) + }]) + }) + ]); + } + exports2.toV15 = toV152; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/v15/toLatest.js + var require_toLatest = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/v15/toLatest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toLatest = void 0; + function toLatest2(_registry, v152, _metaVersion) { + return v152; + } + exports2.toLatest = toLatest2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/MagicNumber.js + var require_MagicNumber = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/MagicNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MagicNumber = exports2.MAGIC_NUMBER = void 0; + var types_codec_1 = require_cjs8(); + exports2.MAGIC_NUMBER = 1635018093; + var MagicNumber2 = class extends types_codec_1.U32 { + constructor(registry, value) { + super(registry, value); + if (!this.isEmpty && !this.eq(exports2.MAGIC_NUMBER)) { + throw new Error(`MagicNumber mismatch: expected ${registry.createTypeUnsafe("u32", [exports2.MAGIC_NUMBER]).toHex()}, found ${this.toHex()}`); + } + } + }; + exports2.MagicNumber = MagicNumber2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/versions.js + var require_versions = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/versions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TO_CALLS_VERSION = exports2.LATEST_VERSION = exports2.KNOWN_VERSIONS = void 0; + exports2.KNOWN_VERSIONS = [15, 14, 13, 12, 11, 10, 9]; + exports2.LATEST_VERSION = exports2.KNOWN_VERSIONS[0]; + exports2.TO_CALLS_VERSION = 14; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/MetadataVersioned.js + var require_MetadataVersioned = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/MetadataVersioned.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MetadataVersioned = void 0; + var types_codec_1 = require_cjs8(); + var index_js_1 = require_util4(); + var toV10_js_1 = require_toV10(); + var toV11_js_1 = require_toV11(); + var toV12_js_1 = require_toV12(); + var toV13_js_1 = require_toV13(); + var toV14_js_1 = require_toV14(); + var toV15_js_1 = require_toV15(); + var toLatest_js_1 = require_toLatest(); + var MagicNumber_js_1 = require_MagicNumber(); + var versions_js_1 = require_versions(); + var MetadataVersioned2 = class extends types_codec_1.Struct { + __internal__converted = /* @__PURE__ */ new Map(); + constructor(registry, value) { + super(registry, { + magicNumber: MagicNumber_js_1.MagicNumber, + metadata: "MetadataAll" + }, value); + } + __internal__assertVersion = (version23) => { + if (this.version > version23) { + throw new Error(`Cannot convert metadata from version ${this.version} to ${version23}`); + } + return this.version === version23; + }; + __internal__getVersion = (version23, fromPrev) => { + if (version23 !== "latest" && this.__internal__assertVersion(version23)) { + const asCurr = `asV${version23}`; + return this.__internal__metadata()[asCurr]; + } + if (!this.__internal__converted.has(version23)) { + const asPrev = version23 === "latest" ? `asV${versions_js_1.LATEST_VERSION}` : `asV${version23 - 1}`; + this.__internal__converted.set(version23, fromPrev(this.registry, this[asPrev], this.version)); + } + return this.__internal__converted.get(version23); + }; + __internal__metadata = () => { + return this.getT("metadata"); + }; + get asCallsOnly() { + return new MetadataVersioned2(this.registry, { + magicNumber: this.magicNumber, + metadata: this.registry.createTypeUnsafe("MetadataAll", [(0, index_js_1.toCallsOnly)(this.registry, this.asLatest), versions_js_1.TO_CALLS_VERSION]) + }); + } + get asV9() { + this.__internal__assertVersion(9); + return this.__internal__metadata().asV9; + } + get asV10() { + return this.__internal__getVersion(10, toV10_js_1.toV10); + } + get asV11() { + return this.__internal__getVersion(11, toV11_js_1.toV11); + } + get asV12() { + return this.__internal__getVersion(12, toV12_js_1.toV12); + } + get asV13() { + return this.__internal__getVersion(13, toV13_js_1.toV13); + } + get asV14() { + return this.__internal__getVersion(14, toV14_js_1.toV14); + } + get asV15() { + return this.__internal__getVersion(15, toV15_js_1.toV15); + } + get asLatest() { + return this.__internal__getVersion("latest", toLatest_js_1.toLatest); + } + get magicNumber() { + return this.getT("magicNumber"); + } + get version() { + return this.__internal__metadata().index; + } + getUniqTypes(throwError) { + return (0, index_js_1.getUniqTypes)(this.registry, this.asLatest, throwError); + } + toJSON() { + this.asLatest; + return super.toJSON(); + } + }; + exports2.MetadataVersioned = MetadataVersioned2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/Metadata.js + var require_Metadata = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/Metadata.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Metadata = void 0; + var util_1 = require_cjs3(); + var MetadataVersioned_js_1 = require_MetadataVersioned(); + var EMPTY_METADATA2 = new Uint8Array([109, 101, 116, 97, 9]); + var VERSION_IDX2 = EMPTY_METADATA2.length - 1; + function decodeU8a8(registry, u8a) { + if (u8a.length === 0) { + return EMPTY_METADATA2; + } else if (u8a[VERSION_IDX2] === 9) { + try { + return new MetadataVersioned_js_1.MetadataVersioned(registry, u8a); + } catch { + u8a[VERSION_IDX2] = 10; + } + } + return u8a; + } + var Metadata2 = class extends MetadataVersioned_js_1.MetadataVersioned { + constructor(registry, value) { + super(registry, (0, util_1.isU8a)(value) || (0, util_1.isString)(value) ? decodeU8a8(registry, (0, util_1.u8aToU8a)(value)) : value); + } + }; + exports2.Metadata = Metadata2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/constants/index.js + var require_constants3 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/constants/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decorateConstants = void 0; + var util_1 = require_cjs3(); + var util_js_1 = require_util7(); + function decorateConstants2(registry, { pallets }, _version) { + const result = {}; + for (let i = 0, count = pallets.length; i < count; i++) { + const { constants: constants2, name: name6 } = pallets[i]; + if (!constants2.isEmpty) { + (0, util_1.lazyMethod)(result, (0, util_1.stringCamelCase)(name6), () => (0, util_1.lazyMethods)({}, constants2, (constant) => { + const codec = registry.createTypeUnsafe(registry.createLookupType(constant.type), [(0, util_1.hexToU8a)(constant.value.toHex())]); + codec.meta = constant; + return codec; + }, util_js_1.objectNameToCamel)); + } + } + return result; + } + exports2.decorateConstants = decorateConstants2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/errors/index.js + var require_errors = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/errors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decorateErrors = exports2.variantToMeta = void 0; + var util_1 = require_cjs3(); + var lazy_js_1 = require_lazy2(); + var util_js_1 = require_util7(); + function variantToMeta(lookup, variant) { + return (0, util_1.objectSpread)({ args: variant.fields.map(({ type }) => lookup.getTypeDef(type).type) }, variant); + } + exports2.variantToMeta = variantToMeta; + function decorateErrors(registry, { lookup, pallets }, version23) { + const result = {}; + for (let i = 0, count = pallets.length; i < count; i++) { + const { errors: errors2, index, name: name6 } = pallets[i]; + if (errors2.isSome) { + const sectionIndex = version23 >= 12 ? index.toNumber() : i; + (0, util_1.lazyMethod)(result, (0, util_1.stringCamelCase)(name6), () => (0, lazy_js_1.lazyVariants)(lookup, errors2.unwrap(), util_js_1.objectNameToString, (variant) => ({ + is: (errorMod) => (0, util_1.isCodec)(errorMod) && (0, util_1.isCodec)(errorMod.index) && errorMod.index.eq(sectionIndex) && ((0, util_1.isU8a)(errorMod.error) ? errorMod.error[0] === variant.index.toNumber() : (0, util_1.isCodec)(errorMod.error) && errorMod.error.eq(variant.index)), + meta: registry.createTypeUnsafe("ErrorMetadataLatest", [variantToMeta(lookup, variant)]) + }))); + } + } + return result; + } + exports2.decorateErrors = decorateErrors; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/events/index.js + var require_events = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/events/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decorateEvents = exports2.filterEventsSome = void 0; + var util_1 = require_cjs3(); + var lazy_js_1 = require_lazy2(); + var index_js_1 = require_errors(); + var util_js_1 = require_util7(); + function filterEventsSome2({ events }) { + return events.isSome; + } + exports2.filterEventsSome = filterEventsSome2; + function decorateEvents2(registry, { lookup, pallets }, version23) { + const result = {}; + const filtered = pallets.filter(filterEventsSome2); + for (let i = 0, count = filtered.length; i < count; i++) { + const { events, index, name: name6 } = filtered[i]; + const sectionIndex = version23 >= 12 ? index.toNumber() : i; + (0, util_1.lazyMethod)(result, (0, util_1.stringCamelCase)(name6), () => (0, lazy_js_1.lazyVariants)(lookup, events.unwrap(), util_js_1.objectNameToString, (variant) => ({ + is: (eventRecord) => (0, util_1.isCodec)(eventRecord) && (0, util_1.isU8a)(eventRecord.index) && sectionIndex === eventRecord.index[0] && variant.index.eq(eventRecord.index[1]), + meta: registry.createTypeUnsafe("EventMetadataLatest", [(0, index_js_1.variantToMeta)(lookup, variant)]) + }))); + } + return result; + } + exports2.decorateEvents = decorateEvents2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/getHasher.js + var require_getHasher = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/getHasher.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHasher = void 0; + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var DEFAULT_FN = (data) => (0, util_crypto_1.xxhashAsU8a)(data, 128); + var HASHERS = { + Blake2_128: (data) => (0, util_crypto_1.blake2AsU8a)(data, 128), + Blake2_128Concat: (data) => (0, util_1.u8aConcat)((0, util_crypto_1.blake2AsU8a)(data, 128), (0, util_1.u8aToU8a)(data)), + Blake2_256: (data) => (0, util_crypto_1.blake2AsU8a)(data, 256), + Identity: (data) => (0, util_1.u8aToU8a)(data), + Twox128: (data) => (0, util_crypto_1.xxhashAsU8a)(data, 128), + Twox256: (data) => (0, util_crypto_1.xxhashAsU8a)(data, 256), + Twox64Concat: (data) => (0, util_1.u8aConcat)((0, util_crypto_1.xxhashAsU8a)(data, 64), (0, util_1.u8aToU8a)(data)) + }; + function getHasher(hasher2) { + return HASHERS[hasher2.type] || DEFAULT_FN; + } + exports2.getHasher = getHasher; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/createFunction.js + var require_createFunction = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/createFunction.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFunction = exports2.createKeyRaw = exports2.createKeyInspect = exports2.createKeyRawParts = exports2.NO_RAW_ARGS = void 0; + var types_codec_1 = require_cjs8(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var index_js_1 = require_util4(); + var getHasher_js_1 = require_getHasher(); + exports2.NO_RAW_ARGS = { + args: [], + hashers: [], + keys: [] + }; + function filterDefined(a) { + return !(0, util_1.isUndefined)(a); + } + function assertArgs({ method, section }, { args, keys }) { + if (!Array.isArray(args)) { + throw new Error(`Call to ${(0, util_1.stringCamelCase)(section || "unknown")}.${(0, util_1.stringCamelCase)(method || "unknown")} needs ${keys.length} arguments`); + } else if (args.filter(filterDefined).length !== keys.length) { + throw new Error(`Call to ${(0, util_1.stringCamelCase)(section || "unknown")}.${(0, util_1.stringCamelCase)(method || "unknown")} needs ${keys.length} arguments, found [${args.join(", ")}]`); + } + } + function createKeyRawParts(registry, itemFn, { args, hashers, keys }) { + const count = keys.length; + const extra = new Array(count); + for (let i = 0; i < count; i++) { + extra[i] = (0, getHasher_js_1.getHasher)(hashers[i])(registry.createTypeUnsafe(registry.createLookupType(keys[i]), [args[i]]).toU8a()); + } + return [ + [ + (0, util_crypto_1.xxhashAsU8a)(itemFn.prefix, 128), + (0, util_crypto_1.xxhashAsU8a)(itemFn.method, 128) + ], + extra + ]; + } + exports2.createKeyRawParts = createKeyRawParts; + function createKeyInspect(registry, itemFn, args) { + assertArgs(itemFn, args); + const { meta: meta2 } = itemFn; + const [prefix, extra] = createKeyRawParts(registry, itemFn, args); + let types2 = []; + if (meta2.type.isMap) { + const { hashers, key: key2 } = meta2.type.asMap; + types2 = hashers.length === 1 ? [`${hashers[0].type}(${(0, index_js_1.getSiName)(registry.lookup, key2)})`] : registry.lookup.getSiType(key2).def.asTuple.map((k, i) => `${hashers[i].type}(${(0, index_js_1.getSiName)(registry.lookup, k)})`); + } + const names2 = ["module", "method"].concat(...args.args.map((_, i) => types2[i])); + return { + inner: prefix.concat(...extra).map((v, i) => ({ name: names2[i], outer: [v] })) + }; + } + exports2.createKeyInspect = createKeyInspect; + function createKeyRaw(registry, itemFn, args) { + const [prefix, extra] = createKeyRawParts(registry, itemFn, args); + return (0, util_1.u8aConcat)(...prefix, ...extra); + } + exports2.createKeyRaw = createKeyRaw; + function createKey(registry, itemFn, args) { + assertArgs(itemFn, args); + return (0, util_1.compactAddLength)(createKeyRaw(registry, itemFn, args)); + } + function createStorageInspect(registry, itemFn, options) { + const { meta: { type } } = itemFn; + return (...args) => { + if (type.isPlain) { + return options.skipHashing ? { inner: [], name: "wellKnown", outer: [(0, util_1.u8aToU8a)(options.key)] } : createKeyInspect(registry, itemFn, exports2.NO_RAW_ARGS); + } + const { hashers, key: key2 } = type.asMap; + return hashers.length === 1 ? createKeyInspect(registry, itemFn, { args, hashers, keys: [key2] }) : createKeyInspect(registry, itemFn, { args, hashers, keys: registry.lookup.getSiType(key2).def.asTuple }); + }; + } + function createStorageFn(registry, itemFn, options) { + const { meta: { type } } = itemFn; + let cacheKey = null; + return (...args) => { + if (type.isPlain) { + if (!cacheKey) { + cacheKey = options.skipHashing ? (0, util_1.compactAddLength)((0, util_1.u8aToU8a)(options.key)) : createKey(registry, itemFn, exports2.NO_RAW_ARGS); + } + return cacheKey; + } + const { hashers, key: key2 } = type.asMap; + return hashers.length === 1 ? createKey(registry, itemFn, { args, hashers, keys: [key2] }) : createKey(registry, itemFn, { args, hashers, keys: registry.lookup.getSiType(key2).def.asTuple }); + }; + } + function createWithMeta(registry, itemFn, options) { + const { meta: meta2, method, prefix, section } = itemFn; + const storageFn = createStorageFn(registry, itemFn, options); + storageFn.inspect = createStorageInspect(registry, itemFn, options); + storageFn.meta = meta2; + storageFn.method = (0, util_1.stringCamelCase)(method); + storageFn.prefix = prefix; + storageFn.section = section; + storageFn.toJSON = () => (0, util_1.objectSpread)({ storage: { method, prefix, section } }, meta2.toJSON()); + return storageFn; + } + function extendHeadMeta(registry, { meta: { docs, name: name6, type }, section }, { method }, iterFn) { + const meta2 = registry.createTypeUnsafe("StorageEntryMetadataLatest", [{ + docs, + fallback: registry.createTypeUnsafe("Bytes", []), + modifier: registry.createTypeUnsafe("StorageEntryModifierLatest", [1]), + name: name6, + type: registry.createTypeUnsafe("StorageEntryTypeLatest", [type.asMap.key, 0]) + }]); + iterFn.meta = meta2; + const fn2 = (...args) => registry.createTypeUnsafe("StorageKey", [iterFn(...args), { method, section }]); + fn2.meta = meta2; + return fn2; + } + function extendPrefixedMap(registry, itemFn, storageFn) { + const { meta: { type }, method, section } = itemFn; + storageFn.iterKey = extendHeadMeta(registry, itemFn, storageFn, (...args) => { + if (args.length && (type.isPlain || args.length >= type.asMap.hashers.length)) { + throw new Error(`Iteration of ${(0, util_1.stringCamelCase)(section || "unknown")}.${(0, util_1.stringCamelCase)(method || "unknown")} needs arguments to be at least one less than the full arguments, found [${args.join(", ")}]`); + } + if (args.length) { + if (type.isMap) { + const { hashers, key: key2 } = type.asMap; + const keysVec = hashers.length === 1 ? [key2] : registry.lookup.getSiType(key2).def.asTuple; + return new types_codec_1.Raw(registry, createKeyRaw(registry, itemFn, { args, hashers: hashers.slice(0, args.length), keys: keysVec.slice(0, args.length) })); + } + } + return new types_codec_1.Raw(registry, createKeyRaw(registry, itemFn, exports2.NO_RAW_ARGS)); + }); + return storageFn; + } + function createFunction(registry, itemFn, options) { + const { meta: { type } } = itemFn; + const storageFn = createWithMeta(registry, itemFn, options); + if (type.isMap) { + extendPrefixedMap(registry, itemFn, storageFn); + } + storageFn.keyPrefix = (...args) => storageFn.iterKey && storageFn.iterKey(...args) || (0, util_1.compactStripLength)(storageFn())[1]; + return storageFn; + } + exports2.createFunction = createFunction; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/util.js + var require_util8 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRuntimeFunction = void 0; + var types_create_1 = require_cjs9(); + var createFunction_js_1 = require_createFunction(); + function findSiPrimitive(registry, type) { + const prim = type.toLowerCase(); + return registry.lookup.types.find((t) => t.type.def.isPrimitive && t.type.def.asPrimitive.toString().toLowerCase() === prim || t.type.def.isHistoricMetaCompat && t.type.def.asHistoricMetaCompat.toString().toLowerCase() === prim); + } + function findSiType(registry, type) { + let portable = findSiPrimitive(registry, type); + if (!portable && (type === "Bytes" || type.startsWith("[u8;"))) { + const u84 = findSiPrimitive(registry, "u8"); + if (u84) { + if (type === "Bytes") { + portable = registry.lookup.types.find((t) => t.type.def.isSequence && t.type.def.asSequence.type.eq(u84.id) || t.type.def.isHistoricMetaCompat && t.type.def.asHistoricMetaCompat.eq(type)); + } else { + const td2 = (0, types_create_1.getTypeDef)(type); + portable = registry.lookup.types.find((t) => t.type.def.isArray && t.type.def.asArray.eq({ + len: td2.length, + type: u84.id + }) || t.type.def.isHistoricMetaCompat && t.type.def.asHistoricMetaCompat.eq(type)); + } + } + } + if (!portable) { + console.warn(`Unable to map ${type} to a lookup index`); + } + return portable; + } + function createRuntimeFunction({ method, prefix, section }, key2, { docs, type }) { + return (registry) => (0, createFunction_js_1.createFunction)(registry, { + meta: registry.createTypeUnsafe("StorageEntryMetadataLatest", [{ + docs: registry.createTypeUnsafe("Vec", [[docs]]), + modifier: registry.createTypeUnsafe("StorageEntryModifierLatest", ["Required"]), + name: registry.createTypeUnsafe("Text", [method]), + toJSON: () => key2, + type: registry.createTypeUnsafe("StorageEntryTypeLatest", [{ Plain: findSiType(registry, type)?.id || 0 }]) + }]), + method, + prefix, + section + }, { key: key2, skipHashing: true }); + } + exports2.createRuntimeFunction = createRuntimeFunction; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/substrate.js + var require_substrate2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/substrate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.substrate = void 0; + var util_js_1 = require_util8(); + var prefix = "Substrate"; + var section = "substrate"; + function createSubstrateFn(method, key2, meta2) { + return (0, util_js_1.createRuntimeFunction)({ method, prefix, section }, key2, meta2); + } + exports2.substrate = { + changesTrieConfig: createSubstrateFn("changesTrieConfig", ":changes_trie", { + docs: "Changes trie configuration is stored under this key.", + type: "u32" + }), + childStorageKeyPrefix: createSubstrateFn("childStorageKeyPrefix", ":child_storage:", { + docs: "Prefix of child storage keys.", + type: "u32" + }), + code: createSubstrateFn("code", ":code", { + docs: "Wasm code of the runtime.", + type: "Bytes" + }), + extrinsicIndex: createSubstrateFn("extrinsicIndex", ":extrinsic_index", { + docs: "Current extrinsic index (u32) is stored under this key.", + type: "u32" + }), + heapPages: createSubstrateFn("heapPages", ":heappages", { + docs: "Number of wasm linear memory pages required for execution of the runtime.", + type: "u64" + }), + intrablockEntropy: createSubstrateFn("intrablockEntropy", ":intrablock_entropy", { + docs: "Current intra-block entropy (a universally unique `[u8; 32]` value) is stored here.", + type: "[u8; 32]" + }) + }; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/getStorage.js + var require_getStorage = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/getStorage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getStorage = void 0; + var substrate_js_1 = require_substrate2(); + function getStorage(registry) { + const storage = {}; + const entries = Object.entries(substrate_js_1.substrate); + for (let e = 0, count = entries.length; e < count; e++) { + storage[entries[e][0]] = entries[e][1](registry); + } + return { substrate: storage }; + } + exports2.getStorage = getStorage; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/index.js + var require_storage2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/storage/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decorateStorage = void 0; + var util_1 = require_cjs3(); + var util_js_1 = require_util7(); + var createFunction_js_1 = require_createFunction(); + var getStorage_js_1 = require_getStorage(); + var util_js_2 = require_util8(); + var VERSION_NAME = "palletVersion"; + var VERSION_KEY = ":__STORAGE_VERSION__:"; + var VERSION_DOCS = { docs: "Returns the current pallet version from storage", type: "u16" }; + function decorateStorage(registry, { pallets }, _metaVersion) { + const result = (0, getStorage_js_1.getStorage)(registry); + for (let i = 0, count = pallets.length; i < count; i++) { + const { name: name6, storage } = pallets[i]; + if (storage.isSome) { + const section = (0, util_1.stringCamelCase)(name6); + const { items, prefix: _prefix } = storage.unwrap(); + const prefix = _prefix.toString(); + (0, util_1.lazyMethod)(result, section, () => (0, util_1.lazyMethods)({ + palletVersion: (0, util_js_2.createRuntimeFunction)({ method: VERSION_NAME, prefix, section }, (0, createFunction_js_1.createKeyRaw)(registry, { method: VERSION_KEY, prefix: name6.toString() }, createFunction_js_1.NO_RAW_ARGS), VERSION_DOCS)(registry) + }, items, (meta2) => (0, createFunction_js_1.createFunction)(registry, { meta: meta2, method: meta2.name.toString(), prefix, section }, {}), util_js_1.objectNameToCamel)); + } + } + return result; + } + exports2.decorateStorage = decorateStorage; + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/decorate/index.js + var require_decorate = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/decorate/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterEventsSome = exports2.filterCallsSome = exports2.decorateStorage = exports2.decorateExtrinsics = exports2.decorateEvents = exports2.decorateErrors = exports2.decorateConstants = exports2.expandMetadata = void 0; + var Metadata_js_1 = require_Metadata(); + var index_js_1 = require_constants3(); + Object.defineProperty(exports2, "decorateConstants", { enumerable: true, get: function() { + return index_js_1.decorateConstants; + } }); + var index_js_2 = require_errors(); + Object.defineProperty(exports2, "decorateErrors", { enumerable: true, get: function() { + return index_js_2.decorateErrors; + } }); + var index_js_3 = require_events(); + Object.defineProperty(exports2, "decorateEvents", { enumerable: true, get: function() { + return index_js_3.decorateEvents; + } }); + Object.defineProperty(exports2, "filterEventsSome", { enumerable: true, get: function() { + return index_js_3.filterEventsSome; + } }); + var index_js_4 = require_extrinsics(); + Object.defineProperty(exports2, "decorateExtrinsics", { enumerable: true, get: function() { + return index_js_4.decorateExtrinsics; + } }); + Object.defineProperty(exports2, "filterCallsSome", { enumerable: true, get: function() { + return index_js_4.filterCallsSome; + } }); + var index_js_5 = require_storage2(); + Object.defineProperty(exports2, "decorateStorage", { enumerable: true, get: function() { + return index_js_5.decorateStorage; + } }); + function expandMetadata(registry, metadata) { + if (!(metadata instanceof Metadata_js_1.Metadata)) { + throw new Error("You need to pass a valid Metadata instance to Decorated"); + } + const latest2 = metadata.asLatest; + const version23 = metadata.version; + return { + consts: (0, index_js_1.decorateConstants)(registry, latest2, version23), + errors: (0, index_js_2.decorateErrors)(registry, latest2, version23), + events: (0, index_js_3.decorateEvents)(registry, latest2, version23), + query: (0, index_js_5.decorateStorage)(registry, latest2, version23), + registry, + tx: (0, index_js_4.decorateExtrinsics)(registry, latest2, version23) + }; + } + exports2.expandMetadata = expandMetadata; + } + }); + + // ../../node_modules/@polkadot/types/cjs/create/registry.js + var require_registry2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/create/registry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TypeRegistry = void 0; + var tslib_1 = require_tslib(); + var types_codec_1 = require_cjs8(); + var types_create_1 = require_cjs9(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var index_js_1 = require_signedExtensions(); + var Event_js_1 = require_Event(); + var baseTypes = tslib_1.__importStar(require_index_types()); + var definitions = tslib_1.__importStar(require_definitions75()); + var index_js_2 = require_extrinsics(); + var index_js_3 = require_decorate(); + var Metadata_js_1 = require_Metadata(); + var index_js_4 = require_PortableRegistry2(); + var lazy_js_1 = require_lazy2(); + var DEFAULT_FIRST_CALL_IDX2 = new Uint8Array(2); + var l15 = (0, util_1.logger)("registry"); + function sortDecimalStrings2(a, b) { + return parseInt(a, 10) - parseInt(b, 10); + } + function valueToString2(v) { + return v.toString(); + } + function getFieldArgs2(lookup, fields) { + const count = fields.length; + const args = new Array(count); + for (let i = 0; i < count; i++) { + args[i] = lookup.getTypeDef(fields[i].type).type; + } + return args; + } + function clearRecord2(record) { + const keys = Object.keys(record); + for (let i = 0, count = keys.length; i < count; i++) { + delete record[keys[i]]; + } + } + function getVariantStringIdx2({ index }) { + return index.toString(); + } + function injectErrors2(_, { lookup, pallets }, version23, result) { + clearRecord2(result); + for (let i = 0, count = pallets.length; i < count; i++) { + const { errors: errors2, index, name: name6 } = pallets[i]; + if (errors2.isSome) { + const sectionName = (0, util_1.stringCamelCase)(name6); + (0, util_1.lazyMethod)(result, version23 >= 12 ? index.toNumber() : i, () => (0, lazy_js_1.lazyVariants)(lookup, errors2.unwrap(), getVariantStringIdx2, ({ docs, fields, index: index2, name: name7 }) => ({ + args: getFieldArgs2(lookup, fields), + docs: docs.map(valueToString2), + fields, + index: index2.toNumber(), + method: name7.toString(), + name: name7.toString(), + section: sectionName + }))); + } + } + } + function injectEvents2(registry, { lookup, pallets }, version23, result) { + const filtered = pallets.filter(index_js_3.filterEventsSome); + clearRecord2(result); + for (let i = 0, count = filtered.length; i < count; i++) { + const { events, index, name: name6 } = filtered[i]; + (0, util_1.lazyMethod)(result, version23 >= 12 ? index.toNumber() : i, () => (0, lazy_js_1.lazyVariants)(lookup, events.unwrap(), getVariantStringIdx2, (variant) => { + const meta2 = registry.createType("EventMetadataLatest", (0, util_1.objectSpread)({}, variant, { args: getFieldArgs2(lookup, variant.fields) })); + return class extends Event_js_1.GenericEventData { + constructor(registry2, value) { + super(registry2, value, meta2, (0, util_1.stringCamelCase)(name6), variant.name.toString()); + } + }; + })); + } + } + function injectExtrinsics2(registry, { lookup, pallets }, version23, result, mapping2) { + const filtered = pallets.filter(index_js_3.filterCallsSome); + clearRecord2(result); + clearRecord2(mapping2); + for (let i = 0, count = filtered.length; i < count; i++) { + const { calls, index, name: name6 } = filtered[i]; + const sectionIndex = version23 >= 12 ? index.toNumber() : i; + const sectionName = (0, util_1.stringCamelCase)(name6); + const allCalls = calls.unwrap(); + (0, util_1.lazyMethod)(result, sectionIndex, () => (0, lazy_js_1.lazyVariants)(lookup, allCalls, getVariantStringIdx2, (variant) => (0, index_js_2.createCallFunction)(registry, lookup, variant, sectionName, sectionIndex))); + const { path } = registry.lookup.getSiType(allCalls.type); + const palletIdx = path.findIndex((v) => v.eq("pallet")); + if (palletIdx !== -1) { + const name7 = (0, util_1.stringCamelCase)(path.slice(0, palletIdx).map((p, i10) => i10 === 0 ? p.replace(/^(frame|pallet)_/, "") : p).join(" ")); + if (!mapping2[name7]) { + mapping2[name7] = [sectionName]; + } else { + mapping2[name7].push(sectionName); + } + } + } + } + function extractProperties2(registry, metadata) { + const original = registry.getChainProperties(); + const constants2 = (0, index_js_3.decorateConstants)(registry, metadata.asLatest, metadata.version); + const ss58Format = constants2["system"] && (constants2["system"]["sS58Prefix"] || constants2["system"]["ss58Prefix"]); + if (!ss58Format) { + return original; + } + const { isEthereum, tokenDecimals, tokenSymbol } = original || {}; + return registry.createTypeUnsafe("ChainProperties", [{ isEthereum, ss58Format, tokenDecimals, tokenSymbol }]); + } + var TypeRegistry2 = class { + __internal__chainProperties; + __internal__classes = /* @__PURE__ */ new Map(); + __internal__definitions = /* @__PURE__ */ new Map(); + __internal__firstCallIndex = null; + __internal__hasher = util_crypto_1.blake2AsU8a; + __internal__knownTypes = {}; + __internal__lookup; + __internal__metadata; + __internal__metadataVersion = 0; + __internal__signedExtensions = index_js_1.fallbackExtensions; + __internal__unknownTypes = /* @__PURE__ */ new Map(); + __internal__userExtensions; + __internal__knownDefaults; + __internal__knownDefaultsEntries; + __internal__knownDefinitions; + __internal__metadataCalls = {}; + __internal__metadataErrors = {}; + __internal__metadataEvents = {}; + __internal__moduleMap = {}; + createdAtHash; + constructor(createdAtHash) { + this.__internal__knownDefaults = (0, util_1.objectSpread)({ Json: types_codec_1.Json, Metadata: Metadata_js_1.Metadata, PortableRegistry: index_js_4.PortableRegistry, Raw: types_codec_1.Raw }, baseTypes); + this.__internal__knownDefaultsEntries = Object.entries(this.__internal__knownDefaults); + this.__internal__knownDefinitions = definitions; + const allKnown = Object.values(this.__internal__knownDefinitions); + for (let i = 0, count = allKnown.length; i < count; i++) { + this.register(allKnown[i].types); + } + if (createdAtHash) { + this.createdAtHash = this.createType("BlockHash", createdAtHash); + } + } + get chainDecimals() { + if (this.__internal__chainProperties?.tokenDecimals.isSome) { + const allDecimals = this.__internal__chainProperties.tokenDecimals.unwrap(); + if (allDecimals.length) { + return allDecimals.map((b) => b.toNumber()); + } + } + return [12]; + } + get chainIsEthereum() { + return this.__internal__chainProperties?.isEthereum.isTrue || false; + } + get chainSS58() { + return this.__internal__chainProperties?.ss58Format.isSome ? this.__internal__chainProperties.ss58Format.unwrap().toNumber() : void 0; + } + get chainTokens() { + if (this.__internal__chainProperties?.tokenSymbol.isSome) { + const allTokens = this.__internal__chainProperties.tokenSymbol.unwrap(); + if (allTokens.length) { + return allTokens.map(valueToString2); + } + } + return [util_1.formatBalance.getDefaults().unit]; + } + get firstCallIndex() { + return this.__internal__firstCallIndex || DEFAULT_FIRST_CALL_IDX2; + } + isLookupType(value) { + return /Lookup\d+$/.test(value); + } + createLookupType(lookupId) { + return `Lookup${typeof lookupId === "number" ? lookupId : lookupId.toNumber()}`; + } + get knownTypes() { + return this.__internal__knownTypes; + } + get lookup() { + return (0, util_1.assertReturn)(this.__internal__lookup, "PortableRegistry has not been set on this registry"); + } + get metadata() { + return (0, util_1.assertReturn)(this.__internal__metadata, "Metadata has not been set on this registry"); + } + get unknownTypes() { + return [...this.__internal__unknownTypes.keys()]; + } + get signedExtensions() { + return this.__internal__signedExtensions; + } + clearCache() { + this.__internal__classes = /* @__PURE__ */ new Map(); + } + createClass(type) { + return (0, types_create_1.createClassUnsafe)(this, type); + } + createClassUnsafe(type) { + return (0, types_create_1.createClassUnsafe)(this, type); + } + createType(type, ...params) { + return (0, types_create_1.createTypeUnsafe)(this, type, params); + } + createTypeUnsafe(type, params, options) { + return (0, types_create_1.createTypeUnsafe)(this, type, params, options); + } + findMetaCall(callIndex) { + const [section, method] = [callIndex[0], callIndex[1]]; + return (0, util_1.assertReturn)(this.__internal__metadataCalls[`${section}`] && this.__internal__metadataCalls[`${section}`][`${method}`], () => `findMetaCall: Unable to find Call with index [${section}, ${method}]/[${callIndex.toString()}]`); + } + findMetaError(errorIndex) { + const [section, method] = (0, util_1.isU8a)(errorIndex) ? [errorIndex[0], errorIndex[1]] : [ + errorIndex.index.toNumber(), + (0, util_1.isU8a)(errorIndex.error) ? errorIndex.error[0] : errorIndex.error.toNumber() + ]; + return (0, util_1.assertReturn)(this.__internal__metadataErrors[`${section}`] && this.__internal__metadataErrors[`${section}`][`${method}`], () => `findMetaError: Unable to find Error with index [${section}, ${method}]/[${errorIndex.toString()}]`); + } + findMetaEvent(eventIndex) { + const [section, method] = [eventIndex[0], eventIndex[1]]; + return (0, util_1.assertReturn)(this.__internal__metadataEvents[`${section}`] && this.__internal__metadataEvents[`${section}`][`${method}`], () => `findMetaEvent: Unable to find Event with index [${section}, ${method}]/[${eventIndex.toString()}]`); + } + get(name6, withUnknown, knownTypeDef) { + return this.getUnsafe(name6, withUnknown, knownTypeDef); + } + getUnsafe(name6, withUnknown, knownTypeDef) { + let Type2 = this.__internal__classes.get(name6) || this.__internal__knownDefaults[name6]; + if (!Type2) { + const definition = this.__internal__definitions.get(name6); + let BaseType; + if (definition) { + BaseType = (0, types_create_1.createClassUnsafe)(this, definition); + } else if (knownTypeDef) { + BaseType = (0, types_create_1.constructTypeClass)(this, knownTypeDef); + } else if (withUnknown) { + l15.warn(`Unable to resolve type ${name6}, it will fail on construction`); + this.__internal__unknownTypes.set(name6, true); + BaseType = types_codec_1.DoNotConstruct.with(name6); + } + if (BaseType) { + Type2 = class extends BaseType { + }; + this.__internal__classes.set(name6, Type2); + if (knownTypeDef && (0, util_1.isNumber)(knownTypeDef.lookupIndex)) { + this.__internal__classes.set(this.createLookupType(knownTypeDef.lookupIndex), Type2); + } + } + } + return Type2; + } + getChainProperties() { + return this.__internal__chainProperties; + } + getClassName(Type2) { + const names2 = []; + for (const [name6, Clazz] of this.__internal__knownDefaultsEntries) { + if (Type2 === Clazz) { + names2.push(name6); + } + } + for (const [name6, Clazz] of this.__internal__classes.entries()) { + if (Type2 === Clazz) { + names2.push(name6); + } + } + return names2.length ? names2.sort().reverse()[0] : void 0; + } + getDefinition(typeName) { + return this.__internal__definitions.get(typeName); + } + getModuleInstances(specName, moduleName) { + return this.__internal__knownTypes?.typesBundle?.spec?.[specName.toString()]?.instances?.[moduleName] || this.__internal__moduleMap[moduleName]; + } + getOrThrow(name6) { + const Clazz = this.get(name6); + if (!Clazz) { + throw new Error(`type ${name6} not found`); + } + return Clazz; + } + getOrUnknown(name6) { + return this.get(name6, true); + } + getSignedExtensionExtra() { + return (0, index_js_1.expandExtensionTypes)(this.__internal__signedExtensions, "payload", this.__internal__userExtensions); + } + getSignedExtensionTypes() { + return (0, index_js_1.expandExtensionTypes)(this.__internal__signedExtensions, "extrinsic", this.__internal__userExtensions); + } + hasClass(name6) { + return this.__internal__classes.has(name6) || !!this.__internal__knownDefaults[name6]; + } + hasDef(name6) { + return this.__internal__definitions.has(name6); + } + hasType(name6) { + return !this.__internal__unknownTypes.get(name6) && (this.hasClass(name6) || this.hasDef(name6)); + } + hash(data) { + return this.createType("CodecHash", this.__internal__hasher(data)); + } + register(arg1, arg2) { + if ((0, util_1.isFunction)(arg1)) { + this.__internal__classes.set(arg1.name, arg1); + } else if ((0, util_1.isString)(arg1)) { + if (!(0, util_1.isFunction)(arg2)) { + throw new Error(`Expected class definition passed to '${arg1}' registration`); + } else if (arg1 === arg2.toString()) { + throw new Error(`Unable to register circular ${arg1} === ${arg1}`); + } + this.__internal__classes.set(arg1, arg2); + } else { + this.__internal__registerObject(arg1); + } + } + __internal__registerObject = (obj) => { + const entries = Object.entries(obj); + for (let e = 0, count = entries.length; e < count; e++) { + const [name6, type] = entries[e]; + if ((0, util_1.isFunction)(type)) { + this.__internal__classes.set(name6, type); + } else { + const def = (0, util_1.isString)(type) ? type : (0, util_1.stringify)(type); + if (name6 === def) { + throw new Error(`Unable to register circular ${name6} === ${def}`); + } + if (this.__internal__classes.has(name6)) { + this.__internal__classes.delete(name6); + } + this.__internal__definitions.set(name6, def); + } + } + }; + setChainProperties(properties) { + if (properties) { + this.__internal__chainProperties = properties; + } + } + setHasher(hasher2) { + this.__internal__hasher = hasher2 || util_crypto_1.blake2AsU8a; + } + setKnownTypes(knownTypes2) { + this.__internal__knownTypes = knownTypes2; + } + setLookup(lookup) { + this.__internal__lookup = lookup; + lookup.register(); + } + __internal__registerLookup = (lookup) => { + this.setLookup(lookup); + let Weight = null; + if (this.hasType("SpWeightsWeightV2Weight")) { + const weightv2 = this.createType("SpWeightsWeightV2Weight"); + Weight = weightv2.refTime && weightv2.proofSize ? "SpWeightsWeightV2Weight" : "WeightV1"; + } else if (!(0, util_1.isBn)(this.createType("Weight"))) { + Weight = "WeightV1"; + } + if (Weight) { + this.register({ Weight }); + } + }; + setMetadata(metadata, signedExtensions, userExtensions, noInitWarn) { + this.__internal__metadata = metadata.asLatest; + this.__internal__metadataVersion = metadata.version; + this.__internal__firstCallIndex = null; + this.__internal__registerLookup(this.__internal__metadata.lookup); + injectExtrinsics2(this, this.__internal__metadata, this.__internal__metadataVersion, this.__internal__metadataCalls, this.__internal__moduleMap); + injectErrors2(this, this.__internal__metadata, this.__internal__metadataVersion, this.__internal__metadataErrors); + injectEvents2(this, this.__internal__metadata, this.__internal__metadataVersion, this.__internal__metadataEvents); + const [defSection] = Object.keys(this.__internal__metadataCalls).sort(sortDecimalStrings2); + if (defSection) { + const [defMethod] = Object.keys(this.__internal__metadataCalls[defSection]).sort(sortDecimalStrings2); + if (defMethod) { + this.__internal__firstCallIndex = new Uint8Array([parseInt(defSection, 10), parseInt(defMethod, 10)]); + } + } + this.setSignedExtensions(signedExtensions || (this.__internal__metadata.extrinsic.version.gt(util_1.BN_ZERO) ? this.__internal__metadata.extrinsic.signedExtensions.map(({ identifier }) => identifier.toString()) : index_js_1.fallbackExtensions), userExtensions, noInitWarn); + this.setChainProperties(extractProperties2(this, metadata)); + } + setSignedExtensions(signedExtensions = index_js_1.fallbackExtensions, userExtensions, noInitWarn) { + this.__internal__signedExtensions = signedExtensions; + this.__internal__userExtensions = userExtensions; + if (!noInitWarn) { + const unknown = (0, index_js_1.findUnknownExtensions)(this.__internal__signedExtensions, this.__internal__userExtensions); + if (unknown.length) { + l15.warn(`Unknown signed extensions ${unknown.join(", ")} found, treating them as no-effect`); + } + } + } + }; + exports2.TypeRegistry = TypeRegistry2; + } + }); + + // ../../node_modules/@polkadot/types/cjs/create/index.js + var require_create2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/create/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_exports(), exports2); + tslib_1.__exportStar(require_createClass(), exports2); + tslib_1.__exportStar(require_createType(), exports2); + tslib_1.__exportStar(require_lazy2(), exports2); + tslib_1.__exportStar(require_registry2(), exports2); + } + }); + + // ../../node_modules/@polkadot/types/cjs/metadata/index.js + var require_metadata = __commonJS({ + "../../node_modules/@polkadot/types/cjs/metadata/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PortableRegistry = exports2.Metadata = exports2.expandMetadata = exports2.decorateStorage = exports2.decorateExtrinsics = exports2.decorateConstants = void 0; + var index_js_1 = require_decorate(); + Object.defineProperty(exports2, "decorateConstants", { enumerable: true, get: function() { + return index_js_1.decorateConstants; + } }); + Object.defineProperty(exports2, "decorateExtrinsics", { enumerable: true, get: function() { + return index_js_1.decorateExtrinsics; + } }); + Object.defineProperty(exports2, "decorateStorage", { enumerable: true, get: function() { + return index_js_1.decorateStorage; + } }); + Object.defineProperty(exports2, "expandMetadata", { enumerable: true, get: function() { + return index_js_1.expandMetadata; + } }); + var Metadata_js_1 = require_Metadata(); + Object.defineProperty(exports2, "Metadata", { enumerable: true, get: function() { + return Metadata_js_1.Metadata; + } }); + var index_js_2 = require_PortableRegistry2(); + Object.defineProperty(exports2, "PortableRegistry", { enumerable: true, get: function() { + return index_js_2.PortableRegistry; + } }); + } + }); + + // ../../node_modules/@polkadot/types/cjs/bundle.js + var require_bundle6 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typeDefinitions = exports2.rpcDefinitions = exports2.unwrapStorageType = exports2.packageInfo = exports2.convertSiV0toV1 = exports2.TypeDefInfo = void 0; + var tslib_1 = require_tslib(); + var typeDefinitions = tslib_1.__importStar(require_definitions75()); + exports2.typeDefinitions = typeDefinitions; + var jsonrpc_js_1 = tslib_1.__importDefault(require_jsonrpc()); + exports2.rpcDefinitions = jsonrpc_js_1.default; + var types_create_1 = require_cjs9(); + Object.defineProperty(exports2, "TypeDefInfo", { enumerable: true, get: function() { + return types_create_1.TypeDefInfo; + } }); + var index_js_1 = require_PortableRegistry2(); + Object.defineProperty(exports2, "convertSiV0toV1", { enumerable: true, get: function() { + return index_js_1.convertSiV0toV1; + } }); + var packageInfo_js_1 = require_packageInfo14(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + var index_js_2 = require_util5(); + Object.defineProperty(exports2, "unwrapStorageType", { enumerable: true, get: function() { + return index_js_2.unwrapStorageType; + } }); + tslib_1.__exportStar(require_codec2(), exports2); + tslib_1.__exportStar(require_create2(), exports2); + tslib_1.__exportStar(require_index_types(), exports2); + tslib_1.__exportStar(require_metadata(), exports2); + } + }); + + // ../../node_modules/@polkadot/types/cjs/index.js + var require_cjs10 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect3(); + tslib_1.__exportStar(require_bundle6(), exports2); + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/util/refCountDelay.js + var require_refCountDelay = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/util/refCountDelay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.refCountDelay = void 0; + var rxjs_1 = require_cjs7(); + function refCountDelay(delay = 1750) { + return (source) => { + let [state, refCount, connection, scheduler] = [0, 0, rxjs_1.Subscription.EMPTY, rxjs_1.Subscription.EMPTY]; + return new rxjs_1.Observable((ob2) => { + source.subscribe(ob2); + if (refCount++ === 0) { + if (state === 1) { + scheduler.unsubscribe(); + } else { + connection = source.connect(); + } + state = 3; + } + return () => { + if (--refCount === 0) { + if (state === 2) { + state = 0; + scheduler.unsubscribe(); + } else { + state = 1; + scheduler = rxjs_1.asapScheduler.schedule(() => { + state = 0; + connection.unsubscribe(); + }, delay); + } + } + }; + }); + }; + } + exports2.refCountDelay = refCountDelay; + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/util/drr.js + var require_drr = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/util/drr.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.drr = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var refCountDelay_js_1 = require_refCountDelay(); + function CMP(a, b) { + return (0, util_1.stringify)({ t: a }) === (0, util_1.stringify)({ t: b }); + } + function ERR(error) { + throw error; + } + function NOOP() { + } + function drr({ delay, skipChange = false, skipTimeout = false } = {}) { + return (source$) => source$.pipe( + (0, rxjs_1.catchError)(ERR), + skipChange ? (0, rxjs_1.tap)(NOOP) : (0, rxjs_1.distinctUntilChanged)(CMP), + (0, rxjs_1.publishReplay)(1), + skipTimeout ? (0, rxjs_1.refCount)() : (0, refCountDelay_js_1.refCountDelay)(delay) + ); + } + exports2.drr = drr; + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/util/memo.js + var require_memo = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/util/memo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.memo = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var drr_js_1 = require_drr(); + function memo(instanceId, inner) { + const options = { getInstanceId: () => instanceId }; + const cached = (0, util_1.memoize)((...params) => new rxjs_1.Observable((observer) => { + const subscription = inner(...params).subscribe(observer); + return () => { + cached.unmemoize(...params); + subscription.unsubscribe(); + }; + }).pipe((0, drr_js_1.drr)()), options); + return cached; + } + exports2.memo = memo; + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/util/index.js + var require_util9 = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/util/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_drr(), exports2); + tslib_1.__exportStar(require_memo(), exports2); + tslib_1.__exportStar(require_refCountDelay(), exports2); + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/bundle.js + var require_bundle7 = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RpcCore = exports2.packageInfo = void 0; + var tslib_1 = require_tslib(); + var rxjs_1 = require_cjs7(); + var types_1 = require_cjs10(); + var util_1 = require_cjs3(); + var index_js_1 = require_util9(); + var packageInfo_js_1 = require_packageInfo15(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + tslib_1.__exportStar(require_util9(), exports2); + var l15 = (0, util_1.logger)("rpc-core"); + var EMPTY_META = { + fallback: void 0, + modifier: { isOptional: true }, + type: { + asMap: { linked: { isTrue: false } }, + isMap: false + } + }; + function logErrorMessage(method, { noErrorLog, params, type }, error) { + if (noErrorLog) { + return; + } + l15.error(`${method}(${params.map(({ isOptional, name: name6, type: type2 }) => `${name6}${isOptional ? "?" : ""}: ${type2}`).join(", ")}): ${type}:: ${error.message}`); + } + function isTreatAsHex(key2) { + return ["0x3a636f6465"].includes(key2.toHex()); + } + var RpcCore = class { + __internal__instanceId; + __internal__isPedantic; + __internal__registryDefault; + __internal__storageCache = /* @__PURE__ */ new Map(); + __internal__storageCacheHits = 0; + __internal__storageCacheSize = 0; + __internal__getBlockRegistry; + __internal__getBlockHash; + mapping = /* @__PURE__ */ new Map(); + provider; + sections = []; + constructor(instanceId, registry, { isPedantic = true, provider, userRpc = {} }) { + if (!provider || !(0, util_1.isFunction)(provider.send)) { + throw new Error("Expected Provider to API create"); + } + this.__internal__instanceId = instanceId; + this.__internal__isPedantic = isPedantic; + this.__internal__registryDefault = registry; + this.provider = provider; + const sectionNames = Object.keys(types_1.rpcDefinitions); + this.sections.push(...sectionNames); + this.addUserInterfaces(userRpc); + } + get isConnected() { + return this.provider.isConnected; + } + connect() { + return this.provider.connect(); + } + disconnect() { + return this.provider.disconnect(); + } + get stats() { + const stats = this.provider.stats; + return stats ? { + ...stats, + core: { + cacheHits: this.__internal__storageCacheHits, + cacheSize: this.__internal__storageCacheSize + } + } : void 0; + } + setRegistrySwap(registrySwap) { + this.__internal__getBlockRegistry = (0, util_1.memoize)(registrySwap, { + getInstanceId: () => this.__internal__instanceId + }); + } + setResolveBlockHash(resolveBlockHash) { + this.__internal__getBlockHash = (0, util_1.memoize)(resolveBlockHash, { + getInstanceId: () => this.__internal__instanceId + }); + } + addUserInterfaces(userRpc) { + this.sections.push(...Object.keys(userRpc).filter((k) => !this.sections.includes(k))); + for (let s = 0, scount = this.sections.length; s < scount; s++) { + const section = this.sections[s]; + const defs = (0, util_1.objectSpread)({}, types_1.rpcDefinitions[section], userRpc[section]); + const methods = Object.keys(defs); + for (let m = 0, mcount = methods.length; m < mcount; m++) { + const method = methods[m]; + const def = defs[method]; + const jsonrpc = def.endpoint || `${section}_${method}`; + if (!this.mapping.has(jsonrpc)) { + const isSubscription2 = !!def.pubsub; + if (!this[section]) { + this[section] = {}; + } + this.mapping.set(jsonrpc, (0, util_1.objectSpread)({}, def, { isSubscription: isSubscription2, jsonrpc, method, section })); + (0, util_1.lazyMethod)(this[section], method, () => isSubscription2 ? this._createMethodSubscribe(section, method, def) : this._createMethodSend(section, method, def)); + } + } + } + } + _memomize(creator, def) { + const memoOpts = { getInstanceId: () => this.__internal__instanceId }; + const memoized2 = (0, util_1.memoize)(creator(true), memoOpts); + memoized2.raw = (0, util_1.memoize)(creator(false), memoOpts); + memoized2.meta = def; + return memoized2; + } + _formatResult(isScale, registry, blockHash, method, def, params, result) { + return isScale ? this._formatOutput(registry, blockHash, method, def, params, result) : result; + } + _createMethodSend(section, method, def) { + const rpcName = def.endpoint || `${section}_${method}`; + const hashIndex = def.params.findIndex(({ isHistoric }) => isHistoric); + let memoized2 = null; + const callWithRegistry = async (isScale, values) => { + const blockId = hashIndex === -1 ? null : values[hashIndex]; + const blockHash = blockId && def.params[hashIndex].type === "BlockNumber" ? await this.__internal__getBlockHash?.(blockId) : blockId; + const { registry } = isScale && blockHash && this.__internal__getBlockRegistry ? await this.__internal__getBlockRegistry((0, util_1.u8aToU8a)(blockHash)) : { registry: this.__internal__registryDefault }; + const params = this._formatParams(registry, null, def, values); + const result = await this.provider.send(rpcName, params.map((p) => p.toJSON()), !!blockHash); + return this._formatResult(isScale, registry, blockHash, method, def, params, result); + }; + const creator = (isScale) => (...values) => { + const isDelayed = isScale && hashIndex !== -1 && !!values[hashIndex]; + return new rxjs_1.Observable((observer) => { + callWithRegistry(isScale, values).then((value) => { + observer.next(value); + observer.complete(); + }).catch((error) => { + logErrorMessage(method, def, error); + observer.error(error); + observer.complete(); + }); + return () => { + if (isScale) { + memoized2?.unmemoize(...values); + } else { + memoized2?.raw.unmemoize(...values); + } + }; + }).pipe( + (0, rxjs_1.publishReplay)(1), + isDelayed ? (0, index_js_1.refCountDelay)() : (0, rxjs_1.refCount)() + ); + }; + memoized2 = this._memomize(creator, def); + return memoized2; + } + _createSubscriber({ paramsJson, subName, subType, update: update3 }, errorHandler) { + return new Promise((resolve, reject) => { + this.provider.subscribe(subType, subName, paramsJson, update3).then(resolve).catch((error) => { + errorHandler(error); + reject(error); + }); + }); + } + _createMethodSubscribe(section, method, def) { + const [updateType, subMethod, unsubMethod] = def.pubsub; + const subName = `${section}_${subMethod}`; + const unsubName = `${section}_${unsubMethod}`; + const subType = `${section}_${updateType}`; + let memoized2 = null; + const creator = (isScale) => (...values) => { + return new rxjs_1.Observable((observer) => { + let subscriptionPromise = Promise.resolve(null); + const registry = this.__internal__registryDefault; + const errorHandler = (error) => { + logErrorMessage(method, def, error); + observer.error(error); + }; + try { + const params = this._formatParams(registry, null, def, values); + const update3 = (error, result) => { + if (error) { + logErrorMessage(method, def, error); + return; + } + try { + observer.next(this._formatResult(isScale, registry, null, method, def, params, result)); + } catch (error2) { + observer.error(error2); + } + }; + subscriptionPromise = this._createSubscriber({ paramsJson: params.map((p) => p.toJSON()), subName, subType, update: update3 }, errorHandler); + } catch (error) { + errorHandler(error); + } + return () => { + if (isScale) { + memoized2?.unmemoize(...values); + } else { + memoized2?.raw.unmemoize(...values); + } + subscriptionPromise.then((subscriptionId) => (0, util_1.isNull)(subscriptionId) ? Promise.resolve(false) : this.provider.unsubscribe(subType, unsubName, subscriptionId)).catch((error) => logErrorMessage(method, def, error)); + }; + }).pipe((0, index_js_1.drr)()); + }; + memoized2 = this._memomize(creator, def); + return memoized2; + } + _formatParams(registry, blockHash, def, inputs) { + const count = inputs.length; + const reqCount = def.params.filter(({ isOptional }) => !isOptional).length; + if (count < reqCount || count > def.params.length) { + throw new Error(`Expected ${def.params.length} parameters${reqCount === def.params.length ? "" : ` (${def.params.length - reqCount} optional)`}, ${count} found instead`); + } + const params = new Array(count); + for (let i = 0; i < count; i++) { + params[i] = registry.createTypeUnsafe(def.params[i].type, [inputs[i]], { blockHash }); + } + return params; + } + _formatOutput(registry, blockHash, method, rpc18, params, result) { + if (rpc18.type === "StorageData") { + const key2 = params[0]; + return this._formatStorageData(registry, blockHash, key2, result); + } else if (rpc18.type === "StorageChangeSet") { + const keys = params[0]; + return keys ? this._formatStorageSet(registry, result.block, keys, result.changes) : registry.createType("StorageChangeSet", result); + } else if (rpc18.type === "Vec") { + const jsonSet = result; + const count = jsonSet.length; + const mapped = new Array(count); + for (let i = 0; i < count; i++) { + const { block, changes } = jsonSet[i]; + mapped[i] = [ + registry.createType("BlockHash", block), + this._formatStorageSet(registry, block, params[0], changes) + ]; + } + return method === "queryStorageAt" ? mapped[0][1] : mapped; + } + return registry.createTypeUnsafe(rpc18.type, [result], { blockHash }); + } + _formatStorageData(registry, blockHash, key2, value) { + const isEmpty = (0, util_1.isNull)(value); + const input = isEmpty ? null : isTreatAsHex(key2) ? value : (0, util_1.u8aToU8a)(value); + return this._newType(registry, blockHash, key2, input, isEmpty); + } + _formatStorageSet(registry, blockHash, keys, changes) { + const count = keys.length; + const withCache = count !== 1; + const values = new Array(count); + for (let i = 0; i < count; i++) { + values[i] = this._formatStorageSetEntry(registry, blockHash, keys[i], changes, withCache, i); + } + return values; + } + _formatStorageSetEntry(registry, blockHash, key2, changes, withCache, entryIndex) { + const hexKey = key2.toHex(); + const found = changes.find(([key3]) => key3 === hexKey); + const isNotFound = (0, util_1.isUndefined)(found); + if (isNotFound && withCache) { + const cached = this.__internal__storageCache.get(hexKey); + if (cached) { + this.__internal__storageCacheHits++; + return cached; + } + } + const value = isNotFound ? null : found[1]; + const isEmpty = (0, util_1.isNull)(value); + const input = isEmpty || isTreatAsHex(key2) ? value : (0, util_1.u8aToU8a)(value); + const codec = this._newType(registry, blockHash, key2, input, isEmpty, entryIndex); + this.__internal__storageCache.set(hexKey, codec); + this.__internal__storageCacheSize++; + return codec; + } + _newType(registry, blockHash, key2, input, isEmpty, entryIndex = -1) { + const type = key2.outputType || "Raw"; + const meta2 = key2.meta || EMPTY_META; + const entryNum = entryIndex === -1 ? "" : ` entry ${entryIndex}:`; + try { + return registry.createTypeUnsafe(type, [ + isEmpty ? meta2.fallback ? type.includes("Linkage<") ? (0, util_1.u8aConcat)((0, util_1.hexToU8a)(meta2.fallback.toHex()), new Uint8Array(2)) : (0, util_1.hexToU8a)(meta2.fallback.toHex()) : void 0 : meta2.modifier.isOptional ? registry.createTypeUnsafe(type, [input], { blockHash, isPedantic: this.__internal__isPedantic }) : input + ], { blockHash, isFallback: isEmpty && !!meta2.fallback, isOptional: meta2.modifier.isOptional, isPedantic: this.__internal__isPedantic && !meta2.modifier.isOptional }); + } catch (error) { + throw new Error(`Unable to decode storage ${key2.section || "unknown"}.${key2.method || "unknown"}:${entryNum}: ${error.message}`); + } + } + }; + exports2.RpcCore = RpcCore; + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/index.js + var require_cjs11 = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect2(); + tslib_1.__exportStar(require_bundle7(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/util/approvalFlagsToBools.js + var require_approvalFlagsToBools = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/util/approvalFlagsToBools.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.approvalFlagsToBools = void 0; + function approvalFlagsToBools(flags) { + const bools = []; + for (let i = 0, count = flags.length; i < count; i++) { + const str2 = flags[i].toString(2); + for (const bit of str2.split("").reverse()) { + bools.push(!!parseInt(bit, 10)); + } + } + const lastApproval = bools.lastIndexOf(true); + return lastApproval >= 0 ? bools.slice(0, lastApproval + 1) : []; + } + exports2.approvalFlagsToBools = approvalFlagsToBools; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/util/blockNumber.js + var require_blockNumber = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/util/blockNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.unwrapBlockNumber = void 0; + var util_1 = require_cjs3(); + function unwrapBlockNumber(hdr) { + return (0, util_1.isCompact)(hdr.number) ? hdr.number.unwrap() : hdr.number; + } + exports2.unwrapBlockNumber = unwrapBlockNumber; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/util/cacheImpl.js + var require_cacheImpl = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/util/cacheImpl.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.deriveNoopCache = exports2.deriveMapCache = void 0; + var mapCache = /* @__PURE__ */ new Map(); + exports2.deriveMapCache = { + del: (key2) => { + mapCache.delete(key2); + }, + forEach: (cb2) => { + for (const [k, v] of mapCache.entries()) { + cb2(k, v); + } + }, + get: (key2) => { + return mapCache.get(key2); + }, + set: (key2, value) => { + mapCache.set(key2, value); + } + }; + exports2.deriveNoopCache = { + del: () => void 0, + forEach: () => void 0, + get: () => void 0, + set: (_, value) => value + }; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/util/cache.js + var require_cache = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/util/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.deriveCache = exports2.setDeriveCache = void 0; + var cacheImpl_js_1 = require_cacheImpl(); + var CHACHE_EXPIRY = 7 * (24 * 60) * (60 * 1e3); + var deriveCache; + function wrapCache(keyStart, cache) { + return { + del: (partial) => cache.del(`${keyStart}${partial}`), + forEach: cache.forEach, + get: (partial) => { + const key2 = `${keyStart}${partial}`; + const cached = cache.get(key2); + if (cached) { + cached.x = Date.now(); + cache.set(key2, cached); + return cached.v; + } + return void 0; + }, + set: (partial, v) => { + cache.set(`${keyStart}${partial}`, { v, x: Date.now() }); + } + }; + } + function clearCache(cache) { + const now2 = Date.now(); + const all = []; + cache.forEach((key2, { x }) => { + now2 - x > CHACHE_EXPIRY && all.push(key2); + }); + all.forEach((key2) => cache.del(key2)); + } + function setDeriveCache(prefix = "", cache) { + exports2.deriveCache = deriveCache = cache ? wrapCache(`derive:${prefix}:`, cache) : cacheImpl_js_1.deriveNoopCache; + if (cache) { + clearCache(cache); + } + } + exports2.setDeriveCache = setDeriveCache; + setDeriveCache(); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/util/first.js + var require_first2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/util/first.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.firstMemo = exports2.firstObservable = void 0; + var rxjs_1 = require_cjs7(); + var rpc_core_1 = require_cjs11(); + function firstObservable(obs) { + return obs.pipe((0, rxjs_1.map)(([a]) => a)); + } + exports2.firstObservable = firstObservable; + function firstMemo(fn2) { + return (instanceId, api) => (0, rpc_core_1.memo)(instanceId, (...args) => firstObservable(fn2(api, ...args))); + } + exports2.firstMemo = firstMemo; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/util/lazy.js + var require_lazy3 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/util/lazy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lazyDeriveSection = void 0; + var util_1 = require_cjs3(); + function lazyDeriveSection(result, section, getKeys2, creator) { + (0, util_1.lazyMethod)(result, section, () => (0, util_1.lazyMethods)({}, getKeys2(section), (method) => creator(section, method))); + } + exports2.lazyDeriveSection = lazyDeriveSection; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/util/index.js + var require_util10 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/util/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.memo = exports2.drr = void 0; + var tslib_1 = require_tslib(); + var rpc_core_1 = require_cjs11(); + Object.defineProperty(exports2, "drr", { enumerable: true, get: function() { + return rpc_core_1.drr; + } }); + Object.defineProperty(exports2, "memo", { enumerable: true, get: function() { + return rpc_core_1.memo; + } }); + tslib_1.__exportStar(require_approvalFlagsToBools(), exports2); + tslib_1.__exportStar(require_blockNumber(), exports2); + tslib_1.__exportStar(require_cache(), exports2); + tslib_1.__exportStar(require_cacheImpl(), exports2); + tslib_1.__exportStar(require_first2(), exports2); + tslib_1.__exportStar(require_lazy3(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/accountId.js + var require_accountId = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/accountId.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.accountId = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var index_js_1 = require_util10(); + function accountId(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (address) => { + const decoded = (0, util_1.isU8a)(address) ? address : (0, util_crypto_1.decodeAddress)((address || "").toString()); + if (decoded.length > 8) { + return (0, rxjs_1.of)(api.registry.createType("AccountId", decoded)); + } + const accountIndex = api.registry.createType("AccountIndex", decoded); + return api.derive.accounts.indexToId(accountIndex.toString()).pipe((0, rxjs_1.map)((a) => (0, util_1.assertReturn)(a, "Unable to retrieve accountId"))); + }); + } + exports2.accountId = accountId; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/flags.js + var require_flags = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/flags.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.flags = exports2._flags = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function parseFlags(address, [electionsMembers, councilMembers, technicalCommitteeMembers, societyMembers, sudoKey]) { + const addrStr = address?.toString(); + const isIncluded = (id4) => id4.toString() === addrStr; + return { + isCouncil: (electionsMembers?.map((r10) => Array.isArray(r10) ? r10[0] : r10.who) || councilMembers || []).some(isIncluded), + isSociety: (societyMembers || []).some(isIncluded), + isSudo: sudoKey?.toString() === addrStr, + isTechCommittee: (technicalCommitteeMembers || []).some(isIncluded) + }; + } + function _flags(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => { + const results = [void 0, [], [], [], void 0]; + const calls = [ + (api.query.elections || api.query["phragmenElection"] || api.query["electionsPhragmen"])?.members, + api.query.council?.members, + api.query.technicalCommittee?.members, + api.query.society?.members, + api.query.sudo?.key + ]; + const filtered = calls.filter((c) => c); + if (!filtered.length) { + return (0, rxjs_1.of)(results); + } + return api.queryMulti(filtered).pipe((0, rxjs_1.map)((values) => { + let resultIndex = -1; + for (let i = 0, count = calls.length; i < count; i++) { + if ((0, util_1.isFunction)(calls[i])) { + results[i] = values[++resultIndex]; + } + } + return results; + })); + }); + } + exports2._flags = _flags; + function flags(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (address) => api.derive.accounts._flags().pipe((0, rxjs_1.map)((r10) => parseFlags(address, r10)))); + } + exports2.flags = flags; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/idAndIndex.js + var require_idAndIndex = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/idAndIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.idAndIndex = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var index_js_1 = require_util10(); + function idAndIndex(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (address) => { + try { + const decoded = (0, util_1.isU8a)(address) ? address : (0, util_crypto_1.decodeAddress)((address || "").toString()); + if (decoded.length > 8) { + const accountId = api.registry.createType("AccountId", decoded); + return api.derive.accounts.idToIndex(accountId).pipe((0, rxjs_1.map)((accountIndex2) => [accountId, accountIndex2])); + } + const accountIndex = api.registry.createType("AccountIndex", decoded); + return api.derive.accounts.indexToId(accountIndex.toString()).pipe((0, rxjs_1.map)((accountId) => [accountId, accountIndex])); + } catch { + return (0, rxjs_1.of)([void 0, void 0]); + } + }); + } + exports2.idAndIndex = idAndIndex; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/identity.js + var require_identity2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/identity.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasIdentityMulti = exports2.hasIdentity = exports2.identity = exports2._identity = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var UNDEF_HEX = { toHex: () => void 0 }; + function dataAsString(data) { + return data.isRaw ? (0, util_1.u8aToString)(data.asRaw.toU8a(true)) : data.isNone ? void 0 : data.toHex(); + } + function extractOther(additional) { + return additional.reduce((other, [_key, _value]) => { + const key2 = dataAsString(_key); + const value = dataAsString(_value); + if (key2 && value) { + other[key2] = value; + } + return other; + }, {}); + } + function identityCompat(identityOfOpt) { + const identity4 = identityOfOpt.unwrap(); + return Array.isArray(identity4) ? identity4[0] : identity4; + } + function extractIdentity(identityOfOpt, superOf) { + if (!identityOfOpt?.isSome) { + return { judgements: [] }; + } + const { info, judgements } = identityCompat(identityOfOpt); + const topDisplay = dataAsString(info.display); + return { + display: superOf && dataAsString(superOf[1]) || topDisplay, + displayParent: superOf && topDisplay, + email: dataAsString(info.email), + image: dataAsString(info.image), + judgements, + legal: dataAsString(info.legal), + other: extractOther(info.additional), + parent: superOf?.[0], + pgp: info.pgpFingerprint.unwrapOr(UNDEF_HEX).toHex(), + riot: dataAsString(info.riot), + twitter: dataAsString(info.twitter), + web: dataAsString(info.web) + }; + } + function getParent(api, identityOfOpt, superOfOpt) { + if (identityOfOpt?.isSome) { + return (0, rxjs_1.of)([identityOfOpt, void 0]); + } else if (superOfOpt?.isSome) { + const superOf = superOfOpt.unwrap(); + return (0, rxjs_1.combineLatest)([ + api.derive.accounts._identity(superOf[0]).pipe((0, rxjs_1.map)(([info]) => info)), + (0, rxjs_1.of)(superOf) + ]); + } + return (0, rxjs_1.of)([void 0, void 0]); + } + function _identity(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId) => accountId && api.query.identity?.identityOf ? (0, rxjs_1.combineLatest)([ + api.query.identity.identityOf(accountId), + api.query.identity.superOf(accountId) + ]) : (0, rxjs_1.of)([void 0, void 0])); + } + exports2._identity = _identity; + function identity3(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId) => api.derive.accounts._identity(accountId).pipe((0, rxjs_1.switchMap)(([identityOfOpt, superOfOpt]) => getParent(api, identityOfOpt, superOfOpt)), (0, rxjs_1.map)(([identityOfOpt, superOf]) => extractIdentity(identityOfOpt, superOf)))); + } + exports2.identity = identity3; + exports2.hasIdentity = (0, index_js_1.firstMemo)((api, accountId) => api.derive.accounts.hasIdentityMulti([accountId])); + function hasIdentityMulti(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds) => api.query.identity?.identityOf ? (0, rxjs_1.combineLatest)([ + api.query.identity.identityOf.multi(accountIds), + api.query.identity.superOf.multi(accountIds) + ]).pipe((0, rxjs_1.map)(([identities, supers]) => identities.map((identityOfOpt, index) => { + const superOfOpt = supers[index]; + const parentId = superOfOpt && superOfOpt.isSome ? superOfOpt.unwrap()[0].toString() : void 0; + let display; + if (identityOfOpt && identityOfOpt.isSome) { + const value = dataAsString(identityCompat(identityOfOpt).info.display); + if (value && !(0, util_1.isHex)(value)) { + display = value; + } + } + return { display, hasIdentity: !!(display || parentId), parentId }; + }))) : (0, rxjs_1.of)(accountIds.map(() => ({ hasIdentity: false })))); + } + exports2.hasIdentityMulti = hasIdentityMulti; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/idToIndex.js + var require_idToIndex = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/idToIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.idToIndex = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function idToIndex(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId) => api.derive.accounts.indexes().pipe((0, rxjs_1.map)((indexes) => indexes[accountId.toString()]))); + } + exports2.idToIndex = idToIndex; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/indexes.js + var require_indexes = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/indexes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.indexes = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var indicesCache = null; + function queryAccounts(api) { + return api.query.indices.accounts.entries().pipe((0, rxjs_1.map)((entries) => entries.reduce((indexes2, [key2, idOpt]) => { + if (idOpt.isSome) { + indexes2[idOpt.unwrap()[0].toString()] = api.registry.createType("AccountIndex", key2.args[0]); + } + return indexes2; + }, {}))); + } + function indexes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => indicesCache ? (0, rxjs_1.of)(indicesCache) : (api.query.indices ? queryAccounts(api).pipe((0, rxjs_1.startWith)({})) : (0, rxjs_1.of)({})).pipe((0, rxjs_1.map)((indices) => { + indicesCache = indices; + return indices; + }))); + } + exports2.indexes = indexes; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/indexToId.js + var require_indexToId = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/indexToId.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.indexToId = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function indexToId(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIndex) => api.query.indices ? api.query.indices.accounts(accountIndex).pipe((0, rxjs_1.map)((optResult) => optResult.unwrapOr([])[0])) : (0, rxjs_1.of)(void 0)); + } + exports2.indexToId = indexToId; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/info.js + var require_info = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/info.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.info = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function retrieveNick(api, accountId) { + return (accountId && api.query["nicks"]?.["nameOf"] ? api.query["nicks"]["nameOf"](accountId) : (0, rxjs_1.of)(void 0)).pipe((0, rxjs_1.map)((nameOf) => nameOf?.isSome ? (0, util_1.u8aToString)(nameOf.unwrap()[0]).substring(0, api.consts["nicks"]["maxLength"].toNumber()) : void 0)); + } + function info(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (address) => api.derive.accounts.idAndIndex(address).pipe((0, rxjs_1.switchMap)(([accountId, accountIndex]) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)({ accountId, accountIndex }), + api.derive.accounts.identity(accountId), + retrieveNick(api, accountId) + ])), (0, rxjs_1.map)(([{ accountId, accountIndex }, identity3, nickname]) => ({ + accountId, + accountIndex, + identity: identity3, + nickname + })))); + } + exports2.info = info; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/accounts/index.js + var require_accounts = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/accounts/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_accountId(), exports2); + tslib_1.__exportStar(require_flags(), exports2); + tslib_1.__exportStar(require_idAndIndex(), exports2); + tslib_1.__exportStar(require_identity2(), exports2); + tslib_1.__exportStar(require_idToIndex(), exports2); + tslib_1.__exportStar(require_indexes(), exports2); + tslib_1.__exportStar(require_indexToId(), exports2); + tslib_1.__exportStar(require_info(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/collective/helpers.js + var require_helpers5 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/collective/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callMethod = exports2.withSection = exports2.getInstance = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function getInstance(api, section) { + const instances2 = api.registry.getModuleInstances(api.runtimeVersion.specName, section); + const name6 = instances2?.length ? instances2[0] : section; + return api.query[name6]; + } + exports2.getInstance = getInstance; + function withSection(section, fn2) { + return (instanceId, api) => (0, index_js_1.memo)(instanceId, fn2(getInstance(api, section), api, instanceId)); + } + exports2.withSection = withSection; + function callMethod(method, empty) { + return (section) => withSection(section, (query) => () => (0, util_1.isFunction)(query?.[method]) ? query[method]() : (0, rxjs_1.of)(empty)); + } + exports2.callMethod = callMethod; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/collective/members.js + var require_members = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/collective/members.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.members = void 0; + var helpers_js_1 = require_helpers5(); + exports2.members = (0, helpers_js_1.callMethod)("members", []); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/collective/prime.js + var require_prime = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/collective/prime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prime = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var helpers_js_1 = require_helpers5(); + function prime(section) { + return (0, helpers_js_1.withSection)(section, (query) => () => (0, util_1.isFunction)(query?.prime) ? query.prime().pipe((0, rxjs_1.map)((o) => o.unwrapOr(null))) : (0, rxjs_1.of)(null)); + } + exports2.prime = prime; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/collective/proposals.js + var require_proposals = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/collective/proposals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proposalHashes = exports2.proposalCount = exports2.proposal = exports2.proposals = exports2.hasProposals = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var helpers_js_1 = require_helpers5(); + function parse2(api, [hashes, proposals2, votes]) { + return proposals2.map((o, index) => ({ + hash: api.registry.createType("Hash", hashes[index]), + proposal: o && o.isSome ? o.unwrap() : null, + votes: votes[index].unwrapOr(null) + })); + } + function _proposalsFrom(api, query, hashes) { + return ((0, util_1.isFunction)(query?.proposals) && hashes.length ? (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(hashes), + query.proposalOf.multi(hashes).pipe((0, rxjs_1.catchError)(() => (0, rxjs_1.of)(hashes.map(() => null)))), + query.voting.multi(hashes) + ]) : (0, rxjs_1.of)([[], [], []])).pipe((0, rxjs_1.map)((r10) => parse2(api, r10))); + } + function hasProposals(section) { + return (0, helpers_js_1.withSection)(section, (query) => () => (0, rxjs_1.of)((0, util_1.isFunction)(query?.proposals))); + } + exports2.hasProposals = hasProposals; + function proposals(section) { + return (0, helpers_js_1.withSection)(section, (query, api) => () => api.derive[section].proposalHashes().pipe((0, rxjs_1.switchMap)((all) => _proposalsFrom(api, query, all)))); + } + exports2.proposals = proposals; + function proposal(section) { + return (0, helpers_js_1.withSection)(section, (query, api) => (hash8) => (0, util_1.isFunction)(query?.proposals) ? (0, index_js_1.firstObservable)(_proposalsFrom(api, query, [hash8])) : (0, rxjs_1.of)(null)); + } + exports2.proposal = proposal; + exports2.proposalCount = (0, helpers_js_1.callMethod)("proposalCount", null); + exports2.proposalHashes = (0, helpers_js_1.callMethod)("proposals", []); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/collective/index.js + var require_collective = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/collective/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_members(), exports2); + tslib_1.__exportStar(require_prime(), exports2); + tslib_1.__exportStar(require_proposals(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/alliance/index.js + var require_alliance = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/alliance/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prime = exports2.proposals = exports2.proposalHashes = exports2.proposalCount = exports2.proposal = exports2.hasProposals = exports2.members = void 0; + var index_js_1 = require_collective(); + exports2.members = (0, index_js_1.members)("allianceMotion"); + exports2.hasProposals = (0, index_js_1.hasProposals)("allianceMotion"); + exports2.proposal = (0, index_js_1.proposal)("allianceMotion"); + exports2.proposalCount = (0, index_js_1.proposalCount)("allianceMotion"); + exports2.proposalHashes = (0, index_js_1.proposalHashes)("allianceMotion"); + exports2.proposals = (0, index_js_1.proposals)("allianceMotion"); + exports2.prime = (0, index_js_1.prime)("allianceMotion"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bagsList/util.js + var require_util11 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bagsList/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getQueryInterface = void 0; + function getQueryInterface(api) { + return api.query.voterList || api.query["voterBagsList"] || api.query["bagsList"]; + } + exports2.getQueryInterface = getQueryInterface; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bagsList/get.js + var require_get = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bagsList/get.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.get = exports2.all = exports2._getIds = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util11(); + function orderBags(ids, bags) { + const sorted = ids.map((id4, index) => ({ + bag: bags[index].unwrapOr(null), + id: id4, + key: id4.toString() + })).sort((a, b) => b.id.cmp(a.id)); + const max2 = sorted.length - 1; + return sorted.map((entry, index) => (0, util_1.objectSpread)(entry, { + bagLower: index === max2 ? util_1.BN_ZERO : sorted[index + 1].id, + bagUpper: entry.id, + index + })); + } + function _getIds(instanceId, api) { + const query = (0, util_js_1.getQueryInterface)(api); + return (0, index_js_1.memo)(instanceId, (_ids) => { + const ids = _ids.map((id4) => (0, util_1.bnToBn)(id4)); + return ids.length ? query.listBags.multi(ids).pipe((0, rxjs_1.map)((bags) => orderBags(ids, bags))) : (0, rxjs_1.of)([]); + }); + } + exports2._getIds = _getIds; + function all(instanceId, api) { + const query = (0, util_js_1.getQueryInterface)(api); + return (0, index_js_1.memo)(instanceId, () => query.listBags.keys().pipe((0, rxjs_1.switchMap)((keys) => api.derive.bagsList._getIds(keys.map(({ args: [id4] }) => id4))), (0, rxjs_1.map)((list) => list.filter(({ bag }) => bag)))); + } + exports2.all = all; + function get(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (id4) => api.derive.bagsList._getIds([(0, util_1.bnToBn)(id4)]).pipe((0, rxjs_1.map)((bags) => bags[0]))); + } + exports2.get = get; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bagsList/getExpanded.js + var require_getExpanded = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bagsList/getExpanded.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExpanded = exports2.expand = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function expand(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (bag) => api.derive.bagsList.listNodes(bag.bag).pipe((0, rxjs_1.map)((nodes) => (0, util_1.objectSpread)({ nodes }, bag)))); + } + exports2.expand = expand; + function getExpanded(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (id4) => api.derive.bagsList.get(id4).pipe((0, rxjs_1.switchMap)((bag) => api.derive.bagsList.expand(bag)))); + } + exports2.getExpanded = getExpanded; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bagsList/listNodes.js + var require_listNodes = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bagsList/listNodes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.listNodes = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util11(); + function traverseLinks(api, head) { + const subject2 = new rxjs_1.BehaviorSubject(head); + const query = (0, util_js_1.getQueryInterface)(api); + return subject2.pipe( + (0, rxjs_1.switchMap)((account) => query.listNodes(account)), + (0, rxjs_1.tap)((node) => { + (0, util_1.nextTick)(() => { + node.isSome && node.value.next.isSome ? subject2.next(node.unwrap().next.unwrap()) : subject2.complete(); + }); + }), + (0, rxjs_1.toArray)(), + (0, rxjs_1.map)((all) => all.map((o) => o.unwrap())) + ); + } + function listNodes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (bag) => bag && bag.head.isSome ? traverseLinks(api, bag.head.unwrap()) : (0, rxjs_1.of)([])); + } + exports2.listNodes = listNodes; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bagsList/index.js + var require_bagsList = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bagsList/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_get(), exports2); + tslib_1.__exportStar(require_getExpanded(), exports2); + tslib_1.__exportStar(require_listNodes(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/balances/all.js + var require_all = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/balances/all.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.all = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var VESTING_ID = "0x76657374696e6720"; + function calcLocked(api, bestNumber, locks) { + let lockedBalance = api.registry.createType("Balance"); + let lockedBreakdown = []; + let vestingLocked = api.registry.createType("Balance"); + let allLocked = false; + if (Array.isArray(locks)) { + lockedBreakdown = locks.filter(({ until }) => !until || bestNumber && until.gt(bestNumber)); + allLocked = lockedBreakdown.some(({ amount }) => amount && amount.isMax()); + vestingLocked = api.registry.createType("Balance", lockedBreakdown.filter(({ id: id4 }) => id4.eq(VESTING_ID)).reduce((result, { amount }) => result.iadd(amount), new util_1.BN(0))); + const notAll = lockedBreakdown.filter(({ amount }) => amount && !amount.isMax()); + if (notAll.length) { + lockedBalance = api.registry.createType("Balance", (0, util_1.bnMax)(...notAll.map(({ amount }) => amount))); + } + } + return { allLocked, lockedBalance, lockedBreakdown, vestingLocked }; + } + function calcShared(api, bestNumber, data, locks) { + const { allLocked, lockedBalance, lockedBreakdown, vestingLocked } = calcLocked(api, bestNumber, locks); + return (0, util_1.objectSpread)({}, data, { + availableBalance: api.registry.createType("Balance", allLocked ? 0 : (0, util_1.bnMax)(new util_1.BN(0), data?.freeBalance ? data.freeBalance.sub(lockedBalance) : new util_1.BN(0))), + lockedBalance, + lockedBreakdown, + vestingLocked + }); + } + function calcVesting(bestNumber, shared, _vesting) { + const vesting = _vesting || []; + const isVesting = !shared.vestingLocked.isZero(); + const vestedBalances = vesting.map(({ locked, perBlock, startingBlock }) => bestNumber.gt(startingBlock) ? (0, util_1.bnMin)(locked, perBlock.mul(bestNumber.sub(startingBlock))) : util_1.BN_ZERO); + const vestedBalance = vestedBalances.reduce((all2, value) => all2.iadd(value), new util_1.BN(0)); + const vestingTotal = vesting.reduce((all2, { locked }) => all2.iadd(locked), new util_1.BN(0)); + return { + isVesting, + vestedBalance, + vestedClaimable: isVesting ? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance)) : util_1.BN_ZERO, + vesting: vesting.map(({ locked, perBlock, startingBlock }, index) => ({ + endBlock: locked.div(perBlock).iadd(startingBlock), + locked, + perBlock, + startingBlock, + vested: vestedBalances[index] + })).filter(({ locked }) => !locked.isZero()), + vestingTotal + }; + } + function calcBalances(api, result) { + const [data, [vesting, allLocks, namedReserves], bestNumber] = result; + const shared = calcShared(api, bestNumber, data, allLocks[0]); + return (0, util_1.objectSpread)(shared, calcVesting(bestNumber, shared, vesting), { + accountId: data.accountId, + accountNonce: data.accountNonce, + additional: allLocks.slice(1).map((l15, index) => calcShared(api, bestNumber, data.additional[index], l15)), + namedReserves + }); + } + function queryOld(api, accountId) { + return (0, rxjs_1.combineLatest)([ + api.query.balances.locks(accountId), + api.query.balances["vesting"](accountId) + ]).pipe((0, rxjs_1.map)(([locks, optVesting]) => { + let vestingNew = null; + if (optVesting.isSome) { + const { offset: locked, perBlock, startingBlock } = optVesting.unwrap(); + vestingNew = api.registry.createType("VestingInfo", { locked, perBlock, startingBlock }); + } + return [ + vestingNew ? [vestingNew] : null, + [locks], + [] + ]; + })); + } + var isNonNullable = (nullable) => !!nullable; + function createCalls(calls) { + return [ + calls.map((c) => !c), + calls.filter(isNonNullable) + ]; + } + function queryCurrent(api, accountId, balanceInstances = ["balances"]) { + const [lockEmpty, lockQueries] = createCalls(balanceInstances.map((m) => api.derive[m]?.customLocks || api.query[m]?.locks)); + const [reserveEmpty, reserveQueries] = createCalls(balanceInstances.map((m) => api.query[m]?.reserves)); + return (0, rxjs_1.combineLatest)([ + api.query.vesting?.vesting ? api.query.vesting.vesting(accountId) : (0, rxjs_1.of)(api.registry.createType("Option")), + lockQueries.length ? (0, rxjs_1.combineLatest)(lockQueries.map((c) => c(accountId))) : (0, rxjs_1.of)([]), + reserveQueries.length ? (0, rxjs_1.combineLatest)(reserveQueries.map((c) => c(accountId))) : (0, rxjs_1.of)([]) + ]).pipe((0, rxjs_1.map)(([opt, locks, reserves]) => { + let offsetLock = -1; + let offsetReserve = -1; + const vesting = opt.unwrapOr(null); + return [ + vesting ? Array.isArray(vesting) ? vesting : [vesting] : null, + lockEmpty.map((e) => e ? api.registry.createType("Vec") : locks[++offsetLock]), + reserveEmpty.map((e) => e ? api.registry.createType("Vec") : reserves[++offsetReserve]) + ]; + })); + } + function all(instanceId, api) { + const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName, "balances"); + return (0, index_js_1.memo)(instanceId, (address) => (0, rxjs_1.combineLatest)([ + api.derive.balances.account(address), + (0, util_1.isFunction)(api.query.system?.account) || (0, util_1.isFunction)(api.query.balances?.account) ? queryCurrent(api, address, balanceInstances) : queryOld(api, address) + ]).pipe((0, rxjs_1.switchMap)(([account, locks]) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(account), + (0, rxjs_1.of)(locks), + api.derive.chain.bestNumber() + ])), (0, rxjs_1.map)((result) => calcBalances(api, result)))); + } + exports2.all = all; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/balances/account.js + var require_account = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/balances/account.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.account = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function zeroBalance(api) { + return api.registry.createType("Balance"); + } + function getBalance(api, [freeBalance, reservedBalance, frozenFee, frozenMisc]) { + const votingBalance = api.registry.createType("Balance", freeBalance.toBn()); + return { + freeBalance, + frozenFee, + frozenMisc, + reservedBalance, + votingBalance + }; + } + function calcBalances(api, [accountId, [accountNonce, [primary, ...additional]]]) { + return (0, util_1.objectSpread)({ + accountId, + accountNonce, + additional: additional.map((b) => getBalance(api, b)) + }, getBalance(api, primary)); + } + function queryBalancesFree(api, accountId) { + return (0, rxjs_1.combineLatest)([ + api.query.balances["freeBalance"](accountId), + api.query.balances["reservedBalance"](accountId), + api.query.system["accountNonce"](accountId) + ]).pipe((0, rxjs_1.map)(([freeBalance, reservedBalance, accountNonce]) => [ + accountNonce, + [[freeBalance, reservedBalance, zeroBalance(api), zeroBalance(api)]] + ])); + } + function queryNonceOnly(api, accountId) { + const fill = (nonce) => [ + nonce, + [[zeroBalance(api), zeroBalance(api), zeroBalance(api), zeroBalance(api)]] + ]; + return (0, util_1.isFunction)(api.query.system.account) ? api.query.system.account(accountId).pipe((0, rxjs_1.map)(({ nonce }) => fill(nonce))) : (0, util_1.isFunction)(api.query.system["accountNonce"]) ? api.query.system["accountNonce"](accountId).pipe((0, rxjs_1.map)((nonce) => fill(nonce))) : (0, rxjs_1.of)(fill(api.registry.createType("Index"))); + } + function queryBalancesAccount(api, accountId, modules = ["balances"]) { + const balances = modules.map((m) => api.derive[m]?.customAccount || api.query[m]?.account).filter((q) => (0, util_1.isFunction)(q)); + const extract = (nonce, data) => [ + nonce, + data.map(({ feeFrozen, free, miscFrozen, reserved }) => [free, reserved, feeFrozen, miscFrozen]) + ]; + return balances.length ? (0, util_1.isFunction)(api.query.system.account) ? (0, rxjs_1.combineLatest)([ + api.query.system.account(accountId), + ...balances.map((c) => c(accountId)) + ]).pipe((0, rxjs_1.map)(([{ nonce }, ...balances2]) => extract(nonce, balances2))) : (0, rxjs_1.combineLatest)([ + api.query.system["accountNonce"](accountId), + ...balances.map((c) => c(accountId)) + ]).pipe((0, rxjs_1.map)(([nonce, ...balances2]) => extract(nonce, balances2))) : queryNonceOnly(api, accountId); + } + function querySystemAccount(api, accountId) { + return api.query.system.account(accountId).pipe((0, rxjs_1.map)((infoOrTuple) => { + const data = infoOrTuple.nonce ? infoOrTuple.data : infoOrTuple[1]; + const nonce = infoOrTuple.nonce || infoOrTuple[0]; + if (!data || data.isEmpty) { + return [ + nonce, + [[zeroBalance(api), zeroBalance(api), zeroBalance(api), zeroBalance(api)]] + ]; + } + const { feeFrozen, free, miscFrozen, reserved } = data; + return [ + nonce, + [[free, reserved, feeFrozen, miscFrozen]] + ]; + })); + } + function account(instanceId, api) { + const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName, "balances"); + const nonDefaultBalances = balanceInstances && balanceInstances[0] !== "balances"; + return (0, index_js_1.memo)(instanceId, (address) => api.derive.accounts.accountId(address).pipe((0, rxjs_1.switchMap)((accountId) => accountId ? (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(accountId), + nonDefaultBalances ? queryBalancesAccount(api, accountId, balanceInstances) : (0, util_1.isFunction)(api.query.system?.account) ? querySystemAccount(api, accountId) : (0, util_1.isFunction)(api.query.balances?.account) ? queryBalancesAccount(api, accountId) : (0, util_1.isFunction)(api.query.balances?.["freeBalance"]) ? queryBalancesFree(api, accountId) : queryNonceOnly(api, accountId) + ]) : (0, rxjs_1.of)([api.registry.createType("AccountId"), [ + api.registry.createType("Index"), + [[zeroBalance(api), zeroBalance(api), zeroBalance(api), zeroBalance(api)]] + ]])), (0, rxjs_1.map)((result) => calcBalances(api, result)))); + } + exports2.account = account; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/balances/votingBalances.js + var require_votingBalances = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/balances/votingBalances.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.votingBalances = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function votingBalances(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (addresses2) => !addresses2?.length ? (0, rxjs_1.of)([]) : (0, rxjs_1.combineLatest)(addresses2.map((accountId) => api.derive.balances.account(accountId)))); + } + exports2.votingBalances = votingBalances; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/balances/index.js + var require_balances = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/balances/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.votingBalance = exports2.all = void 0; + var tslib_1 = require_tslib(); + var all_js_1 = require_all(); + Object.defineProperty(exports2, "all", { enumerable: true, get: function() { + return all_js_1.all; + } }); + tslib_1.__exportStar(require_account(), exports2); + tslib_1.__exportStar(require_votingBalances(), exports2); + var votingBalance = all_js_1.all; + exports2.votingBalance = votingBalance; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bounties/helpers/filterBountyProposals.js + var require_filterBountyProposals = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bounties/helpers/filterBountyProposals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterBountiesProposals = void 0; + function filterBountiesProposals(api, allProposals) { + const bountyTxBase = api.tx.bounties ? api.tx.bounties : api.tx.treasury; + const bountyProposalCalls = [bountyTxBase.approveBounty, bountyTxBase.closeBounty, bountyTxBase.proposeCurator, bountyTxBase.unassignCurator]; + return allProposals.filter((proposal) => bountyProposalCalls.find((bountyCall) => proposal.proposal && bountyCall.is(proposal.proposal))); + } + exports2.filterBountiesProposals = filterBountiesProposals; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bounties/bounties.js + var require_bounties = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bounties/bounties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bounties = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var filterBountyProposals_js_1 = require_filterBountyProposals(); + function parseResult([maybeBounties, maybeDescriptions, ids, bountyProposals]) { + const bounties2 = []; + maybeBounties.forEach((bounty, index) => { + if (bounty.isSome) { + bounties2.push({ + bounty: bounty.unwrap(), + description: maybeDescriptions[index].unwrapOrDefault().toUtf8(), + index: ids[index], + proposals: bountyProposals.filter((bountyProposal) => bountyProposal.proposal && ids[index].eq(bountyProposal.proposal.args[0])) + }); + } + }); + return bounties2; + } + function bounties(instanceId, api) { + const bountyBase = api.query.bounties || api.query.treasury; + return (0, index_js_1.memo)(instanceId, () => bountyBase.bounties ? (0, rxjs_1.combineLatest)([ + bountyBase.bountyCount(), + api.query.council ? api.query.council.proposalCount() : (0, rxjs_1.of)(0) + ]).pipe((0, rxjs_1.switchMap)(() => (0, rxjs_1.combineLatest)([ + bountyBase.bounties.keys(), + api.derive.council ? api.derive.council.proposals() : (0, rxjs_1.of)([]) + ])), (0, rxjs_1.switchMap)(([keys, proposals]) => { + const ids = keys.map(({ args: [id4] }) => id4); + return (0, rxjs_1.combineLatest)([ + bountyBase.bounties.multi(ids), + bountyBase.bountyDescriptions.multi(ids), + (0, rxjs_1.of)(ids), + (0, rxjs_1.of)((0, filterBountyProposals_js_1.filterBountiesProposals)(api, proposals)) + ]); + }), (0, rxjs_1.map)(parseResult)) : (0, rxjs_1.of)(parseResult([[], [], [], []]))); + } + exports2.bounties = bounties; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bounties/index.js + var require_bounties2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bounties/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_bounties(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/util.js + var require_util12 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAuthorDetails = exports2.createBlockNumberDerive = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function createBlockNumberDerive(fn2) { + return (instanceId, api) => (0, index_js_1.memo)(instanceId, () => fn2(api).pipe((0, rxjs_1.map)(index_js_1.unwrapBlockNumber))); + } + exports2.createBlockNumberDerive = createBlockNumberDerive; + function getAuthorDetailsWithAt(header, queryAt) { + const validators = queryAt.session?.validators ? queryAt.session.validators() : (0, rxjs_1.of)(null); + const { logs: [log] } = header.digest; + const loggedAuthor = log && (log.isConsensus && log.asConsensus[0].isNimbus && log.asConsensus[1] || log.isPreRuntime && log.asPreRuntime[0].isNimbus && log.asPreRuntime[1]); + if (loggedAuthor) { + if (queryAt["authorMapping"]?.["mappingWithDeposit"]) { + return (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(header), + validators, + queryAt["authorMapping"]["mappingWithDeposit"](loggedAuthor).pipe((0, rxjs_1.map)((o) => o.unwrapOr({ account: null }).account)) + ]); + } + if (queryAt["parachainStaking"]?.["selectedCandidates"] && queryAt.session?.nextKeys) { + const loggedHex = loggedAuthor.toHex(); + return (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(header), + validators, + queryAt["parachainStaking"]["selectedCandidates"]().pipe((0, rxjs_1.mergeMap)((selectedCandidates) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(selectedCandidates), + queryAt.session.nextKeys.multi(selectedCandidates).pipe((0, rxjs_1.map)((nextKeys) => nextKeys.findIndex((o) => o.unwrapOrDefault().nimbus.toHex() === loggedHex))) + ])), (0, rxjs_1.map)(([selectedCandidates, index]) => index === -1 ? null : selectedCandidates[index])) + ]); + } + } + return (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(header), + validators, + (0, rxjs_1.of)(null) + ]); + } + function getAuthorDetails(api, header, blockHash) { + return api.queryAt(header.parentHash.isEmpty ? blockHash || header.hash : header.parentHash).pipe((0, rxjs_1.switchMap)((queryAt) => getAuthorDetailsWithAt(header, queryAt))); + } + exports2.getAuthorDetails = getAuthorDetails; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/bestNumber.js + var require_bestNumber = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/bestNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bestNumber = void 0; + var util_js_1 = require_util12(); + exports2.bestNumber = (0, util_js_1.createBlockNumberDerive)((api) => api.rpc.chain.subscribeNewHeads()); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/bestNumberFinalized.js + var require_bestNumberFinalized = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/bestNumberFinalized.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bestNumberFinalized = void 0; + var util_js_1 = require_util12(); + exports2.bestNumberFinalized = (0, util_js_1.createBlockNumberDerive)((api) => api.rpc.chain.subscribeFinalizedHeads()); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/bestNumberLag.js + var require_bestNumberLag = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/bestNumberLag.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bestNumberLag = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function bestNumberLag(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => (0, rxjs_1.combineLatest)([ + api.derive.chain.bestNumber(), + api.derive.chain.bestNumberFinalized() + ]).pipe((0, rxjs_1.map)(([bestNumber, bestNumberFinalized]) => api.registry.createType("BlockNumber", bestNumber.sub(bestNumberFinalized))))); + } + exports2.bestNumberLag = bestNumberLag; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/type/util.js + var require_util13 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/type/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extractAuthor = void 0; + function extractAuthor(digest, sessionValidators) { + const [citem] = digest.logs.filter((e) => e.isConsensus); + const [pitem] = digest.logs.filter((e) => e.isPreRuntime); + const [sitem] = digest.logs.filter((e) => e.isSeal); + let accountId; + try { + if (pitem) { + const [engine, data] = pitem.asPreRuntime; + accountId = engine.extractAuthor(data, sessionValidators); + } + if (!accountId && citem) { + const [engine, data] = citem.asConsensus; + accountId = engine.extractAuthor(data, sessionValidators); + } + if (!accountId && sitem) { + const [engine, data] = sitem.asSeal; + accountId = engine.extractAuthor(data, sessionValidators); + } + } catch { + } + return accountId; + } + exports2.extractAuthor = extractAuthor; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/type/HeaderExtended.js + var require_HeaderExtended = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/type/HeaderExtended.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHeaderExtended = void 0; + var util_js_1 = require_util13(); + function createHeaderExtended(registry, header, validators, author) { + const HeaderBase = registry.createClass("Header"); + class Implementation extends HeaderBase { + __internal__author; + constructor(registry2, header2, validators2, author2) { + super(registry2, header2); + this.__internal__author = author2 || (0, util_js_1.extractAuthor)(this.digest, validators2 || []); + this.createdAtHash = header2?.createdAtHash; + } + get author() { + return this.__internal__author; + } + } + return new Implementation(registry, header, validators, author); + } + exports2.createHeaderExtended = createHeaderExtended; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/type/SignedBlockExtended.js + var require_SignedBlockExtended = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/type/SignedBlockExtended.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createSignedBlockExtended = void 0; + var util_js_1 = require_util13(); + function mapExtrinsics(extrinsics, records) { + return extrinsics.map((extrinsic, index) => { + let dispatchError; + let dispatchInfo; + const events = records.filter(({ phase }) => phase.isApplyExtrinsic && phase.asApplyExtrinsic.eq(index)).map(({ event }) => { + if (event.section === "system") { + if (event.method === "ExtrinsicSuccess") { + dispatchInfo = event.data[0]; + } else if (event.method === "ExtrinsicFailed") { + dispatchError = event.data[0]; + dispatchInfo = event.data[1]; + } + } + return event; + }); + return { dispatchError, dispatchInfo, events, extrinsic }; + }); + } + function createSignedBlockExtended(registry, block, events, validators, author) { + const SignedBlockBase = registry.createClass("SignedBlock"); + class Implementation extends SignedBlockBase { + __internal__author; + __internal__events; + __internal__extrinsics; + constructor(registry2, block2, events2, validators2, author2) { + super(registry2, block2); + this.__internal__author = author2 || (0, util_js_1.extractAuthor)(this.block.header.digest, validators2 || []); + this.__internal__events = events2 || []; + this.__internal__extrinsics = mapExtrinsics(this.block.extrinsics, this.__internal__events); + this.createdAtHash = block2?.createdAtHash; + } + get author() { + return this.__internal__author; + } + get events() { + return this.__internal__events; + } + get extrinsics() { + return this.__internal__extrinsics; + } + } + return new Implementation(registry, block, events, validators, author); + } + exports2.createSignedBlockExtended = createSignedBlockExtended; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/type/index.js + var require_type2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/type/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createSignedBlockExtended = exports2.createHeaderExtended = void 0; + var HeaderExtended_js_1 = require_HeaderExtended(); + Object.defineProperty(exports2, "createHeaderExtended", { enumerable: true, get: function() { + return HeaderExtended_js_1.createHeaderExtended; + } }); + var SignedBlockExtended_js_1 = require_SignedBlockExtended(); + Object.defineProperty(exports2, "createSignedBlockExtended", { enumerable: true, get: function() { + return SignedBlockExtended_js_1.createSignedBlockExtended; + } }); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/getBlock.js + var require_getBlock = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/getBlock.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBlock = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_type2(); + var index_js_2 = require_util10(); + var util_js_1 = require_util12(); + function getBlock(instanceId, api) { + return (0, index_js_2.memo)(instanceId, (blockHash) => (0, rxjs_1.combineLatest)([ + api.rpc.chain.getBlock(blockHash), + api.queryAt(blockHash) + ]).pipe((0, rxjs_1.switchMap)(([signedBlock, queryAt]) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(signedBlock), + queryAt.system.events(), + (0, util_js_1.getAuthorDetails)(api, signedBlock.block.header, blockHash) + ])), (0, rxjs_1.map)(([signedBlock, events, [, validators, author]]) => (0, index_js_1.createSignedBlockExtended)(events.registry, signedBlock, events, validators, author)))); + } + exports2.getBlock = getBlock; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/getBlockByNumber.js + var require_getBlockByNumber = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/getBlockByNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBlockByNumber = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function getBlockByNumber(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (blockNumber) => api.rpc.chain.getBlockHash(blockNumber).pipe((0, rxjs_1.switchMap)((h) => api.derive.chain.getBlock(h)))); + } + exports2.getBlockByNumber = getBlockByNumber; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/getHeader.js + var require_getHeader = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/getHeader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeader = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_type2(); + var index_js_2 = require_util10(); + var util_js_1 = require_util12(); + function getHeader(instanceId, api) { + return (0, index_js_2.memo)(instanceId, (blockHash) => api.rpc.chain.getHeader(blockHash).pipe((0, rxjs_1.switchMap)((header) => (0, util_js_1.getAuthorDetails)(api, header, blockHash)), (0, rxjs_1.map)(([header, validators, author]) => (0, index_js_1.createHeaderExtended)((validators || header).registry, header, validators, author)))); + } + exports2.getHeader = getHeader; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/subscribeFinalizedBlocks.js + var require_subscribeFinalizedBlocks = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/subscribeFinalizedBlocks.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeFinalizedBlocks = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function subscribeFinalizedBlocks(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.derive.chain.subscribeFinalizedHeads().pipe((0, rxjs_1.switchMap)((header) => api.derive.chain.getBlock(header.createdAtHash || header.hash)))); + } + exports2.subscribeFinalizedBlocks = subscribeFinalizedBlocks; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/subscribeFinalizedHeads.js + var require_subscribeFinalizedHeads = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/subscribeFinalizedHeads.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeFinalizedHeads = exports2._getHeaderRange = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function _getHeaderRange(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (startHash, endHash, prev = []) => api.rpc.chain.getHeader(startHash).pipe((0, rxjs_1.switchMap)((header) => header.parentHash.eq(endHash) ? (0, rxjs_1.of)([header, ...prev]) : api.derive.chain._getHeaderRange(header.parentHash, endHash, [header, ...prev])))); + } + exports2._getHeaderRange = _getHeaderRange; + function subscribeFinalizedHeads(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => { + let prevHash = null; + return api.rpc.chain.subscribeFinalizedHeads().pipe((0, rxjs_1.switchMap)((header) => { + const endHash = prevHash; + const startHash = header.parentHash; + prevHash = header.createdAtHash = header.hash; + return endHash === null || startHash.eq(endHash) ? (0, rxjs_1.of)(header) : api.derive.chain._getHeaderRange(startHash, endHash, [header]).pipe((0, rxjs_1.switchMap)((headers) => (0, rxjs_1.from)(headers))); + })); + }); + } + exports2.subscribeFinalizedHeads = subscribeFinalizedHeads; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/subscribeNewBlocks.js + var require_subscribeNewBlocks = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/subscribeNewBlocks.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeNewBlocks = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function subscribeNewBlocks(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.derive.chain.subscribeNewHeads().pipe((0, rxjs_1.switchMap)((header) => api.derive.chain.getBlock(header.createdAtHash || header.hash)))); + } + exports2.subscribeNewBlocks = subscribeNewBlocks; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/subscribeNewHeads.js + var require_subscribeNewHeads = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/subscribeNewHeads.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeNewHeads = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_type2(); + var index_js_2 = require_util10(); + var util_js_1 = require_util12(); + function subscribeNewHeads(instanceId, api) { + return (0, index_js_2.memo)(instanceId, () => api.rpc.chain.subscribeNewHeads().pipe((0, rxjs_1.switchMap)((header) => (0, util_js_1.getAuthorDetails)(api, header)), (0, rxjs_1.map)(([header, validators, author]) => { + header.createdAtHash = header.hash; + return (0, index_js_1.createHeaderExtended)(header.registry, header, validators, author); + }))); + } + exports2.subscribeNewHeads = subscribeNewHeads; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/chain/index.js + var require_chain = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/chain/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_bestNumber(), exports2); + tslib_1.__exportStar(require_bestNumberFinalized(), exports2); + tslib_1.__exportStar(require_bestNumberLag(), exports2); + tslib_1.__exportStar(require_getBlock(), exports2); + tslib_1.__exportStar(require_getBlockByNumber(), exports2); + tslib_1.__exportStar(require_getHeader(), exports2); + tslib_1.__exportStar(require_subscribeFinalizedBlocks(), exports2); + tslib_1.__exportStar(require_subscribeFinalizedHeads(), exports2); + tslib_1.__exportStar(require_subscribeNewBlocks(), exports2); + tslib_1.__exportStar(require_subscribeNewHeads(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/contracts/fees.js + var require_fees = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/contracts/fees.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fees = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function queryConstants(api) { + return (0, rxjs_1.of)([ + api.consts.contracts["callBaseFee"] || api.registry.createType("Balance"), + api.consts.contracts["contractFee"] || api.registry.createType("Balance"), + api.consts.contracts["creationFee"] || api.registry.createType("Balance"), + api.consts.contracts["transactionBaseFee"] || api.registry.createType("Balance"), + api.consts.contracts["transactionByteFee"] || api.registry.createType("Balance"), + api.consts.contracts["transferFee"] || api.registry.createType("Balance"), + api.consts.contracts["rentByteFee"] || api.registry.createType("Balance"), + api.consts.contracts["rentDepositOffset"] || api.registry.createType("Balance"), + api.consts.contracts["surchargeReward"] || api.registry.createType("Balance"), + api.consts.contracts["tombstoneDeposit"] || api.registry.createType("Balance") + ]); + } + function fees(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => { + return queryConstants(api).pipe((0, rxjs_1.map)(([callBaseFee, contractFee, creationFee, transactionBaseFee, transactionByteFee, transferFee, rentByteFee, rentDepositOffset, surchargeReward, tombstoneDeposit]) => ({ + callBaseFee, + contractFee, + creationFee, + rentByteFee, + rentDepositOffset, + surchargeReward, + tombstoneDeposit, + transactionBaseFee, + transactionByteFee, + transferFee + }))); + }); + } + exports2.fees = fees; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/contracts/index.js + var require_contracts = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/contracts/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_fees(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/council/votes.js + var require_votes = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/council/votes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.votes = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function isVoter(value) { + return !Array.isArray(value); + } + function retrieveStakeOf(elections) { + return elections["stakeOf"].entries().pipe((0, rxjs_1.map)((entries) => entries.map(([{ args: [accountId] }, stake]) => [accountId, stake]))); + } + function retrieveVoteOf(elections) { + return elections["votesOf"].entries().pipe((0, rxjs_1.map)((entries) => entries.map(([{ args: [accountId] }, votes2]) => [accountId, votes2]))); + } + function retrievePrev(api, elections) { + return (0, rxjs_1.combineLatest)([ + retrieveStakeOf(elections), + retrieveVoteOf(elections) + ]).pipe((0, rxjs_1.map)(([stakes, votes2]) => { + const result = []; + votes2.forEach(([voter, votes3]) => { + result.push([voter, { stake: api.registry.createType("Balance"), votes: votes3 }]); + }); + stakes.forEach(([staker, stake]) => { + const entry = result.find(([voter]) => voter.eq(staker)); + if (entry) { + entry[1].stake = stake; + } else { + result.push([staker, { stake, votes: [] }]); + } + }); + return result; + })); + } + function retrieveCurrent(elections) { + return elections.voting.entries().pipe((0, rxjs_1.map)((entries) => entries.map(([{ args: [accountId] }, value]) => [ + accountId, + isVoter(value) ? { stake: value.stake, votes: value.votes } : { stake: value[0], votes: value[1] } + ]))); + } + function votes(instanceId, api) { + const elections = api.query.elections || api.query["phragmenElection"] || api.query["electionsPhragmen"]; + return (0, index_js_1.memo)(instanceId, () => elections ? elections["stakeOf"] ? retrievePrev(api, elections) : retrieveCurrent(elections) : (0, rxjs_1.of)([])); + } + exports2.votes = votes; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/council/votesOf.js + var require_votesOf = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/council/votesOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.votesOf = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function votesOf(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId) => api.derive.council.votes().pipe((0, rxjs_1.map)((votes) => (votes.find(([from2]) => from2.eq(accountId)) || [null, { stake: api.registry.createType("Balance"), votes: [] }])[1]))); + } + exports2.votesOf = votesOf; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/council/index.js + var require_council = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/council/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prime = exports2.proposals = exports2.proposalHashes = exports2.proposalCount = exports2.proposal = exports2.hasProposals = exports2.members = void 0; + var tslib_1 = require_tslib(); + var index_js_1 = require_collective(); + tslib_1.__exportStar(require_votes(), exports2); + tslib_1.__exportStar(require_votesOf(), exports2); + exports2.members = (0, index_js_1.members)("council"); + exports2.hasProposals = (0, index_js_1.hasProposals)("council"); + exports2.proposal = (0, index_js_1.proposal)("council"); + exports2.proposalCount = (0, index_js_1.proposalCount)("council"); + exports2.proposalHashes = (0, index_js_1.proposalHashes)("council"); + exports2.proposals = (0, index_js_1.proposals)("council"); + exports2.prime = (0, index_js_1.prime)("council"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/crowdloan/childKey.js + var require_childKey = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/crowdloan/childKey.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.childKey = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var index_js_1 = require_util10(); + function createChildKey(info) { + return (0, util_1.u8aToHex)((0, util_1.u8aConcat)(":child_storage:default:", (0, util_crypto_1.blake2AsU8a)((0, util_1.u8aConcat)("crowdloan", (info.fundIndex || info.trieIndex).toU8a())))); + } + function childKey(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (paraId) => api.query["crowdloan"]["funds"](paraId).pipe((0, rxjs_1.map)((optInfo) => optInfo.isSome ? createChildKey(optInfo.unwrap()) : null))); + } + exports2.childKey = childKey; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/crowdloan/util.js + var require_util14 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/crowdloan/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extractContributed = void 0; + function extractContributed(paraId, events) { + const added = []; + const removed = []; + return events.filter(({ event: { data: [, eventParaId], method, section } }) => section === "crowdloan" && ["Contributed", "Withdrew"].includes(method) && eventParaId.eq(paraId)).reduce((result, { event: { data: [accountId], method } }) => { + if (method === "Contributed") { + result.added.push(accountId.toHex()); + } else { + result.removed.push(accountId.toHex()); + } + return result; + }, { added, blockHash: events.createdAtHash?.toHex() || "-", removed }); + } + exports2.extractContributed = extractContributed; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/crowdloan/contributions.js + var require_contributions = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/crowdloan/contributions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.contributions = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util14(); + var PAGE_SIZE_K = 1e3; + function _getUpdates(api, paraId) { + let added = []; + let removed = []; + return api.query.system.events().pipe((0, rxjs_1.switchMap)((events) => { + const changes = (0, util_js_1.extractContributed)(paraId, events); + if (changes.added.length || changes.removed.length) { + added = added.concat(...changes.added); + removed = removed.concat(...changes.removed); + return (0, rxjs_1.of)({ added, addedDelta: changes.added, blockHash: events.createdAtHash?.toHex() || "-", removed, removedDelta: changes.removed }); + } + return rxjs_1.EMPTY; + }), (0, rxjs_1.startWith)({ added, addedDelta: [], blockHash: "-", removed, removedDelta: [] })); + } + function _eventTriggerAll(api, paraId) { + return api.query.system.events().pipe((0, rxjs_1.switchMap)((events) => { + const items = events.filter(({ event: { data: [eventParaId], method, section } }) => section === "crowdloan" && ["AllRefunded", "Dissolved", "PartiallyRefunded"].includes(method) && eventParaId.eq(paraId)); + return items.length ? (0, rxjs_1.of)(events.createdAtHash?.toHex() || "-") : rxjs_1.EMPTY; + }), (0, rxjs_1.startWith)("-")); + } + function _getKeysPaged(api, childKey) { + const subject2 = new rxjs_1.BehaviorSubject(void 0); + return subject2.pipe( + (0, rxjs_1.switchMap)((startKey) => api.rpc.childstate.getKeysPaged(childKey, "0x", PAGE_SIZE_K, startKey)), + (0, rxjs_1.tap)((keys) => { + (0, util_1.nextTick)(() => { + keys.length === PAGE_SIZE_K ? subject2.next(keys[PAGE_SIZE_K - 1].toHex()) : subject2.complete(); + }); + }), + (0, rxjs_1.toArray)(), + (0, rxjs_1.map)((keyArr) => (0, util_1.arrayFlatten)(keyArr)) + ); + } + function _getAll(api, paraId, childKey) { + return _eventTriggerAll(api, paraId).pipe((0, rxjs_1.switchMap)(() => (0, util_1.isFunction)(api.rpc.childstate.getKeysPaged) ? _getKeysPaged(api, childKey) : api.rpc.childstate.getKeys(childKey, "0x")), (0, rxjs_1.map)((keys) => keys.map((k) => k.toHex()))); + } + function _contributions(api, paraId, childKey) { + return (0, rxjs_1.combineLatest)([ + _getAll(api, paraId, childKey), + _getUpdates(api, paraId) + ]).pipe((0, rxjs_1.map)(([keys, { added, blockHash, removed }]) => { + const contributorsMap = {}; + keys.forEach((k) => { + contributorsMap[k] = true; + }); + added.forEach((k) => { + contributorsMap[k] = true; + }); + removed.forEach((k) => { + delete contributorsMap[k]; + }); + return { + blockHash, + contributorsHex: Object.keys(contributorsMap) + }; + })); + } + function contributions(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (paraId) => api.derive.crowdloan.childKey(paraId).pipe((0, rxjs_1.switchMap)((childKey) => childKey ? _contributions(api, paraId, childKey) : (0, rxjs_1.of)({ blockHash: "-", contributorsHex: [] })))); + } + exports2.contributions = contributions; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/crowdloan/ownContributions.js + var require_ownContributions = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/crowdloan/ownContributions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ownContributions = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util14(); + function _getValues(api, childKey, keys) { + return (0, rxjs_1.combineLatest)(keys.map((k) => api.rpc.childstate.getStorage(childKey, k))).pipe((0, rxjs_1.map)((values) => values.map((v) => api.registry.createType("Option", v)).map((o) => o.isSome ? api.registry.createType("Balance", o.unwrap()) : api.registry.createType("Balance")).reduce((all, b, index) => (0, util_1.objectSpread)(all, { [keys[index]]: b }), {}))); + } + function _watchOwnChanges(api, paraId, childkey, keys) { + return api.query.system.events().pipe((0, rxjs_1.switchMap)((events) => { + const changes = (0, util_js_1.extractContributed)(paraId, events); + const filtered = keys.filter((k) => changes.added.includes(k) || changes.removed.includes(k)); + return filtered.length ? _getValues(api, childkey, filtered) : rxjs_1.EMPTY; + }), (0, rxjs_1.startWith)({})); + } + function _contributions(api, paraId, childKey, keys) { + return (0, rxjs_1.combineLatest)([ + _getValues(api, childKey, keys), + _watchOwnChanges(api, paraId, childKey, keys) + ]).pipe((0, rxjs_1.map)(([all, latest2]) => (0, util_1.objectSpread)({}, all, latest2))); + } + function ownContributions(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (paraId, keys) => api.derive.crowdloan.childKey(paraId).pipe((0, rxjs_1.switchMap)((childKey) => childKey && keys.length ? _contributions(api, paraId, childKey, keys) : (0, rxjs_1.of)({})))); + } + exports2.ownContributions = ownContributions; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/crowdloan/index.js + var require_crowdloan = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/crowdloan/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_childKey(), exports2); + tslib_1.__exportStar(require_contributions(), exports2); + tslib_1.__exportStar(require_ownContributions(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/util.js + var require_util15 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getImageHash = exports2.getImageHashBounded = exports2.getStatus = exports2.calcVotes = exports2.calcPassing = exports2.compareRationals = void 0; + var util_1 = require_cjs3(); + function isOldInfo(info) { + return !!info.proposalHash; + } + function isCurrentStatus(status) { + return !!status.tally; + } + function compareRationals(n12, d12, n22, d22) { + while (true) { + const q12 = n12.div(d12); + const q2 = n22.div(d22); + if (q12.lt(q2)) { + return true; + } else if (q2.lt(q12)) { + return false; + } + const r12 = n12.mod(d12); + const r22 = n22.mod(d22); + if (r22.isZero()) { + return false; + } else if (r12.isZero()) { + return true; + } + n12 = d22; + n22 = d12; + d12 = r22; + d22 = r12; + } + } + exports2.compareRationals = compareRationals; + function calcPassingOther(threshold, sqrtElectorate, { votedAye, votedNay, votedTotal }) { + const sqrtVoters = (0, util_1.bnSqrt)(votedTotal); + return sqrtVoters.isZero() ? false : threshold.isSuperMajorityApprove ? compareRationals(votedNay, sqrtVoters, votedAye, sqrtElectorate) : compareRationals(votedNay, sqrtElectorate, votedAye, sqrtVoters); + } + function calcPassing(threshold, sqrtElectorate, state) { + return threshold.isSimpleMajority ? state.votedAye.gt(state.votedNay) : calcPassingOther(threshold, sqrtElectorate, state); + } + exports2.calcPassing = calcPassing; + function calcVotesPrev(votesFor) { + return votesFor.reduce((state, derived) => { + const { balance, vote } = derived; + const isDefault = vote.conviction.index === 0; + const counted = balance.muln(isDefault ? 1 : vote.conviction.index).divn(isDefault ? 10 : 1); + if (vote.isAye) { + state.allAye.push(derived); + state.voteCountAye++; + state.votedAye.iadd(counted); + } else { + state.allNay.push(derived); + state.voteCountNay++; + state.votedNay.iadd(counted); + } + state.voteCount++; + state.votedTotal.iadd(counted); + return state; + }, { allAye: [], allNay: [], voteCount: 0, voteCountAye: 0, voteCountNay: 0, votedAye: new util_1.BN(0), votedNay: new util_1.BN(0), votedTotal: new util_1.BN(0) }); + } + function calcVotesCurrent(tally, votes) { + const allAye = []; + const allNay = []; + votes.forEach((derived) => { + if (derived.vote.isAye) { + allAye.push(derived); + } else { + allNay.push(derived); + } + }); + return { + allAye, + allNay, + voteCount: allAye.length + allNay.length, + voteCountAye: allAye.length, + voteCountNay: allNay.length, + votedAye: tally.ayes, + votedNay: tally.nays, + votedTotal: tally.turnout + }; + } + function calcVotes(sqrtElectorate, referendum, votes) { + const state = isCurrentStatus(referendum.status) ? calcVotesCurrent(referendum.status.tally, votes) : calcVotesPrev(votes); + return (0, util_1.objectSpread)({}, state, { + isPassing: calcPassing(referendum.status.threshold, sqrtElectorate, state), + votes + }); + } + exports2.calcVotes = calcVotes; + function getStatus(info) { + if (info.isNone) { + return null; + } + const unwrapped = info.unwrap(); + return isOldInfo(unwrapped) ? unwrapped : unwrapped.isOngoing ? unwrapped.asOngoing : null; + } + exports2.getStatus = getStatus; + function getImageHashBounded(hash8) { + return hash8.isLegacy ? hash8.asLegacy.hash_.toHex() : hash8.isLookup ? hash8.asLookup.hash_.toHex() : hash8.isInline ? hash8.asInline.hash.toHex() : (0, util_1.isString)(hash8) ? (0, util_1.isHex)(hash8) ? hash8 : (0, util_1.stringToHex)(hash8) : (0, util_1.isU8a)(hash8) ? (0, util_1.u8aToHex)(hash8) : hash8.toHex(); + } + exports2.getImageHashBounded = getImageHashBounded; + function getImageHash(status) { + return getImageHashBounded(status.proposal || status.proposalHash); + } + exports2.getImageHash = getImageHash; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/dispatchQueue.js + var require_dispatchQueue = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/dispatchQueue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dispatchQueue = void 0; + var rxjs_1 = require_cjs7(); + var types_1 = require_cjs10(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util15(); + var DEMOCRACY_ID = (0, util_1.stringToHex)("democrac"); + function isMaybeHashedOrBounded(call) { + return call instanceof types_1.Enum; + } + function isBounded(call) { + return call.isInline || call.isLegacy || call.isLookup; + } + function queryQueue(api) { + return api.query.democracy["dispatchQueue"]().pipe((0, rxjs_1.switchMap)((dispatches) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(dispatches), + api.derive.democracy.preimages(dispatches.map(([, hash8]) => hash8)) + ])), (0, rxjs_1.map)(([dispatches, images]) => dispatches.map(([at, imageHash, index], dispatchIndex) => ({ + at, + image: images[dispatchIndex], + imageHash: (0, util_js_1.getImageHashBounded)(imageHash), + index + })))); + } + function schedulerEntries(api) { + return api.derive.democracy.referendumsFinished().pipe((0, rxjs_1.switchMap)(() => api.query.scheduler.agenda.keys()), (0, rxjs_1.switchMap)((keys) => { + const blockNumbers = keys.map(({ args: [blockNumber] }) => blockNumber); + return blockNumbers.length ? (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(blockNumbers), + api.query.scheduler.agenda.multi(blockNumbers).pipe((0, rxjs_1.catchError)(() => (0, rxjs_1.of)(blockNumbers.map(() => [])))) + ]) : (0, rxjs_1.of)([[], []]); + })); + } + function queryScheduler(api) { + return schedulerEntries(api).pipe((0, rxjs_1.switchMap)(([blockNumbers, agendas]) => { + const result = []; + blockNumbers.forEach((at, index) => { + (agendas[index] || []).filter((o) => o.isSome).forEach((o) => { + const scheduled2 = o.unwrap(); + if (scheduled2.maybeId.isSome) { + const id4 = scheduled2.maybeId.unwrap().toHex(); + if (id4.startsWith(DEMOCRACY_ID)) { + const imageHash = isMaybeHashedOrBounded(scheduled2.call) ? isBounded(scheduled2.call) ? (0, util_js_1.getImageHashBounded)(scheduled2.call) : scheduled2.call.isHash ? scheduled2.call.asHash.toHex() : scheduled2.call.asValue.args[0].toHex() : scheduled2.call.args[0].toHex(); + result.push({ at, imageHash, index: api.registry.createType("(u64, ReferendumIndex)", id4)[1] }); + } + } + }); + }); + return (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(result), + result.length ? api.derive.democracy.preimages(result.map(({ imageHash }) => imageHash)) : (0, rxjs_1.of)([]) + ]); + }), (0, rxjs_1.map)(([infos, images]) => infos.map((info, index) => (0, util_1.objectSpread)({ image: images[index] }, info)))); + } + function dispatchQueue(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => (0, util_1.isFunction)(api.query.scheduler?.agenda) ? queryScheduler(api) : api.query.democracy["dispatchQueue"] ? queryQueue(api) : (0, rxjs_1.of)([])); + } + exports2.dispatchQueue = dispatchQueue; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/locks.js + var require_locks = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/locks.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.locks = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var LOCKUPS = [0, 1, 2, 4, 8, 16, 32]; + function parseEnd(api, vote, { approved, end }) { + return [ + end, + approved.isTrue && vote.isAye || approved.isFalse && vote.isNay ? end.add((api.consts.democracy.voteLockingPeriod || api.consts.democracy.enactmentPeriod).muln(LOCKUPS[vote.conviction.index])) : util_1.BN_ZERO + ]; + } + function parseLock(api, [referendumId, accountVote], referendum) { + const { balance, vote } = accountVote.asStandard; + const [referendumEnd, unlockAt] = referendum.isFinished ? parseEnd(api, vote, referendum.asFinished) : [util_1.BN_ZERO, util_1.BN_ZERO]; + return { balance, isDelegated: false, isFinished: referendum.isFinished, referendumEnd, referendumId, unlockAt, vote }; + } + function delegateLocks(api, { balance, conviction, target }) { + return api.derive.democracy.locks(target).pipe((0, rxjs_1.map)((available) => available.map(({ isFinished, referendumEnd, referendumId, unlockAt, vote }) => ({ + balance, + isDelegated: true, + isFinished, + referendumEnd, + referendumId, + unlockAt: unlockAt.isZero() ? unlockAt : referendumEnd.add((api.consts.democracy.voteLockingPeriod || api.consts.democracy.enactmentPeriod).muln(LOCKUPS[conviction.index])), + vote: api.registry.createType("Vote", { aye: vote.isAye, conviction }) + })))); + } + function directLocks(api, { votes }) { + if (!votes.length) { + return (0, rxjs_1.of)([]); + } + return api.query.democracy.referendumInfoOf.multi(votes.map(([referendumId]) => referendumId)).pipe((0, rxjs_1.map)((referendums) => votes.map((vote, index) => [vote, referendums[index].unwrapOr(null)]).filter((item) => !!item[1] && (0, util_1.isUndefined)(item[1].end) && item[0][1].isStandard).map(([directVote, referendum]) => parseLock(api, directVote, referendum)))); + } + function locks(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId) => api.query.democracy.votingOf ? api.query.democracy.votingOf(accountId).pipe((0, rxjs_1.switchMap)((voting) => voting.isDirect ? directLocks(api, voting.asDirect) : voting.isDelegating ? delegateLocks(api, voting.asDelegating) : (0, rxjs_1.of)([]))) : (0, rxjs_1.of)([])); + } + exports2.locks = locks; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/nextExternal.js + var require_nextExternal = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/nextExternal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.nextExternal = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var util_js_1 = require_util15(); + function withImage(api, nextOpt) { + if (nextOpt.isNone) { + return (0, rxjs_1.of)(null); + } + const [hash8, threshold] = nextOpt.unwrap(); + return api.derive.democracy.preimage(hash8).pipe((0, rxjs_1.map)((image) => ({ + image, + imageHash: (0, util_js_1.getImageHashBounded)(hash8), + threshold + }))); + } + function nextExternal(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.democracy?.nextExternal ? api.query.democracy.nextExternal().pipe((0, rxjs_1.switchMap)((nextOpt) => withImage(api, nextOpt))) : (0, rxjs_1.of)(null)); + } + exports2.nextExternal = nextExternal; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/preimages.js + var require_preimages = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/preimages.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.preimage = exports2.preimages = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util15(); + function getUnrequestedTicket(status) { + return status.ticket || status.deposit; + } + function getRequestedTicket(status) { + return (status.maybeTicket || status.deposit).unwrapOrDefault(); + } + function isDemocracyPreimage(api, imageOpt) { + return !!imageOpt && !api.query.democracy["dispatchQueue"]; + } + function constructProposal(api, [bytes5, proposer, balance, at]) { + let proposal; + try { + proposal = api.registry.createType("Call", bytes5.toU8a(true)); + } catch (error) { + console.error(error); + } + return { at, balance, proposal, proposer }; + } + function parseDemocracy(api, imageOpt) { + if (imageOpt.isNone) { + return; + } + if (isDemocracyPreimage(api, imageOpt)) { + const status = imageOpt.unwrap(); + if (status.isMissing) { + return; + } + const { data, deposit, provider, since } = status.asAvailable; + return constructProposal(api, [data, provider, deposit, since]); + } + return constructProposal(api, imageOpt.unwrap()); + } + function parseImage(api, [proposalHash, status, bytes5]) { + if (!status) { + return void 0; + } + const [proposer, balance] = status.isUnrequested ? getUnrequestedTicket(status.asUnrequested) : getRequestedTicket(status.asRequested); + let proposal; + if (bytes5) { + try { + proposal = api.registry.createType("Call", bytes5.toU8a(true)); + } catch (error) { + console.error(error); + } + } + return { at: util_1.BN_ZERO, balance, proposal, proposalHash, proposer }; + } + function getDemocracyImages(api, bounded) { + const hashes = bounded.map((b) => (0, util_js_1.getImageHashBounded)(b)); + return api.query.democracy["preimages"].multi(hashes).pipe((0, rxjs_1.map)((images) => images.map((imageOpt) => parseDemocracy(api, imageOpt)))); + } + function getImages(api, bounded) { + const hashes = bounded.map((b) => (0, util_js_1.getImageHashBounded)(b)); + const bytesType = api.registry.lookup.getTypeDef(api.query.preimage.preimageFor.creator.meta.type.asMap.key).type; + return api.query.preimage.statusFor.multi(hashes).pipe((0, rxjs_1.switchMap)((optStatus) => { + const statuses = optStatus.map((o) => o.unwrapOr(null)); + const keys = statuses.map((s, i) => s ? bytesType === "H256" ? hashes[i] : s.isRequested ? [hashes[i], s.asRequested.len.unwrapOr(0)] : [hashes[i], s.asUnrequested.len] : null).filter((p) => !!p); + return api.query.preimage.preimageFor.multi(keys).pipe((0, rxjs_1.map)((optBytes) => { + let ptr = -1; + return statuses.map((s, i) => s ? [hashes[i], s, optBytes[++ptr].unwrapOr(null)] : [hashes[i], null, null]).map((v) => parseImage(api, v)); + })); + })); + } + function preimages(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (hashes) => hashes.length ? (0, util_1.isFunction)(api.query.democracy["preimages"]) ? getDemocracyImages(api, hashes) : (0, util_1.isFunction)(api.query.preimage.preimageFor) ? getImages(api, hashes) : (0, rxjs_1.of)([]) : (0, rxjs_1.of)([])); + } + exports2.preimages = preimages; + exports2.preimage = (0, index_js_1.firstMemo)((api, hash8) => api.derive.democracy.preimages([hash8])); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/proposals.js + var require_proposals2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/proposals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proposals = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util15(); + function isNewDepositors(depositors) { + return (0, util_1.isFunction)(depositors[1].mul); + } + function parse2([proposals2, images, optDepositors]) { + return proposals2.filter(([, , proposer], index) => !!optDepositors[index]?.isSome && !proposer.isEmpty).map(([index, hash8, proposer], proposalIndex) => { + const depositors = optDepositors[proposalIndex].unwrap(); + return (0, util_1.objectSpread)({ + image: images[proposalIndex], + imageHash: (0, util_js_1.getImageHashBounded)(hash8), + index, + proposer + }, isNewDepositors(depositors) ? { balance: depositors[1], seconds: depositors[0] } : { balance: depositors[0], seconds: depositors[1] }); + }); + } + function proposals(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => (0, util_1.isFunction)(api.query.democracy?.publicProps) ? api.query.democracy.publicProps().pipe((0, rxjs_1.switchMap)((proposals2) => proposals2.length ? (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(proposals2), + api.derive.democracy.preimages(proposals2.map(([, hash8]) => hash8)), + api.query.democracy.depositOf.multi(proposals2.map(([index]) => index)) + ]) : (0, rxjs_1.of)([[], [], []])), (0, rxjs_1.map)(parse2)) : (0, rxjs_1.of)([])); + } + exports2.proposals = proposals; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/referendumIds.js + var require_referendumIds = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/referendumIds.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.referendumIds = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function referendumIds(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.democracy?.lowestUnbaked ? api.queryMulti([ + api.query.democracy.lowestUnbaked, + api.query.democracy.referendumCount + ]).pipe((0, rxjs_1.map)(([first, total]) => total.gt(first) ? [...Array(total.sub(first).toNumber())].map((_, i) => first.addn(i)) : [])) : (0, rxjs_1.of)([])); + } + exports2.referendumIds = referendumIds; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/referendums.js + var require_referendums = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/referendums.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.referendums = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function referendums(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.derive.democracy.referendumsActive().pipe((0, rxjs_1.switchMap)((referendums2) => referendums2.length ? (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(referendums2), + api.derive.democracy._referendumsVotes(referendums2) + ]) : (0, rxjs_1.of)([[], []])), (0, rxjs_1.map)(([referendums2, votes]) => referendums2.map((referendum, index) => (0, util_1.objectSpread)({}, referendum, votes[index]))))); + } + exports2.referendums = referendums; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/referendumsActive.js + var require_referendumsActive = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/referendumsActive.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.referendumsActive = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function referendumsActive(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.derive.democracy.referendumIds().pipe((0, rxjs_1.switchMap)((ids) => ids.length ? api.derive.democracy.referendumsInfo(ids) : (0, rxjs_1.of)([])))); + } + exports2.referendumsActive = referendumsActive; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/referendumsFinished.js + var require_referendumsFinished = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/referendumsFinished.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.referendumsFinished = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function referendumsFinished(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.derive.democracy.referendumIds().pipe((0, rxjs_1.switchMap)((ids) => api.query.democracy.referendumInfoOf.multi(ids)), (0, rxjs_1.map)((infos) => infos.map((o) => o.unwrapOr(null)).filter((info) => !!info && info.isFinished).map((info) => info.asFinished)))); + } + exports2.referendumsFinished = referendumsFinished; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/referendumsInfo.js + var require_referendumsInfo = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/referendumsInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.referendumsInfo = exports2._referendumInfo = exports2._referendumsVotes = exports2._referendumVotes = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util15(); + function votesPrev(api, referendumId) { + return api.query.democracy["votersFor"](referendumId).pipe((0, rxjs_1.switchMap)((votersFor) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(votersFor), + votersFor.length ? api.query.democracy["voteOf"].multi(votersFor.map((accountId) => [referendumId, accountId])) : (0, rxjs_1.of)([]), + api.derive.balances.votingBalances(votersFor) + ])), (0, rxjs_1.map)(([votersFor, votes, balances]) => votersFor.map((accountId, index) => ({ + accountId, + balance: balances[index].votingBalance || api.registry.createType("Balance"), + isDelegating: false, + vote: votes[index] || api.registry.createType("Vote") + })))); + } + function extractVotes(mapped, referendumId) { + return mapped.filter(([, voting]) => voting.isDirect).map(([accountId, voting]) => [ + accountId, + voting.asDirect.votes.filter(([idx]) => idx.eq(referendumId)) + ]).filter(([, directVotes]) => !!directVotes.length).reduce((result, [accountId, votes]) => votes.reduce((result2, [, vote]) => { + if (vote.isStandard) { + result2.push((0, util_1.objectSpread)({ + accountId, + isDelegating: false + }, vote.asStandard)); + } + return result2; + }, result), []); + } + function votesCurr(api, referendumId) { + return api.query.democracy.votingOf.entries().pipe((0, rxjs_1.map)((allVoting) => { + const mapped = allVoting.map(([{ args: [accountId] }, voting]) => [accountId, voting]); + const votes = extractVotes(mapped, referendumId); + const delegations = mapped.filter(([, voting]) => voting.isDelegating).map(([accountId, voting]) => [accountId, voting.asDelegating]); + delegations.forEach(([accountId, { balance, conviction, target }]) => { + const toDelegator = delegations.find(([accountId2]) => accountId2.eq(target)); + const to2 = votes.find(({ accountId: accountId2 }) => accountId2.eq(toDelegator ? toDelegator[0] : target)); + if (to2) { + votes.push({ + accountId, + balance, + isDelegating: true, + vote: api.registry.createType("Vote", { aye: to2.vote.isAye, conviction }) + }); + } + }); + return votes; + })); + } + function _referendumVotes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (referendum) => (0, rxjs_1.combineLatest)([ + api.derive.democracy.sqrtElectorate(), + (0, util_1.isFunction)(api.query.democracy.votingOf) ? votesCurr(api, referendum.index) : votesPrev(api, referendum.index) + ]).pipe((0, rxjs_1.map)(([sqrtElectorate, votes]) => (0, util_js_1.calcVotes)(sqrtElectorate, referendum, votes)))); + } + exports2._referendumVotes = _referendumVotes; + function _referendumsVotes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (referendums) => referendums.length ? (0, rxjs_1.combineLatest)(referendums.map((referendum) => api.derive.democracy._referendumVotes(referendum))) : (0, rxjs_1.of)([])); + } + exports2._referendumsVotes = _referendumsVotes; + function _referendumInfo(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (index, info) => { + const status = (0, util_js_1.getStatus)(info); + return status ? api.derive.democracy.preimage(status.proposal || status.proposalHash).pipe((0, rxjs_1.map)((image) => ({ + image, + imageHash: (0, util_js_1.getImageHash)(status), + index: api.registry.createType("ReferendumIndex", index), + status + }))) : (0, rxjs_1.of)(null); + }); + } + exports2._referendumInfo = _referendumInfo; + function referendumsInfo(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (ids) => ids.length ? api.query.democracy.referendumInfoOf.multi(ids).pipe((0, rxjs_1.switchMap)((infos) => (0, rxjs_1.combineLatest)(ids.map((id4, index) => api.derive.democracy._referendumInfo(id4, infos[index])))), (0, rxjs_1.map)((infos) => infos.filter((r10) => !!r10))) : (0, rxjs_1.of)([])); + } + exports2.referendumsInfo = referendumsInfo; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/sqrtElectorate.js + var require_sqrtElectorate = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/sqrtElectorate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sqrtElectorate = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function sqrtElectorate(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.balances.totalIssuance().pipe((0, rxjs_1.map)(util_1.bnSqrt))); + } + exports2.sqrtElectorate = sqrtElectorate; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/democracy/index.js + var require_democracy = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/democracy/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_dispatchQueue(), exports2); + tslib_1.__exportStar(require_locks(), exports2); + tslib_1.__exportStar(require_nextExternal(), exports2); + tslib_1.__exportStar(require_preimages(), exports2); + tslib_1.__exportStar(require_proposals2(), exports2); + tslib_1.__exportStar(require_referendumIds(), exports2); + tslib_1.__exportStar(require_referendums(), exports2); + tslib_1.__exportStar(require_referendumsActive(), exports2); + tslib_1.__exportStar(require_referendumsFinished(), exports2); + tslib_1.__exportStar(require_referendumsInfo(), exports2); + tslib_1.__exportStar(require_sqrtElectorate(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/elections/info.js + var require_info2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/elections/info.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.info = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function isSeatHolder(value) { + return !Array.isArray(value); + } + function isCandidateTuple(value) { + return Array.isArray(value); + } + function getAccountTuple(value) { + return isSeatHolder(value) ? [value.who, value.stake] : value; + } + function getCandidate(value) { + return isCandidateTuple(value) ? value[0] : value; + } + function sortAccounts([, balanceA], [, balanceB]) { + return balanceB.cmp(balanceA); + } + function getConstants(api, elections) { + return elections ? { + candidacyBond: api.consts[elections].candidacyBond, + desiredRunnersUp: api.consts[elections].desiredRunnersUp, + desiredSeats: api.consts[elections].desiredMembers, + termDuration: api.consts[elections].termDuration, + votingBond: api.consts[elections]["votingBond"], + votingBondBase: api.consts[elections].votingBondBase, + votingBondFactor: api.consts[elections].votingBondFactor + } : {}; + } + function getModules(api) { + const [council] = api.registry.getModuleInstances(api.runtimeVersion.specName, "council") || ["council"]; + const elections = api.query["phragmenElection"] ? "phragmenElection" : api.query["electionsPhragmen"] ? "electionsPhragmen" : api.query.elections ? "elections" : null; + const resolvedCouncil = api.query[council] ? council : "council"; + return [resolvedCouncil, elections]; + } + function queryAll(api, council, elections) { + return api.queryMulti([ + api.query[council].members, + api.query[elections].candidates, + api.query[elections].members, + api.query[elections].runnersUp + ]); + } + function queryCouncil(api, council) { + return (0, rxjs_1.combineLatest)([ + api.query[council].members(), + (0, rxjs_1.of)([]), + (0, rxjs_1.of)([]), + (0, rxjs_1.of)([]) + ]); + } + function info(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => { + const [council, elections] = getModules(api); + return (elections ? queryAll(api, council, elections) : queryCouncil(api, council)).pipe((0, rxjs_1.map)(([councilMembers, candidates, members, runnersUp]) => (0, util_1.objectSpread)({}, getConstants(api, elections), { + candidateCount: api.registry.createType("u32", candidates.length), + candidates: candidates.map(getCandidate), + members: members.length ? members.map(getAccountTuple).sort(sortAccounts) : councilMembers.map((a) => [a, api.registry.createType("Balance")]), + runnersUp: runnersUp.map(getAccountTuple).sort(sortAccounts) + }))); + }); + } + exports2.info = info; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/elections/index.js + var require_elections = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/elections/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_info2(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/imOnline/receivedHeartbeats.js + var require_receivedHeartbeats = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/imOnline/receivedHeartbeats.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.receivedHeartbeats = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function mapResult([result, validators, heartbeats, numBlocks]) { + validators.forEach((validator, index) => { + const validatorId = validator.toString(); + const blockCount = numBlocks[index]; + const hasMessage = !heartbeats[index].isEmpty; + const prev = result[validatorId]; + if (!prev || prev.hasMessage !== hasMessage || !prev.blockCount.eq(blockCount)) { + result[validatorId] = { + blockCount, + hasMessage, + isOnline: hasMessage || blockCount.gt(util_1.BN_ZERO) + }; + } + }); + return result; + } + function receivedHeartbeats(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.imOnline?.receivedHeartbeats ? api.derive.staking.overview().pipe((0, rxjs_1.switchMap)(({ currentIndex, validators }) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)({}), + (0, rxjs_1.of)(validators), + api.query.imOnline.receivedHeartbeats.multi(validators.map((_address, index) => [currentIndex, index])), + api.query.imOnline.authoredBlocks.multi(validators.map((address) => [currentIndex, address])) + ])), (0, rxjs_1.map)(mapResult)) : (0, rxjs_1.of)({})); + } + exports2.receivedHeartbeats = receivedHeartbeats; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/imOnline/index.js + var require_imOnline = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/imOnline/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_receivedHeartbeats(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/membership/index.js + var require_membership = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/membership/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prime = exports2.proposals = exports2.proposalHashes = exports2.proposalCount = exports2.proposal = exports2.hasProposals = exports2.members = void 0; + var index_js_1 = require_collective(); + exports2.members = (0, index_js_1.members)("membership"); + exports2.hasProposals = (0, index_js_1.hasProposals)("membership"); + exports2.proposal = (0, index_js_1.proposal)("membership"); + exports2.proposalCount = (0, index_js_1.proposalCount)("membership"); + exports2.proposalHashes = (0, index_js_1.proposalHashes)("membership"); + exports2.proposals = (0, index_js_1.proposals)("membership"); + exports2.prime = (0, index_js_1.prime)("membership"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/parachains/util.js + var require_util16 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/parachains/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.didUpdateToBool = void 0; + function didUpdateToBool(didUpdate, id4) { + return didUpdate.isSome ? didUpdate.unwrap().some((paraId) => paraId.eq(id4)) : false; + } + exports2.didUpdateToBool = didUpdateToBool; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/parachains/info.js + var require_info3 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/parachains/info.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.info = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util16(); + function parseActive(id4, active) { + const found = active.find(([paraId]) => paraId === id4); + if (found && found[1].isSome) { + const [collatorId, retriable] = found[1].unwrap(); + return (0, util_1.objectSpread)({ collatorId }, retriable.isWithRetries ? { + isRetriable: true, + retries: retriable.asWithRetries.toNumber() + } : { + isRetriable: false, + retries: 0 + }); + } + return null; + } + function parseCollators(id4, collatorQueue) { + return collatorQueue.map((queue) => { + const found = queue.find(([paraId]) => paraId === id4); + return found ? found[1] : null; + }); + } + function parse2(id4, [active, retryQueue, selectedThreads, didUpdate, info2, pendingSwap, heads, relayDispatchQueue]) { + if (info2.isNone) { + return null; + } + return { + active: parseActive(id4, active), + didUpdate: (0, util_js_1.didUpdateToBool)(didUpdate, id4), + heads, + id: id4, + info: (0, util_1.objectSpread)({ id: id4 }, info2.unwrap()), + pendingSwapId: pendingSwap.unwrapOr(null), + relayDispatchQueue, + retryCollators: parseCollators(id4, retryQueue), + selectedCollators: parseCollators(id4, selectedThreads) + }; + } + function info(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (id4) => api.query["registrar"] && api.query["parachains"] ? api.queryMulti([ + api.query["registrar"]["active"], + api.query["registrar"]["retryQueue"], + api.query["registrar"]["selectedThreads"], + api.query["parachains"]["didUpdate"], + [api.query["registrar"]["paras"], id4], + [api.query["registrar"]["pendingSwap"], id4], + [api.query["parachains"]["heads"], id4], + [api.query["parachains"]["relayDispatchQueue"], id4] + ]).pipe((0, rxjs_1.map)((result) => parse2(api.registry.createType("ParaId", id4), result))) : (0, rxjs_1.of)(null)); + } + exports2.info = info; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/parachains/overview.js + var require_overview = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/parachains/overview.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.overview = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var util_js_1 = require_util16(); + function parse2([ids, didUpdate, relayDispatchQueueSizes, infos, pendingSwaps]) { + return ids.map((id4, index) => ({ + didUpdate: (0, util_js_1.didUpdateToBool)(didUpdate, id4), + id: id4, + info: (0, util_1.objectSpread)({ id: id4 }, infos[index].unwrapOr(null)), + pendingSwapId: pendingSwaps[index].unwrapOr(null), + relayDispatchQueueSize: relayDispatchQueueSizes[index][0].toNumber() + })); + } + function overview(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query["registrar"]?.["parachains"] && api.query["parachains"] ? api.query["registrar"]["parachains"]().pipe((0, rxjs_1.switchMap)((paraIds) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(paraIds), + api.query["parachains"]["didUpdate"](), + api.query["parachains"]["relayDispatchQueueSize"].multi(paraIds), + api.query["registrar"]["paras"].multi(paraIds), + api.query["registrar"]["pendingSwap"].multi(paraIds) + ])), (0, rxjs_1.map)(parse2)) : (0, rxjs_1.of)([])); + } + exports2.overview = overview; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/parachains/index.js + var require_parachains = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/parachains/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_info3(), exports2); + tslib_1.__exportStar(require_overview(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/session/indexes.js + var require_indexes2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/session/indexes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.indexes = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function parse2([currentIndex, activeEra, activeEraStart, currentEra, validatorCount]) { + return { + activeEra, + activeEraStart, + currentEra, + currentIndex, + validatorCount + }; + } + function queryStaking(api) { + return api.queryMulti([ + api.query.session.currentIndex, + api.query.staking.activeEra, + api.query.staking.currentEra, + api.query.staking.validatorCount + ]).pipe((0, rxjs_1.map)(([currentIndex, activeOpt, currentEra, validatorCount]) => { + const { index, start } = activeOpt.unwrapOrDefault(); + return parse2([ + currentIndex, + index, + start, + currentEra.unwrapOrDefault(), + validatorCount + ]); + })); + } + function querySession(api) { + return api.query.session.currentIndex().pipe((0, rxjs_1.map)((currentIndex) => parse2([ + currentIndex, + api.registry.createType("EraIndex"), + api.registry.createType("Option"), + api.registry.createType("EraIndex"), + api.registry.createType("u32") + ]))); + } + function empty(api) { + return (0, rxjs_1.of)(parse2([ + api.registry.createType("SessionIndex", 1), + api.registry.createType("EraIndex"), + api.registry.createType("Option"), + api.registry.createType("EraIndex"), + api.registry.createType("u32") + ])); + } + function indexes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.session ? api.query.staking ? queryStaking(api) : querySession(api) : empty(api)); + } + exports2.indexes = indexes; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/session/info.js + var require_info4 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/session/info.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.info = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function info(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.derive.session.indexes().pipe((0, rxjs_1.map)((indexes) => { + const sessionLength = api.consts?.babe?.epochDuration || api.registry.createType("u64", 1); + const sessionsPerEra = api.consts?.staking?.sessionsPerEra || api.registry.createType("SessionIndex", 1); + return (0, util_1.objectSpread)({ + eraLength: api.registry.createType("BlockNumber", sessionsPerEra.mul(sessionLength)), + isEpoch: !!api.query.babe, + sessionLength, + sessionsPerEra + }, indexes); + }))); + } + exports2.info = info; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/session/progress.js + var require_progress = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/session/progress.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sessionProgress = exports2.eraProgress = exports2.eraLength = exports2.progress = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function withProgressField(field) { + return (instanceId, api) => (0, index_js_1.memo)(instanceId, () => api.derive.session.progress().pipe((0, rxjs_1.map)((info) => info[field]))); + } + function createDerive(api, info, [currentSlot, epochIndex, epochOrGenesisStartSlot, activeEraStartSessionIndex]) { + const epochStartSlot = epochIndex.mul(info.sessionLength).iadd(epochOrGenesisStartSlot); + const sessionProgress = currentSlot.sub(epochStartSlot); + const eraProgress = info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress); + return (0, util_1.objectSpread)({ + eraProgress: api.registry.createType("BlockNumber", eraProgress), + sessionProgress: api.registry.createType("BlockNumber", sessionProgress) + }, info); + } + function queryAura(api) { + return api.derive.session.info().pipe((0, rxjs_1.map)((info) => (0, util_1.objectSpread)({ + eraProgress: api.registry.createType("BlockNumber"), + sessionProgress: api.registry.createType("BlockNumber") + }, info))); + } + function queryBabe(api) { + return api.derive.session.info().pipe((0, rxjs_1.switchMap)((info) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(info), + api.query.staking?.erasStartSessionIndex ? api.queryMulti([ + api.query.babe.currentSlot, + api.query.babe.epochIndex, + api.query.babe.genesisSlot, + [api.query.staking.erasStartSessionIndex, info.activeEra] + ]) : api.queryMulti([ + api.query.babe.currentSlot, + api.query.babe.epochIndex, + api.query.babe.genesisSlot + ]) + ])), (0, rxjs_1.map)(([info, [currentSlot, epochIndex, genesisSlot, optStartIndex]]) => [ + info, + [currentSlot, epochIndex, genesisSlot, optStartIndex && optStartIndex.isSome ? optStartIndex.unwrap() : api.registry.createType("SessionIndex", 1)] + ])); + } + function progress(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.babe ? queryBabe(api).pipe((0, rxjs_1.map)(([info, slots]) => createDerive(api, info, slots))) : queryAura(api)); + } + exports2.progress = progress; + exports2.eraLength = withProgressField("eraLength"); + exports2.eraProgress = withProgressField("eraProgress"); + exports2.sessionProgress = withProgressField("sessionProgress"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/session/index.js + var require_session = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/session/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_indexes2(), exports2); + tslib_1.__exportStar(require_info4(), exports2); + tslib_1.__exportStar(require_progress(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/society/candidates.js + var require_candidates = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/society/candidates.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.candidates = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function getPrev(api) { + return api.query.society.candidates().pipe((0, rxjs_1.switchMap)((candidates2) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(candidates2), + api.query.society["suspendedCandidates"].multi(candidates2.map(({ who }) => who)) + ])), (0, rxjs_1.map)(([candidates2, suspended]) => candidates2.map(({ kind, value, who }, index) => ({ + accountId: who, + isSuspended: suspended[index].isSome, + kind, + value + })))); + } + function getCurr(api) { + return api.query.society.candidates.entries().pipe((0, rxjs_1.map)((entries) => entries.filter(([, opt]) => opt.isSome).map(([{ args: [accountId] }, opt]) => [accountId, opt.unwrap()]).map(([accountId, { bid, kind }]) => ({ + accountId, + isSuspended: false, + kind, + value: bid + })))); + } + function candidates(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.society["suspendedCandidates"] && api.query.society.candidates.creator.meta.type.isPlain ? getPrev(api) : getCurr(api)); + } + exports2.candidates = candidates; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/society/info.js + var require_info5 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/society/info.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.info = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function info(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => (0, rxjs_1.combineLatest)([ + api.query.society.bids(), + api.query.society["defender"] ? api.query.society["defender"]() : (0, rxjs_1.of)(void 0), + api.query.society.founder(), + api.query.society.head(), + api.query.society["maxMembers"] ? api.query.society["maxMembers"]() : (0, rxjs_1.of)(void 0), + api.query.society.pot() + ]).pipe((0, rxjs_1.map)(([bids, defender, founder, head, maxMembers, pot]) => ({ + bids, + defender: defender?.unwrapOr(void 0), + founder: founder.unwrapOr(void 0), + hasDefender: defender?.isSome && head.isSome && !head.eq(defender) || false, + head: head.unwrapOr(void 0), + maxMembers, + pot + })))); + } + exports2.info = info; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/society/member.js + var require_member = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/society/member.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.member = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function member(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId) => api.derive.society._members([accountId]).pipe((0, rxjs_1.map)(([result]) => result))); + } + exports2.member = member; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/society/members.js + var require_members2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/society/members.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.members = exports2._members = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function _membersPrev(api, accountIds) { + return (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(accountIds), + api.query.society.payouts.multi(accountIds), + api.query.society["strikes"].multi(accountIds), + api.query.society.defenderVotes.multi(accountIds), + api.query.society.suspendedMembers.multi(accountIds), + api.query.society["vouching"].multi(accountIds) + ]).pipe((0, rxjs_1.map)(([accountIds2, payouts, strikes, defenderVotes, suspended, vouching]) => accountIds2.map((accountId, index) => ({ + accountId, + isDefenderVoter: defenderVotes[index].isSome, + isSuspended: suspended[index].isTrue, + payouts: payouts[index], + strikes: strikes[index], + vote: defenderVotes[index].unwrapOr(void 0), + vouching: vouching[index].unwrapOr(void 0) + })))); + } + function _membersCurr(api, accountIds) { + return (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(accountIds), + api.query.society.members.multi(accountIds), + api.query.society.payouts.multi(accountIds), + api.query.society.challengeRoundCount().pipe((0, rxjs_1.switchMap)((round) => api.query.society.defenderVotes.multi(accountIds.map((accountId) => [round, accountId])))), + api.query.society.suspendedMembers.multi(accountIds) + ]).pipe((0, rxjs_1.map)(([accountIds2, members2, payouts, defenderVotes, suspendedMembers]) => accountIds2.map((accountId, index) => members2[index].isSome ? { + accountId, + isDefenderVoter: defenderVotes[index].isSome, + isSuspended: suspendedMembers[index].isSome, + member: members2[index].unwrap(), + payouts: payouts[index].payouts + } : null).filter((m) => !!m).map(({ accountId, isDefenderVoter, isSuspended, member, payouts: payouts2 }) => ({ + accountId, + isDefenderVoter, + isSuspended, + payouts: payouts2, + strikes: member.strikes, + vouching: member.vouching.unwrapOr(void 0) + })))); + } + function _members(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds) => api.query.society.members.creator.meta.type.isMap ? _membersCurr(api, accountIds) : _membersPrev(api, accountIds)); + } + exports2._members = _members; + function members(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.society.members.creator.meta.type.isMap ? api.query.society.members.keys().pipe((0, rxjs_1.switchMap)((keys) => api.derive.society._members(keys.map(({ args: [accountId] }) => accountId)))) : api.query.society.members().pipe((0, rxjs_1.switchMap)((members2) => api.derive.society._members(members2)))); + } + exports2.members = members; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/society/index.js + var require_society = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/society/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_candidates(), exports2); + tslib_1.__exportStar(require_info5(), exports2); + tslib_1.__exportStar(require_member(), exports2); + tslib_1.__exportStar(require_members2(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/account.js + var require_account2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/account.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.account = exports2.accounts = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var QUERY_OPTS = { + withDestination: true, + withLedger: true, + withNominations: true, + withPrefs: true + }; + function groupByEra(list) { + return list.reduce((map2, { era, value }) => { + const key2 = era.toString(); + map2[key2] = (map2[key2] || util_1.BN_ZERO).add(value.unwrap()); + return map2; + }, {}); + } + function calculateUnlocking(api, stakingLedger, sessionInfo) { + const results = Object.entries(groupByEra((stakingLedger?.unlocking || []).filter(({ era }) => era.unwrap().gt(sessionInfo.activeEra)))).map(([eraString, value]) => ({ + remainingEras: new util_1.BN(eraString).isub(sessionInfo.activeEra), + value: api.registry.createType("Balance", value) + })); + return results.length ? results : void 0; + } + function redeemableSum(api, stakingLedger, sessionInfo) { + return api.registry.createType("Balance", (stakingLedger?.unlocking || []).reduce((total, { era, value }) => { + return era.unwrap().gt(sessionInfo.currentEra) ? total : total.iadd(value.unwrap()); + }, new util_1.BN(0))); + } + function parseResult(api, sessionInfo, keys, query) { + return (0, util_1.objectSpread)({}, keys, query, { + redeemable: redeemableSum(api, query.stakingLedger, sessionInfo), + unlocking: calculateUnlocking(api, query.stakingLedger, sessionInfo) + }); + } + function accounts2(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds, opts = QUERY_OPTS) => api.derive.session.info().pipe((0, rxjs_1.switchMap)((sessionInfo) => (0, rxjs_1.combineLatest)([ + api.derive.staking.keysMulti(accountIds), + api.derive.staking.queryMulti(accountIds, opts) + ]).pipe((0, rxjs_1.map)(([keys, queries]) => queries.map((q, index) => parseResult(api, sessionInfo, keys[index], q))))))); + } + exports2.accounts = accounts2; + exports2.account = (0, index_js_1.firstMemo)((api, accountId, opts) => api.derive.staking.accounts([accountId], opts)); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/currentPoints.js + var require_currentPoints = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/currentPoints.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.currentPoints = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function currentPoints(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.derive.session.indexes().pipe((0, rxjs_1.switchMap)(({ activeEra }) => api.query.staking.erasRewardPoints(activeEra)))); + } + exports2.currentPoints = currentPoints; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/electedInfo.js + var require_electedInfo = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/electedInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.electedInfo = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var DEFAULT_FLAGS = { withController: true, withExposure: true, withPrefs: true }; + function combineAccounts(nextElected, validators) { + return (0, util_1.arrayFlatten)([nextElected, validators.filter((v) => !nextElected.find((n) => n.eq(v)))]); + } + function electedInfo(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (flags = DEFAULT_FLAGS) => api.derive.staking.validators().pipe((0, rxjs_1.switchMap)(({ nextElected, validators }) => api.derive.staking.queryMulti(combineAccounts(nextElected, validators), flags).pipe((0, rxjs_1.map)((info) => ({ + info, + nextElected, + validators + })))))); + } + exports2.electedInfo = electedInfo; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/cache.js + var require_cache2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterCachedEras = exports2.setEraMultiCache = exports2.setEraCache = exports2.getEraMultiCache = exports2.getEraCache = void 0; + var index_js_1 = require_util10(); + function getEraCache(CACHE_KEY, era, withActive) { + const cacheKey = `${CACHE_KEY}-${era.toString()}`; + return [ + cacheKey, + withActive ? void 0 : index_js_1.deriveCache.get(cacheKey) + ]; + } + exports2.getEraCache = getEraCache; + function getEraMultiCache(CACHE_KEY, eras, withActive) { + const cached = withActive ? [] : eras.map((e) => index_js_1.deriveCache.get(`${CACHE_KEY}-${e.toString()}`)).filter((v) => !!v); + return cached; + } + exports2.getEraMultiCache = getEraMultiCache; + function setEraCache(cacheKey, withActive, value) { + !withActive && index_js_1.deriveCache.set(cacheKey, value); + return value; + } + exports2.setEraCache = setEraCache; + function setEraMultiCache(CACHE_KEY, withActive, values) { + !withActive && values.forEach((v) => index_js_1.deriveCache.set(`${CACHE_KEY}-${v.era.toString()}`, v)); + return values; + } + exports2.setEraMultiCache = setEraMultiCache; + function filterCachedEras(eras, cached, query) { + return eras.map((e) => cached.find(({ era }) => e.eq(era)) || query.find(({ era }) => e.eq(era))).filter((e) => !!e); + } + exports2.filterCachedEras = filterCachedEras; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/util.js + var require_util17 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineEras = exports2.singleEra = exports2.erasHistoricApplyAccount = exports2.erasHistoricApply = exports2.filterEras = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var ERA_CHUNK_SIZE = 14; + function chunkEras(eras, fn2) { + const chunked = (0, util_1.arrayChunk)(eras, ERA_CHUNK_SIZE); + let index = 0; + const subject2 = new rxjs_1.BehaviorSubject(chunked[index]); + return subject2.pipe((0, rxjs_1.switchMap)(fn2), (0, rxjs_1.tap)(() => { + (0, util_1.nextTick)(() => { + index++; + index === chunked.length ? subject2.complete() : subject2.next(chunked[index]); + }); + }), (0, rxjs_1.toArray)(), (0, rxjs_1.map)(util_1.arrayFlatten)); + } + function filterEras(eras, list) { + return eras.filter((e) => !list.some(({ era }) => e.eq(era))); + } + exports2.filterEras = filterEras; + function erasHistoricApply(fn2) { + return (instanceId, api) => (0, index_js_1.memo)(instanceId, (withActive = false) => api.derive.staking.erasHistoric(withActive).pipe((0, rxjs_1.switchMap)((e) => api.derive.staking[fn2](e, withActive)))); + } + exports2.erasHistoricApply = erasHistoricApply; + function erasHistoricApplyAccount(fn2) { + return (instanceId, api) => (0, index_js_1.memo)(instanceId, (accountId, withActive = false) => api.derive.staking.erasHistoric(withActive).pipe((0, rxjs_1.switchMap)((e) => api.derive.staking[fn2](accountId, e, withActive)))); + } + exports2.erasHistoricApplyAccount = erasHistoricApplyAccount; + function singleEra(fn2) { + return (instanceId, api) => (0, index_js_1.memo)(instanceId, (era) => api.derive.staking[fn2](era, true)); + } + exports2.singleEra = singleEra; + function combineEras(fn2) { + return (instanceId, api) => (0, index_js_1.memo)(instanceId, (eras, withActive) => !eras.length ? (0, rxjs_1.of)([]) : chunkEras(eras, (eras2) => (0, rxjs_1.combineLatest)(eras2.map((e) => api.derive.staking[fn2](e, withActive))))); + } + exports2.combineEras = combineEras; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/erasExposure.js + var require_erasExposure = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/erasExposure.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.erasExposure = exports2._erasExposure = exports2.eraExposure = exports2._eraExposure = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var cache_js_1 = require_cache2(); + var util_js_1 = require_util17(); + var CACHE_KEY = "eraExposure"; + function mapStakersClipped(era, stakers) { + const nominators = {}; + const validators = {}; + stakers.forEach(([key2, exposure]) => { + const validatorId = key2.args[1].toString(); + validators[validatorId] = exposure; + exposure.others.forEach(({ who }, validatorIndex) => { + const nominatorId = who.toString(); + nominators[nominatorId] = nominators[nominatorId] || []; + nominators[nominatorId].push({ validatorId, validatorIndex }); + }); + }); + return { era, nominators, validators }; + } + function mapStakersPaged(era, stakers) { + const nominators = {}; + const validators = {}; + stakers.forEach(([key2, exposureOpt]) => { + if (exposureOpt.isSome) { + const validatorId = key2.args[1].toString(); + const exposure = exposureOpt.unwrap(); + validators[validatorId] = exposure; + exposure.others.forEach(({ who }, validatorIndex) => { + const nominatorId = who.toString(); + nominators[nominatorId] = nominators[nominatorId] || []; + nominators[nominatorId].push({ validatorId, validatorIndex }); + }); + } + }); + return { era, nominators, validators }; + } + function _eraExposure(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (era, withActive = false) => { + const [cacheKey, cached] = (0, cache_js_1.getEraCache)(CACHE_KEY, era, withActive); + return cached ? (0, rxjs_1.of)(cached) : api.query.staking.erasStakersPaged ? api.query.staking.erasStakersPaged.entries(era).pipe((0, rxjs_1.map)((r10) => (0, cache_js_1.setEraCache)(cacheKey, withActive, mapStakersPaged(era, r10)))) : api.query.staking.erasStakersClipped.entries(era).pipe((0, rxjs_1.map)((r10) => (0, cache_js_1.setEraCache)(cacheKey, withActive, mapStakersClipped(era, r10)))); + }); + } + exports2._eraExposure = _eraExposure; + exports2.eraExposure = (0, util_js_1.singleEra)("_eraExposure"); + exports2._erasExposure = (0, util_js_1.combineEras)("_eraExposure"); + exports2.erasExposure = (0, util_js_1.erasHistoricApply)("_erasExposure"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/erasHistoric.js + var require_erasHistoric = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/erasHistoric.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.erasHistoric = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function erasHistoric(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (withActive) => (0, rxjs_1.combineLatest)([ + api.query.staking.activeEra(), + api.consts.staking.historyDepth ? (0, rxjs_1.of)(api.consts.staking.historyDepth) : api.query.staking["historyDepth"]() + ]).pipe((0, rxjs_1.map)(([activeEraOpt, historyDepth]) => { + const result = []; + const max2 = historyDepth.toNumber(); + const activeEra = activeEraOpt.unwrapOrDefault().index; + let lastEra = activeEra; + while (lastEra.gte(util_1.BN_ZERO) && result.length < max2) { + if (lastEra !== activeEra || withActive === true) { + result.push(api.registry.createType("EraIndex", lastEra)); + } + lastEra = lastEra.sub(util_1.BN_ONE); + } + return result.reverse(); + }))); + } + exports2.erasHistoric = erasHistoric; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/erasPoints.js + var require_erasPoints = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/erasPoints.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.erasPoints = exports2._erasPoints = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var cache_js_1 = require_cache2(); + var util_js_1 = require_util17(); + var CACHE_KEY = "eraPoints"; + function mapValidators({ individual }) { + return [...individual.entries()].filter(([, points]) => points.gt(util_1.BN_ZERO)).reduce((result, [validatorId, points]) => { + result[validatorId.toString()] = points; + return result; + }, {}); + } + function mapPoints(eras, points) { + return eras.map((era, index) => ({ + era, + eraPoints: points[index].total, + validators: mapValidators(points[index]) + })); + } + function _erasPoints(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (eras, withActive) => { + if (!eras.length) { + return (0, rxjs_1.of)([]); + } + const cached = (0, cache_js_1.getEraMultiCache)(CACHE_KEY, eras, withActive); + const remaining = (0, util_js_1.filterEras)(eras, cached); + return !remaining.length ? (0, rxjs_1.of)(cached) : api.query.staking.erasRewardPoints.multi(remaining).pipe((0, rxjs_1.map)((p) => (0, cache_js_1.filterCachedEras)(eras, cached, (0, cache_js_1.setEraMultiCache)(CACHE_KEY, withActive, mapPoints(remaining, p))))); + }); + } + exports2._erasPoints = _erasPoints; + exports2.erasPoints = (0, util_js_1.erasHistoricApply)("_erasPoints"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/erasPrefs.js + var require_erasPrefs = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/erasPrefs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.erasPrefs = exports2._erasPrefs = exports2.eraPrefs = exports2._eraPrefs = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var cache_js_1 = require_cache2(); + var util_js_1 = require_util17(); + var CACHE_KEY = "eraPrefs"; + function mapPrefs(era, all) { + const validators = {}; + all.forEach(([key2, prefs]) => { + validators[key2.args[1].toString()] = prefs; + }); + return { era, validators }; + } + function _eraPrefs(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (era, withActive) => { + const [cacheKey, cached] = (0, cache_js_1.getEraCache)(CACHE_KEY, era, withActive); + return cached ? (0, rxjs_1.of)(cached) : api.query.staking.erasValidatorPrefs.entries(era).pipe((0, rxjs_1.map)((r10) => (0, cache_js_1.setEraCache)(cacheKey, withActive, mapPrefs(era, r10)))); + }); + } + exports2._eraPrefs = _eraPrefs; + exports2.eraPrefs = (0, util_js_1.singleEra)("_eraPrefs"); + exports2._erasPrefs = (0, util_js_1.combineEras)("_eraPrefs"); + exports2.erasPrefs = (0, util_js_1.erasHistoricApply)("_erasPrefs"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/erasRewards.js + var require_erasRewards = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/erasRewards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.erasRewards = exports2._erasRewards = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var cache_js_1 = require_cache2(); + var util_js_1 = require_util17(); + var CACHE_KEY = "eraRewards"; + function mapRewards(eras, optRewards) { + return eras.map((era, index) => ({ + era, + eraReward: optRewards[index].unwrapOrDefault() + })); + } + function _erasRewards(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (eras, withActive) => { + if (!eras.length) { + return (0, rxjs_1.of)([]); + } + const cached = (0, cache_js_1.getEraMultiCache)(CACHE_KEY, eras, withActive); + const remaining = (0, util_js_1.filterEras)(eras, cached); + if (!remaining.length) { + return (0, rxjs_1.of)(cached); + } + return api.query.staking.erasValidatorReward.multi(remaining).pipe((0, rxjs_1.map)((r10) => (0, cache_js_1.filterCachedEras)(eras, cached, (0, cache_js_1.setEraMultiCache)(CACHE_KEY, withActive, mapRewards(remaining, r10))))); + }); + } + exports2._erasRewards = _erasRewards; + exports2.erasRewards = (0, util_js_1.erasHistoricApply)("_erasRewards"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/erasSlashes.js + var require_erasSlashes = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/erasSlashes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.erasSlashes = exports2._erasSlashes = exports2.eraSlashes = exports2._eraSlashes = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var cache_js_1 = require_cache2(); + var util_js_1 = require_util17(); + var CACHE_KEY = "eraSlashes"; + function mapSlashes(era, noms, vals) { + const nominators = {}; + const validators = {}; + noms.forEach(([key2, optBalance]) => { + nominators[key2.args[1].toString()] = optBalance.unwrap(); + }); + vals.forEach(([key2, optRes]) => { + validators[key2.args[1].toString()] = optRes.unwrapOrDefault()[1]; + }); + return { era, nominators, validators }; + } + function _eraSlashes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (era, withActive) => { + const [cacheKey, cached] = (0, cache_js_1.getEraCache)(CACHE_KEY, era, withActive); + return cached ? (0, rxjs_1.of)(cached) : (0, rxjs_1.combineLatest)([ + api.query.staking.nominatorSlashInEra.entries(era), + api.query.staking.validatorSlashInEra.entries(era) + ]).pipe((0, rxjs_1.map)(([n, v]) => (0, cache_js_1.setEraCache)(cacheKey, withActive, mapSlashes(era, n, v)))); + }); + } + exports2._eraSlashes = _eraSlashes; + exports2.eraSlashes = (0, util_js_1.singleEra)("_eraSlashes"); + exports2._erasSlashes = (0, util_js_1.combineEras)("_eraSlashes"); + exports2.erasSlashes = (0, util_js_1.erasHistoricApply)("_erasSlashes"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/keys.js + var require_keys2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/keys.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.keysMulti = exports2.keys = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function extractsIds(stashId, queuedKeys, nextKeys) { + const sessionIds = (queuedKeys.find(([currentId]) => currentId.eq(stashId)) || [void 0, []])[1]; + const nextSessionIds = nextKeys.unwrapOr([]); + return { + nextSessionIds: Array.isArray(nextSessionIds) ? nextSessionIds : [...nextSessionIds.values()], + sessionIds: Array.isArray(sessionIds) ? sessionIds : [...sessionIds.values()] + }; + } + exports2.keys = (0, index_js_1.firstMemo)((api, stashId) => api.derive.staking.keysMulti([stashId])); + function keysMulti(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (stashIds) => stashIds.length ? api.query.session.queuedKeys().pipe((0, rxjs_1.switchMap)((queuedKeys) => (0, rxjs_1.combineLatest)([ + (0, rxjs_1.of)(queuedKeys), + api.consts["session"]?.["dedupKeyPrefix"] ? api.query.session.nextKeys.multi(stashIds.map((s) => [api.consts["session"]["dedupKeyPrefix"], s])) : (0, rxjs_1.combineLatest)(stashIds.map((s) => api.query.session.nextKeys(s))) + ])), (0, rxjs_1.map)(([queuedKeys, nextKeys]) => stashIds.map((stashId, index) => extractsIds(stashId, queuedKeys, nextKeys[index])))) : (0, rxjs_1.of)([])); + } + exports2.keysMulti = keysMulti; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/overview.js + var require_overview2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/overview.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.overview = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function overview(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => (0, rxjs_1.combineLatest)([ + api.derive.session.indexes(), + api.derive.staking.validators() + ]).pipe((0, rxjs_1.map)(([indexes, { nextElected, validators }]) => (0, util_1.objectSpread)({}, indexes, { + nextElected, + validators + })))); + } + exports2.overview = overview; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/ownExposure.js + var require_ownExposure = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/ownExposure.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ownExposures = exports2.ownExposure = exports2._ownExposures = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var util_js_1 = require_util17(); + function _ownExposures(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId, eras, _withActive) => eras.length ? (0, rxjs_1.combineLatest)([ + (0, rxjs_1.combineLatest)(eras.map((e) => api.query.staking.erasStakersClipped(e, accountId))), + (0, rxjs_1.combineLatest)(eras.map((e) => api.query.staking.erasStakers(e, accountId))) + ]).pipe((0, rxjs_1.map)(([clp, exp]) => eras.map((era, index) => ({ clipped: clp[index], era, exposure: exp[index] })))) : (0, rxjs_1.of)([])); + } + exports2._ownExposures = _ownExposures; + exports2.ownExposure = (0, index_js_1.firstMemo)((api, accountId, era) => api.derive.staking._ownExposures(accountId, [era], true)); + exports2.ownExposures = (0, util_js_1.erasHistoricApplyAccount)("_ownExposures"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/ownSlashes.js + var require_ownSlashes = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/ownSlashes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ownSlashes = exports2.ownSlash = exports2._ownSlashes = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var util_js_1 = require_util17(); + function _ownSlashes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId, eras, _withActive) => eras.length ? (0, rxjs_1.combineLatest)([ + (0, rxjs_1.combineLatest)(eras.map((e) => api.query.staking.validatorSlashInEra(e, accountId))), + (0, rxjs_1.combineLatest)(eras.map((e) => api.query.staking.nominatorSlashInEra(e, accountId))) + ]).pipe((0, rxjs_1.map)(([vals, noms]) => eras.map((era, index) => ({ + era, + total: vals[index].isSome ? vals[index].unwrap()[1] : noms[index].unwrapOrDefault() + })))) : (0, rxjs_1.of)([])); + } + exports2._ownSlashes = _ownSlashes; + exports2.ownSlash = (0, index_js_1.firstMemo)((api, accountId, era) => api.derive.staking._ownSlashes(accountId, [era], true)); + exports2.ownSlashes = (0, util_js_1.erasHistoricApplyAccount)("_ownSlashes"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/query.js + var require_query = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/query.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.queryMulti = exports2.query = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function rewardDestinationCompat(rewardDestination) { + return typeof rewardDestination.isSome === "boolean" ? rewardDestination.unwrapOr(null) : rewardDestination; + } + function parseDetails(stashId, controllerIdOpt, nominatorsOpt, rewardDestinationOpts, validatorPrefs, exposure, stakingLedgerOpt) { + return { + accountId: stashId, + controllerId: controllerIdOpt?.unwrapOr(null) || null, + exposure, + nominators: nominatorsOpt.isSome ? nominatorsOpt.unwrap().targets : [], + rewardDestination: rewardDestinationCompat(rewardDestinationOpts), + stakingLedger: stakingLedgerOpt.unwrapOrDefault(), + stashId, + validatorPrefs + }; + } + function getLedgers(api, optIds, { withLedger = false }) { + const ids = optIds.filter((o) => withLedger && !!o && o.isSome).map((o) => o.unwrap()); + const emptyLed = api.registry.createType("Option"); + return (ids.length ? (0, rxjs_1.combineLatest)(ids.map((s) => api.query.staking.ledger(s))) : (0, rxjs_1.of)([])).pipe((0, rxjs_1.map)((optLedgers) => { + let offset = -1; + return optIds.map((o) => o && o.isSome ? optLedgers[++offset] || emptyLed : emptyLed); + })); + } + function getStashInfo(api, stashIds, activeEra, { withController, withDestination, withExposure, withLedger, withNominations, withPrefs }) { + const emptyNoms = api.registry.createType("Option"); + const emptyRewa = api.registry.createType("RewardDestination"); + const emptyExpo = api.registry.createType("Exposure"); + const emptyPrefs = api.registry.createType("ValidatorPrefs"); + return (0, rxjs_1.combineLatest)([ + withController || withLedger ? (0, rxjs_1.combineLatest)(stashIds.map((s) => api.query.staking.bonded(s))) : (0, rxjs_1.of)(stashIds.map(() => null)), + withNominations ? (0, rxjs_1.combineLatest)(stashIds.map((s) => api.query.staking.nominators(s))) : (0, rxjs_1.of)(stashIds.map(() => emptyNoms)), + withDestination ? (0, rxjs_1.combineLatest)(stashIds.map((s) => api.query.staking.payee(s))) : (0, rxjs_1.of)(stashIds.map(() => emptyRewa)), + withPrefs ? (0, rxjs_1.combineLatest)(stashIds.map((s) => api.query.staking.validators(s))) : (0, rxjs_1.of)(stashIds.map(() => emptyPrefs)), + withExposure ? (0, rxjs_1.combineLatest)(stashIds.map((s) => api.query.staking.erasStakers(activeEra, s))) : (0, rxjs_1.of)(stashIds.map(() => emptyExpo)) + ]); + } + function getBatch(api, activeEra, stashIds, flags) { + return getStashInfo(api, stashIds, activeEra, flags).pipe((0, rxjs_1.switchMap)(([controllerIdOpt, nominatorsOpt, rewardDestination, validatorPrefs, exposure]) => getLedgers(api, controllerIdOpt, flags).pipe((0, rxjs_1.map)((stakingLedgerOpts) => stashIds.map((stashId, index) => parseDetails(stashId, controllerIdOpt[index], nominatorsOpt[index], rewardDestination[index], validatorPrefs[index], exposure[index], stakingLedgerOpts[index])))))); + } + exports2.query = (0, index_js_1.firstMemo)((api, accountId, flags) => api.derive.staking.queryMulti([accountId], flags)); + function queryMulti(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds, flags) => api.derive.session.indexes().pipe((0, rxjs_1.switchMap)(({ activeEra }) => { + const stashIds = accountIds.map((a) => api.registry.createType("AccountId", a)); + return stashIds.length ? getBatch(api, activeEra, stashIds, flags) : (0, rxjs_1.of)([]); + }))); + } + exports2.queryMulti = queryMulti; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/stakerExposure.js + var require_stakerExposure = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/stakerExposure.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stakerExposure = exports2.stakerExposures = exports2._stakerExposures = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function _stakerExposures(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds, eras, withActive = false) => { + const stakerIds = accountIds.map((a) => api.registry.createType("AccountId", a).toString()); + return api.derive.staking._erasExposure(eras, withActive).pipe((0, rxjs_1.map)((exposures) => stakerIds.map((stakerId) => exposures.map(({ era, nominators: allNominators, validators: allValidators }) => { + const isValidator = !!allValidators[stakerId]; + const validators = {}; + const nominating = allNominators[stakerId] || []; + if (isValidator) { + validators[stakerId] = allValidators[stakerId]; + } else if (nominating) { + nominating.forEach(({ validatorId }) => { + validators[validatorId] = allValidators[validatorId]; + }); + } + return { era, isEmpty: !Object.keys(validators).length, isValidator, nominating, validators }; + })))); + }); + } + exports2._stakerExposures = _stakerExposures; + function stakerExposures(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds, withActive = false) => api.derive.staking.erasHistoric(withActive).pipe((0, rxjs_1.switchMap)((eras) => api.derive.staking._stakerExposures(accountIds, eras, withActive)))); + } + exports2.stakerExposures = stakerExposures; + exports2.stakerExposure = (0, index_js_1.firstMemo)((api, accountId, withActive) => api.derive.staking.stakerExposures([accountId], withActive)); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/stakerPoints.js + var require_stakerPoints = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/stakerPoints.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stakerPoints = exports2._stakerPoints = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var util_js_1 = require_util17(); + function _stakerPoints(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId, eras, withActive) => { + const stakerId = api.registry.createType("AccountId", accountId).toString(); + return api.derive.staking._erasPoints(eras, withActive).pipe((0, rxjs_1.map)((points) => points.map(({ era, eraPoints, validators }) => ({ + era, + eraPoints, + points: validators[stakerId] || api.registry.createType("RewardPoint") + })))); + }); + } + exports2._stakerPoints = _stakerPoints; + exports2.stakerPoints = (0, util_js_1.erasHistoricApplyAccount)("_stakerPoints"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/stakerPrefs.js + var require_stakerPrefs = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/stakerPrefs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stakerPrefs = exports2._stakerPrefs = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var util_js_1 = require_util17(); + function _stakerPrefs(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId, eras, _withActive) => api.query.staking.erasValidatorPrefs.multi(eras.map((e) => [e, accountId])).pipe((0, rxjs_1.map)((all) => all.map((validatorPrefs, index) => ({ + era: eras[index], + validatorPrefs + }))))); + } + exports2._stakerPrefs = _stakerPrefs; + exports2.stakerPrefs = (0, util_js_1.erasHistoricApplyAccount)("_stakerPrefs"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/stakerRewards.js + var require_stakerRewards = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/stakerRewards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stakerRewardsMulti = exports2.stakerRewardsMultiEras = exports2.stakerRewards = exports2._stakerRewards = exports2._stakerRewardsEras = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + function extractCompatRewards(ledger) { + return ledger ? ledger.legacyClaimedRewards || ledger.claimedRewards : []; + } + function parseRewards(api, stashId, [erasPoints, erasPrefs, erasRewards], exposures) { + return exposures.map(({ era, isEmpty, isValidator, nominating, validators: eraValidators }) => { + const { eraPoints, validators: allValPoints } = erasPoints.find((p) => p.era.eq(era)) || { eraPoints: util_1.BN_ZERO, validators: {} }; + const { eraReward } = erasRewards.find((r10) => r10.era.eq(era)) || { eraReward: api.registry.createType("Balance") }; + const { validators: allValPrefs } = erasPrefs.find((p) => p.era.eq(era)) || { validators: {} }; + const validators = {}; + const stakerId = stashId.toString(); + Object.entries(eraValidators).forEach(([validatorId, exposure]) => { + const valPoints = allValPoints[validatorId] || util_1.BN_ZERO; + const valComm = allValPrefs[validatorId]?.commission.unwrap() || util_1.BN_ZERO; + const expTotal = exposure.total ? exposure.total?.unwrap() : exposure.pageTotal ? exposure.pageTotal?.unwrap() : util_1.BN_ZERO; + let avail = util_1.BN_ZERO; + let value; + if (!(expTotal.isZero() || valPoints.isZero() || eraPoints.isZero())) { + avail = eraReward.mul(valPoints).div(eraPoints); + const valCut = valComm.mul(avail).div(util_1.BN_BILLION); + let staked; + if (validatorId === stakerId) { + if (exposure.own) { + staked = exposure.own.unwrap(); + } else { + const expAccount = exposure.others.find(({ who }) => who.eq(validatorId)); + staked = expAccount ? expAccount.value.unwrap() : util_1.BN_ZERO; + } + } else { + const stakerExp = exposure.others.find(({ who }) => who.eq(stakerId)); + staked = stakerExp ? stakerExp.value.unwrap() : util_1.BN_ZERO; + } + value = avail.sub(valCut).imul(staked).div(expTotal).iadd(validatorId === stakerId ? valCut : util_1.BN_ZERO); + } + validators[validatorId] = { + total: api.registry.createType("Balance", avail), + value: api.registry.createType("Balance", value) + }; + }); + return { + era, + eraReward, + isEmpty, + isValidator, + nominating, + validators + }; + }); + } + function allUniqValidators(rewards) { + return rewards.reduce(([all, perStash], rewards2) => { + const uniq = []; + perStash.push(uniq); + rewards2.forEach(({ validators }) => Object.keys(validators).forEach((validatorId) => { + if (!uniq.includes(validatorId)) { + uniq.push(validatorId); + if (!all.includes(validatorId)) { + all.push(validatorId); + } + } + })); + return [all, perStash]; + }, [[], []]); + } + function removeClaimed(validators, queryValidators, reward) { + const rm2 = []; + Object.keys(reward.validators).forEach((validatorId) => { + const index = validators.indexOf(validatorId); + if (index !== -1) { + const valLedger = queryValidators[index].stakingLedger; + if (extractCompatRewards(valLedger).some((e) => reward.era.eq(e))) { + rm2.push(validatorId); + } + } + }); + rm2.forEach((validatorId) => { + delete reward.validators[validatorId]; + }); + } + function filterRewards(eras, valInfo, { rewards, stakingLedger }) { + const filter = eras.filter((e) => !extractCompatRewards(stakingLedger).some((s) => s.eq(e))); + const validators = valInfo.map(([v]) => v); + const queryValidators = valInfo.map(([, q]) => q); + return rewards.filter(({ isEmpty }) => !isEmpty).filter((reward) => { + if (!filter.some((e) => reward.era.eq(e))) { + return false; + } + removeClaimed(validators, queryValidators, reward); + return true; + }).filter(({ validators: validators2 }) => Object.keys(validators2).length !== 0).map((reward) => (0, util_1.objectSpread)({}, reward, { + nominators: reward.nominating.filter((n) => reward.validators[n.validatorId]) + })); + } + function _stakerRewardsEras(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (eras, withActive = false) => (0, rxjs_1.combineLatest)([ + api.derive.staking._erasPoints(eras, withActive), + api.derive.staking._erasPrefs(eras, withActive), + api.derive.staking._erasRewards(eras, withActive) + ])); + } + exports2._stakerRewardsEras = _stakerRewardsEras; + function _stakerRewards(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds, eras, withActive = false) => (0, rxjs_1.combineLatest)([ + api.derive.staking.queryMulti(accountIds, { withLedger: true }), + api.derive.staking._stakerExposures(accountIds, eras, withActive), + api.derive.staking._stakerRewardsEras(eras, withActive) + ]).pipe((0, rxjs_1.switchMap)(([queries, exposures, erasResult]) => { + const allRewards = queries.map(({ stakingLedger, stashId }, index) => !stashId || !stakingLedger ? [] : parseRewards(api, stashId, erasResult, exposures[index])); + if (withActive) { + return (0, rxjs_1.of)(allRewards); + } + const [allValidators, stashValidators] = allUniqValidators(allRewards); + return api.derive.staking.queryMulti(allValidators, { withLedger: true }).pipe((0, rxjs_1.map)((queriedVals) => queries.map(({ stakingLedger }, index) => filterRewards(eras, stashValidators[index].map((validatorId) => [ + validatorId, + queriedVals.find((q) => q.accountId.eq(validatorId)) + ]).filter((v) => !!v[1]), { + rewards: allRewards[index], + stakingLedger + })))); + }))); + } + exports2._stakerRewards = _stakerRewards; + exports2.stakerRewards = (0, index_js_1.firstMemo)((api, accountId, withActive) => api.derive.staking.erasHistoric(withActive).pipe((0, rxjs_1.switchMap)((eras) => api.derive.staking._stakerRewards([accountId], eras, withActive)))); + function stakerRewardsMultiEras(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds, eras) => accountIds.length && eras.length ? api.derive.staking._stakerRewards(accountIds, eras, false) : (0, rxjs_1.of)([])); + } + exports2.stakerRewardsMultiEras = stakerRewardsMultiEras; + function stakerRewardsMulti(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountIds, withActive = false) => api.derive.staking.erasHistoric(withActive).pipe((0, rxjs_1.switchMap)((eras) => api.derive.staking.stakerRewardsMultiEras(accountIds, eras)))); + } + exports2.stakerRewardsMulti = stakerRewardsMulti; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/stakerSlashes.js + var require_stakerSlashes = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/stakerSlashes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stakerSlashes = exports2._stakerSlashes = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var util_js_1 = require_util17(); + function _stakerSlashes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (accountId, eras, withActive) => { + const stakerId = api.registry.createType("AccountId", accountId).toString(); + return api.derive.staking._erasSlashes(eras, withActive).pipe((0, rxjs_1.map)((slashes) => slashes.map(({ era, nominators, validators }) => ({ + era, + total: nominators[stakerId] || validators[stakerId] || api.registry.createType("Balance") + })))); + }); + } + exports2._stakerSlashes = _stakerSlashes; + exports2.stakerSlashes = (0, util_js_1.erasHistoricApplyAccount)("_stakerSlashes"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/stashes.js + var require_stashes = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/stashes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stashes = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function onBondedEvent(api) { + let current = Date.now(); + return api.query.system.events().pipe((0, rxjs_1.map)((events) => { + current = events.filter(({ event, phase }) => { + try { + return phase.isApplyExtrinsic && event.section === "staking" && event.method === "Bonded"; + } catch { + return false; + } + }) ? Date.now() : current; + return current; + }), (0, rxjs_1.startWith)(current), (0, index_js_1.drr)({ skipTimeout: true })); + } + function stashes(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => onBondedEvent(api).pipe((0, rxjs_1.switchMap)(() => api.query.staking.validators.keys()), (0, rxjs_1.map)((keys) => keys.map(({ args: [v] }) => v).filter((a) => a)))); + } + exports2.stashes = stashes; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/validators.js + var require_validators = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/validators.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validators = exports2.nextElected = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function nextElected(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.staking.erasStakers ? api.derive.session.indexes().pipe( + (0, rxjs_1.switchMap)(({ currentEra }) => api.query.staking.erasStakers.keys(currentEra)), + (0, rxjs_1.map)((keys) => keys.map(({ args: [, accountId] }) => accountId)) + ) : api.query.staking["currentElected"]()); + } + exports2.nextElected = nextElected; + function validators(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => (0, rxjs_1.combineLatest)([ + api.query.session ? api.query.session.validators() : (0, rxjs_1.of)([]), + api.query.staking ? api.derive.staking.nextElected() : (0, rxjs_1.of)([]) + ]).pipe((0, rxjs_1.map)(([validators2, nextElected2]) => ({ + nextElected: nextElected2.length ? nextElected2 : validators2, + validators: validators2 + })))); + } + exports2.validators = validators; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/waitingInfo.js + var require_waitingInfo = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/waitingInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.waitingInfo = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + var DEFAULT_FLAGS = { withController: true, withPrefs: true }; + function waitingInfo(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (flags = DEFAULT_FLAGS) => (0, rxjs_1.combineLatest)([ + api.derive.staking.validators(), + api.derive.staking.stashes() + ]).pipe((0, rxjs_1.switchMap)(([{ nextElected }, stashes]) => { + const elected = nextElected.map((a) => a.toString()); + const waiting = stashes.filter((v) => !elected.includes(v.toString())); + return api.derive.staking.queryMulti(waiting, flags).pipe((0, rxjs_1.map)((info) => ({ + info, + waiting + }))); + }))); + } + exports2.waitingInfo = waitingInfo; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/staking/index.js + var require_staking = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/staking/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_account2(), exports2); + tslib_1.__exportStar(require_currentPoints(), exports2); + tslib_1.__exportStar(require_electedInfo(), exports2); + tslib_1.__exportStar(require_erasExposure(), exports2); + tslib_1.__exportStar(require_erasHistoric(), exports2); + tslib_1.__exportStar(require_erasPoints(), exports2); + tslib_1.__exportStar(require_erasPrefs(), exports2); + tslib_1.__exportStar(require_erasRewards(), exports2); + tslib_1.__exportStar(require_erasSlashes(), exports2); + tslib_1.__exportStar(require_keys2(), exports2); + tslib_1.__exportStar(require_overview2(), exports2); + tslib_1.__exportStar(require_ownExposure(), exports2); + tslib_1.__exportStar(require_ownSlashes(), exports2); + tslib_1.__exportStar(require_query(), exports2); + tslib_1.__exportStar(require_stakerExposure(), exports2); + tslib_1.__exportStar(require_stakerPoints(), exports2); + tslib_1.__exportStar(require_stakerPrefs(), exports2); + tslib_1.__exportStar(require_stakerRewards(), exports2); + tslib_1.__exportStar(require_stakerSlashes(), exports2); + tslib_1.__exportStar(require_stashes(), exports2); + tslib_1.__exportStar(require_validators(), exports2); + tslib_1.__exportStar(require_waitingInfo(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/technicalCommittee/index.js + var require_technicalCommittee = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/technicalCommittee/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prime = exports2.proposals = exports2.proposalHashes = exports2.proposalCount = exports2.proposal = exports2.hasProposals = exports2.members = void 0; + var index_js_1 = require_collective(); + exports2.members = (0, index_js_1.members)("technicalCommittee"); + exports2.hasProposals = (0, index_js_1.hasProposals)("technicalCommittee"); + exports2.proposal = (0, index_js_1.proposal)("technicalCommittee"); + exports2.proposalCount = (0, index_js_1.proposalCount)("technicalCommittee"); + exports2.proposalHashes = (0, index_js_1.proposalHashes)("technicalCommittee"); + exports2.proposals = (0, index_js_1.proposals)("technicalCommittee"); + exports2.prime = (0, index_js_1.prime)("technicalCommittee"); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/treasury/proposals.js + var require_proposals3 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/treasury/proposals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proposals = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function parseResult(api, { allIds, allProposals, approvalIds, councilProposals, proposalCount }) { + const approvals = []; + const proposals2 = []; + const councilTreasury = councilProposals.filter(({ proposal }) => proposal && (api.tx.treasury.approveProposal.is(proposal) || api.tx.treasury.rejectProposal.is(proposal))); + allIds.forEach((id4, index) => { + if (allProposals[index].isSome) { + const council = councilTreasury.filter(({ proposal }) => proposal && id4.eq(proposal.args[0])).sort((a, b) => a.proposal && b.proposal ? a.proposal.method.localeCompare(b.proposal.method) : a.proposal ? -1 : 1); + const isApproval = approvalIds.some((approvalId) => approvalId.eq(id4)); + const derived = { council, id: id4, proposal: allProposals[index].unwrap() }; + if (isApproval) { + approvals.push(derived); + } else { + proposals2.push(derived); + } + } + }); + return { approvals, proposalCount, proposals: proposals2 }; + } + function retrieveProposals(api, proposalCount, approvalIds) { + const proposalIds = []; + const count = proposalCount.toNumber(); + for (let index = 0; index < count; index++) { + if (!approvalIds.some((id4) => id4.eqn(index))) { + proposalIds.push(api.registry.createType("ProposalIndex", index)); + } + } + const allIds = [...proposalIds, ...approvalIds]; + return (0, rxjs_1.combineLatest)([ + api.query.treasury.proposals.multi(allIds), + api.derive.council ? api.derive.council.proposals() : (0, rxjs_1.of)([]) + ]).pipe((0, rxjs_1.map)(([allProposals, councilProposals]) => parseResult(api, { allIds, allProposals, approvalIds, councilProposals, proposalCount }))); + } + function proposals(instanceId, api) { + return (0, index_js_1.memo)(instanceId, () => api.query.treasury ? (0, rxjs_1.combineLatest)([ + api.query.treasury.proposalCount(), + api.query.treasury.approvals() + ]).pipe((0, rxjs_1.switchMap)(([proposalCount, approvalIds]) => retrieveProposals(api, proposalCount, approvalIds))) : (0, rxjs_1.of)({ + approvals: [], + proposalCount: api.registry.createType("ProposalIndex"), + proposals: [] + })); + } + exports2.proposals = proposals; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/treasury/index.js + var require_treasury = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/treasury/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_proposals3(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/tx/events.js + var require_events2 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/tx/events.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.events = void 0; + var rxjs_1 = require_cjs7(); + var index_js_1 = require_util10(); + function events(instanceId, api) { + return (0, index_js_1.memo)(instanceId, (blockHash) => (0, rxjs_1.combineLatest)([ + api.rpc.chain.getBlock(blockHash), + api.queryAt(blockHash).pipe((0, rxjs_1.switchMap)((queryAt) => queryAt.system.events())) + ]).pipe((0, rxjs_1.map)(([block, events2]) => ({ block, events: events2 })))); + } + exports2.events = events; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/tx/constants.js + var require_constants4 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/tx/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MORTAL_PERIOD = exports2.MAX_FINALITY_LAG = exports2.FALLBACK_PERIOD = exports2.FALLBACK_MAX_HASH_COUNT = void 0; + var util_1 = require_cjs3(); + exports2.FALLBACK_MAX_HASH_COUNT = 250; + exports2.FALLBACK_PERIOD = new util_1.BN(6 * 1e3); + exports2.MAX_FINALITY_LAG = new util_1.BN(5); + exports2.MORTAL_PERIOD = new util_1.BN(5 * 60 * 1e3); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/tx/signingInfo.js + var require_signingInfo = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/tx/signingInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.signingInfo = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util10(); + var constants_js_1 = require_constants4(); + function latestNonce(api, address) { + return api.derive.balances.account(address).pipe((0, rxjs_1.map)(({ accountNonce }) => accountNonce)); + } + function nextNonce(api, address) { + return api.rpc.system?.accountNextIndex ? api.rpc.system.accountNextIndex(address) : latestNonce(api, address); + } + function signingHeader(api) { + return (0, rxjs_1.combineLatest)([ + api.rpc.chain.getHeader().pipe((0, rxjs_1.switchMap)((header) => header.parentHash.isEmpty ? (0, rxjs_1.of)(header) : api.rpc.chain.getHeader(header.parentHash).pipe((0, rxjs_1.catchError)(() => (0, rxjs_1.of)(header))))), + api.rpc.chain.getFinalizedHead().pipe((0, rxjs_1.switchMap)((hash8) => api.rpc.chain.getHeader(hash8).pipe((0, rxjs_1.catchError)(() => (0, rxjs_1.of)(null))))) + ]).pipe((0, rxjs_1.map)(([current, finalized]) => !finalized || (0, index_js_1.unwrapBlockNumber)(current).sub((0, index_js_1.unwrapBlockNumber)(finalized)).gt(constants_js_1.MAX_FINALITY_LAG) ? current : finalized)); + } + function babeOrAuraPeriod(api) { + const period = api.consts.babe?.expectedBlockTime || api.consts["aura"]?.slotDuration || api.consts.timestamp?.minimumPeriod.muln(2); + return !period.isZero() ? period : void 0; + } + function signingInfo(_instanceId, api) { + return (address, nonce, era) => (0, rxjs_1.combineLatest)([ + (0, util_1.isUndefined)(nonce) ? latestNonce(api, address) : nonce === -1 ? nextNonce(api, address) : (0, rxjs_1.of)(api.registry.createType("Index", nonce)), + (0, util_1.isUndefined)(era) || (0, util_1.isNumber)(era) && era > 0 ? signingHeader(api) : (0, rxjs_1.of)(null) + ]).pipe((0, rxjs_1.map)(([nonce2, header]) => ({ + header, + mortalLength: Math.min(api.consts.system?.blockHashCount?.toNumber() || constants_js_1.FALLBACK_MAX_HASH_COUNT, constants_js_1.MORTAL_PERIOD.div(babeOrAuraPeriod(api) || constants_js_1.FALLBACK_PERIOD).iadd(constants_js_1.MAX_FINALITY_LAG).toNumber()), + nonce: nonce2 + }))); + } + exports2.signingInfo = signingInfo; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/tx/index.js + var require_tx = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/tx/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_events2(), exports2); + tslib_1.__exportStar(require_signingInfo(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/derive.js + var require_derive3 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/derive.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.derive = void 0; + var tslib_1 = require_tslib(); + var accounts2 = tslib_1.__importStar(require_accounts()); + var alliance = tslib_1.__importStar(require_alliance()); + var bagsList = tslib_1.__importStar(require_bagsList()); + var balances = tslib_1.__importStar(require_balances()); + var bounties = tslib_1.__importStar(require_bounties2()); + var chain4 = tslib_1.__importStar(require_chain()); + var contracts2 = tslib_1.__importStar(require_contracts()); + var council = tslib_1.__importStar(require_council()); + var crowdloan = tslib_1.__importStar(require_crowdloan()); + var democracy = tslib_1.__importStar(require_democracy()); + var elections = tslib_1.__importStar(require_elections()); + var imOnline = tslib_1.__importStar(require_imOnline()); + var membership = tslib_1.__importStar(require_membership()); + var parachains = tslib_1.__importStar(require_parachains()); + var session = tslib_1.__importStar(require_session()); + var society = tslib_1.__importStar(require_society()); + var staking = tslib_1.__importStar(require_staking()); + var technicalCommittee = tslib_1.__importStar(require_technicalCommittee()); + var treasury = tslib_1.__importStar(require_treasury()); + var tx2 = tslib_1.__importStar(require_tx()); + exports2.derive = { accounts: accounts2, alliance, bagsList, balances, bounties, chain: chain4, contracts: contracts2, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx: tx2 }; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/bundle.js + var require_bundle8 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAvailableDerives = exports2.lazyDeriveSection = void 0; + var tslib_1 = require_tslib(); + var index_js_1 = require_util10(); + Object.defineProperty(exports2, "lazyDeriveSection", { enumerable: true, get: function() { + return index_js_1.lazyDeriveSection; + } }); + var derive_js_1 = require_derive3(); + tslib_1.__exportStar(require_derive3(), exports2); + tslib_1.__exportStar(require_type2(), exports2); + var checks = { + allianceMotion: { + instances: ["allianceMotion"], + methods: [] + }, + bagsList: { + instances: ["voterBagsList", "voterList", "bagsList"], + methods: [], + withDetect: true + }, + contracts: { + instances: ["contracts"], + methods: [] + }, + council: { + instances: ["council"], + methods: [], + withDetect: true + }, + crowdloan: { + instances: ["crowdloan"], + methods: [] + }, + democracy: { + instances: ["democracy"], + methods: [] + }, + elections: { + instances: ["phragmenElection", "electionsPhragmen", "elections", "council"], + methods: [], + withDetect: true + }, + imOnline: { + instances: ["imOnline"], + methods: [] + }, + membership: { + instances: ["membership"], + methods: [] + }, + parachains: { + instances: ["parachains", "registrar"], + methods: [] + }, + session: { + instances: ["session"], + methods: [] + }, + society: { + instances: ["society"], + methods: [] + }, + staking: { + instances: ["staking"], + methods: ["erasRewardPoints"] + }, + technicalCommittee: { + instances: ["technicalCommittee"], + methods: [], + withDetect: true + }, + treasury: { + instances: ["treasury"], + methods: [] + } + }; + function getModuleInstances(api, specName, moduleName) { + return api.registry.getModuleInstances(specName, moduleName) || []; + } + function injectFunctions(instanceId, api, derives) { + const result = {}; + const names2 = Object.keys(derives); + const keys = Object.keys(api.query); + const specName = api.runtimeVersion.specName; + const filterKeys = (q) => keys.includes(q); + const filterInstances = (q) => getModuleInstances(api, specName, q).some(filterKeys); + const filterMethods = (all) => (m) => all.some((q) => keys.includes(q) && api.query[q][m]); + const getKeys2 = (s) => Object.keys(derives[s]); + const creator = (s, m) => derives[s][m](instanceId, api); + const isIncluded = (c) => !checks[c] || (checks[c].instances.some(filterKeys) && (!checks[c].methods.length || checks[c].methods.every(filterMethods(checks[c].instances))) || checks[c].withDetect && checks[c].instances.some(filterInstances)); + for (let i = 0, count = names2.length; i < count; i++) { + const name6 = names2[i]; + isIncluded(name6) && (0, index_js_1.lazyDeriveSection)(result, name6, getKeys2, creator); + } + return result; + } + function getAvailableDerives(instanceId, api, custom = {}) { + return { + ...injectFunctions(instanceId, api, derive_js_1.derive), + ...injectFunctions(instanceId, api, custom) + }; + } + exports2.getAvailableDerives = getAvailableDerives; + } + }); + + // ../../node_modules/@polkadot/api-derive/cjs/index.js + var require_cjs12 = __commonJS({ + "../../node_modules/@polkadot/api-derive/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect(); + tslib_1.__exportStar(require_bundle8(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/packageInfo.js + var require_packageInfo18 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/types-known", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/packageDetect.js + var require_packageDetect6 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo14(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo18(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_1.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/chain/index.js + var require_chain2 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/chain/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typesChain = void 0; + exports2.typesChain = {}; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/centrifuge-chain.js + var require_centrifuge_chain = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/centrifuge-chain.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var sharedTypes9 = { + AnchorData: { + anchoredBlock: "u64", + docRoot: "H256", + id: "H256" + }, + DispatchErrorModule: "DispatchErrorModuleU8", + PreCommitData: { + expirationBlock: "u64", + identity: "H256", + signingRoot: "H256" + }, + Fee: { + key: "Hash", + price: "Balance" + }, + MultiAccountData: { + deposit: "Balance", + depositor: "AccountId", + signatories: "Vec", + threshold: "u16" + }, + ChainId: "u8", + DepositNonce: "u64", + ResourceId: "[u8; 32]", + "chainbridge::ChainId": "u8", + RegistryId: "H160", + TokenId: "U256", + AssetId: { + registryId: "RegistryId", + tokenId: "TokenId" + }, + AssetInfo: { + metadata: "Bytes" + }, + MintInfo: { + anchorId: "Hash", + proofs: "Vec", + staticHashes: "[Hash; 3]" + }, + Proof: { + leafHash: "H256", + sortedHashes: "H256" + }, + ProofMint: { + hashes: "Vec", + property: "Bytes", + salt: "[u8; 32]", + value: "Bytes" + }, + RegistryInfo: { + fields: "Vec", + ownerCanBurn: "bool" + }, + ProxyType: { + _enum: [ + "Any", + "NonTransfer", + "Governance", + "Staking", + "NonProxy" + ] + } + }; + var standaloneTypes2 = { + ...sharedTypes9, + AccountInfo: "AccountInfoWithRefCount", + Address: "LookupSource", + LookupSource: "IndicesLookupSource", + Multiplier: "Fixed64", + RefCount: "RefCountTo259" + }; + exports2.versioned = [ + { + minmax: [240, 243], + types: { + ...standaloneTypes2, + ProxyType: { + _enum: [ + "Any", + "NonTransfer", + "Governance", + "Staking", + "Vesting" + ] + } + } + }, + { + minmax: [244, 999], + types: { ...standaloneTypes2 } + }, + { + minmax: [1e3, void 0], + types: { ...sharedTypes9 } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/kusama.js + var require_kusama = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/kusama.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var types_create_1 = require_cjs9(); + var sharedTypes9 = { + CompactAssignments: "CompactAssignmentsWith24", + DispatchErrorModule: "DispatchErrorModuleU8", + RawSolution: "RawSolutionWith24", + Keys: "SessionKeys6", + ProxyType: { + _enum: ["Any", "NonTransfer", "Governance", "Staking", "IdentityJudgement", "CancelProxy", "Auction"] + }, + Weight: "WeightV1" + }; + var addrIndicesTypes2 = { + AccountInfo: "AccountInfoWithRefCount", + Address: "LookupSource", + CompactAssignments: "CompactAssignmentsWith16", + DispatchErrorModule: "DispatchErrorModuleU8", + RawSolution: "RawSolutionWith16", + Keys: "SessionKeys5", + LookupSource: "IndicesLookupSource", + ValidatorPrefs: "ValidatorPrefsWithCommission" + }; + var addrAccountIdTypes4 = { + AccountInfo: "AccountInfoWithRefCount", + Address: "AccountId", + CompactAssignments: "CompactAssignmentsWith16", + DispatchErrorModule: "DispatchErrorModuleU8", + RawSolution: "RawSolutionWith16", + Keys: "SessionKeys5", + LookupSource: "AccountId", + ValidatorPrefs: "ValidatorPrefsWithCommission" + }; + exports2.versioned = [ + { + minmax: [1019, 1031], + types: { + ...addrIndicesTypes2, + BalanceLock: "BalanceLockTo212", + CompactAssignments: "CompactAssignmentsTo257", + DispatchError: "DispatchErrorTo198", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + IdentityInfo: "IdentityInfoTo198", + Keys: "SessionKeys5", + Multiplier: "Fixed64", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + ReferendumInfo: "ReferendumInfoTo239", + Scheduled: "ScheduledTo254", + SlashingSpans: "SlashingSpansTo204", + StakingLedger: "StakingLedgerTo223", + Votes: "VotesTo230", + Weight: "u32" + } + }, + { + minmax: [1032, 1042], + types: { + ...addrIndicesTypes2, + BalanceLock: "BalanceLockTo212", + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + Keys: "SessionKeys5", + Multiplier: "Fixed64", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + ReferendumInfo: "ReferendumInfoTo239", + Scheduled: "ScheduledTo254", + SlashingSpans: "SlashingSpansTo204", + StakingLedger: "StakingLedgerTo223", + Votes: "VotesTo230", + Weight: "u32" + } + }, + { + minmax: [1043, 1045], + types: { + ...addrIndicesTypes2, + BalanceLock: "BalanceLockTo212", + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + Keys: "SessionKeys5", + Multiplier: "Fixed64", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + ReferendumInfo: "ReferendumInfoTo239", + Scheduled: "ScheduledTo254", + StakingLedger: "StakingLedgerTo223", + Votes: "VotesTo230", + Weight: "u32" + } + }, + { + minmax: [1046, 1049], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + Multiplier: "Fixed64", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + ReferendumInfo: "ReferendumInfoTo239", + Scheduled: "ScheduledTo254", + StakingLedger: "StakingLedgerTo223", + Weight: "u32" + } + }, + { + minmax: [1050, 1054], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + Multiplier: "Fixed64", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + ReferendumInfo: "ReferendumInfoTo239", + Scheduled: "ScheduledTo254", + StakingLedger: "StakingLedgerTo240", + Weight: "u32" + } + }, + { + minmax: [1055, 1056], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + Multiplier: "Fixed64", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + Scheduled: "ScheduledTo254", + StakingLedger: "StakingLedgerTo240", + Weight: "u32" + } + }, + { + minmax: [1057, 1061], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + Scheduled: "ScheduledTo254" + } + }, + { + minmax: [1062, 2012], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259" + } + }, + { + minmax: [2013, 2022], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + RefCount: "RefCountTo259" + } + }, + { + minmax: [2023, 2024], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + RefCount: "RefCountTo259" + } + }, + { + minmax: [2025, 2027], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4 + } + }, + { + minmax: [2028, 2029], + types: { + ...sharedTypes9, + AccountInfo: "AccountInfoWithDualRefCount", + CompactAssignments: "CompactAssignmentsWith16", + RawSolution: "RawSolutionWith16" + } + }, + { + minmax: [2030, 9e3], + types: { + ...sharedTypes9, + CompactAssignments: "CompactAssignmentsWith16", + RawSolution: "RawSolutionWith16" + } + }, + { + minmax: [9010, 9099], + types: { + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V0") + } + }, + { + minmax: [9100, 9105], + types: { + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V1") + } + }, + { + minmax: [9106, void 0], + types: { + Weight: "WeightV1" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/node.js + var require_node = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/node.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + exports2.versioned = [ + { + minmax: [0, void 0], + types: { + Weight: "WeightV2" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/node-template.js + var require_node_template = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/node-template.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + exports2.versioned = [ + { + minmax: [0, void 0], + types: { + Weight: "WeightV2" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/polkadot.js + var require_polkadot2 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/polkadot.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var sharedTypes9 = { + CompactAssignments: "CompactAssignmentsWith16", + DispatchErrorModule: "DispatchErrorModuleU8", + RawSolution: "RawSolutionWith16", + Keys: "SessionKeys6", + ProxyType: { + _enum: { + Any: 0, + NonTransfer: 1, + Governance: 2, + Staking: 3, + UnusedSudoBalances: 4, + IdentityJudgement: 5, + CancelProxy: 6, + Auction: 7 + } + }, + Weight: "WeightV1" + }; + var addrAccountIdTypes4 = { + AccountInfo: "AccountInfoWithRefCount", + Address: "AccountId", + DispatchErrorModule: "DispatchErrorModuleU8", + Keys: "SessionKeys5", + LookupSource: "AccountId", + ValidatorPrefs: "ValidatorPrefsWithCommission" + }; + exports2.versioned = [ + { + minmax: [0, 12], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259" + } + }, + { + minmax: [13, 22], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + RefCount: "RefCountTo259" + } + }, + { + minmax: [23, 24], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + RefCount: "RefCountTo259" + } + }, + { + minmax: [25, 27], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4 + } + }, + { + minmax: [28, 29], + types: { + ...sharedTypes9, + AccountInfo: "AccountInfoWithDualRefCount" + } + }, + { + minmax: [30, 9109], + types: { + ...sharedTypes9 + } + }, + { + minmax: [9110, void 0], + types: { + Weight: "WeightV1" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/rococo.js + var require_rococo = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/rococo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var types_create_1 = require_cjs9(); + var sharedTypes9 = { + DispatchErrorModule: "DispatchErrorModuleU8", + FullIdentification: "()", + Keys: "SessionKeys7B", + Weight: "WeightV1" + }; + exports2.versioned = [ + { + minmax: [0, 200], + types: { + ...sharedTypes9, + AccountInfo: "AccountInfoWithDualRefCount", + Address: "AccountId", + LookupSource: "AccountId" + } + }, + { + minmax: [201, 214], + types: { + ...sharedTypes9, + AccountInfo: "AccountInfoWithDualRefCount" + } + }, + { + minmax: [215, 228], + types: { + ...sharedTypes9, + Keys: "SessionKeys6" + } + }, + { + minmax: [229, 9099], + types: { + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V0") + } + }, + { + minmax: [9100, 9105], + types: { + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V1") + } + }, + { + minmax: [9106, void 0], + types: { + Weight: "WeightV1" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/shell.js + var require_shell2 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/shell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + exports2.versioned = [ + { + minmax: [0, void 0], + types: {} + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/statemine.js + var require_statemine = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/statemine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var types_create_1 = require_cjs9(); + var sharedTypes9 = { + DispatchErrorModule: "DispatchErrorModuleU8", + TAssetBalance: "u128", + ProxyType: { + _enum: [ + "Any", + "NonTransfer", + "CancelProxy", + "Assets", + "AssetOwner", + "AssetManager", + "Staking" + ] + }, + Weight: "WeightV1" + }; + exports2.versioned = [ + { + minmax: [0, 3], + types: { + DispatchError: "DispatchErrorPre6First", + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V0") + } + }, + { + minmax: [4, 5], + types: { + DispatchError: "DispatchErrorPre6First", + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V1") + } + }, + { + minmax: [500, 9999], + types: { + Weight: "WeightV1", + TAssetConversion: "Option" + } + }, + { + minmax: [1e4, void 0], + types: { + Weight: "WeightV1" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/statemint.js + var require_statemint2 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/statemint.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var types_create_1 = require_cjs9(); + var sharedTypes9 = { + DispatchErrorModule: "DispatchErrorModuleU8", + TAssetBalance: "u128", + ProxyType: { + _enum: [ + "Any", + "NonTransfer", + "CancelProxy", + "Assets", + "AssetOwner", + "AssetManager", + "Staking" + ] + }, + Weight: "WeightV1" + }; + exports2.versioned = [ + { + minmax: [0, 3], + types: { + DispatchError: "DispatchErrorPre6First", + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V0") + } + }, + { + minmax: [4, 5], + types: { + DispatchError: "DispatchErrorPre6First", + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V1") + } + }, + { + minmax: [500, void 0], + types: { + Weight: "WeightV1", + TAssetConversion: "Option" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/westend.js + var require_westend = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/westend.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var types_create_1 = require_cjs9(); + var sharedTypes9 = { + CompactAssignments: "CompactAssignmentsWith16", + DispatchErrorModule: "DispatchErrorModuleU8", + RawSolution: "RawSolutionWith16", + Keys: "SessionKeys6", + ProxyType: { + _enum: ["Any", "NonTransfer", "Staking", "SudoBalances", "IdentityJudgement", "CancelProxy"] + }, + Weight: "WeightV1" + }; + var addrAccountIdTypes4 = { + AccountInfo: "AccountInfoWithRefCount", + Address: "AccountId", + CompactAssignments: "CompactAssignmentsWith16", + DispatchErrorModule: "DispatchErrorModuleU8", + LookupSource: "AccountId", + Keys: "SessionKeys5", + RawSolution: "RawSolutionWith16", + ValidatorPrefs: "ValidatorPrefsWithCommission" + }; + exports2.versioned = [ + { + minmax: [1, 2], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + Multiplier: "Fixed64", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259", + Weight: "u32" + } + }, + { + minmax: [3, 22], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + OpenTip: "OpenTipTo225", + RefCount: "RefCountTo259" + } + }, + { + minmax: [23, 42], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + CompactAssignments: "CompactAssignmentsTo257", + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + RefCount: "RefCountTo259" + } + }, + { + minmax: [43, 44], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4, + DispatchInfo: "DispatchInfoTo244", + Heartbeat: "HeartbeatTo244", + RefCount: "RefCountTo259" + } + }, + { + minmax: [45, 47], + types: { + ...sharedTypes9, + ...addrAccountIdTypes4 + } + }, + { + minmax: [48, 49], + types: { + ...sharedTypes9, + AccountInfo: "AccountInfoWithDualRefCount" + } + }, + { + minmax: [50, 9099], + types: { + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V0") + } + }, + { + minmax: [9100, 9105], + types: { + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V1") + } + }, + { + minmax: [9106, void 0], + types: { + Weight: "WeightV1" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/westmint.js + var require_westmint = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/westmint.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.versioned = void 0; + var types_create_1 = require_cjs9(); + var sharedTypes9 = { + DispatchErrorModule: "DispatchErrorModuleU8", + TAssetBalance: "u128", + ProxyType: { + _enum: [ + "Any", + "NonTransfer", + "CancelProxy", + "Assets", + "AssetOwner", + "AssetManager", + "Staking" + ] + }, + Weight: "WeightV1" + }; + exports2.versioned = [ + { + minmax: [0, 3], + types: { + DispatchError: "DispatchErrorPre6First", + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V0") + } + }, + { + minmax: [4, 5], + types: { + DispatchError: "DispatchErrorPre6First", + ...sharedTypes9, + ...(0, types_create_1.mapXcmTypes)("V1") + } + }, + { + minmax: [500, 9434], + types: { + Weight: "WeightV1", + TAssetConversion: "Option" + } + }, + { + minmax: [9435, void 0], + types: { + Weight: "WeightV1" + } + } + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/spec/index.js + var require_spec = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/spec/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typesSpec = void 0; + var centrifuge_chain_js_1 = require_centrifuge_chain(); + var kusama_js_1 = require_kusama(); + var node_js_1 = require_node(); + var node_template_js_1 = require_node_template(); + var polkadot_js_1 = require_polkadot2(); + var rococo_js_1 = require_rococo(); + var shell_js_1 = require_shell2(); + var statemine_js_1 = require_statemine(); + var statemint_js_1 = require_statemint2(); + var westend_js_1 = require_westend(); + var westmint_js_1 = require_westmint(); + exports2.typesSpec = { + "centrifuge-chain": centrifuge_chain_js_1.versioned, + kusama: kusama_js_1.versioned, + node: node_js_1.versioned, + "node-template": node_template_js_1.versioned, + polkadot: polkadot_js_1.versioned, + rococo: rococo_js_1.versioned, + shell: shell_js_1.versioned, + statemine: statemine_js_1.versioned, + statemint: statemint_js_1.versioned, + westend: westend_js_1.versioned, + westmint: westmint_js_1.versioned + }; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/kusama.js + var require_kusama2 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/kusama.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.upgrades = void 0; + exports2.upgrades = [ + [ + 0, + 1020, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 26669, + 1021, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 38245, + 1022, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 54248, + 1023, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 59659, + 1024, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 67651, + 1025, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 82191, + 1027, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 83238, + 1028, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 101503, + 1029, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 203466, + 1030, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 295787, + 1031, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 461692, + 1032, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 504329, + 1033, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 569327, + 1038, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 1 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 587687, + 1039, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 653183, + 1040, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 693488, + 1042, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 901442, + 1045, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1375086, + 1050, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1445458, + 1051, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1472960, + 1052, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1475648, + 1053, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1491596, + 1054, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1574408, + 1055, + [ + [ + "0xdf6acb689907609b", + 2 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 1 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2064961, + 1058, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2201991, + 1062, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2671528, + 2005, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2704202, + 2007, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2728002, + 2008, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2832534, + 2011, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2962294, + 2012, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 324e4, + 2013, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3274408, + 2015, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3323565, + 2019, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3534175, + 2022, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3860281, + 2023, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 4143129, + 2024, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 4401242, + 2025, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 4841367, + 2026, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5961600, + 2027, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6137912, + 2028, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6561855, + 2029, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7100891, + 2030, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7468792, + 9010, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7668600, + 9030, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7812476, + 9040, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 8010981, + 9050, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 8073833, + 9070, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 8555825, + 9080, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 8945245, + 9090, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9611377, + 9100, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9625129, + 9111, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9866422, + 9122, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10403784, + 9130, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10960765, + 9150, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11006614, + 9151, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11404482, + 9160, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11601803, + 9170, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 12008022, + 9180, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 12405451, + 9190, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 12665416, + 9200, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 12909508, + 9220, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 13109752, + 9230, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 13555777, + 9250, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 13727747, + 9260, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 14248044, + 9271, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 14433840, + 9280, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 14645900, + 9291, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 15048375, + 9300, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 15426015, + 9320, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 15680713, + 9340, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 15756296, + 9350, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 15912007, + 9360, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 16356547, + 9370, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 17335450, + 9381, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 3 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 18062739, + 9420, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 18625e3, + 9430, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 20465806, + 1e6, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 5 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 2157e4, + 1001e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 7 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 21786291, + 1001002, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 7 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 22515962, + 1001003, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 7 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ] + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/polkadot.js + var require_polkadot3 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/polkadot.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.upgrades = void 0; + exports2.upgrades = [ + [ + 0, + 0, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 29231, + 1, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 188836, + 5, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 199405, + 6, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 214264, + 7, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 244358, + 8, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 303079, + 9, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 314201, + 10, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 342400, + 11, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 443963, + 12, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 528470, + 13, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 687751, + 14, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 746085, + 15, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 787923, + 16, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 799302, + 17, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1205128, + 18, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1603423, + 23, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1733218, + 24, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2005673, + 25, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2436698, + 26, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3613564, + 27, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3899547, + 28, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 4345767, + 29, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 4876134, + 30, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5661442, + 9050, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6321619, + 9080, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6713249, + 9090, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7217907, + 9100, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7229126, + 9110, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7560558, + 9122, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 8115869, + 9140, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 8638103, + 9151, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9280179, + 9170, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9738717, + 9180, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10156856, + 9190, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10458576, + 9200, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10655116, + 9220, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10879371, + 9230, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11328884, + 9250, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11532856, + 9260, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11933818, + 9270, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 12217535, + 9280, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ] + ] + ], + [ + 12245277, + 9281, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ] + ] + ], + [ + 12532644, + 9291, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ] + ] + ], + [ + 12876189, + 9300, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ] + ] + ], + [ + 13800015, + 9340, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ] + ] + ], + [ + 14188833, + 9360, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ] + ] + ], + [ + 14543918, + 9370, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ] + ] + ], + [ + 15978362, + 9420, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ] + ] + ], + [ + 1645e4, + 9430, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ] + ] + ], + [ + 1784e4, + 9431, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ] + ] + ], + [ + 18407475, + 1000001, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 5 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ] + ] + ], + [ + 19551e3, + 1001002, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 5 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ] + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/westend.js + var require_westend2 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/westend.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.upgrades = void 0; + exports2.upgrades = [ + [ + 214356, + 4, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 1 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 392764, + 7, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 409740, + 8, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 809976, + 20, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 877581, + 24, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 879238, + 25, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 889472, + 26, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 902937, + 27, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 932751, + 28, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 991142, + 29, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1030162, + 31, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1119657, + 32, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1199282, + 33, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1342534, + 34, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1392263, + 35, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1431703, + 36, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1433369, + 37, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 1490972, + 41, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2087397, + 43, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2316688, + 44, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 2549864, + 45, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3925782, + 46, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 3925843, + 47, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 4207800, + 48, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 4627944, + 49, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5124076, + 50, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5478664, + 900, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5482450, + 9e3, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 4 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5584305, + 9010, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5784566, + 9030, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5879822, + 9031, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5896856, + 9032, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 5897316, + 9033, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6117927, + 9050, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6210274, + 9070, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 2 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6379314, + 9080, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 2 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 6979141, + 9090, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7568453, + 9100, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7766394, + 9111, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7911691, + 9120, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7968866, + 9121, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 7982889, + 9122, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 8514322, + 9130, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9091726, + 9140, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9091774, + 9150, + [ + [ + "0xdf6acb689907609b", + 3 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 1 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9406726, + 9160, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 9921066, + 9170, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10007115, + 9180, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 5 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10480973, + 9190, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10578091, + 9200, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10678509, + 9210, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 10811001, + 9220, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11096116, + 9230, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11409279, + 9250, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11584820, + 9251, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11716837, + 9260, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11876919, + 9261, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ] + ] + ], + [ + 11987927, + 9270, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 12077324, + 9271, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 12301871, + 9280, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 12604343, + 9290, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 2 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 12841034, + 9300, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 13128237, + 9310, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 1 + ], + [ + "0xf3ff14d5ab527059", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 13272363, + 9320, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 13483497, + 9330, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 13649433, + 9340, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 13761100, + 9350, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 13847400, + 9360, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 14249200, + 9370, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 2 + ], + [ + "0xf3ff14d5ab527059", + 2 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 14576855, + 9380, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 3 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 3 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ] + ] + ], + [ + 14849830, + 9390, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 1 + ], + [ + "0x91d5df18b0d2cf58", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 3 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 15146832, + 9400, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 3 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 15332317, + 9401, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 1 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 3 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 15661793, + 9420, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 16165469, + 9430, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 4 + ], + [ + "0x49eaaf1b548a0cb0", + 2 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ] + ] + ], + [ + 18293984, + 102e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 7 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 18293991, + 103e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 8 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 18451783, + 104e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 9 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 18679741, + 1005e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 9 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 19166695, + 1006e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 10 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 19234157, + 1006001, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 10 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 19542944, + 1007e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 10 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 19621258, + 1007001, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 10 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 19761406, + 1008e3, + [ + [ + "0xdf6acb689907609b", + 4 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 10 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 20056997, + 1009e3, + [ + [ + "0xdf6acb689907609b", + 5 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 10 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ], + [ + 20368318, + 101e4, + [ + [ + "0xdf6acb689907609b", + 5 + ], + [ + "0x37e397fc7c91f5e4", + 2 + ], + [ + "0x40fe3ad401f8959a", + 6 + ], + [ + "0xd2bc9897eed08f15", + 3 + ], + [ + "0xf78b278be53f454c", + 2 + ], + [ + "0xaf2c0297a23e6d3d", + 10 + ], + [ + "0x49eaaf1b548a0cb0", + 3 + ], + [ + "0x91d5df18b0d2cf58", + 2 + ], + [ + "0x2a5e924655399e60", + 1 + ], + [ + "0xed99c5acb25eedf5", + 3 + ], + [ + "0xcbca25e39f142387", + 2 + ], + [ + "0x687ad44ad37f03c2", + 1 + ], + [ + "0xab3c0572291feb8b", + 1 + ], + [ + "0xbc9d89904f5b923f", + 1 + ], + [ + "0x37c8bb1350a9a2a8", + 4 + ], + [ + "0xf3ff14d5ab527059", + 3 + ], + [ + "0x6ff52ee858e6c5bd", + 1 + ], + [ + "0x17a6bc0d0062aeb3", + 1 + ], + [ + "0x18ef58a3b67ba770", + 1 + ], + [ + "0xfbc577b9d747efd6", + 1 + ] + ] + ] + ]; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/index.js + var require_e2e = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/upgrades/e2e/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.westend = exports2.polkadot = exports2.kusama = void 0; + var kusama_js_1 = require_kusama2(); + Object.defineProperty(exports2, "kusama", { enumerable: true, get: function() { + return kusama_js_1.upgrades; + } }); + var polkadot_js_1 = require_polkadot3(); + Object.defineProperty(exports2, "polkadot", { enumerable: true, get: function() { + return polkadot_js_1.upgrades; + } }); + var westend_js_1 = require_westend2(); + Object.defineProperty(exports2, "westend", { enumerable: true, get: function() { + return westend_js_1.upgrades; + } }); + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/upgrades/index.js + var require_upgrades = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/upgrades/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.upgrades = void 0; + var tslib_1 = require_tslib(); + var networks_1 = require_cjs5(); + var util_1 = require_cjs3(); + var allKnown = tslib_1.__importStar(require_e2e()); + var NET_EXTRA = { + westend: { + genesisHash: ["0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"] + } + }; + function mapRaw([network3, versions]) { + const chain4 = networks_1.selectableNetworks.find((n) => n.network === network3) || NET_EXTRA[network3]; + if (!chain4) { + throw new Error(`Unable to find info for chain ${network3}`); + } + return { + genesisHash: (0, util_1.hexToU8a)(chain4.genesisHash[0]), + network: network3, + versions: versions.map(([blockNumber, specVersion, apis]) => ({ + apis, + blockNumber: new util_1.BN(blockNumber), + specVersion: new util_1.BN(specVersion) + })) + }; + } + exports2.upgrades = Object.entries(allKnown).map(mapRaw); + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/util.js + var require_util18 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUpgradeVersion = exports2.getSpecAlias = exports2.getSpecRuntime = exports2.getSpecRpc = exports2.getSpecHasher = exports2.getSpecTypes = exports2.getSpecExtensions = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_chain2(); + var index_js_2 = require_spec(); + var index_js_3 = require_upgrades(); + function withNames2(chainName, specName, fn2) { + return fn2(chainName.toString(), specName.toString()); + } + function filterVersions2(versions = [], specVersion) { + return versions.filter(({ minmax: [min, max2] }) => (min === void 0 || min === null || specVersion >= min) && (max2 === void 0 || max2 === null || specVersion <= max2)).reduce((result, { types: types2 }) => ({ ...result, ...types2 }), {}); + } + function getSpecExtensions({ knownTypes: knownTypes2 }, chainName, specName) { + return withNames2(chainName, specName, (c, s) => ({ + ...knownTypes2.typesBundle?.spec?.[s]?.signedExtensions ?? {}, + ...knownTypes2.typesBundle?.chain?.[c]?.signedExtensions ?? {} + })); + } + exports2.getSpecExtensions = getSpecExtensions; + function getSpecTypes2({ knownTypes: knownTypes2 }, chainName, specName, specVersion) { + const _specVersion = (0, util_1.bnToBn)(specVersion).toNumber(); + return withNames2(chainName, specName, (c, s) => ({ + ...filterVersions2(index_js_2.typesSpec[s], _specVersion), + ...filterVersions2(index_js_1.typesChain[c], _specVersion), + ...filterVersions2(knownTypes2.typesBundle?.spec?.[s]?.types, _specVersion), + ...filterVersions2(knownTypes2.typesBundle?.chain?.[c]?.types, _specVersion), + ...knownTypes2.typesSpec?.[s] ?? {}, + ...knownTypes2.typesChain?.[c] ?? {}, + ...knownTypes2.types ?? {} + })); + } + exports2.getSpecTypes = getSpecTypes2; + function getSpecHasher({ knownTypes: knownTypes2 }, chainName, specName) { + return withNames2(chainName, specName, (c, s) => knownTypes2.hasher || knownTypes2.typesBundle?.chain?.[c]?.hasher || knownTypes2.typesBundle?.spec?.[s]?.hasher || null); + } + exports2.getSpecHasher = getSpecHasher; + function getSpecRpc({ knownTypes: knownTypes2 }, chainName, specName) { + return withNames2(chainName, specName, (c, s) => ({ + ...knownTypes2.typesBundle?.spec?.[s]?.rpc ?? {}, + ...knownTypes2.typesBundle?.chain?.[c]?.rpc ?? {} + })); + } + exports2.getSpecRpc = getSpecRpc; + function getSpecRuntime({ knownTypes: knownTypes2 }, chainName, specName) { + return withNames2(chainName, specName, (c, s) => ({ + ...knownTypes2.typesBundle?.spec?.[s]?.runtime ?? {}, + ...knownTypes2.typesBundle?.chain?.[c]?.runtime ?? {} + })); + } + exports2.getSpecRuntime = getSpecRuntime; + function getSpecAlias({ knownTypes: knownTypes2 }, chainName, specName) { + return withNames2(chainName, specName, (c, s) => ({ + ...knownTypes2.typesBundle?.spec?.[s]?.alias ?? {}, + ...knownTypes2.typesBundle?.chain?.[c]?.alias ?? {}, + ...knownTypes2.typesAlias ?? {} + })); + } + exports2.getSpecAlias = getSpecAlias; + function getUpgradeVersion(genesisHash, blockNumber) { + const known = index_js_3.upgrades.find((u) => genesisHash.eq(u.genesisHash)); + return known ? [ + known.versions.reduce((last2, version23) => { + return blockNumber.gt(version23.blockNumber) ? version23 : last2; + }, void 0), + known.versions.find((version23) => blockNumber.lte(version23.blockNumber)) + ] : [void 0, void 0]; + } + exports2.getUpgradeVersion = getUpgradeVersion; + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/bundle.js + var require_bundle9 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = exports2.mapXcmTypes = void 0; + var tslib_1 = require_tslib(); + var types_create_1 = require_cjs9(); + Object.defineProperty(exports2, "mapXcmTypes", { enumerable: true, get: function() { + return types_create_1.mapXcmTypes; + } }); + var packageInfo_js_1 = require_packageInfo18(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + tslib_1.__exportStar(require_util18(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-known/cjs/index.js + var require_cjs13 = __commonJS({ + "../../node_modules/@polkadot/types-known/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect6(); + tslib_1.__exportStar(require_bundle9(), exports2); + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/partition.js + var require_partition2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter2(); + function partition(predicate, thisArg) { + return function(source) { + return [filter_1.filter(predicate, thisArg)(source), filter_1.filter(not_1.not(predicate, thisArg))(source)]; + }; + } + exports2.partition = partition; + } + }); + + // ../../node_modules/rxjs/dist/cjs/internal/operators/race.js + var require_race2 = __commonJS({ + "../../node_modules/rxjs/dist/cjs/internal/operators/race.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r10, ar2 = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r10 = i.next()).done) + ar2.push(r10.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r10 && !r10.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar2; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to2, from2) { + for (var i = 0, il2 = from2.length, j10 = to2.length; i < il2; i++, j10++) + to2[j10] = from2[i]; + return to2; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.race = void 0; + var argsOrArgArray_1 = require_argsOrArgArray(); + var raceWith_1 = require_raceWith(); + function race() { + var args = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + args[_i2] = arguments[_i2]; + } + return raceWith_1.raceWith.apply(void 0, __spreadArray2([], __read2(argsOrArgArray_1.argsOrArgArray(args)))); + } + exports2.race = race; + } + }); + + // ../../node_modules/rxjs/dist/cjs/operators/index.js + var require_operators = __commonJS({ + "../../node_modules/rxjs/dist/cjs/operators/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = exports2.merge = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.concat = exports2.combineLatestWith = exports2.combineLatest = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = void 0; + exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = exports2.switchMapTo = exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.race = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.partition = exports2.pairwise = exports2.onErrorResumeNext = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = void 0; + exports2.zipWith = exports2.zipAll = exports2.zip = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = void 0; + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer4(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatest_1 = require_combineLatest2(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concat_1 = require_concat3(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand2(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter2(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var merge_1 = require_merge2(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min3(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var onErrorResumeNextWith_1 = require_onErrorResumeNextWith(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNextWith_1.onErrorResumeNext; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var partition_1 = require_partition2(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var race_1 = require_race2(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_1.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zip_1 = require_zip3(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } + }); + + // ../../node_modules/@open-web3/scanner/GenericEvent.js + var require_GenericEvent = __commonJS({ + "../../node_modules/@open-web3/scanner/GenericEvent.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.default = void 0; + var _types = require_cjs10(); + var toHump = (name6) => { + return name6.replace(/_(\w)/g, (_, l15) => l15.toUpperCase()); + }; + var GenericEvent2 = class extends _types.GenericEvent { + get argsDef() { + try { + var _$exec; + const meta2 = this.meta.toJSON(); + const args = meta2 === null || meta2 === void 0 ? void 0 : meta2.args; + if (!args || !args.length) { + return {}; + } + const doc = meta2.documentation.join("\n").replace(/\\/g, ""); + const def = (_$exec = /\[([\w\s,]*)\]/.exec(doc)) === null || _$exec === void 0 ? void 0 : _$exec[1].split(",").map((s) => s.trim()); + const data = this.data.toJSON(); + if (!def || def.length !== args.length || def.length !== data.length) { + return null; + } + return data.reduce((result, curr, index) => { + const name6 = toHump(def[index]); + result[name6] = curr; + return result; + }, {}); + } catch { + return null; + } + } + }; + exports2.default = GenericEvent2; + } + }); + + // ../../node_modules/@open-web3/scanner/Scanner.js + var require_Scanner = __commonJS({ + "../../node_modules/@open-web3/scanner/Scanner.js"(exports2) { + "use strict"; + var _interopRequireDefault = require_interopRequireDefault(); + exports2.__esModule = true; + exports2.default = void 0; + var _defineProperty2 = _interopRequireDefault(require_defineProperty()); + var _apiDerive = require_cjs12(); + var _types = require_cjs10(); + var _typesKnown = require_cjs13(); + var _util = require_cjs3(); + var _rxjs = require_cjs7(); + var _operators = require_operators(); + var _GenericEvent = _interopRequireDefault(require_GenericEvent()); + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), true).forEach(function(key2) { + (0, _defineProperty2.default)(target, key2, source[key2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key2) { + Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2)); + }); + } + return target; + } + var Scanner = class { + constructor(options) { + this.rpcProvider = void 0; + this.knownTypes = void 0; + this.metadataRequest = void 0; + this.wsProvider = void 0; + this.chainInfo = void 0; + this.wsProvider = options.wsProvider; + this.rpcProvider = options.rpcProvider || options.wsProvider; + this.knownTypes = { + types: options.types, + typesAlias: options.typesAlias, + typesBundle: options.typesBundle, + typesChain: options.typesChain, + typesSpec: options.typesSpec + }; + this.chainInfo = {}; + this.metadataRequest = {}; + } + createMethodSubscribe(methods) { + for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + params[_key - 1] = arguments[_key]; + } + const [updateType, subMethod, unsubMethod] = methods; + return new _rxjs.Observable((observer) => { + let subscriptionPromise = Promise.resolve(); + const errorHandler = (error) => { + observer.error(error); + }; + try { + const update3 = (error, result) => { + if (error) { + return; + } + observer.next(result); + }; + subscriptionPromise = this.wsProvider.subscribe(updateType, subMethod, params, update3).catch((error) => errorHandler(error)); + } catch (error) { + errorHandler(error); + } + return () => { + subscriptionPromise.then((subscriptionId) => (0, _util.isNumber)(subscriptionId) ? this.wsProvider.unsubscribe(updateType, unsubMethod, subscriptionId) : Promise.resolve(false)); + }; + }); + } + async getBlockDetail(_blockAt) { + var _extrinsics$, _extrinsics$$args; + const blockAt = await this.getBlockAt(_blockAt); + const chainInfo = await this.getChainInfo(blockAt); + const requestes = []; + requestes.push(this.getEvents(blockAt, chainInfo).then((eventRecords) => eventRecords.map((event, index) => this.getEventData(event, index)))); + const blockRaw = await this.rpcProvider.send("chain_getBlock", [blockAt.blockHash]); + requestes.push(this.getHeader(blockRaw.block.header, blockAt, chainInfo).then((header) => { + var _header$author; + return (_header$author = header.author) === null || _header$author === void 0 ? void 0 : _header$author.toString(); + })); + const [events, author] = await Promise.all(requestes); + const extrinsics = blockRaw.block.extrinsics.map((extrinsic, index) => { + const event = [...events].reverse().find((_ref) => { + let { + phaseIndex + } = _ref; + return phaseIndex === index; + }); + const result = event && (event.method === "ExtrinsicFailed" || event.method === "ExtrinsicSuccess") ? event.method : ""; + return _objectSpread({ + index, + result + }, this.decodeTx(extrinsic, blockAt, chainInfo)); + }); + const timestamp = extrinsics === null || extrinsics === void 0 ? void 0 : (_extrinsics$ = extrinsics[0]) === null || _extrinsics$ === void 0 ? void 0 : (_extrinsics$$args = _extrinsics$.args) === null || _extrinsics$$args === void 0 ? void 0 : _extrinsics$$args.now; + return { + raw: blockRaw, + number: Number(blockRaw.block.header.number), + hash: blockAt.blockHash, + timestamp, + author, + events, + extrinsics, + chainInfo + }; + } + async getHeader(header, _blockAt, meta2) { + const validators = await this.getSessionValidators(_blockAt); + return (0, _apiDerive.createHeaderExtended)(meta2.registry, meta2.registry.createType("Header", header), validators); + } + async getRuntimeVersion(blockHash) { + const [runtimeVesion, chainName] = await Promise.all([this.rpcProvider.send("state_getRuntimeVersion", [blockHash]), this.rpcProvider.send("system_chain", [])]); + return _objectSpread(_objectSpread({}, runtimeVesion), {}, { + chainName + }); + } + async getBlockHash(at) { + if (typeof at === "number" && !isNaN(at) && !(0, _util.isHex)(at)) { + const blockHash = this.rpcProvider.send("chain_getBlockHash", [at]); + return blockHash; + } else { + return at; + } + } + async getBlockAt(blockAt) { + if (blockAt !== null && blockAt !== void 0 && blockAt.blockHash && (blockAt === null || blockAt === void 0 ? void 0 : blockAt.blockNumber) !== void 0) { + return { + blockHash: blockAt.blockHash, + blockNumber: blockAt.blockNumber + }; + } + if (!blockAt) { + const header = await this.rpcProvider.send("chain_getHeader", []); + const blockNumber = Number(header.number); + const blockHash = await this.rpcProvider.send("chain_getBlockHash", []); + return { + blockNumber, + blockHash + }; + } else if (blockAt.blockNumber !== void 0) { + const blockHash = await this.rpcProvider.send("chain_getBlockHash", [blockAt.blockNumber]); + return { + blockNumber: blockAt.blockNumber, + blockHash + }; + } else if (blockAt.blockHash) { + const header = await this.rpcProvider.send("chain_getHeader", [blockAt.blockHash]); + return { + blockNumber: Number(header.number), + blockHash: blockAt.blockHash + }; + } else { + throw new Error("expect blockHash or blockNumber"); + } + } + async getParentHash(_blockHash) { + const header = await this.rpcProvider.send("chain_getHeader", _blockHash ? [_blockHash] : []); + return header.parentHash; + } + getSpecTypes(version23) { + const types2 = (0, _typesKnown.getSpecTypes)({ + knownTypes: this.knownTypes + }, version23.chainName, version23.specName, version23.specVersion); + return _objectSpread(_objectSpread({}, types2), {}, { + GenericEvent: _GenericEvent.default + }); + } + async getChainInfo(_blockAt) { + const { + blockHash, + blockNumber + } = await this.getBlockAt(_blockAt); + let hashForMetadata = await this.getParentHash(blockHash); + if (blockNumber === 0) { + hashForMetadata = blockHash; + } + const runtimeVersion = await this.getRuntimeVersion(hashForMetadata); + const cacheKey = `${runtimeVersion.specName}/${runtimeVersion.specVersion}`; + if (!this.chainInfo[cacheKey]) { + const registry = new _types.TypeRegistry(); + registry.register(this.getSpecTypes(runtimeVersion)); + const properties = await this.rpcProvider.send("system_properties", []); + registry.setChainProperties(registry.createType("ChainProperties", properties)); + registry.knownTypes.typesAlias = this.knownTypes.typesAlias; + if (!this.metadataRequest[cacheKey]) { + this.metadataRequest[cacheKey] = this.rpcProvider.send("state_getMetadata", [hashForMetadata]).then((rpcdata) => { + const metadata = new _types.Metadata(registry, rpcdata); + registry.setMetadata(metadata); + return { + id: cacheKey, + min: blockNumber, + max: blockNumber, + bytes: rpcdata, + metadata: (0, _types.expandMetadata)(registry, metadata), + registry, + runtimeVersion + }; + }); + } + this.chainInfo[cacheKey] = await this.metadataRequest[cacheKey]; + } else { + this.chainInfo[cacheKey].min = Math.min(this.chainInfo[cacheKey].min, blockNumber); + this.chainInfo[cacheKey].max = Math.max(this.chainInfo[cacheKey].max, blockNumber); + } + return this.chainInfo[cacheKey]; + } + async getSessionValidators(_blockAt) { + const { + metadata, + registry + } = await this.getChainInfo(_blockAt); + if (!metadata.query.session) + return []; + const storageKey = new _types.StorageKey(registry, metadata.query.session.validators); + return this.getStorageValue(storageKey, _blockAt); + } + async getEvents(_blockAt, meta2) { + const storageKey = new _types.StorageKey(meta2.registry, meta2.metadata.query.system.events); + return this.getStorageValue(storageKey, _blockAt); + } + getEventData(event, index) { + var _event$event$meta$toJ, _event$event$meta$toJ2; + const documentation = (_event$event$meta$toJ = event.event.meta.toJSON()) === null || _event$event$meta$toJ === void 0 ? void 0 : (_event$event$meta$toJ2 = _event$event$meta$toJ.documentation) === null || _event$event$meta$toJ2 === void 0 ? void 0 : _event$event$meta$toJ2.join("\n"); + return { + index, + doc: documentation, + bytes: event.toHex(), + section: event.event.section, + method: event.event.method, + phaseType: event.phase.type, + phaseIndex: event.phase.isNone ? null : event.phase.value.toNumber(), + args: event.event.data.toJSON(), + argsDef: event.event.argsDef + }; + } + async getStorageValue(storageKey, _blockAt) { + const blockAt = await this.getBlockAt(_blockAt); + const { + registry + } = await this.getChainInfo(_blockAt); + const raw = await this.rpcProvider.send("state_getStorage", [storageKey.toHex(), blockAt.blockHash]); + return registry.createType(storageKey.outputType, raw, true); + } + decodeTx(txData, _blockAt, meta2) { + const extrinsic = new _types.GenericExtrinsic(meta2.registry, txData); + const { + callIndex, + args + } = extrinsic.method.toJSON(); + return { + bytes: txData, + hash: (0, _util.u8aToHex)(extrinsic.hash), + tip: extrinsic.tip.toString(), + nonce: extrinsic.nonce.toNumber(), + method: extrinsic.method.method, + section: extrinsic.method.section, + signer: extrinsic.isSigned ? extrinsic.signer.toString() : null, + callIndex, + args + }; + } + subscribeNewBlockNumber(confirmation) { + let newBlockNumber$; + if (confirmation === "finalize") { + newBlockNumber$ = this.createMethodSubscribe(["chain_finalizedHead", "chain_subscribeFinalizedHeads", "chain_unsubscribeFinalizedHeads"]).pipe((0, _operators.map)((header) => Number(header.number))); + } else if (typeof confirmation === "number") { + newBlockNumber$ = this.createMethodSubscribe(["chain_newHead", "chain_subscribeNewHead", "chain_unsubscribeNewHead"]).pipe((0, _operators.map)((header) => Number(header.number) - confirmation >= 0 ? Number(header.number) - confirmation : 0)); + } else { + newBlockNumber$ = this.createMethodSubscribe(["chain_newHead", "chain_subscribeNewHead", "chain_unsubscribeNewHead"]).pipe((0, _operators.map)((header) => Number(header.number))); + } + return newBlockNumber$.pipe((0, _operators.shareReplay)({ + bufferSize: 1, + refCount: true + }), (0, _operators.pairwise)(), (0, _operators.mergeMap)((_ref2) => { + let [pre2, current] = _ref2; + if (pre2 >= current) + return (0, _rxjs.of)(current); + return (0, _rxjs.of)(...[...Array(current - pre2).keys()].map((i) => i + 1 + pre2)); + })); + } + subscribe(options) { + if (options === void 0) { + options = {}; + } + const { + start, + end, + concurrent = 10, + confirmation + } = options; + let blockNumber$; + if (start !== void 0 && end !== void 0) { + blockNumber$ = (0, _rxjs.range)(start, end - start + 1); + } else if (start !== void 0 && end === void 0) { + const newBlockNumber$ = this.subscribeNewBlockNumber(confirmation); + blockNumber$ = (0, _rxjs.from)(newBlockNumber$).pipe((0, _operators.take)(1), (0, _operators.switchMap)((lastestNumber) => { + return (0, _rxjs.concat)((0, _rxjs.range)(start, lastestNumber - start + 1), newBlockNumber$); + })); + } else { + blockNumber$ = this.subscribeNewBlockNumber(confirmation); + } + const getBlockDetail = (blockNumber) => { + return new _rxjs.Observable((subscriber) => { + this.getBlockDetail({ + blockNumber + }).then((data) => { + subscriber.next({ + blockNumber, + result: data, + error: null + }); + subscriber.complete(); + }).catch((error) => { + subscriber.error(error); + }); + }).pipe((0, _operators.timeout)(options.timeout || 6e4), (0, _operators.retryWhen)((errors2) => errors2.pipe((0, _operators.mergeMap)((error) => { + if (error.name !== "TimeoutError") { + return (0, _rxjs.throwError)(error); + } + return (0, _rxjs.timer)(5e3); + }))), (0, _operators.catchError)((err) => { + return (0, _rxjs.of)({ + blockNumber, + error: err, + result: null + }); + })); + }; + return blockNumber$.pipe((0, _operators.mergeMap)((value) => getBlockDetail(value), concurrent)); + } + }; + var _default = Scanner; + exports2.default = _default; + } + }); + + // ../../node_modules/@open-web3/scanner/index.js + var require_scanner = __commonJS({ + "../../node_modules/@open-web3/scanner/index.js"(exports2) { + "use strict"; + var _interopRequireDefault = require_interopRequireDefault(); + exports2.__esModule = true; + exports2.default = void 0; + var _Scanner = _interopRequireDefault(require_Scanner()); + var _default = _Scanner.default; + exports2.default = _default; + } + }); + + // ../../node_modules/@polkadot/api/cjs/packageInfo.js + var require_packageInfo19 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/api", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/api/cjs/packageDetect.js + var require_packageDetect7 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo12(); + var packageInfo_2 = require_packageInfo15(); + var packageInfo_3 = require_packageInfo13(); + var packageInfo_4 = require_packageInfo14(); + var packageInfo_5 = require_packageInfo18(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo19(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_2.packageInfo, packageInfo_1.packageInfo, packageInfo_5.packageInfo, packageInfo_3.packageInfo, packageInfo_4.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/rpc-augment/cjs/packageInfo.js + var require_packageInfo20 = __commonJS({ + "../../node_modules/@polkadot/rpc-augment/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/rpc-augment", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/rpc-augment/cjs/packageDetect.js + var require_packageDetect8 = __commonJS({ + "../../node_modules/@polkadot/rpc-augment/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo15(); + var packageInfo_2 = require_packageInfo14(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo20(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_1.packageInfo, packageInfo_2.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/rpc-core/cjs/types/jsonrpc.js + var require_jsonrpc2 = __commonJS({ + "../../node_modules/@polkadot/rpc-core/cjs/types/jsonrpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/rpc-augment/cjs/augment/jsonrpc.js + var require_jsonrpc3 = __commonJS({ + "../../node_modules/@polkadot/rpc-augment/cjs/augment/jsonrpc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_jsonrpc2(); + } + }); + + // ../../node_modules/@polkadot/rpc-augment/cjs/augment/index.js + var require_augment = __commonJS({ + "../../node_modules/@polkadot/rpc-augment/cjs/augment/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_jsonrpc3(); + } + }); + + // ../../node_modules/@polkadot/rpc-augment/cjs/bundle.js + var require_bundle10 = __commonJS({ + "../../node_modules/@polkadot/rpc-augment/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + require_augment(); + var packageInfo_js_1 = require_packageInfo20(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + } + }); + + // ../../node_modules/@polkadot/rpc-augment/cjs/index.js + var require_cjs14 = __commonJS({ + "../../node_modules/@polkadot/rpc-augment/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect8(); + tslib_1.__exportStar(require_bundle10(), exports2); + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/detectOther.js + var require_detectOther4 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/detectOther.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo4(); + var packageInfo_2 = require_packageInfo8(); + exports2.default = [packageInfo_1.packageInfo, packageInfo_2.packageInfo]; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/packageInfo.js + var require_packageInfo21 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/keyring", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "12.6.2" }; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/detectPackage.js + var require_detectPackage4 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/detectPackage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + var util_1 = require_cjs3(); + var detectOther_js_1 = tslib_1.__importDefault(require_detectOther4()); + var packageInfo_js_1 = require_packageInfo21(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, detectOther_js_1.default); + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/pair/defaults.js + var require_defaults4 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/pair/defaults.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SEED_LENGTH = exports2.SEC_LENGTH = exports2.SALT_LENGTH = exports2.PUB_LENGTH = exports2.PKCS8_HEADER = exports2.PKCS8_DIVIDER = void 0; + exports2.PKCS8_DIVIDER = new Uint8Array([161, 35, 3, 33, 0]); + exports2.PKCS8_HEADER = new Uint8Array([48, 83, 2, 1, 1, 48, 5, 6, 3, 43, 101, 112, 4, 34, 4, 32]); + exports2.PUB_LENGTH = 32; + exports2.SALT_LENGTH = 32; + exports2.SEC_LENGTH = 64; + exports2.SEED_LENGTH = 32; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/pair/decode.js + var require_decode2 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/pair/decode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decodePair = void 0; + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var defaults_js_1 = require_defaults4(); + var SEED_OFFSET3 = defaults_js_1.PKCS8_HEADER.length; + function decodePair3(passphrase, encrypted, _encType) { + const encType = Array.isArray(_encType) || _encType === void 0 ? _encType : [_encType]; + const decrypted = (0, util_crypto_1.jsonDecryptData)(encrypted, passphrase, encType); + const header = decrypted.subarray(0, defaults_js_1.PKCS8_HEADER.length); + if (!(0, util_1.u8aEq)(header, defaults_js_1.PKCS8_HEADER)) { + throw new Error("Invalid Pkcs8 header found in body"); + } + let secretKey = decrypted.subarray(SEED_OFFSET3, SEED_OFFSET3 + defaults_js_1.SEC_LENGTH); + let divOffset = SEED_OFFSET3 + defaults_js_1.SEC_LENGTH; + let divider = decrypted.subarray(divOffset, divOffset + defaults_js_1.PKCS8_DIVIDER.length); + if (!(0, util_1.u8aEq)(divider, defaults_js_1.PKCS8_DIVIDER)) { + divOffset = SEED_OFFSET3 + defaults_js_1.SEED_LENGTH; + secretKey = decrypted.subarray(SEED_OFFSET3, divOffset); + divider = decrypted.subarray(divOffset, divOffset + defaults_js_1.PKCS8_DIVIDER.length); + if (!(0, util_1.u8aEq)(divider, defaults_js_1.PKCS8_DIVIDER)) { + throw new Error("Invalid Pkcs8 divider found in body"); + } + } + const pubOffset = divOffset + defaults_js_1.PKCS8_DIVIDER.length; + const publicKey = decrypted.subarray(pubOffset, pubOffset + defaults_js_1.PUB_LENGTH); + return { + publicKey, + secretKey + }; + } + exports2.decodePair = decodePair3; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/pair/encode.js + var require_encode5 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/pair/encode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.encodePair = void 0; + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var defaults_js_1 = require_defaults4(); + function encodePair3({ publicKey, secretKey }, passphrase) { + if (!secretKey) { + throw new Error("Expected a valid secretKey to be passed to encode"); + } + const encoded = (0, util_1.u8aConcat)(defaults_js_1.PKCS8_HEADER, secretKey, defaults_js_1.PKCS8_DIVIDER, publicKey); + if (!passphrase) { + return encoded; + } + const { params, password, salt } = (0, util_crypto_1.scryptEncode)(passphrase); + const { encrypted, nonce } = (0, util_crypto_1.naclEncrypt)(encoded, password.subarray(0, 32)); + return (0, util_1.u8aConcat)((0, util_crypto_1.scryptToU8a)(salt, params), nonce, encrypted); + } + exports2.encodePair = encodePair3; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/pair/toJson.js + var require_toJson = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/pair/toJson.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairToJson = void 0; + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + function pairToJson3(type, { address, meta: meta2 }, encoded, isEncrypted) { + return (0, util_1.objectSpread)((0, util_crypto_1.jsonEncryptFormat)(encoded, ["pkcs8", type], isEncrypted), { + address, + meta: meta2 + }); + } + exports2.pairToJson = pairToJson3; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/pair/index.js + var require_pair = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/pair/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPair = void 0; + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var decode_js_1 = require_decode2(); + var encode_js_1 = require_encode5(); + var toJson_js_1 = require_toJson(); + var SIG_TYPE_NONE3 = new Uint8Array(); + var TYPE_FROM_SEED3 = { + ecdsa: util_crypto_1.secp256k1PairFromSeed, + ed25519: util_crypto_1.ed25519PairFromSeed, + ethereum: util_crypto_1.secp256k1PairFromSeed, + sr25519: util_crypto_1.sr25519PairFromSeed + }; + var TYPE_PREFIX3 = { + ecdsa: new Uint8Array([2]), + ed25519: new Uint8Array([0]), + ethereum: new Uint8Array([2]), + sr25519: new Uint8Array([1]) + }; + var TYPE_SIGNATURE3 = { + ecdsa: (m, p) => (0, util_crypto_1.secp256k1Sign)(m, p, "blake2"), + ed25519: util_crypto_1.ed25519Sign, + ethereum: (m, p) => (0, util_crypto_1.secp256k1Sign)(m, p, "keccak"), + sr25519: util_crypto_1.sr25519Sign + }; + var TYPE_ADDRESS3 = { + ecdsa: (p) => p.length > 32 ? (0, util_crypto_1.blake2AsU8a)(p) : p, + ed25519: (p) => p, + ethereum: (p) => p.length === 20 ? p : (0, util_crypto_1.keccakAsU8a)((0, util_crypto_1.secp256k1Expand)(p)), + sr25519: (p) => p + }; + function isLocked3(secretKey) { + return !secretKey || (0, util_1.u8aEmpty)(secretKey); + } + function vrfHash3(proof, context2, extra) { + return (0, util_crypto_1.blake2AsU8a)((0, util_1.u8aConcat)(context2 || "", extra || "", proof)); + } + function createPair3({ toSS58, type }, { publicKey, secretKey }, meta2 = {}, encoded = null, encTypes) { + const decodePkcs8 = (passphrase, userEncoded) => { + const decoded = (0, decode_js_1.decodePair)(passphrase, userEncoded || encoded, encTypes); + if (decoded.secretKey.length === 64) { + publicKey = decoded.publicKey; + secretKey = decoded.secretKey; + } else { + const pair = TYPE_FROM_SEED3[type](decoded.secretKey); + publicKey = pair.publicKey; + secretKey = pair.secretKey; + } + }; + const recode = (passphrase) => { + isLocked3(secretKey) && encoded && decodePkcs8(passphrase, encoded); + encoded = (0, encode_js_1.encodePair)({ publicKey, secretKey }, passphrase); + encTypes = void 0; + return encoded; + }; + const encodeAddress4 = () => { + const raw = TYPE_ADDRESS3[type](publicKey); + return type === "ethereum" ? (0, util_crypto_1.ethereumEncode)(raw) : toSS58(raw); + }; + return { + get address() { + return encodeAddress4(); + }, + get addressRaw() { + const raw = TYPE_ADDRESS3[type](publicKey); + return type === "ethereum" ? raw.slice(-20) : raw; + }, + get isLocked() { + return isLocked3(secretKey); + }, + get meta() { + return meta2; + }, + get publicKey() { + return publicKey; + }, + get type() { + return type; + }, + decodePkcs8, + derive: (suri, meta3) => { + if (type === "ethereum") { + throw new Error("Unable to derive on this keypair"); + } else if (isLocked3(secretKey)) { + throw new Error("Cannot derive on a locked keypair"); + } + const { path } = (0, util_crypto_1.keyExtractPath)(suri); + const derived = (0, util_crypto_1.keyFromPath)({ publicKey, secretKey }, path, type); + return createPair3({ toSS58, type }, derived, meta3, null); + }, + encodePkcs8: (passphrase) => { + return recode(passphrase); + }, + lock: () => { + secretKey = new Uint8Array(); + }, + setMeta: (additional) => { + meta2 = (0, util_1.objectSpread)({}, meta2, additional); + }, + sign: (message, options = {}) => { + if (isLocked3(secretKey)) { + throw new Error("Cannot sign with a locked key pair"); + } + return (0, util_1.u8aConcat)(options.withType ? TYPE_PREFIX3[type] : SIG_TYPE_NONE3, TYPE_SIGNATURE3[type]((0, util_1.u8aToU8a)(message), { publicKey, secretKey })); + }, + toJson: (passphrase) => { + const address = ["ecdsa", "ethereum"].includes(type) ? publicKey.length === 20 ? (0, util_1.u8aToHex)(publicKey) : (0, util_1.u8aToHex)((0, util_crypto_1.secp256k1Compress)(publicKey)) : encodeAddress4(); + return (0, toJson_js_1.pairToJson)(type, { address, meta: meta2 }, recode(passphrase), !!passphrase); + }, + unlock: (passphrase) => { + return decodePkcs8(passphrase); + }, + verify: (message, signature2, signerPublic) => { + return (0, util_crypto_1.signatureVerify)(message, signature2, TYPE_ADDRESS3[type]((0, util_1.u8aToU8a)(signerPublic))).isValid; + }, + vrfSign: (message, context2, extra) => { + if (isLocked3(secretKey)) { + throw new Error("Cannot sign with a locked key pair"); + } + if (type === "sr25519") { + return (0, util_crypto_1.sr25519VrfSign)(message, { secretKey }, context2, extra); + } + const proof = TYPE_SIGNATURE3[type]((0, util_1.u8aToU8a)(message), { publicKey, secretKey }); + return (0, util_1.u8aConcat)(vrfHash3(proof, context2, extra), proof); + }, + vrfVerify: (message, vrfResult, signerPublic, context2, extra) => { + if (type === "sr25519") { + return (0, util_crypto_1.sr25519VrfVerify)(message, vrfResult, publicKey, context2, extra); + } + const result = (0, util_crypto_1.signatureVerify)(message, (0, util_1.u8aConcat)(TYPE_PREFIX3[type], vrfResult.subarray(32)), TYPE_ADDRESS3[type]((0, util_1.u8aToU8a)(signerPublic))); + return result.isValid && (0, util_1.u8aEq)(vrfResult.subarray(0, 32), vrfHash3(vrfResult.subarray(32), context2, extra)); + } + }; + } + exports2.createPair = createPair3; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/defaults.js + var require_defaults5 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/defaults.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEV_SEED = exports2.DEV_PHRASE = void 0; + exports2.DEV_PHRASE = "bottom drive obey lake curtain smoke basket hold race lonely fit walk"; + exports2.DEV_SEED = "0xfac7959dbfe72f052e5a0c3c8d6530f202b02fd8f9f5ca3580ec8deb7797479e"; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/pairs.js + var require_pairs2 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/pairs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pairs = void 0; + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var Pairs3 = class { + __internal__map = {}; + add(pair) { + this.__internal__map[(0, util_crypto_1.decodeAddress)(pair.address).toString()] = pair; + return pair; + } + all() { + return Object.values(this.__internal__map); + } + get(address) { + const pair = this.__internal__map[(0, util_crypto_1.decodeAddress)(address).toString()]; + if (!pair) { + throw new Error(`Unable to retrieve keypair '${(0, util_1.isU8a)(address) || (0, util_1.isHex)(address) ? (0, util_1.u8aToHex)((0, util_1.u8aToU8a)(address)) : address}'`); + } + return pair; + } + remove(address) { + delete this.__internal__map[(0, util_crypto_1.decodeAddress)(address).toString()]; + } + }; + exports2.Pairs = Pairs3; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/keyring.js + var require_keyring = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/keyring.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Keyring = void 0; + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var index_js_1 = require_pair(); + var defaults_js_1 = require_defaults5(); + var pairs_js_1 = require_pairs2(); + var PairFromSeed2 = { + ecdsa: (seed) => (0, util_crypto_1.secp256k1PairFromSeed)(seed), + ed25519: (seed) => (0, util_crypto_1.ed25519PairFromSeed)(seed), + ethereum: (seed) => (0, util_crypto_1.secp256k1PairFromSeed)(seed), + sr25519: (seed) => (0, util_crypto_1.sr25519PairFromSeed)(seed) + }; + function pairToPublic3({ publicKey }) { + return publicKey; + } + var Keyring4 = class { + __internal__pairs; + __internal__type; + __internal__ss58; + decodeAddress = util_crypto_1.decodeAddress; + constructor(options = {}) { + options.type = options.type || "ed25519"; + if (!["ecdsa", "ethereum", "ed25519", "sr25519"].includes(options.type || "undefined")) { + throw new Error(`Expected a keyring type of either 'ed25519', 'sr25519', 'ethereum' or 'ecdsa', found '${options.type || "unknown"}`); + } + this.__internal__pairs = new pairs_js_1.Pairs(); + this.__internal__ss58 = options.ss58Format; + this.__internal__type = options.type; + } + get pairs() { + return this.getPairs(); + } + get publicKeys() { + return this.getPublicKeys(); + } + get type() { + return this.__internal__type; + } + addPair(pair) { + return this.__internal__pairs.add(pair); + } + addFromAddress(address, meta2 = {}, encoded = null, type = this.type, ignoreChecksum, encType) { + const publicKey = this.decodeAddress(address, ignoreChecksum); + return this.addPair((0, index_js_1.createPair)({ toSS58: this.encodeAddress, type }, { publicKey, secretKey: new Uint8Array() }, meta2, encoded, encType)); + } + addFromJson(json, ignoreChecksum) { + return this.addPair(this.createFromJson(json, ignoreChecksum)); + } + addFromMnemonic(mnemonic, meta2 = {}, type = this.type) { + return this.addFromUri(mnemonic, meta2, type); + } + addFromPair(pair, meta2 = {}, type = this.type) { + return this.addPair(this.createFromPair(pair, meta2, type)); + } + addFromSeed(seed, meta2 = {}, type = this.type) { + return this.addPair((0, index_js_1.createPair)({ toSS58: this.encodeAddress, type }, PairFromSeed2[type](seed), meta2, null)); + } + addFromUri(suri, meta2 = {}, type = this.type) { + return this.addPair(this.createFromUri(suri, meta2, type)); + } + createFromJson({ address, encoded, encoding: { content, type, version: version23 }, meta: meta2 }, ignoreChecksum) { + if (version23 === "3" && content[0] !== "pkcs8") { + throw new Error(`Unable to decode non-pkcs8 type, [${content.join(",")}] found}`); + } + const cryptoType = version23 === "0" || !Array.isArray(content) ? this.type : content[1]; + const encType = !Array.isArray(type) ? [type] : type; + if (!["ed25519", "sr25519", "ecdsa", "ethereum"].includes(cryptoType)) { + throw new Error(`Unknown crypto type ${cryptoType}`); + } + const publicKey = (0, util_1.isHex)(address) ? (0, util_1.hexToU8a)(address) : this.decodeAddress(address, ignoreChecksum); + const decoded = (0, util_1.isHex)(encoded) ? (0, util_1.hexToU8a)(encoded) : (0, util_crypto_1.base64Decode)(encoded); + return (0, index_js_1.createPair)({ toSS58: this.encodeAddress, type: cryptoType }, { publicKey, secretKey: new Uint8Array() }, meta2, decoded, encType); + } + createFromPair(pair, meta2 = {}, type = this.type) { + return (0, index_js_1.createPair)({ toSS58: this.encodeAddress, type }, pair, meta2, null); + } + createFromUri(_suri, meta2 = {}, type = this.type) { + const suri = _suri.startsWith("//") ? `${defaults_js_1.DEV_PHRASE}${_suri}` : _suri; + const { derivePath, password, path, phrase } = (0, util_crypto_1.keyExtractSuri)(suri); + let seed; + const isPhraseHex = (0, util_1.isHex)(phrase, 256); + if (isPhraseHex) { + seed = (0, util_1.hexToU8a)(phrase); + } else { + const parts = phrase.split(" "); + if ([12, 15, 18, 21, 24].includes(parts.length)) { + seed = type === "ethereum" ? (0, util_crypto_1.mnemonicToLegacySeed)(phrase, "", false, 64) : (0, util_crypto_1.mnemonicToMiniSecret)(phrase, password); + } else { + if (phrase.length > 32) { + throw new Error("specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes"); + } + seed = (0, util_1.stringToU8a)(phrase.padEnd(32)); + } + } + const derived = type === "ethereum" ? isPhraseHex ? PairFromSeed2[type](seed) : (0, util_crypto_1.hdEthereum)(seed, derivePath.substring(1)) : (0, util_crypto_1.keyFromPath)(PairFromSeed2[type](seed), path, type); + return (0, index_js_1.createPair)({ toSS58: this.encodeAddress, type }, derived, meta2, null); + } + encodeAddress = (address, ss58Format) => { + return this.type === "ethereum" ? (0, util_crypto_1.ethereumEncode)(address) : (0, util_crypto_1.encodeAddress)(address, ss58Format ?? this.__internal__ss58); + }; + getPair(address) { + return this.__internal__pairs.get(address); + } + getPairs() { + return this.__internal__pairs.all(); + } + getPublicKeys() { + return this.__internal__pairs.all().map(pairToPublic3); + } + removePair(address) { + this.__internal__pairs.remove(address); + } + setSS58Format(ss58) { + this.__internal__ss58 = ss58; + } + toJson(address, passphrase) { + return this.__internal__pairs.get(address).toJson(passphrase); + } + }; + exports2.Keyring = Keyring4; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/testing.js + var require_testing = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/testing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTestKeyring = exports2.PAIRSETHEREUM = exports2.PAIRSSR25519 = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_pair(); + var keyring_js_1 = require_keyring(); + exports2.PAIRSSR25519 = [ + { + p: "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d", + s: "0x98319d4ff8a9508c4bb0cf0b5a78d760a0b2082c02775e6e82370816fedfff48925a225d97aa00682d6a59b95b18780c10d7032336e88f3442b42361f4a66011", + seed: "Alice", + type: "sr25519" + }, + { + p: "0xbe5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f", + s: "0xe8da6c9d810e020f5e3c7f5af2dea314cbeaa0d72bc6421e92c0808a0c584a6046ab28e97c3ffc77fe12b5a4d37e8cd4afbfebbf2391ffc7cb07c0f38c023efd", + seed: "Alice//stash", + type: "sr25519" + }, + { + p: "0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48", + s: "0x081ff694633e255136bdb456c20a5fc8fed21f8b964c11bb17ff534ce80ebd5941ae88f85d0c1bfc37be41c904e1dfc01de8c8067b0d6d5df25dd1ac0894a325", + seed: "Bob", + type: "sr25519" + }, + { + p: "0xfe65717dad0447d715f660a0a58411de509b42e6efb8375f562f58a554d5860e", + s: "0xc006507cdfc267a21532394c49ca9b754ca71de21e15a1cdf807c7ceab6d0b6c3ed408d9d35311540dcd54931933e67cf1ea10d46f75408f82b789d9bd212fde", + seed: "Bob//stash", + type: "sr25519" + }, + { + p: "0x90b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22", + s: "0xa8f2d83016052e5d6d77b2f6fd5d59418922a09024cda701b3c34369ec43a7668faf12ff39cd4e5d92bb773972f41a7a5279ebc2ed92264bed8f47d344f8f18c", + seed: "Charlie", + type: "sr25519" + }, + { + p: "0x306721211d5404bd9da88e0204360a1a9ab8b87c66c1bc2fcdd37f3c2222cc20", + s: "0x20e05482ca4677e0edbc58ae9a3a59f6ed3b1a9484ba17e64d6fe8688b2b7b5d108c4487b9323b98b11fe36cb301b084e920f7b7895536809a6d62a451b25568", + seed: "Dave", + type: "sr25519" + }, + { + p: "0xe659a7a1628cdd93febc04a4e0646ea20e9f5f0ce097d9a05290d4a9e054df4e", + s: "0x683576abfd5dc35273e4264c23095a1bf21c14517bece57c7f0cc5c0ed4ce06a3dbf386b7828f348abe15d76973a72009e6ef86a5c91db2990cb36bb657c6587", + seed: "Eve", + type: "sr25519" + }, + { + p: "0x1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c", + s: "0xb835c20f450079cf4f513900ae9faf8df06ad86c681884122c752a4b2bf74d4303e4f21bc6cc62bb4eeed5a9cce642c25e2d2ac1464093b50f6196d78e3a7426", + seed: "Ferdie", + type: "sr25519" + } + ]; + exports2.PAIRSETHEREUM = [ + { + name: "Alith", + p: "0x02509540919faacf9ab52146c9aa40db68172d83777250b28e4679176e49ccdd9f", + s: "0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133", + type: "ethereum" + }, + { + name: "Baltathar", + p: "0x033bc19e36ff1673910575b6727a974a9abd80c9a875d41ab3e2648dbfb9e4b518", + s: "0x8075991ce870b93a8870eca0c0f91913d12f47948ca0fd25b49c6fa7cdbeee8b", + type: "ethereum" + }, + { + name: "Charleth", + p: "0x0234637bdc0e89b5d46543bcbf8edff329d2702bc995e27e9af4b1ba009a3c2a5e", + s: "0x0b6e18cafb6ed99687ec547bd28139cafdd2bffe70e6b688025de6b445aa5c5b", + type: "ethereum" + }, + { + name: "Dorothy", + p: "0x02a00d60b2b408c2a14c5d70cdd2c205db8985ef737a7e55ad20ea32cc9e7c417c", + s: "0x39539ab1876910bbf3a223d84a29e28f1cb4e2e456503e7e91ed39b2e7223d68", + type: "ethereum" + }, + { + name: "Ethan", + p: "0x025cdc005b752651cd3f728fb9192182acb3a9c89e19072cbd5b03f3ee1f1b3ffa", + s: "0x7dce9bc8babb68fec1409be38c8e1a52650206a7ed90ff956ae8a6d15eeaaef4", + type: "ethereum" + }, + { + name: "Faith", + p: "0x037964b6c9d546da4646ada28a99e34acaa1d14e7aba861a9055f9bd200c8abf74", + s: "0xb9d2ea9a615f3165812e8d44de0d24da9bbd164b65c4f0573e1ce2c8dbd9c8df", + type: "ethereum" + } + ]; + function createMeta2(name6, seed) { + if (!name6 && !seed) { + throw new Error("Testing pair should have either a name or a seed"); + } + return { + isTesting: true, + name: name6 || seed?.replace("//", "_").toLowerCase() + }; + } + function createTestKeyring2(options = {}, isDerived = true) { + const keyring3 = new keyring_js_1.Keyring(options); + const pairs = options.type === "ethereum" ? exports2.PAIRSETHEREUM : exports2.PAIRSSR25519; + for (const { name: name6, p, s, seed, type } of pairs) { + const meta2 = createMeta2(name6, seed); + const pair = !isDerived && !name6 && seed ? keyring3.addFromUri(seed, meta2, options.type) : keyring3.addPair((0, index_js_1.createPair)({ toSS58: keyring3.encodeAddress, type }, { publicKey: (0, util_1.hexToU8a)(p), secretKey: (0, util_1.hexToU8a)(s) }, meta2)); + pair.lock = () => { + }; + } + return keyring3; + } + exports2.createTestKeyring = createTestKeyring2; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/pair/nobody.js + var require_nobody = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/pair/nobody.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.nobody = void 0; + var publicKey = new Uint8Array(32); + var address = "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM"; + var meta2 = { + isTesting: true, + name: "nobody" + }; + var json = { + address, + encoded: "", + encoding: { + content: ["pkcs8", "ed25519"], + type: "none", + version: "0" + }, + meta: meta2 + }; + var pair = { + address, + addressRaw: publicKey, + decodePkcs8: (_passphrase, _encoded) => void 0, + derive: (_suri, _meta) => pair, + encodePkcs8: (_passphrase) => new Uint8Array(0), + isLocked: true, + lock: () => { + }, + meta: meta2, + publicKey, + setMeta: (_meta) => void 0, + sign: (_message) => new Uint8Array(64), + toJson: (_passphrase) => json, + type: "ed25519", + unlock: (_passphrase) => void 0, + verify: (_message, _signature) => false, + vrfSign: (_message, _context, _extra) => new Uint8Array(96), + vrfVerify: (_message, _vrfResult, _context, _extra) => false + }; + function nobody() { + return pair; + } + exports2.nobody = nobody; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/testingPairs.js + var require_testingPairs = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/testingPairs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTestPairs = void 0; + var nobody_js_1 = require_nobody(); + var testing_js_1 = require_testing(); + function createTestPairs(options, isDerived = true) { + const keyring3 = (0, testing_js_1.createTestKeyring)(options, isDerived); + const pairs = keyring3.getPairs(); + const map2 = { nobody: (0, nobody_js_1.nobody)() }; + for (const p of pairs) { + if (p.meta.name) { + map2[p.meta.name] = p; + } + } + return map2; + } + exports2.createTestPairs = createTestPairs; + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/bundle.js + var require_bundle11 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTestPairs = exports2.createTestKeyring = exports2.createPair = exports2.packageInfo = exports2.Keyring = exports2.setSS58Format = exports2.encodeAddress = exports2.decodeAddress = void 0; + var tslib_1 = require_tslib(); + var util_crypto_1 = require_cjs6(); + Object.defineProperty(exports2, "decodeAddress", { enumerable: true, get: function() { + return util_crypto_1.decodeAddress; + } }); + Object.defineProperty(exports2, "encodeAddress", { enumerable: true, get: function() { + return util_crypto_1.encodeAddress; + } }); + Object.defineProperty(exports2, "setSS58Format", { enumerable: true, get: function() { + return util_crypto_1.setSS58Format; + } }); + var keyring_js_1 = require_keyring(); + Object.defineProperty(exports2, "Keyring", { enumerable: true, get: function() { + return keyring_js_1.Keyring; + } }); + var packageInfo_js_1 = require_packageInfo21(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + var index_js_1 = require_pair(); + Object.defineProperty(exports2, "createPair", { enumerable: true, get: function() { + return index_js_1.createPair; + } }); + var testing_js_1 = require_testing(); + Object.defineProperty(exports2, "createTestKeyring", { enumerable: true, get: function() { + return testing_js_1.createTestKeyring; + } }); + var testingPairs_js_1 = require_testingPairs(); + Object.defineProperty(exports2, "createTestPairs", { enumerable: true, get: function() { + return testingPairs_js_1.createTestPairs; + } }); + tslib_1.__exportStar(require_defaults5(), exports2); + } + }); + + // ../../node_modules/@polkadot/keyring/cjs/index.js + var require_cjs15 = __commonJS({ + "../../node_modules/@polkadot/keyring/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_detectPackage4(); + var bundle_js_1 = require_bundle11(); + tslib_1.__exportStar(require_bundle11(), exports2); + exports2.default = bundle_js_1.Keyring; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/packageDetect.js + var require_packageDetect9 = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo14(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo13(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_1.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/x-fetch/cjs/packageInfo.js + var require_packageInfo22 = __commonJS({ + "../../node_modules/@polkadot/x-fetch/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/x-fetch", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "12.6.2" }; + } + }); + + // ../../node_modules/@polkadot/x-fetch/cjs/browser.js + var require_browser5 = __commonJS({ + "../../node_modules/@polkadot/x-fetch/cjs/browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fetch = exports2.packageInfo = void 0; + var x_global_1 = require_cjs(); + var packageInfo_js_1 = require_packageInfo22(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + exports2.fetch = x_global_1.xglobal.fetch; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/coder/error.js + var require_error2 = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/coder/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_cjs3(); + var UNKNOWN = -99999; + function extend(that, name6, value) { + Object.defineProperty(that, name6, { + configurable: true, + enumerable: false, + value + }); + } + var RpcError = class extends Error { + code; + data; + message; + name; + stack; + constructor(message = "", code = UNKNOWN, data) { + super(); + extend(this, "message", String(message)); + extend(this, "name", this.constructor.name); + extend(this, "data", data); + extend(this, "code", code); + if ((0, util_1.isFunction)(Error.captureStackTrace)) { + Error.captureStackTrace(this, this.constructor); + } else { + const { stack } = new Error(message); + stack && extend(this, "stack", stack); + } + } + }; + __publicField(RpcError, "CODES", { + ASSERT: -90009, + INVALID_JSONRPC: -99998, + METHOD_NOT_FOUND: -32601, + UNKNOWN + }); + exports2.default = RpcError; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/coder/index.js + var require_coder = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/coder/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RpcCoder = void 0; + var tslib_1 = require_tslib(); + var util_1 = require_cjs3(); + var error_js_1 = tslib_1.__importDefault(require_error2()); + function formatErrorData(data) { + if ((0, util_1.isUndefined)(data)) { + return ""; + } + const formatted = `: ${(0, util_1.isString)(data) ? data.replace(/Error\("/g, "").replace(/\("/g, "(").replace(/"\)/g, ")").replace(/\(/g, ", ").replace(/\)/g, "") : (0, util_1.stringify)(data)}`; + return formatted.length <= 256 ? formatted : `${formatted.substring(0, 255)}\u2026`; + } + function checkError3(error) { + if (error) { + const { code, data, message } = error; + throw new error_js_1.default(`${code}: ${message}${formatErrorData(data)}`, code, data); + } + } + var RpcCoder = class { + __internal__id = 0; + decodeResponse(response) { + if (!response || response.jsonrpc !== "2.0") { + throw new Error("Invalid jsonrpc field in decoded object"); + } + const isSubscription2 = !(0, util_1.isUndefined)(response.params) && !(0, util_1.isUndefined)(response.method); + if (!(0, util_1.isNumber)(response.id) && (!isSubscription2 || !(0, util_1.isNumber)(response.params.subscription) && !(0, util_1.isString)(response.params.subscription))) { + throw new Error("Invalid id field in decoded object"); + } + checkError3(response.error); + if (response.result === void 0 && !isSubscription2) { + throw new Error("No result found in jsonrpc response"); + } + if (isSubscription2) { + checkError3(response.params.error); + return response.params.result; + } + return response.result; + } + encodeJson(method, params) { + const [id4, data] = this.encodeObject(method, params); + return [id4, (0, util_1.stringify)(data)]; + } + encodeObject(method, params) { + const id4 = ++this.__internal__id; + return [id4, { + id: id4, + jsonrpc: "2.0", + method, + params + }]; + } + }; + exports2.RpcCoder = RpcCoder; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/defaults.js + var require_defaults6 = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/defaults.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var HTTP_URL = "http://127.0.0.1:9933"; + var WS_URL = "ws://127.0.0.1:9944"; + exports2.default = { + HTTP_URL, + WS_URL + }; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/lru.js + var require_lru = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/lru.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LRUCache = exports2.DEFAULT_CAPACITY = void 0; + exports2.DEFAULT_CAPACITY = 128; + var LRUNode = class { + key; + next; + prev; + constructor(key2) { + this.key = key2; + this.next = this.prev = this; + } + }; + var LRUCache = class { + capacity; + __internal__data = /* @__PURE__ */ new Map(); + __internal__refs = /* @__PURE__ */ new Map(); + __internal__length = 0; + __internal__head; + __internal__tail; + constructor(capacity = exports2.DEFAULT_CAPACITY) { + this.capacity = capacity; + this.__internal__head = this.__internal__tail = new LRUNode(""); + } + get length() { + return this.__internal__length; + } + get lengthData() { + return this.__internal__data.size; + } + get lengthRefs() { + return this.__internal__refs.size; + } + entries() { + const keys = this.keys(); + const count = keys.length; + const entries = new Array(count); + for (let i = 0; i < count; i++) { + const key2 = keys[i]; + entries[i] = [key2, this.__internal__data.get(key2)]; + } + return entries; + } + keys() { + const keys = []; + if (this.__internal__length) { + let curr = this.__internal__head; + while (curr !== this.__internal__tail) { + keys.push(curr.key); + curr = curr.next; + } + keys.push(curr.key); + } + return keys; + } + get(key2) { + const data = this.__internal__data.get(key2); + if (data) { + this.__internal__toHead(key2); + return data; + } + return null; + } + set(key2, value) { + if (this.__internal__data.has(key2)) { + this.__internal__toHead(key2); + } else { + const node = new LRUNode(key2); + this.__internal__refs.set(node.key, node); + if (this.length === 0) { + this.__internal__head = this.__internal__tail = node; + } else { + this.__internal__head.prev = node; + node.next = this.__internal__head; + this.__internal__head = node; + } + if (this.__internal__length === this.capacity) { + this.__internal__data.delete(this.__internal__tail.key); + this.__internal__refs.delete(this.__internal__tail.key); + this.__internal__tail = this.__internal__tail.prev; + this.__internal__tail.next = this.__internal__head; + } else { + this.__internal__length += 1; + } + } + this.__internal__data.set(key2, value); + } + __internal__toHead(key2) { + const ref = this.__internal__refs.get(key2); + if (ref && ref !== this.__internal__head) { + ref.prev.next = ref.next; + ref.next.prev = ref.prev; + ref.next = this.__internal__head; + this.__internal__head.prev = ref; + this.__internal__head = ref; + } + } + }; + exports2.LRUCache = LRUCache; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/http/index.js + var require_http = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/http/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpProvider = void 0; + var tslib_1 = require_tslib(); + var util_1 = require_cjs3(); + var x_fetch_1 = require_browser5(); + var index_js_1 = require_coder(); + var defaults_js_1 = tslib_1.__importDefault(require_defaults6()); + var lru_js_1 = require_lru(); + var ERROR_SUBSCRIBE = "HTTP Provider does not have subscriptions, use WebSockets instead"; + var l15 = (0, util_1.logger)("api-http"); + var HttpProvider = class { + __internal__callCache = new lru_js_1.LRUCache(); + __internal__coder; + __internal__endpoint; + __internal__headers; + __internal__stats; + constructor(endpoint = defaults_js_1.default.HTTP_URL, headers = {}) { + if (!/^(https|http):\/\//.test(endpoint)) { + throw new Error(`Endpoint should start with 'http://' or 'https://', received '${endpoint}'`); + } + this.__internal__coder = new index_js_1.RpcCoder(); + this.__internal__endpoint = endpoint; + this.__internal__headers = headers; + this.__internal__stats = { + active: { requests: 0, subscriptions: 0 }, + total: { bytesRecv: 0, bytesSent: 0, cached: 0, errors: 0, requests: 0, subscriptions: 0, timeout: 0 } + }; + } + get hasSubscriptions() { + return false; + } + clone() { + return new HttpProvider(this.__internal__endpoint, this.__internal__headers); + } + async connect() { + } + async disconnect() { + } + get stats() { + return this.__internal__stats; + } + get isClonable() { + return true; + } + get isConnected() { + return true; + } + on(_type, _sub) { + l15.error("HTTP Provider does not have 'on' emitters, use WebSockets instead"); + return util_1.noop; + } + async send(method, params, isCacheable) { + this.__internal__stats.total.requests++; + const [, body] = this.__internal__coder.encodeJson(method, params); + const cacheKey = isCacheable ? `${method}::${(0, util_1.stringify)(params)}` : ""; + let resultPromise = isCacheable ? this.__internal__callCache.get(cacheKey) : null; + if (!resultPromise) { + resultPromise = this.__internal__send(body); + if (isCacheable) { + this.__internal__callCache.set(cacheKey, resultPromise); + } + } else { + this.__internal__stats.total.cached++; + } + return resultPromise; + } + async __internal__send(body) { + this.__internal__stats.active.requests++; + this.__internal__stats.total.bytesSent += body.length; + try { + const response = await (0, x_fetch_1.fetch)(this.__internal__endpoint, { + body, + headers: { + Accept: "application/json", + "Content-Length": `${body.length}`, + "Content-Type": "application/json", + ...this.__internal__headers + }, + method: "POST" + }); + if (!response.ok) { + throw new Error(`[${response.status}]: ${response.statusText}`); + } + const result = await response.text(); + this.__internal__stats.total.bytesRecv += result.length; + const decoded = this.__internal__coder.decodeResponse(JSON.parse(result)); + this.__internal__stats.active.requests--; + return decoded; + } catch (e) { + this.__internal__stats.active.requests--; + this.__internal__stats.total.errors++; + throw e; + } + } + async subscribe(_types, _method, _params, _cb) { + l15.error(ERROR_SUBSCRIBE); + throw new Error(ERROR_SUBSCRIBE); + } + async unsubscribe(_type, _method, _id) { + l15.error(ERROR_SUBSCRIBE); + throw new Error(ERROR_SUBSCRIBE); + } + }; + exports2.HttpProvider = HttpProvider; + } + }); + + // ../../node_modules/eventemitter3/index.js + var require_eventemitter3 = __commonJS({ + "../../node_modules/eventemitter3/index.js"(exports2, module2) { + "use strict"; + var has = Object.prototype.hasOwnProperty; + var prefix = "~"; + function Events() { + } + if (Object.create) { + Events.prototype = /* @__PURE__ */ Object.create(null); + if (!new Events().__proto__) + prefix = false; + } + function EE2(fn2, context2, once) { + this.fn = fn2; + this.context = context2; + this.once = once || false; + } + function addListener(emitter, event, fn2, context2, once) { + if (typeof fn2 !== "function") { + throw new TypeError("The listener must be a function"); + } + var listener = new EE2(fn2, context2 || emitter, once), evt = prefix ? prefix + event : event; + if (!emitter._events[evt]) + emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) + emitter._events[evt].push(listener); + else + emitter._events[evt] = [emitter._events[evt], listener]; + return emitter; + } + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) + emitter._events = new Events(); + else + delete emitter._events[evt]; + } + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + EventEmitter.prototype.eventNames = function eventNames() { + var names2 = [], events, name6; + if (this._eventsCount === 0) + return names2; + for (name6 in events = this._events) { + if (has.call(events, name6)) + names2.push(prefix ? name6.slice(1) : name6); + } + if (Object.getOwnPropertySymbols) { + return names2.concat(Object.getOwnPropertySymbols(events)); + } + return names2; + }; + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event, handlers = this._events[evt]; + if (!handlers) + return []; + if (handlers.fn) + return [handlers.fn]; + for (var i = 0, l15 = handlers.length, ee = new Array(l15); i < l15; i++) { + ee[i] = handlers[i].fn; + } + return ee; + }; + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event, listeners = this._events[evt]; + if (!listeners) + return 0; + if (listeners.fn) + return 1; + return listeners.length; + }; + EventEmitter.prototype.emit = function emit(event, a1, a22, a32, a42, a52) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return false; + var listeners = this._events[evt], len = arguments.length, args, i; + if (listeners.fn) { + if (listeners.once) + this.removeListener(event, listeners.fn, void 0, true); + switch (len) { + case 1: + return listeners.fn.call(listeners.context), true; + case 2: + return listeners.fn.call(listeners.context, a1), true; + case 3: + return listeners.fn.call(listeners.context, a1, a22), true; + case 4: + return listeners.fn.call(listeners.context, a1, a22, a32), true; + case 5: + return listeners.fn.call(listeners.context, a1, a22, a32, a42), true; + case 6: + return listeners.fn.call(listeners.context, a1, a22, a32, a42, a52), true; + } + for (i = 1, args = new Array(len - 1); i < len; i++) { + args[i - 1] = arguments[i]; + } + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length, j10; + for (i = 0; i < length; i++) { + if (listeners[i].once) + this.removeListener(event, listeners[i].fn, void 0, true); + switch (len) { + case 1: + listeners[i].fn.call(listeners[i].context); + break; + case 2: + listeners[i].fn.call(listeners[i].context, a1); + break; + case 3: + listeners[i].fn.call(listeners[i].context, a1, a22); + break; + case 4: + listeners[i].fn.call(listeners[i].context, a1, a22, a32); + break; + default: + if (!args) + for (j10 = 1, args = new Array(len - 1); j10 < len; j10++) { + args[j10 - 1] = arguments[j10]; + } + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + return true; + }; + EventEmitter.prototype.on = function on2(event, fn2, context2) { + return addListener(this, event, fn2, context2, false); + }; + EventEmitter.prototype.once = function once(event, fn2, context2) { + return addListener(this, event, fn2, context2, true); + }; + EventEmitter.prototype.removeListener = function removeListener(event, fn2, context2, once) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return this; + if (!fn2) { + clearEvent(this, evt); + return this; + } + var listeners = this._events[evt]; + if (listeners.fn) { + if (listeners.fn === fn2 && (!once || listeners.once) && (!context2 || listeners.context === context2)) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if (listeners[i].fn !== fn2 || once && !listeners[i].once || context2 && listeners[i].context !== context2) { + events.push(listeners[i]); + } + } + if (events.length) + this._events[evt] = events.length === 1 ? events[0] : events; + else + clearEvent(this, evt); + } + return this; + }; + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) + clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + return this; + }; + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + EventEmitter.prefixed = prefix; + EventEmitter.EventEmitter = EventEmitter; + if ("undefined" !== typeof module2) { + module2.exports = EventEmitter; + } + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/substrate-connect/Health.js + var require_Health = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/substrate-connect/Health.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HealthCheckError = exports2.healthChecker = void 0; + var util_1 = require_cjs3(); + function healthChecker() { + let checker = null; + let sendJsonRpc = null; + return { + responsePassThrough: (jsonRpcResponse) => { + if (checker === null) { + return jsonRpcResponse; + } + return checker.responsePassThrough(jsonRpcResponse); + }, + sendJsonRpc: (request) => { + if (!sendJsonRpc) { + throw new Error("setSendJsonRpc must be called before sending requests"); + } + if (checker === null) { + sendJsonRpc(request); + } else { + checker.sendJsonRpc(request); + } + }, + setSendJsonRpc: (cb2) => { + sendJsonRpc = cb2; + }, + start: (healthCallback) => { + if (checker !== null) { + throw new Error("Can't start the health checker multiple times in parallel"); + } else if (!sendJsonRpc) { + throw new Error("setSendJsonRpc must be called before starting the health checks"); + } + checker = new InnerChecker(healthCallback, sendJsonRpc); + checker.update(true); + }, + stop: () => { + if (checker === null) { + return; + } + checker.destroy(); + checker = null; + } + }; + } + exports2.healthChecker = healthChecker; + var InnerChecker = class { + __internal__healthCallback; + __internal__currentHealthCheckId = null; + __internal__currentHealthTimeout = null; + __internal__currentSubunsubRequestId = null; + __internal__currentSubscriptionId = null; + __internal__requestToSmoldot; + __internal__isSyncing = false; + __internal__nextRequestId = 0; + constructor(healthCallback, requestToSmoldot) { + this.__internal__healthCallback = healthCallback; + this.__internal__requestToSmoldot = (request) => requestToSmoldot((0, util_1.stringify)(request)); + } + sendJsonRpc = (request) => { + let parsedRequest; + try { + parsedRequest = JSON.parse(request); + } catch { + return; + } + if (parsedRequest.id) { + const newId = "extern:" + (0, util_1.stringify)(parsedRequest.id); + parsedRequest.id = newId; + } + this.__internal__requestToSmoldot(parsedRequest); + }; + responsePassThrough = (jsonRpcResponse) => { + let parsedResponse; + try { + parsedResponse = JSON.parse(jsonRpcResponse); + } catch { + return jsonRpcResponse; + } + if (parsedResponse.id && this.__internal__currentHealthCheckId === parsedResponse.id) { + this.__internal__currentHealthCheckId = null; + if (!parsedResponse.result) { + this.update(false); + return null; + } + this.__internal__healthCallback(parsedResponse.result); + this.__internal__isSyncing = parsedResponse.result.isSyncing; + this.update(false); + return null; + } + if (parsedResponse.id && this.__internal__currentSubunsubRequestId === parsedResponse.id) { + this.__internal__currentSubunsubRequestId = null; + if (!parsedResponse.result) { + this.update(false); + return null; + } + if (this.__internal__currentSubscriptionId) { + this.__internal__currentSubscriptionId = null; + } else { + this.__internal__currentSubscriptionId = parsedResponse.result; + } + this.update(false); + return null; + } + if (parsedResponse.params && this.__internal__currentSubscriptionId && parsedResponse.params.subscription === this.__internal__currentSubscriptionId) { + this.update(true); + return null; + } + if (parsedResponse.id) { + const id4 = parsedResponse.id; + if (!id4.startsWith("extern:")) { + throw new Error("State inconsistency in health checker"); + } + const newId = JSON.parse(id4.slice("extern:".length)); + parsedResponse.id = newId; + } + return (0, util_1.stringify)(parsedResponse); + }; + update = (startNow) => { + if (startNow && this.__internal__currentHealthTimeout) { + clearTimeout(this.__internal__currentHealthTimeout); + this.__internal__currentHealthTimeout = null; + } + if (!this.__internal__currentHealthTimeout) { + const startHealthRequest = () => { + this.__internal__currentHealthTimeout = null; + if (this.__internal__currentHealthCheckId) { + return; + } + this.__internal__currentHealthCheckId = `health-checker:${this.__internal__nextRequestId}`; + this.__internal__nextRequestId += 1; + this.__internal__requestToSmoldot({ + id: this.__internal__currentHealthCheckId, + jsonrpc: "2.0", + method: "system_health", + params: [] + }); + }; + if (startNow) { + startHealthRequest(); + } else { + this.__internal__currentHealthTimeout = setTimeout(startHealthRequest, 1e3); + } + } + if (this.__internal__isSyncing && !this.__internal__currentSubscriptionId && !this.__internal__currentSubunsubRequestId) { + this.startSubscription(); + } + if (!this.__internal__isSyncing && this.__internal__currentSubscriptionId && !this.__internal__currentSubunsubRequestId) { + this.endSubscription(); + } + }; + startSubscription = () => { + if (this.__internal__currentSubunsubRequestId || this.__internal__currentSubscriptionId) { + throw new Error("Internal error in health checker"); + } + this.__internal__currentSubunsubRequestId = `health-checker:${this.__internal__nextRequestId}`; + this.__internal__nextRequestId += 1; + this.__internal__requestToSmoldot({ + id: this.__internal__currentSubunsubRequestId, + jsonrpc: "2.0", + method: "chain_subscribeNewHeads", + params: [] + }); + }; + endSubscription = () => { + if (this.__internal__currentSubunsubRequestId || !this.__internal__currentSubscriptionId) { + throw new Error("Internal error in health checker"); + } + this.__internal__currentSubunsubRequestId = `health-checker:${this.__internal__nextRequestId}`; + this.__internal__nextRequestId += 1; + this.__internal__requestToSmoldot({ + id: this.__internal__currentSubunsubRequestId, + jsonrpc: "2.0", + method: "chain_unsubscribeNewHeads", + params: [this.__internal__currentSubscriptionId] + }); + }; + destroy = () => { + if (this.__internal__currentHealthTimeout) { + clearTimeout(this.__internal__currentHealthTimeout); + this.__internal__currentHealthTimeout = null; + } + }; + }; + var HealthCheckError = class extends Error { + __internal__cause; + getCause() { + return this.__internal__cause; + } + constructor(response, message = "Got error response asking for system health") { + super(message); + this.__internal__cause = response; + } + }; + exports2.HealthCheckError = HealthCheckError; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/substrate-connect/index.js + var require_substrate_connect = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/substrate-connect/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ScProvider = void 0; + var eventemitter3_1 = require_eventemitter3(); + var util_1 = require_cjs3(); + var index_js_1 = require_coder(); + var Health_js_1 = require_Health(); + var l15 = (0, util_1.logger)("api-substrate-connect"); + var subscriptionUnsubscriptionMethods = /* @__PURE__ */ new Map([ + ["author_submitAndWatchExtrinsic", "author_unwatchExtrinsic"], + ["chain_subscribeAllHeads", "chain_unsubscribeAllHeads"], + ["chain_subscribeFinalizedHeads", "chain_unsubscribeFinalizedHeads"], + ["chain_subscribeFinalisedHeads", "chain_subscribeFinalisedHeads"], + ["chain_subscribeNewHeads", "chain_unsubscribeNewHeads"], + ["chain_subscribeNewHead", "chain_unsubscribeNewHead"], + ["chain_subscribeRuntimeVersion", "chain_unsubscribeRuntimeVersion"], + ["subscribe_newHead", "unsubscribe_newHead"], + ["state_subscribeRuntimeVersion", "state_unsubscribeRuntimeVersion"], + ["state_subscribeStorage", "state_unsubscribeStorage"] + ]); + var scClients = /* @__PURE__ */ new WeakMap(); + var ScProvider = class { + __internal__Sc; + __internal__coder = new index_js_1.RpcCoder(); + __internal__spec; + __internal__sharedSandbox; + __internal__subscriptions = /* @__PURE__ */ new Map(); + __internal__resubscribeMethods = /* @__PURE__ */ new Map(); + __internal__requests = /* @__PURE__ */ new Map(); + __internal__wellKnownChains; + __internal__eventemitter = new eventemitter3_1.EventEmitter(); + __internal__chain = null; + __internal__isChainReady = false; + constructor(Sc2, spec2, sharedSandbox) { + if (!(0, util_1.isObject)(Sc2) || !(0, util_1.isObject)(Sc2.WellKnownChain) || !(0, util_1.isFunction)(Sc2.createScClient)) { + throw new Error("Expected an @substrate/connect interface as first parameter to ScProvider"); + } + this.__internal__Sc = Sc2; + this.__internal__spec = spec2; + this.__internal__sharedSandbox = sharedSandbox; + this.__internal__wellKnownChains = new Set(Object.values(Sc2.WellKnownChain)); + } + get hasSubscriptions() { + return true; + } + get isClonable() { + return false; + } + get isConnected() { + return !!this.__internal__chain && this.__internal__isChainReady; + } + clone() { + throw new Error("clone() is not supported."); + } + async connect(config7, checkerFactory = Health_js_1.healthChecker) { + if (this.isConnected) { + throw new Error("Already connected!"); + } + if (this.__internal__chain) { + await this.__internal__chain; + return; + } + if (this.__internal__sharedSandbox && !this.__internal__sharedSandbox.isConnected) { + await this.__internal__sharedSandbox.connect(); + } + const client = this.__internal__sharedSandbox ? scClients.get(this.__internal__sharedSandbox) : this.__internal__Sc.createScClient(config7); + if (!client) { + throw new Error("Unknown ScProvider!"); + } + scClients.set(this, client); + const hc = checkerFactory(); + const onResponse = (res) => { + const hcRes = hc.responsePassThrough(res); + if (!hcRes) { + return; + } + const response = JSON.parse(hcRes); + let decodedResponse; + try { + decodedResponse = this.__internal__coder.decodeResponse(response); + } catch (e) { + decodedResponse = e; + } + if (response.params?.subscription === void 0 || !response.method) { + return this.__internal__requests.get(response.id)?.(decodedResponse); + } + const subscriptionId = `${response.method}::${response.params.subscription}`; + const callback = this.__internal__subscriptions.get(subscriptionId)?.[0]; + callback?.(decodedResponse); + }; + const addChain = this.__internal__sharedSandbox ? async (...args) => { + const source = this.__internal__sharedSandbox; + return (await source.__internal__chain).addChain(...args); + } : this.__internal__wellKnownChains.has(this.__internal__spec) ? client.addWellKnownChain : client.addChain; + this.__internal__chain = addChain(this.__internal__spec, onResponse).then((chain4) => { + hc.setSendJsonRpc(chain4.sendJsonRpc); + this.__internal__isChainReady = false; + const cleanup = () => { + const disconnectionError = new Error("Disconnected"); + this.__internal__requests.forEach((cb2) => cb2(disconnectionError)); + this.__internal__subscriptions.forEach(([cb2]) => cb2(disconnectionError)); + this.__internal__subscriptions.clear(); + }; + const staleSubscriptions = []; + const killStaleSubscriptions = () => { + if (staleSubscriptions.length === 0) { + return; + } + const stale = staleSubscriptions.pop(); + if (!stale) { + throw new Error("Unable to get stale subscription"); + } + const { id: id4, unsubscribeMethod } = stale; + Promise.race([ + this.send(unsubscribeMethod, [id4]).catch(util_1.noop), + new Promise((resolve) => setTimeout(resolve, 500)) + ]).then(killStaleSubscriptions).catch(util_1.noop); + }; + hc.start((health) => { + const isReady2 = !health.isSyncing && (health.peers > 0 || !health.shouldHavePeers); + if (this.__internal__isChainReady === isReady2) { + return; + } + this.__internal__isChainReady = isReady2; + if (!isReady2) { + [...this.__internal__subscriptions.values()].forEach((s) => { + staleSubscriptions.push(s[1]); + }); + cleanup(); + this.__internal__eventemitter.emit("disconnected"); + } else { + killStaleSubscriptions(); + this.__internal__eventemitter.emit("connected"); + if (this.__internal__resubscribeMethods.size) { + this.__internal__resubscribe(); + } + } + }); + return (0, util_1.objectSpread)({}, chain4, { + remove: () => { + hc.stop(); + chain4.remove(); + cleanup(); + }, + sendJsonRpc: hc.sendJsonRpc.bind(hc) + }); + }); + try { + await this.__internal__chain; + } catch (e) { + this.__internal__chain = null; + this.__internal__eventemitter.emit("error", e); + throw e; + } + } + __internal__resubscribe = () => { + const promises = []; + this.__internal__resubscribeMethods.forEach((subDetails) => { + if (subDetails.type.startsWith("author_")) { + return; + } + try { + const promise = new Promise((resolve) => { + this.subscribe(subDetails.type, subDetails.method, subDetails.params, subDetails.callback).catch((error) => console.log(error)); + resolve(); + }); + promises.push(promise); + } catch (error) { + l15.error(error); + } + }); + Promise.all(promises).catch((err) => l15.log(err)); + }; + async disconnect() { + if (!this.__internal__chain) { + return; + } + const chain4 = await this.__internal__chain; + this.__internal__chain = null; + this.__internal__isChainReady = false; + try { + chain4.remove(); + } catch (_) { + } + this.__internal__eventemitter.emit("disconnected"); + } + on(type, sub) { + if (type === "connected" && this.isConnected) { + sub(); + } + this.__internal__eventemitter.on(type, sub); + return () => { + this.__internal__eventemitter.removeListener(type, sub); + }; + } + async send(method, params) { + if (!this.isConnected || !this.__internal__chain) { + throw new Error("Provider is not connected"); + } + const chain4 = await this.__internal__chain; + const [id4, json] = this.__internal__coder.encodeJson(method, params); + const result = new Promise((resolve, reject) => { + this.__internal__requests.set(id4, (response) => { + ((0, util_1.isError)(response) ? reject : resolve)(response); + }); + try { + chain4.sendJsonRpc(json); + } catch (e) { + this.__internal__chain = null; + try { + chain4.remove(); + } catch (_) { + } + this.__internal__eventemitter.emit("error", e); + } + }); + try { + return await result; + } finally { + this.__internal__requests.delete(id4); + } + } + async subscribe(type, method, params, callback) { + if (!subscriptionUnsubscriptionMethods.has(method)) { + throw new Error(`Unsupported subscribe method: ${method}`); + } + const id4 = await this.send(method, params); + const subscriptionId = `${type}::${id4}`; + const cb2 = (response) => { + if (response instanceof Error) { + callback(response, void 0); + } else { + callback(null, response); + } + }; + const unsubscribeMethod = subscriptionUnsubscriptionMethods.get(method); + if (!unsubscribeMethod) { + throw new Error("Invalid unsubscribe method found"); + } + this.__internal__resubscribeMethods.set(subscriptionId, { callback, method, params, type }); + this.__internal__subscriptions.set(subscriptionId, [cb2, { id: id4, unsubscribeMethod }]); + return id4; + } + unsubscribe(type, method, id4) { + if (!this.isConnected) { + throw new Error("Provider is not connected"); + } + const subscriptionId = `${type}::${id4}`; + if (!this.__internal__subscriptions.has(subscriptionId)) { + return Promise.reject(new Error(`Unable to find active subscription=${subscriptionId}`)); + } + this.__internal__resubscribeMethods.delete(subscriptionId); + this.__internal__subscriptions.delete(subscriptionId); + return this.send(method, [id4]); + } + }; + exports2.ScProvider = ScProvider; + } + }); + + // ../../node_modules/@polkadot/x-ws/cjs/packageInfo.js + var require_packageInfo23 = __commonJS({ + "../../node_modules/@polkadot/x-ws/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/x-ws", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "12.6.2" }; + } + }); + + // ../../node_modules/@polkadot/x-ws/cjs/browser.js + var require_browser6 = __commonJS({ + "../../node_modules/@polkadot/x-ws/cjs/browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WebSocket = exports2.packageInfo = void 0; + var x_global_1 = require_cjs(); + var packageInfo_js_1 = require_packageInfo23(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + exports2.WebSocket = x_global_1.xglobal.WebSocket; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/ws/errors.js + var require_errors2 = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/ws/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getWSErrorString = void 0; + var known = { + 1e3: "Normal Closure", + 1001: "Going Away", + 1002: "Protocol Error", + 1003: "Unsupported Data", + 1004: "(For future)", + 1005: "No Status Received", + 1006: "Abnormal Closure", + 1007: "Invalid frame payload data", + 1008: "Policy Violation", + 1009: "Message too big", + 1010: "Missing Extension", + 1011: "Internal Error", + 1012: "Service Restart", + 1013: "Try Again Later", + 1014: "Bad Gateway", + 1015: "TLS Handshake" + }; + function getWSErrorString(code) { + if (code >= 0 && code <= 999) { + return "(Unused)"; + } else if (code >= 1016) { + if (code <= 1999) { + return "(For WebSocket standard)"; + } else if (code <= 2999) { + return "(For WebSocket extensions)"; + } else if (code <= 3999) { + return "(For libraries and frameworks)"; + } else if (code <= 4999) { + return "(For applications)"; + } + } + return known[code] || "(Unknown)"; + } + exports2.getWSErrorString = getWSErrorString; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/ws/index.js + var require_ws = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/ws/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WsProvider = void 0; + var tslib_1 = require_tslib(); + var eventemitter3_1 = require_eventemitter3(); + var util_1 = require_cjs3(); + var x_global_1 = require_cjs(); + var x_ws_1 = require_browser6(); + var index_js_1 = require_coder(); + var defaults_js_1 = tslib_1.__importDefault(require_defaults6()); + var lru_js_1 = require_lru(); + var errors_js_1 = require_errors2(); + var ALIASES = { + chain_finalisedHead: "chain_finalizedHead", + chain_subscribeFinalisedHeads: "chain_subscribeFinalizedHeads", + chain_unsubscribeFinalisedHeads: "chain_unsubscribeFinalizedHeads" + }; + var RETRY_DELAY = 2500; + var DEFAULT_TIMEOUT_MS = 60 * 1e3; + var TIMEOUT_INTERVAL = 5e3; + var l15 = (0, util_1.logger)("api-ws"); + function eraseRecord(record, cb2) { + Object.keys(record).forEach((key2) => { + if (cb2) { + cb2(record[key2]); + } + delete record[key2]; + }); + } + function defaultEndpointStats() { + return { bytesRecv: 0, bytesSent: 0, cached: 0, errors: 0, requests: 0, subscriptions: 0, timeout: 0 }; + } + var WsProvider = class { + __internal__callCache; + __internal__coder; + __internal__endpoints; + __internal__headers; + __internal__eventemitter; + __internal__handlers = {}; + __internal__isReadyPromise; + __internal__stats; + __internal__waitingForId = {}; + __internal__autoConnectMs; + __internal__endpointIndex; + __internal__endpointStats; + __internal__isConnected = false; + __internal__subscriptions = {}; + __internal__timeoutId = null; + __internal__websocket; + __internal__timeout; + constructor(endpoint = defaults_js_1.default.WS_URL, autoConnectMs = RETRY_DELAY, headers = {}, timeout, cacheCapacity) { + const endpoints = Array.isArray(endpoint) ? endpoint : [endpoint]; + if (endpoints.length === 0) { + throw new Error("WsProvider requires at least one Endpoint"); + } + endpoints.forEach((endpoint2) => { + if (!/^(wss|ws):\/\//.test(endpoint2)) { + throw new Error(`Endpoint should start with 'ws://', received '${endpoint2}'`); + } + }); + this.__internal__callCache = new lru_js_1.LRUCache(cacheCapacity || lru_js_1.DEFAULT_CAPACITY); + this.__internal__eventemitter = new eventemitter3_1.EventEmitter(); + this.__internal__autoConnectMs = autoConnectMs || 0; + this.__internal__coder = new index_js_1.RpcCoder(); + this.__internal__endpointIndex = -1; + this.__internal__endpoints = endpoints; + this.__internal__headers = headers; + this.__internal__websocket = null; + this.__internal__stats = { + active: { requests: 0, subscriptions: 0 }, + total: defaultEndpointStats() + }; + this.__internal__endpointStats = defaultEndpointStats(); + this.__internal__timeout = timeout || DEFAULT_TIMEOUT_MS; + if (autoConnectMs && autoConnectMs > 0) { + this.connectWithRetry().catch(util_1.noop); + } + this.__internal__isReadyPromise = new Promise((resolve) => { + this.__internal__eventemitter.once("connected", () => { + resolve(this); + }); + }); + } + get hasSubscriptions() { + return true; + } + get isClonable() { + return true; + } + get isConnected() { + return this.__internal__isConnected; + } + get isReady() { + return this.__internal__isReadyPromise; + } + get endpoint() { + return this.__internal__endpoints[this.__internal__endpointIndex]; + } + clone() { + return new WsProvider(this.__internal__endpoints); + } + selectEndpointIndex(endpoints) { + return (this.__internal__endpointIndex + 1) % endpoints.length; + } + async connect() { + if (this.__internal__websocket) { + throw new Error("WebSocket is already connected"); + } + try { + this.__internal__endpointIndex = this.selectEndpointIndex(this.__internal__endpoints); + this.__internal__websocket = typeof x_global_1.xglobal.WebSocket !== "undefined" && (0, util_1.isChildClass)(x_global_1.xglobal.WebSocket, x_ws_1.WebSocket) ? new x_ws_1.WebSocket(this.endpoint) : new x_ws_1.WebSocket(this.endpoint, void 0, { + headers: this.__internal__headers + }); + if (this.__internal__websocket) { + this.__internal__websocket.onclose = this.__internal__onSocketClose; + this.__internal__websocket.onerror = this.__internal__onSocketError; + this.__internal__websocket.onmessage = this.__internal__onSocketMessage; + this.__internal__websocket.onopen = this.__internal__onSocketOpen; + } + this.__internal__timeoutId = setInterval(() => this.__internal__timeoutHandlers(), TIMEOUT_INTERVAL); + } catch (error) { + l15.error(error); + this.__internal__emit("error", error); + throw error; + } + } + async connectWithRetry() { + if (this.__internal__autoConnectMs > 0) { + try { + await this.connect(); + } catch { + setTimeout(() => { + this.connectWithRetry().catch(util_1.noop); + }, this.__internal__autoConnectMs); + } + } + } + async disconnect() { + this.__internal__autoConnectMs = 0; + try { + if (this.__internal__websocket) { + this.__internal__websocket.close(1e3); + } + } catch (error) { + l15.error(error); + this.__internal__emit("error", error); + throw error; + } + } + get stats() { + return { + active: { + requests: Object.keys(this.__internal__handlers).length, + subscriptions: Object.keys(this.__internal__subscriptions).length + }, + total: this.__internal__stats.total + }; + } + get endpointStats() { + return this.__internal__endpointStats; + } + on(type, sub) { + this.__internal__eventemitter.on(type, sub); + return () => { + this.__internal__eventemitter.removeListener(type, sub); + }; + } + send(method, params, isCacheable, subscription) { + this.__internal__endpointStats.requests++; + this.__internal__stats.total.requests++; + const [id4, body] = this.__internal__coder.encodeJson(method, params); + const cacheKey = isCacheable ? `${method}::${(0, util_1.stringify)(params)}` : ""; + let resultPromise = isCacheable ? this.__internal__callCache.get(cacheKey) : null; + if (!resultPromise) { + resultPromise = this.__internal__send(id4, body, method, params, subscription); + if (isCacheable) { + this.__internal__callCache.set(cacheKey, resultPromise); + } + } else { + this.__internal__endpointStats.cached++; + this.__internal__stats.total.cached++; + } + return resultPromise; + } + async __internal__send(id4, body, method, params, subscription) { + return new Promise((resolve, reject) => { + try { + if (!this.isConnected || this.__internal__websocket === null) { + throw new Error("WebSocket is not connected"); + } + const callback = (error, result) => { + error ? reject(error) : resolve(result); + }; + l15.debug(() => ["calling", method, body]); + this.__internal__handlers[id4] = { + callback, + method, + params, + start: Date.now(), + subscription + }; + const bytesSent = body.length; + this.__internal__endpointStats.bytesSent += bytesSent; + this.__internal__stats.total.bytesSent += bytesSent; + this.__internal__websocket.send(body); + } catch (error) { + this.__internal__endpointStats.errors++; + this.__internal__stats.total.errors++; + reject(error); + } + }); + } + subscribe(type, method, params, callback) { + this.__internal__endpointStats.subscriptions++; + this.__internal__stats.total.subscriptions++; + return this.send(method, params, false, { callback, type }); + } + async unsubscribe(type, method, id4) { + const subscription = `${type}::${id4}`; + if ((0, util_1.isUndefined)(this.__internal__subscriptions[subscription])) { + l15.debug(() => `Unable to find active subscription=${subscription}`); + return false; + } + delete this.__internal__subscriptions[subscription]; + try { + return this.isConnected && !(0, util_1.isNull)(this.__internal__websocket) ? this.send(method, [id4]) : true; + } catch { + return false; + } + } + __internal__emit = (type, ...args) => { + this.__internal__eventemitter.emit(type, ...args); + }; + __internal__onSocketClose = (event) => { + const error = new Error(`disconnected from ${this.endpoint}: ${event.code}:: ${event.reason || (0, errors_js_1.getWSErrorString)(event.code)}`); + if (this.__internal__autoConnectMs > 0) { + l15.error(error.message); + } + this.__internal__isConnected = false; + if (this.__internal__websocket) { + this.__internal__websocket.onclose = null; + this.__internal__websocket.onerror = null; + this.__internal__websocket.onmessage = null; + this.__internal__websocket.onopen = null; + this.__internal__websocket = null; + } + if (this.__internal__timeoutId) { + clearInterval(this.__internal__timeoutId); + this.__internal__timeoutId = null; + } + eraseRecord(this.__internal__handlers, (h) => { + try { + h.callback(error, void 0); + } catch (err) { + l15.error(err); + } + }); + eraseRecord(this.__internal__waitingForId); + this.__internal__endpointStats = defaultEndpointStats(); + this.__internal__emit("disconnected"); + if (this.__internal__autoConnectMs > 0) { + setTimeout(() => { + this.connectWithRetry().catch(util_1.noop); + }, this.__internal__autoConnectMs); + } + }; + __internal__onSocketError = (error) => { + l15.debug(() => ["socket error", error]); + this.__internal__emit("error", error); + }; + __internal__onSocketMessage = (message) => { + l15.debug(() => ["received", message.data]); + const bytesRecv = message.data.length; + this.__internal__endpointStats.bytesRecv += bytesRecv; + this.__internal__stats.total.bytesRecv += bytesRecv; + const response = JSON.parse(message.data); + return (0, util_1.isUndefined)(response.method) ? this.__internal__onSocketMessageResult(response) : this.__internal__onSocketMessageSubscribe(response); + }; + __internal__onSocketMessageResult = (response) => { + const handler = this.__internal__handlers[response.id]; + if (!handler) { + l15.debug(() => `Unable to find handler for id=${response.id}`); + return; + } + try { + const { method, params, subscription } = handler; + const result = this.__internal__coder.decodeResponse(response); + handler.callback(null, result); + if (subscription) { + const subId = `${subscription.type}::${result}`; + this.__internal__subscriptions[subId] = (0, util_1.objectSpread)({}, subscription, { + method, + params + }); + if (this.__internal__waitingForId[subId]) { + this.__internal__onSocketMessageSubscribe(this.__internal__waitingForId[subId]); + } + } + } catch (error) { + this.__internal__endpointStats.errors++; + this.__internal__stats.total.errors++; + handler.callback(error, void 0); + } + delete this.__internal__handlers[response.id]; + }; + __internal__onSocketMessageSubscribe = (response) => { + if (!response.method) { + throw new Error("No method found in JSONRPC response"); + } + const method = ALIASES[response.method] || response.method; + const subId = `${method}::${response.params.subscription}`; + const handler = this.__internal__subscriptions[subId]; + if (!handler) { + this.__internal__waitingForId[subId] = response; + l15.debug(() => `Unable to find handler for subscription=${subId}`); + return; + } + delete this.__internal__waitingForId[subId]; + try { + const result = this.__internal__coder.decodeResponse(response); + handler.callback(null, result); + } catch (error) { + this.__internal__endpointStats.errors++; + this.__internal__stats.total.errors++; + handler.callback(error, void 0); + } + }; + __internal__onSocketOpen = () => { + if (this.__internal__websocket === null) { + throw new Error("WebSocket cannot be null in onOpen"); + } + l15.debug(() => ["connected to", this.endpoint]); + this.__internal__isConnected = true; + this.__internal__resubscribe(); + this.__internal__emit("connected"); + return true; + }; + __internal__resubscribe = () => { + const subscriptions = this.__internal__subscriptions; + this.__internal__subscriptions = {}; + Promise.all(Object.keys(subscriptions).map(async (id4) => { + const { callback, method, params, type } = subscriptions[id4]; + if (type.startsWith("author_")) { + return; + } + try { + await this.subscribe(type, method, params, callback); + } catch (error) { + l15.error(error); + } + })).catch(l15.error); + }; + __internal__timeoutHandlers = () => { + const now2 = Date.now(); + const ids = Object.keys(this.__internal__handlers); + for (let i = 0, count = ids.length; i < count; i++) { + const handler = this.__internal__handlers[ids[i]]; + if (now2 - handler.start > this.__internal__timeout) { + try { + handler.callback(new Error(`No response received from RPC endpoint in ${this.__internal__timeout / 1e3}s`), void 0); + } catch { + } + this.__internal__endpointStats.timeout++; + this.__internal__stats.total.timeout++; + delete this.__internal__handlers[ids[i]]; + } + } + }; + }; + exports2.WsProvider = WsProvider; + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/bundle.js + var require_bundle12 = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WsProvider = exports2.ScProvider = exports2.packageInfo = exports2.HttpProvider = void 0; + var index_js_1 = require_http(); + Object.defineProperty(exports2, "HttpProvider", { enumerable: true, get: function() { + return index_js_1.HttpProvider; + } }); + var packageInfo_js_1 = require_packageInfo13(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + var index_js_2 = require_substrate_connect(); + Object.defineProperty(exports2, "ScProvider", { enumerable: true, get: function() { + return index_js_2.ScProvider; + } }); + var index_js_3 = require_ws(); + Object.defineProperty(exports2, "WsProvider", { enumerable: true, get: function() { + return index_js_3.WsProvider; + } }); + } + }); + + // ../../node_modules/@polkadot/rpc-provider/cjs/index.js + var require_cjs16 = __commonJS({ + "../../node_modules/@polkadot/rpc-provider/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect9(); + tslib_1.__exportStar(require_bundle12(), exports2); + } + }); + + // ../../node_modules/@polkadot/api/cjs/util/logging.js + var require_logging = __commonJS({ + "../../node_modules/@polkadot/api/cjs/util/logging.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.l = void 0; + var util_1 = require_cjs3(); + exports2.l = (0, util_1.logger)("api/util"); + } + }); + + // ../../node_modules/@polkadot/api/cjs/util/filterEvents.js + var require_filterEvents = __commonJS({ + "../../node_modules/@polkadot/api/cjs/util/filterEvents.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterEvents = void 0; + var util_1 = require_cjs3(); + var logging_js_1 = require_logging(); + function filterEvents(txHash, { block: { extrinsics, header } }, allEvents, status) { + for (const [txIndex, x] of extrinsics.entries()) { + if (x.hash.eq(txHash)) { + return { + blockNumber: (0, util_1.isCompact)(header.number) ? header.number.unwrap() : header.number, + events: allEvents.filter(({ phase }) => phase.isApplyExtrinsic && phase.asApplyExtrinsic.eqn(txIndex)), + txIndex + }; + } + } + if (status.isInBlock) { + const allHashes = extrinsics.map((x) => x.hash.toHex()); + logging_js_1.l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${txHash.toHex()} inside ${allHashes.join(", ")}`); + } + return {}; + } + exports2.filterEvents = filterEvents; + } + }); + + // ../../node_modules/@polkadot/api/cjs/util/isKeyringPair.js + var require_isKeyringPair = __commonJS({ + "../../node_modules/@polkadot/api/cjs/util/isKeyringPair.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isKeyringPair = void 0; + var util_1 = require_cjs3(); + function isKeyringPair(account) { + return (0, util_1.isFunction)(account.sign); + } + exports2.isKeyringPair = isKeyringPair; + } + }); + + // ../../node_modules/@polkadot/api/cjs/util/decorate.js + var require_decorate2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/util/decorate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decorateDeriveSections = void 0; + var api_derive_1 = require_cjs12(); + function decorateDeriveSections(decorateMethod, derives) { + const getKeys2 = (s) => Object.keys(derives[s]); + const creator = (s, m) => decorateMethod(derives[s][m]); + const result = {}; + const names2 = Object.keys(derives); + for (let i = 0, count = names2.length; i < count; i++) { + (0, api_derive_1.lazyDeriveSection)(result, names2[i], getKeys2, creator); + } + return result; + } + exports2.decorateDeriveSections = decorateDeriveSections; + } + }); + + // ../../node_modules/@polkadot/api/cjs/util/index.js + var require_util19 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/util/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.l = exports2.isKeyringPair = exports2.filterEvents = void 0; + var tslib_1 = require_tslib(); + var filterEvents_js_1 = require_filterEvents(); + Object.defineProperty(exports2, "filterEvents", { enumerable: true, get: function() { + return filterEvents_js_1.filterEvents; + } }); + var isKeyringPair_js_1 = require_isKeyringPair(); + Object.defineProperty(exports2, "isKeyringPair", { enumerable: true, get: function() { + return isKeyringPair_js_1.isKeyringPair; + } }); + var logging_js_1 = require_logging(); + Object.defineProperty(exports2, "l", { enumerable: true, get: function() { + return logging_js_1.l; + } }); + tslib_1.__exportStar(require_decorate2(), exports2); + } + }); + + // ../../node_modules/@polkadot/api/cjs/submittable/Result.js + var require_Result2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/submittable/Result.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SubmittableResult = void 0; + var recordIdentity = (record) => record; + function filterAndApply(events, section, methods, onFound) { + return events.filter(({ event }) => section === event.section && methods.includes(event.method)).map((record) => onFound(record)); + } + function getDispatchError({ event: { data: [dispatchError] } }) { + return dispatchError; + } + function getDispatchInfo({ event: { data, method } }) { + return method === "ExtrinsicSuccess" ? data[0] : data[1]; + } + function extractError(events = []) { + return filterAndApply(events, "system", ["ExtrinsicFailed"], getDispatchError)[0]; + } + function extractInfo(events = []) { + return filterAndApply(events, "system", ["ExtrinsicFailed", "ExtrinsicSuccess"], getDispatchInfo)[0]; + } + var SubmittableResult = class { + dispatchError; + dispatchInfo; + internalError; + events; + status; + txHash; + txIndex; + blockNumber; + constructor({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }) { + this.dispatchError = dispatchError || extractError(events); + this.dispatchInfo = dispatchInfo || extractInfo(events); + this.events = events || []; + this.internalError = internalError; + this.status = status; + this.txHash = txHash; + this.txIndex = txIndex; + this.blockNumber = blockNumber; + } + get isCompleted() { + return this.isError || this.status.isInBlock || this.status.isFinalized; + } + get isError() { + return this.status.isDropped || this.status.isFinalityTimeout || this.status.isInvalid || this.status.isUsurped; + } + get isFinalized() { + return this.status.isFinalized; + } + get isInBlock() { + return this.status.isInBlock; + } + get isWarning() { + return this.status.isRetracted; + } + filterRecords(section, method) { + return filterAndApply(this.events, section, Array.isArray(method) ? method : [method], recordIdentity); + } + findRecord(section, method) { + return this.filterRecords(section, method)[0]; + } + toHuman(isExtended) { + return { + dispatchError: this.dispatchError?.toHuman(), + dispatchInfo: this.dispatchInfo?.toHuman(), + events: this.events.map((e) => e.toHuman(isExtended)), + internalError: this.internalError?.message.toString(), + status: this.status.toHuman(isExtended) + }; + } + }; + exports2.SubmittableResult = SubmittableResult; + } + }); + + // ../../node_modules/@polkadot/api/cjs/submittable/createClass.js + var require_createClass2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/submittable/createClass.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createClass = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_util19(); + var Result_js_1 = require_Result2(); + function makeEraOptions(api, registry, partialOptions, { header, mortalLength, nonce }) { + if (!header) { + if (partialOptions.era && !partialOptions.blockHash) { + throw new Error("Expected blockHash to be passed alongside non-immortal era options"); + } + if ((0, util_1.isNumber)(partialOptions.era)) { + delete partialOptions.era; + delete partialOptions.blockHash; + } + return makeSignOptions(api, partialOptions, { nonce }); + } + return makeSignOptions(api, partialOptions, { + blockHash: header.hash, + era: registry.createTypeUnsafe("ExtrinsicEra", [{ + current: header.number, + period: partialOptions.era || mortalLength + }]), + nonce + }); + } + function makeSignAndSendOptions(partialOptions, statusCb) { + let options = {}; + if ((0, util_1.isFunction)(partialOptions)) { + statusCb = partialOptions; + } else { + options = (0, util_1.objectSpread)({}, partialOptions); + } + return [options, statusCb]; + } + function makeSignOptions(api, partialOptions, extras) { + return (0, util_1.objectSpread)({ blockHash: api.genesisHash, genesisHash: api.genesisHash }, partialOptions, extras, { runtimeVersion: api.runtimeVersion, signedExtensions: api.registry.signedExtensions, version: api.extrinsicType }); + } + function optionsOrNonce(partialOptions = {}) { + return (0, util_1.isBn)(partialOptions) || (0, util_1.isNumber)(partialOptions) ? { nonce: partialOptions } : partialOptions; + } + function createClass({ api, apiType, blockHash, decorateMethod }) { + const ExtrinsicBase2 = api.registry.createClass("Extrinsic"); + class Submittable extends ExtrinsicBase2 { + __internal__ignoreStatusCb; + __internal__transformResult = util_1.identity; + constructor(registry, extrinsic) { + super(registry, extrinsic, { version: api.extrinsicType }); + this.__internal__ignoreStatusCb = apiType === "rxjs"; + } + get hasDryRun() { + return (0, util_1.isFunction)(api.rpc.system?.dryRun); + } + get hasPaymentInfo() { + return (0, util_1.isFunction)(api.call.transactionPaymentApi?.queryInfo); + } + dryRun(account, optionsOrHash) { + if (!this.hasDryRun) { + throw new Error("The system.dryRun RPC call is not available in your environment"); + } + if (blockHash || (0, util_1.isString)(optionsOrHash) || (0, util_1.isU8a)(optionsOrHash)) { + return decorateMethod(() => api.rpc.system.dryRun(this.toHex(), blockHash || optionsOrHash)); + } + return decorateMethod(() => this.__internal__observeSign(account, optionsOrHash).pipe((0, rxjs_1.switchMap)(() => api.rpc.system.dryRun(this.toHex()))))(); + } + paymentInfo(account, optionsOrHash) { + if (!this.hasPaymentInfo) { + throw new Error("The transactionPaymentApi.queryInfo runtime call is not available in your environment"); + } + if (blockHash || (0, util_1.isString)(optionsOrHash) || (0, util_1.isU8a)(optionsOrHash)) { + return decorateMethod(() => api.callAt(blockHash || optionsOrHash).pipe((0, rxjs_1.switchMap)((callAt) => { + const u8a = this.toU8a(); + return callAt.transactionPaymentApi.queryInfo(u8a, u8a.length); + }))); + } + const [allOptions] = makeSignAndSendOptions(optionsOrHash); + const address = (0, index_js_1.isKeyringPair)(account) ? account.address : account.toString(); + return decorateMethod(() => api.derive.tx.signingInfo(address, allOptions.nonce, allOptions.era).pipe((0, rxjs_1.first)(), (0, rxjs_1.switchMap)((signingInfo) => { + const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo); + const signOptions = makeSignOptions(api, eraOptions, {}); + const u8a = api.tx(this.toU8a()).signFake(address, signOptions).toU8a(); + return api.call.transactionPaymentApi.queryInfo(u8a, u8a.length); + })))(); + } + send(statusCb) { + const isSubscription2 = api.hasSubscriptions && (this.__internal__ignoreStatusCb || !!statusCb); + return decorateMethod(isSubscription2 ? this.__internal__observeSubscribe : this.__internal__observeSend)(statusCb); + } + signAsync(account, partialOptions) { + return decorateMethod(() => this.__internal__observeSign(account, partialOptions).pipe((0, rxjs_1.map)(() => this)))(); + } + signAndSend(account, partialOptions, optionalStatusCb) { + const [options, statusCb] = makeSignAndSendOptions(partialOptions, optionalStatusCb); + const isSubscription2 = api.hasSubscriptions && (this.__internal__ignoreStatusCb || !!statusCb); + return decorateMethod( + () => this.__internal__observeSign(account, options).pipe((0, rxjs_1.switchMap)((info) => isSubscription2 ? this.__internal__observeSubscribe(info) : this.__internal__observeSend(info))) + )(statusCb); + } + withResultTransform(transform) { + this.__internal__transformResult = transform; + return this; + } + __internal__observeSign = (account, partialOptions) => { + const address = (0, index_js_1.isKeyringPair)(account) ? account.address : account.toString(); + const options = optionsOrNonce(partialOptions); + return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe((0, rxjs_1.first)(), (0, rxjs_1.mergeMap)(async (signingInfo) => { + const eraOptions = makeEraOptions(api, this.registry, options, signingInfo); + let updateId = -1; + if ((0, index_js_1.isKeyringPair)(account)) { + this.sign(account, eraOptions); + } else { + updateId = await this.__internal__signViaSigner(address, eraOptions, signingInfo.header); + } + return { options: eraOptions, updateId }; + })); + }; + __internal__observeStatus = (txHash, status) => { + if (!status.isFinalized && !status.isInBlock) { + return (0, rxjs_1.of)(this.__internal__transformResult(new Result_js_1.SubmittableResult({ + status, + txHash + }))); + } + const blockHash2 = status.isInBlock ? status.asInBlock : status.asFinalized; + return api.derive.tx.events(blockHash2).pipe((0, rxjs_1.map)(({ block, events }) => this.__internal__transformResult(new Result_js_1.SubmittableResult({ + ...(0, index_js_1.filterEvents)(txHash, block, events, status), + status, + txHash + }))), (0, rxjs_1.catchError)((internalError) => (0, rxjs_1.of)(this.__internal__transformResult(new Result_js_1.SubmittableResult({ + internalError, + status, + txHash + }))))); + }; + __internal__observeSend = (info) => { + return api.rpc.author.submitExtrinsic(this).pipe((0, rxjs_1.tap)((hash8) => { + this.__internal__updateSigner(hash8, info); + })); + }; + __internal__observeSubscribe = (info) => { + const txHash = this.hash; + return api.rpc.author.submitAndWatchExtrinsic(this).pipe((0, rxjs_1.switchMap)((status) => this.__internal__observeStatus(txHash, status)), (0, rxjs_1.tap)((status) => { + this.__internal__updateSigner(status, info); + })); + }; + __internal__signViaSigner = async (address, options, header) => { + const signer = options.signer || api.signer; + if (!signer) { + throw new Error("No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing."); + } + const payload = this.registry.createTypeUnsafe("SignerPayload", [(0, util_1.objectSpread)({}, options, { + address, + blockNumber: header ? header.number : 0, + method: this.method + })]); + let result; + if ((0, util_1.isFunction)(signer.signPayload)) { + result = await signer.signPayload(payload.toPayload()); + } else if ((0, util_1.isFunction)(signer.signRaw)) { + result = await signer.signRaw(payload.toRaw()); + } else { + throw new Error("Invalid signer interface, it should implement either signPayload or signRaw (or both)"); + } + super.addSignature(address, result.signature, payload.toPayload()); + return result.id; + }; + __internal__updateSigner = (status, info) => { + if (info && info.updateId !== -1) { + const { options, updateId } = info; + const signer = options.signer || api.signer; + if (signer && (0, util_1.isFunction)(signer.update)) { + signer.update(updateId, status); + } + } + }; + } + return Submittable; + } + exports2.createClass = createClass; + } + }); + + // ../../node_modules/@polkadot/api/cjs/submittable/createSubmittable.js + var require_createSubmittable = __commonJS({ + "../../node_modules/@polkadot/api/cjs/submittable/createSubmittable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createSubmittable = void 0; + var createClass_js_1 = require_createClass2(); + function createSubmittable(apiType, api, decorateMethod, registry, blockHash) { + const Submittable = (0, createClass_js_1.createClass)({ api, apiType, blockHash, decorateMethod }); + return (extrinsic) => new Submittable(registry || api.registry, extrinsic); + } + exports2.createSubmittable = createSubmittable; + } + }); + + // ../../node_modules/@polkadot/api/cjs/submittable/index.js + var require_submittable = __commonJS({ + "../../node_modules/@polkadot/api/cjs/submittable/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SubmittableResult = exports2.createSubmittable = void 0; + var createSubmittable_js_1 = require_createSubmittable(); + Object.defineProperty(exports2, "createSubmittable", { enumerable: true, get: function() { + return createSubmittable_js_1.createSubmittable; + } }); + var Result_js_1 = require_Result2(); + Object.defineProperty(exports2, "SubmittableResult", { enumerable: true, get: function() { + return Result_js_1.SubmittableResult; + } }); + } + }); + + // ../../node_modules/@polkadot/api/cjs/base/find.js + var require_find2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/base/find.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findError = exports2.findCall = void 0; + var util_1 = require_cjs3(); + function findCall(registry, callIndex) { + return registry.findMetaCall((0, util_1.u8aToU8a)(callIndex)); + } + exports2.findCall = findCall; + function findError(registry, errorIndex) { + return registry.findMetaError((0, util_1.u8aToU8a)(errorIndex)); + } + exports2.findError = findError; + } + }); + + // ../../node_modules/@polkadot/api/cjs/util/augmentObject.js + var require_augmentObject = __commonJS({ + "../../node_modules/@polkadot/api/cjs/util/augmentObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.augmentObject = void 0; + var util_1 = require_cjs3(); + var l15 = (0, util_1.logger)("api/augment"); + function logLength(type, values, and = []) { + return values.length ? ` ${values.length} ${type}${and.length ? " and" : ""}` : ""; + } + function logValues(type, values) { + return values.length ? ` + ${type.padStart(7)}: ${values.sort().join(", ")}` : ""; + } + function warn(prefix, type, [added, removed]) { + if (added.length || removed.length) { + l15.warn(`api.${prefix}: Found${logLength("added", added, removed)}${logLength("removed", removed)} ${type}:${logValues("added", added)}${logValues("removed", removed)}`); + } + } + function findSectionExcludes(a, b) { + return a.filter((s) => !b.includes(s)); + } + function findSectionIncludes(a, b) { + return a.filter((s) => b.includes(s)); + } + function extractSections(src, dst) { + const srcSections = Object.keys(src); + const dstSections = Object.keys(dst); + return [ + findSectionExcludes(srcSections, dstSections), + findSectionExcludes(dstSections, srcSections) + ]; + } + function findMethodExcludes(src, dst) { + const srcSections = Object.keys(src); + const dstSections = findSectionIncludes(Object.keys(dst), srcSections); + const excludes = []; + for (let s = 0, scount = dstSections.length; s < scount; s++) { + const section = dstSections[s]; + const srcMethods = Object.keys(src[section]); + const dstMethods = Object.keys(dst[section]); + for (let d = 0, mcount = dstMethods.length; d < mcount; d++) { + const method = dstMethods[d]; + if (!srcMethods.includes(method)) { + excludes.push(`${section}.${method}`); + } + } + } + return excludes; + } + function extractMethods(src, dst) { + return [ + findMethodExcludes(dst, src), + findMethodExcludes(src, dst) + ]; + } + function augmentObject(prefix, src, dst, fromEmpty = false) { + fromEmpty && (0, util_1.objectClear)(dst); + if (prefix && Object.keys(dst).length) { + warn(prefix, "modules", extractSections(src, dst)); + warn(prefix, "calls", extractMethods(src, dst)); + } + const sections = Object.keys(src); + for (let i = 0, count = sections.length; i < count; i++) { + const section = sections[i]; + const methods = src[section]; + if (!dst[section]) { + dst[section] = {}; + } + (0, util_1.lazyMethods)(dst[section], Object.keys(methods), (m) => methods[m]); + } + return dst; + } + exports2.augmentObject = augmentObject; + } + }); + + // ../../node_modules/@polkadot/api/cjs/util/validate.js + var require_validate3 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/util/validate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extractStorageArgs = void 0; + var util_1 = require_cjs3(); + function sig({ lookup }, { method, section }, args) { + return `${section}.${method}(${args.map((a) => lookup.getTypeDef(a).type).join(", ")})`; + } + function extractStorageArgs(registry, creator, _args) { + const args = _args.filter((a) => !(0, util_1.isUndefined)(a)); + if (creator.meta.type.isPlain) { + if (args.length !== 0) { + throw new Error(`${sig(registry, creator, [])} does not take any arguments, ${args.length} found`); + } + } else { + const { hashers, key: key2 } = creator.meta.type.asMap; + const keys = hashers.length === 1 ? [key2] : registry.lookup.getSiType(key2).def.asTuple.map((t) => t); + if (args.length !== keys.length) { + throw new Error(`${sig(registry, creator, keys)} is a map, requiring ${keys.length} arguments, ${args.length} found`); + } + } + return [creator, args]; + } + exports2.extractStorageArgs = extractStorageArgs; + } + }); + + // ../../node_modules/@polkadot/api/cjs/base/Events.js + var require_Events = __commonJS({ + "../../node_modules/@polkadot/api/cjs/base/Events.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Events = void 0; + var eventemitter3_1 = require_eventemitter3(); + var Events = class { + __internal__eventemitter = new eventemitter3_1.EventEmitter(); + emit(type, ...args) { + return this.__internal__eventemitter.emit(type, ...args); + } + on(type, handler) { + this.__internal__eventemitter.on(type, handler); + return this; + } + off(type, handler) { + this.__internal__eventemitter.removeListener(type, handler); + return this; + } + once(type, handler) { + this.__internal__eventemitter.once(type, handler); + return this; + } + }; + exports2.Events = Events; + } + }); + + // ../../node_modules/@polkadot/api/cjs/base/Decorate.js + var require_Decorate = __commonJS({ + "../../node_modules/@polkadot/api/cjs/base/Decorate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Decorate = void 0; + var rxjs_1 = require_cjs7(); + var api_derive_1 = require_cjs12(); + var rpc_core_1 = require_cjs11(); + var rpc_provider_1 = require_cjs16(); + var types_1 = require_cjs10(); + var types_known_1 = require_cjs13(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var index_js_1 = require_submittable(); + var augmentObject_js_1 = require_augmentObject(); + var decorate_js_1 = require_decorate2(); + var validate_js_1 = require_validate3(); + var Events_js_1 = require_Events(); + var find_js_1 = require_find2(); + var PAGE_SIZE_K = 1e3; + var PAGE_SIZE_V = 250; + var PAGE_SIZE_Q = 50; + var l15 = (0, util_1.logger)("api/init"); + var instanceCounter = 0; + function getAtQueryFn(api, { method, section }) { + return (0, util_1.assertReturn)(api.rx.query[section] && api.rx.query[section][method], () => `query.${section}.${method} is not available in this version of the metadata`); + } + var Decorate = class extends Events_js_1.Events { + __internal__instanceId; + __internal__runtimeLog = {}; + __internal__registry; + __internal__storageGetQ = []; + __internal__storageSubQ = []; + __phantom = new util_1.BN(0); + _type; + _call = {}; + _consts = {}; + _derive; + _errors = {}; + _events = {}; + _extrinsics; + _extrinsicType = types_1.GenericExtrinsic.LATEST_EXTRINSIC_VERSION; + _genesisHash; + _isConnected; + _isReady = false; + _query = {}; + _queryMulti; + _rpc; + _rpcCore; + _runtimeMap = {}; + _runtimeChain; + _runtimeMetadata; + _runtimeVersion; + _rx = { call: {}, consts: {}, query: {}, tx: {} }; + _options; + _decorateMethod; + constructor(options, type, decorateMethod) { + super(); + this.__internal__instanceId = `${++instanceCounter}`; + this.__internal__registry = options.source?.registry || options.registry || new types_1.TypeRegistry(); + this._rx.callAt = (blockHash, knownVersion) => (0, rxjs_1.from)(this.at(blockHash, knownVersion)).pipe((0, rxjs_1.map)((a) => a.rx.call)); + this._rx.queryAt = (blockHash, knownVersion) => (0, rxjs_1.from)(this.at(blockHash, knownVersion)).pipe((0, rxjs_1.map)((a) => a.rx.query)); + this._rx.registry = this.__internal__registry; + this._decorateMethod = decorateMethod; + this._options = options; + this._type = type; + const provider = options.source ? options.source._rpcCore.provider.isClonable ? options.source._rpcCore.provider.clone() : options.source._rpcCore.provider : options.provider || new rpc_provider_1.WsProvider(); + this._rpcCore = new rpc_core_1.RpcCore(this.__internal__instanceId, this.__internal__registry, { + isPedantic: this._options.isPedantic, + provider, + userRpc: this._options.rpc + }); + this._isConnected = new rxjs_1.BehaviorSubject(this._rpcCore.provider.isConnected); + this._rx.hasSubscriptions = this._rpcCore.provider.hasSubscriptions; + } + get registry() { + return this.__internal__registry; + } + createType(type, ...params) { + return this.__internal__registry.createType(type, ...params); + } + registerTypes(types2) { + types2 && this.__internal__registry.register(types2); + } + get hasSubscriptions() { + return this._rpcCore.provider.hasSubscriptions; + } + get supportMulti() { + return this._rpcCore.provider.hasSubscriptions || !!this._rpcCore.state.queryStorageAt; + } + _emptyDecorated(registry, blockHash) { + return { + call: {}, + consts: {}, + errors: {}, + events: {}, + query: {}, + registry, + rx: { + call: {}, + query: {} + }, + tx: (0, index_js_1.createSubmittable)(this._type, this._rx, this._decorateMethod, registry, blockHash) + }; + } + _createDecorated(registry, fromEmpty, decoratedApi, blockHash) { + if (!decoratedApi) { + decoratedApi = this._emptyDecorated(registry.registry, blockHash); + } + if (fromEmpty || !registry.decoratedMeta) { + registry.decoratedMeta = (0, types_1.expandMetadata)(registry.registry, registry.metadata); + } + const runtime34 = this._decorateCalls(registry, this._decorateMethod, blockHash); + const runtimeRx = this._decorateCalls(registry, this._rxDecorateMethod, blockHash); + const storage = this._decorateStorage(registry.decoratedMeta, this._decorateMethod, blockHash); + const storageRx = this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod, blockHash); + (0, augmentObject_js_1.augmentObject)("consts", registry.decoratedMeta.consts, decoratedApi.consts, fromEmpty); + (0, augmentObject_js_1.augmentObject)("errors", registry.decoratedMeta.errors, decoratedApi.errors, fromEmpty); + (0, augmentObject_js_1.augmentObject)("events", registry.decoratedMeta.events, decoratedApi.events, fromEmpty); + (0, augmentObject_js_1.augmentObject)("query", storage, decoratedApi.query, fromEmpty); + (0, augmentObject_js_1.augmentObject)("query", storageRx, decoratedApi.rx.query, fromEmpty); + (0, augmentObject_js_1.augmentObject)("call", runtime34, decoratedApi.call, fromEmpty); + (0, augmentObject_js_1.augmentObject)("call", runtimeRx, decoratedApi.rx.call, fromEmpty); + decoratedApi.findCall = (callIndex) => (0, find_js_1.findCall)(registry.registry, callIndex); + decoratedApi.findError = (errorIndex) => (0, find_js_1.findError)(registry.registry, errorIndex); + decoratedApi.queryMulti = blockHash ? this._decorateMultiAt(decoratedApi, this._decorateMethod, blockHash) : this._decorateMulti(this._decorateMethod); + decoratedApi.runtimeVersion = registry.runtimeVersion; + return { + createdAt: blockHash, + decoratedApi, + decoratedMeta: registry.decoratedMeta + }; + } + _injectMetadata(registry, fromEmpty = false) { + if (fromEmpty || !registry.decoratedApi) { + registry.decoratedApi = this._emptyDecorated(registry.registry); + } + const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi); + this._call = decoratedApi.call; + this._consts = decoratedApi.consts; + this._errors = decoratedApi.errors; + this._events = decoratedApi.events; + this._query = decoratedApi.query; + this._rx.call = decoratedApi.rx.call; + this._rx.query = decoratedApi.rx.query; + const tx2 = this._decorateExtrinsics(decoratedMeta, this._decorateMethod); + const rxtx = this._decorateExtrinsics(decoratedMeta, this._rxDecorateMethod); + if (fromEmpty || !this._extrinsics) { + this._extrinsics = tx2; + this._rx.tx = rxtx; + } else { + (0, augmentObject_js_1.augmentObject)("tx", tx2, this._extrinsics, false); + (0, augmentObject_js_1.augmentObject)(null, rxtx, this._rx.tx, false); + } + (0, augmentObject_js_1.augmentObject)(null, decoratedMeta.consts, this._rx.consts, fromEmpty); + this.emit("decorated"); + } + injectMetadata(metadata, fromEmpty, registry) { + this._injectMetadata({ counter: 0, metadata, registry: registry || this.__internal__registry, runtimeVersion: this.__internal__registry.createType("RuntimeVersionPartial") }, fromEmpty); + } + _decorateFunctionMeta(input, output4) { + output4.meta = input.meta; + output4.method = input.method; + output4.section = input.section; + output4.toJSON = input.toJSON; + if (input.callIndex) { + output4.callIndex = input.callIndex; + } + return output4; + } + _filterRpc(methods, additional) { + if (Object.keys(additional).length !== 0) { + this._rpcCore.addUserInterfaces(additional); + this._decorateRpc(this._rpcCore, this._decorateMethod, this._rpc); + this._decorateRpc(this._rpcCore, this._rxDecorateMethod, this._rx.rpc); + } + const sectionMap = {}; + for (let i = 0, count = methods.length; i < count; i++) { + const [section] = methods[i].split("_"); + sectionMap[section] = true; + } + const sections = Object.keys(sectionMap); + for (let i = 0, count = sections.length; i < count; i++) { + const nameA = (0, util_1.stringUpperFirst)(sections[i]); + const nameB = `${nameA}Api`; + this._runtimeMap[(0, util_crypto_1.blake2AsHex)(nameA, 64)] = nameA; + this._runtimeMap[(0, util_crypto_1.blake2AsHex)(nameB, 64)] = nameB; + } + this._filterRpcMethods(methods); + } + _filterRpcMethods(exposed) { + const hasResults = exposed.length !== 0; + const allKnown = [...this._rpcCore.mapping.entries()]; + const allKeys = []; + const count = allKnown.length; + for (let i = 0; i < count; i++) { + const [, { alias: alias2, endpoint, method, pubsub, section }] = allKnown[i]; + allKeys.push(`${section}_${method}`); + if (pubsub) { + allKeys.push(`${section}_${pubsub[1]}`); + allKeys.push(`${section}_${pubsub[2]}`); + } + if (alias2) { + allKeys.push(...alias2); + } + if (endpoint) { + allKeys.push(endpoint); + } + } + const unknown = exposed.filter((k) => !allKeys.includes(k) && !k.includes("_unstable_")); + if (unknown.length && !this._options.noInitWarn) { + l15.warn(`RPC methods not decorated: ${unknown.join(", ")}`); + } + for (let i = 0; i < count; i++) { + const [k, { method, section }] = allKnown[i]; + if (hasResults && !exposed.includes(k) && k !== "rpc_methods") { + if (this._rpc[section]) { + delete this._rpc[section][method]; + delete this._rx.rpc[section][method]; + } + } + } + } + _rpcSubmitter(decorateMethod) { + const method = (method2, ...params) => { + return (0, rxjs_1.from)(this._rpcCore.provider.send(method2, params)); + }; + return decorateMethod(method); + } + _decorateRpc(rpc18, decorateMethod, input = this._rpcSubmitter(decorateMethod)) { + const out = input; + const decorateFn = (section, method) => { + const source = rpc18[section][method]; + const fn2 = decorateMethod(source, { methodName: method }); + fn2.meta = source.meta; + fn2.raw = decorateMethod(source.raw, { methodName: method }); + return fn2; + }; + for (let s = 0, scount = rpc18.sections.length; s < scount; s++) { + const section = rpc18.sections[s]; + if (!Object.prototype.hasOwnProperty.call(out, section)) { + const methods = Object.keys(rpc18[section]); + const decorateInternal = (method) => decorateFn(section, method); + for (let m = 0, mcount = methods.length; m < mcount; m++) { + const method = methods[m]; + if (this.hasSubscriptions || !(method.startsWith("subscribe") || method.startsWith("unsubscribe"))) { + if (!Object.prototype.hasOwnProperty.call(out, section)) { + out[section] = {}; + } + (0, util_1.lazyMethod)(out[section], method, decorateInternal); + } + } + } + } + return out; + } + _addRuntimeDef(result, additional) { + if (!additional) { + return; + } + const entries = Object.entries(additional); + for (let j10 = 0, ecount = entries.length; j10 < ecount; j10++) { + const [key2, defs] = entries[j10]; + if (result[key2]) { + for (let k = 0, dcount = defs.length; k < dcount; k++) { + const def = defs[k]; + const prev = result[key2].find(({ version: version23 }) => def.version === version23); + if (prev) { + (0, util_1.objectSpread)(prev.methods, def.methods); + } else { + result[key2].push(def); + } + } + } else { + result[key2] = defs; + } + } + } + _getRuntimeDefs(registry, specName, chain4 = "") { + const result = {}; + const defValues = Object.values(types_1.typeDefinitions); + for (let i = 0, count = defValues.length; i < count; i++) { + this._addRuntimeDef(result, defValues[i].runtime); + } + this._addRuntimeDef(result, (0, types_known_1.getSpecRuntime)(registry, chain4, specName)); + this._addRuntimeDef(result, this._options.runtime); + return Object.entries(result); + } + _decorateCalls({ registry, runtimeVersion: { apis, specName, specVersion } }, decorateMethod, blockHash) { + const result = {}; + const named = {}; + const hashes = {}; + const sections = this._getRuntimeDefs(registry, specName, this._runtimeChain); + const older = []; + const implName = `${specName.toString()}/${specVersion.toString()}`; + const hasLogged = this.__internal__runtimeLog[implName] || false; + this.__internal__runtimeLog[implName] = true; + for (let i = 0, scount = sections.length; i < scount; i++) { + const [_section, secs] = sections[i]; + const sectionHash = (0, util_crypto_1.blake2AsHex)(_section, 64); + const rtApi = apis.find(([a]) => a.eq(sectionHash)); + hashes[sectionHash] = true; + if (rtApi) { + const all = secs.map(({ version: version23 }) => version23).sort(); + const sec = secs.find(({ version: version23 }) => rtApi[1].eq(version23)); + if (sec) { + const section = (0, util_1.stringCamelCase)(_section); + const methods = Object.entries(sec.methods); + if (methods.length) { + if (!named[section]) { + named[section] = {}; + } + for (let m = 0, mcount = methods.length; m < mcount; m++) { + const [_method, def] = methods[m]; + const method = (0, util_1.stringCamelCase)(_method); + named[section][method] = (0, util_1.objectSpread)({ method, name: `${_section}_${_method}`, section, sectionHash }, def); + } + } + } else { + older.push(`${_section}/${rtApi[1].toString()} (${all.join("/")} known)`); + } + } + } + const notFound = apis.map(([a, v]) => [a.toHex(), v.toString()]).filter(([a]) => !hashes[a]).map(([a, v]) => `${this._runtimeMap[a] || a}/${v}`); + if (!this._options.noInitWarn && !hasLogged) { + if (older.length) { + l15.warn(`${implName}: Not decorating runtime apis without matching versions: ${older.join(", ")}`); + } + if (notFound.length) { + l15.warn(`${implName}: Not decorating unknown runtime apis: ${notFound.join(", ")}`); + } + } + const stateCall = blockHash ? (name6, bytes5) => this._rpcCore.state.call(name6, bytes5, blockHash) : (name6, bytes5) => this._rpcCore.state.call(name6, bytes5); + const lazySection = (section) => (0, util_1.lazyMethods)({}, Object.keys(named[section]), (method) => this._decorateCall(registry, named[section][method], stateCall, decorateMethod)); + const modules = Object.keys(named); + for (let i = 0, count = modules.length; i < count; i++) { + (0, util_1.lazyMethod)(result, modules[i], lazySection); + } + return result; + } + _decorateCall(registry, def, stateCall, decorateMethod) { + const decorated = decorateMethod((...args) => { + if (args.length !== def.params.length) { + throw new Error(`${def.name}:: Expected ${def.params.length} arguments, found ${args.length}`); + } + const bytes5 = registry.createType("Raw", (0, util_1.u8aConcatStrict)(args.map((a, i) => registry.createTypeUnsafe(def.params[i].type, [a]).toU8a()))); + return stateCall(def.name, bytes5).pipe((0, rxjs_1.map)((r10) => registry.createTypeUnsafe(def.type, [r10]))); + }); + decorated.meta = def; + return decorated; + } + _decorateMulti(decorateMethod) { + return decorateMethod((keys) => keys.length ? (this.hasSubscriptions ? this._rpcCore.state.subscribeStorage : this._rpcCore.state.queryStorageAt)(keys.map((args) => Array.isArray(args) ? args[0].creator.meta.type.isPlain ? [args[0].creator] : args[0].creator.meta.type.asMap.hashers.length === 1 ? [args[0].creator, args.slice(1)] : [args[0].creator, ...args.slice(1)] : [args.creator])) : (0, rxjs_1.of)([])); + } + _decorateMultiAt(atApi, decorateMethod, blockHash) { + return decorateMethod((calls) => calls.length ? this._rpcCore.state.queryStorageAt(calls.map((args) => { + if (Array.isArray(args)) { + const { creator } = getAtQueryFn(atApi, args[0].creator); + return creator.meta.type.isPlain ? [creator] : creator.meta.type.asMap.hashers.length === 1 ? [creator, args.slice(1)] : [creator, ...args.slice(1)]; + } + return [getAtQueryFn(atApi, args.creator).creator]; + }), blockHash) : (0, rxjs_1.of)([])); + } + _decorateExtrinsics({ tx: tx2 }, decorateMethod) { + const result = (0, index_js_1.createSubmittable)(this._type, this._rx, decorateMethod); + const lazySection = (section) => (0, util_1.lazyMethods)({}, Object.keys(tx2[section]), (method) => method.startsWith("$") ? tx2[section][method] : this._decorateExtrinsicEntry(tx2[section][method], result)); + const sections = Object.keys(tx2); + for (let i = 0, count = sections.length; i < count; i++) { + (0, util_1.lazyMethod)(result, sections[i], lazySection); + } + return result; + } + _decorateExtrinsicEntry(method, creator) { + const decorated = (...params) => creator(method(...params)); + decorated.is = (other) => method.is(other); + return this._decorateFunctionMeta(method, decorated); + } + _decorateStorage({ query, registry }, decorateMethod, blockHash) { + const result = {}; + const lazySection = (section) => (0, util_1.lazyMethods)({}, Object.keys(query[section]), (method) => blockHash ? this._decorateStorageEntryAt(registry, query[section][method], decorateMethod, blockHash) : this._decorateStorageEntry(query[section][method], decorateMethod)); + const sections = Object.keys(query); + for (let i = 0, count = sections.length; i < count; i++) { + (0, util_1.lazyMethod)(result, sections[i], lazySection); + } + return result; + } + _decorateStorageEntry(creator, decorateMethod) { + const getArgs = (args, registry) => (0, validate_js_1.extractStorageArgs)(registry || this.__internal__registry, creator, args); + const getQueryAt = (blockHash) => (0, rxjs_1.from)(this.at(blockHash)).pipe((0, rxjs_1.map)((api) => getAtQueryFn(api, creator))); + const decorated = this._decorateStorageCall(creator, decorateMethod); + decorated.creator = creator; + decorated.at = decorateMethod((blockHash, ...args) => getQueryAt(blockHash).pipe((0, rxjs_1.switchMap)((q) => q(...args)))); + decorated.hash = decorateMethod((...args) => this._rpcCore.state.getStorageHash(getArgs(args))); + decorated.is = (key2) => key2.section === creator.section && key2.method === creator.method; + decorated.key = (...args) => (0, util_1.u8aToHex)((0, util_1.compactStripLength)(creator(...args))[1]); + decorated.keyPrefix = (...args) => (0, util_1.u8aToHex)(creator.keyPrefix(...args)); + decorated.size = decorateMethod((...args) => this._rpcCore.state.getStorageSize(getArgs(args))); + decorated.sizeAt = decorateMethod((blockHash, ...args) => getQueryAt(blockHash).pipe((0, rxjs_1.switchMap)((q) => this._rpcCore.state.getStorageSize(getArgs(args, q.creator.meta.registry), blockHash)))); + if (creator.iterKey && creator.meta.type.isMap) { + decorated.entries = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (...args) => this._retrieveMapEntries(creator, null, args))); + decorated.entriesAt = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (blockHash, ...args) => getQueryAt(blockHash).pipe((0, rxjs_1.switchMap)((q) => this._retrieveMapEntries(q.creator, blockHash, args))))); + decorated.entriesPaged = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (opts) => this._retrieveMapEntriesPaged(creator, void 0, opts))); + decorated.keys = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (...args) => this._retrieveMapKeys(creator, null, args))); + decorated.keysAt = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (blockHash, ...args) => getQueryAt(blockHash).pipe((0, rxjs_1.switchMap)((q) => this._retrieveMapKeys(q.creator, blockHash, args))))); + decorated.keysPaged = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (opts) => this._retrieveMapKeysPaged(creator, void 0, opts))); + } + if (this.supportMulti && creator.meta.type.isMap) { + decorated.multi = decorateMethod((args) => creator.meta.type.asMap.hashers.length === 1 ? this._retrieveMulti(args.map((a) => [creator, [a]])) : this._retrieveMulti(args.map((a) => [creator, a]))); + } + return this._decorateFunctionMeta(creator, decorated); + } + _decorateStorageEntryAt(registry, creator, decorateMethod, blockHash) { + const getArgs = (args) => (0, validate_js_1.extractStorageArgs)(registry, creator, args); + const decorated = decorateMethod((...args) => this._rpcCore.state.getStorage(getArgs(args), blockHash)); + decorated.creator = creator; + decorated.hash = decorateMethod((...args) => this._rpcCore.state.getStorageHash(getArgs(args), blockHash)); + decorated.is = (key2) => key2.section === creator.section && key2.method === creator.method; + decorated.key = (...args) => (0, util_1.u8aToHex)((0, util_1.compactStripLength)(creator(...args))[1]); + decorated.keyPrefix = (...keys) => (0, util_1.u8aToHex)(creator.keyPrefix(...keys)); + decorated.size = decorateMethod((...args) => this._rpcCore.state.getStorageSize(getArgs(args), blockHash)); + if (creator.iterKey && creator.meta.type.isMap) { + decorated.entries = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (...args) => this._retrieveMapEntries(creator, blockHash, args))); + decorated.entriesPaged = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (opts) => this._retrieveMapEntriesPaged(creator, blockHash, opts))); + decorated.keys = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (...args) => this._retrieveMapKeys(creator, blockHash, args))); + decorated.keysPaged = decorateMethod((0, rpc_core_1.memo)(this.__internal__instanceId, (opts) => this._retrieveMapKeysPaged(creator, blockHash, opts))); + } + if (this.supportMulti && creator.meta.type.isMap) { + decorated.multi = decorateMethod((args) => creator.meta.type.asMap.hashers.length === 1 ? this._retrieveMulti(args.map((a) => [creator, [a]]), blockHash) : this._retrieveMulti(args.map((a) => [creator, a]), blockHash)); + } + return this._decorateFunctionMeta(creator, decorated); + } + _queueStorage(call, queue) { + const query = queue === this.__internal__storageSubQ ? this._rpcCore.state.subscribeStorage : this._rpcCore.state.queryStorageAt; + let queueIdx = queue.length - 1; + let valueIdx = 0; + let valueObs; + if (queueIdx === -1 || !queue[queueIdx] || queue[queueIdx][1].length === PAGE_SIZE_Q) { + queueIdx++; + valueObs = (0, rxjs_1.from)( + new Promise((resolve) => { + (0, util_1.nextTick)(() => { + const calls = queue[queueIdx][1]; + delete queue[queueIdx]; + resolve(calls); + }); + }) + ).pipe((0, rxjs_1.switchMap)((calls) => query(calls))); + queue.push([valueObs, [call]]); + } else { + valueObs = queue[queueIdx][0]; + valueIdx = queue[queueIdx][1].length; + queue[queueIdx][1].push(call); + } + return valueObs.pipe( + (0, rxjs_1.map)((values) => values[valueIdx]) + ); + } + _decorateStorageCall(creator, decorateMethod) { + const memoed = (0, rpc_core_1.memo)(this.__internal__instanceId, (...args) => { + const call = (0, validate_js_1.extractStorageArgs)(this.__internal__registry, creator, args); + if (!this.hasSubscriptions) { + return this._rpcCore.state.getStorage(call); + } + return this._queueStorage(call, this.__internal__storageSubQ); + }); + return decorateMethod(memoed, { + methodName: creator.method, + overrideNoSub: (...args) => this._queueStorage((0, validate_js_1.extractStorageArgs)(this.__internal__registry, creator, args), this.__internal__storageGetQ) + }); + } + _retrieveMulti(keys, blockHash) { + if (!keys.length) { + return (0, rxjs_1.of)([]); + } + const query = this.hasSubscriptions && !blockHash ? this._rpcCore.state.subscribeStorage : this._rpcCore.state.queryStorageAt; + if (keys.length <= PAGE_SIZE_V) { + return blockHash ? query(keys, blockHash) : query(keys); + } + return (0, rxjs_1.combineLatest)((0, util_1.arrayChunk)(keys, PAGE_SIZE_V).map((k) => blockHash ? query(k, blockHash) : query(k))).pipe((0, rxjs_1.map)(util_1.arrayFlatten)); + } + _retrieveMapKeys({ iterKey, meta: meta2, method, section }, at, args) { + if (!iterKey || !meta2.type.isMap) { + throw new Error("keys can only be retrieved on maps"); + } + const headKey = iterKey(...args).toHex(); + const startSubject = new rxjs_1.BehaviorSubject(headKey); + const query = at ? (startKey) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey, at) : (startKey) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey); + const setMeta = (key2) => key2.setMeta(meta2, section, method); + return startSubject.pipe( + (0, rxjs_1.switchMap)(query), + (0, rxjs_1.map)((keys) => keys.map(setMeta)), + (0, rxjs_1.tap)((keys) => (0, util_1.nextTick)(() => { + keys.length === PAGE_SIZE_K ? startSubject.next(keys[PAGE_SIZE_K - 1].toHex()) : startSubject.complete(); + })), + (0, rxjs_1.toArray)(), + (0, rxjs_1.map)(util_1.arrayFlatten) + ); + } + _retrieveMapKeysPaged({ iterKey, meta: meta2, method, section }, at, opts) { + if (!iterKey || !meta2.type.isMap) { + throw new Error("keys can only be retrieved on maps"); + } + const setMeta = (key2) => key2.setMeta(meta2, section, method); + const query = at ? (headKey) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey, at) : (headKey) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey); + return query(iterKey(...opts.args).toHex()).pipe((0, rxjs_1.map)((keys) => keys.map(setMeta))); + } + _retrieveMapEntries(entry, at, args) { + const query = at ? (keys) => this._rpcCore.state.queryStorageAt(keys, at) : (keys) => this._rpcCore.state.queryStorageAt(keys); + return this._retrieveMapKeys(entry, at, args).pipe((0, rxjs_1.switchMap)((keys) => keys.length ? (0, rxjs_1.combineLatest)((0, util_1.arrayChunk)(keys, PAGE_SIZE_V).map(query)).pipe((0, rxjs_1.map)((valsArr) => (0, util_1.arrayFlatten)(valsArr).map((value, index) => [keys[index], value]))) : (0, rxjs_1.of)([]))); + } + _retrieveMapEntriesPaged(entry, at, opts) { + const query = at ? (keys) => this._rpcCore.state.queryStorageAt(keys, at) : (keys) => this._rpcCore.state.queryStorageAt(keys); + return this._retrieveMapKeysPaged(entry, at, opts).pipe((0, rxjs_1.switchMap)((keys) => keys.length ? query(keys).pipe((0, rxjs_1.map)((valsArr) => valsArr.map((value, index) => [keys[index], value]))) : (0, rxjs_1.of)([]))); + } + _decorateDeriveRx(decorateMethod) { + const specName = this._runtimeVersion?.specName.toString(); + const available = (0, api_derive_1.getAvailableDerives)(this.__internal__instanceId, this._rx, (0, util_1.objectSpread)({}, this._options.derives, this._options.typesBundle?.spec?.[specName || ""]?.derives)); + return (0, decorate_js_1.decorateDeriveSections)(decorateMethod, available); + } + _decorateDerive(decorateMethod) { + return (0, decorate_js_1.decorateDeriveSections)(decorateMethod, this._rx.derive); + } + _rxDecorateMethod = (method) => { + return method; + }; + }; + exports2.Decorate = Decorate; + } + }); + + // ../../node_modules/@polkadot/api/cjs/base/Init.js + var require_Init = __commonJS({ + "../../node_modules/@polkadot/api/cjs/base/Init.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Init = void 0; + var rxjs_1 = require_cjs7(); + var types_1 = require_cjs10(); + var types_known_1 = require_cjs13(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + var Decorate_js_1 = require_Decorate(); + var KEEPALIVE_INTERVAL = 1e4; + var WITH_VERSION_SHORTCUT = false; + var l15 = (0, util_1.logger)("api/init"); + function textToString(t) { + return t.toString(); + } + var Init = class extends Decorate_js_1.Decorate { + __internal__atLast = null; + __internal__healthTimer = null; + __internal__registries = []; + __internal__updateSub = null; + __internal__waitingRegistries = {}; + constructor(options, type, decorateMethod) { + super(options, type, decorateMethod); + this.registry.setKnownTypes(options); + if (!options.source) { + this.registerTypes(options.types); + } else { + this.__internal__registries = options.source.__internal__registries; + } + this._rpc = this._decorateRpc(this._rpcCore, this._decorateMethod); + this._rx.rpc = this._decorateRpc(this._rpcCore, this._rxDecorateMethod); + if (this.supportMulti) { + this._queryMulti = this._decorateMulti(this._decorateMethod); + this._rx.queryMulti = this._decorateMulti(this._rxDecorateMethod); + } + this._rx.signer = options.signer; + this._rpcCore.setRegistrySwap((blockHash) => this.getBlockRegistry(blockHash)); + this._rpcCore.setResolveBlockHash((blockNumber) => (0, rxjs_1.firstValueFrom)(this._rpcCore.chain.getBlockHash(blockNumber))); + if (this.hasSubscriptions) { + this._rpcCore.provider.on("disconnected", () => this.__internal__onProviderDisconnect()); + this._rpcCore.provider.on("error", (e) => this.__internal__onProviderError(e)); + this._rpcCore.provider.on("connected", () => this.__internal__onProviderConnect()); + } else if (!this._options.noInitWarn) { + l15.warn("Api will be available in a limited mode since the provider does not support subscriptions"); + } + if (this._rpcCore.provider.isConnected) { + this.__internal__onProviderConnect().catch(util_1.noop); + } + } + _initRegistry(registry, chain4, version23, metadata, chainProps) { + registry.clearCache(); + registry.setChainProperties(chainProps || this.registry.getChainProperties()); + registry.setKnownTypes(this._options); + registry.register((0, types_known_1.getSpecTypes)(registry, chain4, version23.specName, version23.specVersion)); + registry.setHasher((0, types_known_1.getSpecHasher)(registry, chain4, version23.specName)); + if (registry.knownTypes.typesBundle) { + registry.knownTypes.typesAlias = (0, types_known_1.getSpecAlias)(registry, chain4, version23.specName); + } + registry.setMetadata(metadata, void 0, (0, util_1.objectSpread)({}, (0, types_known_1.getSpecExtensions)(registry, chain4, version23.specName), this._options.signedExtensions), this._options.noInitWarn); + } + _getDefaultRegistry() { + return (0, util_1.assertReturn)(this.__internal__registries.find(({ isDefault }) => isDefault), "Initialization error, cannot find the default registry"); + } + async at(blockHash, knownVersion) { + const u8aHash = (0, util_1.u8aToU8a)(blockHash); + const u8aHex = (0, util_1.u8aToHex)(u8aHash); + const registry = await this.getBlockRegistry(u8aHash, knownVersion); + if (!this.__internal__atLast || this.__internal__atLast[0] !== u8aHex) { + this.__internal__atLast = [u8aHex, this._createDecorated(registry, true, null, u8aHash).decoratedApi]; + } + return this.__internal__atLast[1]; + } + async _createBlockRegistry(blockHash, header, version23) { + const registry = new types_1.TypeRegistry(blockHash); + const metadata = new types_1.Metadata(registry, await (0, rxjs_1.firstValueFrom)(this._rpcCore.state.getMetadata.raw(header.parentHash))); + const runtimeChain = this._runtimeChain; + if (!runtimeChain) { + throw new Error("Invalid initializion order, runtimeChain is not available"); + } + this._initRegistry(registry, runtimeChain, version23, metadata); + const result = { counter: 0, lastBlockHash: blockHash, metadata, registry, runtimeVersion: version23 }; + this.__internal__registries.push(result); + return result; + } + _cacheBlockRegistryProgress(key2, creator) { + let waiting = this.__internal__waitingRegistries[key2]; + if ((0, util_1.isUndefined)(waiting)) { + waiting = this.__internal__waitingRegistries[key2] = new Promise((resolve, reject) => { + creator().then((registry) => { + delete this.__internal__waitingRegistries[key2]; + resolve(registry); + }).catch((error) => { + delete this.__internal__waitingRegistries[key2]; + reject(error); + }); + }); + } + return waiting; + } + _getBlockRegistryViaVersion(blockHash, version23) { + if (version23) { + const existingViaVersion = this.__internal__registries.find(({ runtimeVersion: { specName, specVersion } }) => specName.eq(version23.specName) && specVersion.eq(version23.specVersion)); + if (existingViaVersion) { + existingViaVersion.counter++; + existingViaVersion.lastBlockHash = blockHash; + return existingViaVersion; + } + } + return null; + } + async _getBlockRegistryViaHash(blockHash) { + if (!this._genesisHash || !this._runtimeVersion) { + throw new Error("Cannot retrieve data on an uninitialized chain"); + } + const header = this.registry.createType("HeaderPartial", this._genesisHash.eq(blockHash) ? { number: util_1.BN_ZERO, parentHash: this._genesisHash } : await (0, rxjs_1.firstValueFrom)(this._rpcCore.chain.getHeader.raw(blockHash))); + if (header.parentHash.isEmpty) { + throw new Error("Unable to retrieve header and parent from supplied hash"); + } + const [firstVersion, lastVersion] = (0, types_known_1.getUpgradeVersion)(this._genesisHash, header.number); + const version23 = this.registry.createType("RuntimeVersionPartial", WITH_VERSION_SHORTCUT && (firstVersion && (lastVersion || firstVersion.specVersion.eq(this._runtimeVersion.specVersion))) ? { apis: firstVersion.apis, specName: this._runtimeVersion.specName, specVersion: firstVersion.specVersion } : await (0, rxjs_1.firstValueFrom)(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))); + return this._getBlockRegistryViaVersion(blockHash, version23) || await this._cacheBlockRegistryProgress(version23.toHex(), () => this._createBlockRegistry(blockHash, header, version23)); + } + async getBlockRegistry(blockHash, knownVersion) { + return this.__internal__registries.find(({ lastBlockHash }) => lastBlockHash && (0, util_1.u8aEq)(lastBlockHash, blockHash)) || this._getBlockRegistryViaVersion(blockHash, knownVersion) || await this._cacheBlockRegistryProgress((0, util_1.u8aToHex)(blockHash), () => this._getBlockRegistryViaHash(blockHash)); + } + async _loadMeta() { + if (this._isReady) { + return true; + } + this._unsubscribeUpdates(); + [this._genesisHash, this._runtimeMetadata] = this._options.source?._isReady ? await this._metaFromSource(this._options.source) : await this._metaFromChain(this._options.metadata); + return this._initFromMeta(this._runtimeMetadata); + } + async _metaFromSource(source) { + this._extrinsicType = source.extrinsicVersion; + this._runtimeChain = source.runtimeChain; + this._runtimeVersion = source.runtimeVersion; + const sections = Object.keys(source.rpc); + const rpcs = []; + for (let s = 0, scount = sections.length; s < scount; s++) { + const section = sections[s]; + const methods = Object.keys(source.rpc[section]); + for (let m = 0, mcount = methods.length; m < mcount; m++) { + rpcs.push(`${section}_${methods[m]}`); + } + } + this._filterRpc(rpcs, (0, types_known_1.getSpecRpc)(this.registry, source.runtimeChain, source.runtimeVersion.specName)); + return [source.genesisHash, source.runtimeMetadata]; + } + _subscribeUpdates() { + if (this.__internal__updateSub || !this.hasSubscriptions) { + return; + } + this.__internal__updateSub = this._rpcCore.state.subscribeRuntimeVersion().pipe((0, rxjs_1.switchMap)((version23) => this._runtimeVersion?.specVersion.eq(version23.specVersion) ? (0, rxjs_1.of)(false) : this._rpcCore.state.getMetadata().pipe((0, rxjs_1.map)((metadata) => { + l15.log(`Runtime version updated to spec=${version23.specVersion.toString()}, tx=${version23.transactionVersion.toString()}`); + this._runtimeMetadata = metadata; + this._runtimeVersion = version23; + this._rx.runtimeVersion = version23; + const thisRegistry = this._getDefaultRegistry(); + const runtimeChain = this._runtimeChain; + if (!runtimeChain) { + throw new Error("Invalid initializion order, runtimeChain is not available"); + } + thisRegistry.metadata = metadata; + thisRegistry.runtimeVersion = version23; + this._initRegistry(this.registry, runtimeChain, version23, metadata); + this._injectMetadata(thisRegistry, true); + return true; + })))).subscribe(); + } + async _metaFromChain(optMetadata) { + const [genesisHash, runtimeVersion, chain4, chainProps, rpcMethods, chainMetadata] = await Promise.all([ + (0, rxjs_1.firstValueFrom)(this._rpcCore.chain.getBlockHash(0)), + (0, rxjs_1.firstValueFrom)(this._rpcCore.state.getRuntimeVersion()), + (0, rxjs_1.firstValueFrom)(this._rpcCore.system.chain()), + (0, rxjs_1.firstValueFrom)(this._rpcCore.system.properties()), + (0, rxjs_1.firstValueFrom)(this._rpcCore.rpc.methods()), + optMetadata ? Promise.resolve(null) : (0, rxjs_1.firstValueFrom)(this._rpcCore.state.getMetadata()) + ]); + this._runtimeChain = chain4; + this._runtimeVersion = runtimeVersion; + this._rx.runtimeVersion = runtimeVersion; + const metadataKey = `${genesisHash.toHex() || "0x"}-${runtimeVersion.specVersion.toString()}`; + const metadata = chainMetadata || (optMetadata?.[metadataKey] ? new types_1.Metadata(this.registry, optMetadata[metadataKey]) : await (0, rxjs_1.firstValueFrom)(this._rpcCore.state.getMetadata())); + this._initRegistry(this.registry, chain4, runtimeVersion, metadata, chainProps); + this._filterRpc(rpcMethods.methods.map(textToString), (0, types_known_1.getSpecRpc)(this.registry, chain4, runtimeVersion.specName)); + this._subscribeUpdates(); + if (!this.__internal__registries.length) { + this.__internal__registries.push({ counter: 0, isDefault: true, metadata, registry: this.registry, runtimeVersion }); + } + metadata.getUniqTypes(this._options.throwOnUnknown || false); + return [genesisHash, metadata]; + } + _initFromMeta(metadata) { + const runtimeVersion = this._runtimeVersion; + if (!runtimeVersion) { + throw new Error("Invalid initializion order, runtimeVersion is not available"); + } + this._extrinsicType = metadata.asLatest.extrinsic.version.toNumber(); + this._rx.extrinsicType = this._extrinsicType; + this._rx.genesisHash = this._genesisHash; + this._rx.runtimeVersion = runtimeVersion; + this._injectMetadata(this._getDefaultRegistry(), true); + this._rx.derive = this._decorateDeriveRx(this._rxDecorateMethod); + this._derive = this._decorateDerive(this._decorateMethod); + return true; + } + _subscribeHealth() { + this._unsubscribeHealth(); + this.__internal__healthTimer = this.hasSubscriptions ? setInterval(() => { + (0, rxjs_1.firstValueFrom)(this._rpcCore.system.health.raw()).catch(util_1.noop); + }, KEEPALIVE_INTERVAL) : null; + } + _unsubscribeHealth() { + if (this.__internal__healthTimer) { + clearInterval(this.__internal__healthTimer); + this.__internal__healthTimer = null; + } + } + _unsubscribeUpdates() { + if (this.__internal__updateSub) { + this.__internal__updateSub.unsubscribe(); + this.__internal__updateSub = null; + } + } + _unsubscribe() { + this._unsubscribeHealth(); + this._unsubscribeUpdates(); + } + async __internal__onProviderConnect() { + this._isConnected.next(true); + this.emit("connected"); + try { + const cryptoReady = this._options.initWasm === false ? true : await (0, util_crypto_1.cryptoWaitReady)(); + const hasMeta = await this._loadMeta(); + this._subscribeHealth(); + if (hasMeta && !this._isReady && cryptoReady) { + this._isReady = true; + this.emit("ready", this); + } + } catch (_error) { + const error = new Error(`FATAL: Unable to initialize the API: ${_error.message}`); + l15.error(error); + this.emit("error", error); + } + } + __internal__onProviderDisconnect() { + this._isConnected.next(false); + this._unsubscribe(); + this.emit("disconnected"); + } + __internal__onProviderError(error) { + this.emit("error", error); + } + }; + exports2.Init = Init; + } + }); + + // ../../node_modules/@polkadot/api/cjs/base/Getters.js + var require_Getters = __commonJS({ + "../../node_modules/@polkadot/api/cjs/base/Getters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Getters = void 0; + var packageInfo_js_1 = require_packageInfo19(); + var find_js_1 = require_find2(); + var Init_js_1 = require_Init(); + function assertResult(value) { + if (value === void 0) { + throw new Error("Api interfaces needs to be initialized before using, wait for 'isReady'"); + } + return value; + } + var Getters = class extends Init_js_1.Init { + get call() { + return assertResult(this._call); + } + get consts() { + return assertResult(this._consts); + } + get derive() { + return assertResult(this._derive); + } + get errors() { + return assertResult(this._errors); + } + get events() { + return assertResult(this._events); + } + get extrinsicVersion() { + return this._extrinsicType; + } + get genesisHash() { + return assertResult(this._genesisHash); + } + get isConnected() { + return this._isConnected.getValue(); + } + get libraryInfo() { + return `${packageInfo_js_1.packageInfo.name} v${packageInfo_js_1.packageInfo.version}`; + } + get query() { + return assertResult(this._query); + } + get queryMulti() { + return assertResult(this._queryMulti); + } + get rpc() { + return assertResult(this._rpc); + } + get runtimeChain() { + return assertResult(this._runtimeChain); + } + get runtimeMetadata() { + return assertResult(this._runtimeMetadata); + } + get runtimeVersion() { + return assertResult(this._runtimeVersion); + } + get rx() { + return assertResult(this._rx); + } + get stats() { + return this._rpcCore.stats; + } + get type() { + return this._type; + } + get tx() { + return assertResult(this._extrinsics); + } + findCall(callIndex) { + return (0, find_js_1.findCall)(this.registry, callIndex); + } + findError(errorIndex) { + return (0, find_js_1.findError)(this.registry, errorIndex); + } + }; + exports2.Getters = Getters; + } + }); + + // ../../node_modules/@polkadot/api/cjs/base/index.js + var require_base2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/base/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiBase = void 0; + var util_1 = require_cjs3(); + var Getters_js_1 = require_Getters(); + var ApiBase = class extends Getters_js_1.Getters { + constructor(options = {}, type, decorateMethod) { + super(options, type, decorateMethod); + } + connect() { + return this._rpcCore.connect(); + } + disconnect() { + this._unsubscribe(); + return this._rpcCore.disconnect(); + } + setSigner(signer) { + this._rx.signer = signer; + } + async sign(address, data, { signer } = {}) { + if ((0, util_1.isString)(address)) { + const _signer = signer || this._rx.signer; + if (!_signer?.signRaw) { + throw new Error("No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing."); + } + return (await _signer.signRaw((0, util_1.objectSpread)({ type: "bytes" }, data, { address }))).signature; + } + return (0, util_1.u8aToHex)(address.sign((0, util_1.u8aToU8a)(data.data))); + } + }; + exports2.ApiBase = ApiBase; + } + }); + + // ../../node_modules/@polkadot/api/cjs/promise/Combinator.js + var require_Combinator = __commonJS({ + "../../node_modules/@polkadot/api/cjs/promise/Combinator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Combinator = void 0; + var util_1 = require_cjs3(); + var Combinator = class { + __internal__allHasFired = false; + __internal__callback; + __internal__fired = []; + __internal__fns = []; + __internal__isActive = true; + __internal__results = []; + __internal__subscriptions = []; + constructor(fns, callback) { + this.__internal__callback = callback; + this.__internal__subscriptions = fns.map(async (input, index) => { + const [fn2, ...args] = Array.isArray(input) ? input : [input]; + this.__internal__fired.push(false); + this.__internal__fns.push(fn2); + return fn2(...args, this._createCallback(index)); + }); + } + _allHasFired() { + this.__internal__allHasFired ||= this.__internal__fired.filter((hasFired) => !hasFired).length === 0; + return this.__internal__allHasFired; + } + _createCallback(index) { + return (value) => { + this.__internal__fired[index] = true; + this.__internal__results[index] = value; + this._triggerUpdate(); + }; + } + _triggerUpdate() { + if (!this.__internal__isActive || !(0, util_1.isFunction)(this.__internal__callback) || !this._allHasFired()) { + return; + } + try { + Promise.resolve(this.__internal__callback(this.__internal__results)).catch(util_1.noop); + } catch { + } + } + unsubscribe() { + if (!this.__internal__isActive) { + return; + } + this.__internal__isActive = false; + Promise.all(this.__internal__subscriptions.map(async (subscription) => { + try { + const unsubscribe = await subscription; + if ((0, util_1.isFunction)(unsubscribe)) { + unsubscribe(); + } + } catch { + } + })).catch(() => { + }); + } + }; + exports2.Combinator = Combinator; + } + }); + + // ../../node_modules/@polkadot/api/cjs/promise/decorateMethod.js + var require_decorateMethod = __commonJS({ + "../../node_modules/@polkadot/api/cjs/promise/decorateMethod.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPromiseMethod = exports2.promiseTracker = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + function promiseTracker(resolve, reject) { + let isCompleted = false; + return { + reject: (error) => { + if (!isCompleted) { + isCompleted = true; + reject(error); + } + return rxjs_1.EMPTY; + }, + resolve: (value) => { + if (!isCompleted) { + isCompleted = true; + resolve(value); + } + } + }; + } + exports2.promiseTracker = promiseTracker; + function extractArgs(args, needsCallback) { + const actualArgs = args.slice(); + const callback = args.length && (0, util_1.isFunction)(args[args.length - 1]) ? actualArgs.pop() : void 0; + if (needsCallback && !(0, util_1.isFunction)(callback)) { + throw new Error("Expected a callback to be passed with subscriptions"); + } + return [actualArgs, callback]; + } + function decorateCall(method, args) { + return new Promise((resolve, reject) => { + const tracker = promiseTracker(resolve, reject); + const subscription = method(...args).pipe((0, rxjs_1.catchError)((error) => tracker.reject(error))).subscribe((result) => { + tracker.resolve(result); + (0, util_1.nextTick)(() => subscription.unsubscribe()); + }); + }); + } + function decorateSubscribe(method, args, resultCb) { + return new Promise((resolve, reject) => { + const tracker = promiseTracker(resolve, reject); + const subscription = method(...args).pipe((0, rxjs_1.catchError)((error) => tracker.reject(error)), (0, rxjs_1.tap)(() => tracker.resolve(() => subscription.unsubscribe()))).subscribe((result) => { + (0, util_1.nextTick)(() => resultCb(result)); + }); + }); + } + function toPromiseMethod(method, options) { + const needsCallback = !!(options?.methodName && options.methodName.includes("subscribe")); + return function(...args) { + const [actualArgs, resultCb] = extractArgs(args, needsCallback); + return resultCb ? decorateSubscribe(method, actualArgs, resultCb) : decorateCall(options?.overrideNoSub || method, actualArgs); + }; + } + exports2.toPromiseMethod = toPromiseMethod; + } + }); + + // ../../node_modules/@polkadot/api/cjs/promise/Api.js + var require_Api = __commonJS({ + "../../node_modules/@polkadot/api/cjs/promise/Api.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiPromise = void 0; + var util_1 = require_cjs3(); + var index_js_1 = require_base2(); + var Combinator_js_1 = require_Combinator(); + var decorateMethod_js_1 = require_decorateMethod(); + var ApiPromise = class extends index_js_1.ApiBase { + __internal__isReadyPromise; + __internal__isReadyOrErrorPromise; + constructor(options) { + super(options, "promise", decorateMethod_js_1.toPromiseMethod); + this.__internal__isReadyPromise = new Promise((resolve) => { + super.once("ready", () => resolve(this)); + }); + this.__internal__isReadyOrErrorPromise = new Promise((resolve, reject) => { + const tracker = (0, decorateMethod_js_1.promiseTracker)(resolve, reject); + super.once("ready", () => tracker.resolve(this)); + super.once("error", (error) => tracker.reject(error)); + }); + } + static create(options) { + const instance = new ApiPromise(options); + if (options && options.throwOnConnect) { + return instance.isReadyOrError; + } + instance.isReadyOrError.catch(util_1.noop); + return instance.isReady; + } + get isReady() { + return this.__internal__isReadyPromise; + } + get isReadyOrError() { + return this.__internal__isReadyOrErrorPromise; + } + clone() { + return new ApiPromise((0, util_1.objectSpread)({}, this._options, { source: this })); + } + async combineLatest(fns, callback) { + const combinator = new Combinator_js_1.Combinator(fns, callback); + return () => { + combinator.unsubscribe(); + }; + } + }; + exports2.ApiPromise = ApiPromise; + } + }); + + // ../../node_modules/@polkadot/api/cjs/promise/index.js + var require_promise2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/promise/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPromiseMethod = exports2.ApiPromise = void 0; + var Api_js_1 = require_Api(); + Object.defineProperty(exports2, "ApiPromise", { enumerable: true, get: function() { + return Api_js_1.ApiPromise; + } }); + var decorateMethod_js_1 = require_decorateMethod(); + Object.defineProperty(exports2, "toPromiseMethod", { enumerable: true, get: function() { + return decorateMethod_js_1.toPromiseMethod; + } }); + } + }); + + // ../../node_modules/@polkadot/api/cjs/rx/decorateMethod.js + var require_decorateMethod2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/rx/decorateMethod.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toRxMethod = void 0; + function toRxMethod(method) { + return method; + } + exports2.toRxMethod = toRxMethod; + } + }); + + // ../../node_modules/@polkadot/api/cjs/rx/Api.js + var require_Api2 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/rx/Api.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiRx = void 0; + var rxjs_1 = require_cjs7(); + var util_1 = require_cjs3(); + var index_js_1 = require_base2(); + var decorateMethod_js_1 = require_decorateMethod2(); + var ApiRx = class extends index_js_1.ApiBase { + __internal__isReadyRx; + constructor(options) { + super(options, "rxjs", decorateMethod_js_1.toRxMethod); + this.__internal__isReadyRx = (0, rxjs_1.from)( + new Promise((resolve) => { + super.on("ready", () => resolve(this)); + }) + ); + } + static create(options) { + return new ApiRx(options).isReady; + } + get isReady() { + return this.__internal__isReadyRx; + } + clone() { + return new ApiRx((0, util_1.objectSpread)({}, this._options, { source: this })); + } + }; + exports2.ApiRx = ApiRx; + } + }); + + // ../../node_modules/@polkadot/api/cjs/rx/index.js + var require_rx = __commonJS({ + "../../node_modules/@polkadot/api/cjs/rx/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toRxMethod = exports2.ApiRx = void 0; + var Api_js_1 = require_Api2(); + Object.defineProperty(exports2, "ApiRx", { enumerable: true, get: function() { + return Api_js_1.ApiRx; + } }); + var decorateMethod_js_1 = require_decorateMethod2(); + Object.defineProperty(exports2, "toRxMethod", { enumerable: true, get: function() { + return decorateMethod_js_1.toRxMethod; + } }); + } + }); + + // ../../node_modules/@polkadot/api/cjs/bundle.js + var require_bundle13 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SubmittableResult = exports2.packageInfo = exports2.WsProvider = exports2.ScProvider = exports2.HttpProvider = exports2.Keyring = void 0; + var tslib_1 = require_tslib(); + require_cjs14(); + var keyring_1 = require_cjs15(); + Object.defineProperty(exports2, "Keyring", { enumerable: true, get: function() { + return keyring_1.Keyring; + } }); + var rpc_provider_1 = require_cjs16(); + Object.defineProperty(exports2, "HttpProvider", { enumerable: true, get: function() { + return rpc_provider_1.HttpProvider; + } }); + Object.defineProperty(exports2, "ScProvider", { enumerable: true, get: function() { + return rpc_provider_1.ScProvider; + } }); + Object.defineProperty(exports2, "WsProvider", { enumerable: true, get: function() { + return rpc_provider_1.WsProvider; + } }); + var packageInfo_js_1 = require_packageInfo19(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + var index_js_1 = require_submittable(); + Object.defineProperty(exports2, "SubmittableResult", { enumerable: true, get: function() { + return index_js_1.SubmittableResult; + } }); + tslib_1.__exportStar(require_promise2(), exports2); + tslib_1.__exportStar(require_rx(), exports2); + } + }); + + // ../../node_modules/@polkadot/api/cjs/index.js + var require_cjs17 = __commonJS({ + "../../node_modules/@polkadot/api/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect7(); + tslib_1.__exportStar(require_bundle13(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-base/cjs/packageInfo.js + var require_packageInfo24 = __commonJS({ + "../../node_modules/@polkadot/api-base/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/api-base", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/packageInfo.js + var require_packageInfo25 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/api-augment", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/packageDetect.js + var require_packageDetect10 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo24(); + var packageInfo_2 = require_packageInfo14(); + var packageInfo_3 = require_packageInfo16(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo25(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_1.packageInfo, packageInfo_3.packageInfo, packageInfo_2.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/packageInfo.js + var require_packageInfo26 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/packageInfo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + exports2.packageInfo = { name: "@polkadot/types-augment", path: typeof __dirname === "string" ? __dirname : "auto", type: "cjs", version: "10.13.1" }; + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/packageDetect.js + var require_packageDetect11 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/packageDetect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageInfo_1 = require_packageInfo14(); + var packageInfo_2 = require_packageInfo16(); + var util_1 = require_cjs3(); + var packageInfo_js_1 = require_packageInfo26(); + (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, [packageInfo_2.packageInfo, packageInfo_1.packageInfo]); + } + }); + + // ../../node_modules/@polkadot/types/cjs/types/registry.js + var require_registry3 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/types/registry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/registry/interfaces.js + var require_interfaces2 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/registry/interfaces.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_registry3(); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/registry/index.js + var require_registry4 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/registry/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_interfaces2(); + } + }); + + // ../../node_modules/@polkadot/types/cjs/lookup.js + var require_lookup2 = __commonJS({ + "../../node_modules/@polkadot/types/cjs/lookup.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.__TYPES_LOOKUP = void 0; + exports2.__TYPES_LOOKUP = "augmented"; + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/lookup/types-substrate.js + var require_types_substrate = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/lookup/types-substrate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_lookup2(); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/lookup/types-polkadot.js + var require_types_polkadot = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/lookup/types-polkadot.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_lookup2(); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/lookup/types-kusama.js + var require_types_kusama = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/lookup/types-kusama.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_lookup2(); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/lookup/types.js + var require_types4 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/lookup/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_types_substrate(); + require_types_polkadot(); + require_types_kusama(); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/lookup/index.js + var require_lookup3 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/lookup/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + tslib_1.__exportStar(require_types4(), exports2); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/augment.js + var require_augment2 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/augment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_registry4(); + require_lookup3(); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/bundle.js + var require_bundle14 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + require_augment2(); + var packageInfo_js_1 = require_packageInfo26(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/index.js + var require_cjs18 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect11(); + tslib_1.__exportStar(require_bundle14(), exports2); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/base.js + var require_base3 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/base.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_cjs14(); + require_cjs18(); + } + }); + + // ../../node_modules/@polkadot/api-base/cjs/types/consts.js + var require_consts3 = __commonJS({ + "../../node_modules/@polkadot/api-base/cjs/types/consts.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/consts.js + var require_consts4 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/consts.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_consts3(); + } + }); + + // ../../node_modules/@polkadot/api-base/cjs/types/errors.js + var require_errors3 = __commonJS({ + "../../node_modules/@polkadot/api-base/cjs/types/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/errors.js + var require_errors4 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_errors3(); + } + }); + + // ../../node_modules/@polkadot/api-base/cjs/types/events.js + var require_events3 = __commonJS({ + "../../node_modules/@polkadot/api-base/cjs/types/events.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/events.js + var require_events4 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/events.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_events3(); + } + }); + + // ../../node_modules/@polkadot/api-base/cjs/types/storage.js + var require_storage3 = __commonJS({ + "../../node_modules/@polkadot/api-base/cjs/types/storage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/query.js + var require_query2 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/query.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_storage3(); + } + }); + + // ../../node_modules/@polkadot/types-augment/cjs/registry/substrate.js + var require_substrate3 = __commonJS({ + "../../node_modules/@polkadot/types-augment/cjs/registry/substrate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_registry3(); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/registry.js + var require_registry5 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/registry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_substrate3(); + } + }); + + // ../../node_modules/@polkadot/api-base/cjs/types/calls.js + var require_calls = __commonJS({ + "../../node_modules/@polkadot/api-base/cjs/types/calls.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/runtime.js + var require_runtime34 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/runtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_calls(); + } + }); + + // ../../node_modules/@polkadot/api-base/cjs/types/submittable.js + var require_submittable2 = __commonJS({ + "../../node_modules/@polkadot/api-base/cjs/types/submittable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/tx.js + var require_tx2 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/tx.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_submittable2(); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/substrate/index.js + var require_substrate4 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/substrate/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_base3(); + require_consts4(); + require_errors4(); + require_events4(); + require_query2(); + require_registry5(); + require_runtime34(); + require_tx2(); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/bundle.js + var require_bundle15 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/bundle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageInfo = void 0; + require_substrate4(); + var packageInfo_js_1 = require_packageInfo25(); + Object.defineProperty(exports2, "packageInfo", { enumerable: true, get: function() { + return packageInfo_js_1.packageInfo; + } }); + } + }); + + // ../../node_modules/@polkadot/api-augment/cjs/index.js + var require_cjs19 = __commonJS({ + "../../node_modules/@polkadot/api-augment/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = require_tslib(); + require_packageDetect10(); + tslib_1.__exportStar(require_bundle15(), exports2); + } + }); + + // ../../node_modules/@open-web3/orml-api-derive/currencies/balance.js + var require_balance = __commonJS({ + "../../node_modules/@open-web3/orml-api-derive/currencies/balance.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.balance = void 0; + var _util = require_util10(); + var _operators = require_operators(); + var balance = (instanceId, api) => { + return (0, _util.memo)(instanceId, (address, token) => { + return api.rpc.system.properties().pipe((0, _operators.mergeMap)((properties) => { + const currencyId = api.registry.createType("CurrencyId", token); + const nativeTokenSymbol = properties.tokenSymbol.unwrapOrDefault()[0].toString(); + const nativeCurrencyId = api.registry.createType("CurrencyId", (api.registry.getDefinition("CurrencyId") || "").includes('"Token":"TokenSymbol"') ? { + Token: nativeTokenSymbol + } : nativeTokenSymbol); + if (currencyId.eq(nativeCurrencyId)) { + return api.query.system.account(address).pipe((0, _operators.map)((result) => { + return result.data.free; + })); + } + const lookupId = api.query.tokens.accounts.creator.meta.type.asMap.key; + const [typeId] = api.registry.lookup.getSiType(lookupId).def.asTuple; + const keyType = api.registry.lookup.getTypeDef(typeId).type; + const arg = keyType === "CurrencyId" ? [token, address] : [address, token]; + return api.query.tokens.accounts(...arg).pipe((0, _operators.map)((result) => { + return result.free; + })); + })); + }); + }; + exports2.balance = balance; + } + }); + + // ../../node_modules/@open-web3/orml-api-derive/currencies/index.js + var require_currencies = __commonJS({ + "../../node_modules/@open-web3/orml-api-derive/currencies/index.js"(exports2) { + "use strict"; + exports2.__esModule = true; + var _balance = require_balance(); + Object.keys(_balance).forEach(function(key2) { + if (key2 === "default" || key2 === "__esModule") + return; + if (key2 in exports2 && exports2[key2] === _balance[key2]) + return; + exports2[key2] = _balance[key2]; + }); + } + }); + + // ../../node_modules/@open-web3/orml-api-derive/index.js + var require_orml_api_derive = __commonJS({ + "../../node_modules/@open-web3/orml-api-derive/index.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.derive = void 0; + var _currencies = require_currencies(); + var derive2 = { + currencies: { + balance: _currencies.balance + } + }; + exports2.derive = derive2; + } + }); + + // ../../node_modules/@reef-chain/evm-provider/reef-api/allCurrencies.js + var require_allCurrencies = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/reef-api/allCurrencies.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.allCurrencyIds = exports2.allNonNativeCurrencyIds = exports2.nativeCurrencyId = void 0; + var util_1 = require_util10(); + var rxjs_1 = require_cjs7(); + var operators_1 = require_operators(); + function getNativeCurrencyId(api) { + return api.rpc.system.properties().pipe((0, operators_1.switchMap)((properties) => { + const nativeTokenSymbol = properties.tokenSymbol.unwrapOrDefault()[0].toString(); + return (0, rxjs_1.of)(api.registry.createType("CurrencyId", api.registry.createType("TokenSymbol", nativeTokenSymbol))); + })); + } + function nativeCurrencyId(instanceId, api) { + return (0, util_1.memo)(instanceId, () => { + return getNativeCurrencyId(api); + }); + } + exports2.nativeCurrencyId = nativeCurrencyId; + function getAllNonNativeCurrencyIds(api) { + return api.consts.transactionPayment.allNonNativeCurrencyIds; + } + function allNonNativeCurrencyIds(instanceId, api) { + return (0, util_1.memo)(instanceId, () => { + return (0, rxjs_1.of)(getAllNonNativeCurrencyIds(api)); + }); + } + exports2.allNonNativeCurrencyIds = allNonNativeCurrencyIds; + function allCurrencyIds(instanceId, api) { + return (0, util_1.memo)(instanceId, () => { + return getNativeCurrencyId(api).pipe((0, operators_1.switchMap)((nativeCurrencyId2) => { + return (0, rxjs_1.of)([ + nativeCurrencyId2, + ...getAllNonNativeCurrencyIds(api).slice() + ]); + })); + }); + } + exports2.allCurrencyIds = allCurrencyIds; + } + }); + + // ../../node_modules/@reef-chain/evm-provider/reef-api/defaultOptions.js + var require_defaultOptions = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/reef-api/defaultOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultOptions = void 0; + exports2.defaultOptions = { + types: { + CallOf: "Call", + DispatchTime: { _enum: { At: "BlockNumber", After: "BlockNumber" } }, + ScheduleTaskIndex: "u32", + DelayedOrigin: { delay: "BlockNumber", origin: "PalletsOrigin" }, + AuthorityOrigin: "DelayedOrigin", + StorageValue: "Vec", + GraduallyUpdate: { + key: "StorageKey", + targetValue: "StorageValue", + perBlock: "StorageValue" + }, + StorageKeyBytes: "Vec", + StorageValueBytes: "Vec", + RpcDataProviderId: "Text", + DataProviderId: "u8", + TimestampedValue: { value: "OracleValue", timestamp: "Moment" }, + TimestampedValueOf: "TimestampedValue", + OrderedSet: "Vec", + OrmlAccountData: { + free: "Balance", + reserved: "Balance", + frozen: "Balance" + }, + OrmlBalanceLock: { amount: "Balance", id: "LockIdentifier" }, + AuctionInfo: { + bid: "Option<(AccountId, Balance)>", + start: "BlockNumber", + end: "Option" + }, + DelayedDispatchTime: { _enum: { At: "BlockNumber", After: "BlockNumber" } }, + DispatchId: "u32", + Price: "FixedU128", + OrmlVestingSchedule: { + start: "BlockNumber", + period: "BlockNumber", + periodCount: "u32", + perPeriod: "Compact" + }, + VestingScheduleOf: "OrmlVestingSchedule", + OrmlCurrencyId: "u8", + PoolInfo: { + totalShares: "Share", + rewards: "BTreeMap" + }, + CompactBalance: "Compact", + PoolInfoV0: { + totalShares: "Compact", + totalRewards: "CompactBalance", + totalWithdrawnRewards: "CompactBalance" + }, + Share: "u128", + OracleValue: "Price", + PalletBalanceOf: "Balance", + EstimateResourcesResponse: { + gas: "u256", + storage: "i32", + weightFee: "u256" + }, + EvmAccountInfo: { + nonce: "Index", + contractInfo: "Option", + developerDeposit: "Option" + }, + CodeInfo: { codeSize: "u32", refCount: "u32" }, + EvmContractInfo: { codeHash: "H256", maintainer: "H160", deployed: "bool" }, + EvmAddress: "H160", + CallRequest: { + from: "Option", + to: "Option", + gasLimit: "Option", + storageLimit: "Option", + value: "Option", + data: "Option" + }, + CommitmentOf: { + duration: "LockDuration", + amount: "BalanceOf", + candidate: "AccountId" + }, + Era: { index: "u32", start: "BlockNumber" }, + LockDuration: { _enum: ["OneMonth", "OneYear", "TenYears"] }, + PoolId: { + _enum: { + Loans: "CurrencyId", + DexIncentive: "CurrencyId", + DexSaving: "CurrencyId", + Homa: "Null" + } + }, + Amount: "i128", + AmountOf: "Amount", + AuctionId: "u32", + AuctionIdOf: "AuctionId", + TokenSymbol: { _enum: { REEF: 0, RUSD: 1 } }, + CurrencyId: { + _enum: { + Token: "TokenSymbol", + DEXShare: "(TokenSymbol, TokenSymbol)", + ERC20: "EvmAddress" + } + }, + CurrencyIdOf: "CurrencyId", + AuthoritysOriginId: { _enum: ["Root"] }, + TradingPair: "(CurrencyId, CurrencyId)", + OracleKey: "CurrencyId", + AsOriginId: "AuthoritysOriginId", + ExchangeRate: "FixedU128", + Rate: "FixedU128", + Ratio: "FixedU128", + Keys: "SessionKeys4", + PalletsOrigin: { + _enum: { + System: "SystemOrigin", + Timestamp: "Null", + RandomnessCollectiveFlip: "Null", + Balances: "Null", + Accounts: "Null", + Currencies: "Null", + Tokens: "Null", + Vesting: "Null", + AcalaTreasury: "Null", + Utility: "Null", + Multisig: "Null", + Recovery: "Null", + Proxy: "Null", + Scheduler: "Null", + Indices: "Null", + GraduallyUpdate: "Null", + Authorship: "Null", + Babe: "Null", + Grandpa: "Null", + Staking: "Null", + Session: "Null", + Historical: "Null", + GeneralCouncil: "CollectiveOrigin", + GeneralCouncilMembership: "Null", + HonzonCouncil: "CollectiveOrigin", + HonzonCouncilMembership: "Null", + HomaCouncil: "CollectiveOrigin", + HomaCouncilMembership: "Null", + TechnicalCommittee: "CollectiveOrigin", + TechnicalCommitteeMembership: "Null", + Authority: "DelayedOrigin", + ElectionsPhragmen: "Null", + AcalaOracle: "Null", + BandOracle: "Null", + OperatorMembershipAcala: "Null", + OperatorMembershipBand: "Null", + Auction: "Null", + Rewards: "Null", + OrmlNFT: "Null", + Prices: "Null", + Dex: "Null", + AuctionManager: "Null", + Loans: "Null", + Honzon: "Null", + CdpTreasury: "Null", + CdpEngine: "Null", + EmergencyShutdown: "Null", + Homa: "Null", + NomineesElection: "Null", + StakingPool: "Null", + PolkadotBridge: "Null", + Incentives: "Null", + AirDrop: "Null", + NFT: "Null", + RenVmBridge: "Null", + Contracts: "Null", + EVM: "Null", + Sudo: "Null", + TransactionPayment: "Null" + } + } + }, + rpc: { + oracle: { + getValue: { + description: "Retrieves the oracle value for a given key.", + params: [ + { name: "providerId", type: "RpcDataProviderId" }, + { name: "key", type: "OracleKey" }, + { name: "at", type: "BlockHash", isHistoric: true, isOptional: true } + ], + type: "Option" + }, + getAllValues: { + description: "Retrieves all oracle values.", + params: [ + { name: "providerId", type: "RpcDataProviderId" }, + { name: "at", type: "BlockHash", isHistoric: true, isOptional: true } + ], + type: "Vec<(OracleKey, Option)>" + } + }, + tokens: { + queryExistentialDeposit: { + description: "Query Existential Deposit for a given currency.", + params: [ + { name: "currencyId", type: "CurrencyId" }, + { name: "at", type: "BlockHash", isHistoric: true, isOptional: true } + ], + type: "NumberOrHex" + } + }, + evm: { + call: { + description: "eth call", + params: [ + { name: "data", type: "CallRequest" }, + { name: "at", type: "BlockHash", isHistoric: true, isOptional: true } + ], + type: "Raw" + }, + estimateGas: { + description: "eth estimateGas", + params: [ + { name: "data", type: "CallRequest" }, + { name: "at", type: "BlockHash", isHistoric: true, isOptional: true } + ], + type: "u128" + }, + estimateResources: { + description: "eth estimateResources", + params: [ + { name: "from", type: "H160" }, + { name: "unsignedExtrinsic", type: "Bytes" }, + { name: "at", type: "BlockHash", isHistoric: true, isOptional: true } + ], + type: "EstimateResourcesResponse" + } + } + }, + typesAlias: { + evm: { AccountInfo: "EvmAccountInfo", ContractInfo: "EvmContractInfo" }, + tokens: { AccountData: "OrmlAccountData", BalanceLock: "OrmlBalanceLock" } + }, + typesBundle: { + spec: { + acala: { + types: [ + { + minmax: [600, 699], + types: { + Address: "LookupSource", + LookupSource: "IndicesLookupSource", + TokenSymbol: { + _enum: ["ACA", "AUSD", "DOT", "XBTC", "LDOT", "RENBTC"] + } + } + }, + { + minmax: [700, 719], + types: { + Address: "GenericMultiAddress", + LookupSource: "GenericMultiAddress", + TokenSymbol: { + _enum: ["ACA", "AUSD", "DOT", "XBTC", "LDOT", "RENBTC"] + } + } + }, + { + minmax: [720, null], + types: { + Address: "GenericMultiAddress", + LookupSource: "GenericMultiAddress" + } + } + ] + }, + mandala: { + types: [ + { + minmax: [600, 699], + types: { + Address: "LookupSource", + LookupSource: "IndicesLookupSource", + TokenSymbol: { + _enum: ["ACA", "AUSD", "DOT", "XBTC", "LDOT", "RENBTC"] + } + } + }, + { + minmax: [700, 719], + types: { + Address: "GenericMultiAddress", + LookupSource: "GenericMultiAddress", + TokenSymbol: { + _enum: ["ACA", "AUSD", "DOT", "XBTC", "LDOT", "RENBTC"] + } + } + }, + { + minmax: [720, null], + types: { + Address: "GenericMultiAddress", + LookupSource: "GenericMultiAddress" + } + } + ] + } + } + }, + signedExtensions: { SetEvmOrigin: { extrinsic: {}, payload: {} } } + }; + } + }); + + // ../../node_modules/@reef-chain/evm-provider/reef-api/options.js + var require_options = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/reef-api/options.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k22) { + if (k22 === void 0) + k22 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k22, desc); + } : function(o, m, k, k22) { + if (k22 === void 0) + k22 = k; + o[k22] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod3) { + if (mod3 && mod3.__esModule) + return mod3; + var result = {}; + if (mod3 != null) { + for (var k in mod3) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod3, k)) + __createBinding(result, mod3, k); + } + __setModuleDefault(result, mod3); + return result; + }; + var __rest = exports2 && exports2.__rest || function(s, e) { + var t = {}; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.options = void 0; + var orml_api_derive_1 = require_orml_api_derive(); + var constants2 = __importStar(require_allCurrencies()); + var defaultOptions_1 = require_defaultOptions(); + var acalaDerives = { + constants: constants2 + }; + var acalaRpc = defaultOptions_1.defaultOptions.rpc; + var acalaTypes = defaultOptions_1.defaultOptions.types; + var acalaTypesAlias = defaultOptions_1.defaultOptions.typesAlias; + var acalaTypesBundle = defaultOptions_1.defaultOptions.typesBundle; + var acalaSignedExtensions = defaultOptions_1.defaultOptions.signedExtensions; + var options = (_a2 = {}) => { + var _b2, _c2, _d2, _e2; + var { types: types2 = {}, rpc: rpc18 = {}, typesAlias: typesAlias2 = {}, typesBundle = {}, signedExtensions } = _a2, otherOptions = __rest(_a2, ["types", "rpc", "typesAlias", "typesBundle", "signedExtensions"]); + return Object.assign({ types: Object.assign(Object.assign({}, acalaTypes), types2), rpc: Object.assign(Object.assign({}, acalaRpc), rpc18), typesAlias: Object.assign(Object.assign({}, acalaTypesAlias), typesAlias2), derives: Object.assign(Object.assign({}, orml_api_derive_1.derive), acalaDerives), typesBundle: Object.assign(Object.assign({}, typesBundle), { spec: Object.assign(Object.assign({}, typesBundle.spec), { acala: Object.assign(Object.assign({}, (_b2 = acalaTypesBundle === null || acalaTypesBundle === void 0 ? void 0 : acalaTypesBundle.spec) === null || _b2 === void 0 ? void 0 : _b2.acala), (_c2 = typesBundle === null || typesBundle === void 0 ? void 0 : typesBundle.spec) === null || _c2 === void 0 ? void 0 : _c2.acala), mandala: Object.assign(Object.assign({}, (_d2 = acalaTypesBundle === null || acalaTypesBundle === void 0 ? void 0 : acalaTypesBundle.spec) === null || _d2 === void 0 ? void 0 : _d2.mandala), (_e2 = typesBundle === null || typesBundle === void 0 ? void 0 : typesBundle.spec) === null || _e2 === void 0 ? void 0 : _e2.mandala) }) }), signedExtensions: Object.assign(Object.assign({}, acalaSignedExtensions), signedExtensions) }, otherOptions); + }; + exports2.options = options; + } + }); + + // ../../node_modules/@reef-chain/evm-provider/Provider.js + var require_Provider = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/Provider.js"(exports2) { + "use strict"; + var __awaiter16 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod3) { + return mod3 && mod3.__esModule ? mod3 : { "default": mod3 }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Provider = void 0; + var bytes_1 = require_lib2(); + var properties_1 = require_lib7(); + var bignumber_1 = require_lib3(); + var logger_1 = require_lib(); + var scanner_1 = __importDefault(require_scanner()); + var api_1 = require_cjs17(); + var util_1 = require_cjs3(); + var util_crypto_1 = require_cjs6(); + require_cjs19(); + var utils_12 = require_utils3(); + var options_1 = require_options(); + var logger42 = new logger_1.Logger("evm-provider"); + var Provider3 = class { + constructor(_apiOptions, dataProvider) { + const apiOptions = (0, options_1.options)(_apiOptions); + this.api = new api_1.ApiPromise(apiOptions); + this.resolveApi = this.api.isReady; + this._isProvider = true; + this.dataProvider = dataProvider; + this.scanner = new scanner_1.default({ + wsProvider: apiOptions.provider, + types: apiOptions.types, + typesAlias: apiOptions.typesAlias, + typesSpec: apiOptions.typesSpec, + typesChain: apiOptions.typesChain, + typesBundle: apiOptions.typesBundle + }); + } + static isProvider(value) { + return !!(value && value._isProvider); + } + init() { + return __awaiter16(this, void 0, void 0, function* () { + yield this.api.isReady; + this.dataProvider && (yield this.dataProvider.init()); + }); + } + getNetwork() { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + return { + name: this.api.runtimeVersion.specName.toString(), + chainId: 13939 + }; + }); + } + getBlockNumber() { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + const r10 = yield this.api.rpc.chain.getHeader(); + return r10.number.toNumber(); + }); + } + getGasPrice() { + return __awaiter16(this, void 0, void 0, function* () { + return bignumber_1.BigNumber.from(0); + }); + } + getFeeData() { + return __awaiter16(this, void 0, void 0, function* () { + return { + maxFeePerGas: bignumber_1.BigNumber.from(1), + maxPriorityFeePerGas: bignumber_1.BigNumber.from(1), + gasPrice: bignumber_1.BigNumber.from(1) + }; + }); + } + getBalance(addressOrName, blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + let address = yield (0, utils_12.resolveAddress)(this, addressOrName); + if (!address) { + address = yield this._toAddress(addressOrName); + } + const blockHash = yield this._resolveBlockHash(blockTag); + const accountInfo = blockHash ? yield this.api.query.system.account.at(blockHash, address) : yield this.api.query.system.account(address); + return bignumber_1.BigNumber.from(accountInfo.data.free.toBn().toString()); + }); + } + getTransactionCount(addressOrName, blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + const resolvedBlockTag = yield blockTag; + const address = yield (0, utils_12.resolveEvmAddress)(this, addressOrName); + let account; + if (resolvedBlockTag === "pending") { + account = yield this.api.query.evm.accounts(address); + } else { + const blockHash = yield this._resolveBlockHash(blockTag); + account = blockHash ? yield this.api.query.evm.accounts.at(blockHash, address) : yield this.api.query.evm.accounts(address); + } + if (!account.isNone) { + return account.unwrap().nonce.toNumber(); + } else { + return 0; + } + }); + } + getCode(addressOrName, blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + const { address, blockHash } = yield (0, properties_1.resolveProperties)({ + address: (0, utils_12.resolveEvmAddress)(this, addressOrName), + blockHash: this._getBlockTag(blockTag) + }); + const contractInfo = yield this.queryContractInfo(address, blockHash); + if (contractInfo.isNone) { + return "0x"; + } + const codeHash = contractInfo.unwrap().codeHash; + const api = yield blockHash ? this.api.at(blockHash) : this.api; + const code = yield api.query.evm.codes(codeHash); + return code.toHex(); + }); + } + _getBlockTag(blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + blockTag = yield blockTag; + if (blockTag === void 0) { + blockTag = "latest"; + } + switch (blockTag) { + case "pending": { + return logger42.throwError("pending tag not implemented", logger_1.Logger.errors.UNSUPPORTED_OPERATION); + } + case "latest": { + const hash8 = yield this.api.rpc.chain.getBlockHash(); + return hash8.toHex(); + } + case "earliest": { + const hash8 = this.api.genesisHash; + return hash8.toHex(); + } + default: { + if (!(0, bytes_1.isHexString)(blockTag)) { + return logger42.throwArgumentError("blocktag should be a hex string", "blockTag", blockTag); + } + if (typeof blockTag === "string" && (0, bytes_1.isHexString)(blockTag, 32)) { + return blockTag; + } + const blockNumber = bignumber_1.BigNumber.from(blockTag).toNumber(); + const hash8 = yield this.api.rpc.chain.getBlockHash(blockNumber); + return hash8.toHex(); + } + } + }); + } + queryAccountInfo(addressOrName, blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + const resolvedBlockTag = yield blockTag; + if (resolvedBlockTag === "pending") { + const address2 = yield (0, utils_12.resolveEvmAddress)(this, addressOrName); + return this.api.query.evm.accounts(address2); + } + const { address, blockHash } = yield (0, properties_1.resolveProperties)({ + address: (0, utils_12.resolveEvmAddress)(this, addressOrName), + blockHash: this._getBlockTag(blockTag) + }); + const apiAt = yield this.api.at(blockHash); + const accountInfo = yield apiAt.query.evm.accounts(address); + return accountInfo; + }); + } + queryContractInfo(addressOrName, blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + const accountInfo = yield this.queryAccountInfo(addressOrName, blockTag); + if (accountInfo.isNone) { + return this.api.createType("Option", null); + } + return accountInfo.unwrap().contractInfo; + }); + } + getStorageAt(addressOrName, position, blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + const address = yield (0, utils_12.resolveEvmAddress)(this, addressOrName); + const blockHash = yield this._resolveBlockHash(blockTag); + const code = blockHash ? yield this.api.query.evm.accountStorages.at(blockHash, address) : yield this.api.query.evm.accountStorages(address); + return code.toHex(); + }); + } + sendTransaction(signedTransaction) { + return __awaiter16(this, void 0, void 0, function* () { + return this._fail("sendTransaction"); + }); + } + call(transaction, blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + const resolved = yield this._resolveTransaction(transaction); + if (blockTag) { + const blockHash = yield this._resolveBlockHash(blockTag); + const result = yield this.api.rpc.evm.call(resolved, blockHash); + return result.toHex(); + } else { + const result = yield this.api.rpc.evm.call({ + to: resolved.to, + from: resolved.from, + data: resolved.data, + storageLimit: "0" + }); + return result.toHex(); + } + }); + } + estimateGas(transaction) { + return __awaiter16(this, void 0, void 0, function* () { + const resources = yield this.estimateResources(transaction); + return resources.gas.add(resources.storage); + }); + } + estimateResources(transaction) { + return __awaiter16(this, void 0, void 0, function* () { + const resolved = yield this._resolveTransaction(transaction); + const from2 = yield resolved.from; + const value = yield resolved.value; + const to2 = yield resolved.to; + const data = yield resolved.data; + const storageLimit = yield this._resolveStorageLimit(resolved); + if (!from2) { + return logger42.throwError("From cannot be undefined"); + } + const extrinsic = !to2 ? this.api.tx.evm.create(data, (0, utils_12.toBN)(value), (0, utils_12.toBN)(yield resolved.gasLimit), (0, utils_12.toBN)(storageLimit)) : this.api.tx.evm.call(to2, data, (0, utils_12.toBN)(value), (0, utils_12.toBN)(yield resolved.gasLimit), (0, utils_12.toBN)(storageLimit)); + const result = yield this.api.rpc.evm.estimateResources( + resolved.from, + extrinsic.toHex() + ); + return { + gas: bignumber_1.BigNumber.from(result.gas.toString()), + storage: bignumber_1.BigNumber.from(result.storage.toString()), + weightFee: bignumber_1.BigNumber.from(result.weightFee.toString()) + }; + }); + } + getBlock(blockHashOrBlockTag) { + return __awaiter16(this, void 0, void 0, function* () { + return this._fail("getBlock"); + }); + } + getBlockWithTransactions(blockHashOrBlockTag) { + return __awaiter16(this, void 0, void 0, function* () { + return this._fail("getBlockWithTransactions"); + }); + } + getTransaction(transactionHash) { + return __awaiter16(this, void 0, void 0, function* () { + return this._fail("getTransaction"); + }); + } + getTransactionReceipt(txHash) { + return __awaiter16(this, void 0, void 0, function* () { + if (!this.dataProvider) + return this._fail("getTransactionReceipt"); + return this.dataProvider.getTransactionReceipt(txHash, this._resolveBlockNumber); + }); + } + resolveName(name6) { + return __awaiter16(this, void 0, void 0, function* () { + return name6; + }); + } + lookupAddress(address) { + return __awaiter16(this, void 0, void 0, function* () { + return address; + }); + } + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter16(this, void 0, void 0, function* () { + return this._fail("waitForTransaction"); + }); + } + getLogs(filter) { + return __awaiter16(this, void 0, void 0, function* () { + if (!this.dataProvider) + return this._fail("getLogs"); + return this.dataProvider.getLogs(filter, this._resolveBlockNumber); + }); + } + _fail(operation) { + return Promise.resolve().then(() => { + logger42.throwError(`Unsupport ${operation}`); + }); + } + emit(eventName, ...args) { + return logger42.throwError("Unsupport Event"); + } + listenerCount(eventName) { + return logger42.throwError("Unsupport Event"); + } + listeners(eventName) { + return logger42.throwError("Unsupport Event"); + } + off(eventName, listener) { + return logger42.throwError("Unsupport Event"); + } + on(eventName, listener) { + return logger42.throwError("Unsupport Event"); + } + once(eventName, listener) { + return logger42.throwError("Unsupport Event"); + } + removeAllListeners(eventName) { + return logger42.throwError("Unsupport Event"); + } + addListener(eventName, listener) { + return this.on(eventName, listener); + } + removeListener(eventName, listener) { + return this.off(eventName, listener); + } + _resolveTransactionReceipt(transactionHash, blockHash, from2) { + return __awaiter16(this, void 0, void 0, function* () { + const detail = yield this.scanner.getBlockDetail({ + blockHash + }); + const blockNumber = detail.number; + const extrinsic = detail.extrinsics.find(({ hash: hash8 }) => hash8 === transactionHash); + if (!extrinsic) { + return logger42.throwError(`Transaction hash not found`); + } + const transactionIndex = extrinsic.index; + const events = detail.events.filter(({ phaseIndex }) => phaseIndex === transactionIndex); + const findCreated = events.find((x) => x.section.toUpperCase() === "EVM" && x.method.toUpperCase() === "CREATED"); + const findExecuted = events.find((x) => x.section.toUpperCase() === "EVM" && x.method.toUpperCase() === "EXECUTED"); + const result = events.find((x) => x.section.toUpperCase() === "SYSTEM" && x.method.toUpperCase() === "EXTRINSICSUCCESS"); + if (!result) { + return logger42.throwError(`Can't find event`); + } + const status = findCreated || findExecuted ? 1 : 0; + const contractAddress = findCreated ? findCreated.args[0] : null; + const to2 = findExecuted ? findExecuted.args[0] : null; + const logs = events.filter((e) => { + return e.method.toUpperCase() === "LOG" && e.section.toUpperCase() === "EVM"; + }).map((log, index) => { + return { + transactionHash, + blockNumber, + blockHash, + transactionIndex, + removed: false, + address: log.args[0].address, + data: log.args[0].data, + topics: log.args[0].topics, + logIndex: index + }; + }); + const gasUsed = bignumber_1.BigNumber.from(result.args[0].weight); + return { + to: to2, + from: from2, + contractAddress, + transactionIndex, + gasUsed, + logsBloom: "0x", + blockHash, + transactionHash, + logs, + blockNumber, + confirmations: 4, + cumulativeGasUsed: gasUsed, + byzantium: false, + status, + effectiveGasPrice: bignumber_1.BigNumber.from("1"), + type: 0 + }; + }); + } + _resolveBlockHash(blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + if (!blockTag) + return void 0; + const resolvedBlockHash = yield blockTag; + if (resolvedBlockHash === "pending") { + throw new Error("Unsupport Block Pending"); + } + if (resolvedBlockHash === "latest") { + const hash9 = yield this.api.query.system.blockHash(); + return hash9.toString(); + } + if (resolvedBlockHash === "earliest") { + const hash9 = this.api.query.system.blockHash(0); + return hash9.toString(); + } + if ((0, util_1.isHex)(resolvedBlockHash)) { + return resolvedBlockHash; + } + const hash8 = yield this.api.query.system.blockHash(resolvedBlockHash); + return hash8.toString(); + }); + } + _resolveBlockNumber(blockTag) { + return __awaiter16(this, void 0, void 0, function* () { + yield this.resolveApi; + if (!blockTag) { + return logger42.throwError(`Blocktag cannot be undefined`); + } + const resolvedBlockNumber = yield blockTag; + if (resolvedBlockNumber === "pending") { + throw new Error("Unsupport Block Pending"); + } + if (resolvedBlockNumber === "latest") { + const header = yield this.api.rpc.chain.getHeader(); + return header.number.toNumber(); + } + if (resolvedBlockNumber === "earliest") { + return 0; + } + if ((0, util_1.isNumber)(resolvedBlockNumber)) { + return resolvedBlockNumber; + } else { + throw new Error("Expect blockHash to be a number or tag"); + } + }); + } + _toAddress(addressOrName) { + return __awaiter16(this, void 0, void 0, function* () { + const resolved = yield addressOrName; + const address = (0, util_crypto_1.encodeAddress)((0, util_1.u8aFixLength)((0, util_1.u8aConcat)("evm:", (0, util_1.hexToU8a)(resolved)), 256, true)); + return address.toString(); + }); + } + _resolveTransaction(tx2) { + return __awaiter16(this, void 0, void 0, function* () { + for (const key2 of ["gasLimit", "value"]) { + const typeKey = key2; + if (tx2[typeKey]) { + if (bignumber_1.BigNumber.isBigNumber(tx2[typeKey])) { + tx2[typeKey] = tx2[typeKey].toHexString(); + } else if ((0, util_1.isNumber)(tx2[typeKey])) { + tx2[typeKey] = (0, util_1.numberToHex)(tx2[typeKey]); + } + } + } + delete tx2.nonce; + delete tx2.gasPrice; + delete tx2.chainId; + return tx2; + }); + } + _resolveStorageLimit(tx2) { + return __awaiter16(this, void 0, void 0, function* () { + if (tx2.customData) { + if ("storageLimit" in tx2.customData) { + const storageLimit = tx2.customData.storageLimit; + if (bignumber_1.BigNumber.isBigNumber(storageLimit)) { + return storageLimit; + } else if ((0, util_1.isNumber)(storageLimit)) { + return bignumber_1.BigNumber.from(storageLimit); + } + } + } + return bignumber_1.BigNumber.from(6e4); + }); + } + }; + exports2.Provider = Provider3; + } + }); + + // ../../node_modules/@reef-chain/evm-provider/SigningKey.js + var require_SigningKey = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/SigningKey.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } + }); + + // ../../node_modules/@reef-chain/evm-provider/TestAccountSigningKey.js + var require_TestAccountSigningKey = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/TestAccountSigningKey.js"(exports2) { + "use strict"; + var __awaiter16 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f10) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f10) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f10 : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f10.call(receiver, value) : f10 ? f10.value = value : state.set(receiver, value), value; + }; + var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f10) { + if (kind === "a" && !f10) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f10 : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f10 : kind === "a" ? f10.call(receiver) : f10 ? f10.value : state.get(receiver); + }; + var _TestAccountSigningKey_keyringPairs; + var _TestAccountSigningKey_registry; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TestAccountSigningKey = void 0; + var id4 = 0; + var TestAccountSigningKey = class { + constructor(registry) { + _TestAccountSigningKey_keyringPairs.set(this, void 0); + _TestAccountSigningKey_registry.set(this, void 0); + __classPrivateFieldSet(this, _TestAccountSigningKey_keyringPairs, [], "f"); + __classPrivateFieldSet(this, _TestAccountSigningKey_registry, registry, "f"); + } + signPayload(payload) { + return __awaiter16(this, void 0, void 0, function* () { + const findKeyringPair = __classPrivateFieldGet(this, _TestAccountSigningKey_keyringPairs, "f").find((pair) => pair.address === payload.address); + if (!findKeyringPair) { + throw new Error(`Can't find the keyringpair for ${payload.address}`); + } + return new Promise((resolve) => { + const signed2 = __classPrivateFieldGet(this, _TestAccountSigningKey_registry, "f").createType("ExtrinsicPayload", payload, { version: payload.version }).sign(findKeyringPair); + resolve(Object.assign({ id: ++id4 }, signed2)); + }); + }); + } + addKeyringPair(...keyringPairs) { + __classPrivateFieldSet(this, _TestAccountSigningKey_keyringPairs, __classPrivateFieldGet(this, _TestAccountSigningKey_keyringPairs, "f").concat(...keyringPairs), "f"); + } + }; + exports2.TestAccountSigningKey = TestAccountSigningKey; + _TestAccountSigningKey_keyringPairs = /* @__PURE__ */ new WeakMap(), _TestAccountSigningKey_registry = /* @__PURE__ */ new WeakMap(); + } + }); + + // ../../node_modules/@reef-chain/evm-provider/index.js + var require_evm_provider = __commonJS({ + "../../node_modules/@reef-chain/evm-provider/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k22) { + if (k22 === void 0) + k22 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k22, desc); + } : function(o, m, k, k22) { + if (k22 === void 0) + k22 = k; + o[k22] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MAX_STORAGE_LIMIT = exports2.MAX_GAS_LIMIT = void 0; + __exportStar(require_Signer(), exports2); + __exportStar(require_Provider(), exports2); + __exportStar(require_SigningKey(), exports2); + __exportStar(require_TestAccountSigningKey(), exports2); + var utils_12 = require_utils3(); + Object.defineProperty(exports2, "MAX_GAS_LIMIT", { enumerable: true, get: function() { + return utils_12.U64MAX; + } }); + var utils_2 = require_utils3(); + Object.defineProperty(exports2, "MAX_STORAGE_LIMIT", { enumerable: true, get: function() { + return utils_2.U32MAX; + } }); + } + }); + // ../../node_modules/micro-base/index.js var require_micro_base = __commonJS({ "../../node_modules/micro-base/index.js"(exports2) { @@ -33669,7 +91618,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/blakejs/util.js - var require_util2 = __commonJS({ + var require_util20 = __commonJS({ "../../node_modules/blakejs/util.js"(exports2, module2) { var ERROR_MSG_INPUT = "Input must be an string, Buffer or Uint8Array"; function normalizeInput(input) { @@ -33744,7 +91693,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/blakejs/blake2b.js var require_blake2b2 = __commonJS({ "../../node_modules/blakejs/blake2b.js"(exports2, module2) { - var util = require_util2(); + var util = require_util20(); function ADD64AA(v5, a, b) { const o02 = v5[a] + v5[b]; let o12 = v5[a + 1] + v5[b + 1]; @@ -34202,7 +92151,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/blakejs/blake2s.js var require_blake2s = __commonJS({ "../../node_modules/blakejs/blake2s.js"(exports2, module2) { - var util = require_util2(); + var util = require_util20(); function B2S_GET32(v5, i) { return v5[i] ^ v5[i + 1] << 8 ^ v5[i + 2] << 16 ^ v5[i + 3] << 24; } @@ -34569,7 +92518,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/minimalistic-crypto-utils/lib/utils.js - var require_utils5 = __commonJS({ + var require_utils6 = __commonJS({ "../../node_modules/minimalistic-crypto-utils/lib/utils.js"(exports2) { "use strict"; var utils2 = exports2; @@ -34628,13 +92577,13 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/elliptic/lib/elliptic/utils.js - var require_utils6 = __commonJS({ + var require_utils7 = __commonJS({ "../../node_modules/elliptic/lib/elliptic/utils.js"(exports2) { "use strict"; var utils2 = exports2; var BN7 = require_bn6(); var minAssert = require_minimalistic_assert(); - var minUtils = require_utils5(); + var minUtils = require_utils6(); utils2.assert = minAssert; utils2.toArray = minUtils.toArray; utils2.zero2 = minUtils.zero2; @@ -34797,11 +92746,11 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/elliptic/lib/elliptic/curve/base.js - var require_base = __commonJS({ + var require_base4 = __commonJS({ "../../node_modules/elliptic/lib/elliptic/curve/base.js"(exports2, module2) { "use strict"; var BN7 = require_bn6(); - var utils2 = require_utils6(); + var utils2 = require_utils7(); var getNAF2 = utils2.getNAF; var getJSF2 = utils2.getJSF; var assert6 = utils2.assert; @@ -35033,7 +92982,7 @@ ${formatDisplay(all, fmt)}`); BasePoint2.prototype.encodeCompressed = function encodeCompressed2(enc) { return this.encode(enc, true); }; - BasePoint2.prototype._encode = function _encode3(compact) { + BasePoint2.prototype._encode = function _encode2(compact) { var len = this.curve.p.byteLength(); var x = this.getX().toArray("be", len); if (compact) @@ -35109,10 +93058,10 @@ ${formatDisplay(all, fmt)}`); var require_short = __commonJS({ "../../node_modules/elliptic/lib/elliptic/curve/short.js"(exports2, module2) { "use strict"; - var utils2 = require_utils6(); + var utils2 = require_utils7(); var BN7 = require_bn6(); var inherits = require_inherits_browser(); - var Base2 = require_base(); + var Base2 = require_base4(); var assert6 = utils2.assert; function ShortCurve2(conf) { Base2.call(this, "short", conf); @@ -35809,8 +93758,8 @@ ${formatDisplay(all, fmt)}`); "use strict"; var BN7 = require_bn6(); var inherits = require_inherits_browser(); - var Base2 = require_base(); - var utils2 = require_utils6(); + var Base2 = require_base4(); + var utils2 = require_utils7(); function MontCurve(conf) { Base2.call(this, "mont", conf); this.a = new BN7(conf.a, 16).toRed(this.red); @@ -35854,7 +93803,7 @@ ${formatDisplay(all, fmt)}`); }; Point4.prototype.precompute = function precompute2() { }; - Point4.prototype._encode = function _encode3() { + Point4.prototype._encode = function _encode2() { return this.getX().toArray("be", this.curve.p.byteLength()); }; Point4.fromJSON = function fromJSON2(curve, obj) { @@ -35935,10 +93884,10 @@ ${formatDisplay(all, fmt)}`); var require_edwards2 = __commonJS({ "../../node_modules/elliptic/lib/elliptic/curve/edwards.js"(exports2, module2) { "use strict"; - var utils2 = require_utils6(); + var utils2 = require_utils7(); var BN7 = require_bn6(); var inherits = require_inherits_browser(); - var Base2 = require_base(); + var Base2 = require_base4(); var assert6 = utils2.assert; function EdwardsCurve(conf) { this.twisted = (conf.a | 0) !== 1; @@ -36237,7 +94186,7 @@ ${formatDisplay(all, fmt)}`); "../../node_modules/elliptic/lib/elliptic/curve/index.js"(exports2) { "use strict"; var curve = exports2; - curve.base = require_base(); + curve.base = require_base4(); curve.short = require_short(); curve.mont = require_mont(); curve.edwards = require_edwards2(); @@ -37037,7 +94986,7 @@ ${formatDisplay(all, fmt)}`); var curves = exports2; var hash8 = require_hash(); var curve = require_curve2(); - var utils2 = require_utils6(); + var utils2 = require_utils7(); var assert6 = utils2.assert; function PresetCurve(options) { if (options.type === "short") @@ -37208,7 +95157,7 @@ ${formatDisplay(all, fmt)}`); "../../node_modules/hmac-drbg/lib/hmac-drbg.js"(exports2, module2) { "use strict"; var hash8 = require_hash(); - var utils2 = require_utils5(); + var utils2 = require_utils6(); var assert6 = require_minimalistic_assert(); function HmacDRBG2(options) { if (!(this instanceof HmacDRBG2)) @@ -37302,7 +95251,7 @@ ${formatDisplay(all, fmt)}`); "../../node_modules/elliptic/lib/elliptic/ec/key.js"(exports2, module2) { "use strict"; var BN7 = require_bn6(); - var utils2 = require_utils6(); + var utils2 = require_utils7(); var assert6 = utils2.assert; function KeyPair2(ec3, options) { this.ec = ec3; @@ -37396,7 +95345,7 @@ ${formatDisplay(all, fmt)}`); "../../node_modules/elliptic/lib/elliptic/ec/signature.js"(exports2, module2) { "use strict"; var BN7 = require_bn6(); - var utils2 = require_utils6(); + var utils2 = require_utils7(); var assert6 = utils2.assert; function Signature3(options, enc) { if (options instanceof Signature3) @@ -37543,7 +95492,7 @@ ${formatDisplay(all, fmt)}`); "use strict"; var BN7 = require_bn6(); var HmacDRBG2 = require_hmac_drbg(); - var utils2 = require_utils6(); + var utils2 = require_utils7(); var curves = require_curves(); var rand2 = require_brorand(); var assert6 = utils2.assert; @@ -37721,7 +95670,7 @@ ${formatDisplay(all, fmt)}`); var require_key3 = __commonJS({ "../../node_modules/elliptic/lib/elliptic/eddsa/key.js"(exports2, module2) { "use strict"; - var utils2 = require_utils6(); + var utils2 = require_utils7(); var assert6 = utils2.assert; var parseBytes = utils2.parseBytes; var cachedProperty = utils2.cachedProperty; @@ -37796,7 +95745,7 @@ ${formatDisplay(all, fmt)}`); "../../node_modules/elliptic/lib/elliptic/eddsa/signature.js"(exports2, module2) { "use strict"; var BN7 = require_bn6(); - var utils2 = require_utils6(); + var utils2 = require_utils7(); var assert6 = utils2.assert; var cachedProperty = utils2.cachedProperty; var parseBytes = utils2.parseBytes; @@ -37846,7 +95795,7 @@ ${formatDisplay(all, fmt)}`); "use strict"; var hash8 = require_hash(); var curves = require_curves(); - var utils2 = require_utils6(); + var utils2 = require_utils7(); var assert6 = utils2.assert; var parseBytes = utils2.parseBytes; var KeyPair2 = require_key3(); @@ -37934,7 +95883,7 @@ ${formatDisplay(all, fmt)}`); "use strict"; var elliptic2 = exports2; elliptic2.version = require_package().version; - elliptic2.utils = require_utils6(); + elliptic2.utils = require_utils7(); elliptic2.rand = require_brorand(); elliptic2.curve = require_curve2(); elliptic2.curves = require_curves(); @@ -40653,7 +98602,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/buffer/index.js - var require_buffer4 = __commonJS({ + var require_buffer5 = __commonJS({ "../../node_modules/buffer/index.js"(exports2) { "use strict"; var base646 = require_base64_js(); @@ -40919,7 +98868,7 @@ ${formatDisplay(all, fmt)}`); return false; } }; - Buffer2.concat = function concat13(list, length) { + Buffer2.concat = function concat12(list, length) { if (!Array.isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers'); } @@ -42349,7 +100298,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/safe-buffer/index.js var require_safe_buffer = __commonJS({ "../../node_modules/safe-buffer/index.js"(exports2, module2) { - var buffer = require_buffer4(); + var buffer = require_buffer5(); var Buffer2 = buffer.Buffer; function copyProps(src, dst) { for (var key2 in src) { @@ -42405,7 +100354,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/randombytes/browser.js - var require_browser5 = __commonJS({ + var require_browser7 = __commonJS({ "../../node_modules/randombytes/browser.js"(exports2, module2) { "use strict"; var MAX_BYTES = 65536; @@ -42444,7 +100393,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/events/events.js - var require_events = __commonJS({ + var require_events5 = __commonJS({ "../../node_modules/events/events.js"(exports2, module2) { "use strict"; var R = typeof Reflect === "object" ? Reflect : null; @@ -42818,12 +100767,12 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/readable-stream/lib/internal/streams/stream-browser.js var require_stream_browser = __commonJS({ "../../node_modules/readable-stream/lib/internal/streams/stream-browser.js"(exports2, module2) { - module2.exports = require_events().EventEmitter; + module2.exports = require_events5().EventEmitter; } }); // (disabled):../../node_modules/util/util.js - var require_util3 = __commonJS({ + var require_util21 = __commonJS({ "(disabled):../../node_modules/util/util.js"() { } }); @@ -42901,9 +100850,9 @@ ${formatDisplay(all, fmt)}`); } return (hint === "string" ? String : Number)(input); } - var _require = require_buffer4(); + var _require = require_buffer5(); var Buffer2 = _require.Buffer; - var _require2 = require_util3(); + var _require2 = require_util21(); var inspect4 = _require2.inspect; var custom = inspect4 && inspect4.custom || "inspect"; function copyBuffer(src, target, offset) { @@ -42974,7 +100923,7 @@ ${formatDisplay(all, fmt)}`); } }, { key: "concat", - value: function concat13(n) { + value: function concat12(n) { if (this.length === 0) return Buffer2.alloc(0); var ret = Buffer2.allocUnsafe(n >>> 0); @@ -43312,7 +101261,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/util-deprecate/browser.js - var require_browser6 = __commonJS({ + var require_browser8 = __commonJS({ "../../node_modules/util-deprecate/browser.js"(exports2, module2) { module2.exports = deprecate; function deprecate(fn2, msg) { @@ -43366,10 +101315,10 @@ ${formatDisplay(all, fmt)}`); var Duplex; Writable.WritableState = WritableState; var internalUtil = { - deprecate: require_browser6() + deprecate: require_browser8() }; var Stream = require_stream_browser(); - var Buffer2 = require_buffer4().Buffer; + var Buffer2 = require_buffer5().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { @@ -44487,12 +102436,12 @@ ${formatDisplay(all, fmt)}`); module2.exports = Readable; var Duplex; Readable.ReadableState = ReadableState; - var EE2 = require_events().EventEmitter; + var EE2 = require_events5().EventEmitter; var EElistenerCount = function EElistenerCount2(emitter, type) { return emitter.listeners(type).length; }; var Stream = require_stream_browser(); - var Buffer2 = require_buffer4().Buffer; + var Buffer2 = require_buffer5().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { @@ -44501,7 +102450,7 @@ ${formatDisplay(all, fmt)}`); function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } - var debugUtil = require_util3(); + var debugUtil = require_util21(); var debug; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog("stream"); @@ -45807,7 +103756,7 @@ ${formatDisplay(all, fmt)}`); var require_ripemd160 = __commonJS({ "../../node_modules/ripemd160/index.js"(exports2, module2) { "use strict"; - var Buffer2 = require_buffer4().Buffer; + var Buffer2 = require_buffer5().Buffer; var inherits = require_inherits_browser(); var HashBase = require_hash_base2(); var ARRAY16 = new Array(16); @@ -47318,7 +105267,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/create-hash/browser.js - var require_browser7 = __commonJS({ + var require_browser9 = __commonJS({ "../../node_modules/create-hash/browser.js"(exports2, module2) { "use strict"; var inherits = require_inherits_browser(); @@ -47400,7 +105349,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/create-hmac/browser.js - var require_browser8 = __commonJS({ + var require_browser10 = __commonJS({ "../../node_modules/create-hmac/browser.js"(exports2, module2) { "use strict"; var inherits = require_inherits_browser(); @@ -47773,7 +105722,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/pbkdf2/lib/async.js - var require_async = __commonJS({ + var require_async2 = __commonJS({ "../../node_modules/pbkdf2/lib/async.js"(exports2, module2) { var Buffer2 = require_safe_buffer().Buffer; var checkParameters = require_precondition(); @@ -47894,15 +105843,15 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/pbkdf2/browser.js - var require_browser9 = __commonJS({ + var require_browser11 = __commonJS({ "../../node_modules/pbkdf2/browser.js"(exports2) { - exports2.pbkdf2 = require_async(); + exports2.pbkdf2 = require_async2(); exports2.pbkdf2Sync = require_sync_browser(); } }); // ../../node_modules/des.js/lib/des/utils.js - var require_utils7 = __commonJS({ + var require_utils8 = __commonJS({ "../../node_modules/des.js/lib/des/utils.js"(exports2) { "use strict"; exports2.readUInt32BE = function readUInt32BE(bytes5, off) { @@ -48779,7 +106728,7 @@ ${formatDisplay(all, fmt)}`); "use strict"; var assert6 = require_minimalistic_assert(); var inherits = require_inherits_browser(); - var utils2 = require_utils7(); + var utils2 = require_utils8(); var Cipher = require_cipher(); function DESState() { this.tmp = new Array(2); @@ -49007,7 +106956,7 @@ ${formatDisplay(all, fmt)}`); var require_des2 = __commonJS({ "../../node_modules/des.js/lib/des.js"(exports2) { "use strict"; - exports2.utils = require_utils7(); + exports2.utils = require_utils8(); exports2.Cipher = require_cipher(); exports2.DES = require_des(); exports2.CBC = require_cbc(); @@ -50160,7 +108109,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/browserify-aes/browser.js - var require_browser10 = __commonJS({ + var require_browser12 = __commonJS({ "../../node_modules/browserify-aes/browser.js"(exports2) { var ciphers = require_encrypter(); var deciphers = require_decrypter(); @@ -50207,10 +108156,10 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/browserify-cipher/browser.js - var require_browser11 = __commonJS({ + var require_browser13 = __commonJS({ "../../node_modules/browserify-cipher/browser.js"(exports2) { var DES = require_browserify_des(); - var aes3 = require_browser10(); + var aes3 = require_browser12(); var aesModes = require_modes(); var desModes = require_modes2(); var ebtk = require_evp_bytestokey(); @@ -50365,7 +108314,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/diffie-hellman/lib/generatePrime.js var require_generatePrime = __commonJS({ "../../node_modules/diffie-hellman/lib/generatePrime.js"(exports2, module2) { - var randomBytes3 = require_browser5(); + var randomBytes3 = require_browser7(); module2.exports = findPrime; findPrime.simpleSieve = simpleSieve; findPrime.fermatTest = fermatTest; @@ -50510,7 +108459,7 @@ ${formatDisplay(all, fmt)}`); var THREE = new BN7(3); var SEVEN = new BN7(7); var primes = require_generatePrime(); - var randomBytes3 = require_browser5(); + var randomBytes3 = require_browser7(); module2.exports = DH2; function setPublicKey(pub, enc) { enc = enc || "utf8"; @@ -50645,7 +108594,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/diffie-hellman/browser.js - var require_browser12 = __commonJS({ + var require_browser14 = __commonJS({ "../../node_modules/diffie-hellman/browser.js"(exports2) { var generatePrime = require_generatePrime(); var primes = require_primes(); @@ -50741,14 +108690,14 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/browserify-sign/node_modules/readable-stream/lib/internal/streams/stream-browser.js var require_stream_browser2 = __commonJS({ "../../node_modules/browserify-sign/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(exports2, module2) { - module2.exports = require_events().EventEmitter; + module2.exports = require_events5().EventEmitter; } }); // ../../node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer/index.js var require_safe_buffer2 = __commonJS({ "../../node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer/index.js"(exports2, module2) { - var buffer = require_buffer4(); + var buffer = require_buffer5(); var Buffer2 = buffer.Buffer; function copyProps(src, dst) { for (var key2 in src) { @@ -50803,7 +108752,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/core-util-is/lib/util.js - var require_util4 = __commonJS({ + var require_util22 = __commonJS({ "../../node_modules/core-util-is/lib/util.js"(exports2) { function isArray4(arg) { if (Array.isArray) { @@ -50864,7 +108813,7 @@ ${formatDisplay(all, fmt)}`); return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg === "undefined"; } exports2.isPrimitive = isPrimitive; - exports2.isBuffer = require_buffer4().Buffer.isBuffer; + exports2.isBuffer = require_buffer5().Buffer.isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); } @@ -50881,7 +108830,7 @@ ${formatDisplay(all, fmt)}`); } } var Buffer2 = require_safe_buffer2().Buffer; - var util = require_util3(); + var util = require_util21(); function copyBuffer(src, target, offset) { src.copy(target, offset); } @@ -50933,7 +108882,7 @@ ${formatDisplay(all, fmt)}`); } return ret; }; - BufferList.prototype.concat = function concat13(n) { + BufferList.prototype.concat = function concat12(n) { if (this.length === 0) return Buffer2.alloc(0); var ret = Buffer2.allocUnsafe(n >>> 0); @@ -51043,10 +108992,10 @@ ${formatDisplay(all, fmt)}`); var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; - var util = Object.create(require_util4()); + var util = Object.create(require_util22()); util.inherits = require_inherits_browser(); var internalUtil = { - deprecate: require_browser6() + deprecate: require_browser8() }; var Stream = require_stream_browser2(); var Buffer2 = require_safe_buffer2().Buffer; @@ -51504,7 +109453,7 @@ ${formatDisplay(all, fmt)}`); return keys2; }; module2.exports = Duplex; - var util = Object.create(require_util4()); + var util = Object.create(require_util22()); util.inherits = require_inherits_browser(); var Readable = require_stream_readable2(); var Writable = require_stream_writable2(); @@ -51574,7 +109523,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer/index.js var require_safe_buffer3 = __commonJS({ "../../node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports2, module2) { - var buffer = require_buffer4(); + var buffer = require_buffer5(); var Buffer2 = buffer.Buffer; function copyProps(src, dst) { for (var key2 in src) { @@ -51897,7 +109846,7 @@ ${formatDisplay(all, fmt)}`); var isArray4 = require_isarray(); var Duplex; Readable.ReadableState = ReadableState; - var EE2 = require_events().EventEmitter; + var EE2 = require_events5().EventEmitter; var EElistenerCount = function(emitter, type) { return emitter.listeners(type).length; }; @@ -51911,9 +109860,9 @@ ${formatDisplay(all, fmt)}`); function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } - var util = Object.create(require_util4()); + var util = Object.create(require_util22()); util.inherits = require_inherits_browser(); - var debugUtil = require_util3(); + var debugUtil = require_util21(); var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog("stream"); @@ -52649,7 +110598,7 @@ ${formatDisplay(all, fmt)}`); "use strict"; module2.exports = Transform; var Duplex = require_stream_duplex2(); - var util = Object.create(require_util4()); + var util = Object.create(require_util22()); util.inherits = require_inherits_browser(); util.inherits(Transform, Duplex); function afterTransform(er2, data) { @@ -52756,7 +110705,7 @@ ${formatDisplay(all, fmt)}`); "use strict"; module2.exports = PassThrough; var Transform = require_stream_transform2(); - var util = Object.create(require_util4()); + var util = Object.create(require_util22()); util.inherits = require_inherits_browser(); util.inherits(PassThrough, Transform); function PassThrough(options) { @@ -55723,7 +113672,7 @@ ${formatDisplay(all, fmt)}`); var require_browserify_rsa = __commonJS({ "../../node_modules/browserify-rsa/index.js"(exports2, module2) { var BN7 = require_bn9(); - var randomBytes3 = require_browser5(); + var randomBytes3 = require_browser7(); function blind(priv) { var r10 = getr(priv); var blinder = r10.toRed(BN7.mont(priv.modulus)).redPow(new BN7(priv.publicExponent)).fromRed(); @@ -58846,11 +116795,11 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/asn1.js/lib/asn1/base/buffer.js - var require_buffer5 = __commonJS({ + var require_buffer6 = __commonJS({ "../../node_modules/asn1.js/lib/asn1/base/buffer.js"(exports2) { var inherits = require_inherits_browser(); - var Reporter = require_base2().Reporter; - var Buffer2 = require_buffer4().Buffer; + var Reporter = require_base5().Reporter; + var Buffer2 = require_buffer5().Buffer; function DecoderBuffer(base2, options) { Reporter.call(this, options); if (!Buffer2.isBuffer(base2)) { @@ -58948,11 +116897,11 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/asn1.js/lib/asn1/base/node.js - var require_node = __commonJS({ + var require_node2 = __commonJS({ "../../node_modules/asn1.js/lib/asn1/base/node.js"(exports2, module2) { - var Reporter = require_base2().Reporter; - var EncoderBuffer = require_base2().EncoderBuffer; - var DecoderBuffer = require_base2().DecoderBuffer; + var Reporter = require_base5().Reporter; + var EncoderBuffer = require_base5().EncoderBuffer; + var DecoderBuffer = require_base5().DecoderBuffer; var assert6 = require_minimalistic_assert(); var tags = [ "seq", @@ -59481,20 +117430,20 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/asn1.js/lib/asn1/base/index.js - var require_base2 = __commonJS({ + var require_base5 = __commonJS({ "../../node_modules/asn1.js/lib/asn1/base/index.js"(exports2) { var base2 = exports2; base2.Reporter = require_reporter().Reporter; - base2.DecoderBuffer = require_buffer5().DecoderBuffer; - base2.EncoderBuffer = require_buffer5().EncoderBuffer; - base2.Node = require_node(); + base2.DecoderBuffer = require_buffer6().DecoderBuffer; + base2.EncoderBuffer = require_buffer6().EncoderBuffer; + base2.Node = require_node2(); } }); // ../../node_modules/asn1.js/lib/asn1/constants/der.js var require_der = __commonJS({ "../../node_modules/asn1.js/lib/asn1/constants/der.js"(exports2) { - var constants2 = require_constants2(); + var constants2 = require_constants5(); exports2.tagClass = { 0: "universal", 1: "application", @@ -59538,7 +117487,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/asn1.js/lib/asn1/constants/index.js - var require_constants2 = __commonJS({ + var require_constants5 = __commonJS({ "../../node_modules/asn1.js/lib/asn1/constants/index.js"(exports2) { var constants2 = exports2; constants2._reverse = function reverse(map2) { @@ -59822,7 +117771,7 @@ ${formatDisplay(all, fmt)}`); var require_pem = __commonJS({ "../../node_modules/asn1.js/lib/asn1/decoders/pem.js"(exports2, module2) { var inherits = require_inherits_browser(); - var Buffer2 = require_buffer4().Buffer; + var Buffer2 = require_buffer5().Buffer; var DERDecoder = require_der2(); function PEMDecoder(entity) { DERDecoder.call(this, entity); @@ -59876,7 +117825,7 @@ ${formatDisplay(all, fmt)}`); var require_der3 = __commonJS({ "../../node_modules/asn1.js/lib/asn1/encoders/der.js"(exports2, module2) { var inherits = require_inherits_browser(); - var Buffer2 = require_buffer4().Buffer; + var Buffer2 = require_buffer5().Buffer; var asn1 = require_asn1(); var base2 = asn1.base; var der = asn1.constants.der; @@ -60141,8 +118090,8 @@ ${formatDisplay(all, fmt)}`); var asn1 = exports2; asn1.bignum = require_bn6(); asn1.define = require_api().define; - asn1.base = require_base2(); - asn1.constants = require_constants2(); + asn1.base = require_base5(); + asn1.constants = require_constants5(); asn1.decoders = require_decoders(); asn1.encoders = require_encoders(); } @@ -60368,7 +118317,7 @@ ${formatDisplay(all, fmt)}`); var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m; var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m; var evp = require_evp_bytestokey(); - var ciphers = require_browser10(); + var ciphers = require_browser12(); var Buffer2 = require_safe_buffer().Buffer; module2.exports = function(okey, password) { var key2 = okey.toString(); @@ -60404,8 +118353,8 @@ ${formatDisplay(all, fmt)}`); var asn1 = require_asn12(); var aesid = require_aesid(); var fixProc = require_fixProc(); - var ciphers = require_browser10(); - var compat = require_browser9(); + var ciphers = require_browser12(); + var compat = require_browser11(); var Buffer2 = require_safe_buffer().Buffer; function decrypt3(data, password) { var salt = data.algorithm.decrypt.kde.kdeparams.salt; @@ -60526,7 +118475,7 @@ ${formatDisplay(all, fmt)}`); "../../node_modules/browserify-sign/browser/sign.js"(exports2, module2) { "use strict"; var Buffer2 = require_safe_buffer().Buffer; - var createHmac = require_browser8(); + var createHmac = require_browser10(); var crt = require_browserify_rsa(); var EC3 = require_elliptic().ec; var BN7 = require_bn10(); @@ -60766,11 +118715,11 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/browserify-sign/browser/index.js - var require_browser13 = __commonJS({ + var require_browser15 = __commonJS({ "../../node_modules/browserify-sign/browser/index.js"(exports2, module2) { "use strict"; var Buffer2 = require_safe_buffer().Buffer; - var createHash = require_browser7(); + var createHash = require_browser9(); var stream = require_readable_browser2(); var inherits = require_inherits_browser(); var sign4 = require_sign4(); @@ -60847,7 +118796,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/create-ecdh/browser.js - var require_browser14 = __commonJS({ + var require_browser16 = __commonJS({ "../../node_modules/create-ecdh/browser.js"(exports2, module2) { var elliptic2 = require_elliptic(); var BN7 = require_bn6(); @@ -60967,7 +118916,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/public-encrypt/mgf.js var require_mgf = __commonJS({ "../../node_modules/public-encrypt/mgf.js"(exports2, module2) { - var createHash = require_browser7(); + var createHash = require_browser9(); var Buffer2 = require_safe_buffer().Buffer; module2.exports = function(seed, len) { var t = Buffer2.alloc(0); @@ -61017,8 +118966,8 @@ ${formatDisplay(all, fmt)}`); var require_publicEncrypt = __commonJS({ "../../node_modules/public-encrypt/publicEncrypt.js"(exports2, module2) { var parseKeys = require_parse_asn1(); - var randomBytes3 = require_browser5(); - var createHash = require_browser7(); + var randomBytes3 = require_browser7(); + var createHash = require_browser9(); var mgf = require_mgf(); var xor = require_xor(); var BN7 = require_bn6(); @@ -61113,7 +119062,7 @@ ${formatDisplay(all, fmt)}`); var xor = require_xor(); var BN7 = require_bn6(); var crt = require_browserify_rsa(); - var createHash = require_browser7(); + var createHash = require_browser9(); var withPublic = require_withPublic(); var Buffer2 = require_safe_buffer().Buffer; module2.exports = function privateDecrypt(privateKey, enc, reverse) { @@ -61212,7 +119161,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/public-encrypt/browser.js - var require_browser15 = __commonJS({ + var require_browser17 = __commonJS({ "../../node_modules/public-encrypt/browser.js"(exports2) { exports2.publicEncrypt = require_publicEncrypt(); exports2.privateDecrypt = require_privateDecrypt(); @@ -61226,14 +119175,14 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/randomfill/browser.js - var require_browser16 = __commonJS({ + var require_browser18 = __commonJS({ "../../node_modules/randomfill/browser.js"(exports2) { "use strict"; function oldBrowser() { throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11"); } var safeBuffer = require_safe_buffer(); - var randombytes = require_browser5(); + var randombytes = require_browser7(); var Buffer2 = safeBuffer.Buffer; var kBufferMaxLength = safeBuffer.kMaxLength; var crypto8 = global.crypto || global.msCrypto; @@ -61332,19 +119281,19 @@ ${formatDisplay(all, fmt)}`); var require_crypto_browserify2 = __commonJS({ "../../node_modules/crypto-browserify/index.js"(exports2) { "use strict"; - exports2.randomBytes = exports2.rng = exports2.pseudoRandomBytes = exports2.prng = require_browser5(); - exports2.createHash = exports2.Hash = require_browser7(); - exports2.createHmac = exports2.Hmac = require_browser8(); + exports2.randomBytes = exports2.rng = exports2.pseudoRandomBytes = exports2.prng = require_browser7(); + exports2.createHash = exports2.Hash = require_browser9(); + exports2.createHmac = exports2.Hmac = require_browser10(); var algos = require_algos(); var algoKeys = Object.keys(algos); var hashes = ["sha1", "sha224", "sha256", "sha384", "sha512", "md5", "rmd160"].concat(algoKeys); exports2.getHashes = function() { return hashes; }; - var p = require_browser9(); + var p = require_browser11(); exports2.pbkdf2 = p.pbkdf2; exports2.pbkdf2Sync = p.pbkdf2Sync; - var aes3 = require_browser11(); + var aes3 = require_browser13(); exports2.Cipher = aes3.Cipher; exports2.createCipher = aes3.createCipher; exports2.Cipheriv = aes3.Cipheriv; @@ -61355,24 +119304,24 @@ ${formatDisplay(all, fmt)}`); exports2.createDecipheriv = aes3.createDecipheriv; exports2.getCiphers = aes3.getCiphers; exports2.listCiphers = aes3.listCiphers; - var dh2 = require_browser12(); + var dh2 = require_browser14(); exports2.DiffieHellmanGroup = dh2.DiffieHellmanGroup; exports2.createDiffieHellmanGroup = dh2.createDiffieHellmanGroup; exports2.getDiffieHellman = dh2.getDiffieHellman; exports2.createDiffieHellman = dh2.createDiffieHellman; exports2.DiffieHellman = dh2.DiffieHellman; - var sign4 = require_browser13(); + var sign4 = require_browser15(); exports2.createSign = sign4.createSign; exports2.Sign = sign4.Sign; exports2.createVerify = sign4.createVerify; exports2.Verify = sign4.Verify; - exports2.createECDH = require_browser14(); - var publicEncrypt = require_browser15(); + exports2.createECDH = require_browser16(); + var publicEncrypt = require_browser17(); exports2.publicEncrypt = publicEncrypt.publicEncrypt; exports2.privateEncrypt = publicEncrypt.privateEncrypt; exports2.publicDecrypt = publicEncrypt.publicDecrypt; exports2.privateDecrypt = publicEncrypt.privateDecrypt; - var rf2 = require_browser16(); + var rf2 = require_browser18(); exports2.randomFill = rf2.randomFill; exports2.randomFillSync = rf2.randomFillSync; exports2.createCredentials = function() { @@ -61403,7 +119352,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/scryptsy/lib/utils.js - var require_utils8 = __commonJS({ + var require_utils9 = __commonJS({ "../../node_modules/scryptsy/lib/utils.js"(exports2, module2) { var crypto8 = require_crypto_browserify2(); var MAX_VALUE = 2147483647; @@ -61595,7 +119544,7 @@ ${formatDisplay(all, fmt)}`); var { checkAndInit, smixSync - } = require_utils8(); + } = require_utils9(); function scrypt5(key2, salt, N11, r10, p, dkLen, progressCallback) { const { XY: XY2, @@ -61622,7 +119571,7 @@ ${formatDisplay(all, fmt)}`); var { checkAndInit, smix - } = require_utils8(); + } = require_utils9(); async function scrypt5(key2, salt, N11, r10, p, dkLen, progressCallback, promiseInterval) { const { XY: XY2, @@ -61643,7 +119592,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/scryptsy/lib/index.js - var require_lib7 = __commonJS({ + var require_lib12 = __commonJS({ "../../node_modules/scryptsy/lib/index.js"(exports2, module2) { var scrypt5 = require_scryptSync(); scrypt5.async = require_scrypt4(); @@ -67524,7 +125473,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/store/src/util.js - var require_util5 = __commonJS({ + var require_util23 = __commonJS({ "../../node_modules/store/src/util.js"(exports2, module2) { var assign = make_assign(); var create = make_create(); @@ -67640,7 +125589,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/store/src/store-engine.js var require_store_engine = __commonJS({ "../../node_modules/store/src/store-engine.js"(exports2, module2) { - var util = require_util5(); + var util = require_util23(); var slice = util.slice; var pluck = util.pluck; var each = util.each; @@ -67828,7 +125777,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/store/storages/localStorage.js var require_localStorage = __commonJS({ "../../node_modules/store/storages/localStorage.js"(exports2, module2) { - var util = require_util5(); + var util = require_util23(); var Global = util.Global; module2.exports = { name: "localStorage", @@ -67865,7 +125814,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/store/storages/oldFF-globalStorage.js var require_oldFF_globalStorage = __commonJS({ "../../node_modules/store/storages/oldFF-globalStorage.js"(exports2, module2) { - var util = require_util5(); + var util = require_util23(); var Global = util.Global; module2.exports = { name: "oldFF-globalStorage", @@ -67902,7 +125851,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/store/storages/oldIE-userDataStorage.js var require_oldIE_userDataStorage = __commonJS({ "../../node_modules/store/storages/oldIE-userDataStorage.js"(exports2, module2) { - var util = require_util5(); + var util = require_util23(); var Global = util.Global; module2.exports = { name: "oldIE-userDataStorage", @@ -68000,7 +125949,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/store/storages/cookieStorage.js var require_cookieStorage = __commonJS({ "../../node_modules/store/storages/cookieStorage.js"(exports2, module2) { - var util = require_util5(); + var util = require_util23(); var Global = util.Global; var trim2 = util.trim; module2.exports = { @@ -68057,7 +126006,7 @@ ${formatDisplay(all, fmt)}`); // ../../node_modules/store/storages/sessionStorage.js var require_sessionStorage = __commonJS({ "../../node_modules/store/storages/sessionStorage.js"(exports2, module2) { - var util = require_util5(); + var util = require_util23(); var Global = util.Global; module2.exports = { name: "sessionStorage", @@ -68126,7 +126075,7 @@ ${formatDisplay(all, fmt)}`); }); // ../../node_modules/store/storages/all.js - var require_all = __commonJS({ + var require_all2 = __commonJS({ "../../node_modules/store/storages/all.js"(exports2, module2) { module2.exports = [ require_localStorage(), @@ -68325,7 +126274,7 @@ ${formatDisplay(all, fmt)}`); var require_store_legacy = __commonJS({ "../../node_modules/store/dist/store.legacy.js"(exports2, module2) { var engine = require_store_engine(); - var storages = require_all(); + var storages = require_all2(); var plugins = [require_json22()]; module2.exports = engine.createStore(storages, plugins); } @@ -158902,175 +216851,34 @@ ${bz(e, r10)}`); var ethers_exports = {}; __export(ethers_exports, { BaseContract: () => BaseContract, - BigNumber: () => import_bignumber18.BigNumber, + BigNumber: () => import_bignumber17.BigNumber, Contract: () => Contract, ContractFactory: () => ContractFactory, - FixedNumber: () => import_bignumber18.FixedNumber, - Signer: () => Signer, - VoidSigner: () => VoidSigner, + FixedNumber: () => import_bignumber17.FixedNumber, + Signer: () => import_abstract_signer4.Signer, + VoidSigner: () => import_abstract_signer4.VoidSigner, Wallet: () => Wallet, Wordlist: () => Wordlist, constants: () => constants, - errors: () => import_logger44.ErrorCode, + errors: () => import_logger40.ErrorCode, getDefaultProvider: () => getDefaultProvider, - logger: () => logger42, - providers: () => lib_exports3, + logger: () => logger38, + providers: () => lib_exports2, utils: () => utils_exports, - version: () => version23, + version: () => version19, wordlists: () => wordlists }); // ../../node_modules/@ethersproject/abi/lib.esm/fragments.js var import_bignumber = __toESM(require_lib3()); - - // ../../node_modules/@ethersproject/properties/lib.esm/index.js + var import_properties = __toESM(require_lib7()); var import_logger = __toESM(require_lib()); - // ../../node_modules/@ethersproject/properties/lib.esm/_version.js - var version2 = "properties/5.7.0"; - - // ../../node_modules/@ethersproject/properties/lib.esm/index.js - var __awaiter2 = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var logger = new import_logger.Logger(version2); - function defineReadOnly(object, name6, value) { - Object.defineProperty(object, name6, { - enumerable: true, - value, - writable: false - }); - } - function getStatic(ctor, key2) { - for (let i = 0; i < 32; i++) { - if (ctor[key2]) { - return ctor[key2]; - } - if (!ctor.prototype || typeof ctor.prototype !== "object") { - break; - } - ctor = Object.getPrototypeOf(ctor.prototype).constructor; - } - return null; - } - function resolveProperties(object) { - return __awaiter2(this, void 0, void 0, function* () { - const promises = Object.keys(object).map((key2) => { - const value = object[key2]; - return Promise.resolve(value).then((v) => ({ key: key2, value: v })); - }); - const results = yield Promise.all(promises); - return results.reduce((accum, result) => { - accum[result.key] = result.value; - return accum; - }, {}); - }); - } - function checkProperties(object, properties) { - if (!object || typeof object !== "object") { - logger.throwArgumentError("invalid object", "object", object); - } - Object.keys(object).forEach((key2) => { - if (!properties[key2]) { - logger.throwArgumentError("invalid object key - " + key2, "transaction:" + key2, object); - } - }); - } - function shallowCopy(object) { - const result = {}; - for (const key2 in object) { - result[key2] = object[key2]; - } - return result; - } - var opaque = { bigint: true, boolean: true, "function": true, number: true, string: true }; - function _isFrozen(object) { - if (object === void 0 || object === null || opaque[typeof object]) { - return true; - } - if (Array.isArray(object) || typeof object === "object") { - if (!Object.isFrozen(object)) { - return false; - } - const keys = Object.keys(object); - for (let i = 0; i < keys.length; i++) { - let value = null; - try { - value = object[keys[i]]; - } catch (error) { - continue; - } - if (!_isFrozen(value)) { - return false; - } - } - return true; - } - return logger.throwArgumentError(`Cannot deepCopy ${typeof object}`, "object", object); - } - function _deepCopy(object) { - if (_isFrozen(object)) { - return object; - } - if (Array.isArray(object)) { - return Object.freeze(object.map((item) => deepCopy(item))); - } - if (typeof object === "object") { - const result = {}; - for (const key2 in object) { - const value = object[key2]; - if (value === void 0) { - continue; - } - defineReadOnly(result, key2, deepCopy(value)); - } - return result; - } - return logger.throwArgumentError(`Cannot deepCopy ${typeof object}`, "object", object); - } - function deepCopy(object) { - return _deepCopy(object); - } - var Description = class { - constructor(info) { - for (const key2 in info) { - this[key2] = deepCopy(info[key2]); - } - } - }; - - // ../../node_modules/@ethersproject/abi/lib.esm/fragments.js - var import_logger2 = __toESM(require_lib()); - // ../../node_modules/@ethersproject/abi/lib.esm/_version.js - var version3 = "abi/5.7.0"; + var version2 = "abi/5.7.0"; // ../../node_modules/@ethersproject/abi/lib.esm/fragments.js - var logger2 = new import_logger2.Logger(version3); + var logger = new import_logger.Logger(version2); var _constructorGuard = {}; var ModifiersBytes = { calldata: true, memory: true, storage: true }; var ModifiersNest = { calldata: true, memory: true }; @@ -159089,14 +216897,14 @@ ${bz(e, r10)}`); } } if (ModifiersBytes[name6] || name6 === "payable") { - logger2.throwArgumentError("invalid modifier", "name", name6); + logger.throwArgumentError("invalid modifier", "name", name6); } return false; } function parseParamType(param, allowIndexed) { let originalParam = param; function throwError(i) { - logger2.throwArgumentError(`unexpected character at position ${i}`, "param", param); + logger.throwArgumentError(`unexpected character at position ${i}`, "param", param); } param = param.replace(/\s/g, " "); function newNode(parent2) { @@ -159225,7 +217033,7 @@ ${bz(e, r10)}`); } } if (node.parent) { - logger2.throwArgumentError("unexpected eof", "param", param); + logger.throwArgumentError("unexpected eof", "param", param); } delete parent.state; if (node.name === "indexed") { @@ -159245,7 +217053,7 @@ ${bz(e, r10)}`); } function populate(object, params) { for (let key2 in params) { - defineReadOnly(object, key2, params[key2]); + (0, import_properties.defineReadOnly)(object, key2, params[key2]); } } var FormatTypes = Object.freeze({ @@ -159258,7 +217066,7 @@ ${bz(e, r10)}`); var ParamType = class { constructor(constructorGuard, params) { if (constructorGuard !== _constructorGuard) { - logger2.throwError("use fromString", import_logger2.Logger.errors.UNSUPPORTED_OPERATION, { + logger.throwError("use fromString", import_logger.Logger.errors.UNSUPPORTED_OPERATION, { operation: "new ParamType()" }); } @@ -159288,7 +217096,7 @@ ${bz(e, r10)}`); format = FormatTypes.sighash; } if (!FormatTypes[format]) { - logger2.throwArgumentError("invalid format type", "format", format); + logger.throwArgumentError("invalid format type", "format", format); } if (format === FormatTypes.json) { let result2 = { @@ -159365,7 +217173,7 @@ ${bz(e, r10)}`); var Fragment = class { constructor(constructorGuard, params) { if (constructorGuard !== _constructorGuard) { - logger2.throwError("use a static from method", import_logger2.Logger.errors.UNSUPPORTED_OPERATION, { + logger.throwError("use a static from method", import_logger.Logger.errors.UNSUPPORTED_OPERATION, { operation: "new Fragment()" }); } @@ -159399,7 +217207,7 @@ ${bz(e, r10)}`); case "receive": return null; } - return logger2.throwArgumentError("invalid fragment object", "value", value); + return logger.throwArgumentError("invalid fragment object", "value", value); } static fromString(value) { value = value.replace(/\s/g, " "); @@ -159414,7 +217222,7 @@ ${bz(e, r10)}`); } else if (value.split(" ")[0] === "error") { return ErrorFragment.fromString(value.substring(5).trim()); } - return logger2.throwArgumentError("unsupported fragment", "value", value); + return logger.throwArgumentError("unsupported fragment", "value", value); } static isFragment(value) { return !!(value && value._isFragment); @@ -159426,7 +217234,7 @@ ${bz(e, r10)}`); format = FormatTypes.sighash; } if (!FormatTypes[format]) { - logger2.throwArgumentError("invalid format type", "format", format); + logger.throwArgumentError("invalid format type", "format", format); } if (format === FormatTypes.json) { return JSON.stringify({ @@ -159459,7 +217267,7 @@ ${bz(e, r10)}`); return value; } if (value.type !== "event") { - logger2.throwArgumentError("invalid event object", "value", value); + logger.throwArgumentError("invalid event object", "value", value); } const params = { name: verifyIdentifier(value.name), @@ -159472,7 +217280,7 @@ ${bz(e, r10)}`); static fromString(value) { let match = value.match(regexParen); if (!match) { - logger2.throwArgumentError("invalid event string", "value", value); + logger.throwArgumentError("invalid event string", "value", value); } let anonymous = false; match[3].split(" ").forEach((modifier) => { @@ -159483,7 +217291,7 @@ ${bz(e, r10)}`); case "": break; default: - logger2.warn("unknown modifier: " + modifier); + logger.warn("unknown modifier: " + modifier); } }); return EventFragment.fromObject({ @@ -159502,10 +217310,10 @@ ${bz(e, r10)}`); let comps = value.split("@"); if (comps.length !== 1) { if (comps.length > 2) { - logger2.throwArgumentError("invalid human-readable ABI signature", "value", value); + logger.throwArgumentError("invalid human-readable ABI signature", "value", value); } if (!comps[1].match(/^[0-9]+$/)) { - logger2.throwArgumentError("invalid human-readable ABI signature gas", "value", value); + logger.throwArgumentError("invalid human-readable ABI signature gas", "value", value); } params.gas = import_bignumber.BigNumber.from(comps[1]); return comps[0]; @@ -159557,19 +217365,19 @@ ${bz(e, r10)}`); result.constant = result.stateMutability === "view" || result.stateMutability === "pure"; if (value.constant != null) { if (!!value.constant !== result.constant) { - logger2.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value); + logger.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value); } } result.payable = result.stateMutability === "payable"; if (value.payable != null) { if (!!value.payable !== result.payable) { - logger2.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value); + logger.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value); } } } else if (value.payable != null) { result.payable = !!value.payable; if (value.constant == null && !result.payable && value.type !== "constructor") { - logger2.throwArgumentError("unable to determine stateMutability", "value", value); + logger.throwArgumentError("unable to determine stateMutability", "value", value); } result.constant = !!value.constant; if (result.constant) { @@ -159578,14 +217386,14 @@ ${bz(e, r10)}`); result.stateMutability = result.payable ? "payable" : "nonpayable"; } if (result.payable && result.constant) { - logger2.throwArgumentError("cannot have constant payable function", "value", value); + logger.throwArgumentError("cannot have constant payable function", "value", value); } } else if (value.constant != null) { result.constant = !!value.constant; result.payable = !result.constant; result.stateMutability = result.constant ? "view" : "payable"; } else if (value.type !== "constructor") { - logger2.throwArgumentError("unable to determine stateMutability", "value", value); + logger.throwArgumentError("unable to determine stateMutability", "value", value); } return result; } @@ -159595,7 +217403,7 @@ ${bz(e, r10)}`); format = FormatTypes.sighash; } if (!FormatTypes[format]) { - logger2.throwArgumentError("invalid format type", "format", format); + logger.throwArgumentError("invalid format type", "format", format); } if (format === FormatTypes.json) { return JSON.stringify({ @@ -159607,7 +217415,7 @@ ${bz(e, r10)}`); }); } if (format === FormatTypes.sighash) { - logger2.throwError("cannot format a constructor for sighash", import_logger2.Logger.errors.UNSUPPORTED_OPERATION, { + logger.throwError("cannot format a constructor for sighash", import_logger.Logger.errors.UNSUPPORTED_OPERATION, { operation: "format(sighash)" }); } @@ -159628,11 +217436,11 @@ ${bz(e, r10)}`); return value; } if (value.type !== "constructor") { - logger2.throwArgumentError("invalid constructor object", "value", value); + logger.throwArgumentError("invalid constructor object", "value", value); } let state = verifyState(value); if (state.constant) { - logger2.throwArgumentError("constructor cannot be constant", "value", value); + logger.throwArgumentError("constructor cannot be constant", "value", value); } const params = { name: null, @@ -159649,7 +217457,7 @@ ${bz(e, r10)}`); value = parseGas(value, params); let parens = value.match(regexParen); if (!parens || parens[1].trim() !== "constructor") { - logger2.throwArgumentError("invalid constructor string", "value", value); + logger.throwArgumentError("invalid constructor string", "value", value); } params.inputs = parseParams(parens[2].trim(), false); parseModifiers(parens[3].trim(), params); @@ -159665,7 +217473,7 @@ ${bz(e, r10)}`); format = FormatTypes.sighash; } if (!FormatTypes[format]) { - logger2.throwArgumentError("invalid format type", "format", format); + logger.throwArgumentError("invalid format type", "format", format); } if (format === FormatTypes.json) { return JSON.stringify({ @@ -159712,7 +217520,7 @@ ${bz(e, r10)}`); return value; } if (value.type !== "function") { - logger2.throwArgumentError("invalid function object", "value", value); + logger.throwArgumentError("invalid function object", "value", value); } let state = verifyState(value); const params = { @@ -159732,11 +217540,11 @@ ${bz(e, r10)}`); value = parseGas(value, params); let comps = value.split(" returns "); if (comps.length > 2) { - logger2.throwArgumentError("invalid function string", "value", value); + logger.throwArgumentError("invalid function string", "value", value); } let parens = comps[0].match(regexParen); if (!parens) { - logger2.throwArgumentError("invalid function signature", "value", value); + logger.throwArgumentError("invalid function signature", "value", value); } params.name = parens[1].trim(); if (params.name) { @@ -159747,7 +217555,7 @@ ${bz(e, r10)}`); if (comps.length > 1) { let returns = comps[1].match(regexParen); if (returns[1].trim() != "" || returns[3].trim() != "") { - logger2.throwArgumentError("unexpected tokens", "value", value); + logger.throwArgumentError("unexpected tokens", "value", value); } params.outputs = parseParams(returns[2], false); } else { @@ -159762,7 +217570,7 @@ ${bz(e, r10)}`); function checkForbidden(fragment) { const sig = fragment.format(); if (sig === "Error(string)" || sig === "Panic(uint256)") { - logger2.throwArgumentError(`cannot specify user defined ${sig} error`, "fragment", fragment); + logger.throwArgumentError(`cannot specify user defined ${sig} error`, "fragment", fragment); } return fragment; } @@ -159772,7 +217580,7 @@ ${bz(e, r10)}`); format = FormatTypes.sighash; } if (!FormatTypes[format]) { - logger2.throwArgumentError("invalid format type", "format", format); + logger.throwArgumentError("invalid format type", "format", format); } if (format === FormatTypes.json) { return JSON.stringify({ @@ -159799,7 +217607,7 @@ ${bz(e, r10)}`); return value; } if (value.type !== "error") { - logger2.throwArgumentError("invalid error object", "value", value); + logger.throwArgumentError("invalid error object", "value", value); } const params = { type: value.type, @@ -159812,7 +217620,7 @@ ${bz(e, r10)}`); let params = { type: "error" }; let parens = value.match(regexParen); if (!parens) { - logger2.throwArgumentError("invalid error signature", "value", value); + logger.throwArgumentError("invalid error signature", "value", value); } params.name = parens[1].trim(); if (params.name) { @@ -159836,7 +217644,7 @@ ${bz(e, r10)}`); var regexIdentifier = new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$"); function verifyIdentifier(value) { if (!value || !value.match(regexIdentifier)) { - logger2.throwArgumentError(`invalid identifier "${value}"`, "value", value); + logger.throwArgumentError(`invalid identifier "${value}"`, "value", value); } return value; } @@ -159858,7 +217666,7 @@ ${bz(e, r10)}`); } else if (c === ")") { depth--; if (depth === -1) { - logger2.throwArgumentError("unbalanced parenthesis", "value", value); + logger.throwArgumentError("unbalanced parenthesis", "value", value); } } } @@ -159870,14 +217678,16 @@ ${bz(e, r10)}`); } // ../../node_modules/@ethersproject/abi/lib.esm/abi-coder.js - var import_bytes9 = __toESM(require_lib2()); - var import_logger7 = __toESM(require_lib()); + var import_bytes6 = __toESM(require_lib2()); + var import_properties3 = __toESM(require_lib7()); + var import_logger4 = __toESM(require_lib()); // ../../node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js var import_bytes = __toESM(require_lib2()); var import_bignumber2 = __toESM(require_lib3()); - var import_logger3 = __toESM(require_lib()); - var logger3 = new import_logger3.Logger(version3); + var import_properties2 = __toESM(require_lib7()); + var import_logger2 = __toESM(require_lib()); + var logger2 = new import_logger2.Logger(version2); function checkResultErrors(result) { const errors2 = []; const checkErrors = function(path, object) { @@ -159905,12 +217715,12 @@ ${bz(e, r10)}`); this.dynamic = dynamic; } _throwError(message, value) { - logger3.throwArgumentError(message, this.localName, value); + logger2.throwArgumentError(message, this.localName, value); } }; var Writer = class { constructor(wordSize) { - defineReadOnly(this, "wordSize", wordSize || 32); + (0, import_properties2.defineReadOnly)(this, "wordSize", wordSize || 32); this._data = []; this._dataLength = 0; this._padding = new Uint8Array(wordSize); @@ -159940,7 +217750,7 @@ ${bz(e, r10)}`); _getValue(value) { let bytes5 = (0, import_bytes.arrayify)(import_bignumber2.BigNumber.from(value)); if (bytes5.length > this.wordSize) { - logger3.throwError("value out-of-bounds", import_logger3.Logger.errors.BUFFER_OVERRUN, { + logger2.throwError("value out-of-bounds", import_logger2.Logger.errors.BUFFER_OVERRUN, { length: this.wordSize, offset: bytes5.length }); @@ -159964,10 +217774,10 @@ ${bz(e, r10)}`); }; var Reader = class { constructor(data, wordSize, coerceFunc, allowLoose) { - defineReadOnly(this, "_data", (0, import_bytes.arrayify)(data)); - defineReadOnly(this, "wordSize", wordSize || 32); - defineReadOnly(this, "_coerceFunc", coerceFunc); - defineReadOnly(this, "allowLoose", allowLoose); + (0, import_properties2.defineReadOnly)(this, "_data", (0, import_bytes.arrayify)(data)); + (0, import_properties2.defineReadOnly)(this, "wordSize", wordSize || 32); + (0, import_properties2.defineReadOnly)(this, "_coerceFunc", coerceFunc); + (0, import_properties2.defineReadOnly)(this, "allowLoose", allowLoose); this._offset = 0; } get data() { @@ -159995,7 +217805,7 @@ ${bz(e, r10)}`); if (this.allowLoose && loose && this._offset + length <= this._data.length) { alignedLength = length; } else { - logger3.throwError("data out-of-bounds", import_logger3.Logger.errors.BUFFER_OVERRUN, { + logger2.throwError("data out-of-bounds", import_logger2.Logger.errors.BUFFER_OVERRUN, { length: this._data.length, offset: this._offset + alignedLength }); @@ -160016,263 +217826,9 @@ ${bz(e, r10)}`); } }; - // ../../node_modules/@ethersproject/address/lib.esm/index.js - var import_bytes4 = __toESM(require_lib2()); - var import_bignumber3 = __toESM(require_lib3()); - - // ../../node_modules/@ethersproject/keccak256/lib.esm/index.js - var import_js_sha3 = __toESM(require_sha32()); - var import_bytes2 = __toESM(require_lib2()); - function keccak256(data) { - return "0x" + import_js_sha3.default.keccak_256((0, import_bytes2.arrayify)(data)); - } - - // ../../node_modules/@ethersproject/rlp/lib.esm/index.js - var lib_exports = {}; - __export(lib_exports, { - decode: () => decode, - encode: () => encode - }); - var import_bytes3 = __toESM(require_lib2()); - var import_logger4 = __toESM(require_lib()); - - // ../../node_modules/@ethersproject/rlp/lib.esm/_version.js - var version4 = "rlp/5.7.0"; - - // ../../node_modules/@ethersproject/rlp/lib.esm/index.js - var logger4 = new import_logger4.Logger(version4); - function arrayifyInteger(value) { - const result = []; - while (value) { - result.unshift(value & 255); - value >>= 8; - } - return result; - } - function unarrayifyInteger(data, offset, length) { - let result = 0; - for (let i = 0; i < length; i++) { - result = result * 256 + data[offset + i]; - } - return result; - } - function _encode(object) { - if (Array.isArray(object)) { - let payload = []; - object.forEach(function(child) { - payload = payload.concat(_encode(child)); - }); - if (payload.length <= 55) { - payload.unshift(192 + payload.length); - return payload; - } - const length2 = arrayifyInteger(payload.length); - length2.unshift(247 + length2.length); - return length2.concat(payload); - } - if (!(0, import_bytes3.isBytesLike)(object)) { - logger4.throwArgumentError("RLP object must be BytesLike", "object", object); - } - const data = Array.prototype.slice.call((0, import_bytes3.arrayify)(object)); - if (data.length === 1 && data[0] <= 127) { - return data; - } else if (data.length <= 55) { - data.unshift(128 + data.length); - return data; - } - const length = arrayifyInteger(data.length); - length.unshift(183 + length.length); - return length.concat(data); - } - function encode(object) { - return (0, import_bytes3.hexlify)(_encode(object)); - } - function _decodeChildren(data, offset, childOffset, length) { - const result = []; - while (childOffset < offset + 1 + length) { - const decoded = _decode(data, childOffset); - result.push(decoded.result); - childOffset += decoded.consumed; - if (childOffset > offset + 1 + length) { - logger4.throwError("child data too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - } - return { consumed: 1 + length, result }; - } - function _decode(data, offset) { - if (data.length === 0) { - logger4.throwError("data too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - if (data[offset] >= 248) { - const lengthLength = data[offset] - 247; - if (offset + 1 + lengthLength > data.length) { - logger4.throwError("data short segment too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - const length = unarrayifyInteger(data, offset + 1, lengthLength); - if (offset + 1 + lengthLength + length > data.length) { - logger4.throwError("data long segment too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length); - } else if (data[offset] >= 192) { - const length = data[offset] - 192; - if (offset + 1 + length > data.length) { - logger4.throwError("data array too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - return _decodeChildren(data, offset, offset + 1, length); - } else if (data[offset] >= 184) { - const lengthLength = data[offset] - 183; - if (offset + 1 + lengthLength > data.length) { - logger4.throwError("data array too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - const length = unarrayifyInteger(data, offset + 1, lengthLength); - if (offset + 1 + lengthLength + length > data.length) { - logger4.throwError("data array too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - const result = (0, import_bytes3.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length)); - return { consumed: 1 + lengthLength + length, result }; - } else if (data[offset] >= 128) { - const length = data[offset] - 128; - if (offset + 1 + length > data.length) { - logger4.throwError("data too short", import_logger4.Logger.errors.BUFFER_OVERRUN, {}); - } - const result = (0, import_bytes3.hexlify)(data.slice(offset + 1, offset + 1 + length)); - return { consumed: 1 + length, result }; - } - return { consumed: 1, result: (0, import_bytes3.hexlify)(data[offset]) }; - } - function decode(data) { - const bytes5 = (0, import_bytes3.arrayify)(data); - const decoded = _decode(bytes5, 0); - if (decoded.consumed !== bytes5.length) { - logger4.throwArgumentError("invalid rlp data", "data", data); - } - return decoded.result; - } - - // ../../node_modules/@ethersproject/address/lib.esm/index.js - var import_logger5 = __toESM(require_lib()); - - // ../../node_modules/@ethersproject/address/lib.esm/_version.js - var version5 = "address/5.7.0"; - - // ../../node_modules/@ethersproject/address/lib.esm/index.js - var logger5 = new import_logger5.Logger(version5); - function getChecksumAddress(address) { - if (!(0, import_bytes4.isHexString)(address, 20)) { - logger5.throwArgumentError("invalid address", "address", address); - } - address = address.toLowerCase(); - const chars2 = address.substring(2).split(""); - const expanded = new Uint8Array(40); - for (let i = 0; i < 40; i++) { - expanded[i] = chars2[i].charCodeAt(0); - } - const hashed = (0, import_bytes4.arrayify)(keccak256(expanded)); - for (let i = 0; i < 40; i += 2) { - if (hashed[i >> 1] >> 4 >= 8) { - chars2[i] = chars2[i].toUpperCase(); - } - if ((hashed[i >> 1] & 15) >= 8) { - chars2[i + 1] = chars2[i + 1].toUpperCase(); - } - } - return "0x" + chars2.join(""); - } - var MAX_SAFE_INTEGER = 9007199254740991; - function log10(x) { - if (Math.log10) { - return Math.log10(x); - } - return Math.log(x) / Math.LN10; - } - var ibanLookup = {}; - for (let i = 0; i < 10; i++) { - ibanLookup[String(i)] = String(i); - } - for (let i = 0; i < 26; i++) { - ibanLookup[String.fromCharCode(65 + i)] = String(10 + i); - } - var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER)); - function ibanChecksum(address) { - address = address.toUpperCase(); - address = address.substring(4) + address.substring(0, 2) + "00"; - let expanded = address.split("").map((c) => { - return ibanLookup[c]; - }).join(""); - while (expanded.length >= safeDigits) { - let block = expanded.substring(0, safeDigits); - expanded = parseInt(block, 10) % 97 + expanded.substring(block.length); - } - let checksum = String(98 - parseInt(expanded, 10) % 97); - while (checksum.length < 2) { - checksum = "0" + checksum; - } - return checksum; - } - function getAddress(address) { - let result = null; - if (typeof address !== "string") { - logger5.throwArgumentError("invalid address", "address", address); - } - if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) { - if (address.substring(0, 2) !== "0x") { - address = "0x" + address; - } - result = getChecksumAddress(address); - if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) { - logger5.throwArgumentError("bad address checksum", "address", address); - } - } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { - if (address.substring(2, 4) !== ibanChecksum(address)) { - logger5.throwArgumentError("bad icap checksum", "address", address); - } - result = (0, import_bignumber3._base36To16)(address.substring(4)); - while (result.length < 40) { - result = "0" + result; - } - result = getChecksumAddress("0x" + result); - } else { - logger5.throwArgumentError("invalid address", "address", address); - } - return result; - } - function isAddress(address) { - try { - getAddress(address); - return true; - } catch (error) { - } - return false; - } - function getIcapAddress(address) { - let base36 = (0, import_bignumber3._base16To36)(getAddress(address).substring(2)).toUpperCase(); - while (base36.length < 30) { - base36 = "0" + base36; - } - return "XE" + ibanChecksum("XE00" + base36) + base36; - } - function getContractAddress(transaction) { - let from2 = null; - try { - from2 = getAddress(transaction.from); - } catch (error) { - logger5.throwArgumentError("missing from address", "transaction", transaction); - } - const nonce = (0, import_bytes4.stripZeros)((0, import_bytes4.arrayify)(import_bignumber3.BigNumber.from(transaction.nonce).toHexString())); - return getAddress((0, import_bytes4.hexDataSlice)(keccak256(encode([from2, nonce])), 12)); - } - function getCreate2Address(from2, salt, initCodeHash) { - if ((0, import_bytes4.hexDataLength)(salt) !== 32) { - logger5.throwArgumentError("salt must be 32 bytes", "salt", salt); - } - if ((0, import_bytes4.hexDataLength)(initCodeHash) !== 32) { - logger5.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash); - } - return getAddress((0, import_bytes4.hexDataSlice)(keccak256((0, import_bytes4.concat)(["0xff", getAddress(from2), salt, initCodeHash])), 12)); - } - // ../../node_modules/@ethersproject/abi/lib.esm/coders/address.js - var import_bytes5 = __toESM(require_lib2()); + var import_address = __toESM(require_lib10()); + var import_bytes2 = __toESM(require_lib2()); var AddressCoder = class extends Coder { constructor(localName) { super("address", "address", localName, false); @@ -160282,19 +217838,19 @@ ${bz(e, r10)}`); } encode(writer, value) { try { - value = getAddress(value); + value = (0, import_address.getAddress)(value); } catch (error) { this._throwError(error.message, value); } return writer.writeValue(value); } decode(reader) { - return getAddress((0, import_bytes5.hexZeroPad)(reader.readValue().toHexString(), 20)); + return (0, import_address.getAddress)((0, import_bytes2.hexZeroPad)(reader.readValue().toHexString(), 20)); } }; // ../../node_modules/@ethersproject/abi/lib.esm/coders/array.js - var import_logger6 = __toESM(require_lib()); + var import_logger3 = __toESM(require_lib()); // ../../node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js var AnonymousCoder = class extends Coder { @@ -160314,7 +217870,7 @@ ${bz(e, r10)}`); }; // ../../node_modules/@ethersproject/abi/lib.esm/coders/array.js - var logger6 = new import_logger6.Logger(version3); + var logger3 = new import_logger3.Logger(version2); function pack(writer, coders, values) { let arrayValues = null; if (Array.isArray(values)) { @@ -160324,14 +217880,14 @@ ${bz(e, r10)}`); arrayValues = coders.map((coder) => { const name6 = coder.localName; if (!name6) { - logger6.throwError("cannot encode object for signature with missing names", import_logger6.Logger.errors.INVALID_ARGUMENT, { + logger3.throwError("cannot encode object for signature with missing names", import_logger3.Logger.errors.INVALID_ARGUMENT, { argument: "values", coder, value: values }); } if (unique[name6]) { - logger6.throwError("cannot encode object for signature with duplicate names", import_logger6.Logger.errors.INVALID_ARGUMENT, { + logger3.throwError("cannot encode object for signature with duplicate names", import_logger3.Logger.errors.INVALID_ARGUMENT, { argument: "values", coder, value: values @@ -160341,10 +217897,10 @@ ${bz(e, r10)}`); return values[name6]; }); } else { - logger6.throwArgumentError("invalid tuple value", "tuple", values); + logger3.throwArgumentError("invalid tuple value", "tuple", values); } if (coders.length !== arrayValues.length) { - logger6.throwArgumentError("types/value length mismatch", "tuple", values); + logger3.throwArgumentError("types/value length mismatch", "tuple", values); } let staticWriter = new Writer(writer.wordSize); let dynamicWriter = new Writer(writer.wordSize); @@ -160380,7 +217936,7 @@ ${bz(e, r10)}`); try { value = coder.decode(offsetReader); } catch (error) { - if (error.code === import_logger6.Logger.errors.BUFFER_OVERRUN) { + if (error.code === import_logger3.Logger.errors.BUFFER_OVERRUN) { throw error; } value = error; @@ -160392,7 +217948,7 @@ ${bz(e, r10)}`); try { value = coder.decode(reader); } catch (error) { - if (error.code === import_logger6.Logger.errors.BUFFER_OVERRUN) { + if (error.code === import_logger3.Logger.errors.BUFFER_OVERRUN) { throw error; } value = error; @@ -160476,7 +218032,7 @@ ${bz(e, r10)}`); count = value.length; writer.writeValue(value.length); } - logger6.checkArgumentCount(value.length, count, "coder array" + (this.localName ? " " + this.localName : "")); + logger3.checkArgumentCount(value.length, count, "coder array" + (this.localName ? " " + this.localName : "")); let coders = []; for (let i = 0; i < value.length; i++) { coders.push(this.coder); @@ -160488,7 +218044,7 @@ ${bz(e, r10)}`); if (count === -1) { count = reader.readValue().toNumber(); if (count * 32 > reader._data.length) { - logger6.throwError("insufficient data length", import_logger6.Logger.errors.BUFFER_OVERRUN, { + logger3.throwError("insufficient data length", import_logger3.Logger.errors.BUFFER_OVERRUN, { length: reader._data.length, count }); @@ -160519,7 +218075,7 @@ ${bz(e, r10)}`); }; // ../../node_modules/@ethersproject/abi/lib.esm/coders/bytes.js - var import_bytes6 = __toESM(require_lib2()); + var import_bytes3 = __toESM(require_lib2()); var DynamicBytesCoder = class extends Coder { constructor(type, localName) { super(type, type, localName, true); @@ -160528,7 +218084,7 @@ ${bz(e, r10)}`); return "0x"; } encode(writer, value) { - value = (0, import_bytes6.arrayify)(value); + value = (0, import_bytes3.arrayify)(value); let length = writer.writeValue(value.length); length += writer.writeBytes(value); return length; @@ -160542,12 +218098,12 @@ ${bz(e, r10)}`); super("bytes", localName); } decode(reader) { - return reader.coerce(this.name, (0, import_bytes6.hexlify)(super.decode(reader))); + return reader.coerce(this.name, (0, import_bytes3.hexlify)(super.decode(reader))); } }; // ../../node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js - var import_bytes7 = __toESM(require_lib2()); + var import_bytes4 = __toESM(require_lib2()); var FixedBytesCoder = class extends Coder { constructor(size, localName) { let name6 = "bytes" + String(size); @@ -160558,14 +218114,14 @@ ${bz(e, r10)}`); return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0, 2 + this.size * 2); } encode(writer, value) { - let data = (0, import_bytes7.arrayify)(value); + let data = (0, import_bytes4.arrayify)(value); if (data.length !== this.size) { this._throwError("incorrect data length", value); } return writer.writeBytes(data); } decode(reader) { - return reader.coerce(this.name, (0, import_bytes7.hexlify)(reader.readBytes(this.size))); + return reader.coerce(this.name, (0, import_bytes4.hexlify)(reader.readBytes(this.size))); } }; @@ -160590,7 +218146,7 @@ ${bz(e, r10)}`); }; // ../../node_modules/@ethersproject/abi/lib.esm/coders/number.js - var import_bignumber4 = __toESM(require_lib3()); + var import_bignumber3 = __toESM(require_lib3()); var import_constants = __toESM(require_lib5()); var NumberCoder = class extends Coder { constructor(size, signed2, localName) { @@ -160603,7 +218159,7 @@ ${bz(e, r10)}`); return 0; } encode(writer, value) { - let v = import_bignumber4.BigNumber.from(value); + let v = import_bignumber3.BigNumber.from(value); let maxUintValue = import_constants.MaxUint256.mask(writer.wordSize * 8); if (this.signed) { let bounds = maxUintValue.mask(this.size * 8 - 1); @@ -160699,12 +218255,12 @@ ${bz(e, r10)}`); }; // ../../node_modules/@ethersproject/abi/lib.esm/abi-coder.js - var logger7 = new import_logger7.Logger(version3); + var logger4 = new import_logger4.Logger(version2); var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/); var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/); var AbiCoder = class { constructor(coerceFunc) { - defineReadOnly(this, "coerceFunc", coerceFunc || null); + (0, import_properties3.defineReadOnly)(this, "coerceFunc", coerceFunc || null); } _getCoder(param) { switch (param.baseType) { @@ -160729,7 +218285,7 @@ ${bz(e, r10)}`); if (match) { let size = parseInt(match[2] || "256"); if (size === 0 || size > 256 || size % 8 !== 0) { - logger7.throwArgumentError("invalid " + match[1] + " bit length", "param", param); + logger4.throwArgumentError("invalid " + match[1] + " bit length", "param", param); } return new NumberCoder(size / 8, match[1] === "int", param.name); } @@ -160737,11 +218293,11 @@ ${bz(e, r10)}`); if (match) { let size = parseInt(match[1]); if (size === 0 || size > 32) { - logger7.throwArgumentError("invalid bytes length", "param", param); + logger4.throwArgumentError("invalid bytes length", "param", param); } return new FixedBytesCoder(size, param.name); } - return logger7.throwArgumentError("invalid type", "type", param.type); + return logger4.throwArgumentError("invalid type", "type", param.type); } _getWordSize() { return 32; @@ -160759,7 +218315,7 @@ ${bz(e, r10)}`); } encode(types2, values) { if (types2.length !== values.length) { - logger7.throwError("types/values length mismatch", import_logger7.Logger.errors.INVALID_ARGUMENT, { + logger4.throwError("types/values length mismatch", import_logger4.Logger.errors.INVALID_ARGUMENT, { count: { types: types2.length, values: values.length }, value: { types: types2, values } }); @@ -160773,51 +218329,54 @@ ${bz(e, r10)}`); decode(types2, data, loose) { const coders = types2.map((type) => this._getCoder(ParamType.from(type))); const coder = new TupleCoder(coders, "_"); - return coder.decode(this._getReader((0, import_bytes9.arrayify)(data), loose)); + return coder.decode(this._getReader((0, import_bytes6.arrayify)(data), loose)); } }; var defaultAbiCoder = new AbiCoder(); // ../../node_modules/@ethersproject/abi/lib.esm/interface.js - var import_bignumber6 = __toESM(require_lib3()); - var import_bytes15 = __toESM(require_lib2()); + var import_address4 = __toESM(require_lib10()); + var import_bignumber5 = __toESM(require_lib3()); + var import_bytes12 = __toESM(require_lib2()); // ../../node_modules/@ethersproject/hash/lib.esm/id.js + var import_keccak256 = __toESM(require_lib8()); var import_strings2 = __toESM(require_lib6()); function id2(text2) { - return keccak256((0, import_strings2.toUtf8Bytes)(text2)); + return (0, import_keccak256.keccak256)((0, import_strings2.toUtf8Bytes)(text2)); } // ../../node_modules/@ethersproject/hash/lib.esm/namehash.js - var import_bytes12 = __toESM(require_lib2()); + var import_bytes9 = __toESM(require_lib2()); var import_strings4 = __toESM(require_lib6()); - var import_logger8 = __toESM(require_lib()); + var import_keccak2562 = __toESM(require_lib8()); + var import_logger5 = __toESM(require_lib()); // ../../node_modules/@ethersproject/hash/lib.esm/_version.js - var version6 = "hash/5.7.0"; + var version3 = "hash/5.7.0"; // ../../node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js var import_strings3 = __toESM(require_lib6()); // ../../node_modules/@ethersproject/base64/lib.esm/index.js - var lib_exports2 = {}; - __export(lib_exports2, { - decode: () => decode2, - encode: () => encode2 + var lib_exports = {}; + __export(lib_exports, { + decode: () => decode, + encode: () => encode }); // ../../node_modules/@ethersproject/base64/lib.esm/base64.js - var import_bytes11 = __toESM(require_lib2()); - function decode2(textData) { + var import_bytes8 = __toESM(require_lib2()); + function decode(textData) { textData = atob(textData); const data = []; for (let i = 0; i < textData.length; i++) { data.push(textData.charCodeAt(i)); } - return (0, import_bytes11.arrayify)(data); + return (0, import_bytes8.arrayify)(data); } - function encode2(data) { - data = (0, import_bytes11.arrayify)(data); + function encode(data) { + data = (0, import_bytes8.arrayify)(data); let textData = ""; for (let i = 0; i < data.length; i++) { textData += String.fromCharCode(data[i]); @@ -161046,7 +218605,7 @@ ${bz(e, r10)}`); // ../../node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js function getData() { - return read_compressed_payload(decode2("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")); + return read_compressed_payload(decode("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")); } // ../../node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js @@ -161152,7 +218711,7 @@ ${bz(e, r10)}`); } // ../../node_modules/@ethersproject/hash/lib.esm/namehash.js - var logger8 = new import_logger8.Logger(version6); + var logger5 = new import_logger5.Logger(version3); var Zeros = new Uint8Array(32); Zeros.fill(0); function checkComponent(comp) { @@ -161190,17 +218749,17 @@ ${bz(e, r10)}`); } function namehash(name6) { if (typeof name6 !== "string") { - logger8.throwArgumentError("invalid ENS name; not a string", "name", name6); + logger5.throwArgumentError("invalid ENS name; not a string", "name", name6); } let result = Zeros; const comps = ensNameSplit(name6); while (comps.length) { - result = keccak256((0, import_bytes12.concat)([result, keccak256(comps.pop())])); + result = (0, import_keccak2562.keccak256)((0, import_bytes9.concat)([result, (0, import_keccak2562.keccak256)(comps.pop())])); } - return (0, import_bytes12.hexlify)(result); + return (0, import_bytes9.hexlify)(result); } function dnsEncode(name6) { - return (0, import_bytes12.hexlify)((0, import_bytes12.concat)(ensNameSplit(name6).map((comp) => { + return (0, import_bytes9.hexlify)((0, import_bytes9.concat)(ensNameSplit(name6).map((comp) => { if (comp.length > 63) { throw new Error("invalid DNS encoded entry; length exceeds 63 bytes"); } @@ -161212,14 +218771,15 @@ ${bz(e, r10)}`); } // ../../node_modules/@ethersproject/hash/lib.esm/message.js - var import_bytes13 = __toESM(require_lib2()); + var import_bytes10 = __toESM(require_lib2()); + var import_keccak2563 = __toESM(require_lib8()); var import_strings5 = __toESM(require_lib6()); var messagePrefix = "Ethereum Signed Message:\n"; function hashMessage(message) { if (typeof message === "string") { message = (0, import_strings5.toUtf8Bytes)(message); } - return keccak256((0, import_bytes13.concat)([ + return (0, import_keccak2563.keccak256)((0, import_bytes10.concat)([ (0, import_strings5.toUtf8Bytes)(messagePrefix), (0, import_strings5.toUtf8Bytes)(String(message.length)), message @@ -161227,10 +218787,13 @@ ${bz(e, r10)}`); } // ../../node_modules/@ethersproject/hash/lib.esm/typed-data.js - var import_bignumber5 = __toESM(require_lib3()); - var import_bytes14 = __toESM(require_lib2()); - var import_logger9 = __toESM(require_lib()); - var __awaiter3 = function(thisArg, _arguments, P, generator) { + var import_address3 = __toESM(require_lib10()); + var import_bignumber4 = __toESM(require_lib3()); + var import_bytes11 = __toESM(require_lib2()); + var import_keccak2564 = __toESM(require_lib8()); + var import_properties4 = __toESM(require_lib7()); + var import_logger6 = __toESM(require_lib()); + var __awaiter2 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -161257,23 +218820,23 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger9 = new import_logger9.Logger(version6); + var logger6 = new import_logger6.Logger(version3); var padding = new Uint8Array(32); padding.fill(0); - var NegativeOne2 = import_bignumber5.BigNumber.from(-1); - var Zero2 = import_bignumber5.BigNumber.from(0); - var One3 = import_bignumber5.BigNumber.from(1); - var MaxUint2562 = import_bignumber5.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + var NegativeOne2 = import_bignumber4.BigNumber.from(-1); + var Zero2 = import_bignumber4.BigNumber.from(0); + var One3 = import_bignumber4.BigNumber.from(1); + var MaxUint2562 = import_bignumber4.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); function hexPadRight(value) { - const bytes5 = (0, import_bytes14.arrayify)(value); + const bytes5 = (0, import_bytes11.arrayify)(value); const padOffset = bytes5.length % 32; if (padOffset) { - return (0, import_bytes14.hexConcat)([bytes5, padding.slice(padOffset)]); + return (0, import_bytes11.hexConcat)([bytes5, padding.slice(padOffset)]); } - return (0, import_bytes14.hexlify)(bytes5); + return (0, import_bytes11.hexlify)(bytes5); } - var hexTrue = (0, import_bytes14.hexZeroPad)(One3.toHexString(), 32); - var hexFalse = (0, import_bytes14.hexZeroPad)(Zero2.toHexString(), 32); + var hexTrue = (0, import_bytes11.hexZeroPad)(One3.toHexString(), 32); + var hexFalse = (0, import_bytes11.hexZeroPad)(Zero2.toHexString(), 32); var domainFieldTypes = { name: "string", version: "string", @@ -161291,7 +218854,7 @@ ${bz(e, r10)}`); function checkString(key2) { return function(value) { if (typeof value !== "string") { - logger9.throwArgumentError(`invalid domain value for ${JSON.stringify(key2)}`, `domain.${key2}`, value); + logger6.throwArgumentError(`invalid domain value for ${JSON.stringify(key2)}`, `domain.${key2}`, value); } return value; }; @@ -161301,28 +218864,28 @@ ${bz(e, r10)}`); version: checkString("version"), chainId: function(value) { try { - return import_bignumber5.BigNumber.from(value).toString(); + return import_bignumber4.BigNumber.from(value).toString(); } catch (error) { } - return logger9.throwArgumentError(`invalid domain value for "chainId"`, "domain.chainId", value); + return logger6.throwArgumentError(`invalid domain value for "chainId"`, "domain.chainId", value); }, verifyingContract: function(value) { try { - return getAddress(value).toLowerCase(); + return (0, import_address3.getAddress)(value).toLowerCase(); } catch (error) { } - return logger9.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value); + return logger6.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value); }, salt: function(value) { try { - const bytes5 = (0, import_bytes14.arrayify)(value); + const bytes5 = (0, import_bytes11.arrayify)(value); if (bytes5.length !== 32) { throw new Error("bad length"); } - return (0, import_bytes14.hexlify)(bytes5); + return (0, import_bytes11.hexlify)(bytes5); } catch (error) { } - return logger9.throwArgumentError(`invalid domain value "salt"`, "domain.salt", value); + return logger6.throwArgumentError(`invalid domain value "salt"`, "domain.salt", value); } }; function getBaseEncoder(type) { @@ -161332,16 +218895,16 @@ ${bz(e, r10)}`); const signed2 = match[1] === ""; const width = parseInt(match[2] || "256"); if (width % 8 !== 0 || width > 256 || match[2] && match[2] !== String(width)) { - logger9.throwArgumentError("invalid numeric width", "type", type); + logger6.throwArgumentError("invalid numeric width", "type", type); } const boundsUpper = MaxUint2562.mask(signed2 ? width - 1 : width); const boundsLower = signed2 ? boundsUpper.add(One3).mul(NegativeOne2) : Zero2; return function(value) { - const v = import_bignumber5.BigNumber.from(value); + const v = import_bignumber4.BigNumber.from(value); if (v.lt(boundsLower) || v.gt(boundsUpper)) { - logger9.throwArgumentError(`value out-of-bounds for ${type}`, "value", value); + logger6.throwArgumentError(`value out-of-bounds for ${type}`, "value", value); } - return (0, import_bytes14.hexZeroPad)(v.toTwos(256).toHexString(), 32); + return (0, import_bytes11.hexZeroPad)(v.toTwos(256).toHexString(), 32); }; } } @@ -161350,12 +218913,12 @@ ${bz(e, r10)}`); if (match) { const width = parseInt(match[1]); if (width === 0 || width > 32 || match[1] !== String(width)) { - logger9.throwArgumentError("invalid bytes width", "type", type); + logger6.throwArgumentError("invalid bytes width", "type", type); } return function(value) { - const bytes5 = (0, import_bytes14.arrayify)(value); + const bytes5 = (0, import_bytes11.arrayify)(value); if (bytes5.length !== width) { - logger9.throwArgumentError(`invalid length for ${type}`, "value", value); + logger6.throwArgumentError(`invalid length for ${type}`, "value", value); } return hexPadRight(value); }; @@ -161364,7 +218927,7 @@ ${bz(e, r10)}`); switch (type) { case "address": return function(value) { - return (0, import_bytes14.hexZeroPad)(getAddress(value), 32); + return (0, import_bytes11.hexZeroPad)((0, import_address3.getAddress)(value), 32); }; case "bool": return function(value) { @@ -161372,7 +218935,7 @@ ${bz(e, r10)}`); }; case "bytes": return function(value) { - return keccak256(value); + return (0, import_keccak2564.keccak256)(value); }; case "string": return function(value) { @@ -161386,9 +218949,9 @@ ${bz(e, r10)}`); } var TypedDataEncoder = class { constructor(types2) { - defineReadOnly(this, "types", Object.freeze(deepCopy(types2))); - defineReadOnly(this, "_encoderCache", {}); - defineReadOnly(this, "_types", {}); + (0, import_properties4.defineReadOnly)(this, "types", Object.freeze((0, import_properties4.deepCopy)(types2))); + (0, import_properties4.defineReadOnly)(this, "_encoderCache", {}); + (0, import_properties4.defineReadOnly)(this, "_types", {}); const links = {}; const parents = {}; const subtypes = {}; @@ -161401,19 +218964,19 @@ ${bz(e, r10)}`); const uniqueNames = {}; types2[name6].forEach((field) => { if (uniqueNames[field.name]) { - logger9.throwArgumentError(`duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name6)}`, "types", types2); + logger6.throwArgumentError(`duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name6)}`, "types", types2); } uniqueNames[field.name] = true; const baseType = field.type.match(/^([^\x5b]*)(\x5b|$)/)[1]; if (baseType === name6) { - logger9.throwArgumentError(`circular type reference to ${JSON.stringify(baseType)}`, "types", types2); + logger6.throwArgumentError(`circular type reference to ${JSON.stringify(baseType)}`, "types", types2); } const encoder5 = getBaseEncoder(baseType); if (encoder5) { return; } if (!parents[baseType]) { - logger9.throwArgumentError(`unknown type ${JSON.stringify(baseType)}`, "types", types2); + logger6.throwArgumentError(`unknown type ${JSON.stringify(baseType)}`, "types", types2); } parents[baseType].push(name6); links[name6][baseType] = true; @@ -161421,14 +218984,14 @@ ${bz(e, r10)}`); } const primaryTypes = Object.keys(parents).filter((n) => parents[n].length === 0); if (primaryTypes.length === 0) { - logger9.throwArgumentError("missing primary type", "types", types2); + logger6.throwArgumentError("missing primary type", "types", types2); } else if (primaryTypes.length > 1) { - logger9.throwArgumentError(`ambiguous primary types or unused types: ${primaryTypes.map((t) => JSON.stringify(t)).join(", ")}`, "types", types2); + logger6.throwArgumentError(`ambiguous primary types or unused types: ${primaryTypes.map((t) => JSON.stringify(t)).join(", ")}`, "types", types2); } - defineReadOnly(this, "primaryType", primaryTypes[0]); + (0, import_properties4.defineReadOnly)(this, "primaryType", primaryTypes[0]); function checkCircular(type, found) { if (found[type]) { - logger9.throwArgumentError(`circular type reference to ${JSON.stringify(type)}`, "types", types2); + logger6.throwArgumentError(`circular type reference to ${JSON.stringify(type)}`, "types", types2); } found[type] = true; Object.keys(links[type]).forEach((child) => { @@ -161470,13 +219033,13 @@ ${bz(e, r10)}`); const length = parseInt(match[3]); return (value) => { if (length >= 0 && value.length !== length) { - logger9.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + logger6.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); } let result = value.map(subEncoder); if (this._types[subtype]) { - result = result.map(keccak256); + result = result.map(import_keccak2564.keccak256); } - return keccak256((0, import_bytes14.hexConcat)(result)); + return (0, import_keccak2564.keccak256)((0, import_bytes11.hexConcat)(result)); }; } const fields = this.types[type]; @@ -161486,20 +219049,20 @@ ${bz(e, r10)}`); const values = fields.map(({ name: name6, type: type2 }) => { const result = this.getEncoder(type2)(value[name6]); if (this._types[type2]) { - return keccak256(result); + return (0, import_keccak2564.keccak256)(result); } return result; }); values.unshift(encodedType); - return (0, import_bytes14.hexConcat)(values); + return (0, import_bytes11.hexConcat)(values); }; } - return logger9.throwArgumentError(`unknown type: ${type}`, "type", type); + return logger6.throwArgumentError(`unknown type: ${type}`, "type", type); } encodeType(name6) { const result = this._types[name6]; if (!result) { - logger9.throwArgumentError(`unknown type: ${JSON.stringify(name6)}`, "name", name6); + logger6.throwArgumentError(`unknown type: ${JSON.stringify(name6)}`, "name", name6); } return result; } @@ -161507,7 +219070,7 @@ ${bz(e, r10)}`); return this.getEncoder(type)(value); } hashStruct(name6, value) { - return keccak256(this.encodeData(name6, value)); + return (0, import_keccak2564.keccak256)(this.encodeData(name6, value)); } encode(value) { return this.encodeData(this.primaryType, value); @@ -161527,7 +219090,7 @@ ${bz(e, r10)}`); const subtype = match[1]; const length = parseInt(match[3]); if (length >= 0 && value.length !== length) { - logger9.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); + logger6.throwArgumentError("array length mismatch; expected length ${ arrayLength }", "value", value); } return value.map((v) => this._visit(subtype, v, callback)); } @@ -161538,7 +219101,7 @@ ${bz(e, r10)}`); return accum; }, {}); } - return logger9.throwArgumentError(`unknown type: ${type}`, "type", type); + return logger6.throwArgumentError(`unknown type: ${type}`, "type", type); } visit(value, callback) { return this._visit(this.primaryType, value, callback); @@ -161557,7 +219120,7 @@ ${bz(e, r10)}`); for (const name6 in domain) { const type = domainFieldTypes[name6]; if (!type) { - logger9.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(name6)}`, "domain", domain); + logger6.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(name6)}`, "domain", domain); } domainFields.push({ name: name6, type }); } @@ -161567,25 +219130,25 @@ ${bz(e, r10)}`); return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain); } static encode(domain, types2, value) { - return (0, import_bytes14.hexConcat)([ + return (0, import_bytes11.hexConcat)([ "0x1901", TypedDataEncoder.hashDomain(domain), TypedDataEncoder.from(types2).hash(value) ]); } static hash(domain, types2, value) { - return keccak256(TypedDataEncoder.encode(domain, types2, value)); + return (0, import_keccak2564.keccak256)(TypedDataEncoder.encode(domain, types2, value)); } static resolveNames(domain, types2, value, resolveName2) { - return __awaiter3(this, void 0, void 0, function* () { - domain = shallowCopy(domain); + return __awaiter2(this, void 0, void 0, function* () { + domain = (0, import_properties4.shallowCopy)(domain); const ensCache = {}; - if (domain.verifyingContract && !(0, import_bytes14.isHexString)(domain.verifyingContract, 20)) { + if (domain.verifyingContract && !(0, import_bytes11.isHexString)(domain.verifyingContract, 20)) { ensCache[domain.verifyingContract] = "0x"; } const encoder5 = TypedDataEncoder.from(types2); encoder5.visit(value, (type, value2) => { - if (type === "address" && !(0, import_bytes14.isHexString)(value2, 20)) { + if (type === "address" && !(0, import_bytes11.isHexString)(value2, 20)) { ensCache[value2] = "0x"; } return value2; @@ -161618,9 +219181,9 @@ ${bz(e, r10)}`); domainTypes.push({ name: name6, type: domainFieldTypes[name6] }); }); const encoder5 = TypedDataEncoder.from(types2); - const typesWithDomain = shallowCopy(types2); + const typesWithDomain = (0, import_properties4.shallowCopy)(types2); if (typesWithDomain.EIP712Domain) { - logger9.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types2); + logger6.throwArgumentError("types must not contain EIP712Domain type", "types.EIP712Domain", types2); } else { typesWithDomain.EIP712Domain = domainTypes; } @@ -161631,10 +219194,10 @@ ${bz(e, r10)}`); primaryType: encoder5.primaryType, message: encoder5.visit(value, (type, value2) => { if (type.match(/^bytes(\d*)/)) { - return (0, import_bytes14.hexlify)((0, import_bytes14.arrayify)(value2)); + return (0, import_bytes11.hexlify)((0, import_bytes11.arrayify)(value2)); } if (type.match(/^u?int/)) { - return import_bignumber5.BigNumber.from(value2).toString(); + return import_bignumber4.BigNumber.from(value2).toString(); } switch (type) { case "address": @@ -161643,26 +219206,28 @@ ${bz(e, r10)}`); return !!value2; case "string": if (typeof value2 !== "string") { - logger9.throwArgumentError(`invalid string`, "value", value2); + logger6.throwArgumentError(`invalid string`, "value", value2); } return value2; } - return logger9.throwArgumentError("unsupported type", "type", type); + return logger6.throwArgumentError("unsupported type", "type", type); }) }; } }; // ../../node_modules/@ethersproject/abi/lib.esm/interface.js - var import_logger10 = __toESM(require_lib()); - var logger10 = new import_logger10.Logger(version3); - var LogDescription = class extends Description { + var import_keccak2565 = __toESM(require_lib8()); + var import_properties5 = __toESM(require_lib7()); + var import_logger7 = __toESM(require_lib()); + var logger7 = new import_logger7.Logger(version2); + var LogDescription = class extends import_properties5.Description { }; - var TransactionDescription = class extends Description { + var TransactionDescription = class extends import_properties5.Description { }; - var ErrorDescription = class extends Description { + var ErrorDescription = class extends import_properties5.Description { }; - var Indexed = class extends Description { + var Indexed = class extends import_properties5.Description { static isIndexed(value) { return !!(value && value._isIndexed); } @@ -161684,23 +219249,23 @@ ${bz(e, r10)}`); } else { abi = fragments; } - defineReadOnly(this, "fragments", abi.map((fragment) => { + (0, import_properties5.defineReadOnly)(this, "fragments", abi.map((fragment) => { return Fragment.from(fragment); }).filter((fragment) => fragment != null)); - defineReadOnly(this, "_abiCoder", getStatic(new.target, "getAbiCoder")()); - defineReadOnly(this, "functions", {}); - defineReadOnly(this, "errors", {}); - defineReadOnly(this, "events", {}); - defineReadOnly(this, "structs", {}); + (0, import_properties5.defineReadOnly)(this, "_abiCoder", (0, import_properties5.getStatic)(new.target, "getAbiCoder")()); + (0, import_properties5.defineReadOnly)(this, "functions", {}); + (0, import_properties5.defineReadOnly)(this, "errors", {}); + (0, import_properties5.defineReadOnly)(this, "events", {}); + (0, import_properties5.defineReadOnly)(this, "structs", {}); this.fragments.forEach((fragment) => { let bucket = null; switch (fragment.type) { case "constructor": if (this.deploy) { - logger10.warn("duplicate definition - constructor"); + logger7.warn("duplicate definition - constructor"); return; } - defineReadOnly(this, "deploy", fragment); + (0, import_properties5.defineReadOnly)(this, "deploy", fragment); return; case "function": bucket = this.functions; @@ -161716,25 +219281,25 @@ ${bz(e, r10)}`); } let signature2 = fragment.format(); if (bucket[signature2]) { - logger10.warn("duplicate definition - " + signature2); + logger7.warn("duplicate definition - " + signature2); return; } bucket[signature2] = fragment; }); if (!this.deploy) { - defineReadOnly(this, "deploy", ConstructorFragment.from({ + (0, import_properties5.defineReadOnly)(this, "deploy", ConstructorFragment.from({ payable: false, type: "constructor" })); } - defineReadOnly(this, "_isInterface", true); + (0, import_properties5.defineReadOnly)(this, "_isInterface", true); } format(format) { if (!format) { format = FormatTypes.full; } if (format === FormatTypes.sighash) { - logger10.throwArgumentError("interface does not support formatting sighash", "format", format); + logger7.throwArgumentError("interface does not support formatting sighash", "format", format); } const abi = this.fragments.map((fragment) => fragment.format(format)); if (format === FormatTypes.json) { @@ -161746,89 +219311,89 @@ ${bz(e, r10)}`); return defaultAbiCoder; } static getAddress(address) { - return getAddress(address); + return (0, import_address4.getAddress)(address); } static getSighash(fragment) { - return (0, import_bytes15.hexDataSlice)(id2(fragment.format()), 0, 4); + return (0, import_bytes12.hexDataSlice)(id2(fragment.format()), 0, 4); } static getEventTopic(eventFragment) { return id2(eventFragment.format()); } getFunction(nameOrSignatureOrSighash) { - if ((0, import_bytes15.isHexString)(nameOrSignatureOrSighash)) { + if ((0, import_bytes12.isHexString)(nameOrSignatureOrSighash)) { for (const name6 in this.functions) { if (nameOrSignatureOrSighash === this.getSighash(name6)) { return this.functions[name6]; } } - logger10.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash); + logger7.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash); } if (nameOrSignatureOrSighash.indexOf("(") === -1) { const name6 = nameOrSignatureOrSighash.trim(); const matching = Object.keys(this.functions).filter((f10) => f10.split("(")[0] === name6); if (matching.length === 0) { - logger10.throwArgumentError("no matching function", "name", name6); + logger7.throwArgumentError("no matching function", "name", name6); } else if (matching.length > 1) { - logger10.throwArgumentError("multiple matching functions", "name", name6); + logger7.throwArgumentError("multiple matching functions", "name", name6); } return this.functions[matching[0]]; } const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; if (!result) { - logger10.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); + logger7.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); } return result; } getEvent(nameOrSignatureOrTopic) { - if ((0, import_bytes15.isHexString)(nameOrSignatureOrTopic)) { + if ((0, import_bytes12.isHexString)(nameOrSignatureOrTopic)) { const topichash = nameOrSignatureOrTopic.toLowerCase(); for (const name6 in this.events) { if (topichash === this.getEventTopic(name6)) { return this.events[name6]; } } - logger10.throwArgumentError("no matching event", "topichash", topichash); + logger7.throwArgumentError("no matching event", "topichash", topichash); } if (nameOrSignatureOrTopic.indexOf("(") === -1) { const name6 = nameOrSignatureOrTopic.trim(); const matching = Object.keys(this.events).filter((f10) => f10.split("(")[0] === name6); if (matching.length === 0) { - logger10.throwArgumentError("no matching event", "name", name6); + logger7.throwArgumentError("no matching event", "name", name6); } else if (matching.length > 1) { - logger10.throwArgumentError("multiple matching events", "name", name6); + logger7.throwArgumentError("multiple matching events", "name", name6); } return this.events[matching[0]]; } const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()]; if (!result) { - logger10.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); + logger7.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); } return result; } getError(nameOrSignatureOrSighash) { - if ((0, import_bytes15.isHexString)(nameOrSignatureOrSighash)) { - const getSighash = getStatic(this.constructor, "getSighash"); + if ((0, import_bytes12.isHexString)(nameOrSignatureOrSighash)) { + const getSighash = (0, import_properties5.getStatic)(this.constructor, "getSighash"); for (const name6 in this.errors) { const error = this.errors[name6]; if (nameOrSignatureOrSighash === getSighash(error)) { return this.errors[name6]; } } - logger10.throwArgumentError("no matching error", "sighash", nameOrSignatureOrSighash); + logger7.throwArgumentError("no matching error", "sighash", nameOrSignatureOrSighash); } if (nameOrSignatureOrSighash.indexOf("(") === -1) { const name6 = nameOrSignatureOrSighash.trim(); const matching = Object.keys(this.errors).filter((f10) => f10.split("(")[0] === name6); if (matching.length === 0) { - logger10.throwArgumentError("no matching error", "name", name6); + logger7.throwArgumentError("no matching error", "name", name6); } else if (matching.length > 1) { - logger10.throwArgumentError("multiple matching errors", "name", name6); + logger7.throwArgumentError("multiple matching errors", "name", name6); } return this.errors[matching[0]]; } const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; if (!result) { - logger10.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); + logger7.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); } return result; } @@ -161844,13 +219409,13 @@ ${bz(e, r10)}`); } } } - return getStatic(this.constructor, "getSighash")(fragment); + return (0, import_properties5.getStatic)(this.constructor, "getSighash")(fragment); } getEventTopic(eventFragment) { if (typeof eventFragment === "string") { eventFragment = this.getEvent(eventFragment); } - return getStatic(this.constructor, "getEventTopic")(eventFragment); + return (0, import_properties5.getStatic)(this.constructor, "getEventTopic")(eventFragment); } _decodeParams(params, data) { return this._abiCoder.decode(params, data); @@ -161865,9 +219430,9 @@ ${bz(e, r10)}`); if (typeof fragment === "string") { fragment = this.getError(fragment); } - const bytes5 = (0, import_bytes15.arrayify)(data); - if ((0, import_bytes15.hexlify)(bytes5.slice(0, 4)) !== this.getSighash(fragment)) { - logger10.throwArgumentError(`data signature does not match error ${fragment.name}.`, "data", (0, import_bytes15.hexlify)(bytes5)); + const bytes5 = (0, import_bytes12.arrayify)(data); + if ((0, import_bytes12.hexlify)(bytes5.slice(0, 4)) !== this.getSighash(fragment)) { + logger7.throwArgumentError(`data signature does not match error ${fragment.name}.`, "data", (0, import_bytes12.hexlify)(bytes5)); } return this._decodeParams(fragment.inputs, bytes5.slice(4)); } @@ -161875,7 +219440,7 @@ ${bz(e, r10)}`); if (typeof fragment === "string") { fragment = this.getError(fragment); } - return (0, import_bytes15.hexlify)((0, import_bytes15.concat)([ + return (0, import_bytes12.hexlify)((0, import_bytes12.concat)([ this.getSighash(fragment), this._encodeParams(fragment.inputs, values || []) ])); @@ -161884,9 +219449,9 @@ ${bz(e, r10)}`); if (typeof functionFragment === "string") { functionFragment = this.getFunction(functionFragment); } - const bytes5 = (0, import_bytes15.arrayify)(data); - if ((0, import_bytes15.hexlify)(bytes5.slice(0, 4)) !== this.getSighash(functionFragment)) { - logger10.throwArgumentError(`data signature does not match function ${functionFragment.name}.`, "data", (0, import_bytes15.hexlify)(bytes5)); + const bytes5 = (0, import_bytes12.arrayify)(data); + if ((0, import_bytes12.hexlify)(bytes5.slice(0, 4)) !== this.getSighash(functionFragment)) { + logger7.throwArgumentError(`data signature does not match function ${functionFragment.name}.`, "data", (0, import_bytes12.hexlify)(bytes5)); } return this._decodeParams(functionFragment.inputs, bytes5.slice(4)); } @@ -161894,7 +219459,7 @@ ${bz(e, r10)}`); if (typeof functionFragment === "string") { functionFragment = this.getFunction(functionFragment); } - return (0, import_bytes15.hexlify)((0, import_bytes15.concat)([ + return (0, import_bytes12.hexlify)((0, import_bytes12.concat)([ this.getSighash(functionFragment), this._encodeParams(functionFragment.inputs, values || []) ])); @@ -161903,7 +219468,7 @@ ${bz(e, r10)}`); if (typeof functionFragment === "string") { functionFragment = this.getFunction(functionFragment); } - let bytes5 = (0, import_bytes15.arrayify)(data); + let bytes5 = (0, import_bytes12.arrayify)(data); let reason = null; let message = ""; let errorArgs = null; @@ -161917,7 +219482,7 @@ ${bz(e, r10)}`); } break; case 4: { - const selector = (0, import_bytes15.hexlify)(bytes5.slice(0, 4)); + const selector = (0, import_bytes12.hexlify)(bytes5.slice(0, 4)); const builtin = BuiltinErrors[selector]; if (builtin) { errorArgs = this._abiCoder.decode(builtin.inputs, bytes5.slice(4)); @@ -161943,9 +219508,9 @@ ${bz(e, r10)}`); break; } } - return logger10.throwError("call revert exception" + message, import_logger10.Logger.errors.CALL_EXCEPTION, { + return logger7.throwError("call revert exception" + message, import_logger7.Logger.errors.CALL_EXCEPTION, { method: functionFragment.format(), - data: (0, import_bytes15.hexlify)(data), + data: (0, import_bytes12.hexlify)(data), errorArgs, errorName, errorSignature, @@ -161956,14 +219521,14 @@ ${bz(e, r10)}`); if (typeof functionFragment === "string") { functionFragment = this.getFunction(functionFragment); } - return (0, import_bytes15.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || [])); + return (0, import_bytes12.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || [])); } encodeFilterTopics(eventFragment, values) { if (typeof eventFragment === "string") { eventFragment = this.getEvent(eventFragment); } if (values.length > eventFragment.inputs.length) { - logger10.throwError("too many arguments for " + eventFragment.format(), import_logger10.Logger.errors.UNEXPECTED_ARGUMENT, { + logger7.throwError("too many arguments for " + eventFragment.format(), import_logger7.Logger.errors.UNEXPECTED_ARGUMENT, { argument: "values", value: values }); @@ -161976,31 +219541,31 @@ ${bz(e, r10)}`); if (param.type === "string") { return id2(value); } else if (param.type === "bytes") { - return keccak256((0, import_bytes15.hexlify)(value)); + return (0, import_keccak2565.keccak256)((0, import_bytes12.hexlify)(value)); } if (param.type === "bool" && typeof value === "boolean") { value = value ? "0x01" : "0x00"; } if (param.type.match(/^u?int/)) { - value = import_bignumber6.BigNumber.from(value).toHexString(); + value = import_bignumber5.BigNumber.from(value).toHexString(); } if (param.type === "address") { this._abiCoder.encode(["address"], [value]); } - return (0, import_bytes15.hexZeroPad)((0, import_bytes15.hexlify)(value), 32); + return (0, import_bytes12.hexZeroPad)((0, import_bytes12.hexlify)(value), 32); }; values.forEach((value, index) => { let param = eventFragment.inputs[index]; if (!param.indexed) { if (value != null) { - logger10.throwArgumentError("cannot filter non-indexed parameters; must be null", "contract." + param.name, value); + logger7.throwArgumentError("cannot filter non-indexed parameters; must be null", "contract." + param.name, value); } return; } if (value == null) { topics.push(null); } else if (param.baseType === "array" || param.baseType === "tuple") { - logger10.throwArgumentError("filtering with tuples or arrays not supported", "contract." + param.name, value); + logger7.throwArgumentError("filtering with tuples or arrays not supported", "contract." + param.name, value); } else if (Array.isArray(value)) { topics.push(value.map((value2) => encodeTopic(param, value2))); } else { @@ -162023,7 +219588,7 @@ ${bz(e, r10)}`); topics.push(this.getEventTopic(eventFragment)); } if (values.length !== eventFragment.inputs.length) { - logger10.throwArgumentError("event arguments/values mismatch", "values", values); + logger7.throwArgumentError("event arguments/values mismatch", "values", values); } eventFragment.inputs.forEach((param, index) => { const value = values[index]; @@ -162031,7 +219596,7 @@ ${bz(e, r10)}`); if (param.type === "string") { topics.push(id2(value)); } else if (param.type === "bytes") { - topics.push(keccak256(value)); + topics.push((0, import_keccak2565.keccak256)(value)); } else if (param.baseType === "tuple" || param.baseType === "array") { throw new Error("not implemented"); } else { @@ -162053,8 +219618,8 @@ ${bz(e, r10)}`); } if (topics != null && !eventFragment.anonymous) { let topicHash = this.getEventTopic(eventFragment); - if (!(0, import_bytes15.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) { - logger10.throwError("fragment/topic mismatch", import_logger10.Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] }); + if (!(0, import_bytes12.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) { + logger7.throwError("fragment/topic mismatch", import_logger7.Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] }); } topics = topics.slice(1); } @@ -162075,7 +219640,7 @@ ${bz(e, r10)}`); dynamic.push(false); } }); - let resultIndexed = topics != null ? this._abiCoder.decode(indexed, (0, import_bytes15.concat)(topics)) : null; + let resultIndexed = topics != null ? this._abiCoder.decode(indexed, (0, import_bytes12.concat)(topics)) : null; let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true); let result = []; let nonIndexedIndex = 0, indexedIndex = 0; @@ -162137,7 +219702,7 @@ ${bz(e, r10)}`); name: fragment.name, signature: fragment.format(), sighash: this.getSighash(fragment), - value: import_bignumber6.BigNumber.from(tx2.value || "0") + value: import_bignumber5.BigNumber.from(tx2.value || "0") }); } parseLog(log) { @@ -162154,7 +219719,7 @@ ${bz(e, r10)}`); }); } parseError(data) { - const hexData = (0, import_bytes15.hexlify)(data); + const hexData = (0, import_bytes12.hexlify)(data); let fragment = this.getError(hexData.substring(0, 10).toLowerCase()); if (!fragment) { return null; @@ -162173,14 +219738,15 @@ ${bz(e, r10)}`); }; // ../../node_modules/@ethersproject/abstract-provider/lib.esm/index.js - var import_bignumber7 = __toESM(require_lib3()); - var import_logger11 = __toESM(require_lib()); + var import_bignumber6 = __toESM(require_lib3()); + var import_properties6 = __toESM(require_lib7()); + var import_logger8 = __toESM(require_lib()); // ../../node_modules/@ethersproject/abstract-provider/lib.esm/_version.js - var version7 = "abstract-provider/5.7.0"; + var version4 = "abstract-provider/5.7.0"; // ../../node_modules/@ethersproject/abstract-provider/lib.esm/index.js - var __awaiter4 = function(thisArg, _arguments, P, generator) { + var __awaiter3 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -162207,20 +219773,20 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger11 = new import_logger11.Logger(version7); - var ForkEvent = class extends Description { + var logger8 = new import_logger8.Logger(version4); + var ForkEvent = class extends import_properties6.Description { static isForkEvent(value) { return !!(value && value._isForkEvent); } }; var Provider = class { constructor() { - logger11.checkAbstract(new.target, Provider); - defineReadOnly(this, "_isProvider", true); + logger8.checkAbstract(new.target, Provider); + (0, import_properties6.defineReadOnly)(this, "_isProvider", true); } getFeeData() { - return __awaiter4(this, void 0, void 0, function* () { - const { block, gasPrice } = yield resolveProperties({ + return __awaiter3(this, void 0, void 0, function* () { + const { block, gasPrice } = yield (0, import_properties6.resolveProperties)({ block: this.getBlock("latest"), gasPrice: this.getGasPrice().catch((error) => { return null; @@ -162229,7 +219795,7 @@ ${bz(e, r10)}`); let lastBaseFeePerGas = null, maxFeePerGas = null, maxPriorityFeePerGas = null; if (block && block.baseFeePerGas) { lastBaseFeePerGas = block.baseFeePerGas; - maxPriorityFeePerGas = import_bignumber7.BigNumber.from("1500000000"); + maxPriorityFeePerGas = import_bignumber6.BigNumber.from("1500000000"); maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); } return { lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas, gasPrice }; @@ -162246,296 +219812,21 @@ ${bz(e, r10)}`); } }; - // ../../node_modules/@ethersproject/abstract-signer/lib.esm/index.js - var import_logger12 = __toESM(require_lib()); - - // ../../node_modules/@ethersproject/abstract-signer/lib.esm/_version.js - var version8 = "abstract-signer/5.7.0"; - - // ../../node_modules/@ethersproject/abstract-signer/lib.esm/index.js - var __awaiter5 = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var logger12 = new import_logger12.Logger(version8); - var allowedTransactionKeys = [ - "accessList", - "ccipReadEnabled", - "chainId", - "customData", - "data", - "from", - "gasLimit", - "gasPrice", - "maxFeePerGas", - "maxPriorityFeePerGas", - "nonce", - "to", - "type", - "value" - ]; - var forwardErrors = [ - import_logger12.Logger.errors.INSUFFICIENT_FUNDS, - import_logger12.Logger.errors.NONCE_EXPIRED, - import_logger12.Logger.errors.REPLACEMENT_UNDERPRICED - ]; - var Signer = class { - constructor() { - logger12.checkAbstract(new.target, Signer); - defineReadOnly(this, "_isSigner", true); - } - getBalance(blockTag) { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("getBalance"); - return yield this.provider.getBalance(this.getAddress(), blockTag); - }); - } - getTransactionCount(blockTag) { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("getTransactionCount"); - return yield this.provider.getTransactionCount(this.getAddress(), blockTag); - }); - } - estimateGas(transaction) { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("estimateGas"); - const tx2 = yield resolveProperties(this.checkTransaction(transaction)); - return yield this.provider.estimateGas(tx2); - }); - } - call(transaction, blockTag) { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("call"); - const tx2 = yield resolveProperties(this.checkTransaction(transaction)); - return yield this.provider.call(tx2, blockTag); - }); - } - sendTransaction(transaction) { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("sendTransaction"); - const tx2 = yield this.populateTransaction(transaction); - const signedTx = yield this.signTransaction(tx2); - return yield this.provider.sendTransaction(signedTx); - }); - } - getChainId() { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("getChainId"); - const network3 = yield this.provider.getNetwork(); - return network3.chainId; - }); - } - getGasPrice() { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("getGasPrice"); - return yield this.provider.getGasPrice(); - }); - } - getFeeData() { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("getFeeData"); - return yield this.provider.getFeeData(); - }); - } - resolveName(name6) { - return __awaiter5(this, void 0, void 0, function* () { - this._checkProvider("resolveName"); - return yield this.provider.resolveName(name6); - }); - } - checkTransaction(transaction) { - for (const key2 in transaction) { - if (allowedTransactionKeys.indexOf(key2) === -1) { - logger12.throwArgumentError("invalid transaction key: " + key2, "transaction", transaction); - } - } - const tx2 = shallowCopy(transaction); - if (tx2.from == null) { - tx2.from = this.getAddress(); - } else { - tx2.from = Promise.all([ - Promise.resolve(tx2.from), - this.getAddress() - ]).then((result) => { - if (result[0].toLowerCase() !== result[1].toLowerCase()) { - logger12.throwArgumentError("from address mismatch", "transaction", transaction); - } - return result[0]; - }); - } - return tx2; - } - populateTransaction(transaction) { - return __awaiter5(this, void 0, void 0, function* () { - const tx2 = yield resolveProperties(this.checkTransaction(transaction)); - if (tx2.to != null) { - tx2.to = Promise.resolve(tx2.to).then((to2) => __awaiter5(this, void 0, void 0, function* () { - if (to2 == null) { - return null; - } - const address = yield this.resolveName(to2); - if (address == null) { - logger12.throwArgumentError("provided ENS name resolves to null", "tx.to", to2); - } - return address; - })); - tx2.to.catch((error) => { - }); - } - const hasEip1559 = tx2.maxFeePerGas != null || tx2.maxPriorityFeePerGas != null; - if (tx2.gasPrice != null && (tx2.type === 2 || hasEip1559)) { - logger12.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); - } else if ((tx2.type === 0 || tx2.type === 1) && hasEip1559) { - logger12.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction); - } - if ((tx2.type === 2 || tx2.type == null) && (tx2.maxFeePerGas != null && tx2.maxPriorityFeePerGas != null)) { - tx2.type = 2; - } else if (tx2.type === 0 || tx2.type === 1) { - if (tx2.gasPrice == null) { - tx2.gasPrice = this.getGasPrice(); - } - } else { - const feeData = yield this.getFeeData(); - if (tx2.type == null) { - if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) { - tx2.type = 2; - if (tx2.gasPrice != null) { - const gasPrice = tx2.gasPrice; - delete tx2.gasPrice; - tx2.maxFeePerGas = gasPrice; - tx2.maxPriorityFeePerGas = gasPrice; - } else { - if (tx2.maxFeePerGas == null) { - tx2.maxFeePerGas = feeData.maxFeePerGas; - } - if (tx2.maxPriorityFeePerGas == null) { - tx2.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; - } - } - } else if (feeData.gasPrice != null) { - if (hasEip1559) { - logger12.throwError("network does not support EIP-1559", import_logger12.Logger.errors.UNSUPPORTED_OPERATION, { - operation: "populateTransaction" - }); - } - if (tx2.gasPrice == null) { - tx2.gasPrice = feeData.gasPrice; - } - tx2.type = 0; - } else { - logger12.throwError("failed to get consistent fee data", import_logger12.Logger.errors.UNSUPPORTED_OPERATION, { - operation: "signer.getFeeData" - }); - } - } else if (tx2.type === 2) { - if (tx2.maxFeePerGas == null) { - tx2.maxFeePerGas = feeData.maxFeePerGas; - } - if (tx2.maxPriorityFeePerGas == null) { - tx2.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas; - } - } - } - if (tx2.nonce == null) { - tx2.nonce = this.getTransactionCount("pending"); - } - if (tx2.gasLimit == null) { - tx2.gasLimit = this.estimateGas(tx2).catch((error) => { - if (forwardErrors.indexOf(error.code) >= 0) { - throw error; - } - return logger12.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", import_logger12.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { - error, - tx: tx2 - }); - }); - } - if (tx2.chainId == null) { - tx2.chainId = this.getChainId(); - } else { - tx2.chainId = Promise.all([ - Promise.resolve(tx2.chainId), - this.getChainId() - ]).then((results) => { - if (results[1] !== 0 && results[0] !== results[1]) { - logger12.throwArgumentError("chainId address mismatch", "transaction", transaction); - } - return results[0]; - }); - } - return yield resolveProperties(tx2); - }); - } - _checkProvider(operation) { - if (!this.provider) { - logger12.throwError("missing provider", import_logger12.Logger.errors.UNSUPPORTED_OPERATION, { - operation: operation || "_checkProvider" - }); - } - } - static isSigner(value) { - return !!(value && value._isSigner); - } - }; - var VoidSigner = class extends Signer { - constructor(address, provider) { - super(); - defineReadOnly(this, "address", address); - defineReadOnly(this, "provider", provider || null); - } - getAddress() { - return Promise.resolve(this.address); - } - _fail(message, operation) { - return Promise.resolve().then(() => { - logger12.throwError(message, import_logger12.Logger.errors.UNSUPPORTED_OPERATION, { operation }); - }); - } - signMessage(message) { - return this._fail("VoidSigner cannot sign messages", "signMessage"); - } - signTransaction(transaction) { - return this._fail("VoidSigner cannot sign transactions", "signTransaction"); - } - _signTypedData(domain, types2, value) { - return this._fail("VoidSigner cannot sign typed data", "signTypedData"); - } - connect(provider) { - return new VoidSigner(this.address, provider); - } - }; - // node_modules/@ethersproject/contracts/lib.esm/index.js - var import_bignumber9 = __toESM(require_lib3()); - var import_bytes18 = __toESM(require_lib2()); + var import_abstract_signer = __toESM(require_lib11()); + var import_address6 = __toESM(require_lib10()); + var import_bignumber8 = __toESM(require_lib3()); + var import_bytes15 = __toESM(require_lib2()); + var import_properties9 = __toESM(require_lib7()); // ../../node_modules/@ethersproject/transactions/lib.esm/index.js - var import_bignumber8 = __toESM(require_lib3()); - var import_bytes17 = __toESM(require_lib2()); + var import_address5 = __toESM(require_lib10()); + var import_bignumber7 = __toESM(require_lib3()); + var import_bytes14 = __toESM(require_lib2()); var import_constants2 = __toESM(require_lib5()); + var import_keccak2566 = __toESM(require_lib8()); + var import_properties8 = __toESM(require_lib7()); + var RLP = __toESM(require_lib9()); // ../../node_modules/@ethersproject/signing-key/lib.esm/elliptic.js var import_bn = __toESM(require_bn8()); @@ -162943,14 +220234,14 @@ ${bz(e, r10)}`); BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { return this.encode(enc, true); }; - BasePoint.prototype._encode = function _encode2(compact) { + BasePoint.prototype._encode = function _encode(compact) { var len = this.curve.p.byteLength(); var x = this.getX().toArray("be", len); if (compact) return [this.getY().isEven() ? 2 : 3].concat(x); return [4].concat(x, this.getY().toArray("be", len)); }; - BasePoint.prototype.encode = function encode3(enc, compact) { + BasePoint.prototype.encode = function encode2(enc, compact) { return utils_1$1.encode(this._encode(compact), enc); }; BasePoint.prototype.precompute = function precompute(power) { @@ -164392,14 +221683,15 @@ ${bz(e, r10)}`); var EC$1 = elliptic_1.ec; // ../../node_modules/@ethersproject/signing-key/lib.esm/index.js - var import_bytes16 = __toESM(require_lib2()); - var import_logger13 = __toESM(require_lib()); + var import_bytes13 = __toESM(require_lib2()); + var import_properties7 = __toESM(require_lib7()); + var import_logger9 = __toESM(require_lib()); // ../../node_modules/@ethersproject/signing-key/lib.esm/_version.js - var version9 = "signing-key/5.7.0"; + var version5 = "signing-key/5.7.0"; // ../../node_modules/@ethersproject/signing-key/lib.esm/index.js - var logger13 = new import_logger13.Logger(version9); + var logger9 = new import_logger9.Logger(version5); var _curve = null; function getCurve() { if (!_curve) { @@ -164409,50 +221701,50 @@ ${bz(e, r10)}`); } var SigningKey = class { constructor(privateKey) { - defineReadOnly(this, "curve", "secp256k1"); - defineReadOnly(this, "privateKey", (0, import_bytes16.hexlify)(privateKey)); - if ((0, import_bytes16.hexDataLength)(this.privateKey) !== 32) { - logger13.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]"); + (0, import_properties7.defineReadOnly)(this, "curve", "secp256k1"); + (0, import_properties7.defineReadOnly)(this, "privateKey", (0, import_bytes13.hexlify)(privateKey)); + if ((0, import_bytes13.hexDataLength)(this.privateKey) !== 32) { + logger9.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]"); } - const keyPair2 = getCurve().keyFromPrivate((0, import_bytes16.arrayify)(this.privateKey)); - defineReadOnly(this, "publicKey", "0x" + keyPair2.getPublic(false, "hex")); - defineReadOnly(this, "compressedPublicKey", "0x" + keyPair2.getPublic(true, "hex")); - defineReadOnly(this, "_isSigningKey", true); + const keyPair2 = getCurve().keyFromPrivate((0, import_bytes13.arrayify)(this.privateKey)); + (0, import_properties7.defineReadOnly)(this, "publicKey", "0x" + keyPair2.getPublic(false, "hex")); + (0, import_properties7.defineReadOnly)(this, "compressedPublicKey", "0x" + keyPair2.getPublic(true, "hex")); + (0, import_properties7.defineReadOnly)(this, "_isSigningKey", true); } _addPoint(other) { - const p02 = getCurve().keyFromPublic((0, import_bytes16.arrayify)(this.publicKey)); - const p12 = getCurve().keyFromPublic((0, import_bytes16.arrayify)(other)); + const p02 = getCurve().keyFromPublic((0, import_bytes13.arrayify)(this.publicKey)); + const p12 = getCurve().keyFromPublic((0, import_bytes13.arrayify)(other)); return "0x" + p02.pub.add(p12.pub).encodeCompressed("hex"); } signDigest(digest) { - const keyPair2 = getCurve().keyFromPrivate((0, import_bytes16.arrayify)(this.privateKey)); - const digestBytes = (0, import_bytes16.arrayify)(digest); + const keyPair2 = getCurve().keyFromPrivate((0, import_bytes13.arrayify)(this.privateKey)); + const digestBytes = (0, import_bytes13.arrayify)(digest); if (digestBytes.length !== 32) { - logger13.throwArgumentError("bad digest length", "digest", digest); + logger9.throwArgumentError("bad digest length", "digest", digest); } const signature2 = keyPair2.sign(digestBytes, { canonical: true }); - return (0, import_bytes16.splitSignature)({ + return (0, import_bytes13.splitSignature)({ recoveryParam: signature2.recoveryParam, - r: (0, import_bytes16.hexZeroPad)("0x" + signature2.r.toString(16), 32), - s: (0, import_bytes16.hexZeroPad)("0x" + signature2.s.toString(16), 32) + r: (0, import_bytes13.hexZeroPad)("0x" + signature2.r.toString(16), 32), + s: (0, import_bytes13.hexZeroPad)("0x" + signature2.s.toString(16), 32) }); } computeSharedSecret(otherKey) { - const keyPair2 = getCurve().keyFromPrivate((0, import_bytes16.arrayify)(this.privateKey)); - const otherKeyPair = getCurve().keyFromPublic((0, import_bytes16.arrayify)(computePublicKey(otherKey))); - return (0, import_bytes16.hexZeroPad)("0x" + keyPair2.derive(otherKeyPair.getPublic()).toString(16), 32); + const keyPair2 = getCurve().keyFromPrivate((0, import_bytes13.arrayify)(this.privateKey)); + const otherKeyPair = getCurve().keyFromPublic((0, import_bytes13.arrayify)(computePublicKey(otherKey))); + return (0, import_bytes13.hexZeroPad)("0x" + keyPair2.derive(otherKeyPair.getPublic()).toString(16), 32); } static isSigningKey(value) { return !!(value && value._isSigningKey); } }; function recoverPublicKey(digest, signature2) { - const sig = (0, import_bytes16.splitSignature)(signature2); - const rs2 = { r: (0, import_bytes16.arrayify)(sig.r), s: (0, import_bytes16.arrayify)(sig.s) }; - return "0x" + getCurve().recoverPubKey((0, import_bytes16.arrayify)(digest), rs2, sig.recoveryParam).encode("hex", false); + const sig = (0, import_bytes13.splitSignature)(signature2); + const rs2 = { r: (0, import_bytes13.arrayify)(sig.r), s: (0, import_bytes13.arrayify)(sig.s) }; + return "0x" + getCurve().recoverPubKey((0, import_bytes13.arrayify)(digest), rs2, sig.recoveryParam).encode("hex", false); } function computePublicKey(key2, compressed) { - const bytes5 = (0, import_bytes16.arrayify)(key2); + const bytes5 = (0, import_bytes13.arrayify)(key2); if (bytes5.length === 32) { const signingKey = new SigningKey(bytes5); if (compressed) { @@ -164461,26 +221753,26 @@ ${bz(e, r10)}`); return signingKey.publicKey; } else if (bytes5.length === 33) { if (compressed) { - return (0, import_bytes16.hexlify)(bytes5); + return (0, import_bytes13.hexlify)(bytes5); } return "0x" + getCurve().keyFromPublic(bytes5).getPublic(false, "hex"); } else if (bytes5.length === 65) { if (!compressed) { - return (0, import_bytes16.hexlify)(bytes5); + return (0, import_bytes13.hexlify)(bytes5); } return "0x" + getCurve().keyFromPublic(bytes5).getPublic(true, "hex"); } - return logger13.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); + return logger9.throwArgumentError("invalid public or private key", "key", "[REDACTED]"); } // ../../node_modules/@ethersproject/transactions/lib.esm/index.js - var import_logger14 = __toESM(require_lib()); + var import_logger10 = __toESM(require_lib()); // ../../node_modules/@ethersproject/transactions/lib.esm/_version.js - var version10 = "transactions/5.7.0"; + var version6 = "transactions/5.7.0"; // ../../node_modules/@ethersproject/transactions/lib.esm/index.js - var logger14 = new import_logger14.Logger(version10); + var logger10 = new import_logger10.Logger(version6); var TransactionTypes; (function(TransactionTypes2) { TransactionTypes2[TransactionTypes2["legacy"] = 0] = "legacy"; @@ -164491,13 +221783,13 @@ ${bz(e, r10)}`); if (value === "0x") { return null; } - return getAddress(value); + return (0, import_address5.getAddress)(value); } function handleNumber(value) { if (value === "0x") { return import_constants2.Zero; } - return import_bignumber8.BigNumber.from(value); + return import_bignumber7.BigNumber.from(value); } var transactionFields = [ { name: "nonce", maxLength: 32, numeric: true }, @@ -164507,7 +221799,7 @@ ${bz(e, r10)}`); { name: "value", maxLength: 32, numeric: true }, { name: "data" } ]; - var allowedTransactionKeys2 = { + var allowedTransactionKeys = { chainId: true, data: true, gasLimit: true, @@ -164519,24 +221811,24 @@ ${bz(e, r10)}`); }; function computeAddress(key2) { const publicKey = computePublicKey(key2); - return getAddress((0, import_bytes17.hexDataSlice)(keccak256((0, import_bytes17.hexDataSlice)(publicKey, 1)), 12)); + return (0, import_address5.getAddress)((0, import_bytes14.hexDataSlice)((0, import_keccak2566.keccak256)((0, import_bytes14.hexDataSlice)(publicKey, 1)), 12)); } function recoverAddress(digest, signature2) { - return computeAddress(recoverPublicKey((0, import_bytes17.arrayify)(digest), signature2)); + return computeAddress(recoverPublicKey((0, import_bytes14.arrayify)(digest), signature2)); } function formatNumber(value, name6) { - const result = (0, import_bytes17.stripZeros)(import_bignumber8.BigNumber.from(value).toHexString()); + const result = (0, import_bytes14.stripZeros)(import_bignumber7.BigNumber.from(value).toHexString()); if (result.length > 32) { - logger14.throwArgumentError("invalid length for " + name6, "transaction:" + name6, value); + logger10.throwArgumentError("invalid length for " + name6, "transaction:" + name6, value); } return result; } function accessSetify(addr, storageKeys) { return { - address: getAddress(addr), + address: (0, import_address5.getAddress)(addr), storageKeys: (storageKeys || []).map((storageKey, index) => { - if ((0, import_bytes17.hexDataLength)(storageKey) !== 32) { - logger14.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey); + if ((0, import_bytes14.hexDataLength)(storageKey) !== 32) { + logger10.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey); } return storageKey.toLowerCase(); }) @@ -164547,7 +221839,7 @@ ${bz(e, r10)}`); return value.map((set2, index) => { if (Array.isArray(set2)) { if (set2.length > 2) { - logger14.throwArgumentError("access list expected to be [ address, storageKeys[] ]", `value[${index}]`, set2); + logger10.throwArgumentError("access list expected to be [ address, storageKeys[] ]", `value[${index}]`, set2); } return accessSetify(set2[0], set2[1]); } @@ -164569,10 +221861,10 @@ ${bz(e, r10)}`); } function _serializeEip1559(transaction, signature2) { if (transaction.gasPrice != null) { - const gasPrice = import_bignumber8.BigNumber.from(transaction.gasPrice); - const maxFeePerGas = import_bignumber8.BigNumber.from(transaction.maxFeePerGas || 0); + const gasPrice = import_bignumber7.BigNumber.from(transaction.gasPrice); + const maxFeePerGas = import_bignumber7.BigNumber.from(transaction.maxFeePerGas || 0); if (!gasPrice.eq(maxFeePerGas)) { - logger14.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { + logger10.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", { gasPrice, maxFeePerGas }); @@ -164584,18 +221876,18 @@ ${bz(e, r10)}`); formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"), formatNumber(transaction.gasLimit || 0, "gasLimit"), - transaction.to != null ? getAddress(transaction.to) : "0x", + transaction.to != null ? (0, import_address5.getAddress)(transaction.to) : "0x", formatNumber(transaction.value || 0, "value"), transaction.data || "0x", formatAccessList(transaction.accessList || []) ]; if (signature2) { - const sig = (0, import_bytes17.splitSignature)(signature2); + const sig = (0, import_bytes14.splitSignature)(signature2); fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); - fields.push((0, import_bytes17.stripZeros)(sig.r)); - fields.push((0, import_bytes17.stripZeros)(sig.s)); + fields.push((0, import_bytes14.stripZeros)(sig.r)); + fields.push((0, import_bytes14.stripZeros)(sig.s)); } - return (0, import_bytes17.hexConcat)(["0x02", encode(fields)]); + return (0, import_bytes14.hexConcat)(["0x02", RLP.encode(fields)]); } function _serializeEip2930(transaction, signature2) { const fields = [ @@ -164603,21 +221895,21 @@ ${bz(e, r10)}`); formatNumber(transaction.nonce || 0, "nonce"), formatNumber(transaction.gasPrice || 0, "gasPrice"), formatNumber(transaction.gasLimit || 0, "gasLimit"), - transaction.to != null ? getAddress(transaction.to) : "0x", + transaction.to != null ? (0, import_address5.getAddress)(transaction.to) : "0x", formatNumber(transaction.value || 0, "value"), transaction.data || "0x", formatAccessList(transaction.accessList || []) ]; if (signature2) { - const sig = (0, import_bytes17.splitSignature)(signature2); + const sig = (0, import_bytes14.splitSignature)(signature2); fields.push(formatNumber(sig.recoveryParam, "recoveryParam")); - fields.push((0, import_bytes17.stripZeros)(sig.r)); - fields.push((0, import_bytes17.stripZeros)(sig.s)); + fields.push((0, import_bytes14.stripZeros)(sig.r)); + fields.push((0, import_bytes14.stripZeros)(sig.s)); } - return (0, import_bytes17.hexConcat)(["0x01", encode(fields)]); + return (0, import_bytes14.hexConcat)(["0x01", RLP.encode(fields)]); } function _serialize(transaction, signature2) { - checkProperties(transaction, allowedTransactionKeys2); + (0, import_properties8.checkProperties)(transaction, allowedTransactionKeys); const raw = []; transactionFields.forEach(function(fieldInfo) { let value = transaction[fieldInfo.name] || []; @@ -164625,36 +221917,36 @@ ${bz(e, r10)}`); if (fieldInfo.numeric) { options.hexPad = "left"; } - value = (0, import_bytes17.arrayify)((0, import_bytes17.hexlify)(value, options)); + value = (0, import_bytes14.arrayify)((0, import_bytes14.hexlify)(value, options)); if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) { - logger14.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); + logger10.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); } if (fieldInfo.maxLength) { - value = (0, import_bytes17.stripZeros)(value); + value = (0, import_bytes14.stripZeros)(value); if (value.length > fieldInfo.maxLength) { - logger14.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); + logger10.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value); } } - raw.push((0, import_bytes17.hexlify)(value)); + raw.push((0, import_bytes14.hexlify)(value)); }); let chainId = 0; if (transaction.chainId != null) { chainId = transaction.chainId; if (typeof chainId !== "number") { - logger14.throwArgumentError("invalid transaction.chainId", "transaction", transaction); + logger10.throwArgumentError("invalid transaction.chainId", "transaction", transaction); } - } else if (signature2 && !(0, import_bytes17.isBytesLike)(signature2) && signature2.v > 28) { + } else if (signature2 && !(0, import_bytes14.isBytesLike)(signature2) && signature2.v > 28) { chainId = Math.floor((signature2.v - 35) / 2); } if (chainId !== 0) { - raw.push((0, import_bytes17.hexlify)(chainId)); + raw.push((0, import_bytes14.hexlify)(chainId)); raw.push("0x"); raw.push("0x"); } if (!signature2) { - return encode(raw); + return RLP.encode(raw); } - const sig = (0, import_bytes17.splitSignature)(signature2); + const sig = (0, import_bytes14.splitSignature)(signature2); let v = 27 + sig.recoveryParam; if (chainId !== 0) { raw.pop(); @@ -164662,20 +221954,20 @@ ${bz(e, r10)}`); raw.pop(); v += chainId * 2 + 8; if (sig.v > 28 && sig.v !== v) { - logger14.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature2); + logger10.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature2); } } else if (sig.v !== v) { - logger14.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature2); + logger10.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature2); } - raw.push((0, import_bytes17.hexlify)(v)); - raw.push((0, import_bytes17.stripZeros)((0, import_bytes17.arrayify)(sig.r))); - raw.push((0, import_bytes17.stripZeros)((0, import_bytes17.arrayify)(sig.s))); - return encode(raw); + raw.push((0, import_bytes14.hexlify)(v)); + raw.push((0, import_bytes14.stripZeros)((0, import_bytes14.arrayify)(sig.r))); + raw.push((0, import_bytes14.stripZeros)((0, import_bytes14.arrayify)(sig.s))); + return RLP.encode(raw); } function serialize(transaction, signature2) { if (transaction.type == null || transaction.type === 0) { if (transaction.accessList != null) { - logger14.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); + logger10.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); } return _serialize(transaction, signature2); } @@ -164687,7 +221979,7 @@ ${bz(e, r10)}`); default: break; } - return logger14.throwError(`unsupported transaction type: ${transaction.type}`, import_logger14.Logger.errors.UNSUPPORTED_OPERATION, { + return logger10.throwError(`unsupported transaction type: ${transaction.type}`, import_logger10.Logger.errors.UNSUPPORTED_OPERATION, { operation: "serializeTransaction", transactionType: transaction.type }); @@ -164700,20 +221992,20 @@ ${bz(e, r10)}`); } tx2.v = recid; } catch (error) { - logger14.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); + logger10.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]); } - tx2.r = (0, import_bytes17.hexZeroPad)(fields[1], 32); - tx2.s = (0, import_bytes17.hexZeroPad)(fields[2], 32); + tx2.r = (0, import_bytes14.hexZeroPad)(fields[1], 32); + tx2.s = (0, import_bytes14.hexZeroPad)(fields[2], 32); try { - const digest = keccak256(serialize3(tx2)); + const digest = (0, import_keccak2566.keccak256)(serialize3(tx2)); tx2.from = recoverAddress(digest, { r: tx2.r, s: tx2.s, recoveryParam: tx2.v }); } catch (error) { } } function _parseEip1559(payload) { - const transaction = decode(payload.slice(1)); + const transaction = RLP.decode(payload.slice(1)); if (transaction.length !== 9 && transaction.length !== 12) { - logger14.throwArgumentError("invalid component count for transaction type: 2", "payload", (0, import_bytes17.hexlify)(payload)); + logger10.throwArgumentError("invalid component count for transaction type: 2", "payload", (0, import_bytes14.hexlify)(payload)); } const maxPriorityFeePerGas = handleNumber(transaction[2]); const maxFeePerGas = handleNumber(transaction[3]); @@ -164733,14 +222025,14 @@ ${bz(e, r10)}`); if (transaction.length === 9) { return tx2; } - tx2.hash = keccak256(payload); + tx2.hash = (0, import_keccak2566.keccak256)(payload); _parseEipSignature(tx2, transaction.slice(9), _serializeEip1559); return tx2; } function _parseEip2930(payload) { - const transaction = decode(payload.slice(1)); + const transaction = RLP.decode(payload.slice(1)); if (transaction.length !== 8 && transaction.length !== 11) { - logger14.throwArgumentError("invalid component count for transaction type: 1", "payload", (0, import_bytes17.hexlify)(payload)); + logger10.throwArgumentError("invalid component count for transaction type: 1", "payload", (0, import_bytes14.hexlify)(payload)); } const tx2 = { type: 1, @@ -164756,14 +222048,14 @@ ${bz(e, r10)}`); if (transaction.length === 8) { return tx2; } - tx2.hash = keccak256(payload); + tx2.hash = (0, import_keccak2566.keccak256)(payload); _parseEipSignature(tx2, transaction.slice(8), _serializeEip2930); return tx2; } function _parse(rawTransaction) { - const transaction = decode(rawTransaction); + const transaction = RLP.decode(rawTransaction); if (transaction.length !== 9 && transaction.length !== 6) { - logger14.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); + logger10.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction); } const tx2 = { nonce: handleNumber(transaction[0]).toNumber(), @@ -164778,13 +222070,13 @@ ${bz(e, r10)}`); return tx2; } try { - tx2.v = import_bignumber8.BigNumber.from(transaction[6]).toNumber(); + tx2.v = import_bignumber7.BigNumber.from(transaction[6]).toNumber(); } catch (error) { return tx2; } - tx2.r = (0, import_bytes17.hexZeroPad)(transaction[7], 32); - tx2.s = (0, import_bytes17.hexZeroPad)(transaction[8], 32); - if (import_bignumber8.BigNumber.from(tx2.r).isZero() && import_bignumber8.BigNumber.from(tx2.s).isZero()) { + tx2.r = (0, import_bytes14.hexZeroPad)(transaction[7], 32); + tx2.s = (0, import_bytes14.hexZeroPad)(transaction[8], 32); + if (import_bignumber7.BigNumber.from(tx2.r).isZero() && import_bignumber7.BigNumber.from(tx2.s).isZero()) { tx2.chainId = tx2.v; tx2.v = 0; } else { @@ -164795,23 +222087,23 @@ ${bz(e, r10)}`); let recoveryParam = tx2.v - 27; const raw = transaction.slice(0, 6); if (tx2.chainId !== 0) { - raw.push((0, import_bytes17.hexlify)(tx2.chainId)); + raw.push((0, import_bytes14.hexlify)(tx2.chainId)); raw.push("0x"); raw.push("0x"); recoveryParam -= tx2.chainId * 2 + 8; } - const digest = keccak256(encode(raw)); + const digest = (0, import_keccak2566.keccak256)(RLP.encode(raw)); try { - tx2.from = recoverAddress(digest, { r: (0, import_bytes17.hexlify)(tx2.r), s: (0, import_bytes17.hexlify)(tx2.s), recoveryParam }); + tx2.from = recoverAddress(digest, { r: (0, import_bytes14.hexlify)(tx2.r), s: (0, import_bytes14.hexlify)(tx2.s), recoveryParam }); } catch (error) { } - tx2.hash = keccak256(rawTransaction); + tx2.hash = (0, import_keccak2566.keccak256)(rawTransaction); } tx2.type = null; return tx2; } function parse(rawTransaction) { - const payload = (0, import_bytes17.arrayify)(rawTransaction); + const payload = (0, import_bytes14.arrayify)(rawTransaction); if (payload[0] > 127) { return _parse(payload); } @@ -164823,20 +222115,20 @@ ${bz(e, r10)}`); default: break; } - return logger14.throwError(`unsupported transaction type: ${payload[0]}`, import_logger14.Logger.errors.UNSUPPORTED_OPERATION, { + return logger10.throwError(`unsupported transaction type: ${payload[0]}`, import_logger10.Logger.errors.UNSUPPORTED_OPERATION, { operation: "parseTransaction", transactionType: payload[0] }); } // node_modules/@ethersproject/contracts/lib.esm/index.js - var import_logger15 = __toESM(require_lib()); + var import_logger11 = __toESM(require_lib()); // node_modules/@ethersproject/contracts/lib.esm/_version.js - var version11 = "contracts/5.7.0"; + var version7 = "contracts/5.7.0"; // node_modules/@ethersproject/contracts/lib.esm/index.js - var __awaiter6 = function(thisArg, _arguments, P, generator) { + var __awaiter4 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -164863,8 +222155,8 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger15 = new import_logger15.Logger(version11); - var allowedTransactionKeys3 = { + var logger11 = new import_logger11.Logger(version7); + var allowedTransactionKeys2 = { chainId: true, data: true, from: true, @@ -164881,29 +222173,29 @@ ${bz(e, r10)}`); ccipReadEnabled: true }; function resolveName(resolver, nameOrPromise) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter4(this, void 0, void 0, function* () { const name6 = yield nameOrPromise; if (typeof name6 !== "string") { - logger15.throwArgumentError("invalid address or ENS name", "name", name6); + logger11.throwArgumentError("invalid address or ENS name", "name", name6); } try { - return getAddress(name6); + return (0, import_address6.getAddress)(name6); } catch (error) { } if (!resolver) { - logger15.throwError("a provider or signer is needed to resolve ENS names", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError("a provider or signer is needed to resolve ENS names", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "resolveName" }); } const address = yield resolver.resolveName(name6); if (address == null) { - logger15.throwArgumentError("resolver or addr is not configured for ENS name", "name", name6); + logger11.throwArgumentError("resolver or addr is not configured for ENS name", "name", name6); } return address; }); } function resolveAddresses(resolver, value, paramType) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter4(this, void 0, void 0, function* () { if (Array.isArray(paramType)) { return yield Promise.all(paramType.map((paramType2, index) => { return resolveAddresses(resolver, Array.isArray(value) ? value[index] : value[paramType2.name], paramType2); @@ -164917,7 +222209,7 @@ ${bz(e, r10)}`); } if (paramType.baseType === "array") { if (!Array.isArray(value)) { - return Promise.reject(logger15.makeError("invalid value for array", import_logger15.Logger.errors.INVALID_ARGUMENT, { + return Promise.reject(logger11.makeError("invalid value for array", import_logger11.Logger.errors.INVALID_ARGUMENT, { argument: "value", value })); @@ -164928,20 +222220,20 @@ ${bz(e, r10)}`); }); } function populateTransaction(contract, fragment, args) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter4(this, void 0, void 0, function* () { let overrides = {}; if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === "object") { - overrides = shallowCopy(args.pop()); + overrides = (0, import_properties9.shallowCopy)(args.pop()); } - logger15.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract"); + logger11.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract"); if (contract.signer) { if (overrides.from) { - overrides.from = resolveProperties({ + overrides.from = (0, import_properties9.resolveProperties)({ override: resolveName(contract.signer, overrides.from), signer: contract.signer.getAddress() - }).then((check) => __awaiter6(this, void 0, void 0, function* () { - if (getAddress(check.signer) !== check.override) { - logger15.throwError("Contract with a Signer cannot override from", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + }).then((check) => __awaiter4(this, void 0, void 0, function* () { + if ((0, import_address6.getAddress)(check.signer) !== check.override) { + logger11.throwError("Contract with a Signer cannot override from", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "overrides.from" }); } @@ -164953,10 +222245,10 @@ ${bz(e, r10)}`); } else if (overrides.from) { overrides.from = resolveName(contract.provider, overrides.from); } - const resolved = yield resolveProperties({ + const resolved = yield (0, import_properties9.resolveProperties)({ args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs), address: contract.resolvedAddress, - overrides: resolveProperties(overrides) || {} + overrides: (0, import_properties9.resolveProperties)(overrides) || {} }); const data = contract.interface.encodeFunctionData(fragment, resolved.args); const tx2 = { @@ -164965,19 +222257,19 @@ ${bz(e, r10)}`); }; const ro2 = resolved.overrides; if (ro2.nonce != null) { - tx2.nonce = import_bignumber9.BigNumber.from(ro2.nonce).toNumber(); + tx2.nonce = import_bignumber8.BigNumber.from(ro2.nonce).toNumber(); } if (ro2.gasLimit != null) { - tx2.gasLimit = import_bignumber9.BigNumber.from(ro2.gasLimit); + tx2.gasLimit = import_bignumber8.BigNumber.from(ro2.gasLimit); } if (ro2.gasPrice != null) { - tx2.gasPrice = import_bignumber9.BigNumber.from(ro2.gasPrice); + tx2.gasPrice = import_bignumber8.BigNumber.from(ro2.gasPrice); } if (ro2.maxFeePerGas != null) { - tx2.maxFeePerGas = import_bignumber9.BigNumber.from(ro2.maxFeePerGas); + tx2.maxFeePerGas = import_bignumber8.BigNumber.from(ro2.maxFeePerGas); } if (ro2.maxPriorityFeePerGas != null) { - tx2.maxPriorityFeePerGas = import_bignumber9.BigNumber.from(ro2.maxPriorityFeePerGas); + tx2.maxPriorityFeePerGas = import_bignumber8.BigNumber.from(ro2.maxPriorityFeePerGas); } if (ro2.from != null) { tx2.from = ro2.from; @@ -164990,19 +222282,19 @@ ${bz(e, r10)}`); } if (tx2.gasLimit == null && fragment.gas != null) { let intrinsic = 21e3; - const bytes5 = (0, import_bytes18.arrayify)(data); + const bytes5 = (0, import_bytes15.arrayify)(data); for (let i = 0; i < bytes5.length; i++) { intrinsic += 4; if (bytes5[i]) { intrinsic += 64; } } - tx2.gasLimit = import_bignumber9.BigNumber.from(fragment.gas).add(intrinsic); + tx2.gasLimit = import_bignumber8.BigNumber.from(fragment.gas).add(intrinsic); } if (ro2.value) { - const roValue = import_bignumber9.BigNumber.from(ro2.value); + const roValue = import_bignumber8.BigNumber.from(ro2.value); if (!roValue.isZero() && !fragment.payable) { - logger15.throwError("non-payable method cannot override value", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError("non-payable method cannot override value", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "overrides.value", value: overrides.value }); @@ -165010,7 +222302,7 @@ ${bz(e, r10)}`); tx2.value = roValue; } if (ro2.customData) { - tx2.customData = shallowCopy(ro2.customData); + tx2.customData = (0, import_properties9.shallowCopy)(ro2.customData); } if (ro2.ccipReadEnabled) { tx2.ccipReadEnabled = !!ro2.ccipReadEnabled; @@ -165028,7 +222320,7 @@ ${bz(e, r10)}`); delete overrides.ccipReadEnabled; const leftovers = Object.keys(overrides).filter((key2) => overrides[key2] != null); if (leftovers.length) { - logger15.throwError(`cannot override ${leftovers.map((l15) => JSON.stringify(l15)).join(",")}`, import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError(`cannot override ${leftovers.map((l15) => JSON.stringify(l15)).join(",")}`, import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "overrides", overrides: leftovers }); @@ -165044,9 +222336,9 @@ ${bz(e, r10)}`); function buildEstimate(contract, fragment) { const signerOrProvider = contract.signer || contract.provider; return function(...args) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter4(this, void 0, void 0, function* () { if (!signerOrProvider) { - logger15.throwError("estimate require a provider or signer", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError("estimate require a provider or signer", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "estimateGas" }); } @@ -165060,7 +222352,7 @@ ${bz(e, r10)}`); tx2.wait = (confirmations) => { return wait(confirmations).then((receipt) => { receipt.events = receipt.logs.map((log) => { - let event = deepCopy(log); + let event = (0, import_properties9.deepCopy)(log); let parsed = null; try { parsed = contract.interface.parseLog(log); @@ -165095,10 +222387,10 @@ ${bz(e, r10)}`); function buildCall(contract, fragment, collapseSimple) { const signerOrProvider = contract.signer || contract.provider; return function(...args) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter4(this, void 0, void 0, function* () { let blockTag = void 0; if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === "object") { - const overrides = shallowCopy(args.pop()); + const overrides = (0, import_properties9.shallowCopy)(args.pop()); if (overrides.blockTag != null) { blockTag = yield overrides.blockTag; } @@ -165117,7 +222409,7 @@ ${bz(e, r10)}`); } return value; } catch (error) { - if (error.code === import_logger15.Logger.errors.CALL_EXCEPTION) { + if (error.code === import_logger11.Logger.errors.CALL_EXCEPTION) { error.address = contract.address; error.args = args; error.transaction = tx2; @@ -165129,9 +222421,9 @@ ${bz(e, r10)}`); } function buildSend(contract, fragment) { return function(...args) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter4(this, void 0, void 0, function* () { if (!contract.signer) { - logger15.throwError("sending a transaction requires a signer", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError("sending a transaction requires a signer", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction" }); } @@ -165164,8 +222456,8 @@ ${bz(e, r10)}`); } var RunningEvent = class { constructor(tag, filter) { - defineReadOnly(this, "tag", tag); - defineReadOnly(this, "filter", filter); + (0, import_properties9.defineReadOnly)(this, "tag", tag); + (0, import_properties9.defineReadOnly)(this, "filter", filter); this._listeners = []; } addListener(listener, once) { @@ -165220,16 +222512,16 @@ ${bz(e, r10)}`); let topic = contractInterface.getEventTopic(fragment); if (topics) { if (topic !== topics[0]) { - logger15.throwArgumentError("topic mismatch", "topics", topics); + logger11.throwArgumentError("topic mismatch", "topics", topics); } filter.topics = topics.slice(); } else { filter.topics = [topic]; } super(getEventTag(filter), filter); - defineReadOnly(this, "address", address); - defineReadOnly(this, "interface", contractInterface); - defineReadOnly(this, "fragment", fragment); + (0, import_properties9.defineReadOnly)(this, "address", address); + (0, import_properties9.defineReadOnly)(this, "interface", contractInterface); + (0, import_properties9.defineReadOnly)(this, "fragment", fragment); } prepareEvent(event) { super.prepareEvent(event); @@ -165258,8 +222550,8 @@ ${bz(e, r10)}`); var WildcardRunningEvent = class extends RunningEvent { constructor(address, contractInterface) { super("*", { address }); - defineReadOnly(this, "address", address); - defineReadOnly(this, "interface", contractInterface); + (0, import_properties9.defineReadOnly)(this, "address", address); + (0, import_properties9.defineReadOnly)(this, "interface", contractInterface); } prepareEvent(event) { super.prepareEvent(event); @@ -165277,29 +222569,29 @@ ${bz(e, r10)}`); }; var BaseContract = class { constructor(addressOrName, contractInterface, signerOrProvider) { - defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); + (0, import_properties9.defineReadOnly)(this, "interface", (0, import_properties9.getStatic)(new.target, "getInterface")(contractInterface)); if (signerOrProvider == null) { - defineReadOnly(this, "provider", null); - defineReadOnly(this, "signer", null); - } else if (Signer.isSigner(signerOrProvider)) { - defineReadOnly(this, "provider", signerOrProvider.provider || null); - defineReadOnly(this, "signer", signerOrProvider); + (0, import_properties9.defineReadOnly)(this, "provider", null); + (0, import_properties9.defineReadOnly)(this, "signer", null); + } else if (import_abstract_signer.Signer.isSigner(signerOrProvider)) { + (0, import_properties9.defineReadOnly)(this, "provider", signerOrProvider.provider || null); + (0, import_properties9.defineReadOnly)(this, "signer", signerOrProvider); } else if (Provider.isProvider(signerOrProvider)) { - defineReadOnly(this, "provider", signerOrProvider); - defineReadOnly(this, "signer", null); + (0, import_properties9.defineReadOnly)(this, "provider", signerOrProvider); + (0, import_properties9.defineReadOnly)(this, "signer", null); } else { - logger15.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider); + logger11.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider); } - defineReadOnly(this, "callStatic", {}); - defineReadOnly(this, "estimateGas", {}); - defineReadOnly(this, "functions", {}); - defineReadOnly(this, "populateTransaction", {}); - defineReadOnly(this, "filters", {}); + (0, import_properties9.defineReadOnly)(this, "callStatic", {}); + (0, import_properties9.defineReadOnly)(this, "estimateGas", {}); + (0, import_properties9.defineReadOnly)(this, "functions", {}); + (0, import_properties9.defineReadOnly)(this, "populateTransaction", {}); + (0, import_properties9.defineReadOnly)(this, "filters", {}); { const uniqueFilters = {}; Object.keys(this.interface.events).forEach((eventSignature) => { const event = this.interface.events[eventSignature]; - defineReadOnly(this.filters, eventSignature, (...args) => { + (0, import_properties9.defineReadOnly)(this.filters, eventSignature, (...args) => { return { address: this.address, topics: this.interface.encodeFilterTopics(event, args) @@ -165313,25 +222605,25 @@ ${bz(e, r10)}`); Object.keys(uniqueFilters).forEach((name6) => { const filters = uniqueFilters[name6]; if (filters.length === 1) { - defineReadOnly(this.filters, name6, this.filters[filters[0]]); + (0, import_properties9.defineReadOnly)(this.filters, name6, this.filters[filters[0]]); } else { - logger15.warn(`Duplicate definition of ${name6} (${filters.join(", ")})`); + logger11.warn(`Duplicate definition of ${name6} (${filters.join(", ")})`); } }); } - defineReadOnly(this, "_runningEvents", {}); - defineReadOnly(this, "_wrappedEmits", {}); + (0, import_properties9.defineReadOnly)(this, "_runningEvents", {}); + (0, import_properties9.defineReadOnly)(this, "_wrappedEmits", {}); if (addressOrName == null) { - logger15.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName); + logger11.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName); } - defineReadOnly(this, "address", addressOrName); + (0, import_properties9.defineReadOnly)(this, "address", addressOrName); if (this.provider) { - defineReadOnly(this, "resolvedAddress", resolveName(this.provider, addressOrName)); + (0, import_properties9.defineReadOnly)(this, "resolvedAddress", resolveName(this.provider, addressOrName)); } else { try { - defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName))); + (0, import_properties9.defineReadOnly)(this, "resolvedAddress", Promise.resolve((0, import_address6.getAddress)(addressOrName))); } catch (error) { - logger15.throwError("provider is required to use ENS name as contract address", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError("provider is required to use ENS name as contract address", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "new Contract" }); } @@ -165343,7 +222635,7 @@ ${bz(e, r10)}`); Object.keys(this.interface.functions).forEach((signature2) => { const fragment = this.interface.functions[signature2]; if (uniqueSignatures[signature2]) { - logger15.warn(`Duplicate ABI entry for ${JSON.stringify(signature2)}`); + logger11.warn(`Duplicate ABI entry for ${JSON.stringify(signature2)}`); return; } uniqueSignatures[signature2] = true; @@ -165355,19 +222647,19 @@ ${bz(e, r10)}`); uniqueNames[`%${name6}`].push(signature2); } if (this[signature2] == null) { - defineReadOnly(this, signature2, buildDefault(this, fragment, true)); + (0, import_properties9.defineReadOnly)(this, signature2, buildDefault(this, fragment, true)); } if (this.functions[signature2] == null) { - defineReadOnly(this.functions, signature2, buildDefault(this, fragment, false)); + (0, import_properties9.defineReadOnly)(this.functions, signature2, buildDefault(this, fragment, false)); } if (this.callStatic[signature2] == null) { - defineReadOnly(this.callStatic, signature2, buildCall(this, fragment, true)); + (0, import_properties9.defineReadOnly)(this.callStatic, signature2, buildCall(this, fragment, true)); } if (this.populateTransaction[signature2] == null) { - defineReadOnly(this.populateTransaction, signature2, buildPopulate(this, fragment)); + (0, import_properties9.defineReadOnly)(this.populateTransaction, signature2, buildPopulate(this, fragment)); } if (this.estimateGas[signature2] == null) { - defineReadOnly(this.estimateGas, signature2, buildEstimate(this, fragment)); + (0, import_properties9.defineReadOnly)(this.estimateGas, signature2, buildEstimate(this, fragment)); } }); Object.keys(uniqueNames).forEach((name6) => { @@ -165379,26 +222671,26 @@ ${bz(e, r10)}`); const signature2 = signatures[0]; try { if (this[name6] == null) { - defineReadOnly(this, name6, this[signature2]); + (0, import_properties9.defineReadOnly)(this, name6, this[signature2]); } } catch (e) { } if (this.functions[name6] == null) { - defineReadOnly(this.functions, name6, this.functions[signature2]); + (0, import_properties9.defineReadOnly)(this.functions, name6, this.functions[signature2]); } if (this.callStatic[name6] == null) { - defineReadOnly(this.callStatic, name6, this.callStatic[signature2]); + (0, import_properties9.defineReadOnly)(this.callStatic, name6, this.callStatic[signature2]); } if (this.populateTransaction[name6] == null) { - defineReadOnly(this.populateTransaction, name6, this.populateTransaction[signature2]); + (0, import_properties9.defineReadOnly)(this.populateTransaction, name6, this.populateTransaction[signature2]); } if (this.estimateGas[name6] == null) { - defineReadOnly(this.estimateGas, name6, this.estimateGas[signature2]); + (0, import_properties9.defineReadOnly)(this.estimateGas, name6, this.estimateGas[signature2]); } }); } static getContractAddress(transaction) { - return getContractAddress(transaction); + return (0, import_address6.getContractAddress)(transaction); } static getInterface(contractInterface) { if (Interface.isInterface(contractInterface)) { @@ -165418,7 +222710,7 @@ ${bz(e, r10)}`); } else { this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => { if (code === "0x") { - logger15.throwError("contract not deployed", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError("contract not deployed", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { contractAddress: this.address, operation: "getDeployed" }); @@ -165431,14 +222723,14 @@ ${bz(e, r10)}`); } fallback(overrides) { if (!this.signer) { - logger15.throwError("sending a transactions require a signer", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" }); + logger11.throwError("sending a transactions require a signer", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" }); } - const tx2 = shallowCopy(overrides || {}); + const tx2 = (0, import_properties9.shallowCopy)(overrides || {}); ["from", "to"].forEach(function(key2) { if (tx2[key2] == null) { return; } - logger15.throwError("cannot override " + key2, import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 }); + logger11.throwError("cannot override " + key2, import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 }); }); tx2.to = this.resolvedAddress; return this.deployed().then(() => { @@ -165447,11 +222739,11 @@ ${bz(e, r10)}`); } connect(signerOrProvider) { if (typeof signerOrProvider === "string") { - signerOrProvider = new VoidSigner(signerOrProvider, this.provider); + signerOrProvider = new import_abstract_signer.VoidSigner(signerOrProvider, this.provider); } const contract = new this.constructor(this.address, this.interface, signerOrProvider); if (this.deployTransaction) { - defineReadOnly(contract, "deployTransaction", this.deployTransaction); + (0, import_properties9.defineReadOnly)(contract, "deployTransaction", this.deployTransaction); } return contract; } @@ -165510,7 +222802,7 @@ ${bz(e, r10)}`); } } _wrapEvent(runningEvent, log, listener) { - const event = deepCopy(log); + const event = (0, import_properties9.deepCopy)(log); event.removeListener = () => { if (!listener) { return; @@ -165532,7 +222824,7 @@ ${bz(e, r10)}`); } _addEventListener(runningEvent, listener, once) { if (!this.provider) { - logger15.throwError("events require a provider or a signer with a provider", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" }); + logger11.throwError("events require a provider or a signer with a provider", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" }); } runningEvent.addListener(listener, once); this._runningEvents[runningEvent.tag] = runningEvent; @@ -165562,10 +222854,10 @@ ${bz(e, r10)}`); } queryFilter(event, fromBlockOrBlockhash, toBlock) { const runningEvent = this._getRunningEvent(event); - const filter = shallowCopy(runningEvent.filter); - if (typeof fromBlockOrBlockhash === "string" && (0, import_bytes18.isHexString)(fromBlockOrBlockhash, 32)) { + const filter = (0, import_properties9.shallowCopy)(runningEvent.filter); + if (typeof fromBlockOrBlockhash === "string" && (0, import_bytes15.isHexString)(fromBlockOrBlockhash, 32)) { if (toBlock != null) { - logger15.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); + logger11.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); } filter.blockHash = fromBlockOrBlockhash; } else { @@ -165656,8 +222948,8 @@ ${bz(e, r10)}`); let bytecodeHex = null; if (typeof bytecode === "string") { bytecodeHex = bytecode; - } else if ((0, import_bytes18.isBytes)(bytecode)) { - bytecodeHex = (0, import_bytes18.hexlify)(bytecode); + } else if ((0, import_bytes15.isBytes)(bytecode)) { + bytecodeHex = (0, import_bytes15.hexlify)(bytecode); } else if (bytecode && typeof bytecode.object === "string") { bytecodeHex = bytecode.object; } else { @@ -165666,22 +222958,22 @@ ${bz(e, r10)}`); if (bytecodeHex.substring(0, 2) !== "0x") { bytecodeHex = "0x" + bytecodeHex; } - if (!(0, import_bytes18.isHexString)(bytecodeHex) || bytecodeHex.length % 2) { - logger15.throwArgumentError("invalid bytecode", "bytecode", bytecode); + if (!(0, import_bytes15.isHexString)(bytecodeHex) || bytecodeHex.length % 2) { + logger11.throwArgumentError("invalid bytecode", "bytecode", bytecode); } - if (signer && !Signer.isSigner(signer)) { - logger15.throwArgumentError("invalid signer", "signer", signer); + if (signer && !import_abstract_signer.Signer.isSigner(signer)) { + logger11.throwArgumentError("invalid signer", "signer", signer); } - defineReadOnly(this, "bytecode", bytecodeHex); - defineReadOnly(this, "interface", getStatic(new.target, "getInterface")(contractInterface)); - defineReadOnly(this, "signer", signer || null); + (0, import_properties9.defineReadOnly)(this, "bytecode", bytecodeHex); + (0, import_properties9.defineReadOnly)(this, "interface", (0, import_properties9.getStatic)(new.target, "getInterface")(contractInterface)); + (0, import_properties9.defineReadOnly)(this, "signer", signer || null); } getDeployTransaction(...args) { let tx2 = {}; if (args.length === this.interface.deploy.inputs.length + 1 && typeof args[args.length - 1] === "object") { - tx2 = shallowCopy(args.pop()); + tx2 = (0, import_properties9.shallowCopy)(args.pop()); for (const key2 in tx2) { - if (!allowedTransactionKeys3[key2]) { + if (!allowedTransactionKeys2[key2]) { throw new Error("unknown transaction override " + key2); } } @@ -165690,39 +222982,39 @@ ${bz(e, r10)}`); if (tx2[key2] == null) { return; } - logger15.throwError("cannot override " + key2, import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 }); + logger11.throwError("cannot override " + key2, import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 }); }); if (tx2.value) { - const value = import_bignumber9.BigNumber.from(tx2.value); + const value = import_bignumber8.BigNumber.from(tx2.value); if (!value.isZero() && !this.interface.deploy.payable) { - logger15.throwError("non-payable constructor cannot override value", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { + logger11.throwError("non-payable constructor cannot override value", import_logger11.Logger.errors.UNSUPPORTED_OPERATION, { operation: "overrides.value", value: tx2.value }); } } - logger15.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); - tx2.data = (0, import_bytes18.hexlify)((0, import_bytes18.concat)([ + logger11.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + tx2.data = (0, import_bytes15.hexlify)((0, import_bytes15.concat)([ this.bytecode, this.interface.encodeDeploy(args) ])); return tx2; } deploy(...args) { - return __awaiter6(this, void 0, void 0, function* () { + return __awaiter4(this, void 0, void 0, function* () { let overrides = {}; if (args.length === this.interface.deploy.inputs.length + 1) { overrides = args.pop(); } - logger15.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); + logger11.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor"); const params = yield resolveAddresses(this.signer, args, this.interface.deploy.inputs); params.push(overrides); const unsignedTx = this.getDeployTransaction(...params); const tx2 = yield this.signer.sendTransaction(unsignedTx); - const address = getStatic(this.constructor, "getContractAddress")(tx2); - const contract = getStatic(this.constructor, "getContract")(address, this.interface, this.signer); + const address = (0, import_properties9.getStatic)(this.constructor, "getContractAddress")(tx2); + const contract = (0, import_properties9.getStatic)(this.constructor, "getContract")(address, this.interface, this.signer); addContractWait(contract, tx2); - defineReadOnly(contract, "deployTransaction", tx2); + (0, import_properties9.defineReadOnly)(contract, "deployTransaction", tx2); return contract; }); } @@ -165734,7 +223026,7 @@ ${bz(e, r10)}`); } static fromSolidity(compilerOutput, signer) { if (compilerOutput == null) { - logger15.throwError("missing compiler output", import_logger15.Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" }); + logger11.throwError("missing compiler output", import_logger11.Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" }); } if (typeof compilerOutput === "string") { compilerOutput = JSON.parse(compilerOutput); @@ -165752,7 +223044,7 @@ ${bz(e, r10)}`); return Contract.getInterface(contractInterface); } static getContractAddress(tx2) { - return getContractAddress(tx2); + return (0, import_address6.getContractAddress)(tx2); } static getContract(address, contractInterface, signer) { return new Contract(address, contractInterface, signer); @@ -165760,25 +223052,29 @@ ${bz(e, r10)}`); }; // node_modules/ethers/lib.esm/ethers.js - var import_bignumber18 = __toESM(require_lib3()); + var import_bignumber17 = __toESM(require_lib3()); + var import_abstract_signer4 = __toESM(require_lib11()); // node_modules/@ethersproject/wallet/lib.esm/index.js - var import_bytes27 = __toESM(require_lib2()); + var import_address10 = __toESM(require_lib10()); + var import_abstract_signer2 = __toESM(require_lib11()); + var import_bytes24 = __toESM(require_lib2()); // ../../node_modules/@ethersproject/basex/lib.esm/index.js - var import_bytes19 = __toESM(require_lib2()); + var import_bytes16 = __toESM(require_lib2()); + var import_properties10 = __toESM(require_lib7()); var BaseX = class { constructor(alphabet4) { - defineReadOnly(this, "alphabet", alphabet4); - defineReadOnly(this, "base", alphabet4.length); - defineReadOnly(this, "_alphabetMap", {}); - defineReadOnly(this, "_leader", alphabet4.charAt(0)); + (0, import_properties10.defineReadOnly)(this, "alphabet", alphabet4); + (0, import_properties10.defineReadOnly)(this, "base", alphabet4.length); + (0, import_properties10.defineReadOnly)(this, "_alphabetMap", {}); + (0, import_properties10.defineReadOnly)(this, "_leader", alphabet4.charAt(0)); for (let i = 0; i < alphabet4.length; i++) { this._alphabetMap[alphabet4.charAt(i)] = i; } } encode(value) { - let source = (0, import_bytes19.arrayify)(value); + let source = (0, import_bytes16.arrayify)(value); if (source.length === 0) { return ""; } @@ -165832,23 +223128,23 @@ ${bz(e, r10)}`); for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) { bytes5.push(0); } - return (0, import_bytes19.arrayify)(new Uint8Array(bytes5.reverse())); + return (0, import_bytes16.arrayify)(new Uint8Array(bytes5.reverse())); } }; var Base32 = new BaseX("abcdefghijklmnopqrstuvwxyz234567"); var Base58 = new BaseX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); // ../../node_modules/@ethersproject/hdnode/lib.esm/index.js - var import_bytes22 = __toESM(require_lib2()); - var import_bignumber10 = __toESM(require_lib3()); + var import_bytes19 = __toESM(require_lib2()); + var import_bignumber9 = __toESM(require_lib3()); var import_strings6 = __toESM(require_lib6()); // ../../node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js - var import_bytes21 = __toESM(require_lib2()); + var import_bytes18 = __toESM(require_lib2()); // ../../node_modules/@ethersproject/sha2/lib.esm/sha2.js var import_hash3 = __toESM(require_hash()); - var import_bytes20 = __toESM(require_lib2()); + var import_bytes17 = __toESM(require_lib2()); // ../../node_modules/@ethersproject/sha2/lib.esm/types.js var SupportedAlgorithm; @@ -165858,36 +223154,36 @@ ${bz(e, r10)}`); })(SupportedAlgorithm || (SupportedAlgorithm = {})); // ../../node_modules/@ethersproject/sha2/lib.esm/sha2.js - var import_logger16 = __toESM(require_lib()); + var import_logger12 = __toESM(require_lib()); // ../../node_modules/@ethersproject/sha2/lib.esm/_version.js - var version12 = "sha2/5.7.0"; + var version8 = "sha2/5.7.0"; // ../../node_modules/@ethersproject/sha2/lib.esm/sha2.js - var logger16 = new import_logger16.Logger(version12); + var logger12 = new import_logger12.Logger(version8); function ripemd160(data) { - return "0x" + import_hash3.default.ripemd160().update((0, import_bytes20.arrayify)(data)).digest("hex"); + return "0x" + import_hash3.default.ripemd160().update((0, import_bytes17.arrayify)(data)).digest("hex"); } function sha256(data) { - return "0x" + import_hash3.default.sha256().update((0, import_bytes20.arrayify)(data)).digest("hex"); + return "0x" + import_hash3.default.sha256().update((0, import_bytes17.arrayify)(data)).digest("hex"); } function sha512(data) { - return "0x" + import_hash3.default.sha512().update((0, import_bytes20.arrayify)(data)).digest("hex"); + return "0x" + import_hash3.default.sha512().update((0, import_bytes17.arrayify)(data)).digest("hex"); } function computeHmac(algorithm, key2, data) { if (!SupportedAlgorithm[algorithm]) { - logger16.throwError("unsupported algorithm " + algorithm, import_logger16.Logger.errors.UNSUPPORTED_OPERATION, { + logger12.throwError("unsupported algorithm " + algorithm, import_logger12.Logger.errors.UNSUPPORTED_OPERATION, { operation: "hmac", algorithm }); } - return "0x" + import_hash3.default.hmac(import_hash3.default[algorithm], (0, import_bytes20.arrayify)(key2)).update((0, import_bytes20.arrayify)(data)).digest("hex"); + return "0x" + import_hash3.default.hmac(import_hash3.default[algorithm], (0, import_bytes17.arrayify)(key2)).update((0, import_bytes17.arrayify)(data)).digest("hex"); } // ../../node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) { - password = (0, import_bytes21.arrayify)(password); - salt = (0, import_bytes21.arrayify)(salt); + password = (0, import_bytes18.arrayify)(password); + salt = (0, import_bytes18.arrayify)(salt); let hLen; let l15 = 1; const DK2 = new Uint8Array(keylen); @@ -165900,7 +223196,7 @@ ${bz(e, r10)}`); block1[salt.length + 1] = i >> 16 & 255; block1[salt.length + 2] = i >> 8 & 255; block1[salt.length + 3] = i & 255; - let U = (0, import_bytes21.arrayify)(computeHmac(hashAlgorithm, password, block1)); + let U = (0, import_bytes18.arrayify)(computeHmac(hashAlgorithm, password, block1)); if (!hLen) { hLen = U.length; T = new Uint8Array(hLen); @@ -165909,30 +223205,34 @@ ${bz(e, r10)}`); } T.set(U); for (let j10 = 1; j10 < iterations; j10++) { - U = (0, import_bytes21.arrayify)(computeHmac(hashAlgorithm, password, U)); + U = (0, import_bytes18.arrayify)(computeHmac(hashAlgorithm, password, U)); for (let k = 0; k < hLen; k++) T[k] ^= U[k]; } const destPos = (i - 1) * hLen; const len = i === l15 ? r10 : hLen; - DK2.set((0, import_bytes21.arrayify)(T).slice(0, len), destPos); + DK2.set((0, import_bytes18.arrayify)(T).slice(0, len), destPos); } - return (0, import_bytes21.hexlify)(DK2); + return (0, import_bytes18.hexlify)(DK2); } + // ../../node_modules/@ethersproject/hdnode/lib.esm/index.js + var import_properties12 = __toESM(require_lib7()); + // ../../node_modules/@ethersproject/wordlists/lib.esm/wordlist.js - var import_logger17 = __toESM(require_lib()); + var import_properties11 = __toESM(require_lib7()); + var import_logger13 = __toESM(require_lib()); // ../../node_modules/@ethersproject/wordlists/lib.esm/_version.js - var version13 = "wordlists/5.7.0"; + var version9 = "wordlists/5.7.0"; // ../../node_modules/@ethersproject/wordlists/lib.esm/wordlist.js var exportWordlist = false; - var logger17 = new import_logger17.Logger(version13); + var logger13 = new import_logger13.Logger(version9); var Wordlist = class { constructor(locale) { - logger17.checkAbstract(new.target, Wordlist); - defineReadOnly(this, "locale", locale); + logger13.checkAbstract(new.target, Wordlist); + (0, import_properties11.defineReadOnly)(this, "locale", locale); } split(mnemonic) { return mnemonic.toLowerCase().split(/ +/g); @@ -165960,7 +223260,7 @@ ${bz(e, r10)}`); const anyGlobal2 = window; if (anyGlobal2._ethers && anyGlobal2._ethers.wordlists) { if (!anyGlobal2._ethers.wordlists[name6]) { - defineReadOnly(anyGlobal2._ethers.wordlists, name6, lang); + (0, import_properties11.defineReadOnly)(anyGlobal2._ethers.wordlists, name6, lang); } } } catch (error) { @@ -166004,14 +223304,14 @@ ${bz(e, r10)}`); }; // ../../node_modules/@ethersproject/hdnode/lib.esm/index.js - var import_logger18 = __toESM(require_lib()); + var import_logger14 = __toESM(require_lib()); // ../../node_modules/@ethersproject/hdnode/lib.esm/_version.js - var version14 = "hdnode/5.7.0"; + var version10 = "hdnode/5.7.0"; // ../../node_modules/@ethersproject/hdnode/lib.esm/index.js - var logger18 = new import_logger18.Logger(version14); - var N = import_bignumber10.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); + var logger14 = new import_logger14.Logger(version10); + var N = import_bignumber9.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); var MasterSecret = (0, import_strings6.toUtf8Bytes)("Bitcoin seed"); var HardenedBit = 2147483648; function getUpperMask(bits2) { @@ -166021,10 +223321,10 @@ ${bz(e, r10)}`); return (1 << bits2) - 1; } function bytes32(value) { - return (0, import_bytes22.hexZeroPad)((0, import_bytes22.hexlify)(value), 32); + return (0, import_bytes19.hexZeroPad)((0, import_bytes19.hexlify)(value), 32); } function base58check(data) { - return Base58.encode((0, import_bytes22.concat)([data, (0, import_bytes22.hexDataSlice)(sha256(sha256(data)), 0, 4)])); + return Base58.encode((0, import_bytes19.concat)([data, (0, import_bytes19.hexDataSlice)(sha256(sha256(data)), 0, 4)])); } function getWordlist(wordlist2) { if (wordlist2 == null) { @@ -166033,7 +223333,7 @@ ${bz(e, r10)}`); if (typeof wordlist2 === "string") { const words2 = wordlists[wordlist2]; if (words2 == null) { - logger18.throwArgumentError("unknown locale", "wordlist", wordlist2); + logger14.throwArgumentError("unknown locale", "wordlist", wordlist2); } return words2; } @@ -166048,40 +223348,40 @@ ${bz(e, r10)}`); } if (privateKey) { const signingKey = new SigningKey(privateKey); - defineReadOnly(this, "privateKey", signingKey.privateKey); - defineReadOnly(this, "publicKey", signingKey.compressedPublicKey); + (0, import_properties12.defineReadOnly)(this, "privateKey", signingKey.privateKey); + (0, import_properties12.defineReadOnly)(this, "publicKey", signingKey.compressedPublicKey); } else { - defineReadOnly(this, "privateKey", null); - defineReadOnly(this, "publicKey", (0, import_bytes22.hexlify)(publicKey)); - } - defineReadOnly(this, "parentFingerprint", parentFingerprint); - defineReadOnly(this, "fingerprint", (0, import_bytes22.hexDataSlice)(ripemd160(sha256(this.publicKey)), 0, 4)); - defineReadOnly(this, "address", computeAddress(this.publicKey)); - defineReadOnly(this, "chainCode", chainCode); - defineReadOnly(this, "index", index); - defineReadOnly(this, "depth", depth); + (0, import_properties12.defineReadOnly)(this, "privateKey", null); + (0, import_properties12.defineReadOnly)(this, "publicKey", (0, import_bytes19.hexlify)(publicKey)); + } + (0, import_properties12.defineReadOnly)(this, "parentFingerprint", parentFingerprint); + (0, import_properties12.defineReadOnly)(this, "fingerprint", (0, import_bytes19.hexDataSlice)(ripemd160(sha256(this.publicKey)), 0, 4)); + (0, import_properties12.defineReadOnly)(this, "address", computeAddress(this.publicKey)); + (0, import_properties12.defineReadOnly)(this, "chainCode", chainCode); + (0, import_properties12.defineReadOnly)(this, "index", index); + (0, import_properties12.defineReadOnly)(this, "depth", depth); if (mnemonicOrPath == null) { - defineReadOnly(this, "mnemonic", null); - defineReadOnly(this, "path", null); + (0, import_properties12.defineReadOnly)(this, "mnemonic", null); + (0, import_properties12.defineReadOnly)(this, "path", null); } else if (typeof mnemonicOrPath === "string") { - defineReadOnly(this, "mnemonic", null); - defineReadOnly(this, "path", mnemonicOrPath); + (0, import_properties12.defineReadOnly)(this, "mnemonic", null); + (0, import_properties12.defineReadOnly)(this, "path", mnemonicOrPath); } else { - defineReadOnly(this, "mnemonic", mnemonicOrPath); - defineReadOnly(this, "path", mnemonicOrPath.path); + (0, import_properties12.defineReadOnly)(this, "mnemonic", mnemonicOrPath); + (0, import_properties12.defineReadOnly)(this, "path", mnemonicOrPath.path); } } get extendedKey() { if (this.depth >= 256) { throw new Error("Depth too large!"); } - return base58check((0, import_bytes22.concat)([ + return base58check((0, import_bytes19.concat)([ this.privateKey != null ? "0x0488ADE4" : "0x0488B21E", - (0, import_bytes22.hexlify)(this.depth), + (0, import_bytes19.hexlify)(this.depth), this.parentFingerprint, - (0, import_bytes22.hexZeroPad)((0, import_bytes22.hexlify)(this.index), 4), + (0, import_bytes19.hexZeroPad)((0, import_bytes19.hexlify)(this.index), 4), this.chainCode, - this.privateKey != null ? (0, import_bytes22.concat)(["0x00", this.privateKey]) : this.publicKey + this.privateKey != null ? (0, import_bytes19.concat)(["0x00", this.privateKey]) : this.publicKey ])); } neuter() { @@ -166100,25 +223400,25 @@ ${bz(e, r10)}`); if (!this.privateKey) { throw new Error("cannot derive child of neutered node"); } - data.set((0, import_bytes22.arrayify)(this.privateKey), 1); + data.set((0, import_bytes19.arrayify)(this.privateKey), 1); if (path) { path += "'"; } } else { - data.set((0, import_bytes22.arrayify)(this.publicKey)); + data.set((0, import_bytes19.arrayify)(this.publicKey)); } for (let i = 24; i >= 0; i -= 8) { data[33 + (i >> 3)] = index >> 24 - i & 255; } - const I = (0, import_bytes22.arrayify)(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data)); + const I = (0, import_bytes19.arrayify)(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data)); const IL2 = I.slice(0, 32); const IR2 = I.slice(32); let ki2 = null; let Ki2 = null; if (this.privateKey) { - ki2 = bytes32(import_bignumber10.BigNumber.from(IL2).add(this.privateKey).mod(N)); + ki2 = bytes32(import_bignumber9.BigNumber.from(IL2).add(this.privateKey).mod(N)); } else { - const ek2 = new SigningKey((0, import_bytes22.hexlify)(IL2)); + const ek2 = new SigningKey((0, import_bytes19.hexlify)(IL2)); Ki2 = ek2._addPoint(this.publicKey); } let mnemonicOrPath = path; @@ -166162,11 +223462,11 @@ ${bz(e, r10)}`); return result; } static _fromSeed(seed, mnemonic) { - const seedArray = (0, import_bytes22.arrayify)(seed); + const seedArray = (0, import_bytes19.arrayify)(seed); if (seedArray.length < 16 || seedArray.length > 64) { throw new Error("invalid seed"); } - const I = (0, import_bytes22.arrayify)(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray)); + const I = (0, import_bytes19.arrayify)(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray)); return new HDNode(_constructorGuard2, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic); } static fromMnemonic(mnemonic, password, wordlist2) { @@ -166184,25 +223484,25 @@ ${bz(e, r10)}`); static fromExtendedKey(extendedKey) { const bytes5 = Base58.decode(extendedKey); if (bytes5.length !== 82 || base58check(bytes5.slice(0, 78)) !== extendedKey) { - logger18.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + logger14.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); } const depth = bytes5[4]; - const parentFingerprint = (0, import_bytes22.hexlify)(bytes5.slice(5, 9)); - const index = parseInt((0, import_bytes22.hexlify)(bytes5.slice(9, 13)).substring(2), 16); - const chainCode = (0, import_bytes22.hexlify)(bytes5.slice(13, 45)); + const parentFingerprint = (0, import_bytes19.hexlify)(bytes5.slice(5, 9)); + const index = parseInt((0, import_bytes19.hexlify)(bytes5.slice(9, 13)).substring(2), 16); + const chainCode = (0, import_bytes19.hexlify)(bytes5.slice(13, 45)); const key2 = bytes5.slice(45, 78); - switch ((0, import_bytes22.hexlify)(bytes5.slice(0, 4))) { + switch ((0, import_bytes19.hexlify)(bytes5.slice(0, 4))) { case "0x0488b21e": case "0x043587cf": - return new HDNode(_constructorGuard2, null, (0, import_bytes22.hexlify)(key2), parentFingerprint, chainCode, index, depth, null); + return new HDNode(_constructorGuard2, null, (0, import_bytes19.hexlify)(key2), parentFingerprint, chainCode, index, depth, null); case "0x0488ade4": case "0x04358394 ": if (key2[0] !== 0) { break; } - return new HDNode(_constructorGuard2, (0, import_bytes22.hexlify)(key2.slice(1)), null, parentFingerprint, chainCode, index, depth, null); + return new HDNode(_constructorGuard2, (0, import_bytes19.hexlify)(key2.slice(1)), null, parentFingerprint, chainCode, index, depth, null); } - return logger18.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); + return logger14.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]"); } }; function mnemonicToSeed(mnemonic, password) { @@ -166214,12 +223514,12 @@ ${bz(e, r10)}`); } function mnemonicToEntropy(mnemonic, wordlist2) { wordlist2 = getWordlist(wordlist2); - logger18.checkNormalize(); + logger14.checkNormalize(); const words2 = wordlist2.split(mnemonic); if (words2.length % 3 !== 0) { throw new Error("invalid mnemonic"); } - const entropy = (0, import_bytes22.arrayify)(new Uint8Array(Math.ceil(11 * words2.length / 8))); + const entropy = (0, import_bytes19.arrayify)(new Uint8Array(Math.ceil(11 * words2.length / 8))); let offset = 0; for (let i = 0; i < words2.length; i++) { let index = wordlist2.getWordIndex(words2[i].normalize("NFKD")); @@ -166236,15 +223536,15 @@ ${bz(e, r10)}`); const entropyBits = 32 * words2.length / 3; const checksumBits = words2.length / 3; const checksumMask = getUpperMask(checksumBits); - const checksum = (0, import_bytes22.arrayify)(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask; + const checksum = (0, import_bytes19.arrayify)(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask; if (checksum !== (entropy[entropy.length - 1] & checksumMask)) { throw new Error("invalid checksum"); } - return (0, import_bytes22.hexlify)(entropy.slice(0, entropyBits / 8)); + return (0, import_bytes19.hexlify)(entropy.slice(0, entropyBits / 8)); } function entropyToMnemonic(entropy, wordlist2) { wordlist2 = getWordlist(wordlist2); - entropy = (0, import_bytes22.arrayify)(entropy); + entropy = (0, import_bytes19.arrayify)(entropy); if (entropy.length % 4 !== 0 || entropy.length < 16 || entropy.length > 32) { throw new Error("invalid entropy"); } @@ -166263,7 +223563,7 @@ ${bz(e, r10)}`); } } const checksumBits = entropy.length / 4; - const checksum = (0, import_bytes22.arrayify)(sha256(entropy))[0] & getUpperMask(checksumBits); + const checksum = (0, import_bytes19.arrayify)(sha256(entropy))[0] & getUpperMask(checksumBits); indices[indices.length - 1] <<= checksumBits; indices[indices.length - 1] |= checksum >> 8 - checksumBits; return wordlist2.join(indices.map((index) => wordlist2.getWord(index))); @@ -166278,20 +223578,24 @@ ${bz(e, r10)}`); } function getAccountPath(index) { if (typeof index !== "number" || index < 0 || index >= HardenedBit || index % 1) { - logger18.throwArgumentError("invalid account index", "index", index); + logger14.throwArgumentError("invalid account index", "index", index); } return `m/44'/60'/${index}'/0/0`; } + // node_modules/@ethersproject/wallet/lib.esm/index.js + var import_keccak2569 = __toESM(require_lib8()); + var import_properties15 = __toESM(require_lib7()); + // ../../node_modules/@ethersproject/random/lib.esm/random.js - var import_bytes23 = __toESM(require_lib2()); - var import_logger19 = __toESM(require_lib()); + var import_bytes20 = __toESM(require_lib2()); + var import_logger15 = __toESM(require_lib()); // ../../node_modules/@ethersproject/random/lib.esm/_version.js - var version15 = "random/5.7.0"; + var version11 = "random/5.7.0"; // ../../node_modules/@ethersproject/random/lib.esm/random.js - var logger19 = new import_logger19.Logger(version15); + var logger15 = new import_logger15.Logger(version11); function getGlobal() { if (typeof self !== "undefined") { return self; @@ -166307,10 +223611,10 @@ ${bz(e, r10)}`); var anyGlobal = getGlobal(); var crypto2 = anyGlobal.crypto || anyGlobal.msCrypto; if (!crypto2 || !crypto2.getRandomValues) { - logger19.warn("WARNING: Missing strong random number source"); + logger15.warn("WARNING: Missing strong random number source"); crypto2 = { getRandomValues: function(buffer) { - return logger19.throwError("no secure random source avaialble", import_logger19.Logger.errors.UNSUPPORTED_OPERATION, { + return logger15.throwError("no secure random source avaialble", import_logger15.Logger.errors.UNSUPPORTED_OPERATION, { operation: "crypto.getRandomValues" }); } @@ -166318,11 +223622,11 @@ ${bz(e, r10)}`); } function randomBytes(length) { if (length <= 0 || length > 1024 || length % 1 || length != length) { - logger19.throwArgumentError("invalid length", "length", length); + logger15.throwArgumentError("invalid length", "length", length); } const result = new Uint8Array(length); crypto2.getRandomValues(result); - return (0, import_bytes23.arrayify)(result); + return (0, import_bytes20.arrayify)(result); } // ../../node_modules/@ethersproject/random/lib.esm/shuffle.js @@ -166339,21 +223643,24 @@ ${bz(e, r10)}`); // ../../node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js var import_aes_js = __toESM(require_aes_js()); - var import_bytes25 = __toESM(require_lib2()); + var import_address7 = __toESM(require_lib10()); + var import_bytes22 = __toESM(require_lib2()); + var import_keccak2567 = __toESM(require_lib8()); var import_strings8 = __toESM(require_lib6()); - var import_logger20 = __toESM(require_lib()); + var import_properties13 = __toESM(require_lib7()); + var import_logger16 = __toESM(require_lib()); // ../../node_modules/@ethersproject/json-wallets/lib.esm/_version.js - var version16 = "json-wallets/5.7.0"; + var version12 = "json-wallets/5.7.0"; // ../../node_modules/@ethersproject/json-wallets/lib.esm/utils.js - var import_bytes24 = __toESM(require_lib2()); + var import_bytes21 = __toESM(require_lib2()); var import_strings7 = __toESM(require_lib6()); function looseArrayify(hexString) { if (typeof hexString === "string" && hexString.substring(0, 2) !== "0x") { hexString = "0x" + hexString; } - return (0, import_bytes24.arrayify)(hexString); + return (0, import_bytes21.arrayify)(hexString); } function zpad(value, length) { value = String(value); @@ -166366,7 +223673,7 @@ ${bz(e, r10)}`); if (typeof password === "string") { return (0, import_strings7.toUtf8Bytes)(password, import_strings7.UnicodeNormalizationForm.NFKC); } - return (0, import_bytes24.arrayify)(password); + return (0, import_bytes21.arrayify)(password); } function searchPath(object, path) { let currentChild = object; @@ -166387,10 +223694,10 @@ ${bz(e, r10)}`); return currentChild; } function uuidV4(randomBytes3) { - const bytes5 = (0, import_bytes24.arrayify)(randomBytes3); + const bytes5 = (0, import_bytes21.arrayify)(randomBytes3); bytes5[6] = bytes5[6] & 15 | 64; bytes5[8] = bytes5[8] & 63 | 128; - const value = (0, import_bytes24.hexlify)(bytes5); + const value = (0, import_bytes21.hexlify)(bytes5); return [ value.substring(2, 10), value.substring(10, 14), @@ -166401,8 +223708,8 @@ ${bz(e, r10)}`); } // ../../node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js - var logger20 = new import_logger20.Logger(version16); - var CrowdsaleAccount = class extends Description { + var logger16 = new import_logger16.Logger(version12); + var CrowdsaleAccount = class extends import_properties13.Description { isCrowdsaleAccount(value) { return !!(value && value._isCrowdsaleAccount); } @@ -166410,22 +223717,22 @@ ${bz(e, r10)}`); function decrypt(json, password) { const data = JSON.parse(json); password = getPassword(password); - const ethaddr = getAddress(searchPath(data, "ethaddr")); + const ethaddr = (0, import_address7.getAddress)(searchPath(data, "ethaddr")); const encseed = looseArrayify(searchPath(data, "encseed")); if (!encseed || encseed.length % 16 !== 0) { - logger20.throwArgumentError("invalid encseed", "json", json); + logger16.throwArgumentError("invalid encseed", "json", json); } - const key2 = (0, import_bytes25.arrayify)(pbkdf2(password, password, 2e3, 32, "sha256")).slice(0, 16); + const key2 = (0, import_bytes22.arrayify)(pbkdf2(password, password, 2e3, 32, "sha256")).slice(0, 16); const iv2 = encseed.slice(0, 16); const encryptedSeed = encseed.slice(16); const aesCbc = new import_aes_js.default.ModeOfOperation.cbc(key2, iv2); - const seed = import_aes_js.default.padding.pkcs7.strip((0, import_bytes25.arrayify)(aesCbc.decrypt(encryptedSeed))); + const seed = import_aes_js.default.padding.pkcs7.strip((0, import_bytes22.arrayify)(aesCbc.decrypt(encryptedSeed))); let seedHex = ""; for (let i = 0; i < seed.length; i++) { seedHex += String.fromCharCode(seed[i]); } const seedHexBytes = (0, import_strings8.toUtf8Bytes)(seedHex); - const privateKey = keccak256(seedHexBytes); + const privateKey = (0, import_keccak2567.keccak256)(seedHexBytes); return new CrowdsaleAccount({ _isCrowdsaleAccount: true, address: ethaddr, @@ -166434,6 +223741,7 @@ ${bz(e, r10)}`); } // ../../node_modules/@ethersproject/json-wallets/lib.esm/inspect.js + var import_address8 = __toESM(require_lib10()); function isCrowdsaleWallet(json) { let data = null; try { @@ -166458,14 +223766,14 @@ ${bz(e, r10)}`); function getJsonWalletAddress(json) { if (isCrowdsaleWallet(json)) { try { - return getAddress(JSON.parse(json).ethaddr); + return (0, import_address8.getAddress)(JSON.parse(json).ethaddr); } catch (error) { return null; } } if (isKeystoreWallet(json)) { try { - return getAddress(JSON.parse(json).address); + return (0, import_address8.getAddress)(JSON.parse(json).address); } catch (error) { return null; } @@ -166476,9 +223784,12 @@ ${bz(e, r10)}`); // ../../node_modules/@ethersproject/json-wallets/lib.esm/keystore.js var import_aes_js2 = __toESM(require_aes_js()); var import_scrypt_js = __toESM(require_scrypt3()); - var import_bytes26 = __toESM(require_lib2()); - var import_logger21 = __toESM(require_lib()); - var __awaiter7 = function(thisArg, _arguments, P, generator) { + var import_address9 = __toESM(require_lib10()); + var import_bytes23 = __toESM(require_lib2()); + var import_keccak2568 = __toESM(require_lib8()); + var import_properties14 = __toESM(require_lib7()); + var import_logger17 = __toESM(require_lib()); + var __awaiter5 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -166505,11 +223816,11 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger21 = new import_logger21.Logger(version16); + var logger17 = new import_logger17.Logger(version12); function hasMnemonic(value) { return value != null && value.mnemonic && value.mnemonic.phrase; } - var KeystoreAccount = class extends Description { + var KeystoreAccount = class extends import_properties14.Description { isKeystoreAccount(value) { return !!(value && value._isKeystoreAccount); } @@ -166520,19 +223831,19 @@ ${bz(e, r10)}`); const iv2 = looseArrayify(searchPath(data, "crypto/cipherparams/iv")); const counter = new import_aes_js2.default.Counter(iv2); const aesCtr = new import_aes_js2.default.ModeOfOperation.ctr(key2, counter); - return (0, import_bytes26.arrayify)(aesCtr.decrypt(ciphertext)); + return (0, import_bytes23.arrayify)(aesCtr.decrypt(ciphertext)); } return null; } function _getAccount(data, key2) { const ciphertext = looseArrayify(searchPath(data, "crypto/ciphertext")); - const computedMAC = (0, import_bytes26.hexlify)(keccak256((0, import_bytes26.concat)([key2.slice(16, 32), ciphertext]))).substring(2); + const computedMAC = (0, import_bytes23.hexlify)((0, import_keccak2568.keccak256)((0, import_bytes23.concat)([key2.slice(16, 32), ciphertext]))).substring(2); if (computedMAC !== searchPath(data, "crypto/mac").toLowerCase()) { throw new Error("invalid password"); } const privateKey = _decrypt(data, key2.slice(0, 16), ciphertext); if (!privateKey) { - logger21.throwError("unsupported cipher", import_logger21.Logger.errors.UNSUPPORTED_OPERATION, { + logger17.throwError("unsupported cipher", import_logger17.Logger.errors.UNSUPPORTED_OPERATION, { operation: "decrypt" }); } @@ -166543,14 +223854,14 @@ ${bz(e, r10)}`); if (check.substring(0, 2) !== "0x") { check = "0x" + check; } - if (getAddress(check) !== address) { + if ((0, import_address9.getAddress)(check) !== address) { throw new Error("address mismatch"); } } const account = { _isKeystoreAccount: true, address, - privateKey: (0, import_bytes26.hexlify)(privateKey) + privateKey: (0, import_bytes23.hexlify)(privateKey) }; if (searchPath(data, "x-ethers/version") === "0.1") { const mnemonicCiphertext = looseArrayify(searchPath(data, "x-ethers/mnemonicCiphertext")); @@ -166559,7 +223870,7 @@ ${bz(e, r10)}`); const mnemonicAesCtr = new import_aes_js2.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); const path = searchPath(data, "x-ethers/path") || defaultPath; const locale = searchPath(data, "x-ethers/locale") || "en"; - const entropy = (0, import_bytes26.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext)); + const entropy = (0, import_bytes23.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext)); try { const mnemonic = entropyToMnemonic(entropy, locale); const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path); @@ -166568,7 +223879,7 @@ ${bz(e, r10)}`); } account.mnemonic = node.mnemonic; } catch (error) { - if (error.code !== import_logger21.Logger.errors.INVALID_ARGUMENT || error.argument !== "wordlist") { + if (error.code !== import_logger17.Logger.errors.INVALID_ARGUMENT || error.argument !== "wordlist") { throw error; } } @@ -166576,7 +223887,7 @@ ${bz(e, r10)}`); return new KeystoreAccount(account); } function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) { - return (0, import_bytes26.arrayify)(pbkdf2(passwordBytes, salt, count, dkLen, prfFunc)); + return (0, import_bytes23.arrayify)(pbkdf2(passwordBytes, salt, count, dkLen, prfFunc)); } function pbkdf22(passwordBytes, salt, count, dkLen, prfFunc) { return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc)); @@ -166586,7 +223897,7 @@ ${bz(e, r10)}`); const kdf = searchPath(data, "crypto/kdf"); if (kdf && typeof kdf === "string") { const throwError = function(name6, value) { - return logger21.throwArgumentError("invalid key-derivation function parameters", name6, value); + return logger17.throwArgumentError("invalid key-derivation function parameters", name6, value); }; if (kdf.toLowerCase() === "scrypt") { const salt = looseArrayify(searchPath(data, "crypto/kdfparams/salt")); @@ -166623,7 +223934,7 @@ ${bz(e, r10)}`); return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc); } } - return logger21.throwArgumentError("unsupported key-derivation function", "kdf", kdf); + return logger17.throwArgumentError("unsupported key-derivation function", "kdf", kdf); } function decryptSync(json, password) { const data = JSON.parse(json); @@ -166631,7 +223942,7 @@ ${bz(e, r10)}`); return _getAccount(data, key2); } function decrypt2(json, password, progressCallback) { - return __awaiter7(this, void 0, void 0, function* () { + return __awaiter5(this, void 0, void 0, function* () { const data = JSON.parse(json); const key2 = yield _computeKdfKey(data, password, pbkdf22, import_scrypt_js.default.scrypt, progressCallback); return _getAccount(data, key2); @@ -166639,7 +223950,7 @@ ${bz(e, r10)}`); } function encrypt(account, password, options, progressCallback) { try { - if (getAddress(account.address) !== computeAddress(account.privateKey)) { + if ((0, import_address9.getAddress)(account.address) !== computeAddress(account.privateKey)) { throw new Error("address/privateKey mismatch"); } if (hasMnemonic(account)) { @@ -166659,14 +223970,14 @@ ${bz(e, r10)}`); if (!options) { options = {}; } - const privateKey = (0, import_bytes26.arrayify)(account.privateKey); + const privateKey = (0, import_bytes23.arrayify)(account.privateKey); const passwordBytes = getPassword(password); let entropy = null; let path = null; let locale = null; if (hasMnemonic(account)) { const srcMnemonic = account.mnemonic; - entropy = (0, import_bytes26.arrayify)(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || "en")); + entropy = (0, import_bytes23.arrayify)(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || "en")); path = srcMnemonic.path || defaultPath; locale = srcMnemonic.locale || "en"; } @@ -166676,14 +223987,14 @@ ${bz(e, r10)}`); } let salt = null; if (options.salt) { - salt = (0, import_bytes26.arrayify)(options.salt); + salt = (0, import_bytes23.arrayify)(options.salt); } else { salt = randomBytes(32); ; } let iv2 = null; if (options.iv) { - iv2 = (0, import_bytes26.arrayify)(options.iv); + iv2 = (0, import_bytes23.arrayify)(options.iv); if (iv2.length !== 16) { throw new Error("invalid iv"); } @@ -166692,7 +224003,7 @@ ${bz(e, r10)}`); } let uuidRandom = null; if (options.uuid) { - uuidRandom = (0, import_bytes26.arrayify)(options.uuid); + uuidRandom = (0, import_bytes23.arrayify)(options.uuid); if (uuidRandom.length !== 16) { throw new Error("invalid uuid"); } @@ -166712,14 +224023,14 @@ ${bz(e, r10)}`); } } return import_scrypt_js.default.scrypt(passwordBytes, salt, N11, r10, p, 64, progressCallback).then((key2) => { - key2 = (0, import_bytes26.arrayify)(key2); + key2 = (0, import_bytes23.arrayify)(key2); const derivedKey = key2.slice(0, 16); const macPrefix = key2.slice(16, 32); const mnemonicKey = key2.slice(32, 64); const counter = new import_aes_js2.default.Counter(iv2); const aesCtr = new import_aes_js2.default.ModeOfOperation.ctr(derivedKey, counter); - const ciphertext = (0, import_bytes26.arrayify)(aesCtr.encrypt(privateKey)); - const mac = keccak256((0, import_bytes26.concat)([macPrefix, ciphertext])); + const ciphertext = (0, import_bytes23.arrayify)(aesCtr.encrypt(privateKey)); + const mac = (0, import_keccak2568.keccak256)((0, import_bytes23.concat)([macPrefix, ciphertext])); const data = { address: account.address.substring(2).toLowerCase(), id: uuidV4(uuidRandom), @@ -166727,12 +224038,12 @@ ${bz(e, r10)}`); crypto: { cipher: "aes-128-ctr", cipherparams: { - iv: (0, import_bytes26.hexlify)(iv2).substring(2) + iv: (0, import_bytes23.hexlify)(iv2).substring(2) }, - ciphertext: (0, import_bytes26.hexlify)(ciphertext).substring(2), + ciphertext: (0, import_bytes23.hexlify)(ciphertext).substring(2), kdf: "scrypt", kdfparams: { - salt: (0, import_bytes26.hexlify)(salt).substring(2), + salt: (0, import_bytes23.hexlify)(salt).substring(2), n: N11, dklen: 32, p, @@ -166745,14 +224056,14 @@ ${bz(e, r10)}`); const mnemonicIv = randomBytes(16); const mnemonicCounter = new import_aes_js2.default.Counter(mnemonicIv); const mnemonicAesCtr = new import_aes_js2.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter); - const mnemonicCiphertext = (0, import_bytes26.arrayify)(mnemonicAesCtr.encrypt(entropy)); + const mnemonicCiphertext = (0, import_bytes23.arrayify)(mnemonicAesCtr.encrypt(entropy)); const now2 = new Date(); const timestamp = now2.getUTCFullYear() + "-" + zpad(now2.getUTCMonth() + 1, 2) + "-" + zpad(now2.getUTCDate(), 2) + "T" + zpad(now2.getUTCHours(), 2) + "-" + zpad(now2.getUTCMinutes(), 2) + "-" + zpad(now2.getUTCSeconds(), 2) + ".0Z"; data["x-ethers"] = { client, gethFilename: "UTC--" + timestamp + "--" + data.address, - mnemonicCounter: (0, import_bytes26.hexlify)(mnemonicIv).substring(2), - mnemonicCiphertext: (0, import_bytes26.hexlify)(mnemonicCiphertext).substring(2), + mnemonicCounter: (0, import_bytes23.hexlify)(mnemonicIv).substring(2), + mnemonicCiphertext: (0, import_bytes23.hexlify)(mnemonicCiphertext).substring(2), path, locale, version: "0.1" @@ -166790,13 +224101,13 @@ ${bz(e, r10)}`); } // node_modules/@ethersproject/wallet/lib.esm/index.js - var import_logger22 = __toESM(require_lib()); + var import_logger18 = __toESM(require_lib()); // node_modules/@ethersproject/wallet/lib.esm/_version.js - var version17 = "wallet/5.7.0"; + var version13 = "wallet/5.7.0"; // node_modules/@ethersproject/wallet/lib.esm/index.js - var __awaiter8 = function(thisArg, _arguments, P, generator) { + var __awaiter6 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -166823,27 +224134,27 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger22 = new import_logger22.Logger(version17); + var logger18 = new import_logger18.Logger(version13); function isAccount(value) { - return value != null && (0, import_bytes27.isHexString)(value.privateKey, 32) && value.address != null; + return value != null && (0, import_bytes24.isHexString)(value.privateKey, 32) && value.address != null; } function hasMnemonic2(value) { const mnemonic = value.mnemonic; return mnemonic && mnemonic.phrase; } - var Wallet = class extends Signer { + var Wallet = class extends import_abstract_signer2.Signer { constructor(privateKey, provider) { super(); if (isAccount(privateKey)) { const signingKey = new SigningKey(privateKey.privateKey); - defineReadOnly(this, "_signingKey", () => signingKey); - defineReadOnly(this, "address", computeAddress(this.publicKey)); - if (this.address !== getAddress(privateKey.address)) { - logger22.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]"); + (0, import_properties15.defineReadOnly)(this, "_signingKey", () => signingKey); + (0, import_properties15.defineReadOnly)(this, "address", computeAddress(this.publicKey)); + if (this.address !== (0, import_address10.getAddress)(privateKey.address)) { + logger18.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]"); } if (hasMnemonic2(privateKey)) { const srcMnemonic = privateKey.mnemonic; - defineReadOnly(this, "_mnemonic", () => ({ + (0, import_properties15.defineReadOnly)(this, "_mnemonic", () => ({ phrase: srcMnemonic.phrase, path: srcMnemonic.path || defaultPath, locale: srcMnemonic.locale || "en" @@ -166851,17 +224162,17 @@ ${bz(e, r10)}`); const mnemonic = this.mnemonic; const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path); if (computeAddress(node.privateKey) !== this.address) { - logger22.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]"); + logger18.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]"); } } else { - defineReadOnly(this, "_mnemonic", () => null); + (0, import_properties15.defineReadOnly)(this, "_mnemonic", () => null); } } else { if (SigningKey.isSigningKey(privateKey)) { if (privateKey.curve !== "secp256k1") { - logger22.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]"); + logger18.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]"); } - defineReadOnly(this, "_signingKey", () => privateKey); + (0, import_properties15.defineReadOnly)(this, "_signingKey", () => privateKey); } else { if (typeof privateKey === "string") { if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) { @@ -166869,15 +224180,15 @@ ${bz(e, r10)}`); } } const signingKey = new SigningKey(privateKey); - defineReadOnly(this, "_signingKey", () => signingKey); + (0, import_properties15.defineReadOnly)(this, "_signingKey", () => signingKey); } - defineReadOnly(this, "_mnemonic", () => null); - defineReadOnly(this, "address", computeAddress(this.publicKey)); + (0, import_properties15.defineReadOnly)(this, "_mnemonic", () => null); + (0, import_properties15.defineReadOnly)(this, "address", computeAddress(this.publicKey)); } if (provider && !Provider.isProvider(provider)) { - logger22.throwArgumentError("invalid provider", "provider", provider); + logger18.throwArgumentError("invalid provider", "provider", provider); } - defineReadOnly(this, "provider", provider || null); + (0, import_properties15.defineReadOnly)(this, "provider", provider || null); } get mnemonic() { return this._mnemonic(); @@ -166895,34 +224206,34 @@ ${bz(e, r10)}`); return new Wallet(this, provider); } signTransaction(transaction) { - return resolveProperties(transaction).then((tx2) => { + return (0, import_properties15.resolveProperties)(transaction).then((tx2) => { if (tx2.from != null) { - if (getAddress(tx2.from) !== this.address) { - logger22.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from); + if ((0, import_address10.getAddress)(tx2.from) !== this.address) { + logger18.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from); } delete tx2.from; } - const signature2 = this._signingKey().signDigest(keccak256(serialize(tx2))); + const signature2 = this._signingKey().signDigest((0, import_keccak2569.keccak256)(serialize(tx2))); return serialize(tx2, signature2); }); } signMessage(message) { - return __awaiter8(this, void 0, void 0, function* () { - return (0, import_bytes27.joinSignature)(this._signingKey().signDigest(hashMessage(message))); + return __awaiter6(this, void 0, void 0, function* () { + return (0, import_bytes24.joinSignature)(this._signingKey().signDigest(hashMessage(message))); }); } _signTypedData(domain, types2, value) { - return __awaiter8(this, void 0, void 0, function* () { + return __awaiter6(this, void 0, void 0, function* () { const populated = yield TypedDataEncoder.resolveNames(domain, types2, value, (name6) => { if (this.provider == null) { - logger22.throwError("cannot resolve ENS names without a provider", import_logger22.Logger.errors.UNSUPPORTED_OPERATION, { + logger18.throwError("cannot resolve ENS names without a provider", import_logger18.Logger.errors.UNSUPPORTED_OPERATION, { operation: "resolveName", value: name6 }); } return this.provider.resolveName(name6); }); - return (0, import_bytes27.joinSignature)(this._signingKey().signDigest(TypedDataEncoder.hash(populated.domain, types2, populated.value))); + return (0, import_bytes24.joinSignature)(this._signingKey().signDigest(TypedDataEncoder.hash(populated.domain, types2, populated.value))); }); } encrypt(password, options, progressCallback) { @@ -166944,7 +224255,7 @@ ${bz(e, r10)}`); options = {}; } if (options.extraEntropy) { - entropy = (0, import_bytes27.arrayify)((0, import_bytes27.hexDataSlice)(keccak256((0, import_bytes27.concat)([entropy, options.extraEntropy])), 0, 16)); + entropy = (0, import_bytes24.arrayify)((0, import_bytes24.hexDataSlice)((0, import_keccak2569.keccak256)((0, import_bytes24.concat)([entropy, options.extraEntropy])), 0, 16)); } const mnemonic = entropyToMnemonic(entropy, options.locale); return Wallet.fromMnemonic(mnemonic, options.path, options.locale); @@ -166975,8 +224286,8 @@ ${bz(e, r10)}`); var constants = __toESM(require_lib5()); // node_modules/@ethersproject/providers/lib.esm/index.js - var lib_exports3 = {}; - __export(lib_exports3, { + var lib_exports2 = {}; + __export(lib_exports2, { AlchemyProvider: () => AlchemyProvider, AlchemyWebSocketProvider: () => AlchemyWebSocketProvider, AnkrProvider: () => AnkrProvider, @@ -167007,13 +224318,13 @@ ${bz(e, r10)}`); }); // ../../node_modules/@ethersproject/networks/lib.esm/index.js - var import_logger23 = __toESM(require_lib()); + var import_logger19 = __toESM(require_lib()); // ../../node_modules/@ethersproject/networks/lib.esm/_version.js - var version18 = "networks/5.7.1"; + var version14 = "networks/5.7.1"; // ../../node_modules/@ethersproject/networks/lib.esm/index.js - var logger23 = new import_logger23.Logger(version18); + var logger19 = new import_logger19.Logger(version14); function isRenetworkable(value) { return value && typeof value.renetwork === "function"; } @@ -167214,12 +224525,12 @@ ${bz(e, r10)}`); const standard = networks[network3.name]; if (!standard) { if (typeof network3.chainId !== "number") { - logger23.throwArgumentError("invalid network chainId", "network", network3); + logger19.throwArgumentError("invalid network chainId", "network", network3); } return network3; } if (network3.chainId !== 0 && network3.chainId !== standard.chainId) { - logger23.throwArgumentError("network chainId mismatch", "network", network3); + logger19.throwArgumentError("network chainId mismatch", "network", network3); } let defaultProvider = network3._defaultProvider || null; if (defaultProvider == null && standard._defaultProvider) { @@ -167238,22 +224549,24 @@ ${bz(e, r10)}`); } // node_modules/@ethersproject/providers/lib.esm/base-provider.js - var import_bignumber12 = __toESM(require_lib3()); - var import_bytes31 = __toESM(require_lib2()); + var import_bignumber11 = __toESM(require_lib3()); + var import_bytes28 = __toESM(require_lib2()); var import_constants4 = __toESM(require_lib5()); + var import_properties18 = __toESM(require_lib7()); var import_strings10 = __toESM(require_lib6()); // ../../node_modules/@ethersproject/web/lib.esm/index.js - var import_bytes29 = __toESM(require_lib2()); + var import_bytes26 = __toESM(require_lib2()); + var import_properties16 = __toESM(require_lib7()); var import_strings9 = __toESM(require_lib6()); - var import_logger24 = __toESM(require_lib()); + var import_logger20 = __toESM(require_lib()); // ../../node_modules/@ethersproject/web/lib.esm/_version.js - var version19 = "web/5.7.1"; + var version15 = "web/5.7.1"; // ../../node_modules/@ethersproject/web/lib.esm/geturl.js - var import_bytes28 = __toESM(require_lib2()); - var __awaiter9 = function(thisArg, _arguments, P, generator) { + var import_bytes25 = __toESM(require_lib2()); + var __awaiter7 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -167281,7 +224594,7 @@ ${bz(e, r10)}`); }); }; function getUrl(href, options) { - return __awaiter9(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { if (options == null) { options = {}; } @@ -167332,13 +224645,13 @@ ${bz(e, r10)}`); headers, statusCode: response.status, statusMessage: response.statusText, - body: (0, import_bytes28.arrayify)(new Uint8Array(body)) + body: (0, import_bytes25.arrayify)(new Uint8Array(body)) }; }); } // ../../node_modules/@ethersproject/web/lib.esm/index.js - var __awaiter10 = function(thisArg, _arguments, P, generator) { + var __awaiter8 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -167365,7 +224678,7 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger24 = new import_logger24.Logger(version19); + var logger20 = new import_logger20.Logger(version15); function staller(duration) { return new Promise((resolve) => { setTimeout(resolve, duration); @@ -167378,7 +224691,7 @@ ${bz(e, r10)}`); if (typeof value === "string") { return value; } - if ((0, import_bytes29.isBytesLike)(value)) { + if ((0, import_bytes26.isBytesLike)(value)) { if (type && (type.split("/")[0] === "text" || type.split(";")[0].trim() === "application/json")) { try { return (0, import_strings9.toUtf8String)(value); @@ -167386,7 +224699,7 @@ ${bz(e, r10)}`); } ; } - return (0, import_bytes29.hexlify)(value); + return (0, import_bytes26.hexlify)(value); } return value; } @@ -167397,10 +224710,10 @@ ${bz(e, r10)}`); } function _fetchData(connection, body, processFunc) { const attemptLimit = typeof connection === "object" && connection.throttleLimit != null ? connection.throttleLimit : 12; - logger24.assertArgument(attemptLimit > 0 && attemptLimit % 1 === 0, "invalid connection throttle limit", "connection.throttleLimit", attemptLimit); + logger20.assertArgument(attemptLimit > 0 && attemptLimit % 1 === 0, "invalid connection throttle limit", "connection.throttleLimit", attemptLimit); const throttleCallback = typeof connection === "object" ? connection.throttleCallback : null; const throttleSlotInterval = typeof connection === "object" && typeof connection.throttleSlotInterval === "number" ? connection.throttleSlotInterval : 100; - logger24.assertArgument(throttleSlotInterval > 0 && throttleSlotInterval % 1 === 0, "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval); + logger20.assertArgument(throttleSlotInterval > 0 && throttleSlotInterval % 1 === 0, "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval); const errorPassThrough = typeof connection === "object" ? !!connection.errorPassThrough : false; const headers = {}; let url = null; @@ -167413,7 +224726,7 @@ ${bz(e, r10)}`); url = connection; } else if (typeof connection === "object") { if (connection == null || connection.url == null) { - logger24.throwArgumentError("missing URL", "connection.url", connection); + logger20.throwArgumentError("missing URL", "connection.url", connection); } url = connection.url; if (typeof connection.timeout === "number" && connection.timeout > 0) { @@ -167430,19 +224743,19 @@ ${bz(e, r10)}`); options.allowGzip = !!connection.allowGzip; if (connection.user != null && connection.password != null) { if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) { - logger24.throwError("basic authentication requires a secure https url", import_logger24.Logger.errors.INVALID_ARGUMENT, { argument: "url", url, user: connection.user, password: "[REDACTED]" }); + logger20.throwError("basic authentication requires a secure https url", import_logger20.Logger.errors.INVALID_ARGUMENT, { argument: "url", url, user: connection.user, password: "[REDACTED]" }); } const authorization = connection.user + ":" + connection.password; headers["authorization"] = { key: "Authorization", - value: "Basic " + encode2((0, import_strings9.toUtf8Bytes)(authorization)) + value: "Basic " + encode((0, import_strings9.toUtf8Bytes)(authorization)) }; } if (connection.skipFetchSetup != null) { options.skipFetchSetup = !!connection.skipFetchSetup; } if (connection.fetchOptions != null) { - options.fetchOptions = shallowCopy(connection.fetchOptions); + options.fetchOptions = (0, import_properties16.shallowCopy)(connection.fetchOptions); } } const reData = new RegExp("^data:([^;:]*)?(;base64)?,(.*)$", "i"); @@ -167453,7 +224766,7 @@ ${bz(e, r10)}`); statusCode: 200, statusMessage: "OK", headers: { "content-type": dataMatch[1] || "text/plain" }, - body: dataMatch[2] ? decode2(dataMatch[3]) : unpercent(dataMatch[3]) + body: dataMatch[2] ? decode(dataMatch[3]) : unpercent(dataMatch[3]) }; let result = response.body; if (processFunc) { @@ -167461,7 +224774,7 @@ ${bz(e, r10)}`); } return Promise.resolve(result); } catch (error) { - logger24.throwError("processing response error", import_logger24.Logger.errors.SERVER_ERROR, { + logger20.throwError("processing response error", import_logger20.Logger.errors.SERVER_ERROR, { body: bodyify(dataMatch[1], dataMatch[2]), error, requestBody: null, @@ -167495,7 +224808,7 @@ ${bz(e, r10)}`); return; } timer2 = null; - reject(logger24.makeError("timeout", import_logger24.Logger.errors.TIMEOUT, { + reject(logger20.makeError("timeout", import_logger20.Logger.errors.TIMEOUT, { requestBody: bodyify(options.body, flatHeaders["content-type"]), requestMethod: options.method, timeout, @@ -167514,7 +224827,7 @@ ${bz(e, r10)}`); return { promise, cancel }; }(); const runningFetch = function() { - return __awaiter10(this, void 0, void 0, function* () { + return __awaiter8(this, void 0, void 0, function* () { for (let attempt = 0; attempt < attemptLimit; attempt++) { let response = null; try { @@ -167548,7 +224861,7 @@ ${bz(e, r10)}`); response = error.response; if (response == null) { runningTimeout.cancel(); - logger24.throwError("missing response", import_logger24.Logger.errors.SERVER_ERROR, { + logger20.throwError("missing response", import_logger20.Logger.errors.SERVER_ERROR, { requestBody: bodyify(options.body, flatHeaders["content-type"]), requestMethod: options.method, serverError: error, @@ -167561,7 +224874,7 @@ ${bz(e, r10)}`); body2 = null; } else if (!errorPassThrough && (response.statusCode < 200 || response.statusCode >= 300)) { runningTimeout.cancel(); - logger24.throwError("bad response", import_logger24.Logger.errors.SERVER_ERROR, { + logger20.throwError("bad response", import_logger20.Logger.errors.SERVER_ERROR, { status: response.statusCode, headers: response.headers, body: bodyify(body2, response.headers ? response.headers["content-type"] : null), @@ -167588,7 +224901,7 @@ ${bz(e, r10)}`); } } runningTimeout.cancel(); - logger24.throwError("processing response error", import_logger24.Logger.errors.SERVER_ERROR, { + logger20.throwError("processing response error", import_logger20.Logger.errors.SERVER_ERROR, { body: bodyify(body2, response.headers ? response.headers["content-type"] : null), error, requestBody: bodyify(options.body, flatHeaders["content-type"]), @@ -167600,7 +224913,7 @@ ${bz(e, r10)}`); runningTimeout.cancel(); return body2; } - return logger24.throwError("failed response", import_logger24.Logger.errors.SERVER_ERROR, { + return logger20.throwError("failed response", import_logger20.Logger.errors.SERVER_ERROR, { requestBody: bodyify(options.body, flatHeaders["content-type"]), requestMethod: options.method, url @@ -167616,7 +224929,7 @@ ${bz(e, r10)}`); try { result = JSON.parse((0, import_strings9.toUtf8String)(value)); } catch (error) { - logger24.throwError("invalid JSON", import_logger24.Logger.errors.SERVER_ERROR, { + logger20.throwError("invalid JSON", import_logger20.Logger.errors.SERVER_ERROR, { body: value, error }); @@ -167630,11 +224943,11 @@ ${bz(e, r10)}`); let body = null; if (json != null) { body = (0, import_strings9.toUtf8Bytes)(json); - const updated = typeof connection === "string" ? { url: connection } : shallowCopy(connection); + const updated = typeof connection === "string" ? { url: connection } : (0, import_properties16.shallowCopy)(connection); if (updated.headers) { const hasContentType = Object.keys(updated.headers).filter((k) => k.toLowerCase() === "content-type").length !== 0; if (!hasContentType) { - updated.headers = shallowCopy(updated.headers); + updated.headers = (0, import_properties16.shallowCopy)(updated.headers); updated.headers["content-type"] = "application/json"; } } else { @@ -167648,7 +224961,7 @@ ${bz(e, r10)}`); if (!options) { options = {}; } - options = shallowCopy(options); + options = (0, import_properties16.shallowCopy)(options); if (options.floor == null) { options.floor = 0; } @@ -167720,17 +225033,19 @@ ${bz(e, r10)}`); // node_modules/@ethersproject/providers/lib.esm/base-provider.js var import_bech32 = __toESM(require_bech32()); - var import_logger26 = __toESM(require_lib()); + var import_logger22 = __toESM(require_lib()); // node_modules/@ethersproject/providers/lib.esm/_version.js - var version20 = "providers/5.7.2"; + var version16 = "providers/5.7.2"; // node_modules/@ethersproject/providers/lib.esm/formatter.js - var import_bignumber11 = __toESM(require_lib3()); - var import_bytes30 = __toESM(require_lib2()); + var import_address11 = __toESM(require_lib10()); + var import_bignumber10 = __toESM(require_lib3()); + var import_bytes27 = __toESM(require_lib2()); var import_constants3 = __toESM(require_lib5()); - var import_logger25 = __toESM(require_lib()); - var logger25 = new import_logger25.Logger(version20); + var import_properties17 = __toESM(require_lib7()); + var import_logger21 = __toESM(require_lib()); + var logger21 = new import_logger21.Logger(version16); var Formatter = class { constructor() { this.formats = this.getDefaultFormats(); @@ -167826,7 +225141,7 @@ ${bz(e, r10)}`); transactions: Formatter.allowNull(Formatter.arrayOf(hash8)), baseFeePerGas: Formatter.allowNull(bigNumber) }; - formats.blockWithTransactions = shallowCopy(formats.block); + formats.blockWithTransactions = (0, import_properties17.shallowCopy)(formats.block); formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))); formats.filter = { fromBlock: Formatter.allowNull(blockTag, void 0), @@ -167855,16 +225170,16 @@ ${bz(e, r10)}`); if (number4 === "0x") { return 0; } - return import_bignumber11.BigNumber.from(number4).toNumber(); + return import_bignumber10.BigNumber.from(number4).toNumber(); } type(number4) { if (number4 === "0x" || number4 == null) { return 0; } - return import_bignumber11.BigNumber.from(number4).toNumber(); + return import_bignumber10.BigNumber.from(number4).toNumber(); } bigNumber(value) { - return import_bignumber11.BigNumber.from(value); + return import_bignumber10.BigNumber.from(value); } boolean(value) { if (typeof value === "boolean") { @@ -167886,11 +225201,11 @@ ${bz(e, r10)}`); if (!strict && value.substring(0, 2) !== "0x") { value = "0x" + value; } - if ((0, import_bytes30.isHexString)(value)) { + if ((0, import_bytes27.isHexString)(value)) { return value.toLowerCase(); } } - return logger25.throwArgumentError("invalid hash", "value", value); + return logger21.throwArgumentError("invalid hash", "value", value); } data(value, strict) { const result = this.hex(value, strict); @@ -167900,17 +225215,17 @@ ${bz(e, r10)}`); return result; } address(value) { - return getAddress(value); + return (0, import_address11.getAddress)(value); } callAddress(value) { - if (!(0, import_bytes30.isHexString)(value, 32)) { + if (!(0, import_bytes27.isHexString)(value, 32)) { return null; } - const address = getAddress((0, import_bytes30.hexDataSlice)(value, 12)); + const address = (0, import_address11.getAddress)((0, import_bytes27.hexDataSlice)(value, 12)); return address === import_constants3.AddressZero ? null : address; } contractAddress(value) { - return getContractAddress(value); + return (0, import_address11.getContractAddress)(value); } blockTag(blockTag) { if (blockTag == null) { @@ -167928,15 +225243,15 @@ ${bz(e, r10)}`); case "finalized": return blockTag; } - if (typeof blockTag === "number" || (0, import_bytes30.isHexString)(blockTag)) { - return (0, import_bytes30.hexValue)(blockTag); + if (typeof blockTag === "number" || (0, import_bytes27.isHexString)(blockTag)) { + return (0, import_bytes27.hexValue)(blockTag); } throw new Error("invalid blockTag"); } hash(value, strict) { const result = this.hex(value, strict); - if ((0, import_bytes30.hexDataLength)(result) !== 32) { - return logger25.throwArgumentError("invalid hash", "value", value); + if ((0, import_bytes27.hexDataLength)(result) !== 32) { + return logger21.throwArgumentError("invalid hash", "value", value); } return result; } @@ -167944,7 +225259,7 @@ ${bz(e, r10)}`); if (value == null) { return null; } - const v = import_bignumber11.BigNumber.from(value); + const v = import_bignumber10.BigNumber.from(value); try { return v.toNumber(); } catch (error) { @@ -167952,10 +225267,10 @@ ${bz(e, r10)}`); return null; } uint256(value) { - if (!(0, import_bytes30.isHexString)(value)) { + if (!(0, import_bytes27.isHexString)(value)) { throw new Error("invalid uint256"); } - return (0, import_bytes30.hexZeroPad)(value, 32); + return (0, import_bytes27.hexZeroPad)(value, 32); } _block(value, format) { if (value.author != null && value.miner == null) { @@ -167963,7 +225278,7 @@ ${bz(e, r10)}`); } const difficulty = value._difficulty != null ? value._difficulty : value.difficulty; const result = Formatter.check(format, value); - result._difficulty = difficulty == null ? null : import_bignumber11.BigNumber.from(difficulty); + result._difficulty = difficulty == null ? null : import_bignumber10.BigNumber.from(difficulty); return result; } block(value) { @@ -167979,7 +225294,7 @@ ${bz(e, r10)}`); if (transaction.gas != null && transaction.gasLimit == null) { transaction.gasLimit = transaction.gas; } - if (transaction.to && import_bignumber11.BigNumber.from(transaction.to).isZero()) { + if (transaction.to && import_bignumber10.BigNumber.from(transaction.to).isZero()) { transaction.to = "0x0000000000000000000000000000000000000000"; } if (transaction.input != null && transaction.data == null) { @@ -167994,8 +225309,8 @@ ${bz(e, r10)}`); const result = Formatter.check(this.formats.transaction, transaction); if (transaction.chainId != null) { let chainId = transaction.chainId; - if ((0, import_bytes30.isHexString)(chainId)) { - chainId = import_bignumber11.BigNumber.from(chainId).toNumber(); + if ((0, import_bytes27.isHexString)(chainId)) { + chainId = import_bignumber10.BigNumber.from(chainId).toNumber(); } result.chainId = chainId; } else { @@ -168003,8 +225318,8 @@ ${bz(e, r10)}`); if (chainId == null && result.v == null) { chainId = transaction.chainId; } - if ((0, import_bytes30.isHexString)(chainId)) { - chainId = import_bignumber11.BigNumber.from(chainId).toNumber(); + if ((0, import_bytes27.isHexString)(chainId)) { + chainId = import_bignumber10.BigNumber.from(chainId).toNumber(); } if (typeof chainId !== "number" && result.v != null) { chainId = (result.v - 35) / 2; @@ -168033,18 +225348,18 @@ ${bz(e, r10)}`); const result = Formatter.check(this.formats.receipt, value); if (result.root != null) { if (result.root.length <= 4) { - const value2 = import_bignumber11.BigNumber.from(result.root).toNumber(); + const value2 = import_bignumber10.BigNumber.from(result.root).toNumber(); if (value2 === 0 || value2 === 1) { if (result.status != null && result.status !== value2) { - logger25.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status }); + logger21.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status }); } result.status = value2; delete result.root; } else { - logger25.throwArgumentError("invalid alt-root-status", "value.root", result.root); + logger21.throwArgumentError("invalid alt-root-status", "value.root", result.root); } } else if (result.root.length !== 66) { - logger25.throwArgumentError("invalid root hash", "value.root", result.root); + logger21.throwArgumentError("invalid root hash", "value.root", result.root); } } if (result.status != null) { @@ -168138,7 +225453,7 @@ ${bz(e, r10)}`); } // node_modules/@ethersproject/providers/lib.esm/base-provider.js - var __awaiter11 = function(thisArg, _arguments, P, generator) { + var __awaiter9 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -168165,14 +225480,14 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger26 = new import_logger26.Logger(version20); + var logger22 = new import_logger22.Logger(version16); var MAX_CCIP_REDIRECTS = 10; function checkTopic(topic) { if (topic == null) { return "null"; } - if ((0, import_bytes31.hexDataLength)(topic) !== 32) { - logger26.throwArgumentError("invalid topic", "topic", topic); + if ((0, import_bytes28.hexDataLength)(topic) !== 32) { + logger22.throwArgumentError("invalid topic", "topic", topic); } return topic.toLowerCase(); } @@ -168212,7 +225527,7 @@ ${bz(e, r10)}`); function getEventTag2(eventName) { if (typeof eventName === "string") { eventName = eventName.toLowerCase(); - if ((0, import_bytes31.hexDataLength)(eventName) === 32) { + if ((0, import_bytes28.hexDataLength)(eventName) === 32) { return "tx:" + eventName; } if (eventName.indexOf(":") === -1) { @@ -168221,7 +225536,7 @@ ${bz(e, r10)}`); } else if (Array.isArray(eventName)) { return "filter:*:" + serializeTopics(eventName); } else if (ForkEvent.isForkEvent(eventName)) { - logger26.warn("not implemented"); + logger22.warn("not implemented"); throw new Error("not implemented"); } else if (eventName && typeof eventName === "object") { return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []); @@ -168239,9 +225554,9 @@ ${bz(e, r10)}`); var PollableEvents = ["block", "network", "pending", "poll"]; var Event = class { constructor(tag, listener, once) { - defineReadOnly(this, "tag", tag); - defineReadOnly(this, "listener", listener); - defineReadOnly(this, "once", once); + (0, import_properties18.defineReadOnly)(this, "tag", tag); + (0, import_properties18.defineReadOnly)(this, "listener", listener); + (0, import_properties18.defineReadOnly)(this, "once", once); this._lastBlockNumber = -2; this._inflight = false; } @@ -168293,10 +225608,10 @@ ${bz(e, r10)}`); "700": { symbol: "xdai", ilk: "eth" } }; function bytes32ify(value) { - return (0, import_bytes31.hexZeroPad)(import_bignumber12.BigNumber.from(value).toHexString(), 32); + return (0, import_bytes28.hexZeroPad)(import_bignumber11.BigNumber.from(value).toHexString(), 32); } function base58Encode(data) { - return Base58.encode((0, import_bytes31.concat)([data, (0, import_bytes31.hexDataSlice)(sha256(sha256(data)), 0, 4)])); + return Base58.encode((0, import_bytes28.concat)([data, (0, import_bytes28.hexDataSlice)(sha256(sha256(data)), 0, 4)])); } var matcherIpfs = new RegExp("^(ipfs)://(.*)$", "i"); var matchers = [ @@ -168316,9 +225631,9 @@ ${bz(e, r10)}`); if (result === "0x") { return null; } - const offset = import_bignumber12.BigNumber.from((0, import_bytes31.hexDataSlice)(result, start, start + 32)).toNumber(); - const length = import_bignumber12.BigNumber.from((0, import_bytes31.hexDataSlice)(result, offset, offset + 32)).toNumber(); - return (0, import_bytes31.hexDataSlice)(result, offset + 32, offset + 32 + length); + const offset = import_bignumber11.BigNumber.from((0, import_bytes28.hexDataSlice)(result, start, start + 32)).toNumber(); + const length = import_bignumber11.BigNumber.from((0, import_bytes28.hexDataSlice)(result, offset, offset + 32)).toNumber(); + return (0, import_bytes28.hexDataSlice)(result, offset + 32, offset + 32 + length); } function getIpfsLink(link) { if (link.match(/^ipfs:\/\/ipfs\//i)) { @@ -168326,12 +225641,12 @@ ${bz(e, r10)}`); } else if (link.match(/^ipfs:\/\//i)) { link = link.substring(7); } else { - logger26.throwArgumentError("unsupported IPFS format", "link", link); + logger22.throwArgumentError("unsupported IPFS format", "link", link); } return `https://gateway.ipfs.io/ipfs/${link}`; } function numPad(value) { - const result = (0, import_bytes31.arrayify)(value); + const result = (0, import_bytes28.arrayify)(value); if (result.length > 32) { throw new Error("internal; should not happen"); } @@ -168355,20 +225670,20 @@ ${bz(e, r10)}`); byteCount += 32; } for (let i = 0; i < datas.length; i++) { - const data = (0, import_bytes31.arrayify)(datas[i]); + const data = (0, import_bytes28.arrayify)(datas[i]); result[i] = numPad(byteCount); result.push(numPad(data.length)); result.push(bytesPad(data)); byteCount += 32 + Math.ceil(data.length / 32) * 32; } - return (0, import_bytes31.hexConcat)(result); + return (0, import_bytes28.hexConcat)(result); } var Resolver = class { constructor(provider, address, name6, resolvedAddress) { - defineReadOnly(this, "provider", provider); - defineReadOnly(this, "name", name6); - defineReadOnly(this, "address", provider.formatter.address(address)); - defineReadOnly(this, "_resolvedAddress", resolvedAddress); + (0, import_properties18.defineReadOnly)(this, "provider", provider); + (0, import_properties18.defineReadOnly)(this, "name", name6); + (0, import_properties18.defineReadOnly)(this, "address", provider.formatter.address(address)); + (0, import_properties18.defineReadOnly)(this, "_resolvedAddress", resolvedAddress); } supportsWildcard() { if (!this._supportsEip2544) { @@ -168376,9 +225691,9 @@ ${bz(e, r10)}`); to: this.address, data: "0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000" }).then((result) => { - return import_bignumber12.BigNumber.from(result).eq(1); + return import_bignumber11.BigNumber.from(result).eq(1); }).catch((error) => { - if (error.code === import_logger26.Logger.errors.CALL_EXCEPTION) { + if (error.code === import_logger22.Logger.errors.CALL_EXCEPTION) { return false; } this._supportsEip2544 = null; @@ -168388,21 +225703,21 @@ ${bz(e, r10)}`); return this._supportsEip2544; } _fetch(selector, parameters) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const tx2 = { to: this.address, ccipReadEnabled: true, - data: (0, import_bytes31.hexConcat)([selector, namehash(this.name), parameters || "0x"]) + data: (0, import_bytes28.hexConcat)([selector, namehash(this.name), parameters || "0x"]) }; let parseBytes = false; if (yield this.supportsWildcard()) { parseBytes = true; - tx2.data = (0, import_bytes31.hexConcat)(["0x9061b923", encodeBytes([dnsEncode(this.name), tx2.data])]); + tx2.data = (0, import_bytes28.hexConcat)(["0x9061b923", encodeBytes([dnsEncode(this.name), tx2.data])]); } try { let result = yield this.provider.call(tx2); - if ((0, import_bytes31.arrayify)(result).length % 32 === 4) { - logger26.throwError("resolver threw error", import_logger26.Logger.errors.CALL_EXCEPTION, { + if ((0, import_bytes28.arrayify)(result).length % 32 === 4) { + logger22.throwError("resolver threw error", import_logger22.Logger.errors.CALL_EXCEPTION, { transaction: tx2, data: result }); @@ -168412,7 +225727,7 @@ ${bz(e, r10)}`); } return result; } catch (error) { - if (error.code === import_logger26.Logger.errors.CALL_EXCEPTION) { + if (error.code === import_logger22.Logger.errors.CALL_EXCEPTION) { return null; } throw error; @@ -168420,7 +225735,7 @@ ${bz(e, r10)}`); }); } _fetchBytes(selector, parameters) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const result = yield this._fetch(selector, parameters); if (result != null) { return _parseBytes(result, 0); @@ -168431,20 +225746,20 @@ ${bz(e, r10)}`); _getAddress(coinType, hexBytes) { const coinInfo = coinInfos[String(coinType)]; if (coinInfo == null) { - logger26.throwError(`unsupported coin type: ${coinType}`, import_logger26.Logger.errors.UNSUPPORTED_OPERATION, { + logger22.throwError(`unsupported coin type: ${coinType}`, import_logger22.Logger.errors.UNSUPPORTED_OPERATION, { operation: `getAddress(${coinType})` }); } if (coinInfo.ilk === "eth") { return this.provider.formatter.address(hexBytes); } - const bytes5 = (0, import_bytes31.arrayify)(hexBytes); + const bytes5 = (0, import_bytes28.arrayify)(hexBytes); if (coinInfo.p2pkh != null) { const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/); if (p2pkh) { const length = parseInt(p2pkh[1], 16); if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) { - return base58Encode((0, import_bytes31.concat)([[coinInfo.p2pkh], "0x" + p2pkh[2]])); + return base58Encode((0, import_bytes28.concat)([[coinInfo.p2pkh], "0x" + p2pkh[2]])); } } } @@ -168453,30 +225768,30 @@ ${bz(e, r10)}`); if (p2sh) { const length = parseInt(p2sh[1], 16); if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) { - return base58Encode((0, import_bytes31.concat)([[coinInfo.p2sh], "0x" + p2sh[2]])); + return base58Encode((0, import_bytes28.concat)([[coinInfo.p2sh], "0x" + p2sh[2]])); } } } if (coinInfo.prefix != null) { const length = bytes5[1]; - let version27 = bytes5[0]; - if (version27 === 0) { + let version23 = bytes5[0]; + if (version23 === 0) { if (length !== 20 && length !== 32) { - version27 = -1; + version23 = -1; } } else { - version27 = -1; + version23 = -1; } - if (version27 >= 0 && bytes5.length === 2 + length && length >= 1 && length <= 75) { + if (version23 >= 0 && bytes5.length === 2 + length && length >= 1 && length <= 75) { const words2 = import_bech32.default.toWords(bytes5.slice(2)); - words2.unshift(version27); + words2.unshift(version23); return import_bech32.default.encode(coinInfo.prefix, words2); } } return null; } getAddress(coinType) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { if (coinType == null) { coinType = 60; } @@ -168488,7 +225803,7 @@ ${bz(e, r10)}`); } return this.provider.formatter.callAddress(result); } catch (error) { - if (error.code === import_logger26.Logger.errors.CALL_EXCEPTION) { + if (error.code === import_logger22.Logger.errors.CALL_EXCEPTION) { return null; } throw error; @@ -168500,7 +225815,7 @@ ${bz(e, r10)}`); } const address = this._getAddress(coinType, hexBytes); if (address == null) { - logger26.throwError(`invalid or unsupported coin data`, import_logger26.Logger.errors.UNSUPPORTED_OPERATION, { + logger22.throwError(`invalid or unsupported coin data`, import_logger22.Logger.errors.UNSUPPORTED_OPERATION, { operation: `getAddress(${coinType})`, coinType, data: hexBytes @@ -168510,7 +225825,7 @@ ${bz(e, r10)}`); }); } getAvatar() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const linkage = [{ type: "name", content: this.name }]; try { const avatar = yield this.getText("avatar"); @@ -168543,20 +225858,20 @@ ${bz(e, r10)}`); return null; } const addr = yield this.provider.formatter.address(comps[0]); - const tokenId = (0, import_bytes31.hexZeroPad)(import_bignumber12.BigNumber.from(comps[1]).toHexString(), 32); + const tokenId = (0, import_bytes28.hexZeroPad)(import_bignumber11.BigNumber.from(comps[1]).toHexString(), 32); if (scheme === "erc721") { const tokenOwner = this.provider.formatter.callAddress(yield this.provider.call({ to: addr, - data: (0, import_bytes31.hexConcat)(["0x6352211e", tokenId]) + data: (0, import_bytes28.hexConcat)(["0x6352211e", tokenId]) })); if (owner !== tokenOwner) { return null; } linkage.push({ type: "owner", content: tokenOwner }); } else if (scheme === "erc1155") { - const balance = import_bignumber12.BigNumber.from(yield this.provider.call({ + const balance = import_bignumber11.BigNumber.from(yield this.provider.call({ to: addr, - data: (0, import_bytes31.hexConcat)(["0x00fdd58e", (0, import_bytes31.hexZeroPad)(owner, 32), tokenId]) + data: (0, import_bytes28.hexConcat)(["0x00fdd58e", (0, import_bytes28.hexZeroPad)(owner, 32), tokenId]) })); if (balance.isZero()) { return null; @@ -168565,7 +225880,7 @@ ${bz(e, r10)}`); } const tx2 = { to: this.provider.formatter.address(comps[0]), - data: (0, import_bytes31.hexConcat)([selector, tokenId]) + data: (0, import_bytes28.hexConcat)([selector, tokenId]) }; let metadataUrl = _parseString(yield this.provider.call(tx2), 0); if (metadataUrl == null) { @@ -168609,7 +225924,7 @@ ${bz(e, r10)}`); }); } getContentHash() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const hexBytes = yield this._fetchBytes("0xbc1c58d1"); if (hexBytes == null || hexBytes === "0x") { return null; @@ -168638,24 +225953,24 @@ ${bz(e, r10)}`); if (skynet) { if (skynet[1].length === 34 * 2) { const urlSafe = { "=": "", "+": "-", "/": "_" }; - const hash8 = encode2("0x" + skynet[1]).replace(/[=+\/]/g, (a) => urlSafe[a]); + const hash8 = encode("0x" + skynet[1]).replace(/[=+\/]/g, (a) => urlSafe[a]); return "sia://" + hash8; } } - return logger26.throwError(`invalid or unsupported content hash data`, import_logger26.Logger.errors.UNSUPPORTED_OPERATION, { + return logger22.throwError(`invalid or unsupported content hash data`, import_logger22.Logger.errors.UNSUPPORTED_OPERATION, { operation: "getContentHash()", data: hexBytes }); }); } getText(key2) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { let keyBytes = (0, import_strings10.toUtf8Bytes)(key2); - keyBytes = (0, import_bytes31.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]); + keyBytes = (0, import_bytes28.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]); if (keyBytes.length % 32 !== 0) { - keyBytes = (0, import_bytes31.concat)([keyBytes, (0, import_bytes31.hexZeroPad)("0x", 32 - key2.length % 32)]); + keyBytes = (0, import_bytes28.concat)([keyBytes, (0, import_bytes28.hexZeroPad)("0x", 32 - key2.length % 32)]); } - const hexBytes = yield this._fetchBytes("0x59d1d43c", (0, import_bytes31.hexlify)(keyBytes)); + const hexBytes = yield this._fetchBytes("0x59d1d43c", (0, import_bytes28.hexlify)(keyBytes)); if (hexBytes == null || hexBytes === "0x") { return null; } @@ -168672,7 +225987,7 @@ ${bz(e, r10)}`); this._emitted = { block: -2 }; this.disableCcipRead = false; this.formatter = new.target.getFormatter(); - defineReadOnly(this, "anyNetwork", network3 === "any"); + (0, import_properties18.defineReadOnly)(this, "anyNetwork", network3 === "any"); if (this.anyNetwork) { network3 = this.detectNetwork(); } @@ -168683,12 +225998,12 @@ ${bz(e, r10)}`); this._ready().catch((error) => { }); } else { - const knownNetwork = getStatic(new.target, "getNetwork")(network3); + const knownNetwork = (0, import_properties18.getStatic)(new.target, "getNetwork")(network3); if (knownNetwork) { - defineReadOnly(this, "_network", knownNetwork); + (0, import_properties18.defineReadOnly)(this, "_network", knownNetwork); this.emit("network", knownNetwork, null); } else { - logger26.throwArgumentError("invalid network", "network", network3); + logger22.throwArgumentError("invalid network", "network", network3); } } this._maxInternalBlockNumber = -1024; @@ -168698,7 +226013,7 @@ ${bz(e, r10)}`); this._fastQueryDate = 0; } _ready() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { if (this._network == null) { let network3 = null; if (this._networkPromise) { @@ -168711,13 +226026,13 @@ ${bz(e, r10)}`); network3 = yield this.detectNetwork(); } if (!network3) { - logger26.throwError("no network detected", import_logger26.Logger.errors.UNKNOWN_ERROR, {}); + logger22.throwError("no network detected", import_logger22.Logger.errors.UNKNOWN_ERROR, {}); } if (this._network == null) { if (this.anyNetwork) { this._network = network3; } else { - defineReadOnly(this, "_network", network3); + (0, import_properties18.defineReadOnly)(this, "_network", network3); } this.emit("network", network3, null); } @@ -168730,7 +226045,7 @@ ${bz(e, r10)}`); return this._ready().then((network3) => { return network3; }, (error) => { - if (error.code === import_logger26.Logger.errors.NETWORK_ERROR && error.event === "noNetwork") { + if (error.code === import_logger22.Logger.errors.NETWORK_ERROR && error.event === "noNetwork") { return void 0; } throw error; @@ -168747,7 +226062,7 @@ ${bz(e, r10)}`); return getNetwork(network3 == null ? "homestead" : network3); } ccipReadFetch(tx2, calldata, urls) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { if (this.disableCcipRead || urls.length === 0) { return null; } @@ -168767,18 +226082,18 @@ ${bz(e, r10)}`); } const errorMessage = result.message || "unknown error"; if (result.status >= 400 && result.status < 500) { - return logger26.throwError(`response not found during CCIP fetch: ${errorMessage}`, import_logger26.Logger.errors.SERVER_ERROR, { url, errorMessage }); + return logger22.throwError(`response not found during CCIP fetch: ${errorMessage}`, import_logger22.Logger.errors.SERVER_ERROR, { url, errorMessage }); } errorMessages.push(errorMessage); } - return logger26.throwError(`error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(", ")}`, import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError(`error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(", ")}`, import_logger22.Logger.errors.SERVER_ERROR, { urls, errorMessages }); }); } _getInternalBlockNumber(maxAge) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this._ready(); if (maxAge > 0) { while (this._internalBlockNumber) { @@ -168797,7 +226112,7 @@ ${bz(e, r10)}`); } } const reqTime = getTime(); - const checkInternalBlockNumber = resolveProperties({ + const checkInternalBlockNumber = (0, import_properties18.resolveProperties)({ blockNumber: this.perform("getBlockNumber", {}), networkError: this.getNetwork().then((network3) => null, (error) => error) }).then(({ blockNumber, networkError }) => { @@ -168808,7 +226123,7 @@ ${bz(e, r10)}`); throw networkError; } const respTime = getTime(); - blockNumber = import_bignumber12.BigNumber.from(blockNumber).toNumber(); + blockNumber = import_bignumber11.BigNumber.from(blockNumber).toNumber(); if (blockNumber < this._maxInternalBlockNumber) { blockNumber = this._maxInternalBlockNumber; } @@ -168826,7 +226141,7 @@ ${bz(e, r10)}`); }); } poll() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const pollId = nextPollId++; const runners = []; let blockNumber = null; @@ -168846,8 +226161,8 @@ ${bz(e, r10)}`); this._emitted.block = blockNumber - 1; } if (Math.abs(this._emitted.block - blockNumber) > 1e3) { - logger26.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`); - this.emit("error", logger26.makeError("network block skew detected", import_logger26.Logger.errors.NETWORK_ERROR, { + logger22.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`); + this.emit("error", logger22.makeError("network block skew detected", import_logger22.Logger.errors.NETWORK_ERROR, { blockNumber, event: "blockSkew", previousBlockNumber: this._emitted.block @@ -168951,14 +226266,14 @@ ${bz(e, r10)}`); return this._network; } detectNetwork() { - return __awaiter11(this, void 0, void 0, function* () { - return logger26.throwError("provider does not support network detection", import_logger26.Logger.errors.UNSUPPORTED_OPERATION, { + return __awaiter9(this, void 0, void 0, function* () { + return logger22.throwError("provider does not support network detection", import_logger22.Logger.errors.UNSUPPORTED_OPERATION, { operation: "provider.detectNetwork" }); }); } getNetwork() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const network3 = yield this._ready(); const currentNetwork = yield this.detectNetwork(); if (network3.chainId !== currentNetwork.chainId) { @@ -168975,7 +226290,7 @@ ${bz(e, r10)}`); yield stall(0); return this._network; } - const error = logger26.makeError("underlying network changed", import_logger26.Logger.errors.NETWORK_ERROR, { + const error = logger22.makeError("underlying network changed", import_logger22.Logger.errors.NETWORK_ERROR, { event: "changed", network: network3, detectedNetwork: currentNetwork @@ -169056,12 +226371,12 @@ ${bz(e, r10)}`); } } waitForTransaction(transactionHash, confirmations, timeout) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { return this._waitForTransaction(transactionHash, confirmations == null ? 1 : confirmations, timeout || 0, null); }); } _waitForTransaction(transactionHash, confirmations, timeout, replaceable) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const receipt = yield this.getTransactionReceipt(transactionHash); if ((receipt ? receipt.confirmations : 0) >= confirmations) { return receipt; @@ -169095,12 +226410,12 @@ ${bz(e, r10)}`); if (replaceable) { let lastBlockNumber = replaceable.startBlock; let scannedBlock = null; - const replaceHandler = (blockNumber) => __awaiter11(this, void 0, void 0, function* () { + const replaceHandler = (blockNumber) => __awaiter9(this, void 0, void 0, function* () { if (done) { return; } yield stall(1e3); - this.getTransactionCount(replaceable.from).then((nonce) => __awaiter11(this, void 0, void 0, function* () { + this.getTransactionCount(replaceable.from).then((nonce) => __awaiter9(this, void 0, void 0, function* () { if (done) { return; } @@ -169143,7 +226458,7 @@ ${bz(e, r10)}`); } else if (tx2.data === "0x" && tx2.from === tx2.to && tx2.value.isZero()) { reason = "cancelled"; } - reject(logger26.makeError("transaction was replaced", import_logger26.Logger.errors.TRANSACTION_REPLACED, { + reject(logger22.makeError("transaction was replaced", import_logger22.Logger.errors.TRANSACTION_REPLACED, { cancelled: reason === "replaced" || reason === "cancelled", reason, replacement: this._wrapTransaction(tx2), @@ -169180,7 +226495,7 @@ ${bz(e, r10)}`); if (alreadyDone()) { return; } - reject(logger26.makeError("timeout exceeded", import_logger26.Logger.errors.TIMEOUT, { timeout })); + reject(logger22.makeError("timeout exceeded", import_logger22.Logger.errors.TIMEOUT, { timeout })); }, timeout); if (timer2.unref) { timer2.unref(); @@ -169193,18 +226508,18 @@ ${bz(e, r10)}`); }); } getBlockNumber() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { return this._getInternalBlockNumber(0); }); } getGasPrice() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); const result = yield this.perform("getGasPrice", {}); try { - return import_bignumber12.BigNumber.from(result); + return import_bignumber11.BigNumber.from(result); } catch (error) { - return logger26.throwError("bad result from backend", import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError("bad result from backend", import_logger22.Logger.errors.SERVER_ERROR, { method: "getGasPrice", result, error @@ -169213,17 +226528,17 @@ ${bz(e, r10)}`); }); } getBalance(addressOrName, blockTag) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const params = yield resolveProperties({ + const params = yield (0, import_properties18.resolveProperties)({ address: this._getAddress(addressOrName), blockTag: this._getBlockTag(blockTag) }); const result = yield this.perform("getBalance", params); try { - return import_bignumber12.BigNumber.from(result); + return import_bignumber11.BigNumber.from(result); } catch (error) { - return logger26.throwError("bad result from backend", import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError("bad result from backend", import_logger22.Logger.errors.SERVER_ERROR, { method: "getBalance", params, result, @@ -169233,17 +226548,17 @@ ${bz(e, r10)}`); }); } getTransactionCount(addressOrName, blockTag) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const params = yield resolveProperties({ + const params = yield (0, import_properties18.resolveProperties)({ address: this._getAddress(addressOrName), blockTag: this._getBlockTag(blockTag) }); const result = yield this.perform("getTransactionCount", params); try { - return import_bignumber12.BigNumber.from(result).toNumber(); + return import_bignumber11.BigNumber.from(result).toNumber(); } catch (error) { - return logger26.throwError("bad result from backend", import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError("bad result from backend", import_logger22.Logger.errors.SERVER_ERROR, { method: "getTransactionCount", params, result, @@ -169253,17 +226568,17 @@ ${bz(e, r10)}`); }); } getCode(addressOrName, blockTag) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const params = yield resolveProperties({ + const params = yield (0, import_properties18.resolveProperties)({ address: this._getAddress(addressOrName), blockTag: this._getBlockTag(blockTag) }); const result = yield this.perform("getCode", params); try { - return (0, import_bytes31.hexlify)(result); + return (0, import_bytes28.hexlify)(result); } catch (error) { - return logger26.throwError("bad result from backend", import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError("bad result from backend", import_logger22.Logger.errors.SERVER_ERROR, { method: "getCode", params, result, @@ -169273,18 +226588,18 @@ ${bz(e, r10)}`); }); } getStorageAt(addressOrName, position, blockTag) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const params = yield resolveProperties({ + const params = yield (0, import_properties18.resolveProperties)({ address: this._getAddress(addressOrName), blockTag: this._getBlockTag(blockTag), - position: Promise.resolve(position).then((p) => (0, import_bytes31.hexValue)(p)) + position: Promise.resolve(position).then((p) => (0, import_bytes28.hexValue)(p)) }); const result = yield this.perform("getStorageAt", params); try { - return (0, import_bytes31.hexlify)(result); + return (0, import_bytes28.hexlify)(result); } catch (error) { - return logger26.throwError("bad result from backend", import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError("bad result from backend", import_logger22.Logger.errors.SERVER_ERROR, { method: "getStorageAt", params, result, @@ -169294,14 +226609,14 @@ ${bz(e, r10)}`); }); } _wrapTransaction(tx2, hash8, startBlock) { - if (hash8 != null && (0, import_bytes31.hexDataLength)(hash8) !== 32) { + if (hash8 != null && (0, import_bytes28.hexDataLength)(hash8) !== 32) { throw new Error("invalid response - sendTransaction"); } const result = tx2; if (hash8 != null && tx2.hash !== hash8) { - logger26.throwError("Transaction hash mismatch from Provider.sendTransaction.", import_logger26.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx2.hash, returnedHash: hash8 }); + logger22.throwError("Transaction hash mismatch from Provider.sendTransaction.", import_logger22.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx2.hash, returnedHash: hash8 }); } - result.wait = (confirms, timeout) => __awaiter11(this, void 0, void 0, function* () { + result.wait = (confirms, timeout) => __awaiter9(this, void 0, void 0, function* () { if (confirms == null) { confirms = 1; } @@ -169325,7 +226640,7 @@ ${bz(e, r10)}`); } this._emitted["t:" + tx2.hash] = receipt.blockNumber; if (receipt.status === 0) { - logger26.throwError("transaction failed", import_logger26.Logger.errors.CALL_EXCEPTION, { + logger22.throwError("transaction failed", import_logger22.Logger.errors.CALL_EXCEPTION, { transactionHash: tx2.hash, transaction: tx2, receipt @@ -169336,9 +226651,9 @@ ${bz(e, r10)}`); return result; } sendTransaction(signedTransaction) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const hexTx = yield Promise.resolve(signedTransaction).then((t) => (0, import_bytes31.hexlify)(t)); + const hexTx = yield Promise.resolve(signedTransaction).then((t) => (0, import_bytes28.hexlify)(t)); const tx2 = this.formatter.transaction(signedTransaction); if (tx2.confirmations == null) { tx2.confirmations = 0; @@ -169355,7 +226670,7 @@ ${bz(e, r10)}`); }); } _getTransactionRequest(transaction) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { const values = yield transaction; const tx2 = {}; ["from", "to"].forEach((key2) => { @@ -169368,7 +226683,7 @@ ${bz(e, r10)}`); if (values[key2] == null) { return; } - tx2[key2] = Promise.resolve(values[key2]).then((v) => v ? import_bignumber12.BigNumber.from(v) : null); + tx2[key2] = Promise.resolve(values[key2]).then((v) => v ? import_bignumber11.BigNumber.from(v) : null); }); ["type"].forEach((key2) => { if (values[key2] == null) { @@ -169383,13 +226698,13 @@ ${bz(e, r10)}`); if (values[key2] == null) { return; } - tx2[key2] = Promise.resolve(values[key2]).then((v) => v ? (0, import_bytes31.hexlify)(v) : null); + tx2[key2] = Promise.resolve(values[key2]).then((v) => v ? (0, import_bytes28.hexlify)(v) : null); }); - return this.formatter.transactionRequest(yield resolveProperties(tx2)); + return this.formatter.transactionRequest(yield (0, import_properties18.resolveProperties)(tx2)); }); } _getFilter(filter) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { filter = yield filter; const result = {}; if (filter.address != null) { @@ -169407,25 +226722,25 @@ ${bz(e, r10)}`); } result[key2] = this._getBlockTag(filter[key2]); }); - return this.formatter.filter(yield resolveProperties(result)); + return this.formatter.filter(yield (0, import_properties18.resolveProperties)(result)); }); } _call(transaction, blockTag, attempt) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { if (attempt >= MAX_CCIP_REDIRECTS) { - logger26.throwError("CCIP read exceeded maximum redirections", import_logger26.Logger.errors.SERVER_ERROR, { + logger22.throwError("CCIP read exceeded maximum redirections", import_logger22.Logger.errors.SERVER_ERROR, { redirects: attempt, transaction }); } const txSender = transaction.to; const result = yield this.perform("call", { transaction, blockTag }); - if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" && (0, import_bytes31.hexDataLength)(result) % 32 === 4) { + if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" && (0, import_bytes28.hexDataLength)(result) % 32 === 4) { try { - const data = (0, import_bytes31.hexDataSlice)(result, 4); - const sender = (0, import_bytes31.hexDataSlice)(data, 0, 32); - if (!import_bignumber12.BigNumber.from(sender).eq(txSender)) { - logger26.throwError("CCIP Read sender did not match", import_logger26.Logger.errors.CALL_EXCEPTION, { + const data = (0, import_bytes28.hexDataSlice)(result, 4); + const sender = (0, import_bytes28.hexDataSlice)(data, 0, 32); + if (!import_bignumber11.BigNumber.from(sender).eq(txSender)) { + logger22.throwError("CCIP Read sender did not match", import_logger22.Logger.errors.CALL_EXCEPTION, { name: "OffchainLookup", signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", transaction, @@ -169433,13 +226748,13 @@ ${bz(e, r10)}`); }); } const urls = []; - const urlsOffset = import_bignumber12.BigNumber.from((0, import_bytes31.hexDataSlice)(data, 32, 64)).toNumber(); - const urlsLength = import_bignumber12.BigNumber.from((0, import_bytes31.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber(); - const urlsData = (0, import_bytes31.hexDataSlice)(data, urlsOffset + 32); + const urlsOffset = import_bignumber11.BigNumber.from((0, import_bytes28.hexDataSlice)(data, 32, 64)).toNumber(); + const urlsLength = import_bignumber11.BigNumber.from((0, import_bytes28.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber(); + const urlsData = (0, import_bytes28.hexDataSlice)(data, urlsOffset + 32); for (let u = 0; u < urlsLength; u++) { const url = _parseString(urlsData, u * 32); if (url == null) { - logger26.throwError("CCIP Read contained corrupt URL string", import_logger26.Logger.errors.CALL_EXCEPTION, { + logger22.throwError("CCIP Read contained corrupt URL string", import_logger22.Logger.errors.CALL_EXCEPTION, { name: "OffchainLookup", signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", transaction, @@ -169449,19 +226764,19 @@ ${bz(e, r10)}`); urls.push(url); } const calldata = _parseBytes(data, 64); - if (!import_bignumber12.BigNumber.from((0, import_bytes31.hexDataSlice)(data, 100, 128)).isZero()) { - logger26.throwError("CCIP Read callback selector included junk", import_logger26.Logger.errors.CALL_EXCEPTION, { + if (!import_bignumber11.BigNumber.from((0, import_bytes28.hexDataSlice)(data, 100, 128)).isZero()) { + logger22.throwError("CCIP Read callback selector included junk", import_logger22.Logger.errors.CALL_EXCEPTION, { name: "OffchainLookup", signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", transaction, data: result }); } - const callbackSelector = (0, import_bytes31.hexDataSlice)(data, 96, 100); + const callbackSelector = (0, import_bytes28.hexDataSlice)(data, 96, 100); const extraData = _parseBytes(data, 128); const ccipResult = yield this.ccipReadFetch(transaction, calldata, urls); if (ccipResult == null) { - logger26.throwError("CCIP Read disabled or provided no URLs", import_logger26.Logger.errors.CALL_EXCEPTION, { + logger22.throwError("CCIP Read disabled or provided no URLs", import_logger22.Logger.errors.CALL_EXCEPTION, { name: "OffchainLookup", signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", transaction, @@ -169470,19 +226785,19 @@ ${bz(e, r10)}`); } const tx2 = { to: txSender, - data: (0, import_bytes31.hexConcat)([callbackSelector, encodeBytes([ccipResult, extraData])]) + data: (0, import_bytes28.hexConcat)([callbackSelector, encodeBytes([ccipResult, extraData])]) }; return this._call(tx2, blockTag, attempt + 1); } catch (error) { - if (error.code === import_logger26.Logger.errors.SERVER_ERROR) { + if (error.code === import_logger22.Logger.errors.SERVER_ERROR) { throw error; } } } try { - return (0, import_bytes31.hexlify)(result); + return (0, import_bytes28.hexlify)(result); } catch (error) { - return logger26.throwError("bad result from backend", import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError("bad result from backend", import_logger22.Logger.errors.SERVER_ERROR, { method: "call", params: { transaction, blockTag }, result, @@ -169492,9 +226807,9 @@ ${bz(e, r10)}`); }); } call(transaction, blockTag) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const resolved = yield resolveProperties({ + const resolved = yield (0, import_properties18.resolveProperties)({ transaction: this._getTransactionRequest(transaction), blockTag: this._getBlockTag(blockTag), ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled) @@ -169503,16 +226818,16 @@ ${bz(e, r10)}`); }); } estimateGas(transaction) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const params = yield resolveProperties({ + const params = yield (0, import_properties18.resolveProperties)({ transaction: this._getTransactionRequest(transaction) }); const result = yield this.perform("estimateGas", params); try { - return import_bignumber12.BigNumber.from(result); + return import_bignumber11.BigNumber.from(result); } catch (error) { - return logger26.throwError("bad result from backend", import_logger26.Logger.errors.SERVER_ERROR, { + return logger22.throwError("bad result from backend", import_logger22.Logger.errors.SERVER_ERROR, { method: "estimateGas", params, result, @@ -169522,14 +226837,14 @@ ${bz(e, r10)}`); }); } _getAddress(addressOrName) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { addressOrName = yield addressOrName; if (typeof addressOrName !== "string") { - logger26.throwArgumentError("invalid address or ENS name", "name", addressOrName); + logger22.throwArgumentError("invalid address or ENS name", "name", addressOrName); } const address = yield this.resolveName(addressOrName); if (address == null) { - logger26.throwError("ENS name not configured", import_logger26.Logger.errors.UNSUPPORTED_OPERATION, { + logger22.throwError("ENS name not configured", import_logger22.Logger.errors.UNSUPPORTED_OPERATION, { operation: `resolveName(${JSON.stringify(addressOrName)})` }); } @@ -169537,26 +226852,26 @@ ${bz(e, r10)}`); }); } _getBlock(blockHashOrBlockTag, includeTransactions) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); blockHashOrBlockTag = yield blockHashOrBlockTag; let blockNumber = -128; const params = { includeTransactions: !!includeTransactions }; - if ((0, import_bytes31.isHexString)(blockHashOrBlockTag, 32)) { + if ((0, import_bytes28.isHexString)(blockHashOrBlockTag, 32)) { params.blockHash = blockHashOrBlockTag; } else { try { params.blockTag = yield this._getBlockTag(blockHashOrBlockTag); - if ((0, import_bytes31.isHexString)(params.blockTag)) { + if ((0, import_bytes28.isHexString)(params.blockTag)) { blockNumber = parseInt(params.blockTag.substring(2), 16); } } catch (error) { - logger26.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); + logger22.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); } } - return poll(() => __awaiter11(this, void 0, void 0, function* () { + return poll(() => __awaiter9(this, void 0, void 0, function* () { const block = yield this.perform("getBlock", params); if (block == null) { if (params.blockHash != null) { @@ -169603,11 +226918,11 @@ ${bz(e, r10)}`); return this._getBlock(blockHashOrBlockTag, true); } getTransaction(transactionHash) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); transactionHash = yield transactionHash; const params = { transactionHash: this.formatter.hash(transactionHash, true) }; - return poll(() => __awaiter11(this, void 0, void 0, function* () { + return poll(() => __awaiter9(this, void 0, void 0, function* () { const result = yield this.perform("getTransaction", params); if (result == null) { if (this._emitted["t:" + transactionHash] == null) { @@ -169631,11 +226946,11 @@ ${bz(e, r10)}`); }); } getTransactionReceipt(transactionHash) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); transactionHash = yield transactionHash; const params = { transactionHash: this.formatter.hash(transactionHash, true) }; - return poll(() => __awaiter11(this, void 0, void 0, function* () { + return poll(() => __awaiter9(this, void 0, void 0, function* () { const result = yield this.perform("getTransactionReceipt", params); if (result == null) { if (this._emitted["t:" + transactionHash] == null) { @@ -169662,9 +226977,9 @@ ${bz(e, r10)}`); }); } getLogs(filter) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); - const params = yield resolveProperties({ filter: this._getFilter(filter) }); + const params = yield (0, import_properties18.resolveProperties)({ filter: this._getFilter(filter) }); const logs = yield this.perform("getLogs", params); logs.forEach((log) => { if (log.removed == null) { @@ -169675,17 +226990,17 @@ ${bz(e, r10)}`); }); } getEtherPrice() { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { yield this.getNetwork(); return this.perform("getEtherPrice", {}); }); } _getBlockTag(blockTag) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { blockTag = yield blockTag; if (typeof blockTag === "number" && blockTag < 0) { if (blockTag % 1) { - logger26.throwArgumentError("invalid BlockTag", "blockTag", blockTag); + logger22.throwArgumentError("invalid BlockTag", "blockTag", blockTag); } let blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval); blockNumber += blockTag; @@ -169698,7 +227013,7 @@ ${bz(e, r10)}`); }); } getResolver(name6) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { let currentName = name6; while (true) { if (currentName === "" || currentName === ".") { @@ -169720,13 +227035,13 @@ ${bz(e, r10)}`); }); } _getResolver(name6, operation) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { if (operation == null) { operation = "ENS"; } const network3 = yield this.getNetwork(); if (!network3.ensAddress) { - logger26.throwError("network does not support ENS", import_logger26.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network3.name }); + logger22.throwError("network does not support ENS", import_logger22.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network3.name }); } try { const addrData = yield this.call({ @@ -169740,17 +227055,17 @@ ${bz(e, r10)}`); }); } resolveName(name6) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { name6 = yield name6; try { return Promise.resolve(this.formatter.address(name6)); } catch (error) { - if ((0, import_bytes31.isHexString)(name6)) { + if ((0, import_bytes28.isHexString)(name6)) { throw error; } } if (typeof name6 !== "string") { - logger26.throwArgumentError("invalid ENS name", "name", name6); + logger22.throwArgumentError("invalid ENS name", "name", name6); } const resolver = yield this.getResolver(name6); if (!resolver) { @@ -169760,7 +227075,7 @@ ${bz(e, r10)}`); }); } lookupAddress(address) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { address = yield address; address = this.formatter.address(address); const node = address.substring(2).toLowerCase() + ".addr.reverse"; @@ -169780,9 +227095,9 @@ ${bz(e, r10)}`); }); } getAvatar(nameOrAddress) { - return __awaiter11(this, void 0, void 0, function* () { + return __awaiter9(this, void 0, void 0, function* () { let resolver = null; - if ((0, import_bytes31.isHexString)(nameOrAddress)) { + if ((0, import_bytes28.isHexString)(nameOrAddress)) { const address = this.formatter.address(nameOrAddress); const node = address.substring(2).toLowerCase() + ".addr.reverse"; const resolverAddress = yield this._getResolver(node, "getAvatar"); @@ -169796,7 +227111,7 @@ ${bz(e, r10)}`); return avatar2.url; } } catch (error) { - if (error.code !== import_logger26.Logger.errors.CALL_EXCEPTION) { + if (error.code !== import_logger22.Logger.errors.CALL_EXCEPTION) { throw error; } } @@ -169807,7 +227122,7 @@ ${bz(e, r10)}`); }), 0); resolver = yield this.getResolver(name6); } catch (error) { - if (error.code !== import_logger26.Logger.errors.CALL_EXCEPTION) { + if (error.code !== import_logger22.Logger.errors.CALL_EXCEPTION) { throw error; } return null; @@ -169826,7 +227141,7 @@ ${bz(e, r10)}`); }); } perform(method, params) { - return logger26.throwError(method + " not implemented", import_logger26.Logger.errors.NOT_IMPLEMENTED, { operation: method }); + return logger22.throwError(method + " not implemented", import_logger22.Logger.errors.NOT_IMPLEMENTED, { operation: method }); } _startEvent(event) { this.polling = this._events.filter((e) => e.pollable()).length > 0; @@ -169930,15 +227245,21 @@ ${bz(e, r10)}`); } }; + // node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js + var import_properties22 = __toESM(require_lib7()); + // node_modules/@ethersproject/providers/lib.esm/websocket-provider.js - var import_bignumber14 = __toESM(require_lib3()); + var import_bignumber13 = __toESM(require_lib3()); + var import_properties20 = __toESM(require_lib7()); // node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js - var import_bignumber13 = __toESM(require_lib3()); - var import_bytes32 = __toESM(require_lib2()); + var import_abstract_signer3 = __toESM(require_lib11()); + var import_bignumber12 = __toESM(require_lib3()); + var import_bytes29 = __toESM(require_lib2()); + var import_properties19 = __toESM(require_lib7()); var import_strings11 = __toESM(require_lib6()); - var import_logger27 = __toESM(require_lib()); - var __awaiter12 = function(thisArg, _arguments, P, generator) { + var import_logger23 = __toESM(require_lib()); + var __awaiter10 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -169965,14 +227286,14 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger27 = new import_logger27.Logger(version20); + var logger23 = new import_logger23.Logger(version16); var errorGas = ["call", "estimateGas"]; function spelunk(value, requireData) { if (value == null) { return null; } if (typeof value.message === "string" && value.message.match("reverted")) { - const data = (0, import_bytes32.isHexString)(value.data) ? value.data : null; + const data = (0, import_bytes29.isHexString)(value.data) ? value.data : null; if (!requireData || data) { return { message: value.message, data }; } @@ -170001,7 +227322,7 @@ ${bz(e, r10)}`); if (result) { return result.data; } - logger27.throwError("missing revert data in call exception; Transaction reverted without a reason string", import_logger27.Logger.errors.CALL_EXCEPTION, { + logger23.throwError("missing revert data in call exception; Transaction reverted without a reason string", import_logger23.Logger.errors.CALL_EXCEPTION, { data: "0x", transaction, error @@ -170013,7 +227334,7 @@ ${bz(e, r10)}`); result = spelunk(error, false); } if (result) { - logger27.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", import_logger27.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + logger23.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", import_logger23.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { reason: result.message, method, transaction, @@ -170022,7 +227343,7 @@ ${bz(e, r10)}`); } } let message = error.message; - if (error.code === import_logger27.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === "string") { + if (error.code === import_logger23.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === "string") { message = error.error.message; } else if (typeof error.body === "string") { message = error.body; @@ -170031,35 +227352,35 @@ ${bz(e, r10)}`); } message = (message || "").toLowerCase(); if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) { - logger27.throwError("insufficient funds for intrinsic transaction cost", import_logger27.Logger.errors.INSUFFICIENT_FUNDS, { + logger23.throwError("insufficient funds for intrinsic transaction cost", import_logger23.Logger.errors.INSUFFICIENT_FUNDS, { error, method, transaction }); } if (message.match(/nonce (is )?too low/i)) { - logger27.throwError("nonce has already been used", import_logger27.Logger.errors.NONCE_EXPIRED, { + logger23.throwError("nonce has already been used", import_logger23.Logger.errors.NONCE_EXPIRED, { error, method, transaction }); } if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) { - logger27.throwError("replacement fee too low", import_logger27.Logger.errors.REPLACEMENT_UNDERPRICED, { + logger23.throwError("replacement fee too low", import_logger23.Logger.errors.REPLACEMENT_UNDERPRICED, { error, method, transaction }); } if (message.match(/only replay-protected/i)) { - logger27.throwError("legacy pre-eip-155 transactions not supported", import_logger27.Logger.errors.UNSUPPORTED_OPERATION, { + logger23.throwError("legacy pre-eip-155 transactions not supported", import_logger23.Logger.errors.UNSUPPORTED_OPERATION, { error, method, transaction }); } if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) { - logger27.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", import_logger27.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + logger23.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", import_logger23.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { error, method, transaction @@ -170088,28 +227409,28 @@ ${bz(e, r10)}`); return value; } var _constructorGuard3 = {}; - var JsonRpcSigner = class extends Signer { + var JsonRpcSigner = class extends import_abstract_signer3.Signer { constructor(constructorGuard, provider, addressOrIndex) { super(); if (constructorGuard !== _constructorGuard3) { throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner"); } - defineReadOnly(this, "provider", provider); + (0, import_properties19.defineReadOnly)(this, "provider", provider); if (addressOrIndex == null) { addressOrIndex = 0; } if (typeof addressOrIndex === "string") { - defineReadOnly(this, "_address", this.provider.formatter.address(addressOrIndex)); - defineReadOnly(this, "_index", null); + (0, import_properties19.defineReadOnly)(this, "_address", this.provider.formatter.address(addressOrIndex)); + (0, import_properties19.defineReadOnly)(this, "_index", null); } else if (typeof addressOrIndex === "number") { - defineReadOnly(this, "_index", addressOrIndex); - defineReadOnly(this, "_address", null); + (0, import_properties19.defineReadOnly)(this, "_index", addressOrIndex); + (0, import_properties19.defineReadOnly)(this, "_address", null); } else { - logger27.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex); + logger23.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex); } } connect(provider) { - return logger27.throwError("cannot alter JSON-RPC Signer connection", import_logger27.Logger.errors.UNSUPPORTED_OPERATION, { + return logger23.throwError("cannot alter JSON-RPC Signer connection", import_logger23.Logger.errors.UNSUPPORTED_OPERATION, { operation: "connect" }); } @@ -170122,7 +227443,7 @@ ${bz(e, r10)}`); } return this.provider.send("eth_accounts", []).then((accounts2) => { if (accounts2.length <= this._index) { - logger27.throwError("unknown account #" + this._index, import_logger27.Logger.errors.UNSUPPORTED_OPERATION, { + logger23.throwError("unknown account #" + this._index, import_logger23.Logger.errors.UNSUPPORTED_OPERATION, { operation: "getAddress" }); } @@ -170130,7 +227451,7 @@ ${bz(e, r10)}`); }); } sendUncheckedTransaction(transaction) { - transaction = shallowCopy(transaction); + transaction = (0, import_properties19.shallowCopy)(transaction); const fromAddress = this.getAddress().then((address) => { if (address) { address = address.toLowerCase(); @@ -170138,29 +227459,29 @@ ${bz(e, r10)}`); return address; }); if (transaction.gasLimit == null) { - const estimate = shallowCopy(transaction); + const estimate = (0, import_properties19.shallowCopy)(transaction); estimate.from = fromAddress; transaction.gasLimit = this.provider.estimateGas(estimate); } if (transaction.to != null) { - transaction.to = Promise.resolve(transaction.to).then((to2) => __awaiter12(this, void 0, void 0, function* () { + transaction.to = Promise.resolve(transaction.to).then((to2) => __awaiter10(this, void 0, void 0, function* () { if (to2 == null) { return null; } const address = yield this.provider.resolveName(to2); if (address == null) { - logger27.throwArgumentError("provided ENS name resolves to null", "tx.to", to2); + logger23.throwArgumentError("provided ENS name resolves to null", "tx.to", to2); } return address; })); } - return resolveProperties({ - tx: resolveProperties(transaction), + return (0, import_properties19.resolveProperties)({ + tx: (0, import_properties19.resolveProperties)(transaction), sender: fromAddress }).then(({ tx: tx2, sender }) => { if (tx2.from != null) { if (tx2.from.toLowerCase() !== sender) { - logger27.throwArgumentError("from address mismatch", "transaction", transaction); + logger23.throwArgumentError("from address mismatch", "transaction", transaction); } } else { tx2.from = sender; @@ -170170,7 +227491,7 @@ ${bz(e, r10)}`); return hash8; }, (error) => { if (typeof error.message === "string" && error.message.match(/user denied/i)) { - logger27.throwError("user rejected transaction", import_logger27.Logger.errors.ACTION_REJECTED, { + logger23.throwError("user rejected transaction", import_logger23.Logger.errors.ACTION_REJECTED, { action: "sendTransaction", transaction: tx2 }); @@ -170180,16 +227501,16 @@ ${bz(e, r10)}`); }); } signTransaction(transaction) { - return logger27.throwError("signing transactions is unsupported", import_logger27.Logger.errors.UNSUPPORTED_OPERATION, { + return logger23.throwError("signing transactions is unsupported", import_logger23.Logger.errors.UNSUPPORTED_OPERATION, { operation: "signTransaction" }); } sendTransaction(transaction) { - return __awaiter12(this, void 0, void 0, function* () { + return __awaiter10(this, void 0, void 0, function* () { const blockNumber = yield this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval); const hash8 = yield this.sendUncheckedTransaction(transaction); try { - return yield poll(() => __awaiter12(this, void 0, void 0, function* () { + return yield poll(() => __awaiter10(this, void 0, void 0, function* () { const tx2 = yield this.provider.getTransaction(hash8); if (tx2 === null) { return void 0; @@ -170203,14 +227524,14 @@ ${bz(e, r10)}`); }); } signMessage(message) { - return __awaiter12(this, void 0, void 0, function* () { + return __awaiter10(this, void 0, void 0, function* () { const data = typeof message === "string" ? (0, import_strings11.toUtf8Bytes)(message) : message; const address = yield this.getAddress(); try { - return yield this.provider.send("personal_sign", [(0, import_bytes32.hexlify)(data), address.toLowerCase()]); + return yield this.provider.send("personal_sign", [(0, import_bytes29.hexlify)(data), address.toLowerCase()]); } catch (error) { if (typeof error.message === "string" && error.message.match(/user denied/i)) { - logger27.throwError("user rejected signing", import_logger27.Logger.errors.ACTION_REJECTED, { + logger23.throwError("user rejected signing", import_logger23.Logger.errors.ACTION_REJECTED, { action: "signMessage", from: address, messageData: message @@ -170221,14 +227542,14 @@ ${bz(e, r10)}`); }); } _legacySignMessage(message) { - return __awaiter12(this, void 0, void 0, function* () { + return __awaiter10(this, void 0, void 0, function* () { const data = typeof message === "string" ? (0, import_strings11.toUtf8Bytes)(message) : message; const address = yield this.getAddress(); try { - return yield this.provider.send("eth_sign", [address.toLowerCase(), (0, import_bytes32.hexlify)(data)]); + return yield this.provider.send("eth_sign", [address.toLowerCase(), (0, import_bytes29.hexlify)(data)]); } catch (error) { if (typeof error.message === "string" && error.message.match(/user denied/i)) { - logger27.throwError("user rejected signing", import_logger27.Logger.errors.ACTION_REJECTED, { + logger23.throwError("user rejected signing", import_logger23.Logger.errors.ACTION_REJECTED, { action: "_legacySignMessage", from: address, messageData: message @@ -170239,7 +227560,7 @@ ${bz(e, r10)}`); }); } _signTypedData(domain, types2, value) { - return __awaiter12(this, void 0, void 0, function* () { + return __awaiter10(this, void 0, void 0, function* () { const populated = yield TypedDataEncoder.resolveNames(domain, types2, value, (name6) => { return this.provider.resolveName(name6); }); @@ -170251,7 +227572,7 @@ ${bz(e, r10)}`); ]); } catch (error) { if (typeof error.message === "string" && error.message.match(/user denied/i)) { - logger27.throwError("user rejected signing", import_logger27.Logger.errors.ACTION_REJECTED, { + logger23.throwError("user rejected signing", import_logger23.Logger.errors.ACTION_REJECTED, { action: "_signTypedData", from: address, messageData: { domain: populated.domain, types: types2, value: populated.value } @@ -170262,7 +227583,7 @@ ${bz(e, r10)}`); }); } unlock(password) { - return __awaiter12(this, void 0, void 0, function* () { + return __awaiter10(this, void 0, void 0, function* () { const provider = this.provider; const address = yield this.getAddress(); return provider.send("personal_unlockAccount", [address.toLowerCase(), password, null]); @@ -170289,7 +227610,7 @@ ${bz(e, r10)}`); }); } }; - var allowedTransactionKeys4 = { + var allowedTransactionKeys3 = { chainId: true, data: true, gasLimit: true, @@ -170318,14 +227639,14 @@ ${bz(e, r10)}`); } super(networkOrReady); if (!url) { - url = getStatic(this.constructor, "defaultUrl")(); + url = (0, import_properties19.getStatic)(this.constructor, "defaultUrl")(); } if (typeof url === "string") { - defineReadOnly(this, "connection", Object.freeze({ + (0, import_properties19.defineReadOnly)(this, "connection", Object.freeze({ url })); } else { - defineReadOnly(this, "connection", Object.freeze(shallowCopy(url))); + (0, import_properties19.defineReadOnly)(this, "connection", Object.freeze((0, import_properties19.shallowCopy)(url))); } this._nextId = 42; } @@ -170348,7 +227669,7 @@ ${bz(e, r10)}`); return this._cache["detectNetwork"]; } _uncachedDetectNetwork() { - return __awaiter12(this, void 0, void 0, function* () { + return __awaiter10(this, void 0, void 0, function* () { yield timer(0); let chainId = null; try { @@ -170360,18 +227681,18 @@ ${bz(e, r10)}`); } } if (chainId != null) { - const getNetwork2 = getStatic(this.constructor, "getNetwork"); + const getNetwork2 = (0, import_properties19.getStatic)(this.constructor, "getNetwork"); try { - return getNetwork2(import_bignumber13.BigNumber.from(chainId).toNumber()); + return getNetwork2(import_bignumber12.BigNumber.from(chainId).toNumber()); } catch (error) { - return logger27.throwError("could not detect network", import_logger27.Logger.errors.NETWORK_ERROR, { + return logger23.throwError("could not detect network", import_logger23.Logger.errors.NETWORK_ERROR, { chainId, event: "invalidNetwork", serverError: error }); } } - return logger27.throwError("could not detect network", import_logger27.Logger.errors.NETWORK_ERROR, { + return logger23.throwError("could not detect network", import_logger23.Logger.errors.NETWORK_ERROR, { event: "noNetwork" }); }); @@ -170396,7 +227717,7 @@ ${bz(e, r10)}`); }; this.emit("debug", { action: "request", - request: deepCopy(request), + request: (0, import_properties19.deepCopy)(request), provider: this }); const cache = ["eth_chainId", "eth_blockNumber"].indexOf(method) >= 0; @@ -170441,7 +227762,7 @@ ${bz(e, r10)}`); case "getCode": return ["eth_getCode", [getLowerCase(params.address), params.blockTag]]; case "getStorageAt": - return ["eth_getStorageAt", [getLowerCase(params.address), (0, import_bytes32.hexZeroPad)(params.position, 32), params.blockTag]]; + return ["eth_getStorageAt", [getLowerCase(params.address), (0, import_bytes29.hexZeroPad)(params.position, 32), params.blockTag]]; case "sendTransaction": return ["eth_sendRawTransaction", [params.signedTransaction]]; case "getBlock": @@ -170456,11 +227777,11 @@ ${bz(e, r10)}`); case "getTransactionReceipt": return ["eth_getTransactionReceipt", [params.transactionHash]]; case "call": { - const hexlifyTransaction = getStatic(this.constructor, "hexlifyTransaction"); + const hexlifyTransaction = (0, import_properties19.getStatic)(this.constructor, "hexlifyTransaction"); return ["eth_call", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]]; } case "estimateGas": { - const hexlifyTransaction = getStatic(this.constructor, "hexlifyTransaction"); + const hexlifyTransaction = (0, import_properties19.getStatic)(this.constructor, "hexlifyTransaction"); return ["eth_estimateGas", [hexlifyTransaction(params.transaction, { from: true })]]; } case "getLogs": @@ -170474,15 +227795,15 @@ ${bz(e, r10)}`); return null; } perform(method, params) { - return __awaiter12(this, void 0, void 0, function* () { + return __awaiter10(this, void 0, void 0, function* () { if (method === "call" || method === "estimateGas") { const tx2 = params.transaction; - if (tx2 && tx2.type != null && import_bignumber13.BigNumber.from(tx2.type).isZero()) { + if (tx2 && tx2.type != null && import_bignumber12.BigNumber.from(tx2.type).isZero()) { if (tx2.maxFeePerGas == null && tx2.maxPriorityFeePerGas == null) { const feeData = yield this.getFeeData(); if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) { - params = shallowCopy(params); - params.transaction = shallowCopy(tx2); + params = (0, import_properties19.shallowCopy)(params); + params.transaction = (0, import_properties19.shallowCopy)(tx2); delete params.transaction.type; } } @@ -170490,7 +227811,7 @@ ${bz(e, r10)}`); } const args = this.prepareRequest(method, params); if (args == null) { - logger27.throwError(method + " not implemented", import_logger27.Logger.errors.NOT_IMPLEMENTED, { operation: method }); + logger23.throwError(method + " not implemented", import_logger23.Logger.errors.NOT_IMPLEMENTED, { operation: method }); } try { return yield this.send(args[0], args[1]); @@ -170555,7 +227876,7 @@ ${bz(e, r10)}`); super._stopEvent(event); } static hexlifyTransaction(transaction, allowExtra) { - const allowed = shallowCopy(allowedTransactionKeys4); + const allowed = (0, import_properties19.shallowCopy)(allowedTransactionKeys3); if (allowExtra) { for (const key2 in allowExtra) { if (allowExtra[key2]) { @@ -170563,13 +227884,13 @@ ${bz(e, r10)}`); } } } - checkProperties(transaction, allowed); + (0, import_properties19.checkProperties)(transaction, allowed); const result = {}; ["chainId", "gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key2) { if (transaction[key2] == null) { return; } - const value = (0, import_bytes32.hexValue)(import_bignumber13.BigNumber.from(transaction[key2])); + const value = (0, import_bytes29.hexValue)(import_bignumber12.BigNumber.from(transaction[key2])); if (key2 === "gasLimit") { key2 = "gas"; } @@ -170579,7 +227900,7 @@ ${bz(e, r10)}`); if (transaction[key2] == null) { return; } - result[key2] = (0, import_bytes32.hexlify)(transaction[key2]); + result[key2] = (0, import_bytes29.hexlify)(transaction[key2]); }); if (transaction.accessList) { result["accessList"] = accessListify(transaction.accessList); @@ -170589,7 +227910,7 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/ws.js - var import_logger28 = __toESM(require_lib()); + var import_logger24 = __toESM(require_lib()); var WS2 = null; try { WS2 = WebSocket; @@ -170597,17 +227918,17 @@ ${bz(e, r10)}`); throw new Error("inject please"); } } catch (error) { - const logger46 = new import_logger28.Logger(version20); + const logger42 = new import_logger24.Logger(version16); WS2 = function() { - logger46.throwError("WebSockets not supported in this environment", import_logger28.Logger.errors.UNSUPPORTED_OPERATION, { + logger42.throwError("WebSockets not supported in this environment", import_logger24.Logger.errors.UNSUPPORTED_OPERATION, { operation: "new WebSocket()" }); }; } // node_modules/@ethersproject/providers/lib.esm/websocket-provider.js - var import_logger29 = __toESM(require_lib()); - var __awaiter13 = function(thisArg, _arguments, P, generator) { + var import_logger25 = __toESM(require_lib()); + var __awaiter11 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -170634,12 +227955,12 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger28 = new import_logger29.Logger(version20); + var logger24 = new import_logger25.Logger(version16); var NextId = 1; var WebSocketProvider = class extends JsonRpcProvider { constructor(url, network3) { if (network3 === "any") { - logger28.throwError("WebSocketProvider does not support 'any' network yet", import_logger29.Logger.errors.UNSUPPORTED_OPERATION, { + logger24.throwError("WebSocketProvider does not support 'any' network yet", import_logger25.Logger.errors.UNSUPPORTED_OPERATION, { operation: "network:any" }); } @@ -170651,14 +227972,14 @@ ${bz(e, r10)}`); this._pollingInterval = -1; this._wsReady = false; if (typeof url === "string") { - defineReadOnly(this, "_websocket", new WS2(this.connection.url)); + (0, import_properties20.defineReadOnly)(this, "_websocket", new WS2(this.connection.url)); } else { - defineReadOnly(this, "_websocket", url); + (0, import_properties20.defineReadOnly)(this, "_websocket", url); } - defineReadOnly(this, "_requests", {}); - defineReadOnly(this, "_subs", {}); - defineReadOnly(this, "_subIds", {}); - defineReadOnly(this, "_detectNetwork", super.detectNetwork()); + (0, import_properties20.defineReadOnly)(this, "_requests", {}); + (0, import_properties20.defineReadOnly)(this, "_subs", {}); + (0, import_properties20.defineReadOnly)(this, "_subIds", {}); + (0, import_properties20.defineReadOnly)(this, "_detectNetwork", super.detectNetwork()); this.websocket.onopen = () => { this._wsReady = true; Object.keys(this._requests).forEach((id4) => { @@ -170684,8 +228005,8 @@ ${bz(e, r10)}`); let error = null; if (result.error) { error = new Error(result.error.message || "unknown error"); - defineReadOnly(error, "code", result.error.code || null); - defineReadOnly(error, "response", data); + (0, import_properties20.defineReadOnly)(error, "code", result.error.code || null); + (0, import_properties20.defineReadOnly)(error, "response", data); } else { error = new Error("unknown error"); } @@ -170723,17 +228044,17 @@ ${bz(e, r10)}`); return 0; } resetEventsBlock(blockNumber) { - logger28.throwError("cannot reset events block on WebSocketProvider", import_logger29.Logger.errors.UNSUPPORTED_OPERATION, { + logger24.throwError("cannot reset events block on WebSocketProvider", import_logger25.Logger.errors.UNSUPPORTED_OPERATION, { operation: "resetEventBlock" }); } set pollingInterval(value) { - logger28.throwError("cannot set polling interval on WebSocketProvider", import_logger29.Logger.errors.UNSUPPORTED_OPERATION, { + logger24.throwError("cannot set polling interval on WebSocketProvider", import_logger25.Logger.errors.UNSUPPORTED_OPERATION, { operation: "setPollingInterval" }); } poll() { - return __awaiter13(this, void 0, void 0, function* () { + return __awaiter11(this, void 0, void 0, function* () { return null; }); } @@ -170741,7 +228062,7 @@ ${bz(e, r10)}`); if (!value) { return; } - logger28.throwError("cannot set polling on WebSocketProvider", import_logger29.Logger.errors.UNSUPPORTED_OPERATION, { + logger24.throwError("cannot set polling on WebSocketProvider", import_logger25.Logger.errors.UNSUPPORTED_OPERATION, { operation: "setPolling" }); } @@ -170775,7 +228096,7 @@ ${bz(e, r10)}`); return "ws://localhost:8546"; } _subscribe(tag, param, processFunc) { - return __awaiter13(this, void 0, void 0, function* () { + return __awaiter11(this, void 0, void 0, function* () { let subIdPromise = this._subIds[tag]; if (subIdPromise == null) { subIdPromise = Promise.all(param).then((param2) => { @@ -170791,7 +228112,7 @@ ${bz(e, r10)}`); switch (event.type) { case "block": this._subscribe("block", ["newHeads"], (result) => { - const blockNumber = import_bignumber14.BigNumber.from(result.number).toNumber(); + const blockNumber = import_bignumber13.BigNumber.from(result.number).toNumber(); this._emitted.block = blockNumber; this.emit("block", blockNumber); }); @@ -170860,7 +228181,7 @@ ${bz(e, r10)}`); }); } destroy() { - return __awaiter13(this, void 0, void 0, function* () { + return __awaiter11(this, void 0, void 0, function* () { if (this.websocket.readyState === WS2.CONNECTING) { yield new Promise((resolve) => { this.websocket.onopen = function() { @@ -170877,11 +228198,12 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js - var import_logger31 = __toESM(require_lib()); + var import_logger27 = __toESM(require_lib()); // node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js - var import_logger30 = __toESM(require_lib()); - var __awaiter14 = function(thisArg, _arguments, P, generator) { + var import_properties21 = __toESM(require_lib7()); + var import_logger26 = __toESM(require_lib()); + var __awaiter12 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -170908,21 +228230,21 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger29 = new import_logger30.Logger(version20); + var logger25 = new import_logger26.Logger(version16); var StaticJsonRpcProvider = class extends JsonRpcProvider { detectNetwork() { const _super = Object.create(null, { detectNetwork: { get: () => super.detectNetwork } }); - return __awaiter14(this, void 0, void 0, function* () { + return __awaiter12(this, void 0, void 0, function* () { let network3 = this.network; if (network3 == null) { network3 = yield _super.detectNetwork.call(this); if (!network3) { - logger29.throwError("no network detected", import_logger30.Logger.errors.UNKNOWN_ERROR, {}); + logger25.throwError("no network detected", import_logger26.Logger.errors.UNKNOWN_ERROR, {}); } if (this._network == null) { - defineReadOnly(this, "_network", network3); + (0, import_properties21.defineReadOnly)(this, "_network", network3); this.emit("network", network3, null); } } @@ -170932,27 +228254,27 @@ ${bz(e, r10)}`); }; var UrlJsonRpcProvider = class extends StaticJsonRpcProvider { constructor(network3, apiKey) { - logger29.checkAbstract(new.target, UrlJsonRpcProvider); - network3 = getStatic(new.target, "getNetwork")(network3); - apiKey = getStatic(new.target, "getApiKey")(apiKey); - const connection = getStatic(new.target, "getUrl")(network3, apiKey); + logger25.checkAbstract(new.target, UrlJsonRpcProvider); + network3 = (0, import_properties21.getStatic)(new.target, "getNetwork")(network3); + apiKey = (0, import_properties21.getStatic)(new.target, "getApiKey")(apiKey); + const connection = (0, import_properties21.getStatic)(new.target, "getUrl")(network3, apiKey); super(connection, network3); if (typeof apiKey === "string") { - defineReadOnly(this, "apiKey", apiKey); + (0, import_properties21.defineReadOnly)(this, "apiKey", apiKey); } else if (apiKey != null) { Object.keys(apiKey).forEach((key2) => { - defineReadOnly(this, key2, apiKey[key2]); + (0, import_properties21.defineReadOnly)(this, key2, apiKey[key2]); }); } } _startPending() { - logger29.warn("WARNING: API provider does not support pending filters"); + logger25.warn("WARNING: API provider does not support pending filters"); } isCommunityResource() { return false; } getSigner(address) { - return logger29.throwError("API provider does not support signing", import_logger30.Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" }); + return logger25.throwError("API provider does not support signing", import_logger26.Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" }); } listAccounts() { return Promise.resolve([]); @@ -170961,21 +228283,21 @@ ${bz(e, r10)}`); return apiKey; } static getUrl(network3, apiKey) { - return logger29.throwError("not implemented; sub-classes must override getUrl", import_logger30.Logger.errors.NOT_IMPLEMENTED, { + return logger25.throwError("not implemented; sub-classes must override getUrl", import_logger26.Logger.errors.NOT_IMPLEMENTED, { operation: "getUrl" }); } }; // node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js - var logger30 = new import_logger31.Logger(version20); + var logger26 = new import_logger27.Logger(version16); var defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC"; var AlchemyWebSocketProvider = class extends WebSocketProvider { constructor(network3, apiKey) { const provider = new AlchemyProvider(network3, apiKey); const url = provider.connection.url.replace(/^http/i, "ws").replace(".alchemyapi.", ".ws.alchemyapi."); super(url, provider.network); - defineReadOnly(this, "apiKey", provider.apiKey); + (0, import_properties22.defineReadOnly)(this, "apiKey", provider.apiKey); } isCommunityResource() { return this.apiKey === defaultApiKey; @@ -170990,7 +228312,7 @@ ${bz(e, r10)}`); return defaultApiKey; } if (apiKey && typeof apiKey !== "string") { - logger30.throwArgumentError("invalid apiKey", "apiKey", apiKey); + logger26.throwArgumentError("invalid apiKey", "apiKey", apiKey); } return apiKey; } @@ -171022,7 +228344,7 @@ ${bz(e, r10)}`); host = "opt-goerli.g.alchemy.com/v2/"; break; default: - logger30.throwArgumentError("unsupported network", "network", arguments[0]); + logger26.throwArgumentError("unsupported network", "network", arguments[0]); } return { allowGzip: true, @@ -171041,8 +228363,8 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/ankr-provider.js - var import_logger32 = __toESM(require_lib()); - var logger31 = new import_logger32.Logger(version20); + var import_logger28 = __toESM(require_lib()); + var logger27 = new import_logger28.Logger(version16); var defaultApiKey2 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972"; function getHost(name6) { switch (name6) { @@ -171059,7 +228381,7 @@ ${bz(e, r10)}`); case "arbitrum": return "rpc.ankr.com/arbitrum/"; } - return logger31.throwArgumentError("unsupported network", "name", name6); + return logger27.throwArgumentError("unsupported network", "name", name6); } var AnkrProvider = class extends UrlJsonRpcProvider { isCommunityResource() { @@ -171094,8 +228416,8 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js - var import_logger33 = __toESM(require_lib()); - var __awaiter15 = function(thisArg, _arguments, P, generator) { + var import_logger29 = __toESM(require_lib()); + var __awaiter13 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -171122,11 +228444,11 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger32 = new import_logger33.Logger(version20); + var logger28 = new import_logger29.Logger(version16); var CloudflareProvider = class extends UrlJsonRpcProvider { static getApiKey(apiKey) { if (apiKey != null) { - logger32.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey); + logger28.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey); } return null; } @@ -171137,7 +228459,7 @@ ${bz(e, r10)}`); host = "https://cloudflare-eth.com/"; break; default: - logger32.throwArgumentError("unsupported network", "network", arguments[0]); + logger28.throwArgumentError("unsupported network", "network", arguments[0]); } return host; } @@ -171145,7 +228467,7 @@ ${bz(e, r10)}`); const _super = Object.create(null, { perform: { get: () => super.perform } }); - return __awaiter15(this, void 0, void 0, function* () { + return __awaiter13(this, void 0, void 0, function* () { if (method === "getBlockNumber") { const block = yield _super.perform.call(this, "getBlock", { blockTag: "latest" }); return block.number; @@ -171156,9 +228478,10 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js - var import_bytes33 = __toESM(require_lib2()); - var import_logger34 = __toESM(require_lib()); - var __awaiter16 = function(thisArg, _arguments, P, generator) { + var import_bytes30 = __toESM(require_lib2()); + var import_properties23 = __toESM(require_lib7()); + var import_logger30 = __toESM(require_lib()); + var __awaiter14 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -171185,7 +228508,7 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger33 = new import_logger34.Logger(version20); + var logger29 = new import_logger30.Logger(version16); function getTransactionPostData(transaction) { const result = {}; for (let key2 in transaction) { @@ -171197,13 +228520,13 @@ ${bz(e, r10)}`); continue; } if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key2]) { - value = (0, import_bytes33.hexValue)((0, import_bytes33.hexlify)(value)); + value = (0, import_bytes30.hexValue)((0, import_bytes30.hexlify)(value)); } else if (key2 === "accessList") { value = "[" + accessListify(value).map((set2) => { return `{address:"${set2.address}",storageKeys:["${set2.storageKeys.join('","')}"]}`; }).join(",") + "]"; } else { - value = (0, import_bytes33.hexlify)(value); + value = (0, import_bytes30.hexlify)(value); } result[key2] = value; } @@ -171257,24 +228580,24 @@ ${bz(e, r10)}`); return parseInt(blockTag.substring(2), 16); } function checkError2(method, error, transaction) { - if (method === "call" && error.code === import_logger34.Logger.errors.SERVER_ERROR) { + if (method === "call" && error.code === import_logger30.Logger.errors.SERVER_ERROR) { const e = error.error; if (e && (e.message.match(/reverted/i) || e.message.match(/VM execution error/i))) { let data = e.data; if (data) { data = "0x" + data.replace(/^.*0x/i, ""); } - if ((0, import_bytes33.isHexString)(data)) { + if ((0, import_bytes30.isHexString)(data)) { return data; } - logger33.throwError("missing revert data in call exception", import_logger34.Logger.errors.CALL_EXCEPTION, { + logger29.throwError("missing revert data in call exception", import_logger30.Logger.errors.CALL_EXCEPTION, { error, data: "0x" }); } } let message = error.message; - if (error.code === import_logger34.Logger.errors.SERVER_ERROR) { + if (error.code === import_logger30.Logger.errors.SERVER_ERROR) { if (error.error && typeof error.error.message === "string") { message = error.error.message; } else if (typeof error.body === "string") { @@ -171285,28 +228608,28 @@ ${bz(e, r10)}`); } message = (message || "").toLowerCase(); if (message.match(/insufficient funds/)) { - logger33.throwError("insufficient funds for intrinsic transaction cost", import_logger34.Logger.errors.INSUFFICIENT_FUNDS, { + logger29.throwError("insufficient funds for intrinsic transaction cost", import_logger30.Logger.errors.INSUFFICIENT_FUNDS, { error, method, transaction }); } if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) { - logger33.throwError("nonce has already been used", import_logger34.Logger.errors.NONCE_EXPIRED, { + logger29.throwError("nonce has already been used", import_logger30.Logger.errors.NONCE_EXPIRED, { error, method, transaction }); } if (message.match(/another transaction with same nonce/)) { - logger33.throwError("replacement fee too low", import_logger34.Logger.errors.REPLACEMENT_UNDERPRICED, { + logger29.throwError("replacement fee too low", import_logger30.Logger.errors.REPLACEMENT_UNDERPRICED, { error, method, transaction }); } if (message.match(/execution failed due to an exception|execution reverted/)) { - logger33.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", import_logger34.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + logger29.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", import_logger30.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { error, method, transaction @@ -171317,8 +228640,8 @@ ${bz(e, r10)}`); var EtherscanProvider = class extends BaseProvider { constructor(network3, apiKey) { super(network3); - defineReadOnly(this, "baseUrl", this.getBaseUrl()); - defineReadOnly(this, "apiKey", apiKey || null); + (0, import_properties23.defineReadOnly)(this, "baseUrl", this.getBaseUrl()); + (0, import_properties23.defineReadOnly)(this, "apiKey", apiKey || null); } getBaseUrl() { switch (this.network ? this.network.name : "invalid") { @@ -171342,7 +228665,7 @@ ${bz(e, r10)}`); return "https://api-goerli-optimistic.etherscan.io"; default: } - return logger33.throwArgumentError("unsupported network", "network", this.network.name); + return logger29.throwArgumentError("unsupported network", "network", this.network.name); } getUrl(module2, params) { const query = Object.keys(params).reduce((accum, key2) => { @@ -171364,7 +228687,7 @@ ${bz(e, r10)}`); return params; } fetch(module2, params, post) { - return __awaiter16(this, void 0, void 0, function* () { + return __awaiter14(this, void 0, void 0, function* () { const url = post ? this.getPostUrl() : this.getUrl(module2, params); const payload = post ? this.getPostData(module2, params) : null; const procFunc = module2 === "proxy" ? getJsonResult : getResult2; @@ -171394,14 +228717,14 @@ ${bz(e, r10)}`); this.emit("debug", { action: "response", request: url, - response: deepCopy(result), + response: (0, import_properties23.deepCopy)(result), provider: this }); return result; }); } detectNetwork() { - return __awaiter16(this, void 0, void 0, function* () { + return __awaiter14(this, void 0, void 0, function* () { return this.network; }); } @@ -171409,7 +228732,7 @@ ${bz(e, r10)}`); const _super = Object.create(null, { perform: { get: () => super.perform } }); - return __awaiter16(this, void 0, void 0, function* () { + return __awaiter14(this, void 0, void 0, function* () { switch (method) { case "getBlockNumber": return this.fetch("proxy", { action: "eth_blockNumber" }); @@ -171502,12 +228825,12 @@ ${bz(e, r10)}`); } if (params.filter.topics && params.filter.topics.length > 0) { if (params.filter.topics.length > 1) { - logger33.throwError("unsupported topic count", import_logger34.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics }); + logger29.throwError("unsupported topic count", import_logger30.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics }); } if (params.filter.topics.length === 1) { const topic0 = params.filter.topics[0]; if (typeof topic0 !== "string" || topic0.length !== 66) { - logger33.throwError("unsupported topic format", import_logger34.Logger.errors.UNSUPPORTED_OPERATION, { topic0 }); + logger29.throwError("unsupported topic format", import_logger30.Logger.errors.UNSUPPORTED_OPERATION, { topic0 }); } args.topic0 = topic0; } @@ -171541,7 +228864,7 @@ ${bz(e, r10)}`); }); } getHistory(addressOrName, startBlock, endBlock) { - return __awaiter16(this, void 0, void 0, function* () { + return __awaiter14(this, void 0, void 0, function* () { const params = { action: "txlist", address: yield this.resolveName(addressOrName), @@ -171573,10 +228896,11 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/fallback-provider.js - var import_bignumber15 = __toESM(require_lib3()); - var import_bytes34 = __toESM(require_lib2()); - var import_logger35 = __toESM(require_lib()); - var __awaiter17 = function(thisArg, _arguments, P, generator) { + var import_bignumber14 = __toESM(require_lib3()); + var import_bytes31 = __toESM(require_lib2()); + var import_properties24 = __toESM(require_lib7()); + var import_logger31 = __toESM(require_lib()); + var __awaiter15 = function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -171603,7 +228927,7 @@ ${bz(e, r10)}`); step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var logger34 = new import_logger35.Logger(version20); + var logger30 = new import_logger31.Logger(version16); function now() { return new Date().getTime(); } @@ -171616,7 +228940,7 @@ ${bz(e, r10)}`); } if (result) { if (!(result.name === network3.name && result.chainId === network3.chainId && (result.ensAddress === network3.ensAddress || result.ensAddress == null && network3.ensAddress == null))) { - logger34.throwArgumentError("provider mismatch", "networks", networks2); + logger30.throwArgumentError("provider mismatch", "networks", networks2); } } else { result = network3; @@ -171643,7 +228967,7 @@ ${bz(e, r10)}`); return JSON.stringify(value); } else if (typeof value === "string") { return value; - } else if (import_bignumber15.BigNumber.isBigNumber(value)) { + } else if (import_bignumber14.BigNumber.isBigNumber(value)) { return value.toString(); } else if (Array.isArray(value)) { return JSON.stringify(value.map((i) => serialize2(i))); @@ -171686,11 +229010,11 @@ ${bz(e, r10)}`); return { cancel, getPromise, wait }; } var ForwardErrors = [ - import_logger35.Logger.errors.CALL_EXCEPTION, - import_logger35.Logger.errors.INSUFFICIENT_FUNDS, - import_logger35.Logger.errors.NONCE_EXPIRED, - import_logger35.Logger.errors.REPLACEMENT_UNDERPRICED, - import_logger35.Logger.errors.UNPREDICTABLE_GAS_LIMIT + import_logger31.Logger.errors.CALL_EXCEPTION, + import_logger31.Logger.errors.INSUFFICIENT_FUNDS, + import_logger31.Logger.errors.NONCE_EXPIRED, + import_logger31.Logger.errors.REPLACEMENT_UNDERPRICED, + import_logger31.Logger.errors.UNPREDICTABLE_GAS_LIMIT ]; var ForwardProperties = [ "address", @@ -171783,7 +229107,7 @@ ${bz(e, r10)}`); if (tx2 == null) { return null; } - tx2 = shallowCopy(tx2); + tx2 = (0, import_properties24.shallowCopy)(tx2); tx2.confirmations = -1; return serialize2(tx2); }; @@ -171794,9 +229118,9 @@ ${bz(e, r10)}`); if (block == null) { return null; } - block = shallowCopy(block); + block = (0, import_properties24.shallowCopy)(block); block.transactions = block.transactions.map((tx2) => { - tx2 = shallowCopy(tx2); + tx2 = (0, import_properties24.shallowCopy)(tx2); tx2.confirmations = -1; return tx2; }); @@ -171817,7 +229141,7 @@ ${bz(e, r10)}`); return normalizedTally(normalize7, provider.quorum); } function waitForSync(config7, blockNumber) { - return __awaiter17(this, void 0, void 0, function* () { + return __awaiter15(this, void 0, void 0, function* () { const provider = config7.provider; if (provider.blockNumber != null && provider.blockNumber >= blockNumber || blockNumber === -1) { return provider; @@ -171838,7 +229162,7 @@ ${bz(e, r10)}`); }); } function getRunner(config7, currentBlockNumber, method, params) { - return __awaiter17(this, void 0, void 0, function* () { + return __awaiter15(this, void 0, void 0, function* () { let provider = config7.provider; switch (method) { case "getBlockNumber": @@ -171852,23 +229176,23 @@ ${bz(e, r10)}`); case "getBalance": case "getTransactionCount": case "getCode": - if (params.blockTag && (0, import_bytes34.isHexString)(params.blockTag)) { + if (params.blockTag && (0, import_bytes31.isHexString)(params.blockTag)) { provider = yield waitForSync(config7, currentBlockNumber); } return provider[method](params.address, params.blockTag || "latest"); case "getStorageAt": - if (params.blockTag && (0, import_bytes34.isHexString)(params.blockTag)) { + if (params.blockTag && (0, import_bytes31.isHexString)(params.blockTag)) { provider = yield waitForSync(config7, currentBlockNumber); } return provider.getStorageAt(params.address, params.position, params.blockTag || "latest"); case "getBlock": - if (params.blockTag && (0, import_bytes34.isHexString)(params.blockTag)) { + if (params.blockTag && (0, import_bytes31.isHexString)(params.blockTag)) { provider = yield waitForSync(config7, currentBlockNumber); } return provider[params.includeTransactions ? "getBlockWithTransactions" : "getBlock"](params.blockTag || params.blockHash); case "call": case "estimateGas": - if (params.blockTag && (0, import_bytes34.isHexString)(params.blockTag)) { + if (params.blockTag && (0, import_bytes31.isHexString)(params.blockTag)) { provider = yield waitForSync(config7, currentBlockNumber); } if (method === "call" && params.blockTag) { @@ -171880,13 +229204,13 @@ ${bz(e, r10)}`); return provider[method](params.transactionHash); case "getLogs": { let filter = params.filter; - if (filter.fromBlock && (0, import_bytes34.isHexString)(filter.fromBlock) || filter.toBlock && (0, import_bytes34.isHexString)(filter.toBlock)) { + if (filter.fromBlock && (0, import_bytes31.isHexString)(filter.fromBlock) || filter.toBlock && (0, import_bytes31.isHexString)(filter.toBlock)) { provider = yield waitForSync(config7, currentBlockNumber); } return provider.getLogs(filter); } } - return logger34.throwError("unknown method error", import_logger35.Logger.errors.UNKNOWN_ERROR, { + return logger30.throwError("unknown method error", import_logger31.Logger.errors.UNKNOWN_ERROR, { method, params }); @@ -171895,7 +229219,7 @@ ${bz(e, r10)}`); var FallbackProvider = class extends BaseProvider { constructor(providers, quorum) { if (providers.length === 0) { - logger34.throwArgumentError("missing providers", "providers", providers); + logger30.throwArgumentError("missing providers", "providers", providers); } const providerConfigs = providers.map((configOrProvider, index) => { if (Provider.isProvider(configOrProvider)) { @@ -171903,7 +229227,7 @@ ${bz(e, r10)}`); const priority = 1; return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority }); } - const config7 = shallowCopy(configOrProvider); + const config7 = (0, import_properties24.shallowCopy)(configOrProvider); if (config7.priority == null) { config7.priority = 1; } @@ -171915,7 +229239,7 @@ ${bz(e, r10)}`); } const weight = config7.weight; if (weight % 1 || weight > 512 || weight < 1) { - logger34.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight); + logger30.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight); } return Object.freeze(config7); }); @@ -171923,7 +229247,7 @@ ${bz(e, r10)}`); if (quorum == null) { quorum = total / 2; } else if (quorum > total) { - logger34.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum); + logger30.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum); } let networkOrReady = checkNetworks(providerConfigs.map((c) => c.provider.network)); if (networkOrReady == null) { @@ -171934,18 +229258,18 @@ ${bz(e, r10)}`); }); } super(networkOrReady); - defineReadOnly(this, "providerConfigs", Object.freeze(providerConfigs)); - defineReadOnly(this, "quorum", quorum); + (0, import_properties24.defineReadOnly)(this, "providerConfigs", Object.freeze(providerConfigs)); + (0, import_properties24.defineReadOnly)(this, "quorum", quorum); this._highestBlockNumber = -1; } detectNetwork() { - return __awaiter17(this, void 0, void 0, function* () { + return __awaiter15(this, void 0, void 0, function* () { const networks2 = yield Promise.all(this.providerConfigs.map((c) => c.provider.getNetwork())); return checkNetworks(networks2); }); } perform(method, params) { - return __awaiter17(this, void 0, void 0, function* () { + return __awaiter15(this, void 0, void 0, function* () { if (method === "sendTransaction") { const results = yield Promise.all(this.providerConfigs.map((c) => { return c.provider.sendTransaction(params.signedTransaction).then((result) => { @@ -171966,7 +229290,7 @@ ${bz(e, r10)}`); yield this.getBlockNumber(); } const processFunc = getProcessFunc(this, method, params); - const configs = shuffled(this.providerConfigs.map(shallowCopy)); + const configs = shuffled(this.providerConfigs.map(import_properties24.shallowCopy)); configs.sort((a, b) => a.priority - b.priority); const currentBlockNumber = this._highestBlockNumber; let i = 0; @@ -171990,7 +229314,7 @@ ${bz(e, r10)}`); action: "request", rid, backend: exposeDebugConfig(config7, now()), - request: { method, params: deepCopy(params) }, + request: { method, params: (0, import_properties24.deepCopy)(params) }, provider: this }); } @@ -172002,7 +229326,7 @@ ${bz(e, r10)}`); action: "request", rid, backend: exposeDebugConfig(config7, now()), - request: { method, params: deepCopy(params) }, + request: { method, params: (0, import_properties24.deepCopy)(params) }, provider: this }); } @@ -172012,7 +229336,7 @@ ${bz(e, r10)}`); action: "request", rid, backend: exposeDebugConfig(config7, null), - request: { method, params: deepCopy(params) }, + request: { method, params: (0, import_properties24.deepCopy)(params) }, provider: this }); } @@ -172080,7 +229404,7 @@ ${bz(e, r10)}`); } props[name6] = e[name6]; }); - logger34.throwError(e.reason || e.message, errorCode, props); + logger30.throwError(e.reason || e.message, errorCode, props); }); if (configs.filter((c) => !c.done).length === 0) { break; @@ -172092,7 +229416,7 @@ ${bz(e, r10)}`); } c.cancelled = true; }); - return logger34.throwError("failed to meet quorum", import_logger35.Logger.errors.SERVER_ERROR, { + return logger30.throwError("failed to meet quorum", import_logger31.Logger.errors.SERVER_ERROR, { method, params, results: configs.map((c) => exposeDebugConfig(c)), @@ -172106,23 +229430,24 @@ ${bz(e, r10)}`); var IpcProvider = null; // node_modules/@ethersproject/providers/lib.esm/infura-provider.js - var import_logger36 = __toESM(require_lib()); - var logger35 = new import_logger36.Logger(version20); + var import_properties25 = __toESM(require_lib7()); + var import_logger32 = __toESM(require_lib()); + var logger31 = new import_logger32.Logger(version16); var defaultProjectId = "84842078b09946638c03157f83405213"; var InfuraWebSocketProvider = class extends WebSocketProvider { constructor(network3, apiKey) { const provider = new InfuraProvider(network3, apiKey); const connection = provider.connection; if (connection.password) { - logger35.throwError("INFURA WebSocket project secrets unsupported", import_logger36.Logger.errors.UNSUPPORTED_OPERATION, { + logger31.throwError("INFURA WebSocket project secrets unsupported", import_logger32.Logger.errors.UNSUPPORTED_OPERATION, { operation: "InfuraProvider.getWebSocketProvider()" }); } const url = connection.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/"); super(url, network3); - defineReadOnly(this, "apiKey", provider.projectId); - defineReadOnly(this, "projectId", provider.projectId); - defineReadOnly(this, "projectSecret", provider.projectSecret); + (0, import_properties25.defineReadOnly)(this, "apiKey", provider.projectId); + (0, import_properties25.defineReadOnly)(this, "projectId", provider.projectId); + (0, import_properties25.defineReadOnly)(this, "projectSecret", provider.projectSecret); } isCommunityResource() { return this.projectId === defaultProjectId; @@ -172144,8 +229469,8 @@ ${bz(e, r10)}`); if (typeof apiKey === "string") { apiKeyObj.projectId = apiKey; } else if (apiKey.projectSecret != null) { - logger35.assertArgument(typeof apiKey.projectId === "string", "projectSecret requires a projectId", "projectId", apiKey.projectId); - logger35.assertArgument(typeof apiKey.projectSecret === "string", "invalid projectSecret", "projectSecret", "[REDACTED]"); + logger31.assertArgument(typeof apiKey.projectId === "string", "projectSecret requires a projectId", "projectId", apiKey.projectId); + logger31.assertArgument(typeof apiKey.projectSecret === "string", "invalid projectSecret", "projectSecret", "[REDACTED]"); apiKeyObj.projectId = apiKey.projectId; apiKeyObj.projectSecret = apiKey.projectSecret; } else if (apiKey.projectId) { @@ -172185,7 +229510,7 @@ ${bz(e, r10)}`); host = "arbitrum-goerli.infura.io"; break; default: - logger35.throwError("unsupported network", import_logger36.Logger.errors.INVALID_ARGUMENT, { + logger31.throwError("unsupported network", import_logger32.Logger.errors.INVALID_ARGUMENT, { argument: "network", value: network3 }); @@ -172212,6 +229537,7 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js + var import_properties26 = __toESM(require_lib7()); var JsonRpcBatchProvider = class extends JsonRpcProvider { send(method, params) { const request = { @@ -172237,7 +229563,7 @@ ${bz(e, r10)}`); const request2 = batch.map((inflight) => inflight.request); this.emit("debug", { action: "requestBatch", - request: deepCopy(request2), + request: (0, import_properties26.deepCopy)(request2), provider: this }); return fetchJson(this.connection, JSON.stringify(request2)).then((result) => { @@ -172276,18 +229602,18 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js - var import_logger37 = __toESM(require_lib()); - var logger36 = new import_logger37.Logger(version20); + var import_logger33 = __toESM(require_lib()); + var logger32 = new import_logger33.Logger(version16); var defaultApiKey3 = "ETHERS_JS_SHARED"; var NodesmithProvider = class extends UrlJsonRpcProvider { static getApiKey(apiKey) { if (apiKey && typeof apiKey !== "string") { - logger36.throwArgumentError("invalid apiKey", "apiKey", apiKey); + logger32.throwArgumentError("invalid apiKey", "apiKey", apiKey); } return apiKey || defaultApiKey3; } static getUrl(network3, apiKey) { - logger36.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform."); + logger32.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform."); let host = null; switch (network3.name) { case "homestead": @@ -172306,15 +229632,15 @@ ${bz(e, r10)}`); host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc"; break; default: - logger36.throwArgumentError("unsupported network", "network", arguments[0]); + logger32.throwArgumentError("unsupported network", "network", arguments[0]); } return host + "?apiKey=" + apiKey; } }; // node_modules/@ethersproject/providers/lib.esm/pocket-provider.js - var import_logger38 = __toESM(require_lib()); - var logger37 = new import_logger38.Logger(version20); + var import_logger34 = __toESM(require_lib()); + var logger33 = new import_logger34.Logger(version16); var defaultApplicationId = "62e1ad51b37b8e00394bda3b"; var PocketProvider = class extends UrlJsonRpcProvider { static getApiKey(apiKey) { @@ -172333,7 +229659,7 @@ ${bz(e, r10)}`); } else if (apiKey.applicationId) { apiKeyObj.applicationId = apiKey.applicationId; } else { - logger37.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + logger33.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); } return apiKeyObj; } @@ -172362,7 +229688,7 @@ ${bz(e, r10)}`); host = "eth-ropsten.gateway.pokt.network"; break; default: - logger37.throwError("unsupported network", import_logger38.Logger.errors.INVALID_ARGUMENT, { + logger33.throwError("unsupported network", import_logger34.Logger.errors.INVALID_ARGUMENT, { argument: "network", value: network3 }); @@ -172381,8 +229707,9 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/web3-provider.js - var import_logger39 = __toESM(require_lib()); - var logger38 = new import_logger39.Logger(version20); + var import_properties27 = __toESM(require_lib7()); + var import_logger35 = __toESM(require_lib()); + var logger34 = new import_logger35.Logger(version16); var _nextId = 1; function buildWeb3LegacyFetcher(provider, sendFunc) { const fetcher = "Web3LegacyFetcher"; @@ -172397,7 +229724,7 @@ ${bz(e, r10)}`); this.emit("debug", { action: "request", fetcher, - request: deepCopy(request), + request: (0, import_properties27.deepCopy)(request), provider: this }); sendFunc(request, (error, response) => { @@ -172438,7 +229765,7 @@ ${bz(e, r10)}`); this.emit("debug", { action: "request", fetcher: "Eip1193Fetcher", - request: deepCopy(request), + request: (0, import_properties27.deepCopy)(request), provider: this }); return provider.request(request).then((response) => { @@ -172465,7 +229792,7 @@ ${bz(e, r10)}`); var Web3Provider = class extends JsonRpcProvider { constructor(provider, network3) { if (provider == null) { - logger38.throwArgumentError("missing provider", "provider", provider); + logger34.throwArgumentError("missing provider", "provider", provider); } let path = null; let jsonRpcFetchFunc = null; @@ -172489,15 +229816,15 @@ ${bz(e, r10)}`); } else if (provider.send) { jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider)); } else { - logger38.throwArgumentError("unsupported provider", "provider", provider); + logger34.throwArgumentError("unsupported provider", "provider", provider); } if (!path) { path = "unknown:"; } } super(path, network3); - defineReadOnly(this, "jsonRpcFetchFunc", jsonRpcFetchFunc); - defineReadOnly(this, "provider", subprovider); + (0, import_properties27.defineReadOnly)(this, "jsonRpcFetchFunc", jsonRpcFetchFunc); + (0, import_properties27.defineReadOnly)(this, "provider", subprovider); } send(method, params) { return this.jsonRpcFetchFunc(method, params); @@ -172505,8 +229832,8 @@ ${bz(e, r10)}`); }; // node_modules/@ethersproject/providers/lib.esm/index.js - var import_logger40 = __toESM(require_lib()); - var logger39 = new import_logger40.Logger(version20); + var import_logger36 = __toESM(require_lib()); + var logger35 = new import_logger36.Logger(version16); function getDefaultProvider(network3, options) { if (network3 == null) { network3 = "homestead"; @@ -172522,13 +229849,13 @@ ${bz(e, r10)}`); case "wss": return new WebSocketProvider(network3); default: - logger39.throwArgumentError("unsupported URL scheme", "network", network3); + logger35.throwArgumentError("unsupported URL scheme", "network", network3); } } } const n = getNetwork(network3); if (!n || !n._defaultProvider) { - logger39.throwError("unsupported getDefaultProvider network", import_logger40.Logger.errors.NETWORK_ERROR, { + logger35.throwError("unsupported getDefaultProvider network", import_logger36.Logger.errors.NETWORK_ERROR, { operation: "getDefaultProvider", network: network3 }); @@ -172562,9 +229889,9 @@ ${bz(e, r10)}`); Indexed: () => Indexed, Interface: () => Interface, LogDescription: () => LogDescription, - Logger: () => import_logger43.Logger, + Logger: () => import_logger39.Logger, ParamType: () => ParamType, - RLP: () => lib_exports, + RLP: () => RLP2, SigningKey: () => SigningKey, SupportedAlgorithm: () => SupportedAlgorithm, TransactionDescription: () => TransactionDescription, @@ -172576,20 +229903,20 @@ ${bz(e, r10)}`); _fetchData: () => _fetchData, _toEscapedUtf8String: () => import_strings13._toEscapedUtf8String, accessListify: () => accessListify, - arrayify: () => import_bytes36.arrayify, + arrayify: () => import_bytes33.arrayify, base58: () => Base58, - base64: () => lib_exports2, - checkProperties: () => checkProperties, + base64: () => lib_exports, + checkProperties: () => import_properties28.checkProperties, checkResultErrors: () => checkResultErrors, commify: () => commify, computeAddress: () => computeAddress, computeHmac: () => computeHmac, computePublicKey: () => computePublicKey, - concat: () => import_bytes36.concat, - deepCopy: () => deepCopy, + concat: () => import_bytes33.concat, + deepCopy: () => import_properties28.deepCopy, defaultAbiCoder: () => defaultAbiCoder, defaultPath: () => defaultPath, - defineReadOnly: () => defineReadOnly, + defineReadOnly: () => import_properties28.defineReadOnly, dnsEncode: () => dnsEncode, entropyToMnemonic: () => entropyToMnemonic, fetchJson: () => fetchJson, @@ -172597,29 +229924,29 @@ ${bz(e, r10)}`); formatEther: () => formatEther, formatUnits: () => formatUnits, getAccountPath: () => getAccountPath, - getAddress: () => getAddress, - getContractAddress: () => getContractAddress, - getCreate2Address: () => getCreate2Address, - getIcapAddress: () => getIcapAddress, + getAddress: () => import_address12.getAddress, + getContractAddress: () => import_address12.getContractAddress, + getCreate2Address: () => import_address12.getCreate2Address, + getIcapAddress: () => import_address12.getIcapAddress, getJsonWalletAddress: () => getJsonWalletAddress, - getStatic: () => getStatic, + getStatic: () => import_properties28.getStatic, hashMessage: () => hashMessage, - hexConcat: () => import_bytes36.hexConcat, - hexDataLength: () => import_bytes36.hexDataLength, - hexDataSlice: () => import_bytes36.hexDataSlice, - hexStripZeros: () => import_bytes36.hexStripZeros, - hexValue: () => import_bytes36.hexValue, - hexZeroPad: () => import_bytes36.hexZeroPad, - hexlify: () => import_bytes36.hexlify, + hexConcat: () => import_bytes33.hexConcat, + hexDataLength: () => import_bytes33.hexDataLength, + hexDataSlice: () => import_bytes33.hexDataSlice, + hexStripZeros: () => import_bytes33.hexStripZeros, + hexValue: () => import_bytes33.hexValue, + hexZeroPad: () => import_bytes33.hexZeroPad, + hexlify: () => import_bytes33.hexlify, id: () => id2, - isAddress: () => isAddress, - isBytes: () => import_bytes36.isBytes, - isBytesLike: () => import_bytes36.isBytesLike, - isHexString: () => import_bytes36.isHexString, + isAddress: () => import_address12.isAddress, + isBytes: () => import_bytes33.isBytes, + isBytesLike: () => import_bytes33.isBytesLike, + isHexString: () => import_bytes33.isHexString, isValidMnemonic: () => isValidMnemonic, isValidName: () => isValidName, - joinSignature: () => import_bytes36.joinSignature, - keccak256: () => keccak256, + joinSignature: () => import_bytes33.joinSignature, + keccak256: () => import_keccak25611.keccak256, mnemonicToEntropy: () => mnemonicToEntropy, mnemonicToSeed: () => mnemonicToSeed, namehash: () => namehash, @@ -172632,84 +229959,87 @@ ${bz(e, r10)}`); randomBytes: () => randomBytes, recoverAddress: () => recoverAddress, recoverPublicKey: () => recoverPublicKey, - resolveProperties: () => resolveProperties, + resolveProperties: () => import_properties28.resolveProperties, ripemd160: () => ripemd160, serializeTransaction: () => serialize, sha256: () => sha256, sha512: () => sha512, - shallowCopy: () => shallowCopy, + shallowCopy: () => import_properties28.shallowCopy, shuffled: () => shuffled, - solidityKeccak256: () => keccak2562, + solidityKeccak256: () => keccak25610, solidityPack: () => pack2, soliditySha256: () => sha2562, - splitSignature: () => import_bytes36.splitSignature, - stripZeros: () => import_bytes36.stripZeros, + splitSignature: () => import_bytes33.splitSignature, + stripZeros: () => import_bytes33.stripZeros, toUtf8Bytes: () => import_strings13.toUtf8Bytes, toUtf8CodePoints: () => import_strings13.toUtf8CodePoints, toUtf8String: () => import_strings13.toUtf8String, verifyMessage: () => verifyMessage, verifyTypedData: () => verifyTypedData, - zeroPad: () => import_bytes36.zeroPad + zeroPad: () => import_bytes33.zeroPad }); - var import_bytes36 = __toESM(require_lib2()); - var import_logger43 = __toESM(require_lib()); + var import_address12 = __toESM(require_lib10()); + var import_bytes33 = __toESM(require_lib2()); + var import_keccak25611 = __toESM(require_lib8()); + var import_logger39 = __toESM(require_lib()); // node_modules/@ethersproject/solidity/lib.esm/index.js - var import_bignumber16 = __toESM(require_lib3()); - var import_bytes35 = __toESM(require_lib2()); + var import_bignumber15 = __toESM(require_lib3()); + var import_bytes32 = __toESM(require_lib2()); + var import_keccak25610 = __toESM(require_lib8()); var import_strings12 = __toESM(require_lib6()); - var import_logger41 = __toESM(require_lib()); + var import_logger37 = __toESM(require_lib()); // node_modules/@ethersproject/solidity/lib.esm/_version.js - var version21 = "solidity/5.7.0"; + var version17 = "solidity/5.7.0"; // node_modules/@ethersproject/solidity/lib.esm/index.js var regexBytes = new RegExp("^bytes([0-9]+)$"); var regexNumber = new RegExp("^(u?int)([0-9]*)$"); var regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$"); var Zeros2 = "0000000000000000000000000000000000000000000000000000000000000000"; - var logger40 = new import_logger41.Logger(version21); + var logger36 = new import_logger37.Logger(version17); function _pack(type, value, isArray4) { switch (type) { case "address": if (isArray4) { - return (0, import_bytes35.zeroPad)(value, 32); + return (0, import_bytes32.zeroPad)(value, 32); } - return (0, import_bytes35.arrayify)(value); + return (0, import_bytes32.arrayify)(value); case "string": return (0, import_strings12.toUtf8Bytes)(value); case "bytes": - return (0, import_bytes35.arrayify)(value); + return (0, import_bytes32.arrayify)(value); case "bool": value = value ? "0x01" : "0x00"; if (isArray4) { - return (0, import_bytes35.zeroPad)(value, 32); + return (0, import_bytes32.zeroPad)(value, 32); } - return (0, import_bytes35.arrayify)(value); + return (0, import_bytes32.arrayify)(value); } let match = type.match(regexNumber); if (match) { let size = parseInt(match[2] || "256"); if (match[2] && String(size) !== match[2] || size % 8 !== 0 || size === 0 || size > 256) { - logger40.throwArgumentError("invalid number type", "type", type); + logger36.throwArgumentError("invalid number type", "type", type); } if (isArray4) { size = 256; } - value = import_bignumber16.BigNumber.from(value).toTwos(size); - return (0, import_bytes35.zeroPad)(value, size / 8); + value = import_bignumber15.BigNumber.from(value).toTwos(size); + return (0, import_bytes32.zeroPad)(value, size / 8); } match = type.match(regexBytes); if (match) { const size = parseInt(match[1]); if (String(size) !== match[1] || size === 0 || size > 32) { - logger40.throwArgumentError("invalid bytes type", "type", type); + logger36.throwArgumentError("invalid bytes type", "type", type); } - if ((0, import_bytes35.arrayify)(value).byteLength !== size) { - logger40.throwArgumentError(`invalid value for ${type}`, "value", value); + if ((0, import_bytes32.arrayify)(value).byteLength !== size) { + logger36.throwArgumentError(`invalid value for ${type}`, "value", value); } if (isArray4) { - return (0, import_bytes35.arrayify)((value + Zeros2).substring(0, 66)); + return (0, import_bytes32.arrayify)((value + Zeros2).substring(0, 66)); } return value; } @@ -172718,45 +230048,47 @@ ${bz(e, r10)}`); const baseType = match[1]; const count = parseInt(match[2] || String(value.length)); if (count != value.length) { - logger40.throwArgumentError(`invalid array length for ${type}`, "value", value); + logger36.throwArgumentError(`invalid array length for ${type}`, "value", value); } const result = []; value.forEach(function(value2) { result.push(_pack(baseType, value2, true)); }); - return (0, import_bytes35.concat)(result); + return (0, import_bytes32.concat)(result); } - return logger40.throwArgumentError("invalid type", "type", type); + return logger36.throwArgumentError("invalid type", "type", type); } function pack2(types2, values) { if (types2.length != values.length) { - logger40.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values); + logger36.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values); } const tight = []; types2.forEach(function(type, index) { tight.push(_pack(type, values[index])); }); - return (0, import_bytes35.hexlify)((0, import_bytes35.concat)(tight)); + return (0, import_bytes32.hexlify)((0, import_bytes32.concat)(tight)); } - function keccak2562(types2, values) { - return keccak256(pack2(types2, values)); + function keccak25610(types2, values) { + return (0, import_keccak25610.keccak256)(pack2(types2, values)); } function sha2562(types2, values) { return sha256(pack2(types2, values)); } // node_modules/ethers/lib.esm/utils.js + var import_properties28 = __toESM(require_lib7()); + var RLP2 = __toESM(require_lib9()); var import_strings13 = __toESM(require_lib6()); // node_modules/@ethersproject/units/lib.esm/index.js - var import_bignumber17 = __toESM(require_lib3()); - var import_logger42 = __toESM(require_lib()); + var import_bignumber16 = __toESM(require_lib3()); + var import_logger38 = __toESM(require_lib()); // node_modules/@ethersproject/units/lib.esm/_version.js - var version22 = "units/5.7.0"; + var version18 = "units/5.7.0"; // node_modules/@ethersproject/units/lib.esm/index.js - var logger41 = new import_logger42.Logger(version22); + var logger37 = new import_logger38.Logger(version18); var names = [ "wei", "kwei", @@ -172769,7 +230101,7 @@ ${bz(e, r10)}`); function commify(value) { const comps = String(value).split("."); if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || comps[1] && !comps[1].match(/^[0-9]*$/) || value === "." || value === "-.") { - logger41.throwArgumentError("invalid value", "value", value); + logger37.throwArgumentError("invalid value", "value", value); } let whole = comps[0]; let negative = ""; @@ -172810,11 +230142,11 @@ ${bz(e, r10)}`); unitName = 3 * index; } } - return (0, import_bignumber17.formatFixed)(value, unitName != null ? unitName : 18); + return (0, import_bignumber16.formatFixed)(value, unitName != null ? unitName : 18); } function parseUnits(value, unitName) { if (typeof value !== "string") { - logger41.throwArgumentError("value must be a string", "value", value); + logger37.throwArgumentError("value must be a string", "value", value); } if (typeof unitName === "string") { const index = names.indexOf(unitName); @@ -172822,7 +230154,7 @@ ${bz(e, r10)}`); unitName = 3 * index; } } - return (0, import_bignumber17.parseFixed)(value, unitName != null ? unitName : 18); + return (0, import_bignumber16.parseFixed)(value, unitName != null ? unitName : 18); } function formatEther(wei) { return formatUnits(wei, 18); @@ -172835,13 +230167,13 @@ ${bz(e, r10)}`); var import_strings14 = __toESM(require_lib6()); // node_modules/ethers/lib.esm/ethers.js - var import_logger44 = __toESM(require_lib()); + var import_logger40 = __toESM(require_lib()); // node_modules/ethers/lib.esm/_version.js - var version23 = "ethers/5.7.2"; + var version19 = "ethers/5.7.2"; // node_modules/ethers/lib.esm/ethers.js - var logger42 = new import_logger44.Logger(version23); + var logger38 = new import_logger40.Logger(version19); // node_modules/ethers/lib.esm/index.js try { @@ -174893,7 +232225,7 @@ query FETCH_NFT_INFO($nftId: BigInt!,$ownerAddress: String!) { var outputAmount = inputAmount.toLocaleString("en", { useGrouping: false, minimumFractionDigits: decimals, maximumFractionDigits: decimals }); return outputAmount.startsWith("0.") ? outputAmount.replace("0.", "") : outputAmount.replace(".", ""); }; - var calculateAmount = ({ decimals, amount }) => import_bignumber18.BigNumber.from(transformAmount(decimals, assertAmount(amount))).toString(); + var calculateAmount = ({ decimals, amount }) => import_bignumber17.BigNumber.from(transformAmount(decimals, assertAmount(amount))).toString(); var calculateAmountWithPercentage = ({ amount: oldAmount, decimals }, percentage) => { if (!oldAmount) { return "0"; @@ -175803,7 +233135,7 @@ query FETCH_NFT_INFO($nftId: BigInt!,$ownerAddress: String!) { name: "REEF", address: "0x0000000000000000000000000000000001000000", iconUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/6951.png", - balance: import_bignumber18.BigNumber.from(0), + balance: import_bignumber17.BigNumber.from(0), decimals: 18, symbol: "REEF" }; @@ -175847,14 +233179,6 @@ query FETCH_NFT_INFO($nftId: BigInt!,$ownerAddress: String!) { throw new Error("Unknown address"); } }; - var approveTokenAmount = async (tokenAddress, sellAmount, routerAddress, signer) => { - const tokenContract = await getREEF20Contract(tokenAddress, signer); - if (tokenContract) { - await tokenContract.approve(routerAddress, sellAmount); - return; - } - throw new Error(`Token contract does not exist addr=${tokenAddress}`); - }; var fetchTokenData = (httpClient, searchAddress, provider, factoryAddress, reefPrice) => firstValueFrom( F7e.queryGql$( httpClient, @@ -175896,6 +233220,8 @@ query FETCH_NFT_INFO($nftId: BigInt!,$ownerAddress: String!) { }; // src/jsApi/swapApi.ts + var import_evm_provider = __toESM(require_evm_provider()); + var import_utils4 = __toESM(require_utils3()); var defaultSwapSettings = { deadline: 1, slippageTolerance: 0.8 @@ -175904,6 +233230,73 @@ query FETCH_NFT_INFO($nftId: BigInt!,$ownerAddress: String!) { deadline: Number.isNaN(deadline) ? defaultSwapSettings.deadline : deadline, slippageTolerance: Number.isNaN(slippageTolerance) ? defaultSwapSettings.slippageTolerance : slippageTolerance }); + var hexToAscii = (str1) => { + const hex8 = str1.toString(); + let str2 = ""; + for (let n = 0; n < hex8.length; n += 2) { + str2 += String.fromCharCode(parseInt(hex8.substr(n, 2), 16)); + } + return str2; + }; + var captureError2 = (events) => { + for (const event of events) { + const eventCompression = `${event.event.section.toString()}.${event.event.method.toString()}`; + if (eventCompression === "evm.ExecutedFailed") { + const eventData = event.event.data.toJSON(); + let message = eventData[eventData.length - 2]; + if (typeof message === "string" || message instanceof String) { + message = hexToAscii(message.substring(138)); + } else { + message = JSON.stringify(message); + } + return message; + } + } + return void 0; + }; + var getReefCoinBalance = async (address, provider) => { + const balance = await provider.api.derive.balances.all(address).then((res) => import_bignumber17.BigNumber.from(res.freeBalance.toString(10))); + return balance; + }; + var signerToReefSigner = async (signer, provider, { + address, + name: name6, + source, + genesisHash + }) => { + const evmAddress = await signer.getAddress(); + const isEvmClaimed = await signer.isClaimed(); + let inj; + try { + inj = await V7e.web3FromAddress(address); + } catch (e) { + } + const balance = await getReefCoinBalance(address, provider); + return { + signer, + balance, + evmAddress, + isEvmClaimed, + name: name6, + address, + source, + genesisHash, + sign: inj?.signer + }; + }; + var accountToSigner = async (account, provider, sign4, source) => { + const signer = new import_evm_provider.Signer(provider, account.address, sign4); + return signerToReefSigner( + signer, + provider, + { + source, + address: account.address, + name: account.name || "", + genesisHash: account.genesisHash || "" + } + ); + }; var initApi3 = (signingKey) => { window.swap = { execute: (signerAddress, token1, token2, settings) => { @@ -175926,7 +233319,7 @@ query FETCH_NFT_INFO($nftId: BigInt!,$ownerAddress: String!) { { decimals: token2.decimals, amount: token2.amount }, settings.slippageTolerance ); - const signer = await c9e(reefSigner.address, provider, signingKey); + const { signer } = await accountToSigner(reefSigner, provider, signingKey, "injected"); const swapRouter = new Contract( x7e.getReefswapNetworkConfig(network3).routerAddress, ReefswapRouter, @@ -175934,27 +233327,61 @@ query FETCH_NFT_INFO($nftId: BigInt!,$ownerAddress: String!) { ); try { observer.next({ status: "approve-started" }); - await approveTokenAmount( - token1.address, - sellAmount, + const tokenContract = await getREEF20Contract(token1.address, signer); + let approveTransaction = await tokenContract.populateTransaction.approve( x7e.getReefswapNetworkConfig(network3).routerAddress, - signer + sellAmount ); observer.next({ status: "approved" }); - console.log("Token approved"); - console.log("Waiting for confirmation of swap..."); - const tx2 = await swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens( + const tradeTransaction = await swapRouter.populateTransaction.swapExactTokensForTokensSupportingFeeOnTransferTokens( sellAmount, minBuyAmount, [token1.address, token2.address], reefSigner.evmAddress, calculateDeadline(settings.deadline) ); - observer.next({ status: "broadcast", transactionResponse: tx2 }); - const receipt = await tx2.wait(); - console.log("SWAP RESULT=", receipt); - observer.next({ status: "included-in-block", transactionReceipt: receipt }); - observer.next({ status: "finalized", transactionReceipt: receipt }); + const approveResources = await signer.provider.estimateResources(approveTransaction); + const approveExtrinsic = signer.provider.api.tx.evm.call( + approveTransaction.to, + approveTransaction.data, + (0, import_utils4.toBN)(approveTransaction.value || 0), + (0, import_utils4.toBN)(approveResources.gas), + approveResources.storage.lt(0) ? (0, import_utils4.toBN)(0) : (0, import_utils4.toBN)(approveResources.storage) + ); + const tradeExtrinsic = signer.provider.api.tx.evm.call( + tradeTransaction.to, + tradeTransaction.data, + (0, import_utils4.toBN)(tradeTransaction.value || 0), + (0, import_utils4.toBN)(582938 * 2), + (0, import_utils4.toBN)(64 * 2) + ); + const batch = signer.provider.api.tx.utility.batchAll([ + approveExtrinsic, + tradeExtrinsic + ]); + const signAndSend = new Promise((resolve, reject) => { + batch.signAndSend( + reefSigner.address, + { signer: signer.signingKey }, + (status) => { + const err = captureError2(status.events); + if (err) { + reject({ message: err }); + } + if (status.dispatchError) { + reject({ message: status.dispatchError.toString() }); + } + if (status.status.isInBlock) { + resolve(); + } + if (status.status.isFinalized) { + } + } + ); + }); + await signAndSend; + observer.next({ status: "included-in-block", transactionReceipt: "receipt" }); + observer.next({ status: "finalized", transactionReceipt: "receipt" }); observer.complete(); } catch (e) { console.log("ERROR swapping tokens", e.message); @@ -176057,12 +233484,12 @@ query FETCH_TX_INFO { var tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: "; var BASE = 1e14; var LOG_BASE = 14; - var MAX_SAFE_INTEGER2 = 9007199254740991; + var MAX_SAFE_INTEGER = 9007199254740991; var POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13]; var SQRT_BASE = 1e7; var MAX = 1e9; function clone(configObject) { - var div, convertBase, parseNumeric, P = BigNumber19.prototype = { constructor: BigNumber19, toString: null, valueOf: null }, ONE = new BigNumber19(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT2 = { + var div, convertBase, parseNumeric, P = BigNumber18.prototype = { constructor: BigNumber18, toString: null, valueOf: null }, ONE = new BigNumber18(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT2 = { prefix: "", groupSize: 3, secondaryGroupSize: 0, @@ -176072,10 +233499,10 @@ query FETCH_TX_INFO { fractionGroupSeparator: "\xA0", suffix: "" }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true; - function BigNumber19(v, b) { + function BigNumber18(v, b) { var alphabet4, c, caseChanged, e, i, isNum, len, str2, x = this; - if (!(x instanceof BigNumber19)) - return new BigNumber19(v, b); + if (!(x instanceof BigNumber18)) + return new BigNumber18(v, b); if (b == null) { if (v && v._isBigNumber === true) { x.s = v.s; @@ -176121,7 +233548,7 @@ query FETCH_TX_INFO { } else { intCheck(b, 2, ALPHABET.length, "Base"); if (b == 10 && alphabetHasNormalDecimalDigits) { - x = new BigNumber19(v); + x = new BigNumber18(v); return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE); } str2 = String(v); @@ -176129,7 +233556,7 @@ query FETCH_TX_INFO { if (v * 0 != 0) return parseNumeric(x, str2, isNum, b); x.s = 1 / v < 0 ? (str2 = str2.slice(1), -1) : 1; - if (BigNumber19.DEBUG && str2.replace(/^0\.0*|\./, "").length > 15) { + if (BigNumber18.DEBUG && str2.replace(/^0\.0*|\./, "").length > 15) { throw Error(tooManyDigits + v); } } else { @@ -176168,7 +233595,7 @@ query FETCH_TX_INFO { ; if (str2 = str2.slice(i, ++len)) { len -= i; - if (isNum && BigNumber19.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER2 || v !== mathfloor(v))) { + if (isNum && BigNumber18.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) { throw Error(tooManyDigits + x.s * v); } if ((e = e - i - 1) > MAX_EXP) { @@ -176199,18 +233626,18 @@ query FETCH_TX_INFO { x.c = [x.e = 0]; } } - BigNumber19.clone = clone; - BigNumber19.ROUND_UP = 0; - BigNumber19.ROUND_DOWN = 1; - BigNumber19.ROUND_CEIL = 2; - BigNumber19.ROUND_FLOOR = 3; - BigNumber19.ROUND_HALF_UP = 4; - BigNumber19.ROUND_HALF_DOWN = 5; - BigNumber19.ROUND_HALF_EVEN = 6; - BigNumber19.ROUND_HALF_CEIL = 7; - BigNumber19.ROUND_HALF_FLOOR = 8; - BigNumber19.EUCLID = 9; - BigNumber19.config = BigNumber19.set = function(obj) { + BigNumber18.clone = clone; + BigNumber18.ROUND_UP = 0; + BigNumber18.ROUND_DOWN = 1; + BigNumber18.ROUND_CEIL = 2; + BigNumber18.ROUND_FLOOR = 3; + BigNumber18.ROUND_HALF_UP = 4; + BigNumber18.ROUND_HALF_DOWN = 5; + BigNumber18.ROUND_HALF_EVEN = 6; + BigNumber18.ROUND_HALF_CEIL = 7; + BigNumber18.ROUND_HALF_FLOOR = 8; + BigNumber18.EUCLID = 9; + BigNumber18.config = BigNumber18.set = function(obj) { var p, v; if (obj != null) { if (typeof obj == "object") { @@ -176311,10 +233738,10 @@ query FETCH_TX_INFO { ALPHABET }; }; - BigNumber19.isBigNumber = function(v) { + BigNumber18.isBigNumber = function(v) { if (!v || v._isBigNumber !== true) return false; - if (!BigNumber19.DEBUG) + if (!BigNumber18.DEBUG) return true; var i, n, c = v.c, e = v.e, s = v.s; out: @@ -176343,13 +233770,13 @@ query FETCH_TX_INFO { } throw Error(bignumberError + "Invalid BigNumber: " + v); }; - BigNumber19.maximum = BigNumber19.max = function() { + BigNumber18.maximum = BigNumber18.max = function() { return maxOrMin(arguments, -1); }; - BigNumber19.minimum = BigNumber19.min = function() { + BigNumber18.minimum = BigNumber18.min = function() { return maxOrMin(arguments, 1); }; - BigNumber19.random = function() { + BigNumber18.random = function() { var pow2_53 = 9007199254740992; var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() { return mathfloor(Math.random() * pow2_53); @@ -176357,7 +233784,7 @@ query FETCH_TX_INFO { return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0); }; return function(dp2) { - var a, b, e, k, v, i = 0, c = [], rand2 = new BigNumber19(ONE); + var a, b, e, k, v, i = 0, c = [], rand2 = new BigNumber18(ONE); if (dp2 == null) dp2 = DECIMAL_PLACES; else @@ -176425,8 +233852,8 @@ query FETCH_TX_INFO { return rand2; }; }(); - BigNumber19.sum = function() { - var i = 1, args = arguments, sum = new BigNumber19(args[0]); + BigNumber18.sum = function() { + var i = 1, args = arguments, sum = new BigNumber18(args[0]); for (; i < args.length; ) sum = sum.plus(args[i++]); return sum; @@ -176456,7 +233883,7 @@ query FETCH_TX_INFO { k = POW_PRECISION; POW_PRECISION = 0; str2 = str2.replace(".", ""); - y = new BigNumber19(baseIn); + y = new BigNumber18(baseIn); x = y.pow(str2.length - i); POW_PRECISION = k; y.c = toBaseOut( @@ -176553,11 +233980,11 @@ query FETCH_TX_INFO { return function(x, y, dp2, rm2, base2) { var cmp, e, i, more, n, prod, prodL, q, qc2, rem, remL, rem0, xi2, xL2, yc0, yL2, yz2, s = x.s == y.s ? 1 : -1, xc2 = x.c, yc2 = y.c; if (!xc2 || !xc2[0] || !yc2 || !yc2[0]) { - return new BigNumber19( + return new BigNumber18( !x.s || !y.s || (xc2 ? yc2 && xc2[0] == yc2[0] : !yc2) ? NaN : xc2 && xc2[0] == 0 || !yc2 ? s * 0 : s / 0 ); } - q = new BigNumber19(s); + q = new BigNumber18(s); qc2 = q.c = []; e = x.e - y.e; s = dp2 + e + 1; @@ -176674,7 +234101,7 @@ query FETCH_TX_INFO { str2 = coeffToString(n.c); str2 = id4 == 1 || id4 == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str2, ne) : toFixedPoint(str2, ne, "0"); } else { - n = round(new BigNumber19(n), i, rm2); + n = round(new BigNumber18(n), i, rm2); e = n.e; str2 = coeffToString(n.c); len = str2.length; @@ -176703,9 +234130,9 @@ query FETCH_TX_INFO { return n.s < 0 && c02 ? "-" + str2 : str2; } function maxOrMin(args, n) { - var k, y, i = 1, x = new BigNumber19(args[0]); + var k, y, i = 1, x = new BigNumber18(args[0]); for (; i < args.length; i++) { - y = new BigNumber19(args[i]); + y = new BigNumber18(args[i]); if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) { x = y; } @@ -176745,9 +234172,9 @@ query FETCH_TX_INFO { s = s.replace(dotAfter, "$1").replace(dotBefore, "0.$1"); } if (str2 != s) - return new BigNumber19(s, base2); + return new BigNumber18(s, base2); } - if (BigNumber19.DEBUG) { + if (BigNumber18.DEBUG) { throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str2); } x.s = null; @@ -176854,13 +234281,13 @@ query FETCH_TX_INFO { return n.s < 0 ? "-" + str2 : str2; } P.absoluteValue = P.abs = function() { - var x = new BigNumber19(this); + var x = new BigNumber18(this); if (x.s < 0) x.s = 1; return x; }; P.comparedTo = function(y, b) { - return compare(this, new BigNumber19(y, b)); + return compare(this, new BigNumber18(y, b)); }; P.decimalPlaces = P.dp = function(dp2, rm2) { var c, n, v, x = this; @@ -176870,7 +234297,7 @@ query FETCH_TX_INFO { rm2 = ROUNDING_MODE; else intCheck(rm2, 0, 8); - return round(new BigNumber19(x), dp2 + x.e + 1, rm2); + return round(new BigNumber18(x), dp2 + x.e + 1, rm2); } if (!(c = x.c)) return null; @@ -176883,28 +234310,28 @@ query FETCH_TX_INFO { return n; }; P.dividedBy = P.div = function(y, b) { - return div(this, new BigNumber19(y, b), DECIMAL_PLACES, ROUNDING_MODE); + return div(this, new BigNumber18(y, b), DECIMAL_PLACES, ROUNDING_MODE); }; P.dividedToIntegerBy = P.idiv = function(y, b) { - return div(this, new BigNumber19(y, b), 0, 1); + return div(this, new BigNumber18(y, b), 0, 1); }; P.exponentiatedBy = P.pow = function(n, m) { var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this; - n = new BigNumber19(n); + n = new BigNumber18(n); if (n.c && !n.isInteger()) { throw Error(bignumberError + "Exponent not an integer: " + valueOf(n)); } if (m != null) - m = new BigNumber19(m); + m = new BigNumber18(m); nIsBig = n.e > 14; if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) { - y = new BigNumber19(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n))); + y = new BigNumber18(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n))); return m ? y.mod(m) : y; } nIsNeg = n.s < 0; if (m) { if (m.c ? !m.c[0] : !m.s) - return new BigNumber19(NaN); + return new BigNumber18(NaN); isModExp = !nIsNeg && x.isInteger() && m.isInteger(); if (isModExp) x = x.mod(m); @@ -176912,12 +234339,12 @@ query FETCH_TX_INFO { k = x.s < 0 && isOdd(n) ? -0 : 0; if (x.e > -1) k = 1 / k; - return new BigNumber19(nIsNeg ? 1 / k : k); + return new BigNumber18(nIsNeg ? 1 / k : k); } else if (POW_PRECISION) { k = mathceil(POW_PRECISION / LOG_BASE + 2); } if (nIsBig) { - half = new BigNumber19(0.5); + half = new BigNumber18(0.5); if (nIsNeg) n.s = 1; nIsOdd = isOdd(n); @@ -176925,7 +234352,7 @@ query FETCH_TX_INFO { i = Math.abs(+valueOf(n)); nIsOdd = i % 2; } - y = new BigNumber19(ONE); + y = new BigNumber18(ONE); for (; ; ) { if (nIsOdd) { y = y.times(x); @@ -176970,7 +234397,7 @@ query FETCH_TX_INFO { return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; }; P.integerValue = function(rm2) { - var n = new BigNumber19(this); + var n = new BigNumber18(this); if (rm2 == null) rm2 = ROUNDING_MODE; else @@ -176978,25 +234405,25 @@ query FETCH_TX_INFO { return round(n, n.e + 1, rm2); }; P.isEqualTo = P.eq = function(y, b) { - return compare(this, new BigNumber19(y, b)) === 0; + return compare(this, new BigNumber18(y, b)) === 0; }; P.isFinite = function() { return !!this.c; }; P.isGreaterThan = P.gt = function(y, b) { - return compare(this, new BigNumber19(y, b)) > 0; + return compare(this, new BigNumber18(y, b)) > 0; }; P.isGreaterThanOrEqualTo = P.gte = function(y, b) { - return (b = compare(this, new BigNumber19(y, b))) === 1 || b === 0; + return (b = compare(this, new BigNumber18(y, b))) === 1 || b === 0; }; P.isInteger = function() { return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; }; P.isLessThan = P.lt = function(y, b) { - return compare(this, new BigNumber19(y, b)) < 0; + return compare(this, new BigNumber18(y, b)) < 0; }; P.isLessThanOrEqualTo = P.lte = function(y, b) { - return (b = compare(this, new BigNumber19(y, b))) === -1 || b === 0; + return (b = compare(this, new BigNumber18(y, b))) === -1 || b === 0; }; P.isNaN = function() { return !this.s; @@ -177012,10 +234439,10 @@ query FETCH_TX_INFO { }; P.minus = function(y, b) { var i, j10, t, xLTy, x = this, a = x.s; - y = new BigNumber19(y, b); + y = new BigNumber18(y, b); b = y.s; if (!a || !b) - return new BigNumber19(NaN); + return new BigNumber18(NaN); if (a != b) { y.s = -b; return x.plus(y); @@ -177023,9 +234450,9 @@ query FETCH_TX_INFO { var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc2 = x.c, yc2 = y.c; if (!xe || !ye) { if (!xc2 || !yc2) - return xc2 ? (y.s = -b, y) : new BigNumber19(yc2 ? x : NaN); + return xc2 ? (y.s = -b, y) : new BigNumber18(yc2 ? x : NaN); if (!xc2[0] || !yc2[0]) { - return yc2[0] ? (y.s = -b, y) : new BigNumber19(xc2[0] ? x : ROUNDING_MODE == 3 ? -0 : 0); + return yc2[0] ? (y.s = -b, y) : new BigNumber18(xc2[0] ? x : ROUNDING_MODE == 3 ? -0 : 0); } } xe = bitFloor(xe); @@ -177083,11 +234510,11 @@ query FETCH_TX_INFO { }; P.modulo = P.mod = function(y, b) { var q, s, x = this; - y = new BigNumber19(y, b); + y = new BigNumber18(y, b); if (!x.c || !y.s || y.c && !y.c[0]) { - return new BigNumber19(NaN); + return new BigNumber18(NaN); } else if (!y.c || x.c && !x.c[0]) { - return new BigNumber19(x); + return new BigNumber18(x); } if (MODULO_MODE == 9) { s = y.s; @@ -177104,7 +234531,7 @@ query FETCH_TX_INFO { return y; }; P.multipliedBy = P.times = function(y, b) { - var c, e, i, j10, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc2, base2, sqrtBase, x = this, xc2 = x.c, yc2 = (y = new BigNumber19(y, b)).c; + var c, e, i, j10, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc2, base2, sqrtBase, x = this, xc2 = x.c, yc2 = (y = new BigNumber18(y, b)).c; if (!xc2 || !yc2 || !xc2[0] || !yc2[0]) { if (!x.s || !y.s || xc2 && !xc2[0] && !yc2 || yc2 && !yc2[0] && !xc2) { y.c = y.e = y.s = null; @@ -177157,16 +234584,16 @@ query FETCH_TX_INFO { return normalise(y, zc2, e); }; P.negated = function() { - var x = new BigNumber19(this); + var x = new BigNumber18(this); x.s = -x.s || null; return x; }; P.plus = function(y, b) { var t, x = this, a = x.s; - y = new BigNumber19(y, b); + y = new BigNumber18(y, b); b = y.s; if (!a || !b) - return new BigNumber19(NaN); + return new BigNumber18(NaN); if (a != b) { y.s = -b; return x.minus(y); @@ -177174,9 +234601,9 @@ query FETCH_TX_INFO { var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc2 = x.c, yc2 = y.c; if (!xe || !ye) { if (!xc2 || !yc2) - return new BigNumber19(a / 0); + return new BigNumber18(a / 0); if (!xc2[0] || !yc2[0]) - return yc2[0] ? y : new BigNumber19(xc2[0] ? x : a * 0); + return yc2[0] ? y : new BigNumber18(xc2[0] ? x : a * 0); } xe = bitFloor(xe); ye = bitFloor(ye); @@ -177220,7 +234647,7 @@ query FETCH_TX_INFO { rm2 = ROUNDING_MODE; else intCheck(rm2, 0, 8); - return round(new BigNumber19(x), sd2, rm2); + return round(new BigNumber18(x), sd2, rm2); } if (!(c = x.c)) return null; @@ -177237,13 +234664,13 @@ query FETCH_TX_INFO { return n; }; P.shiftedBy = function(k) { - intCheck(k, -MAX_SAFE_INTEGER2, MAX_SAFE_INTEGER2); + intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); return this.times("1e" + k); }; P.squareRoot = P.sqrt = function() { - var m, n, r10, rep2, t, x = this, c = x.c, s = x.s, e = x.e, dp2 = DECIMAL_PLACES + 4, half = new BigNumber19("0.5"); + var m, n, r10, rep2, t, x = this, c = x.c, s = x.s, e = x.e, dp2 = DECIMAL_PLACES + 4, half = new BigNumber18("0.5"); if (s !== 1 || !c || !c[0]) { - return new BigNumber19(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); + return new BigNumber18(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); } s = Math.sqrt(+valueOf(x)); if (s == 0 || s == 1 / 0) { @@ -177258,9 +234685,9 @@ query FETCH_TX_INFO { n = s.toExponential(); n = n.slice(0, n.indexOf("e") + 1) + e; } - r10 = new BigNumber19(n); + r10 = new BigNumber18(n); } else { - r10 = new BigNumber19(s + ""); + r10 = new BigNumber18(s + ""); } if (r10.c[0]) { e = r10.e; @@ -177355,23 +234782,23 @@ query FETCH_TX_INFO { P.toFraction = function(md2) { var d, d02, d12, d22, e, exp, n, n02, n12, q, r10, s, x = this, xc2 = x.c; if (md2 != null) { - n = new BigNumber19(md2); + n = new BigNumber18(md2); if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) { throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n)); } } if (!xc2) - return new BigNumber19(x); - d = new BigNumber19(ONE); - n12 = d02 = new BigNumber19(ONE); - d12 = n02 = new BigNumber19(ONE); + return new BigNumber18(x); + d = new BigNumber18(ONE); + n12 = d02 = new BigNumber18(ONE); + d12 = n02 = new BigNumber18(ONE); s = coeffToString(xc2); e = d.e = s.length - x.e - 1; d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp]; md2 = !md2 || n.comparedTo(d) > 0 ? e > 0 ? d : n12 : n; exp = MAX_EXP; MAX_EXP = 1 / 0; - n = new BigNumber19(s); + n = new BigNumber18(s); n02.c[0] = 0; for (; ; ) { q = div(n, d, 0, 1); @@ -177418,7 +234845,7 @@ query FETCH_TX_INFO { if (b == null) { str2 = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0"); } else if (b === 10 && alphabetHasNormalDecimalDigits) { - n = round(new BigNumber19(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE); + n = round(new BigNumber18(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE); str2 = toFixedPoint(coeffToString(n.c), n.e, "0"); } else { intCheck(b, 2, ALPHABET.length, "Base"); @@ -177436,8 +234863,8 @@ query FETCH_TX_INFO { P[Symbol.toStringTag] = "BigNumber"; P[Symbol.for("nodejs.util.inspect.custom")] = P.valueOf; if (configObject != null) - BigNumber19.set(configObject); - return BigNumber19; + BigNumber18.set(configObject); + return BigNumber18; } function bitFloor(n) { var i = n | 0; @@ -177508,8 +234935,8 @@ query FETCH_TX_INFO { } return str2; } - var BigNumber18 = clone(); - var bignumber_default = BigNumber18; + var BigNumber17 = clone(); + var bignumber_default = BigNumber17; // src/jsApi/utils/networkUtils.ts var getDexUrl = (network3) => { @@ -178795,7 +236222,7 @@ query FETCH_TX_INFO { isNaN(maxSize) ? -1 : maxSize ]; } - function logger43(origin) { + function logger39(origin) { const type = `${origin.toUpperCase()}:`.padStart(16); const [isDebug, maxSize] = parseEnv(origin.toLowerCase()); return { @@ -178885,9 +236312,9 @@ query FETCH_TX_INFO { } // ../../node_modules/@polkadot/wasm-crypto/node_modules/@polkadot/wasm-crypto-wasm/bytes.js - var import_bytes37 = __toESM(require_bytes(), 1); - var bytes = import_bytes37.bytes; - var sizeUncompressed = import_bytes37.sizeUncompressed; + var import_bytes34 = __toESM(require_bytes(), 1); + var bytes = import_bytes34.bytes; + var sizeUncompressed = import_bytes34.sizeUncompressed; // ../../node_modules/@polkadot/wasm-crypto/node_modules/@polkadot/wasm-crypto-wasm/fflate.js var u82 = Uint8Array; @@ -179456,7 +236883,7 @@ query FETCH_TX_INFO { wasm2.ext_hmac_sha512(8, ...allocU8a(key2), ...allocU8a(data)); return resultU8a(); }); - var keccak2563 = withWasm((wasm2, data) => { + var keccak25612 = withWasm((wasm2, data) => { wasm2.ext_keccak256(8, ...allocU8a(data)); return resultU8a(); }); @@ -180678,11 +238105,11 @@ query FETCH_TX_INFO { } // node_modules/@polkadot/util-crypto/keccak/asU8a.js - var import_js_sha32 = __toESM(require_sha32(), 1); + var import_js_sha3 = __toESM(require_sha32(), 1); function keccakAsU8a(value, bitLength = 256, onlyJs) { const is256 = bitLength === 256; const u8a = u8aToU8a(value); - return isWasmOnly(onlyJs) ? is256 ? keccak2563(u8a) : keccak512(u8a) : new Uint8Array(is256 ? import_js_sha32.default.keccak256.update(u8a).arrayBuffer() : import_js_sha32.default.keccak512.update(u8a).arrayBuffer()); + return isWasmOnly(onlyJs) ? is256 ? keccak25612(u8a) : keccak512(u8a) : new Uint8Array(is256 ? import_js_sha3.default.keccak256.update(u8a).arrayBuffer() : import_js_sha3.default.keccak512.update(u8a).arrayBuffer()); } var keccak256AsU8a = createBitHasher(256, keccakAsU8a); var keccak512AsU8a = createBitHasher(512, keccakAsU8a); @@ -183115,7 +240542,7 @@ zoo`.split("\n"); } // node_modules/@polkadot/util-crypto/scrypt/encode.js - var import_scryptsy = __toESM(require_lib7(), 1); + var import_scryptsy = __toESM(require_lib12(), 1); // node_modules/@polkadot/util-crypto/scrypt/defaults.js var DEFAULT_PARAMS = { @@ -184683,7 +242110,7 @@ zoo`.split("\n"); // ../../node_modules/@polkadot/types-codec/base/Vec.js var MAX_LENGTH = 64 * 1024; - var l = logger43("Vec"); + var l = logger39("Vec"); function decodeVecLength(value) { if (Array.isArray(value)) { return [value, value.length, 0]; @@ -185118,7 +242545,7 @@ zoo`.split("\n"); }; // ../../node_modules/@polkadot/types-codec/extended/Map.js - var l10 = logger43("Map"); + var l10 = logger39("Map"); function decodeMapFromU8a(registry, KeyClass, ValClass, u8a) { const output4 = /* @__PURE__ */ new Map(); const [offset, count] = compactFromU8aLim(u8a); @@ -185257,7 +242684,7 @@ zoo`.split("\n"); }; // ../../node_modules/@polkadot/types-codec/extended/BTreeSet.js - var l11 = logger43("BTreeSet"); + var l11 = logger39("BTreeSet"); function decodeSetFromU8a(registry, ValClass, u8a) { const output4 = /* @__PURE__ */ new Set(); const [offset, count] = compactFromU8aLim(u8a); @@ -186631,8 +244058,8 @@ zoo`.split("\n"); // ../../node_modules/@polkadot/types-create/util/xcm.js var XCM_MAPPINGS = ["AssetInstance", "Fungibility", "Junction", "Junctions", "MultiAsset", "MultiAssetFilter", "MultiLocation", "Response", "WildFungibility", "WildMultiAsset", "Xcm", "XcmError", "XcmOrder"]; - function mapXcmTypes(version27) { - return XCM_MAPPINGS.reduce((all, key2) => objectSpread2(all, { [key2]: `${key2}${version27}` }), {}); + function mapXcmTypes(version23) { + return XCM_MAPPINGS.reduce((all, key2) => objectSpread2(all, { [key2]: `${key2}${version23}` }), {}); } // ../../node_modules/@polkadot/types-known/chain/index.js @@ -189605,7 +247032,7 @@ zoo`.split("\n"); // src/jsApi/background/Signer.ts var sendRequest; var nextId = 0; - var Signer2 = class { + var Signer5 = class { constructor(_sendRequest) { sendRequest = _sendRequest; } @@ -199813,7 +257240,7 @@ zoo`.split("\n"); }; // ../../node_modules/@polkadot/types/metadata/PortableRegistry/PortableRegistry.js - var l12 = logger43("PortableRegistry"); + var l12 = logger39("PortableRegistry"); var TYPE_UNWRAP = { toNumber: () => -1 }; var PRIMITIVE_ALIAS = { Char: "u32", @@ -200563,7 +257990,7 @@ zoo`.split("\n"); } // ../../node_modules/@polkadot/types/metadata/util/validateTypes.js - var l13 = logger43("metadata"); + var l13 = logger39("metadata"); function validateTypes(registry, throwError, types2) { const missing = flattenUniq(extractTypes(types2)).filter((type) => !registry.hasType(type) && !registry.isLookupType(type)).sort(); if (missing.length !== 0) { @@ -203617,7 +261044,7 @@ zoo`.split("\n"); var shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8); // ../../node_modules/@polkadot/util-crypto/keccak/asU8a.js - var keccakAsU8a2 = /* @__PURE__ */ createDualHasher({ 256: keccak2563, 512: keccak512 }, { 256: keccak_256, 512: keccak_512 }); + var keccakAsU8a2 = /* @__PURE__ */ createDualHasher({ 256: keccak25612, 512: keccak512 }, { 256: keccak_256, 512: keccak_512 }); // ../../node_modules/@polkadot/util-crypto/secp256k1/expand.js function secp256k1Expand3(publicKey, onlyJs) { @@ -204024,25 +261451,25 @@ zoo`.split("\n"); "ExtrinsicUnknown", "ExtrinsicV4" ]; - function newFromValue(registry, value, version27) { + function newFromValue(registry, value, version23) { if (value instanceof GenericExtrinsic) { return value.unwrap(); } - const isSigned = (version27 & BIT_SIGNED) === BIT_SIGNED; - const type = VERSIONS[version27 & UNMASK_VERSION] || VERSIONS[0]; - return registry.createTypeUnsafe(type, [value, { isSigned, version: version27 }]); + const isSigned = (version23 & BIT_SIGNED) === BIT_SIGNED; + const type = VERSIONS[version23 & UNMASK_VERSION] || VERSIONS[0]; + return registry.createTypeUnsafe(type, [value, { isSigned, version: version23 }]); } - function decodeExtrinsic(registry, value, version27 = DEFAULT_VERSION) { + function decodeExtrinsic(registry, value, version23 = DEFAULT_VERSION) { if (isU8a2(value) || Array.isArray(value) || isHex2(value)) { - return decodeU8a3(registry, u8aToU8a2(value), version27); + return decodeU8a3(registry, u8aToU8a2(value), version23); } else if (value instanceof registry.createClassUnsafe("Call")) { - return newFromValue(registry, { method: value }, version27); + return newFromValue(registry, { method: value }, version23); } - return newFromValue(registry, value, version27); + return newFromValue(registry, value, version23); } - function decodeU8a3(registry, value, version27) { + function decodeU8a3(registry, value, version23) { if (!value.length) { - return newFromValue(registry, new Uint8Array(), version27); + return newFromValue(registry, new Uint8Array(), version23); } const [offset, length] = compactFromU8a(value); const total = offset + length.toNumber(); @@ -204124,8 +261551,8 @@ zoo`.split("\n"); }; var GenericExtrinsic = class extends ExtrinsicBase { __internal__hashCache; - constructor(registry, value, { version: version27 } = {}) { - super(registry, decodeExtrinsic(registry, value, version27)); + constructor(registry, value, { version: version23 } = {}) { + super(registry, decodeExtrinsic(registry, value, version23)); } get hash() { if (!this.__internal__hashCache) { @@ -204338,15 +261765,15 @@ zoo`.split("\n"); "ExtrinsicPayloadUnknown", "ExtrinsicPayloadV4" ]; - function decodeExtrinsicPayload(registry, value, version27 = DEFAULT_VERSION) { + function decodeExtrinsicPayload(registry, value, version23 = DEFAULT_VERSION) { if (value instanceof GenericExtrinsicPayload) { return value.unwrap(); } - return registry.createTypeUnsafe(VERSIONS2[version27] || VERSIONS2[0], [value, { version: version27 }]); + return registry.createTypeUnsafe(VERSIONS2[version23] || VERSIONS2[0], [value, { version: version23 }]); } var GenericExtrinsicPayload = class extends AbstractBase { - constructor(registry, value, { version: version27 } = {}) { - super(registry, decodeExtrinsicPayload(registry, value, version27)); + constructor(registry, value, { version: version23 } = {}) { + super(registry, decodeExtrinsicPayload(registry, value, version23)); } get blockHash() { return this.inner.blockHash; @@ -204403,17 +261830,17 @@ zoo`.split("\n"); // ../../node_modules/@polkadot/types/extrinsic/ExtrinsicPayloadUnknown.js var GenericExtrinsicPayloadUnknown = class extends Struct { - constructor(registry, _value, { version: version27 = 0 } = {}) { + constructor(registry, _value, { version: version23 = 0 } = {}) { super(registry, {}); - throw new Error(`Unsupported extrinsic payload version ${version27}`); + throw new Error(`Unsupported extrinsic payload version ${version23}`); } }; // ../../node_modules/@polkadot/types/extrinsic/ExtrinsicUnknown.js var GenericExtrinsicUnknown = class extends Struct { - constructor(registry, _value, { isSigned = false, version: version27 = 0 } = {}) { + constructor(registry, _value, { isSigned = false, version: version23 = 0 } = {}) { super(registry, {}); - throw new Error(`Unsupported ${isSigned ? "" : "un"}signed extrinsic version ${version27 & UNMASK_VERSION}`); + throw new Error(`Unsupported ${isSigned ? "" : "un"}signed extrinsic version ${version23 & UNMASK_VERSION}`); } }; @@ -205874,14 +263301,14 @@ zoo`.split("\n"); prefix }]); } - function convertExtrinsic(registry, { signedExtensions, version: version27 }) { + function convertExtrinsic(registry, { signedExtensions, version: version23 }) { return registry.createTypeUnsafe("ExtrinsicMetadataV14", [{ signedExtensions: signedExtensions.map((identifier) => ({ identifier, type: 0 })), type: 0, - version: version27 + version: version23 }]); } function createPallet(specs, registry, mod3, { calls, constants: constants2, errors: errors2, events, storage }) { @@ -205968,22 +263395,22 @@ zoo`.split("\n"); metadata: "MetadataAll" }, value); } - __internal__assertVersion = (version27) => { - if (this.version > version27) { - throw new Error(`Cannot convert metadata from version ${this.version} to ${version27}`); + __internal__assertVersion = (version23) => { + if (this.version > version23) { + throw new Error(`Cannot convert metadata from version ${this.version} to ${version23}`); } - return this.version === version27; + return this.version === version23; }; - __internal__getVersion = (version27, fromPrev) => { - if (version27 !== "latest" && this.__internal__assertVersion(version27)) { - const asCurr = `asV${version27}`; + __internal__getVersion = (version23, fromPrev) => { + if (version23 !== "latest" && this.__internal__assertVersion(version23)) { + const asCurr = `asV${version23}`; return this.__internal__metadata()[asCurr]; } - if (!this.__internal__converted.has(version27)) { - const asPrev = version27 === "latest" ? `asV${LATEST_VERSION}` : `asV${version27 - 1}`; - this.__internal__converted.set(version27, fromPrev(this.registry, this[asPrev], this.version)); + if (!this.__internal__converted.has(version23)) { + const asPrev = version23 === "latest" ? `asV${LATEST_VERSION}` : `asV${version23 - 1}`; + this.__internal__converted.set(version23, fromPrev(this.registry, this[asPrev], this.version)); } - return this.__internal__converted.get(version27); + return this.__internal__converted.get(version23); }; __internal__metadata = () => { return this.getT("metadata"); @@ -206078,7 +263505,7 @@ zoo`.split("\n"); // ../../node_modules/@polkadot/types/create/registry.js var DEFAULT_FIRST_CALL_IDX = new Uint8Array(2); - var l14 = logger43("registry"); + var l14 = logger39("registry"); function sortDecimalStrings(a, b) { return parseInt(a, 10) - parseInt(b, 10); } @@ -206102,13 +263529,13 @@ zoo`.split("\n"); function getVariantStringIdx({ index }) { return index.toString(); } - function injectErrors(_, { lookup, pallets }, version27, result) { + function injectErrors(_, { lookup, pallets }, version23, result) { clearRecord(result); for (let i = 0, count = pallets.length; i < count; i++) { const { errors: errors2, index, name: name6 } = pallets[i]; if (errors2.isSome) { const sectionName = stringCamelCase(name6); - lazyMethod(result, version27 >= 12 ? index.toNumber() : i, () => lazyVariants(lookup, errors2.unwrap(), getVariantStringIdx, ({ docs, fields, index: index2, name: name7 }) => ({ + lazyMethod(result, version23 >= 12 ? index.toNumber() : i, () => lazyVariants(lookup, errors2.unwrap(), getVariantStringIdx, ({ docs, fields, index: index2, name: name7 }) => ({ args: getFieldArgs(lookup, fields), docs: docs.map(valueToString), fields, @@ -206120,12 +263547,12 @@ zoo`.split("\n"); } } } - function injectEvents(registry, { lookup, pallets }, version27, result) { + function injectEvents(registry, { lookup, pallets }, version23, result) { const filtered = pallets.filter(filterEventsSome); clearRecord(result); for (let i = 0, count = filtered.length; i < count; i++) { const { events, index, name: name6 } = filtered[i]; - lazyMethod(result, version27 >= 12 ? index.toNumber() : i, () => lazyVariants(lookup, events.unwrap(), getVariantStringIdx, (variant) => { + lazyMethod(result, version23 >= 12 ? index.toNumber() : i, () => lazyVariants(lookup, events.unwrap(), getVariantStringIdx, (variant) => { const meta2 = registry.createType("EventMetadataLatest", objectSpread2({}, variant, { args: getFieldArgs(lookup, variant.fields) })); return class extends GenericEventData { constructor(registry2, value) { @@ -206135,13 +263562,13 @@ zoo`.split("\n"); })); } } - function injectExtrinsics(registry, { lookup, pallets }, version27, result, mapping2) { + function injectExtrinsics(registry, { lookup, pallets }, version23, result, mapping2) { const filtered = pallets.filter(filterCallsSome); clearRecord(result); clearRecord(mapping2); for (let i = 0, count = filtered.length; i < count; i++) { const { calls, index, name: name6 } = filtered[i]; - const sectionIndex = version27 >= 12 ? index.toNumber() : i; + const sectionIndex = version23 >= 12 ? index.toNumber() : i; const sectionName = stringCamelCase(name6); const allCalls = calls.unwrap(); lazyMethod(result, sectionIndex, () => lazyVariants(lookup, allCalls, getVariantStringIdx, (variant) => createCallFunction(registry, lookup, variant, sectionName, sectionIndex))); @@ -206729,9 +264156,9 @@ zoo`.split("\n"); this.createFromUri(suri, meta2, type) ); } - createFromJson({ address, encoded, encoding: { content, type, version: version27 }, meta: meta2 }, ignoreChecksum) { - assert2(version27 !== "3" || content[0] === "pkcs8", () => `Unable to decode non-pkcs8 type, [${content.join(",")}] found}`); - const cryptoType = version27 === "0" || !Array.isArray(content) ? this.type : content[1]; + createFromJson({ address, encoded, encoding: { content, type, version: version23 }, meta: meta2 }, ignoreChecksum) { + assert2(version23 !== "3" || content[0] === "pkcs8", () => `Unable to decode non-pkcs8 type, [${content.join(",")}] found}`); + const cryptoType = version23 === "0" || !Array.isArray(content) ? this.type : content[1]; const encType = !Array.isArray(type) ? [type] : type; assert2(["ed25519", "sr25519", "ecdsa", "ethereum"].includes(cryptoType), () => `Unknown crypto type ${cryptoType}`); const publicKey = isHex(address) ? hexToU8a(address) : this.decodeAddress(address, ignoreChecksum); @@ -211138,7 +268565,7 @@ zoo`.split("\n"); // node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/keccak/asU8a.js var keccakAsU8a3 = createDualHasher2({ - 256: keccak2563, + 256: keccak25612, 512: keccak512 }, { 256: keccak_2562, @@ -212181,14 +269608,14 @@ zoo`.split("\n"); encoding: { content, type, - version: version27 + version: version23 }, meta: meta2 }, ignoreChecksum) { - if (version27 === "3" && content[0] !== "pkcs8") { + if (version23 === "3" && content[0] !== "pkcs8") { throw new Error(`Unable to decode non-pkcs8 type, [${content.join(",")}] found}`); } - const cryptoType = version27 === "0" || !Array.isArray(content) ? this.type : content[1]; + const cryptoType = version23 === "0" || !Array.isArray(content) ? this.type : content[1]; const encType = !Array.isArray(type) ? [type] : type; if (!["ed25519", "sr25519", "ecdsa", "ethereum"].includes(cryptoType)) { throw new Error(`Unknown crypto type ${cryptoType}`); @@ -215343,7 +272770,7 @@ zoo`.split("\n"); }; function getFlutterSigningKey(flutterJS) { let sendRequest2 = getSignatureSendRequest(flutterJS); - return new Signer2(sendRequest2); + return new Signer5(sendRequest2); } // ../../node_modules/@firebase/util/dist/index.esm2017.js @@ -216011,7 +273438,7 @@ zoo`.split("\n"); throw new Error(`Attempted to log a message with an invalid logType (value: ${logType})`); } }; - var Logger45 = class { + var Logger41 = class { constructor(name6) { this.name = name6; this._logLevel = defaultLogLevel; @@ -216212,8 +273639,8 @@ zoo`.split("\n"); var unwrap = (value) => reverseTransformCache.get(value); // ../../node_modules/idb/build/index.js - function openDB(name6, version27, { blocked, upgrade, blocking, terminated } = {}) { - const request = indexedDB.open(name6, version27); + function openDB(name6, version23, { blocked, upgrade, blocking, terminated } = {}) { + const request = indexedDB.open(name6, version23); const openPromise = wrap(request); if (upgrade) { request.addEventListener("upgradeneeded", (event) => { @@ -216294,7 +273721,7 @@ zoo`.split("\n"); } var name$p = "@firebase/app"; var version$1 = "0.10.8"; - var logger44 = new Logger45("@firebase/app"); + var logger40 = new Logger41("@firebase/app"); var name$o = "@firebase/app-compat"; var name$n = "@firebase/analytics-compat"; var name$m = "@firebase/analytics"; @@ -216357,13 +273784,13 @@ zoo`.split("\n"); try { app.container.addComponent(component); } catch (e) { - logger44.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e); + logger40.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e); } } function _registerComponent(component) { const componentName = component.name; if (_components.has(componentName)) { - logger44.debug(`There were multiple attempts to register component ${componentName}.`); + logger40.debug(`There were multiple attempts to register component ${componentName}.`); return false; } _components.set(componentName, component); @@ -216487,17 +273914,17 @@ zoo`.split("\n"); } return app; } - function registerVersion(libraryKeyOrName, version27, variant) { + function registerVersion(libraryKeyOrName, version23, variant) { var _a2; let library = (_a2 = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a2 !== void 0 ? _a2 : libraryKeyOrName; if (variant) { library += `-${variant}`; } const libraryMismatch = library.match(/\s|\//); - const versionMismatch = version27.match(/\s|\//); + const versionMismatch = version23.match(/\s|\//); if (libraryMismatch || versionMismatch) { const warning = [ - `Unable to register library "${library}" with version "${version27}":` + `Unable to register library "${library}" with version "${version23}":` ]; if (libraryMismatch) { warning.push(`library name "${library}" contains illegal characters (whitespace or "/")`); @@ -216506,12 +273933,12 @@ zoo`.split("\n"); warning.push("and"); } if (versionMismatch) { - warning.push(`version name "${version27}" contains illegal characters (whitespace or "/")`); + warning.push(`version name "${version23}" contains illegal characters (whitespace or "/")`); } - logger44.warn(warning.join(" ")); + logger40.warn(warning.join(" ")); return; } - _registerComponent(new Component(`${library}-version`, () => ({ library, version: version27 }), "VERSION")); + _registerComponent(new Component(`${library}-version`, () => ({ library, version: version23 }), "VERSION")); } var DB_NAME = "firebase-heartbeat-database"; var DB_VERSION = 1; @@ -216547,12 +273974,12 @@ zoo`.split("\n"); return result; } catch (e) { if (e instanceof FirebaseError) { - logger44.warn(e.message); + logger40.warn(e.message); } else { const idbGetError = ERROR_FACTORY.create("idb-get", { originalErrorMessage: e === null || e === void 0 ? void 0 : e.message }); - logger44.warn(idbGetError.message); + logger40.warn(idbGetError.message); } } } @@ -216565,12 +273992,12 @@ zoo`.split("\n"); await tx2.done; } catch (e) { if (e instanceof FirebaseError) { - logger44.warn(e.message); + logger40.warn(e.message); } else { const idbGetError = ERROR_FACTORY.create("idb-set", { originalErrorMessage: e === null || e === void 0 ? void 0 : e.message }); - logger44.warn(idbGetError.message); + logger40.warn(idbGetError.message); } } } @@ -216738,14 +274165,14 @@ zoo`.split("\n"); // ../../node_modules/firebase/app/dist/esm/index.esm.js var name3 = "firebase"; - var version24 = "10.12.5"; - registerVersion(name3, version24, "app"); + var version20 = "10.12.5"; + registerVersion(name3, version20, "app"); // ../../node_modules/@firebase/installations/dist/esm/index.esm2017.js var name4 = "@firebase/installations"; - var version25 = "0.6.8"; + var version21 = "0.6.8"; var PENDING_TIMEOUT_MS = 1e4; - var PACKAGE_VERSION = `w:${version25}`; + var PACKAGE_VERSION = `w:${version21}`; var INTERNAL_AUTH_VERSION = "FIS_v2"; var INSTALLATIONS_API_URL = "https://firebaseinstallations.googleapis.com/v1"; var TOKEN_EXPIRATION_BUFFER = 60 * 60 * 1e3; @@ -217268,8 +274695,8 @@ zoo`.split("\n"); _registerComponent(new Component(INSTALLATIONS_NAME_INTERNAL, internalFactory, "PRIVATE")); } registerInstallations(); - registerVersion(name4, version25); - registerVersion(name4, version25, "esm2017"); + registerVersion(name4, version21); + registerVersion(name4, version21, "esm2017"); // ../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js var ANALYTICS_TYPE = "analytics"; @@ -217278,7 +274705,7 @@ zoo`.split("\n"); var FETCH_TIMEOUT_MILLIS = 60 * 1e3; var DYNAMIC_CONFIG_URL = "https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig"; var GTAG_URL = "https://www.googletagmanager.com/gtag/js"; - var logger45 = new Logger45("@firebase/analytics"); + var logger41 = new Logger41("@firebase/analytics"); var ERRORS2 = { ["already-exists"]: "A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.", ["already-initialized"]: "initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.", @@ -217299,7 +274726,7 @@ zoo`.split("\n"); const err = ERROR_FACTORY3.create("invalid-gtag-resource", { gtagURL: url }); - logger45.warn(err.message); + logger41.warn(err.message); return ""; } return url; @@ -217346,7 +274773,7 @@ zoo`.split("\n"); } } } catch (e) { - logger45.error(e); + logger41.error(e); } gtagCore("config", measurementId, gtagParams); } @@ -217376,7 +274803,7 @@ zoo`.split("\n"); await Promise.all(initializationPromisesToWaitFor); gtagCore("event", measurementId, gtagParams || {}); } catch (e) { - logger45.error(e); + logger41.error(e); } } function wrapGtag(gtagCore, initializationPromisesMap2, dynamicConfigPromisesList2, measurementIdToAppId2) { @@ -217401,7 +274828,7 @@ zoo`.split("\n"); gtagCore(command, ...args); } } catch (e) { - logger45.error(e); + logger41.error(e); } } return gtagWrapper; @@ -217508,7 +274935,7 @@ zoo`.split("\n"); await setAbortableTimeout(signal, throttleEndTimeMillis); } catch (e) { if (measurementId) { - logger45.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${measurementId} provided in the "measurementId" field in the local Firebase config. [${e === null || e === void 0 ? void 0 : e.message}]`); + logger41.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${measurementId} provided in the "measurementId" field in the local Firebase config. [${e === null || e === void 0 ? void 0 : e.message}]`); return { appId, measurementId }; } throw e; @@ -217522,7 +274949,7 @@ zoo`.split("\n"); if (!isRetriableError(error)) { retryData.deleteThrottleMetadata(appId); if (measurementId) { - logger45.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${measurementId} provided in the "measurementId" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`); + logger41.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${measurementId} provided in the "measurementId" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`); return { appId, measurementId }; } else { throw e; @@ -217534,7 +274961,7 @@ zoo`.split("\n"); backoffCount: backoffCount + 1 }; retryData.setThrottleMetadata(appId, throttleMetadata); - logger45.debug(`Calling attemptFetch again in ${backoffMillis} millis`); + logger41.debug(`Calling attemptFetch again in ${backoffMillis} millis`); return attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData); } } @@ -217588,7 +275015,7 @@ zoo`.split("\n"); } async function validateIndexedDB() { if (!isIndexedDBAvailable()) { - logger45.warn(ERROR_FACTORY3.create("indexeddb-unavailable", { + logger41.warn(ERROR_FACTORY3.create("indexeddb-unavailable", { errorInfo: "IndexedDB is not available in this environment." }).message); return false; @@ -217596,7 +275023,7 @@ zoo`.split("\n"); try { await validateIndexedDBOpenable(); } catch (e) { - logger45.warn(ERROR_FACTORY3.create("indexeddb-unavailable", { + logger41.warn(ERROR_FACTORY3.create("indexeddb-unavailable", { errorInfo: e === null || e === void 0 ? void 0 : e.toString() }).message); return false; @@ -217610,9 +275037,9 @@ zoo`.split("\n"); dynamicConfigPromise.then((config7) => { measurementIdToAppId2[config7.measurementId] = config7.appId; if (app.options.measurementId && config7.measurementId !== app.options.measurementId) { - logger45.warn(`The measurement ID in the local Firebase config (${app.options.measurementId}) does not match the measurement ID fetched from the server (${config7.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`); + logger41.warn(`The measurement ID in the local Firebase config (${app.options.measurementId}) does not match the measurement ID fetched from the server (${config7.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`); } - }).catch((e) => logger45.error(e)); + }).catch((e) => logger41.error(e)); dynamicConfigPromisesList2.push(dynamicConfigPromise); const fidPromise = validateIndexedDB().then((envIsValid) => { if (envIsValid) { @@ -217676,7 +275103,7 @@ zoo`.split("\n"); const err = ERROR_FACTORY3.create("invalid-analytics-context", { errorInfo: details }); - logger45.warn(err.message); + logger41.warn(err.message); } } function factory(app, installations, options) { @@ -217687,7 +275114,7 @@ zoo`.split("\n"); } if (!app.options.apiKey) { if (app.options.measurementId) { - logger45.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${app.options.measurementId} provided in the "measurementId" field in the local Firebase config.`); + logger41.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${app.options.measurementId} provided in the "measurementId" field in the local Firebase config.`); } else { throw ERROR_FACTORY3.create("no-api-key"); } @@ -217731,10 +275158,10 @@ zoo`.split("\n"); } function logEvent(analyticsInstance, eventName, eventParams, options) { analyticsInstance = getModularInstance(analyticsInstance); - logEvent$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], eventName, eventParams, options).catch((e) => logger45.error(e)); + logEvent$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], eventName, eventParams, options).catch((e) => logger41.error(e)); } var name5 = "@firebase/analytics"; - var version26 = "0.10.7"; + var version22 = "0.10.7"; function registerAnalytics() { _registerComponent(new Component(ANALYTICS_TYPE, (container, { options: analyticsOptions }) => { const app = container.getProvider("app").getImmediate(); @@ -217742,8 +275169,8 @@ zoo`.split("\n"); return factory(app, installations, analyticsOptions); }, "PUBLIC")); _registerComponent(new Component("analytics-internal", internalFactory2, "PRIVATE")); - registerVersion(name5, version26); - registerVersion(name5, version26, "esm2017"); + registerVersion(name5, version22); + registerVersion(name5, version22, "esm2017"); function internalFactory2(container) { try { const analytics = container.getProvider(ANALYTICS_TYPE).getImmediate(); diff --git a/lib/js/packages/reef-mobile-js/src/jsApi/swapApi.ts b/lib/js/packages/reef-mobile-js/src/jsApi/swapApi.ts index 5501b26e..a8906830 100644 --- a/lib/js/packages/reef-mobile-js/src/jsApi/swapApi.ts +++ b/lib/js/packages/reef-mobile-js/src/jsApi/swapApi.ts @@ -1,12 +1,15 @@ import { reefState ,network as nw, getAccountSigner} from '@reef-chain/util-lib'; import { switchMap, take } from "rxjs/operators"; -import { Contract} from "ethers"; +import { BigNumber, Contract} from "ethers"; import { ReefswapRouter } from "./abi/ReefswapRouter"; import { Observable, combineLatest, firstValueFrom } from "rxjs"; import { calculateAmount, calculateAmountWithPercentage, calculateDeadline, getInputAmount, getOutputAmount } from "./utils/math"; -import { approveTokenAmount } from './utils/tokenUtils'; +import { approveTokenAmount, getREEF20Contract } from './utils/tokenUtils'; import { getPoolReserves } from './utils/poolUtils'; import Signer from "./background/Signer"; +import { Signer as ReefSigner } from '@reef-chain/evm-provider'; +import { toBN } from '@reef-chain/evm-provider/utils'; +import { extension as extReef } from '@reef-chain/util-lib'; interface SwapSettings { deadline: number; @@ -25,6 +28,90 @@ const resolveSettings = ( slippageTolerance: Number.isNaN(slippageTolerance) ? defaultSwapSettings.slippageTolerance : slippageTolerance, }); +const hexToAscii = (str1: string): string => { + const hex = str1.toString(); + let str = ''; + for (let n = 0; n < hex.length; n += 2) { + str += String.fromCharCode(parseInt(hex.substr(n, 2), 16)); + } + return str; +}; + +const captureError = (events: Event[]): string|undefined => { + for (const event of events) { + const eventCompression = `${(event as any).event.section.toString()}.${(event as any).event.method.toString()}`; + if (eventCompression === 'evm.ExecutedFailed') { + const eventData = ((event as any).event.data.toJSON() as any[]); + let message = eventData[eventData.length - 2]; + if (typeof message === 'string' || message instanceof String) { + message = hexToAscii(message.substring(138)); + } else { + message = JSON.stringify(message); + } + return message; + } + } + return undefined; + }; + + const getReefCoinBalance = async ( + address: string, + provider: any, + ): Promise => { + const balance = await provider.api.derive.balances + .all(address as any) + .then((res: any) => BigNumber.from(res.freeBalance.toString(10))); + return balance; + }; + + const signerToReefSigner = async ( + signer: ReefSigner, + provider: any, + { + address, name, source, genesisHash, + }: any, + ): Promise => { + const evmAddress = await signer.getAddress(); + const isEvmClaimed = await signer.isClaimed(); + let inj; + try { + inj = await extReef.web3FromAddress(address); + } catch (e) { + // when web3Enable() is not called before + } + const balance = await getReefCoinBalance(address, provider); + return { + signer, + balance, + evmAddress, + isEvmClaimed, + name, + address, + source, + genesisHash: genesisHash!, + sign: inj?.signer, + }; + }; + + const accountToSigner = async ( + account: any, + provider: any, + sign: any, + source: string, + ): Promise => { + const signer = new ReefSigner(provider, account.address, sign); + return signerToReefSigner( + signer, + provider, + { + source, + address: account.address, + name: account.name || '', + genesisHash: account.genesisHash || '', + }, + ); + }; + export const initApi = (signingKey: Signer) => { (window as any).swap = { // Executes a swap @@ -52,8 +139,9 @@ export const initApi = (signingKey: Signer) => { { decimals: token2.decimals, amount: token2.amount }, settings.slippageTolerance ); - - const signer = await getAccountSigner(reefSigner.address, provider, signingKey); + const {signer} = await accountToSigner(reefSigner, provider, signingKey,"injected"); + + const swapRouter = new Contract( nw.getReefswapNetworkConfig(network).routerAddress, ReefswapRouter, @@ -62,31 +150,84 @@ export const initApi = (signingKey: Signer) => { try { observer.next({ status: 'approve-started' }); + // Approve token1 - await approveTokenAmount( - token1.address, - sellAmount, - nw.getReefswapNetworkConfig(network).routerAddress, - signer, - ); + const tokenContract = await getREEF20Contract(token1.address, signer); + let approveTransaction = + await tokenContract + .populateTransaction + .approve( + nw.getReefswapNetworkConfig(network).routerAddress, + sellAmount + ); + observer.next({ status: 'approved' }); - console.log("Token approved"); // Swap - console.log("Waiting for confirmation of swap..."); - const tx = await swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens( + const tradeTransaction = await swapRouter.populateTransaction.swapExactTokensForTokensSupportingFeeOnTransferTokens( sellAmount, minBuyAmount, [token1.address, token2.address], reefSigner.evmAddress, calculateDeadline(settings.deadline) ); - observer.next({ status: 'broadcast', transactionResponse: tx }); + + + const approveResources = await signer.provider.estimateResources(approveTransaction); + + const approveExtrinsic = signer.provider.api.tx.evm.call( + approveTransaction.to, + approveTransaction.data, + toBN(approveTransaction.value || 0), + toBN(approveResources.gas), + approveResources.storage.lt(0) ? toBN(0) : toBN(approveResources.storage), + ); + + const tradeExtrinsic = signer.provider.api.tx.evm.call( + tradeTransaction.to, + tradeTransaction.data, + toBN(tradeTransaction.value || 0), + toBN(582938 * 2), // hardcoded gas estimation, multiply by 2 as a safety margin + toBN(64 * 2), // hardcoded storage estimation, multiply by 2 as a safety margin + ); + + // Batching extrinsics + const batch = signer.provider.api.tx.utility.batchAll([ + approveExtrinsic, + tradeExtrinsic, + ]); + + // Signing and awaiting when data comes in block + const signAndSend = new Promise((resolve, reject): void => { + batch.signAndSend( + reefSigner.address, + { signer: signer.signingKey }, + (status: any) => { + const err = captureError(status.events); + if (err) { + reject({ message: err }); + } + if (status.dispatchError) { + reject({ message: status.dispatchError.toString() }); + } + if (status.status.isInBlock) { + resolve(); + } + // If you want to await until block is finalized use below if + if (status.status.isFinalized) { + + } + }, + ); + }); + await signAndSend; + + // observer.next({ status: 'broadcast', transactionResponse: tx }); - const receipt = await tx.wait(); - console.log("SWAP RESULT=", receipt); - observer.next({ status: 'included-in-block', transactionReceipt: receipt }); - observer.next({ status: 'finalized', transactionReceipt: receipt }); + // const receipt = await tx.wait(); + // console.log("SWAP RESULT=", receipt); + observer.next({ status: 'included-in-block', transactionReceipt: "receipt" }); + observer.next({ status: 'finalized', transactionReceipt: "receipt" }); observer.complete(); } catch (e) {